Skip to content

Commit dda8054

Browse files
fix(sdk): stop publishing unresolvable ui dependency + leaked types
The SDK bundles @workflowbuilder/ui and @base-ui/react into its dist, but declared them as runtime dependencies - so a published @workflowbuilder/sdk would 404 on @workflowbuilder/ui (not published) at npm install. Move both to devDependencies (they are inlined, consumers don't install them). Add @workflowbuilder/ui to the dts plugin's bundledPackages so its types are inlined into dist/index.d.ts instead of leaking unresolvable import('@workflowbuilder/ui') references into the public type surface. Verified: no real ui/base-ui imports remain in dist/index.d.ts. Remove the obsolete docs/overflow-ui.md (described the old external @synergycodes/overflow-ui local-dev flow this migration replaces).
1 parent 0a42ae8 commit dda8054

4 files changed

Lines changed: 13 additions & 47 deletions

File tree

docs/overflow-ui.md

Lines changed: 0 additions & 36 deletions
This file was deleted.

packages/sdk/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,9 @@
7676
"zustand": "^5.0.0"
7777
},
7878
"dependencies": {
79-
"@base-ui/react": "catalog:",
8079
"@cfworker/json-schema": "4.1.1",
8180
"@fontsource/poppins": "^5.2.7",
8281
"@phosphor-icons/react": "^2.1.7",
83-
"@workflowbuilder/ui": "workspace:*",
8482
"ace-builds": "^1.43.4",
8583
"ajv": "catalog:",
8684
"clsx": "^2.1.1",
@@ -91,13 +89,15 @@
9189
"remeda": "^2.19.2"
9290
},
9391
"devDependencies": {
92+
"@base-ui/react": "catalog:",
9493
"@jsonforms/core": "^3.4.1",
9594
"@jsonforms/react": "^3.4.1",
9695
"@testing-library/react": "^16.3.0",
9796
"@types/react": "catalog:",
9897
"@vitejs/plugin-react": "^4.3.4",
9998
"@workflow-builder/icons": "workspace:*",
10099
"@workflow-builder/types": "workspace:*",
100+
"@workflowbuilder/ui": "workspace:*",
101101
"eslint-plugin-react": "7.37.2",
102102
"eslint-plugin-react-hooks": "5.1.0-rc.1",
103103
"eslint-plugin-tsdoc": "^0.4.0",

packages/sdk/vite.config.mts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,11 @@ export default defineConfig(({ command }) => ({
4646
include: ['src/**/*'],
4747
exclude: ['src/**/*.spec.ts', 'src/**/*.spec.tsx', 'src/__shims__/**/*'],
4848
// Inline types from workspace-internal packages so external consumers
49-
// don't need to install them. Icons is bundled into SDK's runtime
50-
// (not externalized in Vite's build), and this keeps the types aligned.
51-
bundledPackages: ['@workflow-builder/icons'],
49+
// don't need to install them. Both packages are bundled into the SDK's
50+
// runtime (not externalized in Vite's build), so their types must be
51+
// inlined too - otherwise dist/index.d.ts would reference
52+
// @workflowbuilder/ui, which the SDK does not declare as a dependency.
53+
bundledPackages: ['@workflow-builder/icons', '@workflowbuilder/ui'],
5254
// The one type we can't reach from source alone — the ai-tools-control
5355
// depends on a few @jsonforms types we export for consumer convenience.
5456
insertTypesEntry: true,

pnpm-lock.yaml

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)