{"_id":"@crcong/generate-changelog","name":"@crcong/generate-changelog","dist-tags":{"latest":"1.8.1"},"versions":{"1.8.1":{"name":"@crcong/generate-changelog","version":"1.8.1","description":"Generate a changelog from git commits.","bin":{"generate-changelog":"bin/generate","changelog":"bin/generate"},"main":"./lib/index.js","directories":{"test":"test"},"publishConfig":{"access":"public"},"scripts":{"release:major":"./bin/generate -M && git add CHANGELOG.md && git commit -m 'updated CHANGELOG.md' && npm version major && git push origin && git push origin --tags","release:minor":"./bin/generate -m && git add CHANGELOG.md && git commit -m 'updated CHANGELOG.md' && npm version minor && git push origin && git push origin --tags","release:patch":"./bin/generate -p && git add CHANGELOG.md && git commit -m 'updated CHANGELOG.md' && npm version patch && git push origin && git push origin --tags","coveralls":"cat ./coverage/lcov.info | coveralls","lint":"eslint .","test":"NODE_ENV=test istanbul cover _mocha -- test --recursive --timeout 30000","test-no-cover":"NODE_ENV=test mocha test --recursive --timeout 30000"},"repository":{"type":"git","url":"git+https://github.com/lob/generate-changelog.git"},"keywords":["changelog","cli","npm","version","git","semver"],"author":{"name":"Lob","email":"support@lob.com"},"license":"MIT","bugs":{"url":"https://github.com/lob/generate-changelog/issues"},"homepage":"https://github.com/lob/generate-changelog#readme","dependencies":{"bluebird":"^3.0.6","commander":"^2.9.0","github-url-from-git":"^1.4.0"},"devDependencies":{"chai":"^3.4.1","chai-as-promised":"^5.1.0","coveralls":"^2.11.6","eslint":"^1.10.3","eslint-config-lob":"^2.4.0","eslint-plugin-lob":"^1.1.0","istanbul":"^0.4.1","mocha":"^2.3.4","sinon":"^1.17.2"},"engine":{"node":">= 0.10.x"},"gitHead":"30697f76089f70a57e365b441c68108bfb6b89bd","_id":"@crcong/generate-changelog@1.8.1","_nodeVersion":"14.17.5","_npmVersion":"7.20.5","dist":{"integrity":"sha512-J+fUh2t/IychpTQGP21JnDvjzSIEmWiuwPym1NUVG4X4brUpuglJYP7XHlRbrDkrfFHGPxKY4DmVxdaLvkSTjw==","shasum":"5c0ce38029ac3a6dee610f0e7c219f117ff9a131","tarball":"https://registry.npmjs.org/@crcong/generate-changelog/-/generate-changelog-1.8.1.tgz","fileCount":14,"unpackedSize":82912,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD+hptGLM4GiPMZfwJRVrv09FDDromu/iKahNsQz6UOFQIhAJMSMfPYHk8UASOFXHjQWGNF8S9TRi5joUtPSCzLOiUV"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJibAOwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp9IA//ZFANipuPBK6UmhiGEtt5hOzD3MRIfnYqUHCfDhLp/4cuUsbG\r\nNbPQw/KQ8HpPFqTE5yL7tHQIGUiKyLcTIvDgVh30hKyzTL+Mjp+F+jQ9PbLm\r\ndIEZ5z1vtxzvpsv9jJOpdfeHQSaxb0/wX2v9oKxf9Ve6cgXZoLdklZCmqjH/\r\nwloROdoZVm0TG+kr3vCYkioyh3AhCn9O5SiqWB4RXrlNeCpmVHh+zRCP5eox\r\nlPy/317Pu2n+tWV4vr1SeS2CCSMwC2yy33w73uxdk2XdZ6/GmxiSX/ZJaBoW\r\nIazFvspz939egijUEdUXLsM6cevYXZzUttst7Ltp6HMaQy2defQsKU304Z6O\r\nKSSDCgYFbh5f0Ww9qAooROopYC/ag7uKn0wFu2aH9wVKcuWDD/ZYxwFyTx5d\r\n04EZb+paEt052xh+RG6nKt9GosLY0zUYWXN53QGb8JhW05an9+H3wCJ5dvH0\r\n+LWwXmczCSNqcfBQOpLKEIOyMEJbtgkd2xK2AlXDmTHLD8FRaOFaeL8VSavC\r\nuVldS10ISl+EVIZd3/nnUjoxWSAEeSxX2iSACVp/m4bs/ZDGMld5i6/FAinW\r\nYBhjnv0v34Ug/YgXWzDvVHwcZCZvzU5uFZOUq0wdgrKXf98theIiIsyPgSui\r\nvuw5YMuptH/H6BiC6JunHkVPf0tsKnLYfWM=\r\n=iXcP\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"crcong","email":"crcong@foxmail.com"},"maintainers":[{"name":"crcong","email":"crcong@foxmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/generate-changelog_1.8.1_1651246000815_0.0815069926660017"},"_hasShrinkwrap":false}},"time":{"created":"2022-04-29T15:26:40.759Z","1.8.1":"2022-04-29T15:26:40.951Z","modified":"2022-04-29T15:26:41.095Z"},"maintainers":[{"name":"crcong","email":"crcong@foxmail.com"}],"description":"Generate a changelog from git commits.","homepage":"https://github.com/lob/generate-changelog#readme","keywords":["changelog","cli","npm","version","git","semver"],"repository":{"type":"git","url":"git+https://github.com/lob/generate-changelog.git"},"author":{"name":"Lob","email":"support@lob.com"},"bugs":{"url":"https://github.com/lob/generate-changelog/issues"},"license":"MIT","readme":"# Generate Changelog\n\n> forked from https://github.com/lob/generate-changelog\n> fixed title has colon case\n\n[![NPM Version](https://badge.fury.io/js/generate-changelog.svg)](https://www.npmjs.com/package/generate-changelog)\n[![Build Status](https://travis-ci.org/lob/generate-changelog.svg)](https://travis-ci.org/lob/generate-changelog)\n[![Coverage Status](https://coveralls.io/repos/lob/generate-changelog/badge.svg?branch=master&service=github)](https://coveralls.io/github/lob/generate-changelog?branch=master)\n[![Dependency Status](https://david-dm.org/lob/generate-changelog.svg)](https://david-dm.org/lob/generate-changelog)\n\nGenerate a changelog from git commits. This is meant to be used so that for every patch, minor, or major version, you update the changelog _prior_ to running `npm version` so that the git tag contains the commit that updated both the changelog and version.\n\n## Installation\n\nYou can either install it as a dev dependency to be referenced in your npm scripts, or you can install this module globally to be used for all of your repos on your local machine.\n\n```bash\n$ npm i generate-changelog -D # install it as a dev dependency\n# OR\n$ npm i generate-changelog -g # install it globally\n```\n\n## Usage\n\nTo use this module, your commit messages have to be in this format:\n\n```\ntype(category): description [flags]\n```\n\nWhere `type` is one of the following:\n\n* `breaking`\n* `build`\n* `ci`\n* `chore`\n* `docs`\n* `feat`\n* `fix`\n* `other`\n* `perf`\n* `refactor`\n* `revert`\n* `style`\n* `test`\n\nWhere `flags` is an optional comma-separated list of one or more of the following (must be surrounded in square brackets):\n\n* `breaking`: alters `type` to be a breaking change\n\nAnd `category` can be anything of your choice. If you use a type not found in the list (but it still follows the same format of the message), it'll be grouped under `other`.\n\n### CLI\n\nYou can run this module as a CLI app that prepends the new logs to a file (recommended):\n\n```bash\n$ changelog -h\n\n  Usage: generate [options]\n\n  Generate a changelog from git commits.\n\n  Options:\n\n    -h, --help             output usage information\n    -V, --version          output the version number\n    -p, --patch            create a patch changelog\n    -m, --minor            create a minor changelog\n    -M, --major            create a major changelog\n    -t, --tag <range>      generate from specific tag or range (e.g. v1.2.3 or v1.2.3..v1.2.4)\n    -x, --exclude <types>  exclude selected commit types (comma separated)\n    -f, --file [file]      file to write to, defaults to ./CHANGELOG.md, use - for stdout\n    -u, --repo-url [url]   specify the repo URL for commit links, defaults to checking the package.json\n    -a, --allow-unknown    allow unknown commit types\n```\n\nIt's possible to create a `./CHANGELOG.md` file for a specific commit range:\n\n```bash\ngenerate-changelog 420c945...2a83752\n```\n\nGit tags are supported too:\n\n```bash\ngenerate-changelog release/3.1.2822...release/3.1.2858\n```\n\n### Code\n\nYou can write a script that calls the `generate` function and does whatever you want with the new logs:\n\n```js\nvar Changelog = require('generate-changelog');\nvar Fs        = require('fs');\n\nreturn Changelog.generate({ patch: true, repoUrl: 'https://github.com/lob/generate-changelog' })\n.then(function (changelog) {\n  Fs.writeFileSync('./CHANGELOG.md', changelog);\n});\n```\n\n### Recommended\n\nThe way that I would recommend using this module would be the way it's being used in this module: as npm scripts. You should install it as a dev dependency and then add the following to the `scripts` object in your `package.json`:\n\n```json\n\"release:major\": \"changelog -M && git add CHANGELOG.md && git commit -m 'updated CHANGELOG.md' && npm version major && git push origin && git push origin --tags\",\n\"release:minor\": \"changelog -m && git add CHANGELOG.md && git commit -m 'updated CHANGELOG.md' && npm version minor && git push origin && git push origin --tags\",\n\"release:patch\": \"changelog -p && git add CHANGELOG.md && git commit -m 'updated CHANGELOG.md' && npm version patch && git push origin && git push origin --tags\",\n```\n\n### GitHub Actions\n\nYou can run this module in a GitHub Actions workflow using the [generate-changelog-action](https://github.com/marketplace/actions/generate-changelog-action) Action.\n\n## Testing\n\nTo run the test suite, just clone the repository and run the following:\n\n```bash\n$ npm i\n$ npm test\n```\n\n## Contributing\n\nTo contribute, please see the [CONTRIBUTING.md](CONTRIBUTING.md) file.\n\n## License\n\nThis project is released under the MIT license, which can be found in [`LICENSE.txt`](LICENSE.txt).\n","readmeFilename":"README.md"}