hippocamp 0.2.0 → 0.2.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/package.json
CHANGED
|
@@ -116,7 +116,6 @@ function buildClaudeManagedBlock() {
|
|
|
116
116
|
"- Do not duplicate commits, PRs, issues, reviews, or CI results in memory; store references plus the missing rationale, preference, assumption, or follow-up context.",
|
|
117
117
|
"- If a project-memory write does not sync automatically, call `sync_memory` before finishing the task.",
|
|
118
118
|
"- If the user asks to upgrade Hippocamp for Claude Code, run `npx hippocamp@latest upgrade-claude`; from a source checkout, run `git pull --ff-only`, `npm install`, then `npm run upgrade:claude`.",
|
|
119
|
-
"- Before writing, reviewing, or refactoring code, read and follow `/Users/guillaumegay/.agents/skills/karpathy-guidelines/SKILL.md` unless the user explicitly asks to skip it.",
|
|
120
119
|
CLAUDE_MANAGED_END,
|
|
121
120
|
"",
|
|
122
121
|
].join("\n");
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const assert = require("node:assert/strict");
|
|
2
|
+
const { execFileSync } = require("node:child_process");
|
|
3
|
+
const fs = require("node:fs");
|
|
4
|
+
const path = require("node:path");
|
|
5
|
+
const test = require("node:test");
|
|
6
|
+
|
|
7
|
+
test("published files contain no local home directory paths", () => {
|
|
8
|
+
const root = path.join(__dirname, "..");
|
|
9
|
+
// npm is npm.cmd on Windows, which Node only runs through a shell.
|
|
10
|
+
const output = execFileSync("npm", ["pack", "--dry-run", "--json"], {
|
|
11
|
+
cwd: root,
|
|
12
|
+
encoding: "utf8",
|
|
13
|
+
shell: process.platform === "win32",
|
|
14
|
+
});
|
|
15
|
+
const [pack] = JSON.parse(output);
|
|
16
|
+
const textFiles = pack.files.map((file) => file.path).filter((file) => !file.endsWith(".png"));
|
|
17
|
+
const matches = [];
|
|
18
|
+
|
|
19
|
+
for (const file of textFiles) {
|
|
20
|
+
const content = fs.readFileSync(path.join(root, file), "utf8");
|
|
21
|
+
|
|
22
|
+
for (const [index, line] of content.split("\n").entries()) {
|
|
23
|
+
if (/\/Users\/[A-Za-z0-9._-]+|\/home\/[A-Za-z0-9._-]+/.test(line)) {
|
|
24
|
+
matches.push(`${file}:${index + 1}`);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
assert.deepEqual(matches, []);
|
|
30
|
+
});
|