Skip to content

fix: Adapt to node's removal of the module header #255

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 28, 2019

Conversation

isaacs
Copy link
Contributor

@isaacs isaacs commented Oct 15, 2019

As of version 11.11.0 (and backported to 10.16), node automatically strips
the module closure header from the module source code. So, the fix for that
caused off-by-one errors in the sourcemapped file.

As of version 11.11.0 (and backported to 10.16), node automatically strips
the module closure header from the module source code.  So, the fix for that
caused off-by-one errors in the sourcemapped file.

Set the headerLength to 0 when it is known to not be present.
@isaacs isaacs force-pushed the node-header-length-change branch from f2f9f1f to b2e96dd Compare October 15, 2019 21:47
@isaacs
Copy link
Contributor Author

isaacs commented Oct 16, 2019

Bonus: updated the test to work with Node 12's new reporting that quotes the invalid token in SyntaxError messages.

@LinusU
Copy link
Collaborator

LinusU commented Oct 28, 2019

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.

2 participants