Repository navigation
Description
Command
update
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
ng update filters candidate versions by publish time since #33364, but the filter misses most real configurations:
-
npm: the CLI reads
npm config get before. When a project sets onlymin-release-age(npm >= 11.10.0), npm derivesbeforeinternally, butnpm config get beforestill printsnull. The filter stays off:ng updatepicks a version newer than the window, thennpm installrejects it with ETARGET. The user sees only "Unable to install packages", and package.json is restored. -
Excludes: no package manager's exclude list is read, so
isReleaseAgeSatisfiedfilters every package by date:- npm
min-release-age-exclude(npm >= 11.17.0) - pnpm
minimumReleaseAgeExclude - yarn
npmPreapprovedPackages - bun
minimumReleaseAgeExcludes
Once (1) is fixed, a package excluded on purpose (e.g. an organization's own scope) would be held back by the CLI even though the package manager would install it.
- npm
Real-world case: a project sets min-release-age=3 with min-release-age-exclude[]=@our-scope/*. ng update @our-scope/lib cascades through the library's ng-update packageGroup to @angular/*@22.3.2, published 19 hours earlier, and fails at install time.
Minimal Reproduction
- In an Angular workspace using npm >= 11.10.0, add to .npmrc:
min-release-age=36500 - Run
ng update @angular/core(any package with a newer version works). - The CLI prints "Updating package.json with dependency @angular/core to version ", then "Installing packages [FAILED: Unable to install packages]" and "Restored package.json to its original state."
npm config get beforeprintsnull;npm install @angular/core@<latest> --dry-runfails with ETARGET ("No matching version found ... with a date before ...").
With before=<date> set instead of min-release-age, the CLI filter does activate, which narrows the cause to reading before only.
For excludes, add min-release-age-exclude[]=@angular/* (npm >= 11.17.0): npm then installs any version, so the CLI must not filter those packages either.
Exception or Error
✖ Installing packages [FAILED: Unable to install packages]
Restored package.json to its original state.
(underlying npm error)
npm error code ETARGET
npm error notarget No matching version found for @angular/core@22.3.2 with a date before 11/29/2026, 6:01:22 PM.
Your Environment
Angular CLI : 22.2.6
Angular : 22.2.4
Node.js : 24.22.2
Package Manager : npm 11.19.1
Operating System : darwin arm64
┌───────────────────────────┬───────────────────┬───────────────────┐
│ Package │ Installed Version │ Requested Version │
├───────────────────────────┼───────────────────┼───────────────────┤
│ @angular/animations │ 22.2.4 │ ^22.2.4 │
│ @angular/build │ 22.2.6 │ ^22.2.6 │
│ @angular/cdk │ 22.2.6 │ ^22.2.6 │
│ @angular/cli │ 22.2.6 │ ^22.2.6 │
│ @angular/common │ 22.2.4 │ ^22.2.4 │
│ @angular/compiler │ 22.2.4 │ ^22.2.4 │
│ @angular/compiler-cli │ 22.2.4 │ ^22.2.4 │
│ @angular/core │ 22.2.4 │ ^22.2.4 │
│ @angular/forms │ 22.2.4 │ ^22.2.4 │
│ @angular/language-service │ 22.2.4 │ ^22.2.4 │
│ @angular/platform-browser │ 22.2.4 │ ^22.2.4 │
│ @angular/router │ 22.2.4 │ ^22.2.4 │
│ rxjs │ 7.8.2 │ ^7.8.2 │
│ typescript │ 6.0.3 │ ^6.0.3 │
│ vitest │ 5.1.0 │ ^5.1.0 │
│ zone.js │ 0.16.3 │ ^0.16.3 │
└───────────────────────────┴───────────────────┴───────────────────┘
Anything else relevant?
- npm: reading
npm config get min-release-age(days) next tobeforewould cover npm; npm's precedence between the two keys is documented in its config definitions (beforewins within the same source). - Excludes are package names or minimatch globs for npm, pnpm and yarn; bun matches exact names only. The npm/pnpm/yarn list can be read with
npm config get min-release-age-exclude,pnpm config get minimumReleaseAgeExclude,yarn config get npmPreapprovedPackages --json. - Related: minimum-release-age prevents ng update #33119 (closed via refactor(@angular/cli): transition update command to use PackageManager abstraction #33364), Support for pnpm (or general) minimumReleaseAge #31232. Nx has the same gap for npm excludes in
nx migrate.
Activity