Skip to content

chore(dependencies): update Node.js version and Angular v22, TS 6 - #36623

Closed
nicobytes wants to merge 18 commits into
mainfrom
35930-migrate-angular-21-angular-22-typescript-6-across-the-core-web-nx-workspace
Closed

chore(dependencies): update Node.js version and Angular v22, TS 6 #36623
nicobytes wants to merge 18 commits into
mainfrom
35930-migrate-angular-21-angular-22-typescript-6-across-the-core-web-nx-workspace

Conversation

@nicobytes

@nicobytes nicobytes commented Jul 17, 2026

Copy link
Copy Markdown
Member

This pull request updates Node.js to version 22.22.3 across the project and refactors Angular ESLint configurations for better maintainability and clarity. It also relaxes Angular template strictness in several tsconfig files, simplifies test and story file exclusions, and makes a small adjustment to URL sanitization in the block editor utility.

Node.js version update:

  • Updated .nvmrc, core-web/.nvmrc, and documentation references to require Node.js v22.22.3 instead of v22.15.0. (.nvmrc, core-web/.nvmrc, CLAUDE.md, ONBOARDING.md) [1] [2] [3]

ESLint configuration refactoring:

  • Replaced use of FlatCompat for Angular template processing with direct rule configuration in all Angular ESLint configs, simplifying the setup and making rule overrides explicit. (core-web/apps/dotcdn/eslint.config.mjs, core-web/apps/dotcms-block-editor/eslint.config.mjs, core-web/apps/dotcms-ui/eslint.config.mjs, core-web/libs/block-editor/eslint.config.mjs, core-web/libs/data-access/eslint.config.mjs, core-web/libs/dot-layout-grid/eslint.config.mjs, core-web/libs/dot-rules/eslint.config.mjs, core-web/libs/dotcms-js/eslint.config.mjs) [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]

  • Disabled @angular-eslint/prefer-on-push-component-change-detection in several configs for migration compatibility. [1] [2] [3] [4]

TypeScript and Angular compiler options:

  • Set "strictTemplates": false in angularCompilerOptions for multiple tsconfig.app.json files to relax Angular template strictness for migration. (core-web/apps/dotcdn/tsconfig.app.json, core-web/apps/dotcms-binary-field-builder/tsconfig.app.json, core-web/apps/dotcms-block-editor/tsconfig.app.json, core-web/apps/dotcms-ui/tsconfig.app.json) [1] [2] [3]

  • Cleaned up exclude arrays in tsconfig files and removed story file exclusions from test coverage collection. (core-web/libs/block-editor/tsconfig.lib.json, core-web/jest.preset.js) [1] [2]

Block editor utility adjustment:

  • Removed direct use of Angular's internal DomSanitizer for icon data URLs and now casts trusted URLs directly to SafeUrl for simplicity and compatibility. (core-web/libs/block-editor/src/lib/shared/utils/suggestion.utils.ts) [1] [2] [3]

This PR fixes: #35930

Copilot AI review requested due to automatic review settings July 17, 2026 16:19
@github-actions github-actions Bot added Area : Documentation PR changes documentation files Area : Frontend PR changes Angular/TypeScript frontend code labels Jul 17, 2026
@claude

claude Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Claude finished @nicobytes's task in 3m 45s —— View job


Claude Code Review

Reviewed the diff against origin/main. This is an Angular 22 / TypeScript 6 / Node 22.22.3 migration PR. Scope is mostly config + lint + dependency bumps; the functional code changes are small. Rechecked all prior Copilot findings.

New Issues

  • 🟡 Medium: core-web/tsconfig.base.json:16"strict": false is now set at the workspace base level. Combined with strictTemplates: false in the four tsconfig.app.json files, this materially weakens type/template safety across the entire monorepo, not just migrating libs. These are described as temporary migration flags but there's no tracking issue or removal plan referenced. Recommend filing a follow-up ticket and linking it in a comment near these flags so they don't become permanent tech debt. Fix this →

  • 🟡 Medium: core-web/package.json:54@angular/cdk is pinned to 22.0.5 while all other @angular/* framework packages are 22.0.7. Angular strongly recommends keeping CDK in lockstep with the framework version to avoid peer-dependency drift. Bump to 22.0.7 unless there's a known incompatibility. Fix this →

  • 🟡 Medium: core-web/libs/block-editor/src/lib/shared/components/suggestion-list/components/suggestions-list-item/suggestions-list-item.component.ts:51safeUrl calls bypassSecurityTrustUrl for any string starting with data:. Since [url] is a public @Input() bound into <img [src]="safeUrl">, this bypasses Angular sanitization for arbitrary data: payloads. Today the only callers pass controlled internal SVG constants (suggestion-icons.ts), so exploitability is low, but the getter is broader than it needs to be. Consider restricting the check to data:image/ prefixes. Assumption: no external/user-controlled value ever reaches this input — worth confirming. Fix this →

Resolved

  • core-web/libs/block-editor/src/lib/shared/utils/suggestion.utils.ts — the prior approach (sanitizeUrl returning a bare cast / ɵDomSanitizerImpl outside DI) is gone. Icon URLs are now plain strings and sanitization was correctly moved into the component's safeUrl getter using an injected DomSanitizer#bypassSecurityTrustUrl. Copilot's original correctness concern is fixed.
  • ✅ All 15 refactored eslint.config.mjs files — the unused FlatCompat/compat imports flagged by Copilot have been removed; no dead code remains in the changed configs.
  • dot-history-timeline-list.component.ts:18getTimelineItemKey now derives the key from inodebundleIdid (with a documented comment), fixing the earlier '[object Object]' collapse for DotCMSContentletVersion / push-publish items.
  • core-web/pnpm-lock.yaml — lockfile is included in this PR (+3589/-3455), addressing the reproducible-install concern.
  • dotFrontendOnboarding.md — Angular (22.0.7), Nx (23.1.0), and NgRx version bullets are now aligned with the workspace upgrade.

Notes (non-blocking)

  • The four tsconfig.app.json files and tsconfig.base.json strict: false are the biggest risk surface here — they silently reduce compile-time safety repo-wide. Confirm this is intentional and temporary.
  • jest.preset.js now collects coverage from *.stories.ts files (the !src/**/*.stories.ts exclusion was removed). This will inflate coverage denominators with Storybook files that typically have no test intent — minor, but likely unintended.

Overall the functional changes are safe and the prior review findings are addressed. No blocking issues.

… ESLint configurations

- Updated Node.js version from 22.15.0 to 22.22.3 in multiple configuration files, including `.github/copilot-instructions.md` and `pom.xml`.
- Consolidated ESLint configuration rules across various applications and libraries for consistency and clarity, ensuring all relevant files adhere to the same standards.
- Removed unnecessary imports and streamlined coverage collection settings in Jest configuration files.

This update enhances compatibility and maintains code quality across the project.
@nicobytes
nicobytes requested a review from a team as a code owner July 17, 2026 16:25

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.

Pull request overview

This pull request upgrades the core-web workspace to Angular 22 / TypeScript 6, bumps the required Node.js version to v22.22.3, and refactors multiple ESLint flat-config files to simplify Angular lint rule overrides during migration.

Changes:

  • Updated Node.js version requirements and docs (.nvmrc, core-web/.nvmrc, onboarding docs).
  • Upgraded Angular/Nx/TypeScript dependencies and introduced TypeScript 6 migration flags (ignoreDeprecations: "6.0", relaxed strictTemplates).
  • Refactored Angular ESLint flat configs (removing FlatCompat template processing blocks) and adjusted a block-editor URL “sanitization” helper.

Reviewed changes

Copilot reviewed 41 out of 42 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
ONBOARDING.md Updates Node version requirement text.
dotFrontendOnboarding.md Updates Node version requirement text (but leaves other stack versions stale).
docs/frontend/ANGULAR_STANDARDS.md Updates frontend standards doc to Angular 22 / TS 6 / Nx 23 era.
core-web/tsconfig.base.json Adds TS6 migration flags (ignoreDeprecations) and explicit strict: false.
core-web/package.json Upgrades Angular/Nx/TypeScript and adds pnpm peer dependency rules.
core-web/libs/utils/eslint.config.mjs Refactors Angular ESLint flat config away from compat inline-template processing block.
core-web/libs/utils-testing/eslint.config.mjs Same ESLint refactor + disables OnPush preference rule for migration.
core-web/libs/ui/src/lib/components/dot-severity-icon/dot-severity-icon.component.spec.ts Updates tests to assert PrimeIcons classes instead of icon components.
core-web/libs/ui/src/lib/components/dot-severity-icon/dot-severity-icon.component.html Switches icon rendering to PrimeIcons <i class="pi ...">.
core-web/libs/ui/eslint.config.mjs Refactors Angular ESLint flat config + disables OnPush preference rule for migration.
core-web/libs/template-builder/tsconfig.lib.json Simplifies exclude list.
core-web/libs/template-builder/eslint.config.mjs Refactors Angular ESLint flat config + disables OnPush preference rule for migration.
core-web/libs/portlets/edit-ema/ui/eslint.config.mjs Refactors Angular ESLint flat config + disables OnPush preference rule for migration.
core-web/libs/portlets/edit-ema/portlet/eslint.config.mjs Refactors Angular ESLint flat config + disables OnPush preference rule for migration.
core-web/libs/portlets/dot-experiments/portlet/eslint.config.mjs Refactors Angular ESLint flat config away from compat inline-template processing block.
core-web/libs/portlets/dot-experiments/data-access/eslint.config.mjs Refactors Angular ESLint flat config away from compat inline-template processing block.
core-web/libs/new-block-editor/eslint.config.mjs Refactors Angular ESLint flat config + disables OnPush preference rule for migration.
core-web/libs/edit-content/eslint.config.mjs Refactors Angular ESLint flat config + disables OnPush preference rule for migration.
core-web/libs/edit-content-bridge/tsconfig.lib.json Simplifies exclude list.
core-web/libs/dotcms-js/eslint.config.mjs Refactors Angular ESLint flat config away from compat inline-template processing block.
core-web/libs/dot-rules/eslint.config.mjs Refactors Angular ESLint flat config + disables OnPush preference rule for migration.
core-web/libs/dot-layout-grid/eslint.config.mjs Refactors Angular ESLint flat config away from compat inline-template processing block.
core-web/libs/data-access/eslint.config.mjs Refactors Angular ESLint flat config away from compat inline-template processing block.
core-web/libs/block-editor/tsconfig.lib.json Simplifies exclude list.
core-web/libs/block-editor/src/lib/shared/utils/suggestion.utils.ts Changes URL “sanitization” implementation for suggestion icon data URLs.
core-web/libs/block-editor/eslint.config.mjs Refactors Angular ESLint flat config + disables OnPush preference rule for migration.
core-web/jest.preset.js Removes story exclusion from coverage collection.
core-web/apps/dotcms-ui/tsconfig.app.json Disables Angular strictTemplates for migration.
core-web/apps/dotcms-ui/eslint.config.mjs Refactors Angular ESLint flat config + disables OnPush preference rule for migration.
core-web/apps/dotcms-block-editor/tsconfig.app.json Disables Angular strictTemplates for migration.
core-web/apps/dotcms-block-editor/eslint.config.mjs Refactors Angular ESLint flat config away from compat inline-template processing block.
core-web/apps/dotcms-binary-field-builder/tsconfig.app.json Disables Angular strictTemplates for migration.
core-web/apps/dotcms-binary-field-builder/eslint.config.mjs Refactors Angular ESLint flat config + disables OnPush preference rule for migration.
core-web/apps/dotcdn/tsconfig.app.json Disables Angular strictTemplates for migration.
core-web/apps/dotcdn/eslint.config.mjs Refactors Angular ESLint flat config away from compat inline-template processing block.
core-web/.nvmrc Pins Node to v22.22.3.
CLAUDE.md Updates Node version requirement text.
.nvmrc Pins Node to v22.22.3.

Comment thread core-web/libs/block-editor/src/lib/shared/utils/suggestion.utils.ts Outdated
Comment thread dotFrontendOnboarding.md Outdated
Comment thread core-web/apps/dotcms-ui/eslint.config.mjs Outdated
…onfig, and improve frontend onboarding documentation

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.

Pull request overview

Copilot reviewed 53 out of 54 changed files in this pull request and generated 19 comments.

Comment thread core-web/libs/utils-testing/eslint.config.mjs
Comment thread core-web/libs/template-builder/eslint.config.mjs
Comment thread core-web/libs/edit-content/eslint.config.mjs
Comment thread core-web/apps/dotcms-block-editor/eslint.config.mjs
Comment thread core-web/apps/dotcms-binary-field-builder/eslint.config.mjs
Comment thread core-web/package.json
Comment thread core-web/package.json
Comment thread core-web/tsconfig.base.json
…urations

- Cleaned up ESLint configuration files across multiple applications and libraries by removing unnecessary imports related to FlatCompat.
- This change streamlines the ESLint setup and enhances consistency across the project.
…ate tests

- Refactored the `ContentTypesLayoutComponent` to use signals for managing the add-to-menu state, replacing the previous boolean flag.
- Updated the HTML template to reflect the new signal-based logic for displaying the add-to-menu component.
- Adjusted unit tests in `content-types-layout.component.spec.ts` to accommodate the changes in state management and component interactions.
- Modified the `DotAddToMenuComponent` to emit events correctly, ensuring proper functionality in the updated context.
- Enhanced the `dot-content-types.component.html` to align with the new event handling for the add-to-menu feature.
…functionality

- Added tests to verify that timeline items are correctly keyed by inode and bundleId.
- Implemented checks to ensure the timeline key updates appropriately when version lists are swapped.
- Introduced mock data for DotCMSContentletVersion and DotPushPublishHistoryItem to facilitate testing.
- Enhanced the DotHistoryTimelineListComponent to utilize a stable identity function for timeline items, improving key generation logic.
…nit tests

- Adjusted the HTML structure in `content-types-layout.component.html` for better readability and consistency.
- Updated the unit tests in `content-types-layout.component.spec.ts` to streamline component overrides and enhance clarity.
- Made minor formatting changes in `dot-history-timeline-list.component.spec.ts` to improve code organization and maintainability.
@nicobytes nicobytes changed the title chore(dependencies): update Node.js version and Angular packages chore(dependencies): update Node.js version and Angular v22, TS 6 Jul 17, 2026
Restores nx format:check compliance so Initial Artifact Build passes in CI.

Co-authored-by: Cursor <cursoragent@cursor.com>
@alwaysmeticulous

Copy link
Copy Markdown

Meticulous was unable to execute a test run for this PR because the most recent commit is associated with multiple PRs. To execute a test run, please try pushing up a new commit that is only associated with this PR.

Last updated for commit 721eaa7. This comment will update as new commits are pushed.

@nicobytes nicobytes closed this Jul 31, 2026
@nicobytes
nicobytes deleted the 35930-migrate-angular-21-angular-22-typescript-6-across-the-core-web-nx-workspace branch July 31, 2026 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI: Safe To Rollback Area : Documentation PR changes documentation files Area : Frontend PR changes Angular/TypeScript frontend code

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Migrate Angular 21 → Angular 22 (TypeScript 6) across the core-web Nx workspace

2 participants