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 support Class field declarations #438

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

DrawAChicken
Copy link

This is required because Acorn uses acorn-class-fields.

@DrawAChicken
Copy link
Author

What is wrong with CL

@DrawAChicken DrawAChicken force-pushed the feature/class-field-declarations branch from c0a6c15 to 3e49b49 Compare January 6, 2021 09:49
@ajvincent
Copy link

Looking at the build logs versus https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes#browser_compatibility, the bug is obvious. Classes field support started in Node 12, but the .travis.yml file mandates testing against Node 6, 8, and 10.

@palant
Copy link

palant commented Dec 21, 2021

Looking at the build logs versus https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes#browser_compatibility, the bug is obvious. Classes field support started in Node 12, but the .travis.yml file mandates testing against Node 6, 8, and 10.

No, the Node version is irrelevant here. The parser used is acorn, and the issue is that test/compare-acorn-es2019/ directory is being processed without the acorn-class-fields plugin. Here:

options = {
ranges: true,
locations: false,
ecmaVersion: 10
};
tree = acorn.parse(code, options);

And here:

options = {
ranges: true,
locations: false,
ecmaVersion: 10
};
tree = acorn.parse(code, options);

@kevincox
Copy link

kevincox commented Apr 7, 2024

I added a PR that supersedes this with more tests that pass: #465

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.

None yet

4 participants