diff --git a/packages/temporal-bun-sdk/package.json b/packages/temporal-bun-sdk/package.json index 072622adf0..00c81aa235 100644 --- a/packages/temporal-bun-sdk/package.json +++ b/packages/temporal-bun-sdk/package.json @@ -58,10 +58,6 @@ "types": "./dist/src/workflow/index.d.ts", "default": "./dist/src/workflow/index.js" }, - "./workflow/runtime": { - "types": "./dist/src/workflow/runtime/index.d.ts", - "default": "./dist/src/workflow/runtime/index.js" - }, "./worker": { "types": "./dist/src/worker.d.ts", "default": "./dist/src/worker.js" diff --git a/packages/temporal-bun-sdk/tests/packaging/manifest-packaging.test.ts b/packages/temporal-bun-sdk/tests/packaging/manifest-packaging.test.ts index 12d9df0910..ce161e7a0c 100644 --- a/packages/temporal-bun-sdk/tests/packaging/manifest-packaging.test.ts +++ b/packages/temporal-bun-sdk/tests/packaging/manifest-packaging.test.ts @@ -10,6 +10,7 @@ type TemporalSdkPackageJson = { files?: string[] scripts?: Record keywords?: string[] + exports?: Record } const packageRoot = join(import.meta.dir, '../..') @@ -93,6 +94,18 @@ describe('temporal-bun-sdk packaging manifest', () => { expect(bins['temporal-bun-worker']).toBe('./dist/src/bin/start-worker.js') }) + test('exports only subpaths backed by source modules', async () => { + const packageJson = await loadPackageJson() + + for (const [subpath, target] of Object.entries(packageJson.exports ?? {})) { + const defaultTarget = typeof target === 'string' ? target : target.default + if (!defaultTarget?.startsWith('./dist/src/') || !defaultTarget.endsWith('.js')) continue + + const sourcePath = join(packageRoot, defaultTarget.replace('./dist/', '').replace(/\.js$/, '.ts')) + expect(existsSync(sourcePath), `${subpath} -> ${defaultTarget}`).toBeTrue() + } + }) + test('exposes adoption metadata for npm and agent discovery', async () => { const packageJson = await loadPackageJson() const keywords = packageJson.keywords ?? []