-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
[Babel 8] Remove decorator parser plugin options #17643
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
Conversation
Support for the following versions have been removed: 2018-09 2021-12 2022-03 2023-01 2023-05
The allowCallParenthesized is now always false.
|
|
||
| @(foo + bar) method2() {} | ||
|
|
||
| @(this.foo)(bar) method3() {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test was extracted into a new test: invalid-parenthesized-callexpression because the production is invalid per 2023-11 spec.
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/60410 |
| this.raise(Errors.ImportReflectionNotBinding, specifiers[0].loc.start); | ||
| } | ||
| // @ts-expect-error comparing undefined and number | ||
| if (node.assertions?.length > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nicolo-ribaudo The current spec https://tc39.es/proposal-source-phase-imports/#sec-imports does not allow withClause after the fromClause when there is an import phase. If this is intentional, we should add a similar check to the .attributes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No it's just that it hasn't been rebased after import attributes was merged. The PR in the spec repo supports both.
ae8f0e4 to
ce154ab
Compare
|
commit: |
| @dec(0) | ||
| @globalThis.dec(0) | ||
| @(globalThis["dec"])(0) | ||
| @((globalThis["dec"])(0)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this expected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, now you cannot have a parenthesized expression followed by call arguments. The whole thing needs to be in the parentheses.
Fixes #1, Fixes #2This PR cleans up babel-parser logics on import assertions and JSON modules. We also removed all decorators plugin options as Babel 8 only supports two versions:
legacyand2023-11.