{"_id":"@alleyinteractive/changelog-extractor","_rev":"4-3eb32b7169b3209c489b9d0bef0739e2","name":"@alleyinteractive/changelog-extractor","dist-tags":{"latest":"0.4.0"},"versions":{"0.0.1":{"name":"@alleyinteractive/changelog-extractor","version":"0.0.1","keywords":["changelog","parser","keep-a-changelog","release-notes","github-action","cli"],"author":{"name":"Alley Interactive"},"license":"GPL-3.0","_id":"@alleyinteractive/changelog-extractor@0.0.1","maintainers":[{"name":"srtfisher","email":"srtfisher@gmail.com"},{"name":"alleyops","email":"ops+npm@alleyinteractive.com"},{"name":"kevinatalley","email":"kevin@alley.com"}],"homepage":"https://github.com/alleyinteractive/action-changelog-extractor#readme","bugs":{"url":"https://github.com/alleyinteractive/action-changelog-extractor/issues"},"bin":{"changelog-extractor":"cli.js"},"dist":{"shasum":"38be62a5d467b51e08f2886c37154639b0547be7","tarball":"https://registry.npmjs.org/@alleyinteractive/changelog-extractor/-/changelog-extractor-0.0.1.tgz","fileCount":6,"integrity":"sha512-bQ4ozk1jCqlFu1SA2byYZF1E+A/LotBY+0lCBGU8Brfgz4amD/6UY3hsAN3OliYEkuBMwUXDv41qG+JAKccRog==","signatures":[{"sig":"MEUCIQCCCdOsv8+waQ/ivkCiD38FCGAypXXKYdRnd0Xc0+oH4gIgUtYowiWS/k6ioip4ZZ9hqJ3NiLBlJL6UVJUB84j7Z5M=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":51990},"jest":{"testMatch":["**/__tests__/**/*.test.js"],"testEnvironment":"node","coverageDirectory":"coverage","collectCoverageFrom":["src/**/*.js"]},"main":"src/parser.js","gitHead":"11f17e5474be24998f9028f997ab2306ccdad238","scripts":{"test":"jest","test:watch":"jest --watch","test:coverage":"jest --coverage"},"_npmUser":{"name":"srtfisher","email":"srtfisher@gmail.com"},"repository":{"url":"git+https://github.com/alleyinteractive/action-changelog-extractor.git","type":"git"},"_npmVersion":"10.8.2","description":"Parse and extract structured information from Keep a Changelog formatted changelogs","directories":{},"_nodeVersion":"20.19.4","dependencies":{"@actions/core":"^1.10.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","@types/jest":"^29.5.12","@types/node":"^20.11.24"},"_npmOperationalInternal":{"tmp":"tmp/changelog-extractor_0.0.1_1763741329252_0.8651337108381156","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@alleyinteractive/changelog-extractor","version":"0.1.0","keywords":["changelog","parser","keep-a-changelog","release-notes","github-action","cli"],"author":{"name":"Alley Interactive"},"license":"GPL-3.0","_id":"@alleyinteractive/changelog-extractor@0.1.0","maintainers":[{"name":"srtfisher","email":"srtfisher@gmail.com"},{"name":"alleyops","email":"ops+npm@alleyinteractive.com"},{"name":"kevinatalley","email":"kevin@alley.com"}],"homepage":"https://github.com/alleyinteractive/action-changelog-extractor#readme","bugs":{"url":"https://github.com/alleyinteractive/action-changelog-extractor/issues"},"bin":{"changelog-extractor":"src/cli.js"},"dist":{"shasum":"7bbbdb49fd4c6084d6e4b3a30a1faf6fe040a97e","tarball":"https://registry.npmjs.org/@alleyinteractive/changelog-extractor/-/changelog-extractor-0.1.0.tgz","fileCount":10,"integrity":"sha512-czh1jKfZtYHLuFVoAL62KRkg3fyINgX5LAiHa9r2PeDBPz+9u1WGdMdW12onoy8npodB0ei0lBznZvevgGRkfw==","signatures":[{"sig":"MEQCIHJn9x7KjW4A/tqgpxzPmp8tVVRRXfB+a1B6yexf+mkoAiBCRC7k9Kl44N6FzfRWbosrMZ/LRv8oRG+iuLOSeqQg3A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2702809},"main":"src/parser.js","type":"module","exports":{".":"./dist/index.js"},"gitHead":"b3ae946fa82c15cc277626162098a8c436790664","scripts":{"test":"NODE_OPTIONS=--experimental-vm-modules NODE_NO_WARNINGS=1 npx jest","build":"npm run prettier && npm run package","package":"npx rollup --config rollup.config.js","prettier":"npx prettier --check .","prettier:fix":"npx prettier --write .","fix-and-build":"npm run prettier:fix && npm run package","package:watch":"npm run package -- --watch","release:major":"npm run version:major && npm publish --access public && git push --follow-tags","release:minor":"npm run version:minor && npm publish --access public && git push --follow-tags","release:patch":"npm run version:patch && npm publish --access public && git push --follow-tags","prepublishOnly":"npm test"},"_npmUser":{"name":"srtfisher","email":"srtfisher@gmail.com"},"repository":{"url":"git+https://github.com/alleyinteractive/action-changelog-extractor.git","type":"git"},"_npmVersion":"10.8.2","description":"Parse and extract structured information from Keep a Changelog formatted changelogs","directories":{},"_nodeVersion":"20.19.4","dependencies":{"@actions/core":"^1.10.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^30.2.0","rollup":"^4.53.3","prettier":"^3.6.2","@types/jest":"^29.5.12","@types/node":"^20.11.24","@jest/globals":"^30.2.0","prettier-eslint":"^16.4.2","@rollup/plugin-commonjs":"^29.0.0","@rollup/plugin-node-resolve":"^16.0.3"},"_npmOperationalInternal":{"tmp":"tmp/changelog-extractor_0.1.0_1763745068610_0.9415557802575298","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@alleyinteractive/changelog-extractor","version":"0.3.0","keywords":["changelog","parser","keep-a-changelog","release-notes","github-action","cli"],"author":{"name":"Alley Interactive"},"license":"GPL-3.0","_id":"@alleyinteractive/changelog-extractor@0.3.0","maintainers":[{"name":"srtfisher","email":"srtfisher@gmail.com"},{"name":"alleyops","email":"ops+npm@alleyinteractive.com"},{"name":"kevinatalley","email":"kevin@alley.com"}],"homepage":"https://github.com/alleyinteractive/action-changelog-extractor#readme","bugs":{"url":"https://github.com/alleyinteractive/action-changelog-extractor/issues"},"bin":{"changelog-extractor":"src/cli.js"},"dist":{"shasum":"31d3bde0d8ee3e2998f24de2b33b6c9129abc948","tarball":"https://registry.npmjs.org/@alleyinteractive/changelog-extractor/-/changelog-extractor-0.3.0.tgz","fileCount":10,"integrity":"sha512-lgcXAedI8J1r4NyL48NpaAeZBTgbEKflx9b7T5pRfscePGLxp8xoLCE5KL0bX6RB6s/DmLsLfKei5Fk2jkZ6UQ==","signatures":[{"sig":"MEUCIQDb1QRK4lljic1r8tN/P0XvJ2YQGUfsdnKGYsY2mi/MHAIgbI9xHYppu0k9tyox2eWcVAAp9ceNEwN/aMG6Bs8mhnQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2713058},"main":"src/parser.js","type":"module","exports":{".":"./dist/index.js"},"gitHead":"3fc65f3c7e0f0332e938406da098273008e87242","scripts":{"test":"NODE_OPTIONS=--experimental-vm-modules NODE_NO_WARNINGS=1 npx jest","build":"npm run prettier && npm run package","package":"npx rollup --config rollup.config.js","prettier":"npx prettier --check .","prettier:fix":"npx prettier --write .","fix-and-build":"npm run prettier:fix && npm run package","package:watch":"npm run package -- --watch","release:major":"npm version major && npm publish --access public && git push --follow-tags","release:minor":"npm version minor && npm publish --access public && git push --follow-tags","release:patch":"npm version patch && npm publish --access public && git push --follow-tags","prepublishOnly":"npm test"},"_npmUser":{"name":"srtfisher","email":"srtfisher@gmail.com"},"repository":{"url":"git+https://github.com/alleyinteractive/action-changelog-extractor.git","type":"git"},"_npmVersion":"11.6.2","description":"Parse and extract structured information from Keep a Changelog formatted changelogs","directories":{},"_nodeVersion":"24.12.0","dependencies":{"@actions/core":"^1.10.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^30.2.0","rollup":"^4.53.3","prettier":"^3.6.2","@types/jest":"^29.5.12","@types/node":"^20.11.24","@jest/globals":"^30.2.0","prettier-eslint":"^16.4.2","@rollup/plugin-commonjs":"^29.0.0","@rollup/plugin-node-resolve":"^16.0.3"},"_npmOperationalInternal":{"tmp":"tmp/changelog-extractor_0.3.0_1765472804611_0.025763998650366826","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@alleyinteractive/changelog-extractor","version":"0.4.0","type":"module","description":"Parse and extract structured information from Keep a Changelog formatted changelogs","main":"src/parser.js","bin":{"changelog-extractor":"src/cli.js"},"scripts":{"build":"npm run prettier && npm run package","fix-and-build":"npm run prettier:fix && npm run package","package:watch":"npm run package -- --watch","package":"npx rollup --config rollup.config.js","prepublishOnly":"npm test","prettier:fix":"npx prettier --write .","prettier":"npx prettier --check .","release:major":"npm version major && npm publish --access public && git push --follow-tags","release:minor":"npm version minor && npm publish --access public && git push --follow-tags","release:patch":"npm version patch && npm publish --access public && git push --follow-tags","test":"NODE_OPTIONS=--experimental-vm-modules NODE_NO_WARNINGS=1 npx jest"},"keywords":["changelog","parser","keep-a-changelog","release-notes","github-action","cli"],"author":{"name":"Alley Interactive"},"license":"GPL-3.0","repository":{"type":"git","url":"git+https://github.com/alleyinteractive/action-changelog-extractor.git"},"bugs":{"url":"https://github.com/alleyinteractive/action-changelog-extractor/issues"},"homepage":"https://github.com/alleyinteractive/action-changelog-extractor#readme","exports":{".":"./dist/index.js"},"devDependencies":{"@jest/globals":"^30.2.0","@rollup/plugin-commonjs":"^29.0.0","@rollup/plugin-node-resolve":"^16.0.3","@types/jest":"^29.5.12","@types/node":"^20.11.24","jest":"^30.2.0","prettier":"^3.6.2","prettier-eslint":"^16.4.2","rollup":"^4.53.3"},"dependencies":{"@actions/core":"^1.10.1"},"gitHead":"cdc7bbfdacaf0883cc1739bb4fcb81af7d28f49d","_id":"@alleyinteractive/changelog-extractor@0.4.0","_nodeVersion":"24.12.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-gQfgNLxqDFPAMQRs1zYgY3WCoj+XVnzjowc6rwzNulIZwhrLxO2acOXjb1P8YFN5iNV/XDvHavqflEBPDUUONg==","shasum":"5a62a8b9747b24b68d6ffd1298e7f05191e96bd6","tarball":"https://registry.npmjs.org/@alleyinteractive/changelog-extractor/-/changelog-extractor-0.4.0.tgz","fileCount":10,"unpackedSize":2714107,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGI8ZHf/NnaByWEYQLlmRY5G5SUrjwD2KW2Jb5izUFVzAiEA+DC94Jj07eB68wLmBV/xHDsLG0PDQmz7B9eHrbdKIDI="}]},"_npmUser":{"name":"srtfisher","email":"srtfisher@gmail.com"},"directories":{},"maintainers":[{"name":"srtfisher","email":"srtfisher@gmail.com"},{"name":"alleyops","email":"ops+npm@alleyinteractive.com"},{"name":"kevinatalley","email":"kevin@alley.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/changelog-extractor_0.4.0_1767016981684_0.1787674475387775"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-21T16:08:49.191Z","modified":"2025-12-29T14:03:02.161Z","0.0.1":"2025-11-21T16:08:49.448Z","0.1.0":"2025-11-21T17:11:08.892Z","0.3.0":"2025-12-11T17:06:44.848Z","0.4.0":"2025-12-29T14:03:01.901Z"},"bugs":{"url":"https://github.com/alleyinteractive/action-changelog-extractor/issues"},"author":{"name":"Alley Interactive"},"license":"GPL-3.0","homepage":"https://github.com/alleyinteractive/action-changelog-extractor#readme","keywords":["changelog","parser","keep-a-changelog","release-notes","github-action","cli"],"repository":{"type":"git","url":"git+https://github.com/alleyinteractive/action-changelog-extractor.git"},"description":"Parse and extract structured information from Keep a Changelog formatted changelogs","maintainers":[{"name":"srtfisher","email":"srtfisher@gmail.com"},{"name":"alleyops","email":"ops+npm@alleyinteractive.com"},{"name":"kevinatalley","email":"kevin@alley.com"}],"readme":"# Changelog Extractor\n\nParse and extract structured information from\n[Keep a Changelog](https://keepachangelog.com/) formatted changelogs. Available\nas both a **GitHub Action** and a **CLI tool**.\n\n## Features\n\n- Parses Keep a Changelog format (tested with\n  [Mantle Framework](https://github.com/alleyinteractive/mantle-framework) and\n  others)\n- Extract all versions or filter to a specific one\n- Returns structured data with sections (Added, Changed, Fixed, etc.)\n- Handles mixed formats, including versions without subsections\n- Available as a CLI tool via npx or as a GitHub Action\n- Written in plain JavaScript with no build step required\n\n## Usage\n\n### As a GitHub Action\n\n#### Extract All Versions\n\nBy default, the action returns all versions in the changelog:\n\n```yaml\n- name: Extract All Changelog Entries\n  id: changelog\n  uses: alleyinteractive/action-changelog-extractor@v1\n\n- name: Process All Versions\n  run: |\n    # Access the first (latest) version\n    echo '${{ fromJson(steps.changelog.outputs.result)[0].contents }}'\n```\n\n#### Extract Specific Version\n\n```yaml\n- name: Extract v1.14.0 Changelog\n  id: changelog\n  uses: alleyinteractive/action-changelog-extractor@v1\n  with:\n    changelog-path: 'CHANGELOG.md'\n    version: '1.14.0' # or 'v1.14.0'\n```\n\n#### Create Release from Latest Version\n\n```yaml\nname: Release\non:\n  push:\n    tags:\n      - 'v*'\n\njobs:\n  release:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n\n      - name: Extract Changelog\n        id: changelog\n        uses: alleyinteractive/action-changelog-extractor@v1\n\n      - name: Create Release\n        uses: actions/create-release@v1\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n        with:\n          tag_name: ${{ github.ref }}\n          release_name: Release ${{ github.ref }}\n          # Use the first (latest) version from the changelog\n          body: ${{ fromJson(steps.changelog.outputs.result)[0].contents }}\n```\n\n#### Action Inputs\n\n| Input            | Description                                                                                    | Required | Default         |\n| ---------------- | ---------------------------------------------------------------------------------------------- | -------- | --------------- |\n| `changelog-path` | Path to the changelog file                                                                     | No       | `CHANGELOG.md`  |\n| `version`        | Specific version to extract (e.g., `1.14.0` or `v1.14.0`). Leave empty to return all versions. | No       | _(returns all)_ |\n\n#### Action Outputs\n\n| Output   | Description                                            |\n| -------- | ------------------------------------------------------ |\n| `result` | JSON string containing array of parsed version objects |\n\n#### Output Structure\n\nThe `result` output is a JSON string that can be parsed with `fromJson()`:\n\n```json\n[\n  {\n    \"name\": \"1.14.0\",\n    \"sections\": {\n      \"added\": \"- Added feature A\\n- Added feature B\",\n      \"changed\": \"- Changed behavior X\",\n      \"fixed\": \"- Fixed bug Y\"\n    },\n    \"contents\": \"### Added\\n\\n- Added feature A\\n- Added feature B\\n\\n### Changed\\n\\n- Changed behavior X\\n\\n### Fixed\\n\\n- Fixed bug Y\"\n  }\n]\n```\n\n**Properties:**\n\n- `name` - Version number without \"v\" prefix\n- `sections` - Object with lowercase keys (`added`, `changed`, `fixed`,\n  `deprecated`, `removed`, `security`)\n- `contents` - Full markdown content for the version (all sections combined,\n  without version header)\n\n### As a CLI Tool\n\nRun directly with npx (no installation required):\n\n```bash\n# Extract all versions from CHANGELOG.md\nnpx @alleyinteractive/changelog-extractor\n\n# Extract specific version\nnpx @alleyinteractive/changelog-extractor CHANGELOG.md 1.14.0\n\n# Count versions\nnpx @alleyinteractive/changelog-extractor -l\n\n# Show help\nnpx @alleyinteractive/changelog-extractor --help\n```\n\nOr install globally:\n\n```bash\nnpm install -g @alleyinteractive/changelog-extractor\nchangelog-extractor\n```\n\nBy default, the CLI outputs JSON to stdout. You can also specify other output\nformats using the `--format` option:\n\n```bash\n# JSON output (default)\nnpx @alleyinteractive/changelog-extractor --format json\n\n# Pretty-printed dump\nnpx @alleyinteractive/changelog-extractor --format dump\n\n# Plain text output\nnpx @alleyinteractive/changelog-extractor --format text\n```\n\n## Supported Changelog Format\n\nThis action parses changelogs following the\n[Keep a Changelog](https://keepachangelog.com/) format:\n\n```markdown\n# Changelog\n\n## v1.14.0\n\n### Added\n\n- New feature description\n\n### Changed\n\n- Changes made\n\n### Fixed\n\n- Bugs fixed\n\n## v1.13.0 - 2024-08-15\n\n### Added\n\n- Another feature\n```\n\n**Supported section types:**\n\n- Added\n- Changed\n- Deprecated\n- Removed\n- Fixed\n- Security\n\n## CLI Options\n\n```\nUsage: changelog-extractor [options] [changelog-file] [version]\n\nOptions:\n  -l, --list     List the count of versions found and exit\n  -h, --help     Show help message\n\nArguments:\n  changelog-file  Path to changelog file (default: CHANGELOG.md)\n  version        Specific version to extract (e.g., \"1.14.0\" or \"v1.14.0\")\n                 Leave empty to return all versions\n```\n\n## Programmatic Usage\n\nYou can also use the parser directly in your Node.js code:\n\n```javascript\nconst { parseChangelog } = require('@alleyinteractive/changelog-extractor')\nconst fs = require('fs')\n\nconst changelog = fs.readFileSync('CHANGELOG.md', 'utf8')\n\n// Get all versions\nconst allVersions = parseChangelog(changelog)\n\n// Get specific version\nconst v1 = parseChangelog(changelog, '1.14.0')\n\nconsole.log(JSON.stringify(allVersions, null, 2))\n```\n\n## Development\n\n### Prerequisites\n\n- Node.js 20+\n- npm\n\n### Setup\n\n```bash\nnpm install\n```\n\n### Running Tests\n\n```bash\n# Run tests\nnpm test\n\n# Run with coverage\nnpm run test:coverage\n\n# Watch mode\nnpm run test:watch\n```\n\n### Local Testing\n\n```bash\n# Test the CLI locally\nnode cli.js\nnode cli.js -l\nnode cli.js CHANGELOG.md 1.0.0\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed\nrecently.\n\n## Credits\n\nThis project is actively maintained by\n[Alley Interactive](https://github.com/alleyinteractive).\n\n- [Sean Fisher](https://github.com/srtfisher)\n\n## License\n\nThe GNU General Public License (GPL) license. Please see [License File](LICENSE)\nfor more information.\n","readmeFilename":"README.md"}