{"_id":"@davegarvey/bumper","_rev":"4-1a1ca4e2f22c2fcf25f0bfbe6a10967c","name":"@davegarvey/bumper","dist-tags":{"latest":"2.3.1"},"versions":{"0.1.0":{"name":"@davegarvey/bumper","version":"0.1.0","keywords":["semver","versioning","conventional-commits","automation","ci-cd","semantic-release"],"author":{"name":"David Garvey"},"license":"MIT","_id":"@davegarvey/bumper@0.1.0","maintainers":[{"name":"davegarvey","email":"davegarvey@hotmail.com"}],"homepage":"https://github.com/davegarvey/bumper#readme","bugs":{"url":"https://github.com/davegarvey/bumper/issues"},"bin":{"auto-version":"bin/auto-version.js"},"dist":{"shasum":"c2f9bfa37ecbd318571a21804f89d39ce5ec89b9","tarball":"https://registry.npmjs.org/@davegarvey/bumper/-/bumper-0.1.0.tgz","fileCount":9,"integrity":"sha512-adcEd6Qkf8I7yitj3h5L+j7ApTyWz4m6vmn800JhHmGUrBc16ZFSsQjUP9j5vMol0I3G6KYLer8Gg2d223e2eQ==","signatures":[{"sig":"MEYCIQC6acMizidKDkfmIO6VPDp4wb+snJMpmKX93XXA/MVyAQIhAKeNJpsDcKFT9NVKjrszXgTk0KNNAtYLbNpQSzT9N8+7","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9236},"type":"module","engines":{"node":">=18"},"gitHead":"1c5ed52a34fce4920012388bd4033e8c768cd68e","scripts":{"lint":"eslint .","test":"vitest run","lint:fix":"eslint . --fix"},"_npmUser":{"name":"davegarvey","email":"davegarvey@hotmail.com"},"repository":{"url":"git+https://github.com/davegarvey/bumper.git","type":"git"},"_npmVersion":"10.9.3","description":"Automatic semantic versioning based on conventional commits, optimized for AI-generated commit messages","directories":{},"_nodeVersion":"22.20.0","_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.39.1","vitest":"^4.0.15","@eslint/js":"^9.39.1"},"_npmOperationalInternal":{"tmp":"tmp/bumper_0.1.0_1765023600839_0.7997473834172326","host":"s3://npm-registry-packages-npm-production"}},"2.0.2":{"name":"@davegarvey/bumper","version":"2.0.2","keywords":["semver","versioning","conventional-commits","automation","ci-cd","semantic-release"],"author":{"name":"David Garvey"},"license":"MIT","_id":"@davegarvey/bumper@2.0.2","maintainers":[{"name":"davegarvey","email":"davegarvey@hotmail.com"}],"homepage":"https://github.com/davegarvey/bumper#readme","bugs":{"url":"https://github.com/davegarvey/bumper/issues"},"bin":{"bump":"bin/bump.js"},"dist":{"shasum":"de5b9a8a32bc80ab22731ac39063692bbe0a3f2e","tarball":"https://registry.npmjs.org/@davegarvey/bumper/-/bumper-2.0.2.tgz","fileCount":8,"integrity":"sha512-QD5op36/l8NvY2og4gd2hsfRJWOtP9fHQB9XKNE2snB/BkGvf64PDy7byILtuB4x2CzZpAciYCE7+YJEJHwK7Q==","signatures":[{"sig":"MEUCIGk+Bd9AtMhX/sVO4A43AxY9kAU4WwsJ/guthd7WkYPzAiEAoLYT4+1onndz2nGfJAd8OR2oYkcMG1vnftB36/pTvD4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12863},"type":"module","engines":{"node":">=18"},"gitHead":"25ccf183fe9e5de74470e09e7ec573b4b3f153a4","scripts":{"lint":"eslint .","test":"vitest run","lint:fix":"eslint . --fix"},"_npmUser":{"name":"davegarvey","email":"davegarvey@hotmail.com"},"repository":{"url":"git+https://github.com/davegarvey/bumper.git","type":"git"},"_npmVersion":"10.9.3","description":"Automatic semantic versioning based on conventional commits, optimized for AI-generated commit messages","directories":{},"_nodeVersion":"22.20.0","dependencies":{"@davegarvey/bumper":"^0.1.0"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.39.1","vitest":"^4.0.15","@eslint/js":"^9.39.1"},"_npmOperationalInternal":{"tmp":"tmp/bumper_2.0.2_1765033475441_0.16872901539537555","host":"s3://npm-registry-packages-npm-production"}},"2.0.3":{"name":"@davegarvey/bumper","version":"2.0.3","keywords":["semver","versioning","conventional-commits","automation","ci-cd","semantic-release"],"author":{"name":"David Garvey"},"license":"MIT","_id":"@davegarvey/bumper@2.0.3","maintainers":[{"name":"davegarvey","email":"davegarvey@hotmail.com"}],"homepage":"https://github.com/davegarvey/bumper#readme","bugs":{"url":"https://github.com/davegarvey/bumper/issues"},"bin":{"bump":"bin/bump.js"},"dist":{"shasum":"840efff472aff31d2c046d81636ff711d028d4b7","tarball":"https://registry.npmjs.org/@davegarvey/bumper/-/bumper-2.0.3.tgz","fileCount":8,"integrity":"sha512-1UUDvEMHqHBuT90JjIy58vUuBC+3R5AutNO6BAP8NM/Be8ZpY+QDiCh0DuveZIcVGz4zcAiFLk6LGnUcdjtDnQ==","signatures":[{"sig":"MEYCIQCDBNa+SV03nXE5g836KuFNEKINxmPv2tbCgUoDdnqEogIhAIwvkg/5nTPsYBsHslUTPtA3azPgwLi9DQX8gjBhTcj7","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14023},"type":"module","engines":{"node":">=18"},"gitHead":"b048e497f3b4b45d559865935ef4058acfda12e0","scripts":{"lint":"eslint .","test":"vitest run","lint:fix":"eslint . --fix"},"_npmUser":{"name":"davegarvey","email":"davegarvey@hotmail.com"},"repository":{"url":"git+https://github.com/davegarvey/bumper.git","type":"git"},"_npmVersion":"10.9.3","description":"Automatic semantic versioning based on conventional commits, optimized for AI-generated commit messages","directories":{},"_nodeVersion":"22.20.0","dependencies":{"@davegarvey/bumper":"^0.1.0"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.39.1","vitest":"^4.0.15","@eslint/js":"^9.39.1"},"_npmOperationalInternal":{"tmp":"tmp/bumper_2.0.3_1765056862233_0.3214689578602543","host":"s3://npm-registry-packages-npm-production"}},"2.3.1":{"name":"@davegarvey/bumper","version":"2.3.1","description":"Automatic semantic versioning based on conventional commits, optimized for AI-generated commit messages","type":"module","bin":{"bump":"bin/bump.js"},"keywords":["semver","versioning","conventional-commits","automation","ci-cd","semantic-release"],"engines":{"node":">=18"},"repository":{"type":"git","url":"git+https://github.com/davegarvey/bumper.git"},"author":{"name":"David Garvey"},"license":"MIT","scripts":{"lint":"eslint .","lint:fix":"eslint . --fix","test":"vitest run"},"devDependencies":{"@eslint/js":"^9.39.1","eslint":"^9.39.1","vitest":"^4.0.15"},"dependencies":{"@davegarvey/bumper":"^2.0.3","minimist":"^1.2.8"},"_id":"@davegarvey/bumper@2.3.1","gitHead":"0a8af20c4b66ddd78750296af18c19b33efef591","bugs":{"url":"https://github.com/davegarvey/bumper/issues"},"homepage":"https://github.com/davegarvey/bumper#readme","_nodeVersion":"22.20.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-C7gwM1mIFpcBpqIUEHMTK9H9/opnEcgGEqD+nsjEgV1PBpwmYCU08Km9FHHMAWyI6M6KM5JGvMP2/lppz1Lx4Q==","shasum":"011a015c23566742a5529bb46f4aeeab08460005","tarball":"https://registry.npmjs.org/@davegarvey/bumper/-/bumper-2.3.1.tgz","fileCount":12,"unpackedSize":21906,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCtDh6nl6Pus4yXHiaoWtGsLkU0AWUb753mCpguyZJZHwIgZdOmzq+3AXdQSs5A8s9ZYEc2baqJ5JU0lUXRI3jfrQs="}]},"_npmUser":{"name":"davegarvey","email":"davegarvey@hotmail.com"},"directories":{},"maintainers":[{"name":"davegarvey","email":"davegarvey@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/bumper_2.3.1_1765396960356_0.5487612160382118"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-06T12:20:00.763Z","modified":"2025-12-10T20:02:40.684Z","0.1.0":"2025-12-06T12:20:01.008Z","2.0.2":"2025-12-06T15:04:35.597Z","2.0.3":"2025-12-06T21:34:22.407Z","2.3.1":"2025-12-10T20:02:40.497Z"},"bugs":{"url":"https://github.com/davegarvey/bumper/issues"},"author":{"name":"David Garvey"},"license":"MIT","homepage":"https://github.com/davegarvey/bumper#readme","keywords":["semver","versioning","conventional-commits","automation","ci-cd","semantic-release"],"repository":{"type":"git","url":"git+https://github.com/davegarvey/bumper.git"},"description":"Automatic semantic versioning based on conventional commits, optimized for AI-generated commit messages","maintainers":[{"name":"davegarvey","email":"davegarvey@hotmail.com"}],"readme":"# Bumper\n\nAutomatic semantic versioning based on conventional commits, optimised for AI-generated commit messages.\n\n## Installation\n\n```bash\nnpm install -g @davegarvey/bumper\n# or\nnpx @davegarvey/bumper\n```\n\n## Usage\n\n```bash\n# Run in your project root\nbump\n\n# Or with npx\nnpx bump\n\n# Push to remote\nbump --push\n\n# Create git tag\nbump --tag\n\n# Raw mode (output only version, dry run)\nbump --raw\n\n# With explicit options overrides\nbump --tag --tag-prefix \"release-v\"\nbump --commit-prefix \"chore(release): bump\"\nbump --preset git --tag\n\n# Show help\nbump --help\n```\n\n## Configuration\n\nYou can use a file-based configuration for Bumper instead of CLI arguments.\n\nCreate `.versionrc.json` in your project root:\n\n```json\n{\n  \"packageFiles\": [\"package.json\", \"client/package.json\"],\n  \"commitPrefix\": \"chore: bump version\",\n  \"tagPrefix\": \"v\",\n  \"push\": false,\n  \"tag\": false,\n  \"preset\": \"node\"\n}\n```\n\n### Configuration Options\n\n- **`packageFiles`**: Array of package.json files to update (default: `[\"package.json\"]`)\n- **`commitPrefix`**: Prefix for version bump commits (default: `\"chore: bump version\"`)\n- **`tagPrefix`**: Prefix for git tags (default: `\"v\"`)\n- **`push`**: Whether to push commits/tags to remote (default: `false`)\n- **`tag`**: Whether to create git tags for versions (default: `false`)\n- **`preset`**: Versioning strategy to use (default: `\"node\"`). Options:\n  - `\"node\"`: Updates `package.json` and `package-lock.json`\n  - `\"git\"`: Tracks version via git tags only (no file updates)\n\n### Best Practices\n\n- **Branch Protection**: Protect your main branch and require CI checks to pass\n- **Conventional Commits**: Ensure all commits follow [conventional commit format](https://www.conventionalcommits.org/en/v1.0.0/)\n- **Monorepos**: Use `packageFiles` array for multiple packages\n- **CI Permissions**: Grant write access to contents/commits for automated releases\n\n## GitHub Actions\n\nIn a typical CI/CD scenario, bumper runs automatically when PRs are merged to main:\n\n```yaml\nname: Release\non:\n  pull_request:\n    types: [closed]\n    branches: [main]\n\njobs:\n  release:\n    if: github.event.pull_request.merged == true\n    runs-on: ubuntu-latest\n    permissions:\n      contents: write      # Required for pushing commits/tags\n      pull-requests: read  # Required for PR info\n    steps:\n    - uses: actions/checkout@v4\n      with:\n        fetch-depth: 0  # Required for commit analysis\n    - uses: actions/setup-node@v4\n      with:\n        node-version: 18\n        cache: npm\n    - run: npm ci\n    - run: npm test\n    - run: npm run lint\n    - name: Configure Git\n      run: |\n        git config user.name \"github-actions[bot]\"\n        git config user.email \"github-actions[bot]@users.noreply.github.com\"\n    - name: Install bumper\n      run: npm install @davegarvey/bumper\n    - name: Bump version and release\n      run: npx bump --push --tag\n```\n\n### CI Best Practices\n\n- **Permissions**: Add `contents: write` permission for automated commits/tags\n- **Branch Protection**: Require CI checks and restrict direct pushes to main\n- **Testing**: Always run tests before releasing\n- **Fetch Depth**: Use `fetch-depth: 0` for complete commit history analysis\n\n## How It Works\n\n1. Analyzes commits since last tag\n2. Determines version bump (major/minor/patch) based on conventional commits\n3. Updates package.json files\n4. Creates git commit\n5. Optionally creates git tag\n6. Optionally pushes to remote\n\n## Commit Types\n\n- `feat:` → minor bump\n- `fix:`, `refactor:`, `perf:` → patch bump\n- Any type with `!` or `BREAKING CHANGE` → major bump\n- `docs:`, `test:`, `chore:`, `config:` → no bump\n\n## Troubleshooting\n\n### Common Issues\n\n**\"Author identity unknown\"**\n\n- **Solution**: Configure git identity in CI before running bumper\n- **Example**: Add git config step as shown in CI workflow\n\n**\"auto-version: not found\"**\n\n- **Solution**: Install bumper locally before running: `npm install @davegarvey/bumper`\n- **Why**: npx may not resolve bins from remote packages reliably\n\n**No version bump on merge**\n\n- **Check**: Ensure PR contains conventional commits with `feat:`, `fix:`, etc.\n- **Check**: Verify CI has write permissions to repository\n- **Check**: Confirm `fetch-depth: 0` in checkout action\n\n**Invalid config file**\n\n- **Solution**: Ensure `.versionrc.json` contains valid JSON\n- **Note**: Empty or invalid files fall back to defaults with a warning\n\n### Getting Help\n\n- Check commit format with conventional commits specification\n- Verify CI permissions and branch protection rules\n- Test locally with `bump` for debugging (pushing is disabled by default)\n\n## For AI Users\n\nThis tool is optimised for AI-generated commit messages that follow conventional commit format. See [.github/prompts/sc.prompt.md](.github/prompts/sc.prompt.md) for an example prompt that generates commits compatible with bumper.\n","readmeFilename":"README.md"}