Skip to content

parser: Change suffix to use ES6 default module export#1315

Merged
nknapp merged 1 commit into
handlebars-lang:masterfrom
Turbo87:es6-parser
Feb 24, 2017
Merged

parser: Change suffix to use ES6 default module export#1315
nknapp merged 1 commit into
handlebars-lang:masterfrom
Turbo87:es6-parser

Conversation

@Turbo87

@Turbo87 Turbo87 commented Feb 23, 2017

Copy link
Copy Markdown
Contributor

This export will be transpiled by Babel for the cjs distribution, but will enable others to use a pure ES6 module distribution.

Resolves #1313

/cc @chadhietala @mmun

@chadhietala

Copy link
Copy Markdown

This seems good. I wouldn't think the CI failures are related.

@Turbo87

Turbo87 commented Feb 23, 2017

Copy link
Copy Markdown
Contributor Author

yeah, that test failure seems to be unrelated

@nknapp

nknapp commented Feb 23, 2017

Copy link
Copy Markdown
Collaborator

It's not completely unrelated. The reason is this:

ERROR: Coverage for statements (95.06%) does not meet global threshold (100%)
ERROR: Coverage for branches (95.77%) does not meet global threshold (100%)
ERROR: Coverage for functions (97.01%) does not meet global threshold (100%)

The generated file dist/cjs/handlebars/compiler/parser.js is not completely covered by tests.
There is a line /* istanbul ignore next */ in the header but somehow it has no effect, when this PR is applied.

@nknapp

nknapp commented Feb 23, 2017

Copy link
Copy Markdown
Collaborator

Coverage-Report of the parser.js file...

parser-coverage.zip

@nknapp

nknapp commented Feb 23, 2017

Copy link
Copy Markdown
Collaborator

Since all the lines in this file have been ignored in the recent builds and I don't think it is possible to cover the entire file, I think it would be OK to exclude the file in .istanbul.yml.

@chadhietala could you do that?

@Turbo87

Turbo87 commented Feb 23, 2017

Copy link
Copy Markdown
Contributor Author

@nknapp good point. I've added the parser.js file to the istanbul ignore list

- This export will be transpiled by Babel for the cjs distribution,
  but will enable others to  use a pure ES6 module distribution
- Instanbul: Ignore "parser.js" for coverage reporting. This file was ignored before
  via annotation, but this has no effect anymore due to the above change
- Remove istanbul annotation from `parser-prefix` (@nknapp)

Squashed by @nknapp
@nknapp

nknapp commented Feb 24, 2017

Copy link
Copy Markdown
Collaborator

I have squashed the commits (makes it easier to cherry-pick to the 4.x-branch) and removed the now obsolete istanbul annotation from parser-prefix.

I hope you didn't mind me force-pushing to your es6-parser branch.

@nknapp nknapp merged commit 8baba76 into handlebars-lang:master Feb 24, 2017
@Turbo87

Turbo87 commented Feb 24, 2017

Copy link
Copy Markdown
Contributor Author

Not at all, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants