Skip to content

Commit 1bf6eab

Browse files
committed
Make it possible to import from workflows-shared
1 parent 5a90831 commit 1bf6eab

File tree

3 files changed

+33
-12
lines changed

3 files changed

+33
-12
lines changed

packages/vitest-pool-workers/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"test:ci": "vitest run"
5454
},
5555
"dependencies": {
56-
"async-wait-until": "^2.0.27",
56+
"@cloudflare/workflows-shared": "workspace:*",
5757
"birpc": "0.2.14",
5858
"cjs-module-lexer": "^1.2.3",
5959
"devalue": "^5.3.2",

packages/vitest-pool-workers/scripts/bundle.mjs

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,34 @@ const commonOptions = {
8585
platform: "node",
8686
target: "esnext",
8787
bundle: true,
88-
packages: "external",
89-
external: ["cloudflare:*"],
88+
//packages: "external",
89+
//external: ["cloudflare:*"],
90+
external: [
91+
// Node.js built-ins (handled automatically by esbuild but listed for completeness)
92+
"node:*",
93+
"cloudflare:*",
94+
"workerd:*",
95+
// Virtual/runtime modules
96+
"__VITEST_POOL_WORKERS_DEFINES",
97+
"__VITEST_POOL_WORKERS_USER_OBJECT",
98+
// All npm packages (previously handled by packages: "external")
99+
"birpc",
100+
"cjs-module-lexer",
101+
"devalue",
102+
"miniflare",
103+
"semver",
104+
"semver/*",
105+
"wrangler",
106+
"zod",
107+
"undici",
108+
"undici/*",
109+
// Peer dependencies
110+
"vitest",
111+
"vitest/*",
112+
"@vitest/runner",
113+
"@vitest/snapshot",
114+
"@vitest/snapshot/*",
115+
],
90116
sourcemap: true,
91117
sourcesContent: false,
92118
logLevel: watch ? "info" : "warning",
@@ -106,6 +132,7 @@ const esmOptions = {
106132
path.join(pkgRoot, "src", "worker", "index.ts"),
107133
...libPaths.filter((libPath) => /\.m?ts$/.test(libPath)),
108134
],
135+
external: [...commonOptions.external],
109136
};
110137

111138
const cjsOptions = {

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)