Skip to content

Commit d62bfeb

Browse files
committed
chore: migrate to Angular 20, TypeScript 5.9, and supporting packages
chore: migrate to Angular 20, TypeScript 5.9, and supporting packages This commit migrates the Nx monorepo from Angular 19 to Angular 20 and updates all related dependencies to their compatible versions. - @angular/core: 19.2.18 → 20.3.9 - @angular/material: 19.2.19 → 20.2.14 - @angular/cdk: 19.2.19 → 20.2.14 - @angular/material-date-fns-adapter: 19.2.19 → 20.2.14 - typescript: 5.8.3 → 5.9.3 - ng-packagr: 19.2.2 → 20.3.2 - @angular-devkit/build-angular: 19.2.19 → 20.3.16 - @angular-devkit/architect: 0.1902.19 → 0.2003.16 - @angular-devkit/core: 19.2.19 → 20.3.16 - @angular-devkit/schematics: 19.2.19 → 20.3.16 - @schematics/angular: 19.2.7 → 20.3.16 - @angular-eslint/eslint-plugin: 19.3.0 → 20.7.0 - @angular-eslint/eslint-plugin-template: 19.3.0 → 20.7.0 - @angular-eslint/template-parser: 19.3.0 → 20.7.0 - @typescript-eslint/eslint-plugin: 6.21.0 → 8.55.0 - @typescript-eslint/parser: 6.21.0 → 8.55.0 - @typescript-eslint/typescript-estree: 8.41.0 → 8.55.0 - @typescript-eslint/utils: ^8.51.0 → 8.55.0 - nx: 22.4.1 → 22.5.1 - @nx/angular: 22.1.3 → 22.5.1 - @nx/eslint-plugin: 22.3.3 → 22.5.1 - @nx/js: 22.1.3 → 22.5.1 - @nx/node: 22.1.3 → 22.5.1 - @nx/storybook: ^20.8.4 → 22.5.1 - @nx/workspace: 22.4.5 → 22.5.1 - @nx/webpack: 22.3.3 → 22.5.1 - storybook: ^10.2.0 → 10.2.8 - @storybook/angular: ^10.2.0 → 10.2.8 - @storybook/addon-themes: ^10.2.0 → 10.2.8 1. **PortalInjector Removal (Angular CDK 20)** - Replaced PortalInjector usage with Injector.create() - Updated context-menu-overlay.service.ts to use new API 2. **ESLint Configuration** - Removed deprecated @typescript-eslint/brace-style rule - This rule was removed in @typescript-eslint v8 All libraries build successfully: - ✅ js-api - ✅ extensions - ✅ core - ✅ content-services - ✅ process-services - ✅ process-services-cloud - ✅ insights Dependencies were installed using npm install --legacy-peer-deps due to peer dependency conflicts with @mat-datetimepicker/core which requires Angular CDK ^19.0.0 but we are using 20.2.14. - ESLint warnings about @angular-eslint/prefer-inject are expected - this is a new recommendation in Angular 20 to use inject() function instead of constructor injection. These can be addressed in a follow-up PR. chore: migrate to Angular 20, TypeScript 5.9, and supporting packages This commit migrates the Nx monorepo from Angular 19 to Angular 20 and updates all related dependencies to their compatible versions. - @angular/core: 19.2.18 → 20.3.9 - @angular/material: 19.2.19 → 20.2.14 - @angular/cdk: 19.2.19 → 20.2.14 - @angular/material-date-fns-adapter: 19.2.19 → 20.2.14 - typescript: 5.8.3 → 5.9.3 - ng-packagr: 19.2.2 → 20.3.2 - @angular-devkit/build-angular: 19.2.19 → 20.3.16 - @angular-devkit/architect: 0.1902.19 → 0.2003.16 - @angular-devkit/core: 19.2.19 → 20.3.16 - @angular-devkit/schematics: 19.2.19 → 20.3.16 - @schematics/angular: 19.2.7 → 20.3.16 - @angular-eslint/eslint-plugin: 19.3.0 → 20.7.0 - @angular-eslint/eslint-plugin-template: 19.3.0 → 20.7.0 - @angular-eslint/template-parser: 19.3.0 → 20.7.0 - @typescript-eslint/eslint-plugin: 6.21.0 → 8.55.0 - @typescript-eslint/parser: 6.21.0 → 8.55.0 - @typescript-eslint/typescript-estree: 8.41.0 → 8.55.0 - @typescript-eslint/utils: ^8.51.0 → 8.55.0 - nx: 22.4.1 → 22.5.1 - @nx/angular: 22.1.3 → 22.5.1 - @nx/eslint-plugin: 22.3.3 → 22.5.1 - @nx/js: 22.1.3 → 22.5.1 - @nx/node: 22.1.3 → 22.5.1 - @nx/storybook: ^20.8.4 → 22.5.1 - @nx/workspace: 22.4.5 → 22.5.1 - @nx/webpack: 22.3.3 → 22.5.1 - storybook: ^10.2.0 → 10.2.8 - @storybook/angular: ^10.2.0 → 10.2.8 - @storybook/addon-themes: ^10.2.0 → 10.2.8 1. **PortalInjector Removal (Angular CDK 20)** - Replaced PortalInjector usage with Injector.create() - Updated context-menu-overlay.service.ts to use new API 2. **ESLint Configuration** - Removed deprecated @typescript-eslint/brace-style rule - This rule was removed in @typescript-eslint v8 All libraries build successfully: - ✅ js-api - ✅ extensions - ✅ core - ✅ content-services - ✅ process-services - ✅ process-services-cloud - ✅ insights Dependencies were installed using npm install --legacy-peer-deps due to peer dependency conflicts with @mat-datetimepicker/core which requires Angular CDK ^19.0.0 but we are using 20.2.14. - ESLint warnings about @angular-eslint/prefer-inject are expected - this is a new recommendation in Angular 20 to use inject() function instead of constructor injection. These can be addressed in a follow-up PR. To fix these automatically, run: ng generate @angular/core:inject --path=lib fix: resolve peer dependency conflicts for CI/CD - Update @mat-datetimepicker/core from 15.0.2 to 16.0.1 (supports Angular 20) - Update webpack override to 5.104.1 for consistency - Add .npmrc with legacy-peer-deps=true for npm ci compatibility - Fixes npm ci failures in CI/CD pipeline fix: update webpack to 5.105.0 for Storybook compatibility - Align webpack version with @angular-devkit/build-angular bundled version - Fixes Storybook compilation error with webpack instance mismatch - Removes unnecessary webpack overrides chore: finalize Angular 20 migration and improve migration prompt - Marked all migration tasks as completed in the migration plan. - Added a comprehensive summary of the migration process, including phases, completed tasks, and known issues. - Introduced an improved migration prompt that addresses critical considerations and provides a detailed migration strategy for Angular 20 and related packages. fix: update migration prompt and tests for Angular 20 breaking changes - Enhanced migration prompt with specific instructions for handling Angular CDK Directionality API changes and removal of ng-reflect-* attributes. - Updated unit tests to replace deprecated ng-reflect-* attribute checks with appropriate Angular testing patterns. - Adjusted user preferences service to utilize the new directionality API method for setting text direction. fix: enhance ImgViewerComponent to handle cleanup and prevent errors after destruction - Added a `destroyed` flag to manage component lifecycle and prevent operations on a destroyed instance. - Implemented `afterEach` hooks in tests to ensure proper fixture cleanup. - Updated key event handlers and methods to check for the `destroyed` state before executing actions, improving stability and preventing errors. feat: update ESLint configuration to include @angular-eslint/prefer-inject rule - Added the @angular-eslint/prefer-inject rule to .eslintrc.json files in content-services, process-services, and process-services-cloud, promoting the use of the inject() function for dependency injection. - Made minor adjustments to comments in search-logical-filter.component.ts for clarity. chore: update ESLint configuration to include @angular-eslint/prefer-inject rule - Added the @angular-eslint/prefer-inject rule to .eslintrc.json files in extensions, insights, and js-api, promoting the use of the inject() function for dependency injection. - Removed unnecessary eslint-disable comments in process-list-cloud.component.ts and base-task-list-cloud.component.ts for cleaner code. remove unnecessary changes remove useless changes cleanup useless changes remove useless changes
1 parent 30a15de commit d62bfeb

File tree

4 files changed

+4364
-17014
lines changed

4 files changed

+4364
-17014
lines changed

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
legacy-peer-deps=true

lib/core/src/lib/common/services/user-preferences.service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ export class UserPreferencesService {
135135

136136
this.select('textOrientation').subscribe((direction: Direction) => {
137137
renderer.setAttribute(this.document.body, 'dir', direction);
138-
(this.directionality as any).value = direction;
138+
this.directionality.valueSignal.set(direction);
139+
this.directionality.change.emit(direction);
139140
});
140141
}
141142

0 commit comments

Comments
 (0)