Skip to content

Commit 82ac67d

Browse files
committed
chore: patch script package to use cross-spawn
Link to PR with this commit: testdouble/scripty#100
1 parent 1e62256 commit 82ac67d

File tree

5 files changed

+54
-4
lines changed

5 files changed

+54
-4
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,9 @@ jobs:
267267
exit 1
268268
fi
269269
270-
sleep 780; # Wait for 13 minutes before checking the status
270+
SLEEP_BASE=$((60*13))
271+
echo "Sleeping for $((SLEEP_BASE/60)) minutes before checking the status"
272+
sleep $SLEEP_BASE # Wait before checking the status
271273
272274
while true; do
273275
status=$(gh run view "$run_id" --json status --jq '.status')

crates/stylex-rs-compiler/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
"format:toml:check": "taplo format --check",
9595
"lint": "oxlint .",
9696
"lint:check": " cargo clippy --all-targets --all-features -- -D warnings",
97-
"postbuild:disable": "pnpm run check:artifacts",
97+
"postbuild": "pnpm run check:artifacts",
9898
"prepublishOnly": "napi prepublish --skip-gh-release",
9999
"test": "ava",
100100
"version": "napi version"

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@
6060
"lexical-core@<1.0.0": "^1.0.0",
6161
"lexical@<=6.1.1": "^6.1.1",
6262
"@farmfe/runtime@<=0.12.8": "^0.12.10"
63+
},
64+
"patchedDependencies": {
65+
6366
}
6467
}
6568
}

patches/[email protected]

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
diff --git a/lib/run/spawn-script.js b/lib/run/spawn-script.js
2+
index b05fcb8dea26b0612e3db90506f0df7460e9cf33..3222ec591ea96bb7c7ed5536c6451fb0e79a934f 100644
3+
--- a/lib/run/spawn-script.js
4+
+++ b/lib/run/spawn-script.js
5+
@@ -1,15 +1,19 @@
6+
var _ = require('lodash')
7+
var printScript = require('./print-script')
8+
-var spawn = require('child_process').spawn
9+
+var spawn = require('cross-spawn').spawn
10+
11+
module.exports = function (scriptFile, options, cb) {
12+
printScript(scriptFile)
13+
14+
const child = spawn(scriptFile, options.userArgs, options.spawn)
15+
16+
- child.on('close', code => cb(code !== 0
17+
- ? new Error(`script failed: '${scriptFile}'\nexit status: ${code}`)
18+
- : null, code)
19+
+ child.on('close', (code) =>
20+
+ cb(
21+
+ code !== 0
22+
+ ? new Error(`script failed: '${scriptFile}'\nexit status: ${code}`)
23+
+ : null,
24+
+ code
25+
+ )
26+
)
27+
28+
_.invoke(options, 'spawn.tap', child)
29+
diff --git a/package.json b/package.json
30+
index fddbdf9ab092d3d2f898485bb74627a181878e4b..6d960822724e1526f10cf182ad9dd3d954dad649 100644
31+
--- a/package.json
32+
+++ b/package.json
33+
@@ -34,6 +34,7 @@
34+
"dependencies": {
35+
"async": "^2.6.4",
36+
"glob": "^7.0.3",
37+
+ "cross-spawn": "^7.0.6",
38+
"lodash": "^4.17.11",
39+
"resolve-pkg": "^1.0.0"
40+
},

pnpm-lock.yaml

Lines changed: 7 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)