Add capacitorjs runtime
This commit is contained in:
parent
d0ece489ee
commit
f90c0e6c40
8362 changed files with 1502407 additions and 1 deletions
603
node_modules/conventional-changelog-writer/CHANGELOG.md
generated
vendored
Normal file
603
node_modules/conventional-changelog-writer/CHANGELOG.md
generated
vendored
Normal file
|
|
@ -0,0 +1,603 @@
|
|||
# Change Log
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
### [5.0.1](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-writer-v5.0.0...conventional-changelog-writer-v5.0.1) (2021-12-29)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **deps:** patch the handlebars package for CVE-2021-23369 ([1cfc3a1](https://github.com/conventional-changelog/conventional-changelog/commit/1cfc3a1600a11a61d1a9e8d3051d1101cfaa36f1))
|
||||
|
||||
## [5.0.0](https://www.github.com/conventional-changelog/conventional-changelog/compare/v4.1.0...v5.0.0) (2020-12-30)
|
||||
|
||||
|
||||
### ⚠ BREAKING CHANGES
|
||||
|
||||
* nested object properties no longer supported when sorting
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* drop compare-func making sort consistent across node versions ([#729](https://www.github.com/conventional-changelog/conventional-changelog/issues/729)) ([e0081a8](https://www.github.com/conventional-changelog/conventional-changelog/commit/e0081a829133891e2def4a7b7ee5fa25f1440049))
|
||||
|
||||
## [4.1.0](https://www.github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-writer@4.0.18...v4.1.0) (2020-12-29)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add helper for parsing array of commits ([#711](https://www.github.com/conventional-changelog/conventional-changelog/issues/711)) ([e869fe6](https://www.github.com/conventional-changelog/conventional-changelog/commit/e869fe67548b210508a9df0ce99180164b740e65))
|
||||
|
||||
## [4.0.18](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-writer@4.0.17...conventional-changelog-writer@4.0.18) (2020-11-05)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **deps:** update dependency through2 to v4 ([#657](https://github.com/conventional-changelog/conventional-changelog/issues/657)) ([7ae618c](https://github.com/conventional-changelog/conventional-changelog/commit/7ae618c81491841e5b1d796d3933aac0c54bc312))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [4.0.17](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-writer@4.0.16...conventional-changelog-writer@4.0.17) (2020-06-20)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **deps:** update dependency compare-func to v2 ([#647](https://github.com/conventional-changelog/conventional-changelog/issues/647)) ([de4f630](https://github.com/conventional-changelog/conventional-changelog/commit/de4f6309403ca0d46b7c6235052f4dca61ea15bc))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [4.0.16](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-writer@4.0.15...conventional-changelog-writer@4.0.16) (2020-05-08)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **deps:** address CVE in meow ([#642](https://github.com/conventional-changelog/conventional-changelog/issues/642)) ([46311d2](https://github.com/conventional-changelog/conventional-changelog/commit/46311d2932b367f370d06c4e447b8dcf4bc4e83f))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [4.0.15](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-writer@4.0.11...conventional-changelog-writer@4.0.15) (2020-05-08)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **deps:** update yargs-parser to move off a flagged-vulnerable version. ([#635](https://github.com/conventional-changelog/conventional-changelog/issues/635)) ([aafc0f0](https://github.com/conventional-changelog/conventional-changelog/commit/aafc0f00412c3e4b23b8418300e5a570a48fe24d))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [4.0.11](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-writer@4.0.10...conventional-changelog-writer@4.0.11) (2019-11-14)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* add types for cli flags ([#551](https://github.com/conventional-changelog/conventional-changelog/issues/551)) ([bf1d64a](https://github.com/conventional-changelog/conventional-changelog/commit/bf1d64aeaf8f262d4b2beec02d2aebb78df7343b))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [4.0.10](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-writer@4.0.9...conventional-changelog-writer@4.0.10) (2019-10-24)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **deps:** update lodash to fix security issues ([#535](https://github.com/conventional-changelog/conventional-changelog/issues/535)) ([ac43f51](https://github.com/conventional-changelog/conventional-changelog/commit/ac43f51de1f3b597c32f7f8442917a2d06199018))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [4.0.8](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-writer@4.0.7...conventional-changelog-writer@4.0.8) (2019-10-02)
|
||||
|
||||
**Note:** Version bump only for package conventional-changelog-writer
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [4.0.7](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-writer@4.0.6...conventional-changelog-writer@4.0.7) (2019-07-29)
|
||||
|
||||
**Note:** Version bump only for package conventional-changelog-writer
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [4.0.6](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-writer@4.0.5...conventional-changelog-writer@4.0.6) (2019-05-18)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **deps:** update dependency semver to v6 ([#458](https://github.com/conventional-changelog/conventional-changelog/issues/458)) ([efaa7bb](https://github.com/conventional-changelog/conventional-changelog/commit/efaa7bb))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [4.0.5](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-writer@4.0.4...conventional-changelog-writer@4.0.5) (2019-04-11)
|
||||
|
||||
**Note:** Version bump only for package conventional-changelog-writer
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [4.0.4](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-writer@4.0.3...conventional-changelog-writer@4.0.4) (2019-04-10)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **deps:** update dependency through2 to v3 ([#392](https://github.com/conventional-changelog/conventional-changelog/issues/392)) ([26fe91f](https://github.com/conventional-changelog/conventional-changelog/commit/26fe91f))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [4.0.3](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-writer@4.0.2...conventional-changelog-writer@4.0.3) (2019-02-14)
|
||||
|
||||
**Note:** Version bump only for package conventional-changelog-writer
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [4.0.2](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-writer@4.0.1...conventional-changelog-writer@4.0.2) (2018-11-01)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* bad release of conventional-changelog-writer ([b5da9af](https://github.com/conventional-changelog/conventional-changelog/commit/b5da9af))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [4.0.1](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-writer@4.0.0...conventional-changelog-writer@4.0.1) (2018-11-01)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Upgrade to Lerna 3, fix Node.js v11 error ([#385](https://github.com/conventional-changelog/conventional-changelog/issues/385)) ([cdef282](https://github.com/conventional-changelog/conventional-changelog/commit/cdef282))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="4.0.0"></a>
|
||||
# [4.0.0](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-changelog-writer@3.0.9...conventional-changelog-writer@4.0.0) (2018-05-29)
|
||||
|
||||
|
||||
### Chores
|
||||
|
||||
* **package:** set Node requirement to oldest supported LTS ([#329](https://github.com/conventional-changelog/conventional-changelog/issues/329)) ([cae2fe0](https://github.com/conventional-changelog/conventional-changelog/commit/cae2fe0))
|
||||
|
||||
|
||||
### Code Refactoring
|
||||
|
||||
* remove anchor from header templates ([#301](https://github.com/conventional-changelog/conventional-changelog/issues/301)) ([346f24f](https://github.com/conventional-changelog/conventional-changelog/commit/346f24f)), closes [#186](https://github.com/conventional-changelog/conventional-changelog/issues/186)
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* **package:** Set the package's minimum required Node version to be the oldest LTS
|
||||
currently supported by the Node Release working group. At this time,
|
||||
that is Node 6 (which is in its Maintenance LTS phase).
|
||||
* Anchor tags are removed from the changelog header templates. The
|
||||
rendered Markdown will no longer contain anchor tags proceeding the
|
||||
version number header that constitutes the changelog header. This means
|
||||
that consumers of rendered markdown will not be able to use a URL that
|
||||
has been constructed to contain a version number anchor tag reference,
|
||||
since the anchor tag won't exist in the rendered markdown.
|
||||
|
||||
It's stronly recomended consumers use the full URL path to the release
|
||||
page for a given version, as that URL is a permalink to that verison,
|
||||
contains all relavent release information, and does not, otherwise, rely
|
||||
on the anchor tag being excessible from the current page view.
|
||||
|
||||
As an example, for version `2.0.0` of a GitHub project, the following
|
||||
URL should be used:
|
||||
- https://github.com/conventional-changelog/releaser-tools/releases/tag/v2.0.0
|
||||
|
||||
|
||||
|
||||
|
||||
<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.
|
||||
369
node_modules/conventional-changelog-writer/README.md
generated
vendored
Normal file
369
node_modules/conventional-changelog-writer/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,369 @@
|
|||
# [![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
|
||||
## 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.
|
||||
|
||||
### conventionalChangelogWriter.parseArray(commits, [context, [options]])
|
||||
|
||||
Rather than returning a transform stream for parsing commits,
|
||||
parses the array of commits provided generating a CHANGELOG entry.
|
||||
|
||||
#### 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.
|
||||
|
||||
##### 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.
|
||||
|
||||
##### 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.
|
||||
|
||||
##### 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.
|
||||
|
||||
##### 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`.
|
||||
*NOTE:* This is only supported when using streaming mode.
|
||||
|
||||
##### 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.
|
||||
|
||||
*NOTE:* This is only supported when using streaming mode.
|
||||
|
||||
##### 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
|
||||
# 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
|
||||
120
node_modules/conventional-changelog-writer/cli.js
generated
vendored
Executable file
120
node_modules/conventional-changelog-writer/cli.js
generated
vendored
Executable file
|
|
@ -0,0 +1,120 @@
|
|||
#!/usr/bin/env node
|
||||
'use strict'
|
||||
const conventionalChangelogWriter = require('./')
|
||||
const forEach = require('lodash').forEach
|
||||
const fs = require('fs')
|
||||
const meow = require('meow')
|
||||
const path = require('path')
|
||||
const split = require('split')
|
||||
|
||||
const 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',
|
||||
type: 'string'
|
||||
},
|
||||
options: {
|
||||
alias: 'o',
|
||||
type: 'string'
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
const filePaths = []
|
||||
const flags = cli.flags
|
||||
|
||||
forEach(cli.input, function (input) {
|
||||
filePaths.push(input)
|
||||
})
|
||||
|
||||
const length = filePaths.length
|
||||
|
||||
let templateContext
|
||||
const 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)
|
||||
}
|
||||
}
|
||||
|
||||
let options
|
||||
const 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)
|
||||
}
|
||||
}
|
||||
|
||||
let stream
|
||||
try {
|
||||
stream = conventionalChangelogWriter(templateContext, options)
|
||||
} catch (err) {
|
||||
console.error(err.toString())
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
function processFile (fileIndex) {
|
||||
const 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)
|
||||
}
|
||||
204
node_modules/conventional-changelog-writer/index.js
generated
vendored
Normal file
204
node_modules/conventional-changelog-writer/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,204 @@
|
|||
'use strict'
|
||||
|
||||
const dateFormat = require('dateformat')
|
||||
const join = require('path').join
|
||||
const readFileSync = require('fs').readFileSync
|
||||
const semverValid = require('semver').valid
|
||||
const through = require('through2')
|
||||
const util = require('./lib/util')
|
||||
const _ = require('lodash')
|
||||
|
||||
function conventionalChangelogWriterInit (context, options) {
|
||||
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)
|
||||
}
|
||||
|
||||
let 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 { context, options, generateOn }
|
||||
}
|
||||
|
||||
function conventionalChangelogWriterParseStream (context, options) {
|
||||
let generateOn
|
||||
({ context, options, generateOn } = conventionalChangelogWriterInit(context, options))
|
||||
let commits = []
|
||||
let neverGenerated = true
|
||||
let savedKeyCommit
|
||||
let firstRelease = true
|
||||
return through.obj(function (chunk, _enc, cb) {
|
||||
try {
|
||||
let result
|
||||
const commit = util.processCommit(chunk, options.transform, context)
|
||||
const 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 {
|
||||
const 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)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/*
|
||||
* Given an array of commits, returns a string representing a CHANGELOG entry.
|
||||
*/
|
||||
conventionalChangelogWriterParseStream.parseArray = (rawCommits, context, options) => {
|
||||
let generateOn
|
||||
rawCommits = [...rawCommits];
|
||||
({ context, options, generateOn } = conventionalChangelogWriterInit(context, options))
|
||||
let commits = []
|
||||
let savedKeyCommit
|
||||
if (options.reverse) {
|
||||
rawCommits.reverse()
|
||||
}
|
||||
const entries = []
|
||||
for (const rawCommit of rawCommits) {
|
||||
const commit = util.processCommit(rawCommit, options.transform, context)
|
||||
const keyCommit = commit || rawCommit
|
||||
if (generateOn(keyCommit, commits, context, options)) {
|
||||
entries.push(util.generate(options, commits, context, savedKeyCommit))
|
||||
savedKeyCommit = keyCommit
|
||||
commits = []
|
||||
}
|
||||
if (commit) {
|
||||
commits.push(commit)
|
||||
}
|
||||
}
|
||||
if (options.reverse) {
|
||||
entries.reverse()
|
||||
return util.generate(options, commits, context, savedKeyCommit) + entries.join('')
|
||||
} else {
|
||||
return entries.join('') + util.generate(options, commits, context, savedKeyCommit)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = conventionalChangelogWriterParseStream
|
||||
216
node_modules/conventional-changelog-writer/lib/util.js
generated
vendored
Normal file
216
node_modules/conventional-changelog-writer/lib/util.js
generated
vendored
Normal file
|
|
@ -0,0 +1,216 @@
|
|||
'use strict'
|
||||
const conventionalCommitsFilter = require('conventional-commits-filter')
|
||||
const Handlebars = require('handlebars')
|
||||
const semver = require('semver')
|
||||
const _ = require('lodash')
|
||||
const stringify = require('json-stringify-safe')
|
||||
|
||||
function compileTemplates (templates) {
|
||||
const main = templates.mainTemplate
|
||||
const headerPartial = templates.headerPartial
|
||||
const commitPartial = templates.commitPartial
|
||||
const footerPartial = templates.footerPartial
|
||||
const 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 (a, b) => {
|
||||
let str1 = ''
|
||||
let str2 = ''
|
||||
if (Array.isArray(strOrArr)) {
|
||||
for (const key of strOrArr) {
|
||||
str1 += a[key] || ''
|
||||
str2 += b[key] || ''
|
||||
}
|
||||
} else {
|
||||
str1 += a[strOrArr]
|
||||
str2 += b[strOrArr]
|
||||
}
|
||||
return str1.localeCompare(str2)
|
||||
}
|
||||
} else {
|
||||
return strOrArr
|
||||
}
|
||||
}
|
||||
|
||||
function getCommitGroups (groupBy, commits, groupsSort, commitsSort) {
|
||||
const commitGroups = []
|
||||
const commitGroupsObj = _.groupBy(commits, function (commit) {
|
||||
return commit[groupBy] || ''
|
||||
})
|
||||
|
||||
_.forEach(commitGroupsObj, function (commits, title) {
|
||||
if (title === '') {
|
||||
title = false
|
||||
}
|
||||
|
||||
if (commitsSort) {
|
||||
commits.sort(commitsSort)
|
||||
}
|
||||
|
||||
commitGroups.push({
|
||||
title: title,
|
||||
commits: commits
|
||||
})
|
||||
})
|
||||
|
||||
if (groupsSort) {
|
||||
commitGroups.sort(groupsSort)
|
||||
}
|
||||
|
||||
return commitGroups
|
||||
}
|
||||
|
||||
function getNoteGroups (notes, noteGroupsSort, notesSort) {
|
||||
const retGroups = []
|
||||
|
||||
_.forEach(notes, function (note) {
|
||||
const title = note.title
|
||||
let 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]
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
if (noteGroupsSort) {
|
||||
retGroups.sort(noteGroupsSort)
|
||||
}
|
||||
|
||||
if (notesSort) {
|
||||
_.forEach(retGroups, function (group) {
|
||||
group.notes.sort(notesSort)
|
||||
})
|
||||
}
|
||||
|
||||
return retGroups
|
||||
}
|
||||
|
||||
function processCommit (chunk, transform, context) {
|
||||
let 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) {
|
||||
let 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) {
|
||||
const 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) {
|
||||
let notes = []
|
||||
let filteredCommits
|
||||
const 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/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.js
|
||||
15
node_modules/conventional-changelog-writer/node_modules/semver/LICENSE
generated
vendored
Normal file
15
node_modules/conventional-changelog-writer/node_modules/semver/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
The ISC License
|
||||
|
||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
443
node_modules/conventional-changelog-writer/node_modules/semver/README.md
generated
vendored
Normal file
443
node_modules/conventional-changelog-writer/node_modules/semver/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,443 @@
|
|||
semver(1) -- The semantic versioner for npm
|
||||
===========================================
|
||||
|
||||
## Install
|
||||
|
||||
```bash
|
||||
npm install semver
|
||||
````
|
||||
|
||||
## Usage
|
||||
|
||||
As a node module:
|
||||
|
||||
```js
|
||||
const semver = require('semver')
|
||||
|
||||
semver.valid('1.2.3') // '1.2.3'
|
||||
semver.valid('a.b.c') // null
|
||||
semver.clean(' =v1.2.3 ') // '1.2.3'
|
||||
semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
|
||||
semver.gt('1.2.3', '9.8.7') // false
|
||||
semver.lt('1.2.3', '9.8.7') // true
|
||||
semver.minVersion('>=1.0.0') // '1.0.0'
|
||||
semver.valid(semver.coerce('v2')) // '2.0.0'
|
||||
semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7'
|
||||
```
|
||||
|
||||
As a command-line utility:
|
||||
|
||||
```
|
||||
$ semver -h
|
||||
|
||||
A JavaScript implementation of the https://semver.org/ specification
|
||||
Copyright Isaac Z. Schlueter
|
||||
|
||||
Usage: semver [options] <version> [<version> [...]]
|
||||
Prints valid versions sorted by SemVer precedence
|
||||
|
||||
Options:
|
||||
-r --range <range>
|
||||
Print versions that match the specified range.
|
||||
|
||||
-i --increment [<level>]
|
||||
Increment a version by the specified level. Level can
|
||||
be one of: major, minor, patch, premajor, preminor,
|
||||
prepatch, or prerelease. Default level is 'patch'.
|
||||
Only one version may be specified.
|
||||
|
||||
--preid <identifier>
|
||||
Identifier to be used to prefix premajor, preminor,
|
||||
prepatch or prerelease version increments.
|
||||
|
||||
-l --loose
|
||||
Interpret versions and ranges loosely
|
||||
|
||||
-p --include-prerelease
|
||||
Always include prerelease versions in range matching
|
||||
|
||||
-c --coerce
|
||||
Coerce a string into SemVer if possible
|
||||
(does not imply --loose)
|
||||
|
||||
--rtl
|
||||
Coerce version strings right to left
|
||||
|
||||
--ltr
|
||||
Coerce version strings left to right (default)
|
||||
|
||||
Program exits successfully if any valid version satisfies
|
||||
all supplied ranges, and prints all satisfying versions.
|
||||
|
||||
If no satisfying versions are found, then exits failure.
|
||||
|
||||
Versions are printed in ascending order, so supplying
|
||||
multiple versions to the utility will just sort them.
|
||||
```
|
||||
|
||||
## Versions
|
||||
|
||||
A "version" is described by the `v2.0.0` specification found at
|
||||
<https://semver.org/>.
|
||||
|
||||
A leading `"="` or `"v"` character is stripped off and ignored.
|
||||
|
||||
## Ranges
|
||||
|
||||
A `version range` is a set of `comparators` which specify versions
|
||||
that satisfy the range.
|
||||
|
||||
A `comparator` is composed of an `operator` and a `version`. The set
|
||||
of primitive `operators` is:
|
||||
|
||||
* `<` Less than
|
||||
* `<=` Less than or equal to
|
||||
* `>` Greater than
|
||||
* `>=` Greater than or equal to
|
||||
* `=` Equal. If no operator is specified, then equality is assumed,
|
||||
so this operator is optional, but MAY be included.
|
||||
|
||||
For example, the comparator `>=1.2.7` would match the versions
|
||||
`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6`
|
||||
or `1.1.0`.
|
||||
|
||||
Comparators can be joined by whitespace to form a `comparator set`,
|
||||
which is satisfied by the **intersection** of all of the comparators
|
||||
it includes.
|
||||
|
||||
A range is composed of one or more comparator sets, joined by `||`. A
|
||||
version matches a range if and only if every comparator in at least
|
||||
one of the `||`-separated comparator sets is satisfied by the version.
|
||||
|
||||
For example, the range `>=1.2.7 <1.3.0` would match the versions
|
||||
`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`,
|
||||
or `1.1.0`.
|
||||
|
||||
The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`,
|
||||
`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`.
|
||||
|
||||
### Prerelease Tags
|
||||
|
||||
If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then
|
||||
it will only be allowed to satisfy comparator sets if at least one
|
||||
comparator with the same `[major, minor, patch]` tuple also has a
|
||||
prerelease tag.
|
||||
|
||||
For example, the range `>1.2.3-alpha.3` would be allowed to match the
|
||||
version `1.2.3-alpha.7`, but it would *not* be satisfied by
|
||||
`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater
|
||||
than" `1.2.3-alpha.3` according to the SemVer sort rules. The version
|
||||
range only accepts prerelease tags on the `1.2.3` version. The
|
||||
version `3.4.5` *would* satisfy the range, because it does not have a
|
||||
prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`.
|
||||
|
||||
The purpose for this behavior is twofold. First, prerelease versions
|
||||
frequently are updated very quickly, and contain many breaking changes
|
||||
that are (by the author's design) not yet fit for public consumption.
|
||||
Therefore, by default, they are excluded from range matching
|
||||
semantics.
|
||||
|
||||
Second, a user who has opted into using a prerelease version has
|
||||
clearly indicated the intent to use *that specific* set of
|
||||
alpha/beta/rc versions. By including a prerelease tag in the range,
|
||||
the user is indicating that they are aware of the risk. However, it
|
||||
is still not appropriate to assume that they have opted into taking a
|
||||
similar risk on the *next* set of prerelease versions.
|
||||
|
||||
Note that this behavior can be suppressed (treating all prerelease
|
||||
versions as if they were normal versions, for the purpose of range
|
||||
matching) by setting the `includePrerelease` flag on the options
|
||||
object to any
|
||||
[functions](https://github.com/npm/node-semver#functions) that do
|
||||
range matching.
|
||||
|
||||
#### Prerelease Identifiers
|
||||
|
||||
The method `.inc` takes an additional `identifier` string argument that
|
||||
will append the value of the string as a prerelease identifier:
|
||||
|
||||
```javascript
|
||||
semver.inc('1.2.3', 'prerelease', 'beta')
|
||||
// '1.2.4-beta.0'
|
||||
```
|
||||
|
||||
command-line example:
|
||||
|
||||
```bash
|
||||
$ semver 1.2.3 -i prerelease --preid beta
|
||||
1.2.4-beta.0
|
||||
```
|
||||
|
||||
Which then can be used to increment further:
|
||||
|
||||
```bash
|
||||
$ semver 1.2.4-beta.0 -i prerelease
|
||||
1.2.4-beta.1
|
||||
```
|
||||
|
||||
### Advanced Range Syntax
|
||||
|
||||
Advanced range syntax desugars to primitive comparators in
|
||||
deterministic ways.
|
||||
|
||||
Advanced ranges may be combined in the same way as primitive
|
||||
comparators using white space or `||`.
|
||||
|
||||
#### Hyphen Ranges `X.Y.Z - A.B.C`
|
||||
|
||||
Specifies an inclusive set.
|
||||
|
||||
* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
|
||||
|
||||
If a partial version is provided as the first version in the inclusive
|
||||
range, then the missing pieces are replaced with zeroes.
|
||||
|
||||
* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4`
|
||||
|
||||
If a partial version is provided as the second version in the
|
||||
inclusive range, then all versions that start with the supplied parts
|
||||
of the tuple are accepted, but nothing that would be greater than the
|
||||
provided tuple parts.
|
||||
|
||||
* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0`
|
||||
* `1.2.3 - 2` := `>=1.2.3 <3.0.0`
|
||||
|
||||
#### X-Ranges `1.2.x` `1.X` `1.2.*` `*`
|
||||
|
||||
Any of `X`, `x`, or `*` may be used to "stand in" for one of the
|
||||
numeric values in the `[major, minor, patch]` tuple.
|
||||
|
||||
* `*` := `>=0.0.0` (Any version satisfies)
|
||||
* `1.x` := `>=1.0.0 <2.0.0` (Matching major version)
|
||||
* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions)
|
||||
|
||||
A partial version range is treated as an X-Range, so the special
|
||||
character is in fact optional.
|
||||
|
||||
* `""` (empty string) := `*` := `>=0.0.0`
|
||||
* `1` := `1.x.x` := `>=1.0.0 <2.0.0`
|
||||
* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0`
|
||||
|
||||
#### Tilde Ranges `~1.2.3` `~1.2` `~1`
|
||||
|
||||
Allows patch-level changes if a minor version is specified on the
|
||||
comparator. Allows minor-level changes if not.
|
||||
|
||||
* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0`
|
||||
* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`)
|
||||
* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`)
|
||||
* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0`
|
||||
* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`)
|
||||
* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`)
|
||||
* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in
|
||||
the `1.2.3` version will be allowed, if they are greater than or
|
||||
equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
|
||||
`1.2.4-beta.2` would not, because it is a prerelease of a
|
||||
different `[major, minor, patch]` tuple.
|
||||
|
||||
#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4`
|
||||
|
||||
Allows changes that do not modify the left-most non-zero element in the
|
||||
`[major, minor, patch]` tuple. In other words, this allows patch and
|
||||
minor updates for versions `1.0.0` and above, patch updates for
|
||||
versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`.
|
||||
|
||||
Many authors treat a `0.x` version as if the `x` were the major
|
||||
"breaking-change" indicator.
|
||||
|
||||
Caret ranges are ideal when an author may make breaking changes
|
||||
between `0.2.4` and `0.3.0` releases, which is a common practice.
|
||||
However, it presumes that there will *not* be breaking changes between
|
||||
`0.2.4` and `0.2.5`. It allows for changes that are presumed to be
|
||||
additive (but non-breaking), according to commonly observed practices.
|
||||
|
||||
* `^1.2.3` := `>=1.2.3 <2.0.0`
|
||||
* `^0.2.3` := `>=0.2.3 <0.3.0`
|
||||
* `^0.0.3` := `>=0.0.3 <0.0.4`
|
||||
* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in
|
||||
the `1.2.3` version will be allowed, if they are greater than or
|
||||
equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
|
||||
`1.2.4-beta.2` would not, because it is a prerelease of a
|
||||
different `[major, minor, patch]` tuple.
|
||||
* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the
|
||||
`0.0.3` version *only* will be allowed, if they are greater than or
|
||||
equal to `beta`. So, `0.0.3-pr.2` would be allowed.
|
||||
|
||||
When parsing caret ranges, a missing `patch` value desugars to the
|
||||
number `0`, but will allow flexibility within that value, even if the
|
||||
major and minor versions are both `0`.
|
||||
|
||||
* `^1.2.x` := `>=1.2.0 <2.0.0`
|
||||
* `^0.0.x` := `>=0.0.0 <0.1.0`
|
||||
* `^0.0` := `>=0.0.0 <0.1.0`
|
||||
|
||||
A missing `minor` and `patch` values will desugar to zero, but also
|
||||
allow flexibility within those values, even if the major version is
|
||||
zero.
|
||||
|
||||
* `^1.x` := `>=1.0.0 <2.0.0`
|
||||
* `^0.x` := `>=0.0.0 <1.0.0`
|
||||
|
||||
### Range Grammar
|
||||
|
||||
Putting all this together, here is a Backus-Naur grammar for ranges,
|
||||
for the benefit of parser authors:
|
||||
|
||||
```bnf
|
||||
range-set ::= range ( logical-or range ) *
|
||||
logical-or ::= ( ' ' ) * '||' ( ' ' ) *
|
||||
range ::= hyphen | simple ( ' ' simple ) * | ''
|
||||
hyphen ::= partial ' - ' partial
|
||||
simple ::= primitive | partial | tilde | caret
|
||||
primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
|
||||
partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
|
||||
xr ::= 'x' | 'X' | '*' | nr
|
||||
nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *
|
||||
tilde ::= '~' partial
|
||||
caret ::= '^' partial
|
||||
qualifier ::= ( '-' pre )? ( '+' build )?
|
||||
pre ::= parts
|
||||
build ::= parts
|
||||
parts ::= part ( '.' part ) *
|
||||
part ::= nr | [-0-9A-Za-z]+
|
||||
```
|
||||
|
||||
## Functions
|
||||
|
||||
All methods and classes take a final `options` object argument. All
|
||||
options in this object are `false` by default. The options supported
|
||||
are:
|
||||
|
||||
- `loose` Be more forgiving about not-quite-valid semver strings.
|
||||
(Any resulting output will always be 100% strict compliant, of
|
||||
course.) For backwards compatibility reasons, if the `options`
|
||||
argument is a boolean value instead of an object, it is interpreted
|
||||
to be the `loose` param.
|
||||
- `includePrerelease` Set to suppress the [default
|
||||
behavior](https://github.com/npm/node-semver#prerelease-tags) of
|
||||
excluding prerelease tagged versions from ranges unless they are
|
||||
explicitly opted into.
|
||||
|
||||
Strict-mode Comparators and Ranges will be strict about the SemVer
|
||||
strings that they parse.
|
||||
|
||||
* `valid(v)`: Return the parsed version, or null if it's not valid.
|
||||
* `inc(v, release)`: Return the version incremented by the release
|
||||
type (`major`, `premajor`, `minor`, `preminor`, `patch`,
|
||||
`prepatch`, or `prerelease`), or null if it's not valid
|
||||
* `premajor` in one call will bump the version up to the next major
|
||||
version and down to a prerelease of that major version.
|
||||
`preminor`, and `prepatch` work the same way.
|
||||
* If called from a non-prerelease version, the `prerelease` will work the
|
||||
same as `prepatch`. It increments the patch version, then makes a
|
||||
prerelease. If the input version is already a prerelease it simply
|
||||
increments it.
|
||||
* `prerelease(v)`: Returns an array of prerelease components, or null
|
||||
if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]`
|
||||
* `major(v)`: Return the major version number.
|
||||
* `minor(v)`: Return the minor version number.
|
||||
* `patch(v)`: Return the patch version number.
|
||||
* `intersects(r1, r2, loose)`: Return true if the two supplied ranges
|
||||
or comparators intersect.
|
||||
* `parse(v)`: Attempt to parse a string as a semantic version, returning either
|
||||
a `SemVer` object or `null`.
|
||||
|
||||
### Comparison
|
||||
|
||||
* `gt(v1, v2)`: `v1 > v2`
|
||||
* `gte(v1, v2)`: `v1 >= v2`
|
||||
* `lt(v1, v2)`: `v1 < v2`
|
||||
* `lte(v1, v2)`: `v1 <= v2`
|
||||
* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent,
|
||||
even if they're not the exact same string. You already know how to
|
||||
compare strings.
|
||||
* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`.
|
||||
* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call
|
||||
the corresponding function above. `"==="` and `"!=="` do simple
|
||||
string comparison, but are included for completeness. Throws if an
|
||||
invalid comparison string is provided.
|
||||
* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if
|
||||
`v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
|
||||
* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions
|
||||
in descending order when passed to `Array.sort()`.
|
||||
* `compareBuild(v1, v2)`: The same as `compare` but considers `build` when two versions
|
||||
are equal. Sorts in ascending order if passed to `Array.sort()`.
|
||||
`v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
|
||||
* `diff(v1, v2)`: Returns difference between two versions by the release type
|
||||
(`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`),
|
||||
or null if the versions are the same.
|
||||
|
||||
### Comparators
|
||||
|
||||
* `intersects(comparator)`: Return true if the comparators intersect
|
||||
|
||||
### Ranges
|
||||
|
||||
* `validRange(range)`: Return the valid range or null if it's not valid
|
||||
* `satisfies(version, range)`: Return true if the version satisfies the
|
||||
range.
|
||||
* `maxSatisfying(versions, range)`: Return the highest version in the list
|
||||
that satisfies the range, or `null` if none of them do.
|
||||
* `minSatisfying(versions, range)`: Return the lowest version in the list
|
||||
that satisfies the range, or `null` if none of them do.
|
||||
* `minVersion(range)`: Return the lowest version that can possibly match
|
||||
the given range.
|
||||
* `gtr(version, range)`: Return `true` if version is greater than all the
|
||||
versions possible in the range.
|
||||
* `ltr(version, range)`: Return `true` if version is less than all the
|
||||
versions possible in the range.
|
||||
* `outside(version, range, hilo)`: Return true if the version is outside
|
||||
the bounds of the range in either the high or low direction. The
|
||||
`hilo` argument must be either the string `'>'` or `'<'`. (This is
|
||||
the function called by `gtr` and `ltr`.)
|
||||
* `intersects(range)`: Return true if any of the ranges comparators intersect
|
||||
|
||||
Note that, since ranges may be non-contiguous, a version might not be
|
||||
greater than a range, less than a range, *or* satisfy a range! For
|
||||
example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9`
|
||||
until `2.0.0`, so the version `1.2.10` would not be greater than the
|
||||
range (because `2.0.1` satisfies, which is higher), nor less than the
|
||||
range (since `1.2.8` satisfies, which is lower), and it also does not
|
||||
satisfy the range.
|
||||
|
||||
If you want to know if a version satisfies or does not satisfy a
|
||||
range, use the `satisfies(version, range)` function.
|
||||
|
||||
### Coercion
|
||||
|
||||
* `coerce(version, options)`: Coerces a string to semver if possible
|
||||
|
||||
This aims to provide a very forgiving translation of a non-semver string to
|
||||
semver. It looks for the first digit in a string, and consumes all
|
||||
remaining characters which satisfy at least a partial semver (e.g., `1`,
|
||||
`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer
|
||||
versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All
|
||||
surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes
|
||||
`3.4.0`). Only text which lacks digits will fail coercion (`version one`
|
||||
is not valid). The maximum length for any semver component considered for
|
||||
coercion is 16 characters; longer components will be ignored
|
||||
(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any
|
||||
semver component is `Integer.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value
|
||||
components are invalid (`9999999999999999.4.7.4` is likely invalid).
|
||||
|
||||
If the `options.rtl` flag is set, then `coerce` will return the right-most
|
||||
coercible tuple that does not share an ending index with a longer coercible
|
||||
tuple. For example, `1.2.3.4` will return `2.3.4` in rtl mode, not
|
||||
`4.0.0`. `1.2.3/4` will return `4.0.0`, because the `4` is not a part of
|
||||
any other overlapping SemVer tuple.
|
||||
|
||||
### Clean
|
||||
|
||||
* `clean(version)`: Clean a string to be a valid semver if possible
|
||||
|
||||
This will return a cleaned and trimmed semver version. If the provided version is not valid a null will be returned. This does not work for ranges.
|
||||
|
||||
ex.
|
||||
* `s.clean(' = v 2.1.5foo')`: `null`
|
||||
* `s.clean(' = v 2.1.5foo', { loose: true })`: `'2.1.5-foo'`
|
||||
* `s.clean(' = v 2.1.5-foo')`: `null`
|
||||
* `s.clean(' = v 2.1.5-foo', { loose: true })`: `'2.1.5-foo'`
|
||||
* `s.clean('=v2.1.5')`: `'2.1.5'`
|
||||
* `s.clean(' =v2.1.5')`: `2.1.5`
|
||||
* `s.clean(' 2.1.5 ')`: `'2.1.5'`
|
||||
* `s.clean('~1.0.0')`: `null`
|
||||
174
node_modules/conventional-changelog-writer/node_modules/semver/bin/semver.js
generated
vendored
Executable file
174
node_modules/conventional-changelog-writer/node_modules/semver/bin/semver.js
generated
vendored
Executable file
|
|
@ -0,0 +1,174 @@
|
|||
#!/usr/bin/env node
|
||||
// Standalone semver comparison program.
|
||||
// Exits successfully and prints matching version(s) if
|
||||
// any supplied version is valid and passes all tests.
|
||||
|
||||
var argv = process.argv.slice(2)
|
||||
|
||||
var versions = []
|
||||
|
||||
var range = []
|
||||
|
||||
var inc = null
|
||||
|
||||
var version = require('../package.json').version
|
||||
|
||||
var loose = false
|
||||
|
||||
var includePrerelease = false
|
||||
|
||||
var coerce = false
|
||||
|
||||
var rtl = false
|
||||
|
||||
var identifier
|
||||
|
||||
var semver = require('../semver')
|
||||
|
||||
var reverse = false
|
||||
|
||||
var options = {}
|
||||
|
||||
main()
|
||||
|
||||
function main () {
|
||||
if (!argv.length) return help()
|
||||
while (argv.length) {
|
||||
var a = argv.shift()
|
||||
var indexOfEqualSign = a.indexOf('=')
|
||||
if (indexOfEqualSign !== -1) {
|
||||
a = a.slice(0, indexOfEqualSign)
|
||||
argv.unshift(a.slice(indexOfEqualSign + 1))
|
||||
}
|
||||
switch (a) {
|
||||
case '-rv': case '-rev': case '--rev': case '--reverse':
|
||||
reverse = true
|
||||
break
|
||||
case '-l': case '--loose':
|
||||
loose = true
|
||||
break
|
||||
case '-p': case '--include-prerelease':
|
||||
includePrerelease = true
|
||||
break
|
||||
case '-v': case '--version':
|
||||
versions.push(argv.shift())
|
||||
break
|
||||
case '-i': case '--inc': case '--increment':
|
||||
switch (argv[0]) {
|
||||
case 'major': case 'minor': case 'patch': case 'prerelease':
|
||||
case 'premajor': case 'preminor': case 'prepatch':
|
||||
inc = argv.shift()
|
||||
break
|
||||
default:
|
||||
inc = 'patch'
|
||||
break
|
||||
}
|
||||
break
|
||||
case '--preid':
|
||||
identifier = argv.shift()
|
||||
break
|
||||
case '-r': case '--range':
|
||||
range.push(argv.shift())
|
||||
break
|
||||
case '-c': case '--coerce':
|
||||
coerce = true
|
||||
break
|
||||
case '--rtl':
|
||||
rtl = true
|
||||
break
|
||||
case '--ltr':
|
||||
rtl = false
|
||||
break
|
||||
case '-h': case '--help': case '-?':
|
||||
return help()
|
||||
default:
|
||||
versions.push(a)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
var options = { loose: loose, includePrerelease: includePrerelease, rtl: rtl }
|
||||
|
||||
versions = versions.map(function (v) {
|
||||
return coerce ? (semver.coerce(v, options) || { version: v }).version : v
|
||||
}).filter(function (v) {
|
||||
return semver.valid(v)
|
||||
})
|
||||
if (!versions.length) return fail()
|
||||
if (inc && (versions.length !== 1 || range.length)) { return failInc() }
|
||||
|
||||
for (var i = 0, l = range.length; i < l; i++) {
|
||||
versions = versions.filter(function (v) {
|
||||
return semver.satisfies(v, range[i], options)
|
||||
})
|
||||
if (!versions.length) return fail()
|
||||
}
|
||||
return success(versions)
|
||||
}
|
||||
|
||||
function failInc () {
|
||||
console.error('--inc can only be used on a single version with no range')
|
||||
fail()
|
||||
}
|
||||
|
||||
function fail () { process.exit(1) }
|
||||
|
||||
function success () {
|
||||
var compare = reverse ? 'rcompare' : 'compare'
|
||||
versions.sort(function (a, b) {
|
||||
return semver[compare](a, b, options)
|
||||
}).map(function (v) {
|
||||
return semver.clean(v, options)
|
||||
}).map(function (v) {
|
||||
return inc ? semver.inc(v, inc, options, identifier) : v
|
||||
}).forEach(function (v, i, _) { console.log(v) })
|
||||
}
|
||||
|
||||
function help () {
|
||||
console.log(['SemVer ' + version,
|
||||
'',
|
||||
'A JavaScript implementation of the https://semver.org/ specification',
|
||||
'Copyright Isaac Z. Schlueter',
|
||||
'',
|
||||
'Usage: semver [options] <version> [<version> [...]]',
|
||||
'Prints valid versions sorted by SemVer precedence',
|
||||
'',
|
||||
'Options:',
|
||||
'-r --range <range>',
|
||||
' Print versions that match the specified range.',
|
||||
'',
|
||||
'-i --increment [<level>]',
|
||||
' Increment a version by the specified level. Level can',
|
||||
' be one of: major, minor, patch, premajor, preminor,',
|
||||
" prepatch, or prerelease. Default level is 'patch'.",
|
||||
' Only one version may be specified.',
|
||||
'',
|
||||
'--preid <identifier>',
|
||||
' Identifier to be used to prefix premajor, preminor,',
|
||||
' prepatch or prerelease version increments.',
|
||||
'',
|
||||
'-l --loose',
|
||||
' Interpret versions and ranges loosely',
|
||||
'',
|
||||
'-p --include-prerelease',
|
||||
' Always include prerelease versions in range matching',
|
||||
'',
|
||||
'-c --coerce',
|
||||
' Coerce a string into SemVer if possible',
|
||||
' (does not imply --loose)',
|
||||
'',
|
||||
'--rtl',
|
||||
' Coerce version strings right to left',
|
||||
'',
|
||||
'--ltr',
|
||||
' Coerce version strings left to right (default)',
|
||||
'',
|
||||
'Program exits successfully if any valid version satisfies',
|
||||
'all supplied ranges, and prints all satisfying versions.',
|
||||
'',
|
||||
'If no satisfying versions are found, then exits failure.',
|
||||
'',
|
||||
'Versions are printed in ascending order, so supplying',
|
||||
'multiple versions to the utility will just sort them.'
|
||||
].join('\n'))
|
||||
}
|
||||
38
node_modules/conventional-changelog-writer/node_modules/semver/package.json
generated
vendored
Normal file
38
node_modules/conventional-changelog-writer/node_modules/semver/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
"name": "semver",
|
||||
"version": "6.3.1",
|
||||
"description": "The semantic version parser used by npm.",
|
||||
"main": "semver.js",
|
||||
"scripts": {
|
||||
"test": "tap test/ --100 --timeout=30",
|
||||
"lint": "echo linting disabled",
|
||||
"postlint": "template-oss-check",
|
||||
"template-oss-apply": "template-oss-apply --force",
|
||||
"lintfix": "npm run lint -- --fix",
|
||||
"snap": "tap test/ --100 --timeout=30",
|
||||
"posttest": "npm run lint"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@npmcli/template-oss": "4.17.0",
|
||||
"tap": "^12.7.0"
|
||||
},
|
||||
"license": "ISC",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/npm/node-semver.git"
|
||||
},
|
||||
"bin": {
|
||||
"semver": "./bin/semver.js"
|
||||
},
|
||||
"files": [
|
||||
"bin",
|
||||
"range.bnf",
|
||||
"semver.js"
|
||||
],
|
||||
"author": "GitHub Inc.",
|
||||
"templateOSS": {
|
||||
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
|
||||
"content": "./scripts/template-oss",
|
||||
"version": "4.17.0"
|
||||
}
|
||||
}
|
||||
16
node_modules/conventional-changelog-writer/node_modules/semver/range.bnf
generated
vendored
Normal file
16
node_modules/conventional-changelog-writer/node_modules/semver/range.bnf
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
range-set ::= range ( logical-or range ) *
|
||||
logical-or ::= ( ' ' ) * '||' ( ' ' ) *
|
||||
range ::= hyphen | simple ( ' ' simple ) * | ''
|
||||
hyphen ::= partial ' - ' partial
|
||||
simple ::= primitive | partial | tilde | caret
|
||||
primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
|
||||
partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
|
||||
xr ::= 'x' | 'X' | '*' | nr
|
||||
nr ::= '0' | [1-9] ( [0-9] ) *
|
||||
tilde ::= '~' partial
|
||||
caret ::= '^' partial
|
||||
qualifier ::= ( '-' pre )? ( '+' build )?
|
||||
pre ::= parts
|
||||
build ::= parts
|
||||
parts ::= part ( '.' part ) *
|
||||
part ::= nr | [-0-9A-Za-z]+
|
||||
1643
node_modules/conventional-changelog-writer/node_modules/semver/semver.js
generated
vendored
Normal file
1643
node_modules/conventional-changelog-writer/node_modules/semver/semver.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
59
node_modules/conventional-changelog-writer/package.json
generated
vendored
Normal file
59
node_modules/conventional-changelog-writer/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
{
|
||||
"name": "conventional-changelog-writer",
|
||||
"version": "5.0.1",
|
||||
"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",
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"cli.js",
|
||||
"lib",
|
||||
"templates"
|
||||
],
|
||||
"keywords": [
|
||||
"conventional-changelog-writer",
|
||||
"changelog",
|
||||
"conventional",
|
||||
"commits",
|
||||
"templates",
|
||||
"writer",
|
||||
"writing",
|
||||
"logs"
|
||||
],
|
||||
"dependencies": {
|
||||
"conventional-commits-filter": "^2.0.7",
|
||||
"dateformat": "^3.0.0",
|
||||
"handlebars": "^4.7.7",
|
||||
"json-stringify-safe": "^5.0.1",
|
||||
"lodash": "^4.17.15",
|
||||
"meow": "^8.0.0",
|
||||
"semver": "^6.0.0",
|
||||
"split": "^1.0.0",
|
||||
"through2": "^4.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test-windows": "echo 'make work on windows'"
|
||||
},
|
||||
"bin": {
|
||||
"conventional-changelog-writer": "cli.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"dedent": "^0.7.0",
|
||||
"forceable-tty": "^0.1.0"
|
||||
}
|
||||
}
|
||||
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}}
|
||||
9
node_modules/conventional-changelog-writer/templates/header.hbs
generated
vendored
Normal file
9
node_modules/conventional-changelog-writer/templates/header.hbs
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
## {{#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}}
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue