forge-cc 0.1.14 → 0.1.16
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/dist/setup/test-scaffold.js +1 -1
- package/package.json +1 -1
- package/skills/forge-setup.md +17 -19
|
@@ -59,7 +59,7 @@ function buildPackageJsonUpdates(runner, report) {
|
|
|
59
59
|
const devDependencies = {};
|
|
60
60
|
if (runner === "vitest") {
|
|
61
61
|
scripts["test"] = "vitest run";
|
|
62
|
-
devDependencies["vitest"] = "^
|
|
62
|
+
devDependencies["vitest"] = "^4.0.0";
|
|
63
63
|
}
|
|
64
64
|
else {
|
|
65
65
|
scripts["test"] = "jest";
|
package/package.json
CHANGED
package/skills/forge-setup.md
CHANGED
|
@@ -215,36 +215,34 @@ If `forge doctor` shows all checks passing, print: "Environment checks passed."
|
|
|
215
215
|
|
|
216
216
|
### Step 8 — Install Hooks
|
|
217
217
|
|
|
218
|
-
|
|
218
|
+
The version-check hook **must always be installed**. Read the existing settings file (if any), merge the hook in, and write it back.
|
|
219
219
|
|
|
220
220
|
```bash
|
|
221
|
-
|
|
221
|
+
cat .claude/settings.local.json 2>/dev/null || echo "{}"
|
|
222
222
|
```
|
|
223
223
|
|
|
224
|
-
|
|
224
|
+
The target hook entry is:
|
|
225
225
|
|
|
226
226
|
```json
|
|
227
227
|
{
|
|
228
|
-
"
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
"command": "node node_modules/forge-cc/hooks/version-check.js"
|
|
236
|
-
}
|
|
237
|
-
]
|
|
238
|
-
}
|
|
239
|
-
]
|
|
240
|
-
}
|
|
228
|
+
"matcher": "Task",
|
|
229
|
+
"hooks": [
|
|
230
|
+
{
|
|
231
|
+
"type": "command",
|
|
232
|
+
"command": "node node_modules/forge-cc/hooks/version-check.js"
|
|
233
|
+
}
|
|
234
|
+
]
|
|
241
235
|
}
|
|
242
236
|
```
|
|
243
237
|
|
|
244
|
-
|
|
238
|
+
**Merge logic:**
|
|
239
|
+
1. Parse the existing file (or start with `{}`).
|
|
240
|
+
2. Ensure `hooks.PreToolUse` exists as an array.
|
|
241
|
+
3. Check if any entry in `hooks.PreToolUse` already has a hook with `command` containing `version-check.js`. If so, skip — already installed.
|
|
242
|
+
4. Otherwise, append the hook entry to `hooks.PreToolUse`.
|
|
243
|
+
5. Write the merged result back to `.claude/settings.local.json`, preserving all existing settings.
|
|
245
244
|
|
|
246
|
-
|
|
247
|
-
> `"command": "node node_modules/forge-cc/hooks/version-check.js"`
|
|
245
|
+
Create the `.claude/` directory if it doesn't exist (`mkdir -p .claude`).
|
|
248
246
|
|
|
249
247
|
### Step 9 — Summary
|
|
250
248
|
|