[Babel 8] Remove decorator parser plugin options#17643
[Babel 8] Remove decorator parser plugin options#17643nicolo-ribaudo merged 13 commits intobabel:mainfrom
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.
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.
@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.
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.
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.