Remove build on postinstall (#11244)

- Errors in the node build script will no longer cause a false perception
that dependencies cannot be installed.
- Simplifies 1cea3f39cb
This commit is contained in:
Slayer95 2025-07-14 15:34:46 -05:00 committed by GitHub
parent 0b6c1dbeec
commit 7d8f01f849
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 4 deletions

2
build
View File

@ -48,7 +48,5 @@ try {
// for some reason, esbuild won't be requirable until a tick has passed
// see https://stackoverflow.com/questions/53270058/node-cant-find-certain-modules-after-synchronous-install
setImmediate(() => {
// npm package, don't rebuild
if (process.argv[2] === 'postinstall' && fs.existsSync('dist')) return;
require('./tools/build-utils').transpile(force, decl);
});

View File

@ -46,8 +46,7 @@
"test": "mocha",
"posttest": "npm run tsc",
"full-test": "eslint --max-warnings 0 && npm run tsc && mocha --timeout 8000 --forbid-only -g \".*\" && npm run test-npm",
"full-test-ci": "eslint --max-warnings 0 && tsc && (([ \"$SKIPSIMTESTS\" = true ] && mocha --timeout 8000 --forbid-only -g \".*\" --exclude \"test/{sim,random-battles}/**\") || mocha --timeout 8000 --forbid-only -g \".*\") && npm run test-npm",
"postinstall": "npm run build postinstall"
"full-test-ci": "eslint --max-warnings 0 && tsc && (([ \"$SKIPSIMTESTS\" = true ] && mocha --timeout 8000 --forbid-only -g \".*\" --exclude \"test/{sim,random-battles}/**\") || mocha --timeout 8000 --forbid-only -g \".*\") && npm run test-npm"
},
"bin": "./pokemon-showdown",
"homepage": "http://pokemonshowdown.com",