diff --git a/bun.lock b/bun.lock index aca7683..fec5e00 100644 --- a/bun.lock +++ b/bun.lock @@ -9,7 +9,6 @@ "@checkfu/integrations": "0.0.2", "@checkfu/sdk": "0.0.2", "@cloudflare/computer": "0.11.4", - "@cloudflare/workers-types": "5.20261118.1", "@earendil-works/chord": "1.7.0", "@earendil-works/pi-ai": "1.7.0", "@earendil-works/pi-codemode": "1.7.0", @@ -23,6 +22,7 @@ }, "devDependencies": { "@alchemy.run/cloudflare": "2.0.0-beta.87", + "@cloudflare/workers-types": "5.20261118.1", "@effect/platform-node": "4.1.7", "@effect/sql-d1": "4.1.7", "@effect/tsgo": "0.73.2", @@ -36,6 +36,7 @@ }, "peerDependencies": { "@alchemy.run/cloudflare": "*", + "@cloudflare/workers-types": "^5.20261118.1", "rolldown": "^1.2.16", }, "optionalPeers": [ diff --git a/package.json b/package.json index 5890305..579c6d0 100644 --- a/package.json +++ b/package.json @@ -98,7 +98,6 @@ "@checkfu/integrations": "0.0.2", "@checkfu/sdk": "0.0.2", "@cloudflare/computer": "0.11.4", - "@cloudflare/workers-types": "5.20261118.1", "@earendil-works/chord": "1.7.0", "@earendil-works/pi-ai": "1.7.0", "@earendil-works/pi-codemode": "1.7.0", @@ -112,6 +111,7 @@ }, "devDependencies": { "@alchemy.run/cloudflare": "2.0.0-beta.87", + "@cloudflare/workers-types": "5.20261118.1", "@effect/platform-node": "4.1.7", "@effect/sql-d1": "4.1.7", "@effect/tsgo": "0.73.2", @@ -125,6 +125,7 @@ }, "peerDependencies": { "@alchemy.run/cloudflare": "*", + "@cloudflare/workers-types": "^5.20261118.1", "rolldown": "^1.2.16" }, "peerDependenciesMeta": { diff --git a/scripts/check-consumer.mjs b/scripts/check-consumer.mjs index f1b1c93..7e8f1e7 100644 --- a/scripts/check-consumer.mjs +++ b/scripts/check-consumer.mjs @@ -13,11 +13,10 @@ try { ["install", "--ignore-scripts", "--no-audit", "--no-fund", spec.endsWith(".tgz") ? resolve(spec) : spec], { cwd: consumer, stdio: "inherit" }, ) - execFileSync( - process.execPath, - [resolve(import.meta.dirname, "../node_modules/typescript/bin/tsc"), "--project", "tsconfig.json"], - { cwd: consumer, stdio: "inherit" }, - ) + const tsc = resolve(import.meta.dirname, "../node_modules/typescript/bin/tsc") + for (const project of ["tsconfig.json", "tsconfig.imported-state.json"]) { + execFileSync(process.execPath, [tsc, "--project", project], { cwd: consumer, stdio: "inherit" }) + } execFileSync(process.execPath, ["verify.mjs"], { cwd: consumer, stdio: "inherit" }) } finally { rmSync(consumer, { force: true, recursive: true }) diff --git a/test/standalone/imported-state.mjs b/test/standalone/imported-state.mjs new file mode 100644 index 0000000..2d15d55 --- /dev/null +++ b/test/standalone/imported-state.mjs @@ -0,0 +1,5 @@ +/** + * @param {import("@cloudflare/workers-types").DurableObjectState} state + * @returns {import("@checkfu/harnesses").HarnessSessionOptions["state"]} + */ +export const sessionState = (state) => state diff --git a/test/standalone/package.json b/test/standalone/package.json index a9935e6..3b2f031 100644 --- a/test/standalone/package.json +++ b/test/standalone/package.json @@ -3,7 +3,7 @@ "type": "module", "dependencies": { "@alchemy.run/cloudflare-runtime": "2.0.0-beta.87", - "@cloudflare/workers-types": "5.20261118.1", + "@cloudflare/workers-types": "5.20261203.1", "@effect/platform-node": "4.1.7", "effect": "4.1.7", "miniflare": "5.20261117.0-beta", diff --git a/test/standalone/tsconfig.imported-state.json b/test/standalone/tsconfig.imported-state.json new file mode 100644 index 0000000..e9ad7d3 --- /dev/null +++ b/test/standalone/tsconfig.imported-state.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "types": [] + }, + "files": ["imported-state.mjs"] +}