projecta-rrr 1.21.4 → 1.21.5
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/CHANGELOG.md +29 -0
- package/bin/install.js +34 -0
- package/commands/rrr/update.md +27 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,35 @@ All notable changes to RRR will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
6
6
|
|
|
7
|
+
## [1.21.5] - 2026-04-18
|
|
8
|
+
|
|
9
|
+
**Stale-global-CLI detection + `/rrr:update` global-binary refresh.**
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- **`/rrr:update` now refreshes the global `projecta-rrr` CLI binary.**
|
|
14
|
+
Previously, update ran `npx --yes projecta-rrr@latest --global` which
|
|
15
|
+
updates RRR runtime files in `~/.claude/rrr/` but does NOT touch the
|
|
16
|
+
`projecta-rrr` binary installed via `npm install -g`. Result: RRR
|
|
17
|
+
slash-commands worked at the latest version, but subcommands like
|
|
18
|
+
`projecta-rrr hosted-setup` (added in 1.21.4) failed because the
|
|
19
|
+
binary on PATH was still from an older version. The update workflow
|
|
20
|
+
now additionally runs `npm install -g projecta-rrr@latest` with
|
|
21
|
+
best-effort EACCES tolerance.
|
|
22
|
+
|
|
23
|
+
- **`install.js` self-detects stale global CLI** at end of install.
|
|
24
|
+
If `command -v projecta-rrr` resolves to a package.json version older
|
|
25
|
+
than the currently-running install, prints a clear warning with the
|
|
26
|
+
two fixes: `npm install -g projecta-rrr@latest` OR use
|
|
27
|
+
`npx projecta-rrr@latest <subcommand>`.
|
|
28
|
+
|
|
29
|
+
### Why this matters
|
|
30
|
+
|
|
31
|
+
A user reported: after `/rrr:update` from 1.20.0 to 1.21.4, running
|
|
32
|
+
`projecta-rrr hosted-setup` fell through to the default RRR install
|
|
33
|
+
flow ("Global/Local?" prompt). Cause: the stale v1.19.1 binary on PATH
|
|
34
|
+
didn't know about `hosted-setup`. Fix lands in 1.21.5.
|
|
35
|
+
|
|
7
36
|
## [1.21.4] - 2026-04-18
|
|
8
37
|
|
|
9
38
|
**One-command adoption + slash-command integration.**
|
package/bin/install.js
CHANGED
|
@@ -2497,6 +2497,40 @@ ${optimizationNote}
|
|
|
2497
2497
|
`);
|
|
2498
2498
|
}
|
|
2499
2499
|
} catch { /* never block install on nudge */ }
|
|
2500
|
+
|
|
2501
|
+
// v1.21.5+: detect stale global CLI. When user ran via `npx projecta-rrr@latest`,
|
|
2502
|
+
// the RRR runtime at ~/.claude/rrr/ is up-to-date but an older
|
|
2503
|
+
// `projecta-rrr` on PATH (from a previous `npm install -g`) may still exist.
|
|
2504
|
+
// Surface the mismatch so users know to run `npm install -g projecta-rrr@latest`.
|
|
2505
|
+
try {
|
|
2506
|
+
const pkgVersion = require('../package.json').version;
|
|
2507
|
+
let onPathVersion = null;
|
|
2508
|
+
try {
|
|
2509
|
+
const onPathBin = execSync('command -v projecta-rrr', { stdio: ['pipe', 'pipe', 'ignore'] }).toString().trim();
|
|
2510
|
+
if (onPathBin) {
|
|
2511
|
+
// Read the package.json of whatever bin is on PATH
|
|
2512
|
+
const realPath = fs.realpathSync(onPathBin);
|
|
2513
|
+
// The bin is bin/install.js inside its package; go up to package.json
|
|
2514
|
+
const binDir = path.dirname(realPath);
|
|
2515
|
+
let candidate = path.dirname(binDir); // .../projecta-rrr
|
|
2516
|
+
const pkgJson = path.join(candidate, 'package.json');
|
|
2517
|
+
if (fs.existsSync(pkgJson)) {
|
|
2518
|
+
onPathVersion = require(pkgJson).version;
|
|
2519
|
+
}
|
|
2520
|
+
}
|
|
2521
|
+
} catch { /* no bin on PATH → not stale, no warning needed */ }
|
|
2522
|
+
|
|
2523
|
+
if (onPathVersion && onPathVersion !== pkgVersion) {
|
|
2524
|
+
console.log(` ${orange}━━━ Stale global CLI detected ━━━${reset}
|
|
2525
|
+
${yellow}Your RRR runtime is ${pkgVersion} but the${reset} ${cyan}projecta-rrr${reset} ${yellow}binary on PATH is ${onPathVersion}.${reset}
|
|
2526
|
+
${dim}This means RRR slash-commands are current, but the${reset} ${cyan}projecta-rrr${reset} ${dim}CLI (e.g.,${reset} ${cyan}hosted-setup${reset}${dim}) is stale.${reset}
|
|
2527
|
+
|
|
2528
|
+
${dim}Fix (one of):${reset}
|
|
2529
|
+
${green}npm install -g projecta-rrr@latest${reset}
|
|
2530
|
+
${green}npx projecta-rrr@latest <subcommand>${reset} ${dim}(always latest, slower)${reset}
|
|
2531
|
+
`);
|
|
2532
|
+
}
|
|
2533
|
+
} catch { /* never block install on stale-check */ }
|
|
2500
2534
|
}
|
|
2501
2535
|
|
|
2502
2536
|
/**
|
package/commands/rrr/update.md
CHANGED
|
@@ -124,6 +124,33 @@ npx --yes projecta-rrr@latest --global
|
|
|
124
124
|
2. Should show "Wrote INSTALL_INFO.json"
|
|
125
125
|
3. Should show "Quarantined X legacy/duplicate root(s)" if any were found
|
|
126
126
|
|
|
127
|
+
**Then refresh the global CLI binary** (v1.21.5+ fix). The `npx` line above
|
|
128
|
+
updates RRR runtime files in `~/.claude/rrr/` but does NOT update the
|
|
129
|
+
`projecta-rrr` binary on the user's PATH (via `~/.npm-global/bin/` or
|
|
130
|
+
equivalent). Run this additional step — it's best-effort and tolerates
|
|
131
|
+
EACCES silently:
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
# Best-effort global CLI refresh — does NOT block update if it fails.
|
|
135
|
+
# On macOS with a prefix-configured npm (~/.npm-global or nvm), this works
|
|
136
|
+
# without sudo. On a raw system install it may hit EACCES — that's fine,
|
|
137
|
+
# user keeps working via npx for CLI invocations.
|
|
138
|
+
npm install -g projecta-rrr@latest 2>&1 | tail -5 || echo "(global CLI refresh skipped — user's npm prefix not writable; use 'npx projecta-rrr' or fix with: npm config set prefix ~/.npm-global)"
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
**After this step, verify the CLI matches:**
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
projecta-rrr --version 2>&1 | head -1 || which projecta-rrr
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
If the version shown is older than what just installed, print a warning:
|
|
148
|
+
```
|
|
149
|
+
⚠ CLI binary stale (shows vX.Y.Z, expected vA.B.C).
|
|
150
|
+
Fix: `npm install -g projecta-rrr@latest` (may need sudo).
|
|
151
|
+
Workaround: use `npx projecta-rrr <subcommand>` until fixed.
|
|
152
|
+
```
|
|
153
|
+
|
|
127
154
|
**If install fails:**
|
|
128
155
|
Show error and STOP. Do not proceed.
|
|
129
156
|
</step>
|
package/package.json
CHANGED