fix: ship the icon set as a dependency, not a peer (Issue epam/ai-dial-chat#8719) - #39
Merged
Merged
Conversation
…l-chat#8719) `@tabler/icons-react` was a required peer, so every host had to add an icon set it never imports to its own `package.json` just to satisfy this package's peer graph — 19 modules here import it, no consumer does. It is now a dependency, which is also the role `@epam/ai-dial-ui-kit` gives it since its 0.14.0: one package cannot be a dependency of one library in a family and a required peer of another without npm being free to install two divergent copies beside the host's own. `vite.config.ts` externalizes `dependencies` as well as `peerDependencies`, so the built package still imports the icon set rather than inlining it — verified against `dist/`. AG Grid stays a peer: the grid engine needs exactly one copy per host or its module registration breaks. So does the UI Kit, the design-system singleton a host renders with directly. `npm run verify:agent-hook` (typecheck, lint, 43 files / 630 tests) and `npm run build` are green. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`npm install` moves `@tabler/icons-react` from the lockfile's `peerDependencies` mirror into its `dependencies` one. Without this, the manifest and the lockfile disagree about the package's role and `npm ci` refuses to install. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
PolinaGurinovich97
requested review from
stropalov and
valerydluski
as code owners
September 14, 2026 18:12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-pick of #38 onto
release-0.2. Both commits applied; the lockfile auto-merged, keeping this branch's own0.2.0-rc.0version.Why
@tabler/icons-reactis a required peer of the released0.2.x, so every embedding host has to add an icon set it never imports to its ownpackage.jsonjust to satisfy this package's peer graph. 19 modules here import it; no consumer does. It is one of the entries epam/ai-dial-chat#8719 lists under "host dependencies with zero application imports".It is also a split role inside the
@epam/ai-dial-*family:@epam/ai-dial-ui-kit, which this package peers on, ships@tabler/icons-reactas adependencysince its0.14.0. One package being a dependency of one library and a required peer of another leaves npm free to install two divergent copies beside the host's own, with aresolutionspin as the host's only escape.Change
@tabler/icons-reactmoves frompeerDependenciestodependencies(same^3.41.1range); the README install command drops it.npm cikeeps working — the second commit exists only for that.vite.config.tsexternalizesdependenciesas well aspeerDependencies, so the built package still imports the icon set rather than inlining it — verified indist/ai-dial-react-file-manager.es.js.What deliberately stays a peer
ag-grid-community/ag-grid-react(the grid engine needs exactly one copy per host, or its module registration breaks),@epam/ai-dial-ui-kit(the design-system singleton a host renders with directly), andreact/react-dom.Verification on this branch
npm run verify:agent-hook— typecheck, lint, 43 files / 630 tests, all green.npm run build— green; the icon set stays external.npm ci --dry-run— clean, so manifest and lockfile agree.npm run test:packagecould not run here:tools/package-smoke.mjscallsexecFileSync('npm', …), which isENOENTon Windows regardless of this change. Worth ashell: true(ornpm.cmd) in a separate PR.🤖 Generated with Claude Code