Skip to content

Commit a7aa13a

Browse files
committed
fix ecosystem-checks script paths
1 parent 2fbf3db commit a7aa13a

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

scripts/ecosystem-check.ts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ import { fileURLToPath } from 'node:url';
88
const __filename = fileURLToPath(import.meta.url);
99
const __dirname = dirname(__filename);
1010
const root = join(__dirname, '..');
11-
const libCjs = join(root, 'lib/cjs');
12-
const libEsm = join(root, 'lib/esm');
11+
const lib = join(root, 'lib');
1312
const tmp = mkdtempSync(join(os.tmpdir(), 'workos-test-'));
1413

1514
// Map of "runtime label" → { cmd, args }
@@ -18,35 +17,35 @@ const tests: Record<string, { cmd: string; args: string[] }> = {
1817
cmd: 'node',
1918
args: [
2019
'-e',
21-
`console.log('✅ Node CJS:', require("${libCjs}/index.cjs").WorkOS.name)`,
20+
`console.log('✅ Node CJS:', require("${lib}/index.cjs").WorkOS.name)`,
2221
],
2322
},
2423
'node-esm': {
2524
cmd: 'node',
2625
args: [
2726
'-e',
28-
`import("${libEsm}/index.js").then(m => console.log('✅ Node ESM:', m.WorkOS.name))`,
27+
`import("${lib}/index.js").then(m => console.log('✅ Node ESM:', m.WorkOS.name))`,
2928
],
3029
},
3130
deno: {
3231
cmd: 'deno',
3332
args: [
3433
'eval',
35-
`import("${libEsm}/index.js").then(m => console.log('✅ Deno:', m.WorkOS.name))`,
34+
`import("${lib}/index.js").then(m => console.log('✅ Deno:', m.WorkOS.name))`,
3635
],
3736
},
3837
'bun-cjs': {
3938
cmd: 'bun',
4039
args: [
4140
'-e',
42-
`console.log('✅ Bun CJS:', require("${libCjs}/index.cjs").WorkOS.name)`,
41+
`console.log('✅ Bun CJS:', require("${lib}/index.cjs").WorkOS.name)`,
4342
],
4443
},
4544
'bun-esm': {
4645
cmd: 'bun',
4746
args: [
4847
'-e',
49-
`import("${libEsm}/index.js").then(m => console.log('✅ Bun ESM:', m.WorkOS.name))`,
48+
`import("${lib}/index.js").then(m => console.log('✅ Bun ESM:', m.WorkOS.name))`,
5049
],
5150
},
5251
};
@@ -91,10 +90,10 @@ if (miniflareCheck.status !== 0) {
9190
} else {
9291
// 2. Create the temporary worker script
9392
const workerScriptPath = join(tmp, 'worker-test.js');
94-
const safeLibEsmPath = libEsm.replace(/\\/g, '\\\\'); // For Windows compatibility
93+
const safeLibPath = lib.replace(/\\/g, '\\\\'); // For Windows compatibility
9594

9695
const workerScriptContent = `
97-
import { WorkOS } from '${safeLibEsmPath}/index.js';
96+
import { WorkOS } from '${safeLibPath}/index.worker.js';
9897
9998
if (WorkOS && WorkOS.name === 'WorkOS') {
10099
console.log('✅ Worker (miniflare): SDK imported successfully.');

0 commit comments

Comments
 (0)