Skip to content

fix(build): externalize datavis deps in tsup config#159

Merged
garrity-miepub merged 3 commits intomainfrom
release/v0.3.0
Apr 2, 2026
Merged

fix(build): externalize datavis deps in tsup config#159
garrity-miepub merged 3 commits intomainfrom
release/v0.3.0

Conversation

@garrity-miepub
Copy link
Copy Markdown
Contributor

chore: release v0.3.0

Copilot AI review requested due to automatic review settings April 2, 2026 01:28
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Apr 2, 2026

Deploying ui with  Cloudflare Pages  Cloudflare Pages

Latest commit: b81a19c
Status: ✅  Deploy successful!
Preview URL: https://672f78ed.ui-6d0.pages.dev
Branch Preview URL: https://release-v0-3-0.ui-6d0.pages.dev

View logs

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the library build configuration to keep DataVis-related dependencies out of the bundled output, and bumps the package version for the v0.3.0 release.

Changes:

  • Expanded tsup external list to exclude DataVis-related packages (and related subpaths) from bundling.
  • Bumped @mieweb/ui package version from 0.2.4 to 0.3.0.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
tsup.config.ts Externalizes additional DataVis-related modules/subpaths to avoid bundling them into the published build.
package.json Updates package version to 0.3.0 for the release.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +62 to +65
'@mieweb/datavis',
'datavis-ace',
/^@mieweb\/ui\//,
/^datavis\//,
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

external now includes datavis-related modules (e.g. @mieweb/datavis, datavis-ace, and datavis/*). Anything listed here will not be bundled, so consumers importing @mieweb/ui/datavis must have the corresponding packages installed at runtime. Right now package.json only declares datavis-ace as a peerDependency (and does not declare datavis or @mieweb/datavis), which can lead to runtime resolution errors for consumers. Consider aligning peerDependencies/peerDependenciesMeta with the modules being externalized (or otherwise ensure the datavis entry point doesn’t require undeclared externals).

Suggested change
'@mieweb/datavis',
'datavis-ace',
/^@mieweb\/ui\//,
/^datavis\//,
'datavis-ace',
/^@mieweb\/ui\//,

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The suggested change would reintroduce the build failure — removing these externals causes tsup to attempt bundling @mieweb/datavis (a local workspace package in datavis), which in turn imports @mieweb/ui/components/*, creating a circular resolution error.

Adding @mieweb/datavis as a peerDependency is also not viable — it's not published to npm, so pnpm install --frozen-lockfile fails in CI trying to resolve it from the registry.

The datavis entry point is an opt-in internal integration (same pattern as ag-grid). Consumers who use @mieweb/ui/datavis must have the local @mieweb/datavis and datavis-ace packages available — this is by design and documented. The external entries are purely a build-time concern to prevent circular bundling.

Copilot AI review requested due to automatic review settings April 2, 2026 01:35
Copy link
Copy Markdown

Copilot AI left a comment

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 2 out of 2 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@garrity-miepub garrity-miepub marked this pull request as ready for review April 2, 2026 18:17
@garrity-miepub garrity-miepub merged commit cf69b7d into main Apr 2, 2026
14 checks passed
@garrity-miepub garrity-miepub deleted the release/v0.3.0 branch April 2, 2026 18:41
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.

2 participants