planrails 0.1.1 → 0.1.2
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 +5 -0
- package/package.json +4 -2
- package/src/init.mjs +7 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.2 — 2026-09-12
|
|
4
|
+
|
|
5
|
+
- `npx planrails update` now also rewrites the plans block in CLAUDE.md from the plans on disk, so a marker or wording written by an older version is replaced on upgrade. `test/claude-md.test.mjs`.
|
|
6
|
+
- Release checks around `npm publish` (`scripts/release-check.mjs`, wired as `prepublishOnly` and `postpublish`): before uploading, refuse a version the registry already has, a missing CHANGELOG entry, a dirty tree or an unpushed HEAD; after uploading, wait until the registry serves the version. Why: a web-authenticated publish is staged and finalizes about a minute later; in that window a second publish fails with E409 and an install with ETARGET, which is how 0.1.1's release went. CONTRIBUTING.md § Release. `test/release-check.test.mjs`.
|
|
7
|
+
|
|
3
8
|
## 0.1.1 — 2026-09-12
|
|
4
9
|
|
|
5
10
|
Fixed, found while moving a real project from a vendored copy to the package:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "planrails",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Plans that survive compaction, for Claude Code: gates that prove a task done, conditions answered before it closes, briefs and rules injected by hooks, one fresh session per task.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -22,7 +22,9 @@
|
|
|
22
22
|
"selftest": "node bin/planrails.mjs selftest && node src/hooks/selftest.mjs",
|
|
23
23
|
"acceptance": "node scripts/acceptance.mjs",
|
|
24
24
|
"trial": "node scripts/trial/run.mjs",
|
|
25
|
-
"prepack": "npm test"
|
|
25
|
+
"prepack": "npm test",
|
|
26
|
+
"prepublishOnly": "node scripts/release-check.mjs before",
|
|
27
|
+
"postpublish": "node scripts/release-check.mjs after"
|
|
26
28
|
},
|
|
27
29
|
"dependencies": {
|
|
28
30
|
"zod": "^4.4.3"
|
package/src/init.mjs
CHANGED
|
@@ -130,7 +130,7 @@ export async function init({ dir = null, force = false, noInstall = false, withN
|
|
|
130
130
|
return problems ? 1 : 0;
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
/** Refresh the guide, the skill
|
|
133
|
+
/** Refresh the guide, the skill, the hook entries and the CLAUDE.md plans block to this version. Plans are never touched. */
|
|
134
134
|
export async function update({ dir = null, log = console.log } = {}) {
|
|
135
135
|
if (dir) process.env.PLAN_PROJECT_ROOT = resolve(dir);
|
|
136
136
|
const root = projectRoot();
|
|
@@ -138,6 +138,12 @@ export async function update({ dir = null, log = console.log } = {}) {
|
|
|
138
138
|
const guideDest = join(root, "docs", "PLANNING_GUIDE.md");
|
|
139
139
|
if (!existsSync(guideDest) || readFileSync(guideDest, "utf8") !== readFileSync(guideSrc, "utf8")) { mkdirSync(join(root, "docs"), { recursive: true }); copyFileSync(guideSrc, guideDest); log("refreshed docs/PLANNING_GUIDE.md"); }
|
|
140
140
|
else log("docs/PLANNING_GUIDE.md is current");
|
|
141
|
+
// The plans block, rewritten from the plans on disk: a marker or wording written by an older version is replaced.
|
|
142
|
+
try {
|
|
143
|
+
const { activePlanIds, loadPlanCheap } = await import("./plan/lib/store.mjs");
|
|
144
|
+
const active = activePlanIds().map((id) => ({ id, title: loadPlanCheap(id).state?.title || id }));
|
|
145
|
+
if (existsSync(claudeMdPath())) log(writeBlock(claudeMdPath(), active) ? "refreshed the plans block in CLAUDE.md" : "the plans block in CLAUDE.md is current");
|
|
146
|
+
} catch (e) { log(`could not refresh the plans block in CLAUDE.md: ${e.message}`); }
|
|
141
147
|
const { install, status } = await import("./hooks/install.mjs");
|
|
142
148
|
install({});
|
|
143
149
|
const { problems } = status({ print: false });
|