Skip to content

Update to angular 21#531

Open
shlomoa wants to merge 25 commits intoangular-split:mainfrom
shlomoa:update_to_angular_21
Open

Update to angular 21#531
shlomoa wants to merge 25 commits intoangular-split:mainfrom
shlomoa:update_to_angular_21

Conversation

@shlomoa
Copy link
Copy Markdown

@shlomoa shlomoa commented Feb 9, 2026

Moved to angular 21 and ran over all stages properly including manual verification

Copy link
Copy Markdown
Contributor

@SanderElias SanderElias left a comment

Choose a reason for hiding this comment

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

LGTM,
But I'm unsure if we are ready to move to V21?
@Harpush @Jefiozie, when you both are Ok, feel free to merge.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Upgrades the workspace (demo app + angular-split library) to Angular 21, aligning build tooling/config and refactoring DI usage to Angular’s inject() pattern.

Changes:

  • Upgrade Angular/tooling dependencies and switch Angular builders to @angular/build.
  • Update TS config to moduleResolution: "bundler" and refactor components/services to use inject().
  • Update library peer dependencies to Angular >=21 and adjust CI Node matrix.

Reviewed changes

Copilot reviewed 16 out of 19 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
tsconfig.json Switch module resolution to bundler and adjust compiler options formatting.
src/main.ts Adds provideZoneChangeDetection() during app bootstrap.
src/app/ui/components/topbar.component.ts Refactors DI from constructor injection to inject().
src/app/changelog/changelog.service.ts Refactors DI to inject() while keeping service behavior.
src/app/changelog/changelog.component.ts Refactors DI to inject() and keeps observable wiring.
src/app/app.component.ts Refactors Router DI to inject() and keeps scroll-on-nav behavior.
projects/angular-split/tsconfig.lib.json Switch library TS module resolution to bundler.
projects/angular-split/src/lib/split/split.component.ts Adjusts DOCUMENT import source for library internals.
projects/angular-split/src/lib/split-custom-events-behavior.directive.ts Adjusts DOCUMENT import source for directive internals.
projects/angular-split/package.json Bumps Angular peer dependency floor to >=21.
package.json Upgrades Angular/tooling deps, adds/adjusts wireit scripts, updates ngx-bootstrap version.
angular.json Switches builders to @angular/build:* and adds schematic defaults.
CHANGELOG.md Adds 21.0.0 release notes entry.
.gitignore Adds PLAN.md to ignored files.
.github/workflows/tests.yml Updates CI Node versions tested.
.github/workflows/lint.yml Updates CI Node versions tested.
.github/workflows/build.yml Updates CI Node versions tested.
.github/copilot-instructions.md Adds repo-specific Copilot guidance document.
Comments suppressed due to low confidence (1)

package.json:174

  • lib_build no longer copies LICENSE/README into dist/angular-split, but ng-packagr config only lists _theme.css as an asset. This likely means the published package will miss LICENSE/README unless they are added to ng-package.json assets or the copy step is restored.
    "lib_build": {
      "command": "ng build angular-split",
      "files": [
        "projects/angular-split/"
      ],
      "output": [
        "dist/angular-split"
      ]

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread CHANGELOG.md Outdated
Comment thread src/main.ts Outdated
Comment thread .github/workflows/tests.yml Outdated
Comment thread .github/workflows/lint.yml Outdated
Comment thread projects/angular-split/package.json
Comment thread package.json Outdated
Comment thread .github/workflows/build.yml Outdated
Comment thread .github/copilot-instructions.md Outdated
@SanderElias
Copy link
Copy Markdown
Contributor

@shlomoa Thanks for your PR.
Can you address the AI-nits, as it's not wrong ;)

@Harpush
Copy link
Copy Markdown
Collaborator

Harpush commented Feb 20, 2026

We have still some stuff which are bot v20. For example:

  1. The demo site is v19
  2. The stackblitz is v19

I guess there are more places... Maybe we should align to v20 first and then move to v21 while applying those changes in v21 too?

Also the changelog still works weird I think.

@SanderElias @Jefiozie

@shlomoa
Copy link
Copy Markdown
Author

shlomoa commented Feb 22, 2026

Sorry folks, first experience on a github project.

  • Committed fixes to the issues flagged by github copilot.
  • Validated as much as I could.

This is not critical for me, but I would like to see this completed successfully.
How can I help ?

@SanderElias SanderElias requested a review from Copilot February 24, 2026 10:29
@SanderElias
Copy link
Copy Markdown
Contributor

SanderElias commented Feb 24, 2026

@shlomoa, I restarted the Copilot review after your changes. It probably will find a couple of nits.
Then @Harpush mentioned we should also address the StackBlitz and the demo site, since they're still on v19.
And we should check whether those are really the last 2, or if we have older versions elsewhere too.

Perhaps it is a bit too much to address all of those in this same PR, and I think @Jefiozie has ownership of the StackBlitz to begin with?

Copy link
Copy Markdown

Copilot AI left a comment

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 25 out of 28 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/app/changelog/changelog.service.ts
Comment thread projects/angular-split/tsconfig.lib.json Outdated
@SanderElias
Copy link
Copy Markdown
Contributor

And I just noticed there are merge conflicts; These should be addressed anyhow.
@shlomoa, can you please merge the upstream changes into your PR?

shlomoa added 4 commits April 20, 2026 13:04
# Conflicts:
#	package-lock.json
#	package.json
#	projects/angular-split/tsconfig.lib.json
#	src/app/app.component.ts
#	src/app/changelog/changelog.component.ts
#	tsconfig.json
@shlomoa
Copy link
Copy Markdown
Author

shlomoa commented Apr 20, 2026

@copilot @SanderElias @Jefiozie
Cleaned fixed and tested

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants