ReviewOS

also looking at this

craft-native/craft

fix(dev): validate the pinned Zig toolchain before builds

#299
Merged glennmichael123 wants to merge codex/pinned-zig-toolchain into main
5 files +137 -14
package.jsonmodified+8-8
Changes to package.json
@@ -14,8 +14,8 @@
1414 ],
1515 "scripts": {
1616 "build": "bun run build:core && bun run build:sdk",
17 "build:core": "command -v zig >/dev/null 2>&1 || eval \"$(pantry env | sed -n '/^export /,$p')\"; cd packages/zig && zig build -Doptimize=ReleaseSafe -Dversion=$(bun -e \"console.log(require('../../package.json').version)\")",
18 "build:debug": "command -v zig >/dev/null 2>&1 || eval \"$(pantry env | sed -n '/^export /,$p')\"; cd packages/zig && zig build",
17 "build:core": "bun scripts/zig.ts --core --versioned build -Doptimize=ReleaseSafe",
18 "build:debug": "bun scripts/zig.ts --core build",
1919 "build:sdk": "cd packages/typescript && bun run build",
2020 "build:ios": "cd packages/ios && bun run build",
2121 "build:android": "cd packages/android && bun run build",
@@ -35,14 +35,14 @@
3535 "verify:create": "bun scripts/verify-create-craft.ts",
3636 "verify:cimports": "bun scripts/audit-cimports.ts",
3737 "verify:docs": "bun scripts/verify-doc-links.ts",
38 "test": "command -v zig >/dev/null 2>&1 || eval \"$(pantry env | sed -n '/^export /,$p')\"; cd packages/zig && zig build test",
38 "test": "bun scripts/zig.ts --core build test",
3939 "test:sdk": "cd packages/typescript && bun test",
4040 "test:native-lifecycle": "bun scripts/native-lifecycle.ts",
4141 "test:mobile-e2e:ios": "bun scripts/mobile-e2e.ts --platform ios --ios-runtime packages/zig/zig-out/lib",
4242 "test:mobile-e2e:android": "bun scripts/mobile-e2e.ts --platform android --android-runtime packages/zig/zig-out/android",
4343 "typecheck": "cd packages/typescript && bun run typecheck && cd ../create-craft && bun run typecheck && cd ../ts-maps && bun run typecheck",
44 "run": "command -v zig >/dev/null 2>&1 || eval \"$(pantry env | sed -n '/^export /,$p')\"; cd packages/zig && zig build run",
45 "run:demo": "command -v zig >/dev/null 2>&1 || eval \"$(pantry env | sed -n '/^export /,$p')\"; cd packages/zig && zig build run-demo",
44 "run": "bun scripts/zig.ts --core build run",
45 "run:demo": "bun scripts/zig.ts --core build run-demo",
4646 "create": "cd packages/create-craft && bun bin/cli.ts",
4747 "clean": "rm -rf packages/zig/zig-cache packages/zig/zig-out && bun run clean:packages",
4848 "clean:packages": "rm -rf packages/*/dist packages/*/node_modules",
@@ -50,10 +50,10 @@
5050 "lint:fix": "bun x --bun pickier . --fix",
5151 "format": "bun x --bun pickier . --format",
5252 "format:fix": "bun x --bun pickier . --format --write",
53 "fmt": "command -v zig >/dev/null 2>&1 || eval \"$(pantry env | sed -n '/^export /,$p')\"; cd packages/zig && zig fmt src/ build.zig",
54 "fmt:check": "command -v zig >/dev/null 2>&1 || eval \"$(pantry env | sed -n '/^export /,$p')\"; cd packages/zig && zig fmt --check src/ build.zig",
53 "fmt": "bun scripts/zig.ts --core fmt src/ build.zig",
54 "fmt:check": "bun scripts/zig.ts --core fmt --check src/ build.zig",
5555 "pantry:env": "pantry env",
56 "zig": "command -v zig >/dev/null 2>&1 || eval \"$(pantry env | sed -n '/^export /,$p')\"; zig",
56 "zig": "bun scripts/zig.ts",
5757 "dev": "cd packages/typescript && bun run dev",
5858 "changelog": "bun x logsmith --verbose",
5959 "changelog:generate": "bun x logsmith --output CHANGELOG.md",