fix(components)!: unresolvable peerDependencies break npm install (#DS-4889) - #1853
fix(components)!: unresolvable peerDependencies break npm install (#DS-4889)#1853lskramarov wants to merge 1 commit into
Conversation
|
Visit the preview URL for this PR (updated for commit 09f1faa): https://koobiq-next--prs-1853-fzfi7fur.web.app (expires Thu, 13 Aug 2026 17:05:08 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: c9e37e518febda70d0317d07e8ceb35ac43c534c |
There was a problem hiding this comment.
Pull request overview
Adds safeguards against publishing package manifests that npm cannot resolve.
Changes:
- Broadens and completes peer dependency declarations.
- Adds source and built-package resolution checks to CI.
- Updates schematics and installation guidance for required dependencies.
Reviewed changes
Copilot reviewed 20 out of 21 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
yarn.lock |
Locks semver tooling dependencies. |
tools/check-peer-deps/tsconfig.json |
Configures peer-check compilation. |
tools/check-peer-deps/index.ts |
Validates peer ranges and imports. |
tools/check-npm-resolution/tsconfig.json |
Configures npm-check compilation. |
tools/check-npm-resolution/index.ts |
Tests built packages with npm fixtures. |
tools/builders/packager/build.ts |
Preserves ranges and rejects placeholders. |
packages/schematics/src/ng-add/ng-add.spec.ts |
Tests mandatory peer installation. |
packages/schematics/src/ng-add/index.ts |
Installs new required dependencies. |
packages/schematics/src/ng-add/__snapshots__/ng-add.spec.ts.snap |
Updates dependency snapshot. |
packages/schematics/rollup.config.js |
Injects new dependency versions. |
packages/docs-examples/package.json |
Completes example peer declarations. |
packages/components/package.json |
Corrects component peer metadata. |
packages/components-experimental/package.json |
Broadens the components peer range. |
packages/angular-moment-adapter/package.json |
Broadens the components peer range. |
packages/angular-luxon-adapter/package.json |
Broadens the components peer range. |
package.json |
Adds validation tooling and scripts. |
docs/guides/installation.ru.md |
Updates Russian installation guidance. |
docs/guides/installation.en.md |
Updates English installation guidance. |
.github/workflows/publish.yml |
Checks npm resolution before publishing. |
.github/workflows/linters.yml |
Runs peer validation in CI. |
.github/workflows/build.yml |
Verifies built-package resolution. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
c49e129 to
09f1faa
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 31 out of 32 changed files in this pull request and generated 1 comment.
Suppressed comments (2)
tools/check-peer-deps/index.ts:290
- The reachability graph currently includes
typeanddynamicself-imports, even though the optional-peer check below explicitly reasons about entry points that are statically loaded. A type-only import is erased and a dynamic import is lazy, so either can incorrectly mark an entry point as unavoidable and make this CI check reject a valid optional peer. Restrict graph edges to value imports.
for (const record of records) {
if (record.packageName !== packageName) continue;
packages/schematics/src/migrations/mandatory-peer-dependencies/index.ts:38
- This warning is emitted for every upgraded project, including one where the preceding call just added the current
^3.5.1range. The migration metadata and comment say it is for an already-present range that was left untouched, so new/current installations receive a false manual-action warning. Capture the existing range before adding the dependency and only log this warning when one was present (ideally when it does not satisfy the new floor).
// `addPackageToPackageJson` leaves an entry that is already there untouched, so a project
// pinned below the new floor keeps its version — and that one is not an install error but a
// `TypeError: this.dateAdapter.addCalendarUnits is not a function` inside `kbq-time-range`.
logMessage(context.logger, [
'`@koobiq/date-adapter` must be 3.4.0 or newer.',
| // `addPackageToPackageJson` only edits the manifest — nothing in the Angular CLI installs | ||
| // what a schematic adds there, so without this task the application is left with | ||
| // dependencies it has not actually got, and the instruction below cannot be followed. | ||
| context.addTask(new NodePackageInstallTask()); |
| "@koobiq/design-tokens": "^3.14.0", | ||
| "highlight.js": "^11.11.1", | ||
| "marked": "^17.0.0", | ||
| "overlayscrollbars": "^2.7.3", |
There was a problem hiding this comment.
версия overlayscrollbars должна быть зафиксирована на 2.7.3, выше возможны баги с большой вероятностью
| "@koobiq/date-formatter": "^3.2.3", | ||
| "@koobiq/icons": "^11.1.3", | ||
| "@koobiq/design-tokens": "^3.14.0" | ||
| "@koobiq/icons": ">=11.1.3 <13.0.0", |
There was a problem hiding this comment.
зачем фиксировать до 13 (такой версии не существует) ?
No description provided.