Add --json output support to check-allow-scripts script
Open
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
## Feature Details
Add support for the `--json` flag in `build/npm/check-allow-scripts.ts` to output pending install script check results in JSON format.
This enables better automation, CI/CD pipeline integration, and machine-readable result parsing when auditing unreviewed install scripts across package directories.
## Implementation
- Added argument checking for `--json` in the `main()` function.
- Formatted output as a structured JSON string when the flag is present while preserving the exit code behavior (`exitCode = 1`) when pending scripts are found.
Contributor guide
Assessment
This issue has not been assessed yet.