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

Add new ecmaVersion values and 'latest' to types #979

Merged
merged 1 commit into from
Sep 3, 2020

Conversation

antross
Copy link
Contributor

@antross antross commented Sep 2, 2020

Aligns types for ecmaVersion with current docs and implementation.

Aligns types for `ecmaVersion` with current docs and implementation.
@antross
Copy link
Contributor Author

antross commented Sep 2, 2020

Note: I left ecmaVersion as optional in the types for now since it currently generates a warning as opposed to an error.

marijnh added a commit that referenced this pull request Sep 3, 2020
@marijnh marijnh merged commit 57b82c4 into acornjs:master Sep 3, 2020
@marijnh
Copy link
Member

marijnh commented Sep 3, 2020

Thanks. I've followed up with 646b614 which does make ecmaVersion required (the run-time warning fallback is just there to prevent breaking old code—newly typechecked code should make sure to pass the option.)

@antross
Copy link
Contributor Author

antross commented Sep 3, 2020

Thanks @marijnh.

One question on your follow-up commit: should the options param also now be required for parse and related functions to ensure ecmaVersion is provided?

static parse(this: typeof Parser, input: string, options?: Options): Node

@marijnh
Copy link
Member

marijnh commented Sep 3, 2020

should the options param also now be required for parse and related functions to ensure ecmaVersion is provided?

Yes, that would make sense actually.

@JLHwung
Copy link
Contributor

JLHwung commented Sep 30, 2020

@marijnh Can you do a patch release? This issue is blocking webpack 5 to upgrade to acorn 8 because the type lint is failing. webpack/webpack#11552

@marijnh
Copy link
Member

marijnh commented Sep 30, 2020

I've tagged 8.0.2

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