{"name":"generate-changelog","version":"1.8.0","keywords":["changelog","cli","npm","version","git","semver"],"author":{"name":"Lob","email":"support@lob.com"},"license":"MIT","_id":"generate-changelog@1.8.0","maintainers":[{"name":"lob","email":"engineering@lob.com"}],"homepage":"https://github.com/lob/generate-changelog#readme","bugs":{"url":"https://github.com/lob/generate-changelog/issues"},"bin":{"changelog":"./bin/generate","generate-changelog":"./bin/generate"},"dist":{"shasum":"1d788cdef5a13a649da7eb2a1f3b02674850e4a8","tarball":"http://registry-npm.ywwl.com/generate-changelog/download/generate-changelog-1.8.0.tgz","fileCount":13,"integrity":"sha512-msgpxeB75Ziyg3wGsZuPNl7c5RxChMKmYcAX5obnhUow90dBZW3nLic6nxGtst7Bpx453oS6zAIHcX7F3QVasw==","signatures":[{"sig":"MEUCIAQ/H464HmT1bTQfkBzAMWyx3t51dTppNvxDpZZ1ZczuAiEA9Qh4kX+CgFBx5nYrNKGMPUk8AfNg3UHiSoFdz2Zw+TQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25036,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdEmJACRA9TVsSAnZWagAAFQwP+gMjkOYm9Y07oeUU9uvc\nPG25sUBLRh8GujHm3FxLNfN3vVWqGtL1e95hYzHLYKEDLqAdvzm1nUdp51Rm\n2slag3MV2KxhGgI1Z/Kj8PEwAKYjpaQzlf7QQ84xgkFaB2YhGV3dTdHk6NKy\nGBxzX0dweTWmw5VUXLqkwXwO4JfUjClnuLogcES9bBmWYrPnRCyq6Bw072bu\n1feqK3RgqXfQzxFT1TVgqw5e/1ksKhUpF0s7LwFgtoS6r0rN8X0ZPfAwc1Da\nW+wyRbA2QSHue7PdZwXGWyBHrn2LJi7g6vPeqBwufhamL+EvF5uo5apMtqRJ\nnQMzbFsNO04T28SgSwe1FG8Wpo07WzOgVLPg9rb10dNv78L6qXAXmjzPTYjr\nsUIqAhN9TgVnWNIVukZ1/l6YGDoh+bQ7NQhX5XkMD9Uyx+yVWYpVjdVvxEFY\nY9mYyOZxEzW7ja5/UoQ3PO3QkeM8NV4iY0+J8sWcRBm3Q3LTyaKu/Cv9E6TS\n86vivjE2qBZtgT/ypTav0vupWpDzJ2g0pUjt4nTnLY2XuVjRiC4i6vKkqxtd\ny1bOdMhk9vplF/yNpnmd5/VlXLIkD3QcxhzLBQzcwjVXBi3mQFCtUV0aIybX\njqAzCweGFaNqKwOEww2wloHqtbb3m4d0pG2lmet2SzVeC8ZGKfVjaISjQAg3\nQKdP\r\n=tS4w\r\n-----END PGP SIGNATURE-----\r\n","size":8670,"noattachment":false,"key":"/generate-changelog/-/generate-changelog-1.8.0.tgz"},"main":"./lib/index.js","engine":{"node":">= 0.10.x"},"gitHead":"55256c98689321ae783d24c0339c277f54592ac2","scripts":{"lint":"eslint .","test":"NODE_ENV=test istanbul cover _mocha -- test --recursive --timeout 30000","coveralls":"cat ./coverage/lcov.info | coveralls","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","test-no-cover":"NODE_ENV=test mocha test --recursive --timeout 30000"},"_npmUser":{"name":"lob","email":"engineering@lob.com"},"repository":{"url":"git+https://github.com/lob/generate-changelog.git","type":"git"},"_npmVersion":"6.9.1-next.0","description":"Generate a changelog from git commits.","directories":{"test":"test"},"_nodeVersion":"12.1.0","dependencies":{"bluebird":"^3.0.6","commander":"^2.9.0","github-url-from-git":"^1.4.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^3.4.1","mocha":"^2.3.4","sinon":"^1.17.2","eslint":"^1.10.3","istanbul":"^0.4.1","coveralls":"^2.11.6","chai-as-promised":"^5.1.0","eslint-config-lob":"^2.4.0","eslint-plugin-lob":"^1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/generate-changelog_1.8.0_1561485887820_0.28273134551500356","host":"s3://npm-registry-packages"},"readme":"# Generate Changelog\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 unkown 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## 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","publish_time":1561485888185,"_cnpm_publish_time":1561485888185,"dist-tags":{"latest":"1.8.0"}}