Skip to content

Commit cf32f81

Browse files
remyluslosiusclaude
andcommitted
fix(ci): Fix npm-check-updates command in dependency audit workflow
Fixed GitHub Actions workflow failure in weekly dependency audit job. Issue: - Weekly Dependency Audit job failing with "Invalid option value: --format json" - Error: "Valid values are: group, ownerChanged, repo, time, lines, installedVersion" Root Cause: - npm-check-updates (ncu) CLI does not support --format json option - Workflow was using outdated/incorrect ncu syntax Fix: - Changed `ncu --format json` to `ncu --jsonUpgraded` - Added fallback to empty JSON object on error: `|| echo "{}" > ...` - --jsonUpgraded outputs only packages with available upgrades in JSON format Impact: - Weekly dependency audits will now run successfully - Automated dependency monitoring restored - No breaking changes to audit report format Testing: - Verified ncu command syntax with npm-check-updates documentation - Fallback ensures workflow continues even if ncu has issues Reference: GitHub Actions run #87 - Automated Dependency Management 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 015b747 commit cf32f81

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/dependency-management.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,8 +449,8 @@ jobs:
449449
echo "## Frontend Dependencies" >> audit-report.md
450450
cd frontend
451451
echo "### Outdated Packages" >> ../audit-report.md
452-
ncu --format json > ../frontend-outdated.json
453-
452+
ncu --jsonUpgraded > ../frontend-outdated.json || echo "{}" > ../frontend-outdated.json
453+
454454
# Count outdated packages
455455
OUTDATED_COUNT=$(jq '. | length' ../frontend-outdated.json)
456456
echo "**$OUTDATED_COUNT packages have updates available**" >> ../audit-report.md

0 commit comments

Comments
 (0)