Skip to content

Commit f261334

Browse files
bugerclaude
andcommitted
fix: apply sandboxjs patch during build instead of postinstall
Run patch-package in prebuild/pretest so the patched code gets bundled by ncc. Remove postinstall script so end users don't need patch-package. Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 7c712d3 commit f261334

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,10 @@
4444
"format": "prettier --write src tests",
4545
"format:check": "prettier --check src tests",
4646
"clean": "",
47-
"prebuild": "npm run clean && node scripts/generate-config-schema.js",
48-
"pretest": "node scripts/generate-config-schema.js && npm run build:cli",
47+
"prebuild": "npm run clean && patch-package && node scripts/generate-config-schema.js",
48+
"pretest": "patch-package && node scripts/generate-config-schema.js && npm run build:cli",
4949
"test:with-build": "npm run build:cli && jest",
5050
"test:yaml": "node dist/index.js test --progress compact",
51-
"postinstall": "[ -f node_modules/.bin/patch-package ] && patch-package || true",
5251
"prepare": "husky",
5352
"pre-commit": "lint-staged",
5453
"deploy:site": "cd site && npx wrangler pages deploy . --project-name=visor-site --commit-dirty=true",

0 commit comments

Comments
 (0)