Skip to content

Angular upgrade to v12#563

Merged
uldisrudzitis merged 5 commits intomasterfrom
enh-angular-upgrade-to-v12
Oct 1, 2025
Merged

Angular upgrade to v12#563
uldisrudzitis merged 5 commits intomasterfrom
enh-angular-upgrade-to-v12

Conversation

@uldisrudzitis
Copy link
Copy Markdown
Collaborator

@uldisrudzitis uldisrudzitis commented Oct 1, 2025

Summary by CodeRabbit

  • New Features

    • None
  • Bug Fixes

    • Corrected tooltip delay handling to ensure help tooltips show with the intended delay.
  • Chores

    • Upgraded app to Angular 12 and Webpack 5 for improved compatibility and performance.
    • Updated related dependencies and tooling; adjusted Node version requirement to ^12.14.0 or ^14.15.0.
  • Tests

    • Enabled generation of module test files by default when creating new modules.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Oct 1, 2025

Walkthrough

Dependency and tooling upgrades migrate the editor to Angular 12 and Webpack 5, adjust Node engine constraints, and update ZoneJS import paths. Webpack config switches to resolve.fallback for fs/path. A schematics option removing skipTests is deleted. One tooltip attribute changes from show-delay to showDelay.

Changes

Cohort / File(s) Summary
Angular v12 and tooling upgrade
editor/package.json
Upgrades Angular framework/tooling to v12, TypeScript to ~4.3, Webpack to v5; updates related dependencies; adjusts Node engines.
Webpack 5 migration
editor/extra-webpack.config.js
Replaces deprecated node.fs shim with resolve.fallback for fs/path set to false.
Schematics configuration adjustment
editor/angular.json
Removes "@schematics/angular:module" option "skipTests": true.
ZoneJS path updates
editor/src/polyfills.ts, editor/src/environments/environment.ts
Changes ZoneJS imports/mentions from dist paths to new 'zone.js' and 'zone.js/plugins/zone-error'.
Tooltip API attribute rename
editor/src/app/sites/shared/help-tooltip.component.ts
Renames template attribute from show-delay to showDelay.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

I thump my paws on release-day ground,
Webpack hums, new bundles found.
Angular blooms to twelve so bright,
ZoneJS paths now trimmed just right.
Tests no longer skipped by fate—
I nibble greens and integrate.
Hop, ship, celebrate! 🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title “Angular upgrade to v12” directly captures the primary objective of the pull request, which is the project-wide migration from Angular 11 to Angular 12, and does so in a concise and clear manner without extraneous detail. It enables reviewers to immediately grasp the main intent of the changeset without ambiguity.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch enh-angular-upgrade-to-v12

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5d533a8 and 064b674.

⛔ Files ignored due to path filters (1)
  • editor/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (6)
  • editor/angular.json (0 hunks)
  • editor/extra-webpack.config.js (1 hunks)
  • editor/package.json (2 hunks)
  • editor/src/app/sites/shared/help-tooltip.component.ts (1 hunks)
  • editor/src/environments/environment.ts (1 hunks)
  • editor/src/polyfills.ts (1 hunks)
💤 Files with no reviewable changes (1)
  • editor/angular.json
🔇 Additional comments (6)
editor/src/polyfills.ts (1)

72-72: LGTM! Correct zone.js import path for v0.11.4.

The import path change from 'zone.js/dist/zone' to 'zone.js' is correct for zone.js v0.11.1+, as the package adopted the Angular Package Format with simplified imports.

Based on learnings

editor/src/environments/environment.ts (1)

15-15: LGTM! Updated zone-error import path in comment.

The comment now correctly references 'zone.js/plugins/zone-error', aligning with zone.js v0.11.x module organization where testing and debugging helpers are provided as separate plugin files.

editor/extra-webpack.config.js (1)

12-17: LGTM! Correct webpack 5 migration for Node.js core module handling.

The change from node.fs: 'empty' to resolve.fallback with fs: false and path: false correctly adapts to webpack 5, which deprecated the node.* configuration option. This prevents bundling of Node.js core modules in the browser bundle.

editor/package.json (2)

39-39: LGTM! Zone.js version aligns with Angular 12.

Zone.js ~0.11.4 is compatible with Angular 12 and the import path changes made in polyfills.ts.


14-14: Engine constraint is correct.
The node engine version ^12.14.0 || ^14.15.0 exactly matches Angular 12’s official support matrix.

editor/src/app/sites/shared/help-tooltip.component.ts (1)

6-6: Approve showDelay usage ng2-tooltip-directive v2.10.3 supports the showDelay input property; this change is valid.

Comment thread editor/package.json
Comment on lines +18 to +26
"@angular/animations": "^12.2.17",
"@angular/cdk": "^12.2.13",
"@angular/common": "^12.2.17",
"@angular/compiler": "^12.2.17",
"@angular/core": "^12.2.17",
"@angular/forms": "^12.2.17",
"@angular/platform-browser": "^12.2.17",
"@angular/platform-browser-dynamic": "^12.2.17",
"@angular/router": "^12.2.17",
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.

⚠️ Potential issue | 🟠 Major

Consider security implications of Angular 12 (EOL).

Angular 12 reached end-of-life in November 2022. Consider the security implications of running an EOL framework version, as it no longer receives security patches. Plan migration to a supported Angular version (currently v16+ receives LTS support).

When did Angular 12 reach end of life and what is the current LTS version?

Comment thread editor/package.json
Comment on lines +68 to +69
"typescript": "~4.3.5",
"webpack": "^5.102.0"
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.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify webpack version and TypeScript compatibility.

Ensure that:

  1. Webpack v5.102.0 is a valid released version
  2. TypeScript ~4.3.5 is compatible with Angular 12.2.17

🌐 Web query:

Is webpack version 5.102.0 available and what is the latest webpack 5 version?

💡 Result:

No — there is no webpack v5.102.0 release. The latest webpack 5 release is v5.101.3 (published August 18, 2025). [1][2]

Sources:
[1] webpack releases (GitHub).
[2] webpack release listing / registry (ReleaseAlert / npm data).


Invalid webpack version; update to latest 5.x
In editor/package.json (lines 68-69), replace

"webpack": "^5.102.0"

with

"webpack": "^5.101.3"

(npmjs.com)
TypeScript ~4.3.5 is compatible with Angular 12.2.17’s required range (>=4.2.3 <4.4.0). (runebook.dev)

🤖 Prompt for AI Agents
In editor/package.json around lines 68-69, the webpack dependency is set to an
invalid/undesired version ("^5.102.0"); update the webpack entry to "^5.101.3"
as requested, leave the TypeScript entry unchanged, then run npm install (or
yarn) to update package-lock.json/yarn.lock and verify the project builds/tests
pass.

@uldisrudzitis uldisrudzitis merged commit 14b00a0 into master Oct 1, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant