ReviewOS

also looking at this

craft-native/craft

fix(release): build and verify all npm package artifacts

#289
Merged glennmichael123 wants to merge codex/npm-release-artifacts into main
11 files +290 -3
packages/android/build.tsmodified+11-1
Changes to packages/android/build.ts
@@ -2,7 +2,11 @@
22 * Build script for @craft-native/android
33 */
44
5await Bun.build({
5import { rm } from 'node:fs/promises'
6
7await rm('./dist', { recursive: true, force: true })
8
9const result = await Bun.build({
610 entrypoints: ['./src/index.ts'],
711 outdir: './dist',
812 target: 'bun',
@@ -11,4 +15,10 @@ await Bun.build({
1115 sourcemap: 'external',
1216})
1317
18if (!result.success)
19 throw new AggregateError(result.logs, 'Android builder compilation failed')
20
21// Use the locked compiler, as the SDK build does, rather than Pantry's PATH tsc.
22await Bun.$`bun ../typescript/scripts/tsc.ts src/index.ts --declaration --emitDeclarationOnly --module esnext --target esnext --moduleResolution bundler --types bun --skipLibCheck --ignoreConfig --outDir dist`
23
1424console.log('✅ Build complete')