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

推荐订阅源

人人都是产品经理
人人都是产品经理
Apple Machine Learning Research
Apple Machine Learning Research
云风的 BLOG
云风的 BLOG
罗磊的独立博客
博客园 - 三生石上(FineUI控件)
量子位
GbyAI
GbyAI
腾讯CDC
T
Tailwind CSS Blog
博客园 - Franky
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
D
Docker
G
Google Developers Blog
aimingoo的专栏
aimingoo的专栏
The GitHub Blog
The GitHub Blog
Microsoft Security Blog
Microsoft Security Blog
Stack Overflow Blog
Stack Overflow Blog
Hugging Face - Blog
Hugging Face - Blog
小众软件
小众软件
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
N
Netflix TechBlog - Medium
Jina AI
Jina AI
IT之家
IT之家
Y
Y Combinator Blog

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(release): harden Windows release-check npm probes · o...
vincentkoc · 2026-05-24 · via Recent Commits to openclaw:main

@@ -1,6 +1,6 @@

11

#!/usr/bin/env -S node --import tsx

223-

import { execFileSync, execSync } from "node:child_process";

3+

import { execFileSync } from "node:child_process";

44

import {

55

existsSync,

66

lstatSync,

@@ -43,7 +43,10 @@ import {

4343

import {

4444

collectInstalledPackageErrors,

4545

normalizeInstalledBinaryVersion,

46+

resolveInstalledBinaryCommandInvocation,

47+

resolveInstalledBinaryPath,

4648

} from "./openclaw-npm-postpublish-verify.ts";

49+

import { resolveNpmRunner } from "./npm-runner.mjs";

4750

import { listStaticExtensionAssetOutputs } from "./runtime-postbuild.mjs";

4851

import { sparkleBuildFloorsFromShortVersion, type SparkleBuildFloors } from "./sparkle-build.ts";

4952

import { buildCmdExeCommandLine } from "./windows-cmd-helpers.mjs";

@@ -244,8 +247,48 @@ function checkSkillShellScriptsExecutable() {

244247

}

245248

}

246249250+

export function resolveReleaseNpmCommand(

251+

args: string[],

252+

params: {

253+

comSpec?: string;

254+

env?: NodeJS.ProcessEnv;

255+

execPath?: string;

256+

existsSync?: typeof existsSync;

257+

platform?: NodeJS.Platform;

258+

} = {},

259+

) {

260+

return resolveNpmRunner({

261+

comSpec: params.comSpec,

262+

env: params.env,

263+

execPath: params.execPath,

264+

existsSync: params.existsSync,

265+

npmArgs: args,

266+

platform: params.platform,

267+

});

268+

}

269+270+

function execNpm(

271+

args: string[],

272+

options: {

273+

cwd?: string;

274+

encoding: BufferEncoding;

275+

maxBuffer?: number;

276+

stdio: "inherit" | ["ignore", "pipe", "pipe"];

277+

},

278+

): string {

279+

const invocation = resolveReleaseNpmCommand(args, { env: process.env });

280+

return execFileSync(invocation.command, invocation.args, {

281+

...options,

282+

...(invocation.env ? { env: invocation.env } : {}),

283+

...(invocation.shell !== undefined ? { shell: invocation.shell } : {}),

284+

...(invocation.windowsVerbatimArguments !== undefined

285+

? { windowsVerbatimArguments: invocation.windowsVerbatimArguments }

286+

: {}),

287+

});

288+

}

289+247290

function runPackDry(): PackResult[] {

248-

const raw = execSync("npm pack --dry-run --json --ignore-scripts", {

291+

const raw = execNpm(["pack", "--dry-run", "--json", "--ignore-scripts"], {

249292

encoding: "utf8",

250293

stdio: ["ignore", "pipe", "pipe"],

251294

maxBuffer: 1024 * 1024 * 100,

@@ -254,15 +297,11 @@ function runPackDry(): PackResult[] {

254297

}

255298256299

function runPack(packDestination: string): PackResult[] {

257-

const raw = execFileSync(

258-

"npm",

259-

["pack", "--json", "--ignore-scripts", "--pack-destination", packDestination],

260-

{

261-

encoding: "utf8",

262-

stdio: ["ignore", "pipe", "pipe"],

263-

maxBuffer: 1024 * 1024 * 100,

264-

},

265-

);

300+

const raw = execNpm(["pack", "--json", "--ignore-scripts", "--pack-destination", packDestination], {

301+

encoding: "utf8",

302+

stdio: ["ignore", "pipe", "pipe"],

303+

maxBuffer: 1024 * 1024 * 100,

304+

});

266305

return JSON.parse(raw) as PackResult[];

267306

}

268307

@@ -279,8 +318,7 @@ function resolvePackedTarballPath(packDestination: string, results: PackResult[]

279318

}

280319281320

function installPackedTarball(prefixDir: string, tarballPath: string, cwd: string): void {

282-

execFileSync(

283-

"npm",

321+

execNpm(

284322

[

285323

"install",

286324

"-g",

@@ -300,19 +338,13 @@ function installPackedTarball(prefixDir: string, tarballPath: string, cwd: strin

300338

}

301339302340

function resolveGlobalRoot(prefixDir: string, cwd: string): string {

303-

return execFileSync("npm", ["root", "-g", "--prefix", prefixDir], {

341+

return execNpm(["root", "-g", "--prefix", prefixDir], {

304342

cwd,

305343

encoding: "utf8",

306344

stdio: ["ignore", "pipe", "pipe"],

307345

}).trim();

308346

}

309347310-

function resolveInstalledBinaryPath(prefixDir: string): string {

311-

return process.platform === "win32"

312-

? join(prefixDir, "openclaw.cmd")

313-

: join(prefixDir, "bin", "openclaw");

314-

}

315-316348

export function createPackedBundledPluginPostinstallEnv(

317349

env: NodeJS.ProcessEnv = process.env,

318350

): NodeJS.ProcessEnv {

@@ -420,16 +452,13 @@ function verifyPackedInstalledPackage(params: {

420452

prefixDir: string;

421453

tmpRoot: string;

422454

}): void {

423-

const installedBinaryVersion = execFileSync(

424-

resolveInstalledBinaryPath(params.prefixDir),

425-

["--version"],

426-

{

427-

cwd: params.tmpRoot,

428-

encoding: "utf8",

429-

shell: process.platform === "win32",

430-

stdio: ["ignore", "pipe", "pipe"],

431-

},

432-

).trim();

455+

const invocation = resolveInstalledBinaryCommandInvocation(params.prefixDir, ["--version"]);

456+

const installedBinaryVersion = execFileSync(invocation.command, invocation.args, {

457+

cwd: params.tmpRoot,

458+

encoding: "utf8",

459+

stdio: ["ignore", "pipe", "pipe"],

460+

windowsVerbatimArguments: invocation.windowsVerbatimArguments,

461+

}).trim();

433462

const errors = collectPackedInstalledPackageVerificationErrors({

434463

expectedVersion: params.expectedVersion,

435464

installedBinaryVersion,