@rness/cli 0.8.0 → 0.8.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/README.md
CHANGED
|
@@ -138,7 +138,7 @@ dependency does this: `util.styleText`, and a banner kept as a constant.
|
|
|
138
138
|
### Upgrade
|
|
139
139
|
|
|
140
140
|
rness upgrade # the latest release; `rness upgrade 0.5.0` for another
|
|
141
|
-
npx @rness/cli@latest upgrade # your global rness is
|
|
141
|
+
npx @rness/cli@latest upgrade # your global rness is below 0.8.0, or the pin is below 0.5.0
|
|
142
142
|
pnpm rness upgrade # inside .rness: the pinned copy merges its own scaffold
|
|
143
143
|
|
|
144
144
|
The version is written in one place, `.rness/package.json`. `upgrade` pins it
|
|
@@ -191,9 +191,10 @@ now names; `rness validate` warns while it is behind.
|
|
|
191
191
|
drops the scaffold commit, and the next upgrade falls back to an older base.
|
|
192
192
|
|
|
193
193
|
`upgrade` is never delegated to the pinned copy, which is what it replaces
|
|
194
|
-
— so it runs the copy you typed.
|
|
195
|
-
|
|
196
|
-
|
|
194
|
+
— so it runs the copy you typed. From 0.8.0, a global `rness` older than the
|
|
195
|
+
pin merges the scaffold of the copy installed in `.rness`. A global below
|
|
196
|
+
0.8.0 knows no scaffold: it answers "already at" and merges nothing — use the
|
|
197
|
+
`npx` form, or the pinned copy from inside `.rness`. A workspace pinned below 0.5.0, whose copy has no such
|
|
197
198
|
command, starts with the `npx` form.
|
|
198
199
|
|
|
199
200
|
An upgrade touches `.rness` only: a generated block is current when its hash
|
|
@@ -203,6 +204,16 @@ its content does.
|
|
|
203
204
|
Exit codes: 0 success, 1 failure, 2 usage — or a refusal without a TTY.
|
|
204
205
|
`RNESS_DEBUG=1` adds stack traces; `RNESS_NO_DELEGATE=1` skips the delegation.
|
|
205
206
|
|
|
207
|
+
## 0.8.1 — adoption without placeholders
|
|
208
|
+
|
|
209
|
+
- Adopting the scaffold no longer adds a `.gitkeep` to a directory that
|
|
210
|
+
already holds files (`specs/`, `plans/` of a workspace older than
|
|
211
|
+
`create`).
|
|
212
|
+
- In a terminal, `upgrade` says "Merging the @rness/cli 0.8.0 scaffold"
|
|
213
|
+
instead of "the @rness/cli 0.8.0 scaffold merging".
|
|
214
|
+
- A test now pins what 0.8.0 already did: a global `rness` older than the pin
|
|
215
|
+
merges the scaffold of the copy installed in `.rness`.
|
|
216
|
+
|
|
206
217
|
## 0.8.0 — upgrade merges the scaffold
|
|
207
218
|
|
|
208
219
|
- `rness upgrade` merges the target version's scaffold into `.rness` with
|
package/dist/bin/rness.js
CHANGED
|
@@ -1390,7 +1390,7 @@ function reportError(e) {
|
|
|
1390
1390
|
}
|
|
1391
1391
|
|
|
1392
1392
|
// src/version.ts
|
|
1393
|
-
var VERSION = "0.8.
|
|
1393
|
+
var VERSION = "0.8.1";
|
|
1394
1394
|
|
|
1395
1395
|
// src/core/block.ts
|
|
1396
1396
|
import { createHash } from "crypto";
|
|
@@ -3291,6 +3291,24 @@ async function isRepository2(rnessDir) {
|
|
|
3291
3291
|
const real = (p) => realpath2(p).catch(() => resolve3(p));
|
|
3292
3292
|
return await real(r.stdout.trim()) === await real(rnessDir);
|
|
3293
3293
|
}
|
|
3294
|
+
async function withoutRedundantKeeps(rnessDir, files) {
|
|
3295
|
+
const kept = [];
|
|
3296
|
+
for (const file of files) {
|
|
3297
|
+
if (file.path.endsWith("/.gitkeep")) {
|
|
3298
|
+
const dir = file.path.slice(0, -"/.gitkeep".length);
|
|
3299
|
+
const listed = await run(rnessDir, [
|
|
3300
|
+
"ls-tree",
|
|
3301
|
+
"--name-only",
|
|
3302
|
+
"HEAD",
|
|
3303
|
+
"--",
|
|
3304
|
+
`${dir}/`
|
|
3305
|
+
]);
|
|
3306
|
+
if (listed.code === 0 && listed.stdout.trim() !== "") continue;
|
|
3307
|
+
}
|
|
3308
|
+
kept.push(file);
|
|
3309
|
+
}
|
|
3310
|
+
return kept;
|
|
3311
|
+
}
|
|
3294
3312
|
|
|
3295
3313
|
// src/core/new-workspace.ts
|
|
3296
3314
|
async function isEmptyDir(dir) {
|
|
@@ -4341,7 +4359,11 @@ async function upgradeCommand(version, opts, terminal = defaultTerminal, deps =
|
|
|
4341
4359
|
}
|
|
4342
4360
|
const pm = await workspacePackageManager(ws.rnessDir);
|
|
4343
4361
|
if (pin.spec === target && installed === target)
|
|
4344
|
-
ui.line(
|
|
4362
|
+
ui.line(
|
|
4363
|
+
"scaffold",
|
|
4364
|
+
`@rness/cli ${target} \u2014 merging it into ${label}`,
|
|
4365
|
+
`Merging the @rness/cli ${target} scaffold into ${label}`
|
|
4366
|
+
);
|
|
4345
4367
|
else if (pin.spec === target)
|
|
4346
4368
|
ui.line(
|
|
4347
4369
|
"install",
|
|
@@ -4378,13 +4400,19 @@ async function upgradeCommand(version, opts, terminal = defaultTerminal, deps =
|
|
|
4378
4400
|
if (base === null)
|
|
4379
4401
|
ui.line(
|
|
4380
4402
|
"adopting",
|
|
4381
|
-
`the @rness/cli ${target} scaffold (no scaffold commit in ${label} yet)
|
|
4403
|
+
`the @rness/cli ${target} scaffold (no scaffold commit in ${label} yet)`,
|
|
4404
|
+
`Adopting the @rness/cli ${target} scaffold \u2014 ${label} has no scaffold commit yet`
|
|
4405
|
+
);
|
|
4406
|
+
else
|
|
4407
|
+
ui.line(
|
|
4408
|
+
"merging",
|
|
4409
|
+
`the @rness/cli ${target} scaffold`,
|
|
4410
|
+
`Merging the @rness/cli ${target} scaffold`
|
|
4382
4411
|
);
|
|
4383
|
-
else ui.line("merging", `the @rness/cli ${target} scaffold`);
|
|
4384
4412
|
const commit = await buildScaffoldCommit(
|
|
4385
4413
|
ws.rnessDir,
|
|
4386
4414
|
base?.commit ?? null,
|
|
4387
|
-
files,
|
|
4415
|
+
base === null ? await withoutRedundantKeeps(ws.rnessDir, files) : files,
|
|
4388
4416
|
target
|
|
4389
4417
|
);
|
|
4390
4418
|
const result = await mergeScaffold(
|
|
@@ -4946,4 +4974,4 @@ export {
|
|
|
4946
4974
|
OWN_COMMANDS,
|
|
4947
4975
|
catchUp
|
|
4948
4976
|
};
|
|
4949
|
-
//# sourceMappingURL=chunk-
|
|
4977
|
+
//# sourceMappingURL=chunk-ONLF4VFA.js.map
|