Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@
"*.gen.ts*",
"*.d.ts",
"*.exe",
"package.json"
"package.json",
"packages/artifacts.json"
]
}
}
14 changes: 6 additions & 8 deletions cli/common/bsb.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ function acquireBuild(args, options) {
* @param {(code: number) => void} [maybeOnClose]
*/
function delegate(args, maybeOnClose) {
let p;
if ((p = acquireBuild(args))) {
const p = acquireBuild(args);
if (p) {
p.once("error", e => {
console.error(String(e));
releaseBuild();
Expand Down Expand Up @@ -376,12 +376,10 @@ Please pick a different one using the \`-ws [host:]port\` flag from bsb.`);
return;
}
dlog(`Rebuilding since ${reasonsToRebuild}`);
let p;
if (
(p = acquireBuild(rescriptWatchBuildArgs, {
stdio: ["inherit", "inherit", "pipe"],
}))
) {
const p = acquireBuild(rescriptWatchBuildArgs, {
stdio: ["inherit", "inherit", "pipe"],
});
if (p) {
logStartCompiling();
p.on("data", s => {
outputError(s, "ninja: error");
Expand Down
4 changes: 2 additions & 2 deletions cli/rescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ let forwardedSignal = false;
/**
* @param {NodeJS.Signals} signal
*/
const handleSignal = (signal) => {
const handleSignal = signal => {
// Intercept the signal in the parent, forward it to the child, and let the
// child perform its own cleanup. This ensures ordered shutdown in watch mode.
// Guard against double-forwarding since terminals or OSes can deliver
Expand Down Expand Up @@ -85,7 +85,7 @@ child.on("exit", (code, signal) => {
});

// Surface spawn errors (e.g., executable not found) and exit with failure.
child.on("error", (err) => {
child.on("error", err => {
console.error(err?.message ?? String(err));
process.exit(1);
});
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@
"test": "node scripts/test.js -all",
"test-bsb": "node scripts/test.js -bsb",
"test-ocaml": "node scripts/test.js -ounit",
"check": "biome check --changed --no-errors-on-unmatched .",
"check": "biome check --no-errors-on-unmatched .",
"check:all": "biome check .",
"format": "biome check --changed --no-errors-on-unmatched . --fix",
"format": "biome check --no-errors-on-unmatched . --fix",
"coverage": "nyc --timeout=3000 --reporter=html mocha tests/tests/src/*_test.js && open ./coverage/index.html",
"typecheck": "tsc",
"apidocs:generate": "yarn workspace @utils/scripts apidocs:generate"
Expand Down
Loading