Skip to content
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

Support ES2018 syntax by upgrading acorn #6

Merged
merged 3 commits into from
May 6, 2019

Conversation

tchetwin
Copy link
Contributor

@tchetwin tchetwin commented May 2, 2019

In order to provide identity sourcemaps for JavaScript with ES2018 syntax it's
necessary to update the parser.

This PR bumps the major version of acorn from 5 to 6 to achieve this.

The acorn release notes for major version 6 are here. In particular the breaking changes listed are:

Breaking changes

The default value of the ecmaVersion option is now 9 (2018).

Plugins work differently, and will have to be rewritten to work with this version.

The loose parser and walker have been moved into separate packages (acorn-loose and acorn-walk)

I don't think these pose a problem here.

Also included is a test fixture that fails without the changes and some tweaks
to pass the lint checks.

This major version upgrade of the parser is needed to support ES2018
JavaScript syntax.
@phated
Copy link
Contributor

phated commented May 2, 2019

@tchetwin this looks great! Do you see any issue with me bumping the major version just incase there are unintended consequences of the acorn major bump?

@phated phated merged commit 5240e34 into gulp-sourcemaps:master May 6, 2019
@phated
Copy link
Contributor

phated commented May 6, 2019

Thanks again @tchetwin! I'll get this released in a major.

@phated
Copy link
Contributor

phated commented May 6, 2019

2.0.0 was just released! https://www.npmjs.com/package/@gulp-sourcemaps/identity-map

@tchetwin tchetwin deleted the acorn-6 branch May 14, 2019 09:25
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