Conversation
Updated .gitignore with PLAN.md
- Update ngx-bootstrap to v21 - Update typescript-eslint - Migrate to inject() function (Angular 21) - Update peerDependencies in library
Update to angular 21
There was a problem hiding this comment.
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 useinject(). - Update library peer dependencies to Angular
>=21and 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_buildno longer copies LICENSE/README intodist/angular-split, butng-packagrconfig only lists_theme.cssas an asset. This likely means the published package will miss LICENSE/README unless they are added tong-package.jsonassets 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.
CHANGELOG.md
Outdated
| ## 21.0.0 (2026-02-09) | ||
|
|
||
| - feat: update to angular 21 | ||
| - feat: update to angular 20 |
There was a problem hiding this comment.
The new 21.0.0 changelog entry includes both "update to angular 21" and "update to angular 20" under the same release header, which is internally inconsistent and confusing for readers. Consider removing/relocating the Angular 20 line or clarifying what actually shipped in 21.0.0.
| - feat: update to angular 20 |
There was a problem hiding this comment.
AI could add to confusion when trying to characterize human nature
src/main.ts
Outdated
| bootstrapApplication(AppComponent, { | ||
| providers: [ | ||
| importProvidersFrom(BrowserModule, FormsModule), | ||
| provideZoneChangeDetection(),importProvidersFrom(BrowserModule, FormsModule), |
There was a problem hiding this comment.
In the providers array, provideZoneChangeDetection() and importProvidersFrom(...) are concatenated without whitespace/newline, which breaks formatting and makes it easy to miss entries. Split these into separate array items (and let Prettier format the list).
| provideZoneChangeDetection(),importProvidersFrom(BrowserModule, FormsModule), | |
| provideZoneChangeDetection(), | |
| importProvidersFrom(BrowserModule, FormsModule), |
.github/workflows/tests.yml
Outdated
| strategy: | ||
| matrix: | ||
| node-version: [20.x, 22.x] | ||
| node-version: [22.x, 24.x] |
There was a problem hiding this comment.
CI is running on Node 24, but package.json engines.node does not include Node 24. Either add Node 24 to engines (if supported) or keep the CI matrix aligned with the supported engine range.
| node-version: [22.x, 24.x] | |
| node-version: [22.x] |
.github/workflows/lint.yml
Outdated
| strategy: | ||
| matrix: | ||
| node-version: [20.x, 22.x] | ||
| node-version: [22.x, 24.x] |
There was a problem hiding this comment.
CI is running on Node 24, but package.json engines.node does not include Node 24. Either add Node 24 to engines (if supported) or keep the CI matrix aligned with the supported engine range.
| node-version: [22.x, 24.x] | |
| node-version: [22.x] |
| "peerDependencies": { | ||
| "@angular/common": ">=19.0.0", | ||
| "@angular/core": ">=19.0.0", | ||
| "@angular/common": ">=21.0.0", | ||
| "@angular/core": ">=21.0.0", | ||
| "rxjs": ">=7.0.0" | ||
| }, |
There was a problem hiding this comment.
The library peerDependencies now require Angular >=21, and the root changelog introduces a 21.0.0 release, but projects/angular-split/package.json still declares version 20.0.0. Bump the library version (or adjust the changelog) so the published package metadata matches the intended major release.
package.json
Outdated
| "eslint": "^8.57.0", | ||
| "husky": "^8.0.3", | ||
| "lint-staged": "^14.0.1", | ||
| "ng-packagr": "^19.0.1", | ||
| "ng-packagr": "^21.1.0", | ||
| "ngx-bootstrap": "^21.0.1", | ||
| "postcss": "8.4.28", |
There was a problem hiding this comment.
ngx-bootstrap is now in devDependencies, but it is imported by runtime app components (e.g. Topbar and examples). If installs/builds run with devDependencies omitted, the app build will fail. Move it back to dependencies or ensure the app is never built/served from a production-only install.
.github/workflows/build.yml
Outdated
| strategy: | ||
| matrix: | ||
| node-version: [20.x, 22.x] | ||
| node-version: [22.x, 24.x] |
There was a problem hiding this comment.
CI is running on Node 24, but package.json engines.node does not include Node 24. Either add Node 24 to engines (if supported) or keep the CI matrix aligned with the supported engine range.
| node-version: [22.x, 24.x] | |
| node-version: [22.x] |
.github/copilot-instructions.md
Outdated
|
|
||
| # expectations from github copilot | ||
| Always ask user for guidance. | ||
| - Provide best in class respose: |
There was a problem hiding this comment.
Typo: "respose" should be "response".
| - Provide best in class respose: | |
| - Provide best in class response: |
|
@shlomoa Thanks for your PR. |
|
We have still some stuff which are bot v20. For example:
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. |
…ular-split into update_to_angular_21
|
Sorry folks, first experience on a github project.
This is not critical for me, but I would like to see this completed successfully. |
|
@shlomoa, I restarted the Copilot review after your changes. It probably will find a couple of nits. 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? |
There was a problem hiding this comment.
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.
| this.http.get(this.url, { responseType: 'text' }).pipe( | ||
| map((md) => { | ||
| this.cachedHtml = marked(md) | ||
| this.cachedHtml = marked.parse(md) as string | ||
| return this.cachedHtml | ||
| }), |
There was a problem hiding this comment.
marked.parse(md) as string forces a synchronous string result. Newer marked typings commonly allow parse to return string | Promise<string> depending on options, so this cast can hide a real async return and lead to runtime issues. Prefer handling both cases (e.g., converting to an Observable via from(...)) rather than asserting string.
| "angularCompilerOptions": { | ||
| "annotateForClosureCompiler": true, | ||
| "compilationMode": "partial", | ||
| "compilationMode": "full", |
There was a problem hiding this comment.
angularCompilerOptions.compilationMode is set to full for the published library build. Angular libraries are expected to be built in partial compilation mode for distribution; full can break downstream consumption and bypass the Angular linker.
| "compilationMode": "full", | |
| "compilationMode": "partial", |
|
And I just noticed there are merge conflicts; These should be addressed anyhow. |
Moved to angular 21 and ran over all stages properly including manual verification