From 30e209c8facdef44a4be2799cc6b3b7d9c134d47 Mon Sep 17 00:00:00 2001 From: lskramarov Date: Thu, 13 Aug 2026 22:34:48 +0300 Subject: [PATCH] fix: npm-resolution fixture self-conflicts on every Angular patch release MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `angularAppWithPeers` inherited `@angular/core` and its siblings at `^20.3.0` from `ngNewApp()` but declared the two extra peers at this repository's exact pins. Every `@angular/animations` release peers on `@angular/core` exactly, so once Angular published 20.3.28 the inherited packages floated to it while `@angular/animations@20.3.27` held `@angular/core` back — and npm failed on a conflict no `@koobiq/*` package takes part in, which is the only thing this fixture exists to exercise. The fixture now declares both peers in the same range shape as the rest of it, the way `ngAddInstalls` and `documentedInstalls` already do. `check-npm-resolution` gates build.yml on every pull request and publish.yml on release, so this was failing every open pull request until the repository bumped its own Angular pin — and would break again on the next patch. --- tools/check-npm-resolution/index.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tools/check-npm-resolution/index.ts b/tools/check-npm-resolution/index.ts index a6a03e0dd..d1b3443b5 100644 --- a/tools/check-npm-resolution/index.ts +++ b/tools/check-npm-resolution/index.ts @@ -72,13 +72,21 @@ const ngNewApp = () => ({ } }); -/** An application that already depends on the Angular packages `@koobiq/components` peers on. */ +/** + * An application that already depends on the Angular packages `@koobiq/components` peers on. + * + * The two extra peers carry the same range shape as the rest of the fixture, not this repository's + * exact pins. Mixing the two makes the fixture contradict itself the moment Angular publishes a + * patch: everything inherited from `ngNewApp()` floats to the new version, while an exact + * `@angular/animations` holds `@angular/core` back — `@angular/animations@x.y.z` peers on + * `@angular/core@x.y.z` exactly — and npm fails on a conflict no `@koobiq/*` package takes part in. + */ const angularAppWithPeers = () => ({ ...ngNewApp(), dependencies: { ...ngNewApp().dependencies, - '@angular/animations': angularVersion, - '@angular/cdk': cdkVersion + '@angular/animations': angularRange, + '@angular/cdk': ngNewRange(cdkVersion) } });