{"name":"generate-changelog","version":"1.2.0","keywords":["changelog","cli","npm","version","git","semver"],"author":{"name":"Lob","email":"support@lob.com"},"license":"MIT","_id":"generate-changelog@1.2.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":"96fc267fc631be4a321986a39872687d46c2bbbb","tarball":"http://registry-npm.ywwl.com/generate-changelog/download/generate-changelog-1.2.0.tgz","integrity":"sha512-6MzH33EBAU5JlXTb9jcqz1X8Bh1J0e3qmGuCwDJKAY5+eCj+0QWxq3pNBh3Bz+rBye0eH8ou2VQd0sEdf0T5HA==","signatures":[{"sig":"MEYCIQDhpX9GrE0vkRt0asWNsznXyQ5HGrvdkoa82XiRSfoKLQIhAJ9sqABQ3iYadBX0BJhSttHfYY3Q+RpUb0VmlSeZ9XJ/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"size":24785,"noattachment":false,"key":"/generate-changelog/-/generate-changelog-1.2.0.tgz"},"main":"./lib/index.js","_from":".","engine":{"node":">= 0.10.x"},"_shasum":"96fc267fc631be4a321986a39872687d46c2bbbb","gitHead":"807e2e4b25ee755f4a46cea54d7f50837f609bef","scripts":{"lint":"eslint .","test":"NODE_ENV=test istanbul cover _mocha -- test --recursive --timeout 30000","coveralls":"cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","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":"4.2.0","description":"Generate a changelog from git commits.","directories":{"test":"test"},"_nodeVersion":"7.10.0","dependencies":{"bluebird":"^3.0.6","commander":"^2.9.0","github-url-from-git":"^1.4.0"},"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":"1.0.x"},"_npmOperationalInternal":{"tmp":"tmp/generate-changelog-1.2.0.tgz_1497288424405_0.5616316825617105","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":1497288424600,"_cnpm_publish_time":1497288424600,"dist-tags":{"latest":"1.8.0"}}