Skip to content

fix: report ok for silent npm scripts#1660

Open
sdwolf4103 wants to merge 1 commit intortk-ai:developfrom
sdwolf4103:fix/npm-silent-script-ok
Open

fix: report ok for silent npm scripts#1660
sdwolf4103 wants to merge 1 commit intortk-ai:developfrom
sdwolf4103:fix/npm-silent-script-ok

Conversation

@sdwolf4103
Copy link
Copy Markdown

Summary

  • Treat npm 7+ leading lifecycle echo lines as boilerplate so successful silent scripts fall back to ok.
  • Preserve substantive script output, including > lines after real output and a single leading > line that may be user output.
  • Add regression tests for lifecycle-only output and over-filtering edge cases.

Verification

  • git diff --check -- src/cmds/js/npm_cmd.rs
  • Static logic verification of the added npm filter cases

Note: local environment did not have cargo/rustc, so Rust tests should run in CI.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 1, 2026

CLA assistant check
All committers have signed the CLA.

@pszymkowiak pszymkowiak added bug Something isn't working effort-small Quelques heures, 1 fichier filter-quality Filter produces incorrect/truncated signal labels May 1, 2026
@pszymkowiak
Copy link
Copy Markdown
Collaborator

[w] wshm · Automated triage by AI

📊 Automated PR Analysis

🐛 Type bug-fix
🟡 Risk medium

Summary

This PR fixes the npm output filter to treat npm 7+ leading lifecycle echo lines (e.g. script name and command) as boilerplate, so that silent scripts with no substantive output correctly report "ok". It preserves a single leading "> " line as possible user output and keeps "> " lines that appear after real output. Regression tests cover lifecycle-only output, substantive output preservation, and edge cases.

Review Checklist

  • Tests present
  • Breaking change
  • Docs updated

Analyzed automatically by wshm · This is an automated analysis, not a human review.

@sdwolf4103 sdwolf4103 force-pushed the fix/npm-silent-script-ok branch from e89d228 to 2af091c Compare May 1, 2026 08:19
@sdwolf4103 sdwolf4103 changed the base branch from master to develop May 1, 2026 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working effort-small Quelques heures, 1 fichier filter-quality Filter produces incorrect/truncated signal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants