{"name":"conventional-changelog-core","version":"1.3.4","description":"conventional-changelog core","repository":{"type":"git","url":"git+https://github.com/conventional-changelog/conventional-changelog-core.git"},"keywords":["conventional-changelog","conventional","changelog","log"],"license":"MIT","dependencies":{"conventional-changelog-writer":"^1.1.0","conventional-commits-parser":"^1.0.0","dateformat":"^1.0.12","get-pkg-repo":"^1.0.0","git-raw-commits":"^1.1.0","git-remote-origin-url":"^2.0.0","git-semver-tags":"^1.1.0","lodash":"^4.0.0","normalize-package-data":"^2.3.5","q":"^1.4.1","read-pkg":"^1.1.0","read-pkg-up":"^1.0.1","through2":"^2.0.0"},"devDependencies":{"chai":"^3.4.1","coveralls":"^2.11.6","git-dummy-commit":"^1.1.0","git-tails":"^1.0.0","istanbul":"^0.4.1","jscs":"^3.0.3","jshint":"^2.9.1","mocha":"*","pinkie-promise":"^2.0.0","semver":"^5.1.0","shelljs":"^0.7.0"},"scripts":{"coverage":"istanbul cover _mocha -- -R spec --timeout 30000 && rm -rf ./coverage","lint":"jshint hosts test *.js --exclude node_modules && jscs hosts test *.js","test":"mocha --timeout 30000 && npm run-script lint"},"gitHead":"5c9b68ebf86bc3406cf98f0b14652ce0bf5c0fb3","bugs":{"url":"https://github.com/conventional-changelog/conventional-changelog-core/issues"},"homepage":"https://github.com/conventional-changelog/conventional-changelog-core#readme","_id":"conventional-changelog-core@1.3.4","_shasum":"aaea95a9c6b6127a1a1233edbb98d8a48c326585","_from":".","_npmVersion":"2.15.0","_nodeVersion":"4.4.2","_npmUser":{"name":"stevemao","email":"maochenyan@gmail.com"},"dist":{"shasum":"aaea95a9c6b6127a1a1233edbb98d8a48c326585","tarball":"http://registry-npm.ywwl.com/conventional-changelog-core/download/conventional-changelog-core-1.3.4.tgz","integrity":"sha512-znszxdKvCTMiE70oS3sLkoDADc+rIEXa9YNsk4wBzpVg6D0zYzn/8L/57vXLfB0NGKLkyeIvwROmRtw2LAJfNw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCkIICdsfrqaYoy3adP2tV2Yw0NdQqBcOOqPasZtmIMSAIgOnt5SNB1zg8ZEMRh3zoy3IiDNw840Jdu1yTT4gs9xhA="}],"size":10606,"noattachment":false,"key":"/conventional-changelog-core/-/conventional-changelog-core-1.3.4.tgz"},"maintainers":[{"name":"stevemao","email":"maochenyan@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/conventional-changelog-core-1.3.4.tgz_1462616331549_0.40135787054896355"},"directories":{},"readme":"#  [![NPM version][npm-image]][npm-url] [![Build Status: Linux][travis-image]][travis-url] [![Build Status: Windows][appveyor-image]][appveyor-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage Status][coverage-image]][coverage-url]\n\n> [conventional-changelog](https://github.com/conventional-changelog/conventional-changelog) core\n\nYou are probably looking for the [cli](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-cli) module. Or use one of the plugins if you are already using the tool:  [grunt](https://github.com/btford/grunt-conventional-changelog)/[gulp](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/gulp-conventional-changelog)/[atom](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-atom).\n\n## Usage\n\n```sh\n$ npm install --save conventional-changelog-core\n```\n\n```js\nimport conventionalChangelogCore from 'conventional-changelog-core';\n\nconventionalChangelogCore()\n  .pipe(process.stdout); // or any writable stream\n```\n\n## API\n\n### conventionalChangelogCore([options, [context, [gitRawCommitsOpts, [parserOpts, [writerOpts]]]]])\n\nReturns a readable stream.\n\n*Note:* [`options.transform`](#transform-1), [`options.pkg.transform`](#transform) and [`writerOpts.transform`](https://github.com/conventional-changelog/conventional-changelog-writer#transform) are different. If you have a better naming suggestion, please send a PR.\n\n#### options\n\n##### config\n\nType: `promise`, `function` or `object`\n\nThis should serve as default values for other arguments of `conventionalChangelogCore` so you don't need to rewrite the same or similar config across your projects. Any value in this could be overwritten.\nIf this is a promise (recommended if async), it should resolve with the config.\nIf this is a function, it expects a node style callback with the config object.\nIf this is an object, it is the config object. The config object should include `context`, `gitRawCommitsOpts`, `parserOpts` and `writerOpts`.\n\n##### pkg\n\nType: `object`\n\n###### path\n\nType: `string` Default: [closest package.json](https://github.com/sindresorhus/read-package-up).\n\nThe location of your \"package.json\".\n\n###### transform\n\nType: `function` Default: pass through.\n\nA function that takes `package.json` data as the argument and returns the modified data. Note this is performed before normalizing package.json data. Useful when you need to add a leading 'v' to your version or modify your repository url, etc.\n\n##### append\n\nType: `boolean` Default: `false`\n\nShould the log be appended to existing data.\n\n##### releaseCount\n\nType: `number` Default: `1`\n\nHow many releases of changelog you want to generate. It counts from the upcoming release. Useful when you forgot to generate any previous changelog. Set to `0` to regenerate all.\n\n##### skipUnstable\n\nType: `boolean` Default: `false`\n\nIf set, unstable release tags will be skipped, e.g., x.x.x-rc.\n\n##### debug\n\nType: `function` Default: `function() {}`\n\nA debug function. EG: `console.debug.bind(console)`\n\n##### warn\n\nType: `function` Default: `options.debug`\n\nA warn function. EG: `grunt.verbose.writeln`\n\n##### transform\n\nType: `function` Default: get the version (without leading 'v') from tag and format date.\n\n###### function(commit, cb)\n\nA transform function that applies after the parser and before the writer.\n\nThis is the place to modify the parsed commits.\n\n####### commit\n\nThe commit from conventional-commits-parser.\n\n####### cb\n\nCallback when you are done.\n\n####### this\n\n`this` arg of transform handler of a stream.\n\n##### outputUnreleased\n\nType: `boolean` Default: `true` if a different version than last release is given. Otherwise `false`.\n\nIf this value is `true` and `context.version` equals last release then `context.version` will be changed to `'Unreleased'`.\n\n**NOTE:** You may want to combine this option with `releaseCount` set to `0` to always overwrite the whole CHANGELOG. `conventional-changelog` only outputs a CHANGELOG but doesn't read any existing one.\n\n##### lernaPackage\n\nSpecify a package in lerna-style monorepo that the CHANGELOG should be generated for.\n\nLerna tags releases in the format `foo-package@1.0.0` and assumes that packages\nare stored in the directory structure `./packages/foo-package`.\n\n##### tagPrefix\n\nSpecify a prefix for the git tag that will be taken into account during the comparison.\nFor instance if your version tag is prefixed by `version/` instead of `v` you would specify `--tagPrefix=version/`\n\n#### context\n\nSee the [conventional-changelog-writer](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-writer) docs. There are some defaults or changes:\n\n##### host\n\nDefault: normalized host found in `package.json`.\n\n##### version\n\nDefault: version found in `package.json`.\n\n##### owner\n\nDefault: extracted from normalized `package.json` `repository.url` field.\n\n##### repository\n\nDefault: extracted from normalized `package.json` `repository.url` field.\n\n##### repoUrl\n\nDefault: The whole normalized repository url in `package.json`.\n\n##### gitSemverTags\n\nType: `array`\n\nAll git semver tags found in the repository. You can't overwrite this value.\n\n##### previousTag\n\nType: `string` Default: previous semver tag or the first commit hash if no previous tag.\n\n##### currentTag\n\nType: `string` Default: current semver tag or `'v'` + version if no current tag.\n\n##### packageData\n\nType: `object`\n\nYour `package.json` data. You can't overwrite this value.\n\n##### linkCompare\n\nType: `boolean` Default: `true` if `previousTag` and `currentTag` are truthy.\n\nShould link to the page that compares current tag with previous tag?\n\n#### gitRawCommitsOpts\n\nSee the [git-raw-commits](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/git-raw-commits) docs. There are some defaults:\n\n##### format\n\nDefault: `'%B%n-hash-%n%H%n-gitTags-%n%d%n-committerDate-%n%ci'`\n\n##### from\n\nDefault: based on `options.releaseCount`.\n\n##### reverse\n\nDefault: `true` if `options.append` is truthy.\n\n##### debug\n\nType: `function` Default: `options.debug`\n\n#### parserOpts\n\nSee the [conventional-commits-parser](https://github.com/conventional-changelog/conventional-commits-parser) docs.\n\n##### warn\n\nDefault: `options.warn`\n\n#### writerOpts\n\nSee the [conventional-changelog-writer](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-writer) docs. There are some defaults:\n\n##### finalizeContext\n\nFinalize context is used for generating above context.\n\n**NOTE:** If you overwrite this value the above context defaults will be gone.\n\n##### debug\n\nType: `function` Default: `options.debug`\n\n##### reverse\n\nDefault: `options.append`\n\n##### doFlush\n\nDefault: `options.outputUnreleased`\n\n\n## Notes for parent modules\n\nThis module has options `append` and `releaseCount`. However, it doesn't read your previous changelog. Reasons being:\n\n1. The old logs is just to be appended or prepended to the newly generated logs, which is a very simple thing that could be done in the parent module.\n2. We want it to be very flexible for the parent module. You could create a readable stream from the file or you could just read the file.\n3. We want the duty of this module to be very minimum.\n\nSo, when you build a parent module, you need to read the old logs and append or prepend to them based on `options.append`. However, if `options.releaseCount` is `0` you need to ignore any previous logs. Please see [conventional-github-releaser](https://github.com/conventional-changelog/conventional-github-releaser) as an example.\n\nArguments passed to `conventionalChangelogCore` will be mutated.\n\n\n## License\n\nMIT\n\n\n[npm-image]: https://badge.fury.io/js/conventional-changelog-core.svg\n[npm-url]: https://npmjs.org/package/conventional-changelog-core\n[travis-image]: https://travis-ci.org/conventional-changelog/conventional-changelog-core.svg?branch=master\n[travis-url]: https://travis-ci.org/conventional-changelog/conventional-changelog-core\n[appveyor-image]: https://ci.appveyor.com/api/projects/status/baoumm34w8c5o0hv/branch/master?svg=true\n[appveyor-url]: https://ci.appveyor.com/project/stevemao/conventional-changelog-core/branch/master\n[daviddm-image]: https://david-dm.org/conventional-changelog/conventional-changelog-core.svg?theme=shields.io\n[daviddm-url]: https://david-dm.org/conventional-changelog/conventional-changelog-core\n[coverage-image]: https://coveralls.io/repos/github/conventional-changelog/conventional-changelog/badge.svg?branch=master\n[coverage-url]: https://coveralls.io/github/conventional-changelog/conventional-changelog?branch=master\n","publish_time":1462616331926,"deprecated":"Deprecated and no longer maintained. Please use conventional-changelog instead.","_cnpm_publish_time":1462616331926,"dist-tags":{"latest":"9.0.0","next":"4.2.1"}}