Skip to content

fix: ship the icon set as a dependency, not a peer (Issue epam/ai-dial-chat#8719) - #39

Merged
PolinaGurinovich97 merged 2 commits into
release-0.2from
fix/tabler-icons-dependency-0.2
Sep 14, 2026
Merged

PolinaGurinovich97 merged 2 commits into
release-0.2from
fix/tabler-icons-dependency-0.2

Conversation

@PolinaGurinovich97

Copy link
Copy Markdown
Collaborator

Cherry-pick of #38 onto release-0.2. Both commits applied; the lockfile auto-merged, keeping this branch's own 0.2.0-rc.0 version.

Why

@tabler/icons-react is a required peer of the released 0.2.x, so every embedding host has 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 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-react as a dependency since its 0.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 a resolutions pin as the host's only escape.

Change

  • @tabler/icons-react moves from peerDependencies to dependencies (same ^3.41.1 range); the README install command drops it.
  • The lockfile's root entry moves with it, so npm ci keeps working — the second commit exists only for that.

vite.config.ts externalizes dependencies as well as peerDependencies, so the built package still imports the icon set rather than inlining it — verified in dist/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), and react / 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:package could not run here: tools/package-smoke.mjs calls execFileSync('npm', …), which is ENOENT on Windows regardless of this change. Worth a shell: true (or npm.cmd) in a separate PR.

🤖 Generated with Claude Code

PolinaGurinovich97 and others added 2 commits September 14, 2026 20:10
…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
PolinaGurinovich97 merged commit 57bdec9 into release-0.2 Sep 14, 2026
10 checks passed
@PolinaGurinovich97
PolinaGurinovich97 deleted the fix/tabler-icons-dependency-0.2 branch September 14, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant