Skip to content

refactor(frontend): remove unused @angular/localize - #9752

Open
aglinxinyuan wants to merge 1 commit into
apache:mainfrom
aglinxinyuan:refactor/frontend-unused-angular-localize
Open

aglinxinyuan wants to merge 1 commit into
apache:mainfrom
aglinxinyuan:refactor/frontend-unused-angular-localize

Conversation

@aglinxinyuan

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Remove the unused @angular/localize dependency from the frontend (+2/−64 lines, all but one of them in yarn.lock). Nothing uses it, so there is no behaviour change: no file imports @angular/localize or calls $localize, and angular.json builds with zone.js as its only polyfill and has no i18n options.

yarn.lock also loses the four @types/babel__* packages that only @angular/localize required. The @babel/parser and @babel/types entries stay; they only drop the version ranges those packages asked for, which are the two added lines.

Event PR / Commit
Introduced by #759 (2020-06-01), with the @angular/localize/init polyfill; the manifest line was put back without it by #2309 (2024-02-24)
Usage removed by #2348 (2024-02-04), which removed the polyfill and the package

As of 2026-11-29, nothing has used it for almost two years and ten months.

Any related issues, documentation, discussions?

Closes #9751.

How was this PR tested?

Ran on this branch (Windows 11, Node 24.15.0), from frontend/ unless noted:

yarn install --immutable --mode=skip-build
yarn dedupe --check @angular/cdk
yarn format:ci
npx tsc --noEmit -p src/tsconfig.app.json
npx tsc --noEmit -p src/tsconfig.spec.json
yarn build
./bin/licensing/check_binary_deps.py --ignore-transitive-version npm frontend/dist/3rdpartylicenses.json  # from the repo root
yarn test
  • yarn install --immutable accepts the updated lockfile, and every other command passes.
  • The licence check reports OK: 135 npm packages match LICENSE-binary.
  • yarn test: 257 test files, 7,432 tests pass and 1 is skipped (the it.skip already in operator-property-edit-frame.component.spec.ts).

To re-check, this returns no hits on this branch:

git grep -nE '@angular/localize|\$localize' -- frontend ':!frontend/yarn.lock'

The yarn.lock lines that still mention it are optional peer dependencies of Angular's build tooling.

Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Claude Opus 5.5)

Nothing in the frontend imports @angular/localize or uses $localize.
The polyfill that loaded it was removed with the i18n setup in apache#2348,
and the manifest line came back with the Angular 14 bump in apache#2309.
Dropping it also drops the four @types/babel__* packages that only it
pulled in.
Copilot AI balanced review requested due to automatic review settings November 30, 2026 04:18
@aglinxinyuan aglinxinyuan self-assigned this Nov 30, 2026
@aglinxinyuan
aglinxinyuan requested a review from kunwp1 November 30, 2026 04:18

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@aglinxinyuan
aglinxinyuan requested a balanced review from Copilot November 30, 2026 04:18
@github-actions github-actions Bot added dependencies Pull requests that update a dependency file refactor Refactor the code frontend Changes related to the frontend GUI labels Nov 30, 2026

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@github-actions

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • No candidates found from git blame history.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.79%. Comparing base (660c27b) to head (0f2155b).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #9752   +/-   ##
=========================================
  Coverage     91.79%   91.79%           
  Complexity     5135     5135           
=========================================
  Files          1309     1309           
  Lines         58069    58069           
  Branches       7561     7561           
=========================================
  Hits          53304    53304           
  Misses         2877     2877           
  Partials       1888     1888           
Flag Coverage Δ *Carryforward flag
access-control-service 77.44% <ø> (ø) Carriedforward from 660c27b
agent-service 99.56% <ø> (ø) Carriedforward from 660c27b
amber 85.95% <ø> (ø) Carriedforward from 660c27b
computing-unit-managing-service 63.84% <ø> (ø) Carriedforward from 660c27b
config-service 87.50% <ø> (ø) Carriedforward from 660c27b
file-service 82.16% <ø> (ø) Carriedforward from 660c27b
frontend 96.49% <ø> (ø)
notebook-migration-service 83.84% <ø> (ø) Carriedforward from 660c27b
pyamber 98.70% <ø> (ø) Carriedforward from 660c27b
result-service 86.48% <ø> (ø) Carriedforward from 660c27b
workflow-compiling-service 80.90% <ø> (ø) Carriedforward from 660c27b

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file frontend Changes related to the frontend GUI refactor Refactor the code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove the unused @angular/localize dependency from the frontend

3 participants