Update Node.js, Angular packages, and streamline ESLint configurations - #36838
Update Node.js, Angular packages, and streamline ESLint configurations#36838nicobytes wants to merge 27 commits into
Conversation
… 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.
…onfig, and improve frontend onboarding documentation
…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.
…pt-6-across-the-core-web-nx-workspace
…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.
…pt-6-across-the-core-web-nx-workspace
…pt-6-across-the-core-web-nx-workspace
…pt-6-across-the-core-web-nx-workspace
…pt-6-across-the-core-web-nx-workspace
…pt-6-across-the-core-web-nx-workspace
…pt-6-across-the-core-web-nx-workspace
…pt-6-across-the-core-web-nx-workspace
Restores nx format:check compliance so Initial Artifact Build passes in CI. Co-authored-by: Cursor <cursoragent@cursor.com>
|
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 |
…pt-6-across-the-core-web-nx-workspace-2
|
Claude finished @nicobytes's task in 6m 0s —— View job Claude Code ReviewReviewed the non-generated source changes in this PR (block-editor sanitization, ESLint refactors, timeline rerender, comment-and-assign CD fix, severity icons, relationship spec, tsconfig changes). Scope is a large Angular 22 / TS 6 migration; findings below are limited to what's provable from the diff. New Issues
Notes (non-blocking)
Resolved
Everything else (timeline • |
There was a problem hiding this comment.
🟡 Not ready to approve
It introduces a security-sensitive sanitization bypass for all data: URLs, skips an existing unit test, and likely drops inline-template ESLint coverage after removing process-inline-templates.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Pull request overview
This PR upgrades the core-web Nx workspace to Angular 22 + TypeScript 6, aligns the required Node.js version across the repo/tooling, and refactors many Angular project ESLint flat-config files to reduce boilerplate. It also includes a few targeted UI/test changes to keep unit tests stable and address rendering and sanitization behavior changes surfaced by the upgrade.
Changes:
- Bump required Node.js version to
v22.22.3across.nvmrc, Mavennodejs-parent, and docs/onboarding. - Upgrade Angular/Nx/TypeScript dependencies (Angular 22.x, Nx 23.1.0, TS 6.0.3) and add transitional TypeScript config (
ignoreDeprecations: "6.0"). - Simplify Angular ESLint configs and adjust several unit tests/components (timeline rerendering, PrimeIcons usage, relationship property spec reliability).
File summaries
| File | Description |
|---|---|
| ONBOARDING.md | Updates Node version guidance to 22.22.3+. |
| nodejs-parent/pom.xml | Updates the Maven-managed Node version to v22.22.3. |
| dotFrontendOnboarding.md | Updates documented Angular/Nx/Node versions to match the migration. |
| docs/frontend/ANGULAR_STANDARDS.md | Updates documented tech stack versions (Angular 22, TS 6, Nx 23, Node 22.22.3). |
| core-web/tsconfig.base.json | Adds ignoreDeprecations: "6.0" and explicitly sets strict: false. |
| core-web/package.json | Upgrades Angular/Nx/TS and related tooling; adds pnpm peerDependencyRules allowances. |
| core-web/libs/utils/eslint.config.mjs | Refactors flat ESLint config to remove FlatCompat boilerplate. |
| core-web/libs/utils-testing/eslint.config.mjs | Refactors flat ESLint config and disables prefer-on-push rule for parity. |
| core-web/libs/ui/src/lib/directives/dot-trim-input/dot-trim-input.directive.spec.ts | Cleans up unused test provider/import usage. |
| core-web/libs/ui/src/lib/components/dot-severity-icon/dot-severity-icon.component.spec.ts | Updates tests to validate PrimeIcons-based rendering. |
| core-web/libs/ui/src/lib/components/dot-severity-icon/dot-severity-icon.component.html | Switches severity icon rendering to PrimeIcons <i class="pi ...">. |
| core-web/libs/ui/eslint.config.mjs | Refactors flat ESLint config and disables prefer-on-push rule for parity. |
| core-web/libs/template-builder/tsconfig.lib.json | Simplifies exclude list formatting. |
| core-web/libs/template-builder/eslint.config.mjs | Refactors flat ESLint config and disables prefer-on-push rule for parity. |
| core-web/libs/portlets/edit-ema/ui/eslint.config.mjs | Refactors flat ESLint config and disables prefer-on-push rule for parity. |
| core-web/libs/portlets/edit-ema/portlet/eslint.config.mjs | Refactors flat ESLint config and disables prefer-on-push rule for parity. |
| core-web/libs/portlets/dot-experiments/portlet/eslint.config.mjs | Refactors flat ESLint config (incl. module-boundaries override). |
| core-web/libs/portlets/dot-experiments/data-access/eslint.config.mjs | Refactors flat ESLint config. |
| core-web/libs/new-block-editor/eslint.config.mjs | Refactors flat ESLint config and disables prefer-on-push rule for parity. |
| core-web/libs/edit-content/src/lib/components/dot-edit-content-sidebar/components/dot-edit-content-sidebar-history/components/dot-history-timeline-list/dot-history-timeline-list.component.ts | Adds stable key/value computed signals to force Timeline rerendering on item changes. |
| core-web/libs/edit-content/src/lib/components/dot-edit-content-sidebar/components/dot-edit-content-sidebar-history/components/dot-history-timeline-list/dot-history-timeline-list.component.spec.ts | Adds tests around timeline keying and rerender behavior for version/push-publish items. |
| core-web/libs/edit-content/src/lib/components/dot-edit-content-sidebar/components/dot-edit-content-sidebar-history/components/dot-history-timeline-list/dot-history-timeline-list.component.html | Wraps <p-timeline> in an @for keyed loop to force recreation when items change. |
| core-web/libs/edit-content/src/lib/components/dot-edit-content-form/dot-edit-content-form.component.spec.ts | Adjusts test setup to derive single-tab styling from store initialization. |
| core-web/libs/edit-content/eslint.config.mjs | Refactors flat ESLint config and disables prefer-on-push rule for parity. |
| core-web/libs/edit-content-bridge/tsconfig.lib.json | Simplifies exclude list formatting. |
| core-web/libs/dotcms-js/eslint.config.mjs | Refactors flat ESLint config. |
| core-web/libs/dot-rules/eslint.config.mjs | Refactors flat ESLint config and disables prefer-on-push rule for parity. |
| core-web/libs/dot-layout-grid/eslint.config.mjs | Refactors flat ESLint config. |
| core-web/libs/data-access/eslint.config.mjs | Refactors flat ESLint config. |
| core-web/libs/block-editor/tsconfig.lib.json | Simplifies exclude list formatting. |
| core-web/libs/block-editor/src/lib/shared/utils/suggestion.utils.ts | Removes sanitizer usage for icons and returns string icon URLs directly. |
| core-web/libs/block-editor/src/lib/shared/components/suggestions/suggestions.component.ts | Narrows DotMenuItem.icon typing to string (removes SafeUrl). |
| core-web/libs/block-editor/src/lib/shared/components/suggestion-list/components/suggestions-list-item/suggestions-list-item.component.ts | Adds safeUrl getter and sanitizes trusted data image URLs. |
| core-web/libs/block-editor/src/lib/shared/components/suggestion-list/components/suggestions-list-item/suggestions-list-item.component.spec.ts | Adds tests for data URL rendering and material icon rendering. |
| core-web/libs/block-editor/src/lib/shared/components/suggestion-list/components/suggestions-list-item/suggestions-list-item.component.html | Binds <img [src]> to safeUrl rather than raw url. |
| core-web/libs/block-editor/eslint.config.mjs | Refactors flat ESLint config and disables prefer-on-push rule for parity. |
| core-web/jest.preset.js | Simplifies collectCoverageFrom configuration. |
| core-web/apps/dotcms-ui/tsconfig.app.json | Disables Angular strictTemplates in the main app. |
| core-web/apps/dotcms-ui/src/app/portlets/shared/dot-content-types-listing/dot-content-types.component.html | Updates event binding to match renamed output (cancel). |
| core-web/apps/dotcms-ui/src/app/portlets/shared/dot-content-types-listing/components/dot-add-to-menu/dot-add-to-menu.component.ts | Renames output from $cancel to cancel and updates emitter usage. |
| core-web/apps/dotcms-ui/src/app/portlets/shared/dot-content-types-listing/components/dot-add-to-menu/dot-add-to-menu.component.spec.ts | Updates spies/assertions to use renamed output (cancel). |
| core-web/apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/layout/content-types-layout.component.ts | Converts add-to-menu visibility state to a signal. |
| core-web/apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/layout/content-types-layout.component.spec.ts | Updates the layout spec to work with the new dialog state and added service dependencies. |
| core-web/apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/layout/content-types-layout.component.html | Moves add-to-menu dialog into the layout template guarded by a signal. |
| core-web/apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/content-type-fields-properties-form/field-properties/dot-relationships-property/dot-relationships-property.component.spec.ts | Adds HTTP mocking and skips a legacy async inverse-relationship test (with TODO). |
| core-web/apps/dotcms-ui/src/app/portlets/shared/dot-content-types-edit/components/fields/content-type-fields-properties-form/content-type-fields-properties-form.component.spec.ts | Cleans up unused imports/providers in the spec. |
| core-web/apps/dotcms-ui/src/app/portlets/dot-templates/dot-template-create-edit/dot-template-props/dot-template-thumbnail-field/dot-template-thumbnail-field.component.spec.ts | Changes assertions from toBeNull() to toBeFalsy() for robustness. |
| core-web/apps/dotcms-ui/eslint.config.mjs | Refactors flat ESLint config and disables prefer-on-push rule for parity. |
| core-web/apps/dotcms-block-editor/tsconfig.app.json | Disables Angular strictTemplates for the block editor app. |
| core-web/apps/dotcms-block-editor/eslint.config.mjs | Refactors flat ESLint config. |
| core-web/apps/dotcms-binary-field-builder/tsconfig.app.json | Disables Angular strictTemplates for the binary field builder app. |
| core-web/apps/dotcms-binary-field-builder/eslint.config.mjs | Refactors flat ESLint config and disables prefer-on-push rule for parity. |
| core-web/apps/dotcdn/tsconfig.app.json | Disables Angular strictTemplates for the dotcdn app. |
| core-web/apps/dotcdn/eslint.config.mjs | Refactors flat ESLint config. |
| core-web/.nvmrc | Updates Node pin to v22.22.3. |
| CLAUDE.md | Updates Node version guidance to 22.22.3+. |
| .nvmrc | Updates Node pin to v22.22.3. |
| .github/copilot-instructions.md | Updates Node version guidance/examples to 22.22.3+. |
Review details
- Files reviewed: 58/59 changed files
- Comments generated: 5
- Review effort level: Lite
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
- Updates the pinned nx version and regenerates the pnpm lockfile to match, pulling in the corresponding transitive dependency graph changes for @nx/* packages.
- Aligns @angular/* packages with the latest 22.1.x patch release - Follows the @nx/* toolchain bump to 23.1.1 across all Nx plugins - Updates ng-packagr and related devkit/build-angular versions to match
…lar 22 across multiple applications - Updated tsconfig.app.json files in dotcdn, dotcms-binary-field-builder, dotcms-block-editor, and dotcms-ui to include a TODO comment regarding the re-enabling of strictTemplates once Angular 22 template errors are resolved.
…pt-6-across-the-core-web-nx-workspace-2
Moved workflow-actions-dialog.spec.ts from edit-content/sidebar to edit-content/workflows to better reflect the test's subject area.
- Angular 21/22's tighter change detection left the form hidden because the async role fetch in ngOnInit updated state without triggering a CD pass, leaving `@if (form)` unrendered inside the dialog's appendTo="body" view. - Inject ChangeDetectorRef and call detectChanges() after setup to force the view to render once roles resolve.
…pt-6-across-the-core-web-nx-workspace-2
Replace inline `import('@playwright/test').Page` type expressions with the named `Page` import for readability.
Follow-up (Actions runtime)After this PR merges, #36850 will bump GitHub Actions to Node 24 runtime majors ( That work is intentionally out of scope here — this PR covers project Node ( |
|
Tick the box to add this pull request to the merge queue (same as
|
This pull request updates the required Node.js version across the project and refactors Angular ESLint config files for simplicity. It also disables Angular template strictness for certain apps (temporary migration unblock), adjusts some unit tests, and improves test reliability for relationship properties.
Node.js Version Update
v22.15.0tov22.22.3in.nvmrc,core-web/.nvmrc, documentation, and onboarding files to ensure consistency and resolve build issues.ESLint Configuration Refactoring
FlatCompatand applyingnx.configs['flat/angular']+flat/angular-templatedirectly.processor: angular.processInlineTemplateson**/*.tsblocks so inlinetemplate:strings stay linted (extract-inline-html; also provided by Nxflat/angular).@angular-eslint/prefer-on-push-component-change-detectionrule where needed to maintain parity with the previous setup.Angular Compiler Options
strictTemplates: false) intsconfig.app.jsonfordotcms-ui,dotcdn,dotcms-block-editor, anddotcms-binary-field-builderto unblock the Angular 22 / TypeScript 6 migration.TODO(#35930)on each app — re-enable per-app once template type errors are fixed. Libraries keepstrictTemplates: true.Test Improvements and Fixes
.toBeFalsy()instead of.toBeNull()for better assertion robustness indot-template-thumbnail-field.component.spec.ts.content-type-fields-properties-form.component.spec.ts.dot-relationships-property.component.spec.tsby mocking HTTP requests (including the inverse-relationship editing branch).suggestions-list-itemDomSanitizer bypass todata:image/URLs only.This PR fixes: #35930