ReviewOS

also looking at this

craft-native/craft

fix(ci): build the SDK types with the repo's own tsc (and pin the pantry action)

#104
Merged glennmichael123 wants to merge fix/pin-pantry-action into main
29 files +85 -56
packages/typescript/build.tsmodified+3-2
Changes to packages/typescript/build.ts
@@ -25,8 +25,9 @@ async function build(entrypoints: string[], outdir: string): Promise<void> {
2525// their implementation and templates instead of importing unpublished peers.
2626await build(['../ios/src/index.ts'], 'dist/ios/src')
2727await build(['../android/src/index.ts'], 'dist/android/src')
28await Bun.$`bunx tsc ${resolve(root, '../ios/src/index.ts')} --declaration --emitDeclarationOnly --module esnext --target esnext --moduleResolution bundler --types bun --skipLibCheck --ignoreConfig --outDir ${resolve(dist, 'ios/src')}`
29await Bun.$`bunx tsc ${resolve(root, '../android/src/index.ts')} --declaration --emitDeclarationOnly --module esnext --target esnext --moduleResolution bundler --types bun --skipLibCheck --ignoreConfig --outDir ${resolve(dist, 'android/src')}`
28// scripts/tsc.ts, not `bunx tsc`: PATH is not trustworthy in CI. See that file.
29await Bun.$`bun ${resolve(root, "scripts/tsc.ts")} ${resolve(root, '../ios/src/index.ts')} --declaration --emitDeclarationOnly --module esnext --target esnext --moduleResolution bundler --types bun --skipLibCheck --ignoreConfig --outDir ${resolve(dist, 'ios/src')}`
30await Bun.$`bun ${resolve(root, "scripts/tsc.ts")} ${resolve(root, '../android/src/index.ts')} --declaration --emitDeclarationOnly --module esnext --target esnext --moduleResolution bundler --types bun --skipLibCheck --ignoreConfig --outDir ${resolve(dist, 'android/src')}`
3031await cp(resolve(root, '../ios/templates'), resolve(dist, 'ios/templates'), { recursive: true })
3132await cp(resolve(root, '../android/templates'), resolve(dist, 'android/templates'), { recursive: true })
3233