Skip to content

Update dependency @types/estree to v1.0.9 (with type adaptations)#1985

Merged
RichDom2185 merged 2 commits into
masterfrom
fix/estree-types-1.0.9
Jun 6, 2026
Merged

Update dependency @types/estree to v1.0.9 (with type adaptations)#1985
RichDom2185 merged 2 commits into
masterfrom
fix/estree-types-1.0.9

Conversation

@martin-henz

Copy link
Copy Markdown
Member

Updates @types/estree to 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

  • Import/export specifier endpoints are now Identifier | Literal — ES2022 allows arbitrary module namespace names (e.g. export { x as "y" }). Added a getSpecifierName helper in utils/ast/helpers.ts and routed .name accesses through it. Source only supports identifier names, so it falls back to the literal's value.
  • ImportDeclaration now requires attributes (import attributes) — set to [] in the importDeclaration AST constructor.
  • BinaryExpression.left is now Expression | PrivateIdentifier (private-in expressions) — narrowed with casts in the transpiler and stepper, since private fields are not valid in Source.

Verification

  • yarn build passes (0 type errors)
  • eslint clean on changed files
  • 885 tests pass across preprocessor / transpiler / stepper / stdlib / parser / cse-machine / finder / utils-ast

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

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>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@coveralls

coveralls commented Jun 2, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 26864863203

Coverage decreased (-0.002%) to 78.54%

Details

  • Coverage decreased (-0.002%) from the base build.
  • Patch coverage: 6 uncovered changes across 4 files (14 of 20 lines covered, 70.0%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
src/utils/ast/helpers.ts 10 7 70.0%
src/cse-machine/interpreter.ts 1 0 0.0%
src/finder.ts 1 0 0.0%
src/modules/preprocessor/analyzer.ts 2 1 50.0%
Total (8 files) 20 14 70.0%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 8772
Covered Lines: 7058
Line Coverage: 80.46%
Relevant Branches: 4224
Covered Branches: 3149
Branch Coverage: 74.55%
Branches in Coverage %: Yes
Coverage Strength: 181430.86 hits per line

💛 - Coveralls

@RichDom2185 RichDom2185 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@RichDom2185 RichDom2185 merged commit c1bc91b into master Jun 6, 2026
5 checks passed
@RichDom2185 RichDom2185 deleted the fix/estree-types-1.0.9 branch June 6, 2026 11:04
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.

3 participants