mirror of
https://github.com/morhetz/gruvbox.git
synced 2025-11-18 00:03:38 -05:00
chore(package): re-init package with commitizen and standard-release
This commit is contained in:
398
node_modules/conventional-changelog-writer/CHANGELOG.md
generated
vendored
Normal file
398
node_modules/conventional-changelog-writer/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,398 @@
|
||||
# Change Log
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
<a name="3.0.9"></a>
|
||||
## [3.0.9](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-writer@3.0.8...conventional-changelog-writer@3.0.9) (2018-03-28)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* revert previous change ([2f4530f](https://github.com/conventional-changelog/conventional-changelog/commit/2f4530f))
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="3.0.8"></a>
|
||||
## [3.0.8](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-writer@3.0.7...conventional-changelog-writer@3.0.8) (2018-03-27)
|
||||
|
||||
|
||||
|
||||
|
||||
**Note:** Version bump only for package conventional-changelog-writer
|
||||
|
||||
<a name="3.0.7"></a>
|
||||
## [3.0.7](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-writer@3.0.6...conventional-changelog-writer@3.0.7) (2018-03-27)
|
||||
|
||||
|
||||
|
||||
|
||||
**Note:** Version bump only for package conventional-changelog-writer
|
||||
|
||||
<a name="3.0.6"></a>
|
||||
## [3.0.6](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-writer@3.0.5...conventional-changelog-writer@3.0.6) (2018-03-27)
|
||||
|
||||
|
||||
|
||||
|
||||
**Note:** Version bump only for package conventional-changelog-writer
|
||||
|
||||
<a name="3.0.5"></a>
|
||||
## [3.0.5](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-writer@3.0.4...conventional-changelog-writer@3.0.5) (2018-03-22)
|
||||
|
||||
|
||||
|
||||
|
||||
**Note:** Version bump only for package conventional-changelog-writer
|
||||
|
||||
<a name="3.0.4"></a>
|
||||
## [3.0.4](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-writer@3.0.3...conventional-changelog-writer@3.0.4) (2018-02-24)
|
||||
|
||||
|
||||
|
||||
|
||||
**Note:** Version bump only for package conventional-changelog-writer
|
||||
|
||||
<a name="3.0.3"></a>
|
||||
## [3.0.3](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-writer@3.0.2...conventional-changelog-writer@3.0.3) (2018-02-20)
|
||||
|
||||
|
||||
|
||||
|
||||
**Note:** Version bump only for package conventional-changelog-writer
|
||||
|
||||
<a name="3.0.2"></a>
|
||||
## [3.0.2](https://github.com/conventional-changelog/conventional-changelog-writer/compare/conventional-changelog-writer@3.0.1...conventional-changelog-writer@3.0.2) (2018-02-13)
|
||||
|
||||
|
||||
|
||||
|
||||
**Note:** Version bump only for package conventional-changelog-writer
|
||||
|
||||
<a name="3.0.1"></a>
|
||||
## [3.0.1](https://github.com/conventional-changelog/conventional-changelog-writer/compare/conventional-changelog-writer@3.0.0...conventional-changelog-writer@3.0.1) (2018-02-13)
|
||||
|
||||
|
||||
|
||||
|
||||
**Note:** Version bump only for package conventional-changelog-writer
|
||||
|
||||
<a name="3.0.0"></a>
|
||||
# [3.0.0](https://github.com/conventional-changelog/conventional-changelog-writer/compare/conventional-changelog-writer@2.0.3...conventional-changelog-writer@3.0.0) (2018-01-29)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **writer:** normalize release headings ([#237](https://github.com/conventional-changelog/conventional-changelog-writer/issues/237)) ([9e87dc3](https://github.com/conventional-changelog/conventional-changelog-writer/commit/9e87dc3)), closes [/github.com/conventional-changelog/conventional-changelog/issues/214#issuecomment-326681934](https://github.com//github.com/conventional-changelog/conventional-changelog/issues/214/issues/issuecomment-326681934)
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* **writer:** Logic for generating release headings has been changed to make all
|
||||
heading levels the same (`##`/`h2`) for better compatibility with
|
||||
screen readers and parsers, and to conform to HTML semantics. Patch
|
||||
release titles are now wrapped in a `<small>` tag to maintain the
|
||||
visual hierarchy of the previous style.
|
||||
|
||||
Fixes https://github.com/conventional-changelog/conventional-changelog/issues/214
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="2.0.3"></a>
|
||||
## [2.0.3](https://github.com/conventional-changelog/conventional-changelog-writer/compare/conventional-changelog-writer@2.0.2...conventional-changelog-writer@2.0.3) (2017-12-08)
|
||||
|
||||
|
||||
|
||||
|
||||
**Note:** Version bump only for package conventional-changelog-writer
|
||||
|
||||
<a name="2.0.2"></a>
|
||||
## [2.0.2](https://github.com/conventional-changelog/conventional-changelog-writer/compare/conventional-changelog-writer@2.0.1...conventional-changelog-writer@2.0.2) (2017-11-13)
|
||||
|
||||
|
||||
|
||||
|
||||
**Note:** Version bump only for package conventional-changelog-writer
|
||||
|
||||
<a name="2.0.1"></a>
|
||||
## [2.0.1](https://github.com/conventional-changelog/conventional-changelog-writer/compare/conventional-changelog-writer@2.0.0...conventional-changelog-writer@2.0.1) (2017-09-01)
|
||||
|
||||
<a name="2.0.0"></a>
|
||||
# 2.0.0 (2017-07-17)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **cli:** options format ([41c813b](https://github.com/conventional-changelog/conventional-changelog-writer/commit/41c813b))
|
||||
* **cli:** require file with absolute path ([fe2b5fe](https://github.com/conventional-changelog/conventional-changelog-writer/commit/fe2b5fe)), closes [#13](https://github.com/conventional-changelog/conventional-changelog-writer/issues/13)
|
||||
* **cli:** use absolute path to require context and options ([08808fe](https://github.com/conventional-changelog/conventional-changelog-writer/commit/08808fe))
|
||||
* **cli:** when it is not tty, it should exit if errors ([aa8708c](https://github.com/conventional-changelog/conventional-changelog-writer/commit/aa8708c))
|
||||
* **context:** auto link references if repoUrl ([d5d66f3](https://github.com/conventional-changelog/conventional-changelog-writer/commit/d5d66f3))
|
||||
* **context.version:** only valid a semver can decide `context.isPatch` ([8dbc53a](https://github.com/conventional-changelog/conventional-changelog-writer/commit/8dbc53a))
|
||||
* **date:** should use committerDate not authorDate ([fbdf73d](https://github.com/conventional-changelog/conventional-changelog-writer/commit/fbdf73d))
|
||||
* **deps:** concat-stream should be in devdeps ([e90881c](https://github.com/conventional-changelog/conventional-changelog-writer/commit/e90881c))
|
||||
* **deps:** require split2 ([59db605](https://github.com/conventional-changelog/conventional-changelog-writer/commit/59db605))
|
||||
* **doFlush:** correct logic ([38e3c03](https://github.com/conventional-changelog/conventional-changelog-writer/commit/38e3c03)), closes [#19](https://github.com/conventional-changelog/conventional-changelog-writer/issues/19)
|
||||
* **doFlush:** one it is the only potential release ([3d600cf](https://github.com/conventional-changelog/conventional-changelog-writer/commit/3d600cf))
|
||||
* **err:** catch any possible error ([c934f50](https://github.com/conventional-changelog/conventional-changelog-writer/commit/c934f50))
|
||||
* **error:** handle errors properly ([bde1200](https://github.com/conventional-changelog/conventional-changelog-writer/commit/bde1200))
|
||||
* **firstRelease:** correct logic ([ccc02e1](https://github.com/conventional-changelog/conventional-changelog-writer/commit/ccc02e1))
|
||||
* **functionify:** should not change falsy values ([1aed002](https://github.com/conventional-changelog/conventional-changelog-writer/commit/1aed002))
|
||||
* **generateOn:** should pass the transformed commit ([2b6cc6c](https://github.com/conventional-changelog/conventional-changelog-writer/commit/2b6cc6c))
|
||||
* **host:** auto removes "/" at the end of `options.host` ([2bdadf0](https://github.com/conventional-changelog/conventional-changelog-writer/commit/2bdadf0))
|
||||
* **keyCommit:** all fields of `keyCommit` overwrites `context` ([63296b5](https://github.com/conventional-changelog/conventional-changelog-writer/commit/63296b5)), closes [#5](https://github.com/conventional-changelog/conventional-changelog-writer/issues/5)
|
||||
* **linkReferences:** can be changed to `false` ([a56f9fd](https://github.com/conventional-changelog/conventional-changelog-writer/commit/a56f9fd))
|
||||
* **notes:** do not include reverted notes ([4e60fe2](https://github.com/conventional-changelog/conventional-changelog-writer/commit/4e60fe2))
|
||||
* **notesSort:** defaults to sort on `text` ([3511ffb](https://github.com/conventional-changelog/conventional-changelog-writer/commit/3511ffb))
|
||||
* **options:** only apply default transform in certain conditions ([6080181](https://github.com/conventional-changelog/conventional-changelog-writer/commit/6080181))
|
||||
* **partials:** only register if its a string ([915cbeb](https://github.com/conventional-changelog/conventional-changelog-writer/commit/915cbeb))
|
||||
* **reverse:** should be the other way ([b4156e3](https://github.com/conventional-changelog/conventional-changelog-writer/commit/b4156e3))
|
||||
* **template:** commit template markdown ([0949b5a](https://github.com/conventional-changelog/conventional-changelog-writer/commit/0949b5a))
|
||||
* linting ([33ac525](https://github.com/conventional-changelog/conventional-changelog-writer/commit/33ac525))
|
||||
* **template:** default commit template should handle unkown host ([d1ed4fc](https://github.com/conventional-changelog/conventional-changelog-writer/commit/d1ed4fc))
|
||||
* **template:** remove an extra newline in footer ([f6180c5](https://github.com/conventional-changelog/conventional-changelog-writer/commit/f6180c5))
|
||||
* **template:** should not html escape ([e4e33ae](https://github.com/conventional-changelog/conventional-changelog-writer/commit/e4e33ae))
|
||||
* **template:** tweak ([ef6996a](https://github.com/conventional-changelog/conventional-changelog-writer/commit/ef6996a))
|
||||
* **templates:** generate correct url if only host exists ([35f1799](https://github.com/conventional-changelog/conventional-changelog-writer/commit/35f1799))
|
||||
* **templates:** incase partial is empty also don't ignore default partials ([d90fb65](https://github.com/conventional-changelog/conventional-changelog-writer/commit/d90fb65))
|
||||
* **transform:** do not strip leading v ([8e2da57](https://github.com/conventional-changelog/conventional-changelog-writer/commit/8e2da57))
|
||||
* **transform:** should work if any field is missing ([fd413ed](https://github.com/conventional-changelog/conventional-changelog-writer/commit/fd413ed))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **defaults:** merge default options and make it less angular ([8e29f96](https://github.com/conventional-changelog/conventional-changelog-writer/commit/8e29f96)), closes [#3](https://github.com/conventional-changelog/conventional-changelog-writer/issues/3) [#4](https://github.com/conventional-changelog/conventional-changelog-writer/issues/4)
|
||||
* migrate repo to lerna mono-repo ([793e823](https://github.com/conventional-changelog/conventional-changelog-writer/commit/793e823))
|
||||
* **transform:** if returns a falsy value this commit is ignored ([9508ed6](https://github.com/conventional-changelog/conventional-changelog-writer/commit/9508ed6))
|
||||
* use new api of `references` and `notes` ([4d27326](https://github.com/conventional-changelog/conventional-changelog-writer/commit/4d27326))
|
||||
* **cli:** version can be passed directly as an input ([cadf7af](https://github.com/conventional-changelog/conventional-changelog-writer/commit/cadf7af))
|
||||
* **commit:** `raw` object is attached to `commit` ([2ea9f04](https://github.com/conventional-changelog/conventional-changelog-writer/commit/2ea9f04))
|
||||
* **commit.hbs:** scope can be missing ([82e0ffa](https://github.com/conventional-changelog/conventional-changelog-writer/commit/82e0ffa))
|
||||
* **commit.hbs:** use `header` if `subject` is missing ([5e475a0](https://github.com/conventional-changelog/conventional-changelog-writer/commit/5e475a0))
|
||||
* **compareFunc:** these values can be string or array ([464988c](https://github.com/conventional-changelog/conventional-changelog-writer/commit/464988c))
|
||||
* **compareFunc:** use module "compare-func" ([520014e](https://github.com/conventional-changelog/conventional-changelog-writer/commit/520014e))
|
||||
* **context:** expose `finalizeContext` to modify context at last ([d5545c0](https://github.com/conventional-changelog/conventional-changelog-writer/commit/d5545c0))
|
||||
* **context:** fallback to repoUrl ([dc9c626](https://github.com/conventional-changelog/conventional-changelog-writer/commit/dc9c626))
|
||||
* **context:** linkReferences has nothing to do with context.host ([1656df8](https://github.com/conventional-changelog/conventional-changelog-writer/commit/1656df8))
|
||||
* **debug:** convient function for debugging ([c041e35](https://github.com/conventional-changelog/conventional-changelog-writer/commit/c041e35))
|
||||
* **flush:** add `options.doFlush` to make it possible not to flush ([2fdf142](https://github.com/conventional-changelog/conventional-changelog-writer/commit/2fdf142))
|
||||
* **generate:** originalCommits as last argument ([797fa8c](https://github.com/conventional-changelog/conventional-changelog-writer/commit/797fa8c))
|
||||
* **generateOn:** also pass commits, context and options to the function ([a59c73c](https://github.com/conventional-changelog/conventional-changelog-writer/commit/a59c73c)), closes [ajoslin/conventional-changelog#135](https://github.com/ajoslin/conventional-changelog/issues/135)
|
||||
* **generateOn:** by default if `commit.version` is a valid semver ([19ad3b1](https://github.com/conventional-changelog/conventional-changelog-writer/commit/19ad3b1))
|
||||
* **generateOn:** if the commit is ignored fall back on the original ([be5723a](https://github.com/conventional-changelog/conventional-changelog-writer/commit/be5723a))
|
||||
* **generateOn:** log doesn't have to be generated once ([ff88a62](https://github.com/conventional-changelog/conventional-changelog-writer/commit/ff88a62))
|
||||
* **generateOn:** other type to disable ([9c50b90](https://github.com/conventional-changelog/conventional-changelog-writer/commit/9c50b90))
|
||||
* **includeDetails:** return an object that contains more details ([81e79f7](https://github.com/conventional-changelog/conventional-changelog-writer/commit/81e79f7))
|
||||
* **map:** change `options.replacements` to `options.map` ([d0a04ef](https://github.com/conventional-changelog/conventional-changelog-writer/commit/d0a04ef))
|
||||
* **maxSubjectLength:** added ([83c98b9](https://github.com/conventional-changelog/conventional-changelog-writer/commit/83c98b9))
|
||||
* **noteGroups:** remove and add note title transform ([abedbfd](https://github.com/conventional-changelog/conventional-changelog-writer/commit/abedbfd))
|
||||
* **notes:** attach the commit to the note ([af89d4a](https://github.com/conventional-changelog/conventional-changelog-writer/commit/af89d4a)), closes [#12](https://github.com/conventional-changelog/conventional-changelog-writer/issues/12)
|
||||
* **owner:** add owner context ([8d7b5d9](https://github.com/conventional-changelog/conventional-changelog-writer/commit/8d7b5d9)), closes [#7](https://github.com/conventional-changelog/conventional-changelog-writer/issues/7)
|
||||
* **reverse:** new options for commits that are poured reversely ([613651e](https://github.com/conventional-changelog/conventional-changelog-writer/commit/613651e))
|
||||
* **revert:** ignore reverted commits ([0f279ad](https://github.com/conventional-changelog/conventional-changelog-writer/commit/0f279ad))
|
||||
* **transform:** add a transform option ([b05dc2e](https://github.com/conventional-changelog/conventional-changelog-writer/commit/b05dc2e)), closes [#2](https://github.com/conventional-changelog/conventional-changelog-writer/issues/2)
|
||||
* **transform:** also pass context as an arg ([76b869d](https://github.com/conventional-changelog/conventional-changelog-writer/commit/76b869d))
|
||||
* **version:** is not a required field any more ([3790d8f](https://github.com/conventional-changelog/conventional-changelog-writer/commit/3790d8f))
|
||||
* **version:** strip leading v by default ([43c2c7e](https://github.com/conventional-changelog/conventional-changelog-writer/commit/43c2c7e))
|
||||
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* **get/set:** drop dot-prop and just use lodash ([601e580](https://github.com/conventional-changelog/conventional-changelog-writer/commit/601e580))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* **context:** `context.host` cannot change the default of `context.linkReferences` because if the host is unknown, `context.host` is `undefined` and all links will just use `context.repository`.
|
||||
* The upstream must use the new api of `references` and `notes`.
|
||||
|
||||
`closes` now becomes `references`
|
||||
The `notes` object is no longer a key-value object but an array of note object, such as
|
||||
```js
|
||||
{
|
||||
title: 'BREAKING AMEND',
|
||||
text: 'some breaking change'
|
||||
}
|
||||
```
|
||||
* **notes:** `includeDetails` will only include `log` and `keyCommit`.
|
||||
* **templates:** If `partials` is not empty, it should not ignore header, commit and footer partials.
|
||||
* **reverse:** when there is no commits left for the last block of logs it will still try to generate one. (Assume commits might be rebased or lost but still need a new version).
|
||||
* **noteGroups:** `options.noteGroups` is no longer available. Filter the notes from upstream or in `options.transform` instead.
|
||||
* **notes:** `notes` in `noteGroups` is not an array of simple string any more but object. You must use `note.text` to access the equivalent of previous `note`.
|
||||
* **cli:** Previously version number has to be passed as a flag. As a version number is compulsory, it does not make sense for a flag to be compulsory. So if a version number is passed as an input it is still valid.
|
||||
* **transform:** `options.hashLength`, `options.maxSubjectLength` and `options.map` are deprecated in favour of `options.transform`.
|
||||
* **map:** `options.replacements` is now `options.map` and it can also take functions
|
||||
* **compareFunc:** commitGroupsCompareFn -> commitGroupsSort, commitsCompareFn -> commitsSort, noteGroupsCompareFn -> noteGroupsSort and notesCompareFn -> notesSort
|
||||
* **compareFunc:** Default compare functions no longer sort by lexicographical order. They use `localeCompare` instead
|
||||
* **version:** `version` is not a required field and it is moved to the `context` object. If version is found in the last commit, it will be overwritten.
|
||||
|
||||
<a name="1.4.1"></a>
|
||||
## [1.4.1](https://github.com/conventional-changelog/conventional-changelog-writer/compare/v1.4.0...v1.4.1) (2016-05-10)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **context:** auto link references if repoUrl([30bb234](https://github.com/conventional-changelog/conventional-changelog-writer/commit/30bb234))
|
||||
|
||||
|
||||
|
||||
<a name="1.4.0"></a>
|
||||
# [1.4.0](https://github.com/conventional-changelog/conventional-changelog-writer/compare/v1.3.0...v1.4.0) (2016-05-10)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **context:** fallback to repoUrl([e504682](https://github.com/conventional-changelog/conventional-changelog-writer/commit/e504682))
|
||||
|
||||
|
||||
|
||||
<a name="1.3.0"></a>
|
||||
# [1.3.0](https://github.com/conventional-changelog/conventional-changelog-writer/compare/v1.2.1...v1.3.0) (2016-05-08)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **debug:** convient function for debugging([3b6233f](https://github.com/conventional-changelog/conventional-changelog-writer/commit/3b6233f))
|
||||
|
||||
|
||||
|
||||
<a name="1.2.1"></a>
|
||||
## [1.2.1](https://github.com/conventional-changelog/conventional-changelog-writer/compare/v1.2.0...v1.2.1) (2016-04-19)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **templates:** generate correct url if only host exists ([bda0328](https://github.com/conventional-changelog/conventional-changelog-writer/commit/bda0328))
|
||||
|
||||
|
||||
|
||||
<a name="1.2.0"></a>
|
||||
# [1.2.0](https://github.com/conventional-changelog/conventional-changelog-writer/compare/v1.1.1...v1.2.0) (2016-04-17)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **transform:** also pass context as an arg ([9bd984c](https://github.com/conventional-changelog/conventional-changelog-writer/commit/9bd984c))
|
||||
|
||||
|
||||
|
||||
<a name="1.1.1"></a>
|
||||
## [1.1.1](https://github.com/stevemao/conventional-changelog-writer/compare/v1.1.0...v1.1.1) (2016-02-29)
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="1.1.0"></a>
|
||||
# [1.1.0](https://github.com/stevemao/conventional-changelog-writer/compare/v1.0.3...v1.1.0) (2016-02-08)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **generate:** originalCommits as last argument ([186bfb9](https://github.com/stevemao/conventional-changelog-writer/commit/186bfb9))
|
||||
|
||||
|
||||
|
||||
<a name="1.0.3"></a>
|
||||
## [1.0.3](https://github.com/stevemao/conventional-changelog-writer/compare/v1.0.2...v1.0.3) (2016-02-06)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **firstRelease:** correct logic ([43552a2](https://github.com/stevemao/conventional-changelog-writer/commit/43552a2))
|
||||
|
||||
|
||||
|
||||
<a name="1.0.2"></a>
|
||||
## [1.0.2](https://github.com/stevemao/conventional-changelog-writer/compare/v1.0.1...v1.0.2) (2016-02-06)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **doFlush:** one it is the only potential release ([cc3b5db](https://github.com/stevemao/conventional-changelog-writer/commit/cc3b5db))
|
||||
|
||||
|
||||
|
||||
<a name="1.0.1"></a>
|
||||
## [1.0.1](https://github.com/stevemao/conventional-changelog-writer/compare/v1.0.0...v1.0.1) (2016-02-06)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **doFlush:** correct logic ([54d96cc](https://github.com/stevemao/conventional-changelog-writer/commit/54d96cc)), closes [#19](https://github.com/stevemao/conventional-changelog-writer/issues/19)
|
||||
|
||||
|
||||
|
||||
<a name="1.0.0"></a>
|
||||
# [1.0.0](https://github.com/stevemao/conventional-changelog-writer/compare/v0.5.1...v1.0.0) (2016-02-05)
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="0.5.1"></a>
|
||||
## [0.5.1](https://github.com/stevemao/conventional-changelog-writer/compare/v0.5.0...v0.5.1) (2016-02-03)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **context.version:** only valid a semver can decide `context.isPatch` ([59ed325](https://github.com/stevemao/conventional-changelog-writer/commit/59ed325))
|
||||
|
||||
|
||||
|
||||
<a name="0.5.0"></a>
|
||||
# [0.5.0](https://github.com/stevemao/conventional-changelog-writer/compare/v0.4.2...v0.5.0) (2016-02-02)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **flush:** add `options.doFlush` to make it possible not to flush ([7850589](https://github.com/stevemao/conventional-changelog-writer/commit/7850589))
|
||||
|
||||
|
||||
|
||||
<a name="0.4.2"></a>
|
||||
## [0.4.2](https://github.com/stevemao/conventional-changelog-writer/compare/v0.4.1...v0.4.2) (2016-01-18)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **generateOn:** also pass commits, context and options to the function ([3146f66](https://github.com/stevemao/conventional-changelog-writer/commit/3146f66)), closes [ajoslin/conventional-changelog#135](https://github.com/ajoslin/conventional-changelog/issues/135)
|
||||
|
||||
|
||||
|
||||
<a name="0.4.1"></a>
|
||||
## [0.4.1](https://github.com/stevemao/conventional-changelog-writer/compare/v0.4.0...v0.4.1) (2015-09-30)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **template:** default commit template should handle unkown host ([ef62bfd](https://github.com/stevemao/conventional-changelog-writer/commit/ef62bfd))
|
||||
|
||||
### Features
|
||||
|
||||
* **context:** linkReferences has nothing to do with context.host ([f5883a6](https://github.com/stevemao/conventional-changelog-writer/commit/f5883a6))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* `context.host` cannot change the default of `context.linkReferences` because if the host is unknown, `context.host` is `undefined` and all links will just use `context.repository`.
|
||||
|
||||
|
||||
|
||||
<a name="0.4.0"></a>
|
||||
# [0.4.0](https://github.com/stevemao/conventional-changelog-writer/compare/v0.3.2...v0.4.0) (2015-09-23)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **cli:** require file with absolute path ([e9d9702](https://github.com/stevemao/conventional-changelog-writer/commit/e9d9702)), closes [#13](https://github.com/stevemao/conventional-changelog-writer/issues/13)
|
||||
* **notesSort:** defaults to sort on `text` ([6d3d564](https://github.com/stevemao/conventional-changelog-writer/commit/6d3d564))
|
||||
|
||||
### Features
|
||||
|
||||
* **notes:** attach the commit to the note ([2977336](https://github.com/stevemao/conventional-changelog-writer/commit/2977336)), closes [#12](https://github.com/stevemao/conventional-changelog-writer/issues/12)
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* `notes` in `noteGroups` is not an array of simple string any more but object. You must use `note.text` to access the equivalent of previous `note`.
|
||||
21
node_modules/conventional-changelog-writer/LICENSE.md
generated
vendored
Normal file
21
node_modules/conventional-changelog-writer/LICENSE.md
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
### MIT License
|
||||
|
||||
Copyright © [conventional-changelog team](https://github.com/conventional-changelog)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
373
node_modules/conventional-changelog-writer/README.md
generated
vendored
Normal file
373
node_modules/conventional-changelog-writer/README.md
generated
vendored
Normal file
@@ -0,0 +1,373 @@
|
||||
# [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage Status][coveralls-image]][coveralls-url]
|
||||
|
||||
> Write logs based on conventional commits and templates
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
$ npm install --save conventional-changelog-writer
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var conventionalChangelogWriter = require('conventional-changelog-writer');
|
||||
|
||||
conventionalChangelogWriter(context, options);
|
||||
```
|
||||
|
||||
It returns a transform stream.
|
||||
|
||||
It expects an object mode upstream that looks something like this:
|
||||
|
||||
```js
|
||||
{ hash: '9b1aff905b638aa274a5fc8f88662df446d374bd',
|
||||
header: 'feat(scope): broadcast $destroy event on scope destruction',
|
||||
type: 'feat',
|
||||
scope: 'scope',
|
||||
subject: 'broadcast $destroy event on scope destruction',
|
||||
body: null,
|
||||
footer: 'Closes #1',
|
||||
notes: [],
|
||||
references: [ { action: 'Closes', owner: null, repository: null, issue: '1', raw: '#1' } ] }
|
||||
{ hash: '13f31602f396bc269076ab4d389cfd8ca94b20ba',
|
||||
header: 'feat(ng-list): Allow custom separator',
|
||||
type: 'feat',
|
||||
scope: 'ng-list',
|
||||
subject: 'Allow custom separator',
|
||||
body: 'bla bla bla',
|
||||
footer: 'BREAKING CHANGE: some breaking change',
|
||||
notes: [ { title: 'BREAKING CHANGE', text: 'some breaking change' } ],
|
||||
references: [] }
|
||||
```
|
||||
|
||||
Each chunk should be a commit. Json object is also **valid**. Parts of the objects will be formatted and combined into a log based on the handlebars context, templates and options.
|
||||
|
||||
The downstream might look something like this:
|
||||
|
||||
```js
|
||||
<a name="0.0.1"></a>
|
||||
## 0.0.1 "this is a title" (2015-05-29)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **ng-list:** Allow custom separator ([13f3160](https://github.com/a/b/commits/13f3160))
|
||||
* **scope:** broadcast $destroy event on scope destruction ([9b1aff9](https://github.com/a/b/commits/9b1aff9)), closes [#1](https://github.com/a/b/issues/1)
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* some breaking change
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### conventionalChangelogWriter([context, [options]])
|
||||
|
||||
Returns a transform stream.
|
||||
|
||||
#### context
|
||||
|
||||
Variables that will be interpolated to the template. This object contains, but not limits to the following fields.
|
||||
|
||||
##### version
|
||||
|
||||
Type: `string`
|
||||
|
||||
Version number of the up-coming release. If `version` is found in the last commit before generating logs, it will be overwritten.
|
||||
|
||||
##### title
|
||||
|
||||
Type: `string`
|
||||
|
||||
##### isPatch
|
||||
|
||||
Type: `boolean` Default: `semver.patch(context.version) !== 0`
|
||||
|
||||
By default, this value is true if `version`'s patch is `0`.
|
||||
|
||||
##### host
|
||||
|
||||
Type: `string`
|
||||
|
||||
The hosting website. Eg: `'https://github.com'` or `'https://bitbucket.org'`
|
||||
|
||||
##### owner
|
||||
|
||||
Type: `string`
|
||||
|
||||
The owner of the repository. Eg: `'stevemao'`.
|
||||
|
||||
##### repository
|
||||
|
||||
Type: `string`
|
||||
|
||||
The repository name on `host`. Eg: `'conventional-changelog-writer'`.
|
||||
|
||||
##### repoUrl
|
||||
|
||||
Type: `string`
|
||||
|
||||
The whole repository url. Eg: `'https://github.com/conventional-changelog/conventional-changelog-writer'`.
|
||||
The should be used as a fallback when `context.repository` doesn't exist.
|
||||
|
||||
##### linkReferences
|
||||
|
||||
Type: `boolean` Default: `true` if (`context.repository` or `context.repoUrl`), `context.commit` and `context.issue` are truthy
|
||||
|
||||
Should all references be linked?
|
||||
|
||||
##### commit
|
||||
|
||||
Type: `string` Default: `'commits'`
|
||||
|
||||
Commit keyword in the url if `context.linkReferences === true`.
|
||||
|
||||
##### issue
|
||||
|
||||
Type: `string` Default: `'issues'`
|
||||
|
||||
Issue or pull request keyword in the url if `context.linkReferences === true`.
|
||||
|
||||
##### date
|
||||
|
||||
Type: `string` Default: `dateFormat(new Date(), 'yyyy-mm-dd', true)`
|
||||
|
||||
Default to formatted (`'yyyy-mm-dd'`) today's date. [dateformat](https://github.com/felixge/node-dateformat) is used for formatting the date. If `version` is found in the last commit, `committerDate` will overwrite this.
|
||||
|
||||
#### options
|
||||
|
||||
Type: `object`
|
||||
|
||||
##### transform
|
||||
|
||||
Type: `object` or `function` Default: get the first 7 digits of hash, and `committerDate` will be formatted as `'yyyy-mm-dd'`.
|
||||
|
||||
Replace with new values in each commit.
|
||||
|
||||
If this is an object, the keys are paths to a nested object property. the values can be a string (static) and a function (dynamic) with the old value and path passed as arguments. This value is merged with your own transform object.
|
||||
|
||||
If this is a function, the commit chunk will be passed as the argument and the returned value would be the new commit object. This is a handy function if you can't provide a transform stream as an upstream of this one. If returns a falsy value this commit is ignored.
|
||||
|
||||
a `raw` object that is originally poured form upstream is attached to `commit`.
|
||||
|
||||
##### groupBy
|
||||
|
||||
Type: `string` Default: `'type'`
|
||||
|
||||
How to group the commits. EG: based on the same type. If this value is falsy, commits are not grouped.
|
||||
|
||||
##### commitGroupsSort
|
||||
|
||||
Type: `function`, `string` or `array`
|
||||
|
||||
A compare function used to sort commit groups. If it's a string or array, it sorts on the property(ies) by `localeCompare`. Will not sort if this is a falsy value.
|
||||
|
||||
The string can be a dot path to a nested object property.
|
||||
|
||||
##### commitsSort
|
||||
|
||||
Type: `function`, `string` or `array` Default: `'header'`
|
||||
|
||||
A compare function used to sort commits. If it's a string or array, it sorts on the property(ies) by `localeCompare`. Will not sort if this is a falsy value.
|
||||
|
||||
The string can be a dot path to a nested object property.
|
||||
|
||||
##### noteGroupsSort
|
||||
|
||||
Type: `function`, `string` or `array` Default: `'title'`
|
||||
|
||||
A compare function used to sort note groups. If it's a string or array, it sorts on the property(ies) by `localeCompare`. Will not sort if this is a falsy value.
|
||||
|
||||
The string can be a dot path to a nested object property.
|
||||
|
||||
##### notesSort
|
||||
|
||||
Type: `function`, `string` or `array` Default: `'text'`
|
||||
|
||||
A compare function used to sort note groups. If it's a string or array, it sorts on the property(ies) by `localeCompare`. Will not sort if this is a falsy value.
|
||||
|
||||
The string can be a dot path to a nested object property.
|
||||
|
||||
##### generateOn
|
||||
|
||||
Type: `function`, `string` or `any` Default: if `commit.version` is a valid semver.
|
||||
|
||||
When the upstream finishes pouring the commits it will generate a block of logs if `doFlush` is `true`. However, you can generate more than one block based on this criteria (usually a version) even if there are still commits from the upstream.
|
||||
|
||||
###### generateOn(commit, commits, context, options)
|
||||
|
||||
####### commit
|
||||
|
||||
Current commit.
|
||||
|
||||
####### commits
|
||||
|
||||
Current collected commits.
|
||||
|
||||
####### context
|
||||
|
||||
The generated context based on original input `context` and `options`.
|
||||
|
||||
####### options
|
||||
|
||||
Normalized options.
|
||||
|
||||
**NOTE**: It checks on the transformed commit chunk instead of the original one (you can check on the original by access the `raw` object on the `commit`). However, if the transformed commit is ignored it falls back to the original commit.
|
||||
|
||||
If this value is a `string`, it checks the existence of the field. Set to other type to disable it.
|
||||
|
||||
##### finalizeContext
|
||||
|
||||
Type: `function` Default: pass through
|
||||
|
||||
Last chance to modify your context before generating a changelog.
|
||||
|
||||
###### finalizeContext(context, options, commits, keyCommit)
|
||||
|
||||
####### context
|
||||
|
||||
The generated context based on original input `context` and `options`.
|
||||
|
||||
####### options
|
||||
|
||||
Normalized options.
|
||||
|
||||
####### commits
|
||||
|
||||
Filtered commits from your git metadata.
|
||||
|
||||
####### keyCommit
|
||||
|
||||
The commit that triggers to generate the log.
|
||||
|
||||
##### debug
|
||||
|
||||
Type: `function` Default: `function() {}`
|
||||
|
||||
A function to get debug information.
|
||||
|
||||
##### reverse
|
||||
|
||||
Type: `boolean` Default: `false`
|
||||
|
||||
The normal order means reverse chronological order. `reverse` order means chronological order. Are the commits from upstream in the reverse order? You should only worry about this when generating more than one blocks of logs based on `generateOn`. If you find the last commit is in the wrong block inverse this value.
|
||||
|
||||
##### includeDetails
|
||||
|
||||
Type: `boolean` Default: `false`
|
||||
|
||||
If this value is `true`, instead of emitting strings of changelog, it emits objects containing the details the block.
|
||||
|
||||
*NOTE:* The downstream must be in object mode if this is `true`.
|
||||
|
||||
##### ignoreReverted
|
||||
|
||||
Type: `boolean` Default: `true`
|
||||
|
||||
If `true`, reverted commits will be ignored.
|
||||
|
||||
##### doFlush
|
||||
|
||||
Type: `boolean` Default: `true`
|
||||
|
||||
If `true`, the stream will flush out the last bit of commits (could be empty) to changelog.
|
||||
|
||||
##### mainTemplate
|
||||
|
||||
Type: `string` Default: [template.hbs](templates/template.hbs)
|
||||
|
||||
The main handlebars template.
|
||||
|
||||
##### headerPartial
|
||||
|
||||
Type: `string` Default: [header.hbs](templates/header.hbs)
|
||||
|
||||
##### commitPartial
|
||||
|
||||
Type: `string` Default: [commit.hbs](templates/commit.hbs)
|
||||
|
||||
##### footerPartial
|
||||
|
||||
Type: `string` Default: [footer.hbs](templates/footer.hbs)
|
||||
|
||||
##### partials
|
||||
|
||||
Type: `object`
|
||||
|
||||
Partials that used in the main template, if any. The key should be the partial name and the value should be handlebars template strings. If you are using handlebars template files, read files by yourself.
|
||||
|
||||
|
||||
## Customization Guide
|
||||
|
||||
It is possible to customize this the changelog to suit your needs. Templates are written in [handlebars](http://handlebarsjs.com). You can customize all partials or the whole template. Template variables are from either `upstream` or `context`. The following are a suggested way of defining variables.
|
||||
|
||||
### upstream
|
||||
|
||||
Variables in upstream are commit specific and should be used per commit. Eg: *commit date* and *commit username*. You can think of them as "local" or "isolate" variables. A "raw" commit message (original commit poured from upstream) is attached to `commit`. `transform` can be used to modify a commit.
|
||||
|
||||
### context
|
||||
|
||||
context should be module specific and can be used across the whole log. Thus these variables should not be related to any single commit and should be generic information of the module or all commits. Eg: *repository url* and *author names*, etc. You can think of them as "global" or "root" variables.
|
||||
|
||||
Basically you can make your own templates and define all your template context. Extra context are based on commits from upstream and `options`. For more details, please checkout [handlebars](http://handlebarsjs.com) and the source code of this module. `finalizeContext` can be used at last to modify context before generating a changelog.
|
||||
|
||||
|
||||
## CLI
|
||||
|
||||
```sh
|
||||
$ npm install --global conventional-changelog-writer
|
||||
$ conventional-changelog-writer --help # for more details
|
||||
```
|
||||
|
||||
It works with [Line Delimited JSON](http://en.wikipedia.org/wiki/Line_Delimited_JSON).
|
||||
|
||||
If you have commits.ldjson
|
||||
|
||||
```js
|
||||
{"hash":"9b1aff905b638aa274a5fc8f88662df446d374bd","header":"feat(ngMessages): provide support for dynamic message resolution","type":"feat","scope":"ngMessages","subject":"provide support for dynamic message resolution","body":"Prior to this fix it was impossible to apply a binding to a the ngMessage directive to represent the name of the error.","footer":"BREAKING CHANGE: The `ngMessagesInclude` attribute is now its own directive and that must be placed as a **child** element within the element with the ngMessages directive.\nCloses #10036\nCloses #9338","notes":[{"title":"BREAKING CHANGE","text":"The `ngMessagesInclude` attribute is now its own directive and that must be placed as a **child** element within the element with the ngMessages directive."}],"references":[{"action":"Closes","owner",null,"repository":null,"issue":"10036","raw":"#10036"},{"action":"Closes","owner":null,"repository":null,"issue":"9338","raw":"#9338"}]}
|
||||
```
|
||||
|
||||
And you run
|
||||
|
||||
```sh
|
||||
$ conventional-changelog-writer commits.ldjson -o options.js
|
||||
```
|
||||
|
||||
The output might look something like this
|
||||
|
||||
```md
|
||||
<a name="1.0.0"></a>
|
||||
# 1.0.0 (2015-04-09)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **ngMessages:** provide support for dynamic message resolution 9b1aff9, closes #10036 #9338
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* The `ngMessagesInclude` attribute is now its own directive and that must be placed as a **child** element within the element with the ngMessages directive.
|
||||
```
|
||||
|
||||
It is printed to stdout.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Steve Mao](https://github.com/stevemao)
|
||||
|
||||
|
||||
[npm-image]: https://badge.fury.io/js/conventional-changelog-writer.svg
|
||||
[npm-url]: https://npmjs.org/package/conventional-changelog-writer
|
||||
[travis-image]: https://travis-ci.org/conventional-changelog/conventional-changelog-writer.svg?branch=master
|
||||
[travis-url]: https://travis-ci.org/conventional-changelog/conventional-changelog-writer
|
||||
[daviddm-image]: https://david-dm.org/conventional-changelog/conventional-changelog-writer.svg?theme=shields.io
|
||||
[daviddm-url]: https://david-dm.org/conventional-changelog/conventional-changelog-writer
|
||||
[coveralls-image]: https://coveralls.io/repos/conventional-changelog/conventional-changelog-writer/badge.svg
|
||||
[coveralls-url]: https://coveralls.io/r/conventional-changelog/conventional-changelog-writer
|
||||
117
node_modules/conventional-changelog-writer/cli.js
generated
vendored
Executable file
117
node_modules/conventional-changelog-writer/cli.js
generated
vendored
Executable file
@@ -0,0 +1,117 @@
|
||||
#!/usr/bin/env node
|
||||
'use strict'
|
||||
var conventionalChangelogWriter = require('./')
|
||||
var forEach = require('lodash').forEach
|
||||
var fs = require('fs')
|
||||
var meow = require('meow')
|
||||
var path = require('path')
|
||||
var split = require('split')
|
||||
|
||||
var cli = meow(`
|
||||
Usage
|
||||
conventional-changelog-writer <path> [<path> ...]
|
||||
cat <path> | conventional-changelog-writer
|
||||
,
|
||||
Example
|
||||
conventional-changelog-writer commits.ldjson
|
||||
cat commits.ldjson | conventional-changelog-writer
|
||||
,
|
||||
Options
|
||||
-c, --context A filepath of a json that is used to define template variables
|
||||
-o, --options A filepath of a javascript object that is used to define options
|
||||
`, {
|
||||
flags: {
|
||||
context: {
|
||||
alias: `c`
|
||||
},
|
||||
options: {
|
||||
alias: `o`
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
var filePaths = []
|
||||
var flags = cli.flags
|
||||
|
||||
forEach(cli.input, function (input) {
|
||||
filePaths.push(input)
|
||||
})
|
||||
|
||||
var length = filePaths.length
|
||||
|
||||
var templateContext
|
||||
var contextPath = flags.context
|
||||
if (contextPath) {
|
||||
try {
|
||||
templateContext = require(path.resolve(process.cwd(), contextPath))
|
||||
} catch (err) {
|
||||
console.error('Failed to get context from file ' + contextPath + '\n' + err)
|
||||
process.exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
var options
|
||||
var optionsPath = flags.options
|
||||
if (optionsPath) {
|
||||
try {
|
||||
options = require(path.resolve(process.cwd(), optionsPath))
|
||||
} catch (err) {
|
||||
console.error('Failed to get options from file ' + optionsPath + '\n' + err)
|
||||
process.exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
var stream = conventionalChangelogWriter(templateContext, options)
|
||||
} catch (err) {
|
||||
console.error(err.toString())
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
function processFile (fileIndex) {
|
||||
var filePath = filePaths[fileIndex]
|
||||
fs.createReadStream(filePath)
|
||||
.on('error', function (err) {
|
||||
console.warn('Failed to read file ' + filePath + '\n' + err)
|
||||
if (++fileIndex < length) {
|
||||
processFile(fileIndex)
|
||||
}
|
||||
})
|
||||
.pipe(split(JSON.parse))
|
||||
.on('error', function (err) {
|
||||
console.warn('Failed to split commits in file ' + filePath + '\n' + err)
|
||||
})
|
||||
.pipe(stream)
|
||||
.on('error', function (err) {
|
||||
console.warn('Failed to process file ' + filePath + '\n' + err)
|
||||
if (++fileIndex < length) {
|
||||
processFile(fileIndex)
|
||||
}
|
||||
})
|
||||
.on('end', function () {
|
||||
if (++fileIndex < length) {
|
||||
processFile(fileIndex)
|
||||
}
|
||||
})
|
||||
.pipe(process.stdout)
|
||||
}
|
||||
|
||||
if (!process.stdin.isTTY) {
|
||||
process.stdin
|
||||
.pipe(split(JSON.parse))
|
||||
.on('error', function (err) {
|
||||
console.error('Failed to split commits\n' + err)
|
||||
process.exit(1)
|
||||
})
|
||||
.pipe(stream)
|
||||
.on('error', function (err) {
|
||||
console.error('Failed to process file\n' + err)
|
||||
process.exit(1)
|
||||
})
|
||||
.pipe(process.stdout)
|
||||
} else if (length === 0) {
|
||||
console.error('You must specify at least one line delimited json file')
|
||||
process.exit(1)
|
||||
} else {
|
||||
processFile(0)
|
||||
}
|
||||
166
node_modules/conventional-changelog-writer/index.js
generated
vendored
Normal file
166
node_modules/conventional-changelog-writer/index.js
generated
vendored
Normal file
@@ -0,0 +1,166 @@
|
||||
'use strict'
|
||||
|
||||
var dateFormat = require('dateformat')
|
||||
var join = require('path').join
|
||||
var readFileSync = require('fs').readFileSync
|
||||
var semverValid = require('semver').valid
|
||||
var through = require('through2')
|
||||
var util = require('./lib/util')
|
||||
var _ = require('lodash')
|
||||
|
||||
function conventionalChangelogWriter (context, options) {
|
||||
var savedKeyCommit
|
||||
var commits = []
|
||||
var firstRelease = true
|
||||
var neverGenerated = true
|
||||
|
||||
context = _.extend({
|
||||
commit: 'commits',
|
||||
issue: 'issues',
|
||||
date: dateFormat(new Date(), 'yyyy-mm-dd', true)
|
||||
}, context)
|
||||
|
||||
if (!_.isBoolean(context.linkReferences) && (context.repository || context.repoUrl) && context.commit && context.issue) {
|
||||
context.linkReferences = true
|
||||
}
|
||||
|
||||
options = _.assign({
|
||||
groupBy: 'type',
|
||||
commitsSort: 'header',
|
||||
noteGroupsSort: 'title',
|
||||
notesSort: 'text',
|
||||
generateOn: function (commit) {
|
||||
return semverValid(commit.version)
|
||||
},
|
||||
finalizeContext: function (context) {
|
||||
return context
|
||||
},
|
||||
debug: function () {},
|
||||
reverse: false,
|
||||
includeDetails: false,
|
||||
ignoreReverted: true,
|
||||
doFlush: true,
|
||||
mainTemplate: readFileSync(join(__dirname, 'templates/template.hbs'), 'utf-8'),
|
||||
headerPartial: readFileSync(join(__dirname, 'templates/header.hbs'), 'utf-8'),
|
||||
commitPartial: readFileSync(join(__dirname, 'templates/commit.hbs'), 'utf-8'),
|
||||
footerPartial: readFileSync(join(__dirname, 'templates/footer.hbs'), 'utf-8')
|
||||
}, options)
|
||||
|
||||
if ((!_.isFunction(options.transform) && _.isObject(options.transform)) || _.isUndefined(options.transform)) {
|
||||
options.transform = _.assign({
|
||||
hash: function (hash) {
|
||||
if (_.isString(hash)) {
|
||||
return hash.substring(0, 7)
|
||||
}
|
||||
},
|
||||
header: function (header) {
|
||||
return header.substring(0, 100)
|
||||
},
|
||||
committerDate: function (date) {
|
||||
if (!date) {
|
||||
return
|
||||
}
|
||||
|
||||
return dateFormat(date, 'yyyy-mm-dd', true)
|
||||
}
|
||||
}, options.transform)
|
||||
}
|
||||
|
||||
var generateOn = options.generateOn
|
||||
if (_.isString(generateOn)) {
|
||||
generateOn = function (commit) {
|
||||
return !_.isUndefined(commit[options.generateOn])
|
||||
}
|
||||
} else if (!_.isFunction(generateOn)) {
|
||||
generateOn = function () {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
options.commitGroupsSort = util.functionify(options.commitGroupsSort)
|
||||
options.commitsSort = util.functionify(options.commitsSort)
|
||||
options.noteGroupsSort = util.functionify(options.noteGroupsSort)
|
||||
options.notesSort = util.functionify(options.notesSort)
|
||||
|
||||
return through.obj(function (chunk, enc, cb) {
|
||||
try {
|
||||
var result
|
||||
var commit = util.processCommit(chunk, options.transform, context)
|
||||
var keyCommit = commit || chunk
|
||||
|
||||
// previous blocks of logs
|
||||
if (options.reverse) {
|
||||
if (commit) {
|
||||
commits.push(commit)
|
||||
}
|
||||
|
||||
if (generateOn(keyCommit, commits, context, options)) {
|
||||
neverGenerated = false
|
||||
result = util.generate(options, commits, context, keyCommit)
|
||||
if (options.includeDetails) {
|
||||
this.push({
|
||||
log: result,
|
||||
keyCommit: keyCommit
|
||||
})
|
||||
} else {
|
||||
this.push(result)
|
||||
}
|
||||
|
||||
commits = []
|
||||
}
|
||||
} else {
|
||||
if (generateOn(keyCommit, commits, context, options)) {
|
||||
neverGenerated = false
|
||||
result = util.generate(options, commits, context, savedKeyCommit)
|
||||
|
||||
if (!firstRelease || options.doFlush) {
|
||||
if (options.includeDetails) {
|
||||
this.push({
|
||||
log: result,
|
||||
keyCommit: savedKeyCommit
|
||||
})
|
||||
} else {
|
||||
this.push(result)
|
||||
}
|
||||
}
|
||||
|
||||
firstRelease = false
|
||||
commits = []
|
||||
savedKeyCommit = keyCommit
|
||||
}
|
||||
|
||||
if (commit) {
|
||||
commits.push(commit)
|
||||
}
|
||||
}
|
||||
|
||||
cb()
|
||||
} catch (err) {
|
||||
cb(err)
|
||||
}
|
||||
}, function (cb) {
|
||||
if (!options.doFlush && (options.reverse || neverGenerated)) {
|
||||
cb(null)
|
||||
return
|
||||
}
|
||||
|
||||
try {
|
||||
var result = util.generate(options, commits, context, savedKeyCommit)
|
||||
|
||||
if (options.includeDetails) {
|
||||
this.push({
|
||||
log: result,
|
||||
keyCommit: savedKeyCommit
|
||||
})
|
||||
} else {
|
||||
this.push(result)
|
||||
}
|
||||
|
||||
cb()
|
||||
} catch (err) {
|
||||
cb(err)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
module.exports = conventionalChangelogWriter
|
||||
193
node_modules/conventional-changelog-writer/lib/util.js
generated
vendored
Normal file
193
node_modules/conventional-changelog-writer/lib/util.js
generated
vendored
Normal file
@@ -0,0 +1,193 @@
|
||||
'use strict'
|
||||
var compareFunc = require('compare-func')
|
||||
var conventionalCommitsFilter = require('conventional-commits-filter')
|
||||
var Handlebars = require('handlebars')
|
||||
var semver = require('semver')
|
||||
var _ = require('lodash')
|
||||
var stringify = require('json-stringify-safe')
|
||||
|
||||
function compileTemplates (templates) {
|
||||
var main = templates.mainTemplate
|
||||
var headerPartial = templates.headerPartial
|
||||
var commitPartial = templates.commitPartial
|
||||
var footerPartial = templates.footerPartial
|
||||
var partials = templates.partials
|
||||
|
||||
if (_.isString(headerPartial)) {
|
||||
Handlebars.registerPartial('header', headerPartial)
|
||||
}
|
||||
|
||||
if (_.isString(commitPartial)) {
|
||||
Handlebars.registerPartial('commit', commitPartial)
|
||||
}
|
||||
|
||||
if (_.isString(footerPartial)) {
|
||||
Handlebars.registerPartial('footer', footerPartial)
|
||||
}
|
||||
|
||||
_.forEach(partials, function (partial, name) {
|
||||
if (_.isString(partial)) {
|
||||
Handlebars.registerPartial(name, partial)
|
||||
}
|
||||
})
|
||||
|
||||
return Handlebars.compile(main, {
|
||||
noEscape: true
|
||||
})
|
||||
}
|
||||
|
||||
function functionify (strOrArr) {
|
||||
if (strOrArr && !_.isFunction(strOrArr)) {
|
||||
return compareFunc(strOrArr)
|
||||
}
|
||||
return strOrArr
|
||||
}
|
||||
|
||||
function getCommitGroups (groupBy, commits, groupsSort, commitsSort) {
|
||||
var commitGroups = []
|
||||
var commitGroupsObj = _.groupBy(commits, function (commit) {
|
||||
return commit[groupBy] || ''
|
||||
})
|
||||
|
||||
_.forEach(commitGroupsObj, function (commits, title) {
|
||||
if (title === '') {
|
||||
title = false
|
||||
}
|
||||
|
||||
commits.sort(commitsSort)
|
||||
commitGroups.push({
|
||||
title: title,
|
||||
commits: commits
|
||||
})
|
||||
})
|
||||
|
||||
commitGroups.sort(groupsSort)
|
||||
|
||||
return commitGroups
|
||||
}
|
||||
|
||||
function getNoteGroups (notes, noteGroupsSort, notesSort) {
|
||||
var retGroups = []
|
||||
|
||||
_.forEach(notes, function (note) {
|
||||
var title = note.title
|
||||
var titleExists = false
|
||||
|
||||
_.forEach(retGroups, function (group) {
|
||||
if (group.title === title) {
|
||||
titleExists = true
|
||||
group.notes.push(note)
|
||||
return false
|
||||
}
|
||||
})
|
||||
|
||||
if (!titleExists) {
|
||||
retGroups.push({
|
||||
title: title,
|
||||
notes: [note]
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
retGroups.sort(noteGroupsSort)
|
||||
_.forEach(retGroups, function (group) {
|
||||
group.notes.sort(notesSort)
|
||||
})
|
||||
|
||||
return retGroups
|
||||
}
|
||||
|
||||
function processCommit (chunk, transform, context) {
|
||||
var commit
|
||||
|
||||
try {
|
||||
chunk = JSON.parse(chunk)
|
||||
} catch (e) {}
|
||||
|
||||
commit = _.cloneDeep(chunk)
|
||||
|
||||
if (_.isFunction(transform)) {
|
||||
commit = transform(commit, context)
|
||||
|
||||
if (commit) {
|
||||
commit.raw = chunk
|
||||
}
|
||||
|
||||
return commit
|
||||
}
|
||||
|
||||
_.forEach(transform, function (el, path) {
|
||||
var value = _.get(commit, path)
|
||||
|
||||
if (_.isFunction(el)) {
|
||||
value = el(value, path)
|
||||
} else {
|
||||
value = el
|
||||
}
|
||||
|
||||
_.set(commit, path, value)
|
||||
})
|
||||
|
||||
commit.raw = chunk
|
||||
|
||||
return commit
|
||||
}
|
||||
|
||||
function getExtraContext (commits, notes, options) {
|
||||
var context = {}
|
||||
|
||||
// group `commits` by `options.groupBy`
|
||||
context.commitGroups = getCommitGroups(options.groupBy, commits, options.commitGroupsSort, options.commitsSort)
|
||||
|
||||
// group `notes` for footer
|
||||
context.noteGroups = getNoteGroups(notes, options.noteGroupsSort, options.notesSort)
|
||||
|
||||
return context
|
||||
}
|
||||
|
||||
function generate (options, commits, context, keyCommit) {
|
||||
var notes = []
|
||||
var filteredCommits
|
||||
var compiled = compileTemplates(options)
|
||||
|
||||
if (options.ignoreReverted) {
|
||||
filteredCommits = conventionalCommitsFilter(commits)
|
||||
} else {
|
||||
filteredCommits = _.clone(commits)
|
||||
}
|
||||
|
||||
_.forEach(filteredCommits, function (commit) {
|
||||
_.map(commit.notes, function (note) {
|
||||
note.commit = commit
|
||||
|
||||
return note
|
||||
})
|
||||
|
||||
notes = notes.concat(commit.notes)
|
||||
})
|
||||
|
||||
context = _.merge({}, context, keyCommit, getExtraContext(filteredCommits, notes, options))
|
||||
|
||||
if (keyCommit && keyCommit.committerDate) {
|
||||
context.date = keyCommit.committerDate
|
||||
}
|
||||
|
||||
if (context.version && semver.valid(context.version)) {
|
||||
context.isPatch = context.isPatch || semver.patch(context.version) !== 0
|
||||
}
|
||||
|
||||
context = options.finalizeContext(context, options, filteredCommits, keyCommit, commits)
|
||||
options.debug('Your final context is:\n' + stringify(context, null, 2))
|
||||
|
||||
return compiled(context)
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
compileTemplates: compileTemplates,
|
||||
functionify: functionify,
|
||||
getCommitGroups: getCommitGroups,
|
||||
getNoteGroups: getNoteGroups,
|
||||
processCommit: processCommit,
|
||||
getExtraContext: getExtraContext,
|
||||
generate: generate
|
||||
}
|
||||
1
node_modules/conventional-changelog-writer/node_modules/.bin/handlebars
generated
vendored
Symbolic link
1
node_modules/conventional-changelog-writer/node_modules/.bin/handlebars
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../handlebars/bin/handlebars
|
||||
1
node_modules/conventional-changelog-writer/node_modules/.bin/semver
generated
vendored
Symbolic link
1
node_modules/conventional-changelog-writer/node_modules/.bin/semver
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../semver/bin/semver
|
||||
58
node_modules/conventional-changelog-writer/package.json
generated
vendored
Normal file
58
node_modules/conventional-changelog-writer/package.json
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"name": "conventional-changelog-writer",
|
||||
"version": "3.0.9",
|
||||
"description": "Write logs based on conventional commits and templates",
|
||||
"bugs": {
|
||||
"url": "https://github.com/conventional-changelog/conventional-changelog/issues"
|
||||
},
|
||||
"homepage": "https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-writer#readme",
|
||||
"author": {
|
||||
"name": "Steve Mao",
|
||||
"email": "maochenyan@gmail.com",
|
||||
"url": "https://github.com/stevemao"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/conventional-changelog/conventional-changelog.git"
|
||||
},
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js",
|
||||
"cli.js",
|
||||
"lib",
|
||||
"templates"
|
||||
],
|
||||
"keywords": [
|
||||
"conventional-changelog-writer",
|
||||
"changelog",
|
||||
"conventional",
|
||||
"commits",
|
||||
"templates",
|
||||
"writer",
|
||||
"writing",
|
||||
"logs"
|
||||
],
|
||||
"dependencies": {
|
||||
"compare-func": "^1.3.1",
|
||||
"conventional-commits-filter": "^1.1.6",
|
||||
"dateformat": "^3.0.0",
|
||||
"handlebars": "^4.0.2",
|
||||
"json-stringify-safe": "^5.0.1",
|
||||
"lodash": "^4.2.1",
|
||||
"meow": "^4.0.0",
|
||||
"semver": "^5.5.0",
|
||||
"split": "^1.0.0",
|
||||
"through2": "^2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"concat-stream": "^1.6.0"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint --fix .",
|
||||
"test": "npm run lint && mocha --timeout 30000",
|
||||
"test-windows": "echo 'make work on windows'"
|
||||
},
|
||||
"bin": {
|
||||
"conventional-changelog-writer": "cli.js"
|
||||
}
|
||||
}
|
||||
56
node_modules/conventional-changelog-writer/templates/commit.hbs
generated
vendored
Normal file
56
node_modules/conventional-changelog-writer/templates/commit.hbs
generated
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
* {{header}}
|
||||
|
||||
{{~!-- commit link --}} {{#if @root.linkReferences~}}
|
||||
([{{hash}}](
|
||||
{{~#if @root.repository}}
|
||||
{{~#if @root.host}}
|
||||
{{~@root.host}}/
|
||||
{{~/if}}
|
||||
{{~#if @root.owner}}
|
||||
{{~@root.owner}}/
|
||||
{{~/if}}
|
||||
{{~@root.repository}}
|
||||
{{~else}}
|
||||
{{~@root.repoUrl}}
|
||||
{{~/if}}/
|
||||
{{~@root.commit}}/{{hash}}))
|
||||
{{~else}}
|
||||
{{~hash}}
|
||||
{{~/if}}
|
||||
|
||||
{{~!-- commit references --}}
|
||||
{{~#if references~}}
|
||||
, closes
|
||||
{{~#each references}} {{#if @root.linkReferences~}}
|
||||
[
|
||||
{{~#if this.owner}}
|
||||
{{~this.owner}}/
|
||||
{{~/if}}
|
||||
{{~this.repository}}#{{this.issue}}](
|
||||
{{~#if @root.repository}}
|
||||
{{~#if @root.host}}
|
||||
{{~@root.host}}/
|
||||
{{~/if}}
|
||||
{{~#if this.repository}}
|
||||
{{~#if this.owner}}
|
||||
{{~this.owner}}/
|
||||
{{~/if}}
|
||||
{{~this.repository}}
|
||||
{{~else}}
|
||||
{{~#if @root.owner}}
|
||||
{{~@root.owner}}/
|
||||
{{~/if}}
|
||||
{{~@root.repository}}
|
||||
{{~/if}}
|
||||
{{~else}}
|
||||
{{~@root.repoUrl}}
|
||||
{{~/if}}/
|
||||
{{~@root.issue}}/{{this.issue}})
|
||||
{{~else}}
|
||||
{{~#if this.owner}}
|
||||
{{~this.owner}}/
|
||||
{{~/if}}
|
||||
{{~this.repository}}#{{this.issue}}
|
||||
{{~/if}}{{/each}}
|
||||
{{~/if}}
|
||||
|
||||
10
node_modules/conventional-changelog-writer/templates/footer.hbs
generated
vendored
Normal file
10
node_modules/conventional-changelog-writer/templates/footer.hbs
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
{{#if noteGroups}}
|
||||
{{#each noteGroups}}
|
||||
|
||||
### {{title}}
|
||||
|
||||
{{#each notes}}
|
||||
* {{text}}
|
||||
{{/each}}
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
10
node_modules/conventional-changelog-writer/templates/header.hbs
generated
vendored
Normal file
10
node_modules/conventional-changelog-writer/templates/header.hbs
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<a name="{{version}}"></a>
|
||||
## {{#if isPatch~}} <small>
|
||||
{{~/if~}} {{version}}
|
||||
{{~#if title}} "{{title}}"
|
||||
{{~/if~}}
|
||||
{{~#if date}} ({{date}})
|
||||
{{~/if~}}
|
||||
{{~#if isPatch~}} </small>
|
||||
{{~/if}}
|
||||
|
||||
11
node_modules/conventional-changelog-writer/templates/template.hbs
generated
vendored
Normal file
11
node_modules/conventional-changelog-writer/templates/template.hbs
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
{{> header}}
|
||||
|
||||
{{#each commitGroups}}
|
||||
{{#each commits}}
|
||||
{{> commit root=@root}}
|
||||
{{/each}}
|
||||
{{/each}}
|
||||
|
||||
{{> footer}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user