ReviewOS

also looking at this

craft-native/craft

fix(deps): finish the TypeScript 7 move across the workspace

#44
Merged glennmichael123 wants to merge fix/typescript-7-workspace into main
5 files +12 -4
packages/create-craft/tsconfig.jsonmodified+5-1
Changes to packages/create-craft/tsconfig.json
@@ -2,7 +2,11 @@
22 "extends": "../../tsconfig.json",
33 "compilerOptions": {
44 "noEmit": true,
5 "isolatedDeclarations": true
5 "isolatedDeclarations": true,
6 "types": [
7 "node",
8 "bun"
9 ]
610 },
711 "include": [
812 "bin"
packages/ios/src/index.tsmodified+3-1
Changes to packages/ios/src/index.ts
@@ -209,7 +209,9 @@ export function renderOrientations(config: CraftConfig): string {
209209 'landscape-right': 'UIInterfaceOrientationLandscapeRight',
210210 'portrait-upside-down': 'UIInterfaceOrientationPortraitUpsideDown',
211211 }
212 const values = config.orientations?.length ? config.orientations : ['portrait']
212 // Annotated, not inferred: the `['portrait']` fallback widens to string[]
213 // on its own, which then cannot index `names`.
214 const values: NonNullable<CraftConfig['orientations']> = config.orientations?.length ? config.orientations : ['portrait']
213215 return values.map(value => ` <string>${names[value]}</string>`).join('\n')
214216}
215217
packages/ts-maps/tsconfig.build.jsonmodified+1-0
Changes to packages/ts-maps/tsconfig.build.json
@@ -5,6 +5,7 @@
55 "declaration": true,
66 "emitDeclarationOnly": true,
77 "declarationMap": true,
8 "rootDir": "..",
89 "outDir": "dist"
910 },
1011 "include": [
packages/typescript/build.tsmodified+2-2
Changes to packages/typescript/build.ts
@@ -25,8 +25,8 @@ 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 --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 --outDir ${resolve(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')}`
3030await cp(resolve(root, '../ios/templates'), resolve(dist, 'ios/templates'), { recursive: true })
3131await cp(resolve(root, '../android/templates'), resolve(dist, 'android/templates'), { recursive: true })
3232
packages/typescript/tsconfig.build.jsonmodified+1-0
Changes to packages/typescript/tsconfig.build.json
@@ -5,6 +5,7 @@
55 "emitDeclarationOnly": true,
66 "declaration": true,
77 "declarationMap": false,
8 "rootDir": "src",
89 "outDir": "dist",
910 "isolatedDeclarations": false
1011 },