also looking at this
fix(release): build and verify all npm package artifacts
#289
11 files
+290
-3
| @@ -1,8 +1,13 @@ | ||
| 1 | import { rm } from 'node:fs/promises' | |
| 1 | 2 | import { $ } from 'bun' |
| 2 | 3 | |
| 4 | await rm('./dist', { recursive: true, force: true }) | |
| 5 | ||
| 3 | 6 | // Build TypeScript |
| 4 | 7 | await $`bun build src/index.ts --outdir dist --target bun` |
| 5 | 8 | await $`bun build src/cli.ts --outdir dist --target bun` |
| 9 | // The standalone package advertises this declaration independently of the SDK. | |
| 10 | await $`bun ../typescript/scripts/tsc.ts src/index.ts --declaration --emitDeclarationOnly --module esnext --target esnext --moduleResolution bundler --types bun --skipLibCheck --ignoreConfig --outDir dist` | |
| 6 | 11 | |
| 7 | 12 | // Make CLI executable |
| 8 | 13 | await $`chmod +x dist/cli.js` |