Skip to content

fix(components)!: unresolvable peerDependencies break npm install (#DS-4889) - #1853

Open
lskramarov wants to merge 1 commit into
mainfrom
fix/DS-4889
Open

fix(components)!: unresolvable peerDependencies break npm install (#DS-4889)#1853
lskramarov wants to merge 1 commit into
mainfrom
fix/DS-4889

Conversation

@lskramarov

Copy link
Copy Markdown
Contributor

No description provided.

@lskramarov lskramarov self-assigned this Aug 5, 2026
@lskramarov lskramarov added the bug Something isn't working label Aug 5, 2026
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread tools/check-peer-deps/index.ts Outdated
Comment thread tools/check-npm-resolution/index.ts Outdated
Comment thread packages/schematics/src/ng-add/index.ts
Comment thread docs/guides/installation.en.md
Comment thread docs/guides/installation.ru.md
@lskramarov
lskramarov marked this pull request as ready for review August 10, 2026 17:17
@lskramarov
lskramarov requested review from NikGurev and artembelik and a balanced review from Copilot August 10, 2026 17:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 type and dynamic self-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.1 range. 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.',

Comment on lines +61 to +64
// `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",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

версия 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",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

зачем фиксировать до 13 (такой версии не существует) ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants