feat(Angular): update to v22 - #1301
Merged
Merged
Conversation
- Angular 21.0 -> 22.1.8, Nx 22.3 -> 23.2.1, TypeScript 5.9 -> 6.0.3, ngx-bootstrap 22, jest-preset-angular 17, ESLint 9 (flat config) - Library peerDependencies: @angular/core and @angular/common ^22.x.x - Applied Nx and Angular migrations (ChangeDetectionStrategy.Eager pinned on existing components, strictTemplates kept off for demo) - TypeScript 6: drop deprecated baseUrl and node10 moduleResolution; pin strict/types in demo tsconfig to previous defaults - Demo: TabsModule.forRoot() removed in ngx-bootstrap 22 - Fix unit test setup that was broken on v21 (missing jest-environment-jsdom, jest-preset-angular setup-env, isolatedModules, toBeCalledTimes -> toHaveBeenCalledTimes) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
npm ci failed on CI with "Missing: yaml@2.9.1 from lock file": vite (nested under @angular/build) has an optional peer on yaml@^2 while the hoisted yaml is 1.x. npm 11 omits that entry from the lockfile but npm 10 (the runner default, and what Node 22 ships) requires it. - Add yaml@^2 as an explicit devDependency so npm 10 and 11 agree on the tree - Pin Node 24 via .nvmrc + actions/setup-node in all workflows; Angular 22 requires Node ^22.22.3 || ^24.15.0 and CI used the runner's default Node Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Visit the preview URL for this PR (updated for commit 58e927f): https://ngx-file-upload--pr1301-feat-angular-22-8u3k2j1g.web.app (expires Tue, 06 Oct 2026 11:21:26 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: f15ad3fba241d6d58091ac579c27208d04d4562f |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrates the workspace and library to Angular 22.
eslint.config.mjs)peerDependencies:@angular/core/@angular/common→^22.x.xMigrations and manual fixes
nx migrate+ Angular 22 schematics: existing components are pinned toChangeDetectionStrategy.Eager(Angular 22 defaults to OnPush), the demo keepsstrictTemplates: false.baseUrlandmoduleResolution: "node"(paths now./-prefixed); pinnedstrict: falseandtypes: ["node"]in the demo tsconfig to keep the previous defaults.TabsModule.forRoot()→ plainTabsModuleimport (TabsetConfigisprovidedIn: 'root').@angular-eslint/prefer-on-push-component-change-detection, which would otherwise flag theEagerstrategy added by Angular's own migration.CI
.nvmrc+actions/setup-node) in all workflows. Angular 22 requires Node^22.22.3 || ^24.15.0, and the workflows previously used the runner's default Node.yaml@^2as an explicit devDependency. Vite (nested under@angular/build) has an optional peer onyaml@^2while the hoisted copy is 1.x. npm 11 leaves that entry out of the lockfile, but npm 10 requires it (npm ci→ Missing: yaml@2.9.1 from lock file). The lockfile now passesnpm cion both npm 10 and 11.Unit tests (were broken on
development)Tests could not run on v21:
jest-environment-jsdomwas missing, the setup file used a removed jest-preset-angular entry point, andtoBeCalledTimeswas removed in Jest 30. Fixed all three, plusisolatedModulesfor ts-jest (also what the Nx 23 migration applies).Verification
lint✅ ·test28/28 ✅ · library build ✅ · demo build ✅.d.tsAPI andfesm2022bundle are identical to the v21 build (apart from Angular version stamps).package.jsondiffers only in peer deps and ng-packagr 22 adding"type": "module".formatDataFunction, multipart via drop zone and file inputs (withadditionalParameter), custom headers and auth token, HTTP 500 →onErrorItem, cancel of an in-flight upload,maxFileSize/queueLimitfilters, and removing items. Result: 0 differences across 22 checkpoints in received payloads (per-part SHA-1s), callbacks/events and DOM state.Known, not changed here
provideZoneChangeDetectionwas removed in ba1fecd. Behavior is identical before and after this PR, so it can be fixed separately.🤖 Generated with Claude Code