Skip to content

chore: remove dead ngc/Ivy AOT test fixture from store - #5204

Merged
markostanimirovic merged 1 commit into
ngrx:mainfrom
robert-md-or:chore/remove-dead-ngc-fixture
Jul 30, 2026
Merged

chore: remove dead ngc/Ivy AOT test fixture from store#5204
markostanimirovic merged 1 commit into
ngrx:mainfrom
robert-md-or:chore/remove-dead-ngc-fixture

Conversation

@robert-md-or

@robert-md-or robert-md-or commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

TITLE:
chore: remove dead ngc/Ivy AOT test fixture from store

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)
[x] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

modules/store/spec/ngc/tsconfig.ngc.json sets target: "ES5", which
TypeScript has deprecated as part of the cleanup tracked in
#5163 — the only file
in the workspace still using this value. Unlike the other files
addressed in that issue, this one couldn't simply be updated to a
modern target.

What is the new behavior?

Removed modules/store/spec/ngc/ (main.ts and tsconfig.ngc.json)
entirely, rather than migrating it, for the following reasons:

  • It isn't referenced by any Nx target (build/test/lint) in
    modules/store/project.json — confirmed via grep across
    project.json, angular.json, and nx.json.
  • Its tsconfig.ngc.json sets angularCompilerOptions.genDir: "ngfactory", a View Engine-specific option for Angular's pre-Ivy AOT
    compiler (ngc). Angular removed View Engine entirely starting with
    Ivy (Angular 9+). This workspace is currently on Angular 22, where
    this compilation mode no longer exists — there's no modern
    equivalent to migrate target: "ES5" to, since the thing it was
    configured to test doesn't exist anymore.
  • Git history shows the last substantive change to the file was in
    2021 (build: update to Angular libraries to version 12 RC.0 #3000, an Angular 12 RC.0 dependency bump); since then it's
    only been touched by an automated prettier formatting pass, with
    no further review or use.

Verified with:

  • pnpm nx run store:build — clean build
  • pnpm nx run store:test — 80 test files, 794 tests, 0 type errors

This closes the last remaining category from
#5163
(downlevelIteration, moduleResolution, and baseUrl/rootDir were
addressed in separate PRs: #5201, #5203, and one more).

Note for reviewers: if removal isn't the preferred resolution here
(e.g. if there's a reason to keep and repair this fixture instead),
happy to revisit — in that case #5163 would need to stay open rather
than close with this merge.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Removes modules/store/spec/ngc/ (main.ts and tsconfig.ngc.json), which
was flagged during the TypeScript 6/7 deprecation cleanup in ngrx#5163 as
using target: "ES5" — a deprecated value not otherwise present
anywhere else in the workspace.

This fixture appears to be dead code: it isn't referenced by any Nx
target (build/test/lint) in modules/store/project.json, and its
tsconfig sets angularCompilerOptions.genDir: "ngfactory", a View
Engine-specific option for the pre-Ivy AOT compiler (ngc), which
Angular removed entirely starting with Ivy (Angular 9+). The workspace
is currently on Angular 22, where View Engine/ngc no longer exists, so
this config cannot meaningfully be "fixed" to a modern target — the
compilation mode it exercises doesn't apply anymore.

Last substantive change to the file was in 2021 (ngrx#3000, Angular 12
RC.0 update); since then it's only been touched by an automated
prettier pass.

Verified with:
- pnpm nx run store:build — clean build
- pnpm nx run store:test — 80 test files, 794 tests, 0 type errors

This closes the last remaining category from ngrx#5163
(target: "ES5"). downlevelIteration, moduleResolution, and
baseUrl/rootDir were addressed in separate PRs.
@robert-md-or

Copy link
Copy Markdown
Contributor Author

Verification Guide for Reviewers

Why delete instead of migrate target: "ES5" to something modern?

I first checked whether the file was reachable from any build/test/lint pipeline:

grep -rn "ngc" package.json .github/
grep -rln "spec/ngc" --include="*.md" --include="*.json" --include="*.yml" .

No references anywhere outside the file itself and Nx's own generated .nx/workspace-data/file-map.json cache (not a real usage).

I then looked at what the config was actually testing, via angularCompilerOptions.genDir: "ngfactory" in tsconfig.ngc.json and the plain NgModule/bootstrap-style code in main.ts. genDir is specific to Angular's old View Engine AOT compiler (ngc), which doesn't exist anymore — Ivy replaced it starting with Angular 9, and this workspace is on Angular 22. There's no modern target value that makes sense here, because the thing being tested (a separate ngc-driven compilation pass) is no longer part of Angular at all.

git log --follow -p on the file confirms it hasn't had a substantive change since 2021 (#3000, Angular 12 RC.0), and the only commits since then are formatting-only (prettier).

Verification performed after removal:

Check Result
pnpm nx run store:build Clean build, no errors
pnpm nx run store:test 80 test files, 794 tests, 0 type errors

Given this was flagged as an open question in my scoping comment on #5163, and the fix here isn't a simple config change like the other three PRs, I'm glad to adjust if there's context I'm missing about why this fixture exists or should be kept.

@robert-md-or

Copy link
Copy Markdown
Contributor Author

Note for reviewers:
this PR is intended to close #5163 only once all four related PRs (#5201, #5202, #5203, and this one) have been merged. If this one happens to merge before the other three, the issue may close prematurely while some categories are still open — please reopen it in that case. Also, if removal isn't the preferred resolution here (e.g. if there's a reason to keep and repair this fixture instead), happy to revisit.

@markostanimirovic
markostanimirovic merged commit c6f254c into ngrx:main Jul 30, 2026
6 checks passed
@markostanimirovic

Copy link
Copy Markdown
Member

Thanks @robert-md-or!

@robert-md-or

Copy link
Copy Markdown
Contributor Author

Thanks for merging! 🙌

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.

4 participants