@fusion.dev/helix-cli 0.30.0 → 0.30.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin.mjs +29 -2
- package/package.json +6 -6
package/bin.mjs
CHANGED
|
@@ -155,6 +155,33 @@ const run = (binary) => {
|
|
|
155
155
|
process.exit(status ?? 70)
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
+
/* **In this repository, cargo is asked first, and asking is cheap.** A binary
|
|
159
|
+
under `target/` is whatever the last build left, so after an edit to a rule,
|
|
160
|
+
or a branch switch, this ran the old rules against the new tree: measured on
|
|
161
|
+
14 Sep 2026, a checkout judged by a prose rule the branch did not have. So
|
|
162
|
+
where there is a crate and a cargo, the build comes first and the debug
|
|
163
|
+
binary it leaves is the one that runs.
|
|
164
|
+
|
|
165
|
+
**`--workspace`, the selection `rs:build` and CI build.** Cargo unifies
|
|
166
|
+
features per selection, so alternating `-p fusion-helix-cli` with `--workspace`
|
|
167
|
+
recompiled on every switch, about a second each, where asking for the same
|
|
168
|
+
selection twice is 0.14s. `HELIX_BIN` still outranks everything, and a checkout
|
|
169
|
+
with no cargo falls through to whatever is already built. */
|
|
170
|
+
if (process.env.HELIX_BIN === undefined && checkout && hasCargo()) {
|
|
171
|
+
const fresh = spawnSync('cargo', ['build', '--workspace', '--quiet'], {
|
|
172
|
+
cwd: WORKSPACE,
|
|
173
|
+
stdio: 'inherit',
|
|
174
|
+
})
|
|
175
|
+
if (fresh.status !== 0) {
|
|
176
|
+
console.error('helix: the build failed, so there is nothing current to run.')
|
|
177
|
+
process.exit(fresh.status ?? 70)
|
|
178
|
+
}
|
|
179
|
+
const current = join(target, 'debug', NAME)
|
|
180
|
+
if (existsSync(current)) {
|
|
181
|
+
run(current)
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
158
185
|
const found = process.env.HELIX_BIN ?? built() ?? packaged()
|
|
159
186
|
if (found && existsSync(found)) {
|
|
160
187
|
run(found)
|
|
@@ -193,8 +220,8 @@ if (!hasCargo()) {
|
|
|
193
220
|
process.exit(69)
|
|
194
221
|
}
|
|
195
222
|
|
|
196
|
-
console.error('helix: no binary yet, building it once (cargo build
|
|
197
|
-
const build = spawnSync('cargo', ['build', '
|
|
223
|
+
console.error('helix: no binary yet, building it once (cargo build --workspace)')
|
|
224
|
+
const build = spawnSync('cargo', ['build', '--workspace'], {
|
|
198
225
|
cwd: WORKSPACE,
|
|
199
226
|
stdio: 'inherit',
|
|
200
227
|
})
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fusion.dev/helix-cli",
|
|
3
3
|
"description": "The Helix command line, for a workspace that reaches it through npm.",
|
|
4
|
-
"version": "0.30.
|
|
4
|
+
"version": "0.30.1",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ross Sheppard <ross.sheppard@fusion.dev>",
|
|
7
7
|
"repository": {
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
"theme"
|
|
30
30
|
],
|
|
31
31
|
"optionalDependencies": {
|
|
32
|
-
"@fusion.dev/helix-cli-darwin-arm64": "0.30.
|
|
33
|
-
"@fusion.dev/helix-cli-darwin-x64": "0.30.
|
|
34
|
-
"@fusion.dev/helix-cli-linux-arm64": "0.30.
|
|
35
|
-
"@fusion.dev/helix-cli-linux-x64": "0.30.
|
|
36
|
-
"@fusion.dev/helix-cli-win32-x64": "0.30.
|
|
32
|
+
"@fusion.dev/helix-cli-darwin-arm64": "0.30.1",
|
|
33
|
+
"@fusion.dev/helix-cli-darwin-x64": "0.30.1",
|
|
34
|
+
"@fusion.dev/helix-cli-linux-arm64": "0.30.1",
|
|
35
|
+
"@fusion.dev/helix-cli-linux-x64": "0.30.1",
|
|
36
|
+
"@fusion.dev/helix-cli-win32-x64": "0.30.1"
|
|
37
37
|
},
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "restricted"
|