Update dependency @types/estree to v1.0.9 (with type adaptations)#1985
Conversation
Bumps @types/estree to 1.0.9. The updated ESTree types model newer
ECMAScript constructs, which surfaced as compile errors:
- Import/export specifier endpoints are now `Identifier | Literal`
(ES2022 arbitrary module namespace names, e.g. `export { x as "y" }`).
Added a `getSpecifierName` helper and route name accesses through it;
Source only supports identifier names, so it falls back to the
literal's value.
- `ImportDeclaration` now requires an `attributes` field (import
attributes); set it to `[]` in the AST constructor.
- `BinaryExpression.left` is now `Expression | PrivateIdentifier`
(private-in expressions); narrowed with casts since private fields are
not valid in Source.
Supersedes the lockfile-only Renovate PR #1766.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request introduces support for ES2022 string literal import and export specifiers by adding a helper function getSpecifierName to handle both Identifier and Literal nodes. This helper is integrated across the interpreter, finder, preprocessor, parser rules, and standard library modules. Additionally, the PR updates @types/estree to version 1.0.9, adds type assertions for binary expression operands, and includes an empty attributes array when creating import declarations. There are no review comments to evaluate, and I have no further feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Coverage Report for CI Build 26864863203Coverage decreased (-0.002%) to 78.54%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
Updates
@types/estreeto 1.0.9. Unlike a normal Renovate lockfile bump, this version's updated ESTree types model newer ECMAScript constructs, which broke compilation in 28 places. This PR includes the source adaptations so the build passes.Changes
Identifier | Literal— ES2022 allows arbitrary module namespace names (e.g.export { x as "y" }). Added agetSpecifierNamehelper inutils/ast/helpers.tsand routed.nameaccesses through it. Source only supports identifier names, so it falls back to the literal's value.ImportDeclarationnow requiresattributes(import attributes) — set to[]in theimportDeclarationAST constructor.BinaryExpression.leftis nowExpression | PrivateIdentifier(private-in expressions) — narrowed with casts in the transpiler and stepper, since private fields are not valid in Source.Verification
yarn buildpasses (0 type errors)Note
Supersedes the lockfile-only Renovate PR #1766, which fails CI on its own because it lacks these source changes. That PR can be closed once this merges.
🤖 Generated with Claude Code