| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
- Add @angular-devkit/schematics dependencies for Angular v21 compatibility - Replace all npm commands with pnpm equivalents across the project - Update GitHub Actions workflows to use pnpm/action-setup@v4 - Add pnpm caching to CI workflows for faster builds - Update installation instructions in READMEs - Add pnpm-debug.log to .gitignore - Remove package-lock.json in favor of pnpm-lock.yaml - Update pre-commit hooks to use pnpm - Fix schematic test imports for Angular v21 This migration improves dependency management and build performance while ensuring compatibility with Angular v21.
There was a problem hiding this comment.
Thank you for your Pull Request! We have run several checks on this pull request in order to make sure it's suitable for merging into this project. The results are listed in the following section.
In order to be considered for merging, the pull request description must refer to a specific issue number. This is described in our Contributing Guide. We are closing this pull request for now but you can update the pull request description and reopen the pull request.
The check is looking for a phrase similar to: "Fixes #XYZ" or "Resolves #XYZ" where XYZ is the issue number that this PR is meant to address.
Sorry, something went wrong.
There was a problem hiding this comment.
This PR migrates the repo tooling from npm to pnpm and upgrades the Angular workspace (including the demo app and schematics tooling) to be compatible with Angular v21.
Changes:
Copilot reviewed 17 out of 22 changed files in this pull request and generated 5 comments.
Show a summary per file| File | Description |
|---|---|
| tsconfig.json | Removes explicit lib configuration (defaults now inferred from target). |
| projects/validointi/core/schematics/ng-add/index.spec.ts | Reorders imports to resolve Angular v21 schematic test import issues. |
| projects/validointi/core/pnpm-lock.yaml | Adds a nested pnpm lockfile under the library project. |
| projects/validointi/core/package.json | Adds schematics-related dependencies to the library package metadata. |
| projects/validointi/core/README.md | Updates install instructions to pnpm. |
| projects/demo/src/main.ts | Adds zone change detection provider for Angular v21 demo bootstrap. |
| projects/demo/src/app/joi-example/joi-example.component.html | Migrates *ngIf to @if. |
| projects/demo/src/app/home.component.ts | Removes CommonModule import/config now that it’s unused. |
| projects/demo/src/app/form3/form3.component.html | Migrates *ngIf/*ngFor to @if/@for. |
| projects/demo/src/app/form3/contacts/contacts.component.ts | Migrates *ngFor to @for and drops CommonModule. |
| projects/demo/src/app/form3/contacts/contact/contact.component.ts | Migrates *ngFor to @for and drops CommonModule. |
| projects/demo/src/app/form2/form2.component.html | Migrates nested *ngIf/*ngFor to @if/@for and inlines loading state. |
| projects/demo/src/app/form1/form1.component.html | Migrates *ngIf to @if. |
| projects/demo/src/app/about.component.ts | Removes CommonModule import/config now that it’s unused. |
| package.json | Pins pnpm via packageManager and upgrades Angular/tooling deps to v21. |
| README.md | Updates install instructions to pnpm. |
| .husky/pre-commit | Switches hook to pnpm run. |
| .gitignore | Ignores pnpm-debug.log. |
| .github/workflows/release-please.yml | Migrates release workflow install/build steps to pnpm and adds pnpm caching. |
| .github/workflows/main.yml | Migrates CI workflow commands to pnpm and adds pnpm setup/caching. |
.github/workflows/release-please.yml:40
- run: cd dist/validointi/core/
if: ${{ steps.release.outputs.release_created }}
- run: npm publish --access public
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
| - uses: actions/setup-node@v1 | ||
| with: | ||
| node-version: 18 |
There was a problem hiding this comment.
node-version: 18 is incompatible with the Angular v21 toolchain you’re installing/building here (e.g. @angular-devkit/*@21.2.0 declares Node ^20.19.0 || ^22.12.0 || >=24.0.0). This job will fail during pnpm install/build on Node 18—bump the workflow Node version to a supported range (and ideally update actions/setup-node to a current major).
| - uses: actions/setup-node@v1 | |
| with: | |
| node-version: 18 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20.19.0 |
Sorry, something went wrong.
| "version": "0.0.0", | ||
| "license": "MIT", | ||
| "type": "module", | ||
| "packageManager": "pnpm@10.30.3", |
There was a problem hiding this comment.
PR description says the packageManager field was updated to pnpm 10.0.0, but the actual value here is pnpm@10.30.3. Either adjust the description or pin the intended version so contributors/CI use the same pnpm release.
Sorry, something went wrong.
| import { provideZoneChangeDetection } from "@angular/core"; | ||
| import { provideHttpClient } from '@angular/common/http'; | ||
| import { bootstrapApplication } from '@angular/platform-browser'; | ||
| import { provideRouter } from '@angular/router'; | ||
| import { AppComponent } from './app/app.component'; | ||
| import { rootRoutes } from './app/root.routes'; | ||
|
|
||
| bootstrapApplication(AppComponent, { | ||
| providers: [provideRouter(rootRoutes), provideHttpClient()], | ||
| providers: [provideZoneChangeDetection(),provideRouter(rootRoutes), provideHttpClient()], |
There was a problem hiding this comment.
This file is formatted inconsistently with the repo’s Prettier config (singleQuote: true) and will churn on format/lint (double quotes on the import, missing space after the first comma in the providers array). Reformat to match the established Prettier output.
Sorry, something went wrong.
| "schematics": "./schematics/collection.json", | ||
| "devDependencies": { | ||
| "@angular-devkit/schematics": "^21.2.0", | ||
| "@angular-devkit/schematics-cli": "^21.2.0" | ||
| } |
There was a problem hiding this comment.
The library’s schematics import @angular-devkit/schematics at runtime (e.g. schematics/ng-add/index.ts), but it’s added here under devDependencies. With pnpm’s strict node_modules, consumers running the schematics can hit "Cannot find module '@angular-devkit/schematics'" unless it’s declared as a dependency (or as a peerDependency with an appropriate range). Move these entries out of devDependencies in the published package metadata.
Sorry, something went wrong.
| lockfileVersion: '9.0' | ||
|
|
||
| settings: | ||
| autoInstallPeers: false | ||
| excludeLinksFromLockfile: false | ||
|
|
||
| importers: | ||
|
|
||
| .: | ||
| dependencies: | ||
| tslib: | ||
| specifier: ^2.8.1 | ||
| version: 2.8.1 | ||
| devDependencies: | ||
| '@angular-devkit/schematics': | ||
| specifier: ^21.2.0 | ||
| version: 21.2.0 | ||
| '@angular-devkit/schematics-cli': | ||
| specifier: ^21.2.0 | ||
| version: 21.2.0 |
There was a problem hiding this comment.
There is already a root pnpm-lock.yaml for the repo; committing a second lockfile under projects/validointi/core is likely accidental and can confuse installs/CI (only one lockfile will be honored depending on where pnpm install is run). If this repo is meant to be installed from the root, remove this nested lockfile; if projects/validointi/core is intended to be independently installable, document/enforce that and ensure CI runs installs from that directory as well.
Sorry, something went wrong.
The pnpm/action-setup@v4 automatically reads the version from the packageManager field in package.json, so specifying it explicitly causes a version conflict error.
Add auto-install-peers=false to .npmrc to match local configuration and prevent ERR_PNPM_LOCKFILE_CONFIG_MISMATCH in CI. Regenerate lockfile with explicit settings.
- Pin vest to ^5.4.6 to avoid breaking changes in v6 - v6 removed vest/promisify and changed create() API - This fixes build failures in demo app - Change dependency-review to fail on 'moderate' severity instead of 'low' - Allows low-severity vulnerabilities in devDependencies (like tmp@0.0.33) - Still protects against moderate+ severity issues - Revert zone.js to ~0.15.1 (Angular 21 compatible version)
There was a problem hiding this comment.
Copilot reviewed 19 out of 24 changed files in this pull request and generated 3 comments.
Files not reviewed (1).github/workflows/release-please.yml:39
- run: pnpm run build
if: ${{ steps.release.outputs.release_created }}
- run: cd dist/validointi/core/
if: ${{ steps.release.outputs.release_created }}
- run: npm publish --access public
env:
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
| import { provideZoneChangeDetection } from "@angular/core"; | ||
| import { provideHttpClient } from '@angular/common/http'; | ||
| import { bootstrapApplication } from '@angular/platform-browser'; | ||
| import { provideRouter } from '@angular/router'; | ||
| import { AppComponent } from './app/app.component'; | ||
| import { rootRoutes } from './app/root.routes'; | ||
|
|
||
| bootstrapApplication(AppComponent, { | ||
| providers: [provideRouter(rootRoutes), provideHttpClient()], | ||
| providers: [provideZoneChangeDetection(),provideRouter(rootRoutes), provideHttpClient()], | ||
| }).catch(console.error); |
There was a problem hiding this comment.
This file mixes double quotes and single quotes, and the providers array is missing a space after a comma. Since the repo is configured for Prettier with singleQuote: true, please run formatting (or update the code) so it matches the established style.
Sorry, something went wrong.
| <button class="action" type="button" (click)="data.tags.push('')">➕</button> | ||
| <!-- notice the label[tag][index] is the selector for the tag component --> | ||
| <label *ngFor="let tag of data.tags; let index = index" [tag]="tag" [index]="index"> </label> | ||
| @for (tag of data.tags; track tag; let index = $index) { |
There was a problem hiding this comment.
@for (tag of data.tags; track tag …) uses the tag value as the tracking key, but this list can contain duplicates (e.g. the add button pushes ''). Duplicate track keys can cause incorrect DOM reuse / rendering glitches. Track by $index here, or track by a stable unique id per tag entry.
| @for (tag of data.tags; track tag; let index = $index) { | |
| @for (tag of data.tags; track $index; let index = $index) { |
Sorry, something went wrong.
| lockfileVersion: '9.0' | ||
|
|
||
| settings: | ||
| autoInstallPeers: false | ||
| excludeLinksFromLockfile: false | ||
|
|
||
| importers: | ||
|
|
||
| .: | ||
| dependencies: | ||
| tslib: | ||
| specifier: ^2.8.1 | ||
| version: 2.8.1 | ||
| devDependencies: | ||
| '@angular-devkit/schematics': | ||
| specifier: ^21.2.0 | ||
| version: 21.2.0 | ||
| '@angular-devkit/schematics-cli': | ||
| specifier: ^21.2.0 | ||
| version: 21.2.0 |
There was a problem hiding this comment.
A second lockfile under projects/validointi/core/ is unusual for pnpm unless you intentionally support running installs from that subdirectory. If the repo installs/builds from the root (as CI does), this lockfile can drift independently and create confusion. Consider removing it or documenting/automating why it must exist and how it’s kept in sync.
Sorry, something went wrong.
The cd command in GitHub Actions doesn't persist across steps. Each run step starts fresh in the repo root, so the separate cd step had no effect on the npm publish step. This caused it to attempt publishing from the private root package instead of the built dist/validointi/core package. Use working-directory attribute instead to ensure npm publish runs from the correct directory.
| Back | FazBrowse Home | New Git URL |
Summary
This PR migrates the project from npm to pnpm and ensures full compatibility with Angular v21.
Changes
Package Manager Migration
Angular v21 Compatibility
CI/CD Updates
Documentation
Git Hooks
Benefits
Testing
Breaking Changes
None - this is purely an internal tooling change. Published package remains the same.