mirror of
https://github.com/pnpm/action-setup.git
synced 2026-03-04 08:01:02 +08:00
* chore: add alignment standards for github config - Add .nvmrc file with Node.js 22 - Add PR template for consistent pull requests - Add issue templates for bug reports, feature requests, and tasks - Add standard labels via gh CLI (type, priority, status, area labels) * fix: resolve form-data security vulnerability Add pnpm override to force form-data>=4.0.4 which fixes GHSA-fjxv-7rqg-78g4 (unsafe random function for boundary). * chore: add .claude/settings.local.json to gitignore * feat: Add claude commands * fix: update pnpm version to 10.27.0 (valid release) * fix: update pnpm version from 9 to 10 in all workflows Update all workflow files to use pnpm version 10 to match the packageManager field in package.json (pnpm@10.27.0). This fixes the CI failure caused by version mismatch: - pr-check.yml: version 9 → 10, matrix 9.15.5 → 10.27.0 - build-and-test.yml: version 9 → 10 - security.yml: version 9 → 10 - test.yaml: all version references updated to 10.27.0 * fix: remove packageManager field to allow testing multiple pnpm versions The action tests multiple pnpm versions (9.x and 10.x). Having a packageManager field in package.json causes version mismatch errors when the workflow specifies a different version than packageManager. * fix: use exact pnpm version 10.27.0 in workflows The action validates that the version specified in workflows must match the packageManager field in package.json exactly. Update from version: 10 to version: 10.27.0 to match pnpm@10.27.0. * fix: use local action in ci.yml with explicit version Since packageManager was removed from package.json to allow testing multiple pnpm versions, ci.yml must now specify the version explicitly. Changed from using released @v4.0.0 to using ./ (local action) to test the current code. * fix: rename claude commands to use Windows-compatible filenames Windows doesn't allow colons in filenames. Changed from using colons (agents:action.md) to hyphens (agents-action.md) for cross-platform compatibility.
2.7 KiB
2.7 KiB
Quick: Check
Run all quality checks to ensure the action is healthy.
What This Does
Executes a comprehensive health check of the action codebase, including TypeScript compilation, tests, and basic validation.
Checks Performed
1. TypeScript Compilation
pnpm exec tsc --noEmit
Verifies:
- No type errors
- Strict mode compliance
- All imports resolve
2. Test Suite
pnpm test
Runs:
- All unit tests
- All integration tests
- Reports any failures
3. Build Verification
pnpm run build
Checks:
- TypeScript compiles
- ncc bundling succeeds
- dist/index.js is created
4. Action Configuration
Validates:
- action.yml syntax
- Input definitions
- Output definitions
- Runtime configuration
5. Git Status
git status --porcelain
Checks:
- Uncommitted changes
- Untracked files
- Build artifacts status
Usage
Just ask:
- "Run quality checks"
- "Check the project"
- "Is everything healthy?"
Output Format
=== Quality Check Results ===
[✓] TypeScript compilation: PASSED
[✓] Test suite: PASSED (15/15 tests)
[✓] Build: PASSED (dist/index.js created)
[✓] action.yml: VALID
[!] Git status: 3 uncommitted files
Summary: 4/5 checks passed
What to Do If Checks Fail
TypeScript Errors
- Review error messages
- Fix type issues
- Run
tsc --noEmitagain
Test Failures
- Check test output
- Fix failing tests
- Run specific test:
pnpm test -- <test-name>
Build Failures
- Check build output
- Verify dependencies installed
- Try clean build:
rm -rf dist && pnpm run build
action.yml Issues
- Validate YAML syntax
- Check for missing required fields
- Verify input/output definitions
Uncommitted Changes
- Review changes:
git status - Commit if intentional:
git add . && git commit - Discard if unintended:
git restore .
Quick Fix
If there are auto-fixable issues, use:
quick:fix
Implementation
This command runs:
#!/bin/bash
set -e
echo "=== Quality Check Results ==="
echo ""
# TypeScript check
echo -n "[...] TypeScript compilation: "
if pnpm exec tsc --noEmit 2>&1 > /dev/null; then
echo "✓ PASSED"
else
echo "✗ FAILED"
fi
# Tests
echo -n "[...] Test suite: "
if pnpm test 2>&1 | tail -1; then
echo "✓ PASSED"
else
echo "✗ FAILED"
fi
# Build
echo -n "[...] Build: "
if pnpm run build > /dev/null 2>&1; then
echo "✓ PASSED"
else
echo "✗ FAILED"
fi
# action.yml
echo -n "[...] action.yml: "
if [ -f action.yml ]; then
echo "✓ VALID"
else
echo "✗ MISSING"
fi
# Git status
echo -n "[...] Git status: "
if [ -z "$(git status --porcelain)" ]; then
echo "✓ CLEAN"
else
echo "! UNCOMMITTED FILES"
fi
echo ""
echo "Check complete!"