Unthrow publish script
Lauren Tan committed
May 15, 2024 at 07:51 UTC
41142f306e2fed4525708cd348ce720740e028ed
1 file changed
+2
-10
compiler/scripts/publish.js
+2
-10
@@ -10,7 +10,7 @@ const PUBLISHABLE_PACKAGES = [
10
"eslint-plugin-react-compiler",
11
"react-compiler-healthcheck",
12
];
13
-const TIME_TO_RECONSIDER = 10_000;
13
+const TIME_TO_RECONSIDER = 1_000;
14
15
function _spawn(command, args, options, cb) {
16
const child = cp.spawn(command, args, options);
@@ -189,16 +189,8 @@ async function main() {
189
spinner.start(`Publishing ${pkgName} to npm\n`);
190
191
const opts = debug === true ? ["publish", "--dry-run"] : ["publish"];
192
- console.log(`Command that would have run: npm ${opts.join(" ")}`);
193
- throw new Error(
194
- "This error is intentional, please double check scripts/publish.js and remove this error prior to publishing"
195
- );
196
-
192
try {
198
- await spawnHelper("npm", opts, {
199
- cwd: pkgDir,
200
- stdio: "inherit",
201
- });
193
+ await execHelper(`npm ${opts.join(" ")}`, { cwd: pkgDir });
194
console.log("\n");
195
} catch (e) {
196
spinner.fail(e.toString());