diff --git a/bun.lock b/bun.lock index 5baa5c009f2..292cb1cfdf5 100644 --- a/bun.lock +++ b/bun.lock @@ -972,6 +972,7 @@ "dependencies": { "@effect/opentelemetry": "catalog:", "@effect/platform-node": "catalog:", + "@effect/platform-node-shared": "catalog:", "@npmcli/arborist": "catalog:", "@npmcli/config": "10.8.1", "@opentelemetry/api": "1.9.0", diff --git a/packages/sdk/script/verify-package.ts b/packages/sdk/script/verify-package.ts index 054f94a7f72..03457d89b49 100644 --- a/packages/sdk/script/verify-package.ts +++ b/packages/sdk/script/verify-package.ts @@ -173,6 +173,10 @@ for (const module of modules) { const sdk = archives.get("@opencode-ai/sdk") if (!sdk) throw new Error("Packed SDK archive was not created") await $`npm install --ignore-scripts --no-audit --no-fund --package-lock=false ${sdk} wrangler@4.110.0`.cwd(consumer) + const runtimes = (await $`npm ls effect --all --parseable`.cwd(consumer).text()).trim().split("\n") + if (runtimes.length !== 1) { + throw new Error(`Packed SDK consumer resolved multiple Effect runtimes:\n${runtimes.join("\n")}`) + } await $`bun imports.mjs`.cwd(consumer) await $`bun --conditions=workerd imports.mjs`.cwd(consumer) await $`node_modules/.bin/wrangler deploy --dry-run --config wrangler.jsonc --outdir dist`.cwd(consumer) diff --git a/packages/util/package.json b/packages/util/package.json index c61568d7d0a..8117eba8a38 100644 --- a/packages/util/package.json +++ b/packages/util/package.json @@ -39,6 +39,7 @@ "dependencies": { "@effect/opentelemetry": "catalog:", "@effect/platform-node": "catalog:", + "@effect/platform-node-shared": "catalog:", "@npmcli/arborist": "catalog:", "@npmcli/config": "10.8.1", "@opentelemetry/api": "1.9.0",