Skip to content

fix(compiler-cli): require @jridgewell/sourcemap-codec 1.6.0 or later - #71453

Open
lazerg wants to merge 1 commit into
angular:mainfrom
lazerg:fix/issue-71452-sourcemap-codec-range
Open

lazerg wants to merge 1 commit into
angular:mainfrom
lazerg:fix/issue-71452-sourcemap-codec-range

Conversation

@lazerg

@lazerg lazerg commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.dev application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

compiler-cli bundles magic-string 1.x, which imports encodeRangeMappings from @jridgewell/sourcemap-codec. That export was added in 1.6.0, but compiler-cli still declares ^1.4.14. If a project's lockfile already has 1.4.x or 1.5.x, the package manager keeps it and importing @angular/compiler-cli throws a SyntaxError.

Issue Number: #71452

What is the new behavior?

The range is now ^1.6.0, so package managers install a version that has the export.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

The bundled magic-string 1.x imports `encodeRangeMappings`, which only exists since 1.6.0, so loading the compiler crashed when an older version was installed.
@pullapprove
pullapprove Bot requested review from alan-agius4 and atscott October 20, 2026 10:39
@angular-robot angular-robot Bot added the area: compiler Issues related to `ngc`, Angular's template compiler label Oct 20, 2026
@ngbot ngbot Bot added this to the Backlog milestone Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: compiler Issues related to `ngc`, Angular's template compiler

Projects

None yet

Development

Successfully merging this pull request may close these issues.

compiler-cli declares @jridgewell/sourcemap-codec ^1.4.14 but its bundled magic-string 1.x needs ^1.6.0.

2 participants