fix: le polyfill est un peer, pas un chemin vers la copie de travail d'un développeur

This commit is contained in:
Sylvain Duchesne
2026-08-17 11:48:17 +02:00
parent 821ea997fe
commit 2ce2113157
3 changed files with 19 additions and 7 deletions
+6 -2
View File
@@ -80,12 +80,16 @@ Deliberately not settled. Each is implemented in its narrowest form and reported
## Depends on
`@ng-eventually/polyfill`, by local path (`file:../ng-eventually-js/packages/polyfill`), which expects that repository to sit beside this one.
`@ng-eventually/polyfill`, declared as a **peer** dependency: an application using this package supplies it, so exactly one copy of it exists in that application. That is a requirement of the polyfill itself, which keeps its state in the package — two copies mean two subscription registries and two current identities, and nothing detects it.
For this repository's own tests and typecheck it is *also* a `devDependency` by local path (`file:../ng-eventually-js/packages/polyfill`), which expects that repository to sit beside this one. A dev dependency is not installed by a consumer, so this local path never reaches one. `ng-e2e-helpers` is a `devDependency` by local path on the same expectation.
## Running it
```sh
bun install
npm install # or: pnpm install
bunx tsc --noEmit -p tsconfig.json
bun test
```
**`bun install` does not work in this repository** (checked with bun 1.3.9): bun resolves a mandatory peer dependency against the npm registry whatever local path provides it, and `@ng-eventually/polyfill` is published to no registry, so the install stops on `GET https://registry.npmjs.org/@ng-eventually%2fpolyfill - 404`. `npm install` and `pnpm install` both resolve it from the sibling checkout. `bun test` itself is unaffected — it is only the installer that cannot express this.