惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
U
Unit 42
GbyAI
GbyAI
M
MIT News - Artificial intelligence
美团技术团队
罗磊的独立博客
雷峰网
雷峰网
量子位
博客园 - 【当耐特】
Last Week in AI
Last Week in AI
D
Docker
小众软件
小众软件
S
SegmentFault 最新的问题
Blog — PlanetScale
Blog — PlanetScale
阮一峰的网络日志
阮一峰的网络日志
宝玉的分享
宝玉的分享
T
Tailwind CSS Blog
WordPress大学
WordPress大学
V
V2EX
博客园_首页
腾讯CDC
The Cloudflare Blog
A
About on SuperTechFans
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix: avoid rescanning repaired plugin peers · openclaw/op...
shakkernerd · 2026-05-13 · via Recent Commits to openclaw:main

@@ -52,6 +52,7 @@ async function packPlugin(params: {

5252

pluginId: string;

5353

version: string;

5454

rootDir: string;

55+

indexJs?: string;

5556

}): Promise<PackedVersion> {

5657

const packageDir = path.join(params.rootDir, `package-${params.packageName}-${params.version}`);

5758

const peerDependenciesMeta = params.peerDependencies

@@ -94,7 +95,11 @@ async function packPlugin(params: {

9495

)}\n`,

9596

"utf8",

9697

);

97-

await fs.writeFile(path.join(packageDir, "dist", "index.js"), "export {};\n", "utf8");

98+

await fs.writeFile(

99+

path.join(packageDir, "dist", "index.js"),

100+

params.indexJs ?? "export {};\n",

101+

"utf8",

102+

);

9810399104

const packOutput = execFileSync(

100105

"npm",

@@ -439,6 +444,102 @@ describe("installPluginFromNpmSpec e2e", () => {

439444

).resolves.toBeTruthy();

440445

});

441446447+

it("does not attribute repaired pre-existing peer dependencies to later installs", async () => {

448+

const rootDir = await makeTempDir("npm-plugin-repaired-peer-scan-e2e");

449+

const npmRoot = path.join(rootDir, "managed-npm");

450+

const pluginWithRuntimePeer = `existing-peer-plugin-${crypto.randomUUID().replace(/-/g, "").slice(0, 12)}`;

451+

const laterPlugin = `later-plugin-${crypto.randomUUID().replace(/-/g, "").slice(0, 12)}`;

452+

const runtimePeer = `runtime-peer-${crypto.randomUUID().replace(/-/g, "").slice(0, 12)}`;

453+

const registry = await startStaticRegistry([

454+

{

455+

packageName: pluginWithRuntimePeer,

456+

latest: "1.0.0",

457+

versions: [

458+

await packPlugin({

459+

packageName: pluginWithRuntimePeer,

460+

peerDependencies: { [runtimePeer]: "^1.0.0" },

461+

peerDependenciesMeta: {},

462+

pluginId: pluginWithRuntimePeer,

463+

version: "1.0.0",

464+

rootDir,

465+

}),

466+

],

467+

},

468+

{

469+

packageName: laterPlugin,

470+

latest: "1.0.0",

471+

versions: [

472+

await packPlugin({

473+

packageName: laterPlugin,

474+

pluginId: laterPlugin,

475+

version: "1.0.0",

476+

rootDir,

477+

}),

478+

],

479+

},

480+

{

481+

packageName: runtimePeer,

482+

latest: "1.0.0",

483+

versions: [

484+

await packPlugin({

485+

indexJs: "eval('1');\n",

486+

packageName: runtimePeer,

487+

pluginId: runtimePeer,

488+

version: "1.0.0",

489+

rootDir,

490+

}),

491+

],

492+

},

493+

]);

494+

process.env.NPM_CONFIG_REGISTRY = registry;

495+

process.env.npm_config_registry = registry;

496+497+

await fs.mkdir(npmRoot, { recursive: true });

498+

await fs.writeFile(

499+

path.join(npmRoot, "package.json"),

500+

`${JSON.stringify(

501+

{

502+

private: true,

503+

dependencies: { [pluginWithRuntimePeer]: "1.0.0" },

504+

},

505+

null,

506+

2,

507+

)}\n`,

508+

"utf8",

509+

);

510+

await execFileAsync(

511+

"npm",

512+

[

513+

"install",

514+

"--omit=dev",

515+

"--omit=peer",

516+

"--legacy-peer-deps",

517+

"--loglevel=error",

518+

"--ignore-scripts",

519+

"--no-audit",

520+

"--no-fund",

521+

],

522+

{ cwd: npmRoot },

523+

);

524+

await expect(

525+

fs.lstat(path.join(npmRoot, "node_modules", runtimePeer, "package.json")),

526+

).rejects.toHaveProperty("code", "ENOENT");

527+528+

const later = await installPluginFromNpmSpec({

529+

spec: `${laterPlugin}@1.0.0`,

530+

npmDir: npmRoot,

531+

logger: { info: () => {}, warn: () => {} },

532+

timeoutMs: 120_000,

533+

});

534+

if (!later.ok) {

535+

throw new Error(later.error);

536+

}

537+538+

await expect(

539+

fs.lstat(path.join(npmRoot, "node_modules", runtimePeer, "package.json")),

540+

).resolves.toBeTruthy();

541+

});

542+442543

it("scrubs host peers when installing beside an existing host-peer plugin", async () => {

443544

const rootDir = await makeTempDir("npm-plugin-sibling-peer-e2e");

444545

const npmRoot = path.join(rootDir, "managed-npm");