Repository navigation
fix(parser): reject invalid modifiers on import aliases - #26622
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6e013f3cee
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Merging this PR will not alter performance
Comparing Footnotes
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5c18e900a8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
abef7b6 to
5c18e90
Compare
Merge activity
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: abef7b678d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Oxc currently accepts and discards invalid modifiers on TypeScript import aliases. Validate them before constructing the declaration: `declare import X = A.B;` now reports TS1079, and `abstract import X = A.B;` reports TS1242. Adds regression coverage for modifier combinations and exported, ambient, external, and type-only aliases. Valid aliases retain their existing behavior.
5c18e90 to
827fdbd
Compare
### 🚀 Features - 1fac655 coverage: Support new TypeScript fixture layout (#26226) (camc314) ### 🐛 Bug Fixes - cd7228f minifier: Add missing negation for boolean literal (#26847) (Armano) - 32305e2 transformer: Skip enum reverse mappings for syntactic string initializers (#26724) (Dunqing) - 7811f0a parser: Preserve reparsed `await` tokens (#26619) (camc314) - 9220158 transformer: Skip recovered using loop patterns (#26722) (camc314) - 3130405 parser: Recover await using object binding patterns (#26721) (camc314) - 827fdbd parser: Reject invalid modifiers on import aliases (#26622) (camc314) ### ⚡ Performance - 3f1e3aa minifier: Preallocate stmts vec size to avoid excesive reallocs (#26856) (Armano) - bd3f69e semantic: Reuse identifier hashes in enum member lookups (#26773) (camc314) - 5f72954 minifier: Reduce allocations when processing if statements (#26666) (Armano)
Exact pin in @acusti/vite-plugin-react-compiler, plus the root and docs devDependency ranges so bun hoists a single copy. The parser now rejects modifiers on a TypeScript `import x = …` alias, which 0.150.0 accepted and ignored (oxc-project/oxc#26622). A non-constant string concatenation as an enum initializer no longer gets a numeric reverse mapping, matching Babel (oxc-project/oxc#26724); TypeScript rejects that input (TS18033), so it isn’t pinned. The new `reactCompiler.reportDiagnostics` option reaches oxc through the plugin’s `compiler` option but has no visible effect, because the plugin only reads `fatal`. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01U23pU27G1XC7e5SDDWgetJ
Exact pin in @acusti/vite-plugin-react-compiler, plus the root and docs devDependency ranges so bun hoists a single copy. The parser now rejects modifiers on a TypeScript `import x = …` alias, which 0.150.0 accepted and ignored (oxc-project/oxc#26622). A non-constant string concatenation as an enum initializer no longer gets a numeric reverse mapping, matching Babel (oxc-project/oxc#26724); TypeScript rejects that input (TS18033), so it isn’t pinned. The new `reactCompiler.reportDiagnostics` option reaches oxc through the plugin’s `compiler` option but has no visible effect, because the plugin only reads `fatal`. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01U23pU27G1XC7e5SDDWgetJ
Exact pin in @acusti/vite-plugin-react-compiler, plus the root and docs devDependency ranges so bun hoists a single copy. The parser now rejects modifiers on a TypeScript `import x = …` alias, which 0.150.0 accepted and ignored (oxc-project/oxc#26622). A non-constant string concatenation as an enum initializer no longer gets a numeric reverse mapping, matching Babel (oxc-project/oxc#26724); TypeScript rejects that input (TS18033), so it isn’t pinned. The new `reactCompiler.reportDiagnostics` option reaches oxc through the plugin’s `compiler` option but has no visible effect, because the plugin only reads `fatal`. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01U23pU27G1XC7e5SDDWgetJ
Exact pin in @acusti/vite-plugin-react-compiler, plus the root and docs devDependency ranges so bun hoists a single copy. The parser now rejects modifiers on a TypeScript `import x = …` alias, which 0.150.0 accepted and ignored (oxc-project/oxc#26622). A non-constant string concatenation as an enum initializer no longer gets a numeric reverse mapping, matching Babel (oxc-project/oxc#26724); TypeScript rejects that input (TS18033), so it isn’t pinned. The new `reactCompiler.reportDiagnostics` option reaches oxc through the plugin’s `compiler` option but has no visible effect, because the plugin only reads `fatal`. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01U23pU27G1XC7e5SDDWgetJ
Oxc currently accepts and discards invalid modifiers on TypeScript import aliases. Validate them before constructing the declaration:
declare import X = A.B;now reports TS1079, andabstract import X = A.B;reports TS1242.Adds regression coverage for modifier combinations and exported, ambient, external, and type-only aliases. Valid aliases retain their existing behavior.