memorix 0.9.7 → 0.9.8
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 +6 -0
- package/dist/cli/index.js +7 -4
- package/dist/cli/index.js.map +1 -1
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.9.8] — 2026-02-25
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- **Claude Code hooks installed to wrong file** — Hooks were written to `.github/hooks/memorix.json` but Claude Code reads from `.claude/settings.local.json` (project-level) or `~/.claude/settings.json` (global). Now correctly writes to `.claude/settings.local.json` for project-level installation.
|
|
9
|
+
- **Hooks merge overwrites existing settings** — Shallow spread `{...existing, ...generated}` would overwrite the entire `hooks` key, destroying user's other hook configurations. Now deep-merges the `hooks` object so existing hooks from other tools are preserved.
|
|
10
|
+
|
|
5
11
|
## [0.9.7] — 2026-02-25
|
|
6
12
|
|
|
7
13
|
### Fixed
|
package/dist/cli/index.js
CHANGED
|
@@ -3823,6 +3823,7 @@ ${resolveHookCommand()} hook
|
|
|
3823
3823
|
function getProjectConfigPath(agent, projectRoot) {
|
|
3824
3824
|
switch (agent) {
|
|
3825
3825
|
case "claude":
|
|
3826
|
+
return path6.join(projectRoot, ".claude", "settings.local.json");
|
|
3826
3827
|
case "copilot":
|
|
3827
3828
|
return path6.join(projectRoot, ".github", "hooks", "memorix.json");
|
|
3828
3829
|
case "windsurf":
|
|
@@ -3930,10 +3931,12 @@ async function installHooks(agent, projectRoot, global = false) {
|
|
|
3930
3931
|
existing = JSON.parse(content);
|
|
3931
3932
|
} catch {
|
|
3932
3933
|
}
|
|
3933
|
-
const
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3934
|
+
const gen = generated;
|
|
3935
|
+
const merged = { ...existing };
|
|
3936
|
+
if (gen.hooks && typeof gen.hooks === "object") {
|
|
3937
|
+
const existingHooks = existing.hooks && typeof existing.hooks === "object" ? existing.hooks : {};
|
|
3938
|
+
merged.hooks = { ...existingHooks, ...gen.hooks };
|
|
3939
|
+
}
|
|
3937
3940
|
await fs4.writeFile(configPath, JSON.stringify(merged, null, 2), "utf-8");
|
|
3938
3941
|
}
|
|
3939
3942
|
const events = [];
|