mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-30 19:20:22 +00:00
fix(release): skip lifecycle scripts in npm precheck
This commit is contained in:
@@ -418,23 +418,25 @@ function collectPackedTarballErrors(): string[] {
|
||||
const errors: string[] = [];
|
||||
let stdout = "";
|
||||
try {
|
||||
stdout = runNpmCommand(["pack", "--json", "--dry-run"]);
|
||||
stdout = runNpmCommand(["pack", "--json", "--dry-run", "--ignore-scripts"]);
|
||||
} catch (error) {
|
||||
const message = describeExecFailure(error);
|
||||
errors.push(
|
||||
`Failed to inspect npm tarball contents via \`npm pack --json --dry-run\`: ${message}`,
|
||||
`Failed to inspect npm tarball contents via \`npm pack --json --dry-run --ignore-scripts\`: ${message}`,
|
||||
);
|
||||
return errors;
|
||||
}
|
||||
|
||||
const packResults = parseNpmPackJsonOutput(stdout);
|
||||
if (!packResults) {
|
||||
errors.push("Failed to parse JSON output from `npm pack --json --dry-run`.");
|
||||
errors.push("Failed to parse JSON output from `npm pack --json --dry-run --ignore-scripts`.");
|
||||
return errors;
|
||||
}
|
||||
const firstResult = packResults[0];
|
||||
if (!firstResult || !Array.isArray(firstResult.files)) {
|
||||
errors.push("`npm pack --json --dry-run` did not return a files list to validate.");
|
||||
errors.push(
|
||||
"`npm pack --json --dry-run --ignore-scripts` did not return a files list to validate.",
|
||||
);
|
||||
return errors;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user