mirror of
https://bitbucket.org/siakitem/my-pi.git
synced 2026-10-26 10:45:22 +00:00
chore: Pi 开发依赖跟随最新版并去掉测试里的固定版本号
- pi-hermes-memory / pi-notify / pi-permission-system / pi-subagents 的 @earendil-works/* devDependencies 改为 latest,pi-rtk-optimizer 放开 peer 范围;各子包锁文件刷新到 Pi 1.3.0,测试改为验证当前宿主 API。 - 新增 scripts/update-pi-devdeps.sh,统一刷新根与子包锁文件中的 Pi 版本。 - pi-subagents 适配 Pi 1.3:mention clone 改走 systemPromptOverride、 BOM frontmatter、e2e 读取规范化后的 system 消息与工具列表。 - 根测试不再写死 ssh2 / jiti / better-sqlite3 / context-mode 版本号, 改为精确版本格式与锁文件一致性断言;新增 latest 约束测试。 Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
parent
ba164896d2
commit
b817d66a11
@@ -76,8 +76,8 @@ test("all package extensions load together without global registration conflicts
|
||||
);
|
||||
assert.ok(packageJson.pi.extensions.includes("./pi-ssh/index.ts"), "the bundle must load the locally maintained SSH extension");
|
||||
assert.equal(packageJson.dependencies["pi-ssh"], "file:./pi-ssh");
|
||||
assert.equal(packageJson.dependencies.ssh2, "1.17.0", "the packed bundle must install pi-ssh's runtime transport");
|
||||
assert.equal(packageJson.dependencies.jiti, "2.7.0", "the packed helper must load local TypeScript outside Pi");
|
||||
assert.match(packageJson.dependencies.ssh2 ?? "", /^\d+\.\d+\.\d+$/, "the packed bundle must install pi-ssh's runtime transport at an exact version");
|
||||
assert.match(packageJson.dependencies.jiti ?? "", /^\d+\.\d+\.\d+$/, "the packed helper must load local TypeScript outside Pi at an exact version");
|
||||
assert.ok(packageJson.files.includes("pi-ssh"), "the packed bundle must include the locally maintained SSH source");
|
||||
assert.ok(packageJson.files.includes("configure.sh"), "the packed bundle must include the search/SSH config helper");
|
||||
assert.ok(packageJson.pi.extensions.includes("./pi-ask-user/index.ts"), "the bundle must load pi-ask-user");
|
||||
@@ -210,11 +210,28 @@ test("all package extensions load together without global registration conflicts
|
||||
);
|
||||
assert.equal(packageJson.dependencies["@the-forge-flow/hippo-memory-pi"], undefined);
|
||||
assert.equal(packageJson.dependencies["better-sqlite3"], undefined);
|
||||
assert.equal(packageJson.allowScripts["better-sqlite3@12.11.1"], true);
|
||||
// allowScripts must approve exactly the root lockfile's better-sqlite3
|
||||
// build — and nothing else. pi-hermes-memory's own lockfile carries a
|
||||
// nested major that ships N-API prebuilds and needs no approval entry.
|
||||
const rootLock = JSON.parse(await readFile(join(repositoryRoot, "package-lock.json"), "utf8")) as {
|
||||
packages: Record<string, { version?: string }>;
|
||||
};
|
||||
const hermesLock = JSON.parse(await readFile(join(repositoryRoot, "pi-hermes-memory", "package-lock.json"), "utf8")) as {
|
||||
packages: Record<string, { version?: string }>;
|
||||
};
|
||||
const rootSqliteVersion = rootLock.packages["node_modules/better-sqlite3"]?.version;
|
||||
const hermesSqliteVersion = hermesLock.packages["node_modules/better-sqlite3"]?.version;
|
||||
assert.match(rootSqliteVersion ?? "", /^\d+\.\d+\.\d+$/, "the root lockfile must pin a root-level better-sqlite3");
|
||||
assert.match(hermesSqliteVersion ?? "", /^\d+\.\d+\.\d+$/, "the Hermes lockfile must pin its own better-sqlite3");
|
||||
assert.deepEqual(
|
||||
Object.keys(packageJson.allowScripts).filter((key) => key.startsWith("better-sqlite3@")),
|
||||
[`better-sqlite3@${rootSqliteVersion}`],
|
||||
"allowScripts must approve exactly the root lockfile's better-sqlite3 build",
|
||||
);
|
||||
assert.equal(
|
||||
packageJson.allowScripts["better-sqlite3@13.0.3"],
|
||||
packageJson.allowScripts[`better-sqlite3@${hermesSqliteVersion}`],
|
||||
undefined,
|
||||
"Hermes uses better-sqlite3 13 N-API prebuilds, so no extra install-script approval is required",
|
||||
`Hermes uses better-sqlite3 ${hermesSqliteVersion} N-API prebuilds, so no extra install-script approval is required`,
|
||||
);
|
||||
assert.equal(packageJson.dependencies["@sinclair/typebox"], undefined);
|
||||
const home = await mkdtemp(join(tmpdir(), "my-pi-extension-load-"));
|
||||
|
||||
Reference in New Issue
Block a user