Step 1-2 (audit + plan): classified 35 project markdown files into Core/Architecture/ADR/Temporary-audit/Sprint-report/Generated-review/ Duplicate/Obsolete/Historical. Agent-tooling files (.agents/skills/**, .superpowers/**, docs/context/**, CLAUDE.md/GEMINI.md/AGENTS.md/ .github/copilot-instructions.md) explicitly out of scope — intentional per-tool duplication, not documentation debt. Step 3 (merge, no information lost): - docs/PROJECT.md -> docs/PROJECT_INDEX.md, rewritten as the single entry point: system overview, living-doc index, archive pointer, current status, and a critical-finding callout up top. - docs/backend/BACKEND-INTEGRATION.md -> docs/BACKEND_API.md, docs/backend/REMAINING-BACKEND-WORK.md -> docs/BACKEND_API_REMAINING_WORK.md (also folded in a legitimate uncommitted status update that had been sitting unstaged all session: categories marked DONE, order-creation endpoint noted done). - RELEASE-NOTES.md merged into CHANGELOG.md (was a near-duplicate of the same release content in friendlier prose), then deleted. - KNOWN-ISSUES.md: added item 13 (see below) and item 14 (missing canDeactivate on admin/products edit, from the archived PROJECT-STATE audit, re-verified still true); added a correction note to Fixed item 7. - All cross-references to renamed/moved files fixed across every kept doc (grep+sed pass, then verified with a link-existence check across all 58 in-scope markdown files -> 0 broken links). Step 4 (archive, nothing deleted without merging first): created docs/archive/, moved 19 files there (3 root sprint reports, 1 platform report, SPRINT-PLAN.md, and 14 one-off audit/review/report docs). Added correction headers to the 3 archived docs whose conclusions were affected by the finding below, rather than silently leaving them misleading. Step 5: docs/PROJECT_INDEX.md rewritten per the mission brief - someone opening the repo should understand the whole system from it. IMPORTANT FINDING (surfaced during this audit, not the mission's primary goal but too significant to bury): pages/category/*, pages/search/*, pages/item-detail/*, pages/info/**, pages/legal/** (40+ files) are entirely unrouted dead code - app.routes.ts's cmsContentRoutes is a literal empty array, and category/search/product routes redirect to CatalogContainerComponent/ ProductDetailsContainerComponent, not these files. Confirmed against app.routes.ts directly and cross-checked against FRONTEND.md's own routing description. This means several fixes from earlier this cycle (RC-Premium-01, RC STORE-01) and the dead-code cleanup sprint's conclusion that these files were live were all wrong - documented as KNOWN-ISSUES.md item 13, flagged at the top of PROJECT_INDEX.md, and noted on the 3 archived docs whose conclusions it affects. No application code was changed to fix this (out of scope per this session's 'documentation only' constraint) - it needs a wire-it-up-or- delete-it decision first. Verification: tsc --noEmit clean, npm run build green, all markdown links across 58 in-scope files resolve (checked programmatically). No application/Angular/backend code modified. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
8.6 KiB
Angular 22 Upgrade Plan (research only — not applied)
Feasibility assessment for upgrading from the current Angular 21.1.5 to Angular 22. No upgrade was performed — this is a plan, per mission instructions ("Do NOT upgrade automatically. Stop.").
Current state (verified against package.json + npm registry, 2026-07-25)
| Package | Current | Latest available |
|---|---|---|
@angular/core (+ animations/cdk/common/compiler/forms/platform-browser/router/service-worker) |
21.1.5 | 21.2.18 (latest 21.x) / 22.1.0-rc.0 (latest 22.x) |
typescript |
~5.9.3 | 6.0.3 stable |
rxjs |
~7.8.0 | compatible with both 21 and 22 |
zone.js |
~0.16.0 | compatible with 22 (~0.15.0 || ~0.16.0 required) |
primeng |
^21.0.3 | 22.0.0 stable exists |
@lucide/angular |
^1.25.0 | no upper Angular bound (>=17.0.0) — not a blocker |
| Node.js (this environment) | v22.16.0 | Angular 22 CLI requires ^22.22.3 || ^24.15.0 || >=26.0.0 — current Node does not satisfy this |
Correction to the project's own status tracking: docs/PROJECT_INDEX.md/CLAUDE.md describe this as "Angular 18+" — the repo is actually already on 21.1.5, one major behind the latest stable (22.1). This is a much smaller jump than "18→22" would imply.
Verdict: upgrade is safe, with 2 concrete pre-requisites
Nothing found in this codebase blocks the jump on its own merits — the risk is entirely in the dependency chain, not the app code:
primeng@^21.0.3peer-depends on@angular/core@^21.0.7only — it does not accept Angular 22 today. However, this dependency is already dead code (docs/KNOWN-ISSUES.mditem 12): its only consumer,items-carousel, was deleted during RC PERF-01, and its removal is already planned, just blocked on an unrelatednpm uninstallfailure (see #2). Onceprimeng/primeiconsare actually removed frompackage.json, this blocker disappears entirely — no need to wait for/adoptprimeng@22.barry-cache@^0.1.0inpackage.jsonno longer resolves (ETARGET) — confirmed vianpm view barry-cache: the real published range is now0.9.3(20 versions total), and^0.1.0doesn't intersect anything currently on the registry. This is what's been silently blockingnpm install/npm uninstallall cycle (referenced indocs/PERFORMANCE_REPORT.md,docs/KNOWN-ISSUES.mditem 12). This must be fixed first — bumpbarry-cacheto a current version — orng updateitself will fail the same waynpm uninstall primengalready does.- Node.js: this dev environment runs v22.16.0; Angular 22's CLI requires
^22.22.3 \| ^24.15.0 \| >=26.0.0. A Node bump is required beforeng updatewill even run, independent of the app.
Once those 3 are resolved, the app itself is well-positioned:
- 100% standalone components already (no NgModules to migrate).
- 190/191 components already
ChangeDetectionStrategy.OnPush(perdocs/PERFORMANCE_REPORT.md) — directly aligned with v22 making OnPush the default; this app barely changes behavior from that shift. - Heavy existing signals usage (facades are signal-based per
docs/ARCHITECTURE.md/ADR-007) — aligned with where Angular is going (Signal Forms,resource()), no fighting the framework. - Zero usage found of the specific APIs v22 removes:
ComponentFactoryResolver,ComponentFactory,provideRoutes(),CanMatchFn(greppedsrc/app/**, zero hits). - Zone-based (not zoneless) via
provideZoneChangeDetection({eventCoalescing: true})inapp.config.ts— this continues to work under v22, no forced zoneless migration needed to upgrade.
Benefits
- Bug fixes and perf improvements shipped between 21.1 and 22.1 (6+ months of patches this repo isn't getting).
- OnPush-by-default aligns with where this codebase already is — near-zero migration cost for that specific change, unlike a codebase still on default change detection.
- Keeps pace with
primeng/ecosystem packages that are already moving to v22-only releases (relevant once primeng is actually removed and no longer a constraint either way). - Closes the gap before the next major (v23) makes this a two-major jump instead of one.
Risks / breaking changes relevant to this codebase
- Route parameter inheritance changes from
emptyOnlytoalways. No explicitparamsInheritanceStrategyoverride was found inapp.routes.tsorapp.config.ts— meaning this app is on the default, and the default is changing. Concrete risk: any component readingActivatedRoute.params/paramMapthat currently expects to NOT see a parent route's params (e.g. a child route under/:lang/backoffice/:id/editreading only its own segment) could start receiving inherited params it didn't before. Needs a manual audit of nested routes with route params at each level —src/app/app.routes.tshas several (product detail, category, admin edit routes) — not just a blanket "run the test suite and hope." - TypeScript 6.0 minimum — current is 5.9.3, a straightforward
npm install typescript@^6.0.3bump, but TS 6 does include its own (separate) breaking changes to check independently of Angular (stricter inference in some cases) — budget a pass for TS compiler errors post-bump, not just Angular's. primeng/primeiconsremoval must land first (see Verdict #1) — sequencing matters: remove dead deps → fixbarry-cache→ bump Node →ng update, not the reverse.- No automated test suite beyond the default Jasmine/Karma scaffold was confirmed running in this session (
docs/SPRINT-PLAN.mdSprint 29 notes: "Translation validation / lint... No lint script exists") — meaning post-upgrade regression detection leans entirely ontsc --noEmit+ng build+ manual verification, the same constraint every other pass this cycle has worked under. The route-params risk above in particular needs manual route-by-route verification, not just a green build, since it's a runtime behavior change a type-checker can't catch.
Migration steps (sequenced)
- Unblock tooling: bump
barry-cacheinpackage.jsonto a currently-published version (0.9.3or latest at execution time) — verify withnpm view barry-cache versionsfirst. - Remove dead
primeng/primeicons(already-planned,docs/KNOWN-ISSUES.mditem 12) — now unblocked by step 1. Verifynpm run buildstill green afterward (it was already confirmed code-dead in RC PERF-01, this just finishes the dependency removal). - Bump Node.js in the dev/CI environment to satisfy
^22.22.3 | ^24.15.0 | >=26.0.0. - Bump TypeScript to
^6.0.3, runtsc --noEmit, fix any TS-6-specific compiler errors before touching Angular. - Run
ng update @angular/core@22 @angular/cli@22(and@angular/cdk@22if still a dependency) — let the official schematic handle the mechanical parts. - Audit route-param inheritance manually across every nested route with params in
app.routes.ts(product detail, category, admin edit/detail routes) — the one behavior change with no automated safety net. - Full verification pass:
tsc --noEmit,npm run build,npm run arch:check, plus a live browser walkthrough of the same route list used indocs/RELEASE_REPORT.md(storefront/builder/backoffice) — this upgrade deserves the same rigor as that pass, not just a build check. - Commit, do not push without explicit sign-off, same as every other pass this cycle.
Estimated effort
- Steps 1-4 (unblock tooling, remove dead deps, Node/TS bump): 0.5-1 day — mechanical, low risk, mostly already-planned work.
- Step 5 (
ng update): 0.5 day — the schematic does most of the work given zero deprecated-API usage found. - Step 6 (route-param audit): 0.5-1 day — the one genuinely manual, judgment-requiring step; depends on how many nested-param routes actually exist and how many read parent params today (needs a route-by-route trace, not estimated further without doing that trace).
- Step 7 (verification): 0.5-1 day — matches the RC walkthrough pass's effort, since that's the closest analog in this codebase's own history.
Total: ~2-3.5 days for one engineer, assuming no surprises in the route-param audit (the one genuinely unknown risk). This is a small-to-medium upgrade, not a large one — the app's existing standalone/signals/OnPush posture did the hard work already.
Recommendation
Safe to schedule. Not urgent (still only one major behind), but low-risk and the gap only grows if deferred further. Do the two prerequisite fixes (barry-cache, primeng removal) regardless of upgrade timing — they're blocking other things too (this dependency chain is also what's stopping the primeng bundle-size win noted in docs/PERFORMANCE_REPORT.md).