Skip to content

build(npm): add --json output option to check-allow-scripts - #334137

Open
Deniz Güney Yıldırım (denizguney) wants to merge 2 commits into
microsoft:mainfrom
denizguney:patch-30
Open

build(npm): add --json output option to check-allow-scripts#334137
Deniz Güney Yıldırım (denizguney) wants to merge 2 commits into
microsoft:mainfrom
denizguney:patch-30

Conversation

@denizguney

Copy link
Copy Markdown
Contributor

Add support for the --json flag in build/npm/check-allow-scripts.ts to output pending install script check results in JSON format for automated tooling and CI pipelines.

Related to #334134

Add support for the --json flag in check-allow-scripts.ts to output pending install script check results in JSON format for automated tooling and CI pipelines.
Copilot AI balanced review requested due to automatic review settings September 2, 2026 22:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Removing the main() invocation prevents the script from executing.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds machine-readable --json output for pending npm install-script approvals.

Changes:

  • Detects the --json argument.
  • Serializes pending-script results and preserves failure exit codes.
File summaries
File Description
build/npm/check-allow-scripts.ts Adds JSON output support.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread build/npm/check-allow-scripts.ts
Restore the main() entry-point call to ensure check-allow-scripts.ts executes correctly when run from the build pipeline or with the --json flag, addressing Copilot feedback.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants