forked from olcxjas-softworks/LarpixClient
Add capacitorjs runtime
This commit is contained in:
parent
d0ece489ee
commit
f90c0e6c40
8362 changed files with 1502407 additions and 1 deletions
463
node_modules/conventional-commits-parser/CHANGELOG.md
generated
vendored
Normal file
463
node_modules/conventional-commits-parser/CHANGELOG.md
generated
vendored
Normal file
|
|
@ -0,0 +1,463 @@
|
|||
# Change Log
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
# [3.2.0](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-commits-parser@3.1.0...conventional-commits-parser@3.2.0) (2020-11-05)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* ignore gpg lines ([#685](https://github.com/conventional-changelog/conventional-changelog/issues/685)) ([f8fcbc2](https://github.com/conventional-changelog/conventional-changelog/commit/f8fcbc2e8b0834c29178ace6382b438a020ad828))
|
||||
* **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))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* allows notes pattern to be customized ([#586](https://github.com/conventional-changelog/conventional-changelog/issues/586)) ([9c00f32](https://github.com/conventional-changelog/conventional-changelog/commit/9c00f3242d916be1774a618d943f908f8d9699a6))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [3.1.0](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-commits-parser@3.0.8...conventional-commits-parser@3.1.0) (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))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **conventional-commits-parser:** add issuePrefixesCaseSensitive parser option ([#580](https://github.com/conventional-changelog/conventional-changelog/issues/580)) ([526b282](https://github.com/conventional-changelog/conventional-changelog/commit/526b28214d12c55158eb2e4d44408378587ceb97))
|
||||
* support slash in headerPattern default options ([93a547d](https://github.com/conventional-changelog/conventional-changelog/commit/93a547d742634d8676f499cfa2a274bc3792d020))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### [3.2.4](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-commits-parser-v3.2.3...conventional-commits-parser-v3.2.4) (2021-12-29)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* support BREAKING-CHANGE alongside BREAKING CHANGE ([#882](https://github.com/conventional-changelog/conventional-changelog/issues/882)) ([e6f44ad](https://github.com/conventional-changelog/conventional-changelog/commit/e6f44adcf1ac5abbb85bdac73237c331c6594177))
|
||||
|
||||
### [3.2.3](https://www.github.com/conventional-changelog/conventional-changelog/compare/conventional-commits-parser-v3.2.2...conventional-commits-parser-v3.2.3) (2021-10-23)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* address ReDoS issue ([#861](https://www.github.com/conventional-changelog/conventional-changelog/issues/861)) ([c696fa3](https://www.github.com/conventional-changelog/conventional-changelog/commit/c696fa35f93e0ee13728d6cf1221587ac6386311))
|
||||
|
||||
### [3.2.2](https://www.github.com/conventional-changelog/conventional-changelog/compare/conventional-commits-parser-v3.2.1...conventional-commits-parser-v3.2.2) (2021-09-09)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **conventional-commits-parser:** address CVE-2021-23425 ([#841](https://www.github.com/conventional-changelog/conventional-changelog/issues/841)) ([02b3d53](https://www.github.com/conventional-changelog/conventional-changelog/commit/02b3d53a0c142f0c28ee7d190d210c76a62887c2))
|
||||
|
||||
### [3.2.1](https://www.github.com/conventional-changelog/conventional-changelog/compare/conventional-commits-parser@3.2.0...v3.2.1) (2021-02-15)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* handle missing header in merge commit ([#757](https://www.github.com/conventional-changelog/conventional-changelog/issues/757)) ([d189d3e](https://www.github.com/conventional-changelog/conventional-changelog/commit/d189d3e45b82e7141115ce8eccd95c8cf2d7db77))
|
||||
|
||||
## [3.0.8](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-commits-parser@3.0.7...conventional-commits-parser@3.0.8) (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))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [3.0.7](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-commits-parser@3.0.6...conventional-commits-parser@3.0.7) (2019-11-07)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **conventional-commits-parser:** add breaking change notes if header match `breakingHeaderPattern` ([#544](https://github.com/conventional-changelog/conventional-changelog/issues/544)) ([efdf3cb](https://github.com/conventional-changelog/conventional-changelog/commit/efdf3cbc9de3278b180a48beebb74e596e3c5f94))
|
||||
* **conventional-commits-parser:** add missing separator pipe to non tty parser ([#546](https://github.com/conventional-changelog/conventional-changelog/issues/546)) ([c522743](https://github.com/conventional-changelog/conventional-changelog/commit/c5227437b0b300f30a57e8ba5df2a8ab8d163af0))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [3.0.6](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-commits-parser@3.0.5...conventional-commits-parser@3.0.6) (2019-10-24)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **conventional-commits-parser:** downgrade is-text-path due to node 6 incompatibility ([#536](https://github.com/conventional-changelog/conventional-changelog/issues/536)) ([3aa2637](https://github.com/conventional-changelog/conventional-changelog/commit/3aa2637a1c65bb4db3d8bf2c6ce17e6f5abe1ca1))
|
||||
* **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))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [3.0.4](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-commits-parser@3.0.3...conventional-commits-parser@3.0.4) (2019-10-02)
|
||||
|
||||
**Note:** Version bump only for package conventional-commits-parser
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [3.0.3](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-commits-parser@3.0.2...conventional-commits-parser@3.0.3) (2019-05-18)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **deps:** update dependency is-text-path to v2 ([#455](https://github.com/conventional-changelog/conventional-changelog/issues/455)) ([0f40ec3](https://github.com/conventional-changelog/conventional-changelog/commit/0f40ec3))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [3.0.2](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-commits-parser@3.0.1...conventional-commits-parser@3.0.2) (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))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [3.0.1](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-commits-parser@3.0.0...conventional-commits-parser@3.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="3.0.0"></a>
|
||||
# [3.0.0](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-commits-parser@2.1.7...conventional-commits-parser@3.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))
|
||||
|
||||
|
||||
### 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).
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="2.1.7"></a>
|
||||
## [2.1.7](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-commits-parser@2.1.6...conventional-commits-parser@2.1.7) (2018-03-27)
|
||||
|
||||
|
||||
|
||||
|
||||
**Note:** Version bump only for package conventional-commits-parser
|
||||
|
||||
<a name="2.1.6"></a>
|
||||
## [2.1.6](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-commits-parser@2.1.5...conventional-commits-parser@2.1.6) (2018-03-22)
|
||||
|
||||
|
||||
|
||||
|
||||
**Note:** Version bump only for package conventional-commits-parser
|
||||
|
||||
<a name="2.1.5"></a>
|
||||
## [2.1.5](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-commits-parser@2.1.4...conventional-commits-parser@2.1.5) (2018-02-24)
|
||||
|
||||
|
||||
|
||||
|
||||
**Note:** Version bump only for package conventional-commits-parser
|
||||
|
||||
<a name="2.1.4"></a>
|
||||
## [2.1.4](https://github.com/conventional-changelog/conventional-changelog/compare/conventional-commits-parser@2.1.3...conventional-commits-parser@2.1.4) (2018-02-20)
|
||||
|
||||
|
||||
|
||||
|
||||
**Note:** Version bump only for package conventional-commits-parser
|
||||
|
||||
<a name="2.1.3"></a>
|
||||
## [2.1.3](https://github.com/conventional-changelog/conventional-commits-parser/compare/conventional-commits-parser@2.1.2...conventional-commits-parser@2.1.3) (2018-02-13)
|
||||
|
||||
|
||||
|
||||
|
||||
**Note:** Version bump only for package conventional-commits-parser
|
||||
|
||||
<a name="2.1.2"></a>
|
||||
## [2.1.2](https://github.com/conventional-changelog/conventional-commits-parser/compare/conventional-commits-parser@2.1.1...conventional-commits-parser@2.1.2) (2018-02-13)
|
||||
|
||||
|
||||
|
||||
|
||||
**Note:** Version bump only for package conventional-commits-parser
|
||||
|
||||
<a name="2.1.1"></a>
|
||||
## [2.1.1](https://github.com/conventional-changelog/conventional-commits-parser/compare/conventional-commits-parser@2.1.0...conventional-commits-parser@2.1.1) (2018-02-05)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* truncate after scissors line ([#267](https://github.com/conventional-changelog/conventional-commits-parser/issues/267)) ([e09df10](https://github.com/conventional-changelog/conventional-commits-parser/commit/e09df10))
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="2.1.0"></a>
|
||||
# [2.1.0](https://github.com/conventional-changelog/conventional-commits-parser/compare/conventional-commits-parser@2.0.1...conventional-commits-parser@2.1.0) (2017-12-08)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* always parse references ([e84a9ae](https://github.com/conventional-changelog/conventional-commits-parser/commit/e84a9ae)), closes [#248](https://github.com/conventional-changelog/conventional-commits-parser/issues/248)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* make comment stripping optional ([db5b711](https://github.com/conventional-changelog/conventional-commits-parser/commit/db5b711)), closes [#251](https://github.com/conventional-changelog/conventional-commits-parser/issues/251)
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="2.0.1"></a>
|
||||
## [2.0.1](https://github.com/conventional-changelog/conventional-commits-parser/compare/conventional-commits-parser@2.0.0...conventional-commits-parser@2.0.1) (2017-11-13)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **conventional-commits-parser:** ignore comments ([#231](https://github.com/conventional-changelog/conventional-commits-parser/issues/231)) ([9db53e3](https://github.com/conventional-changelog/conventional-commits-parser/commit/9db53e3)), closes [#224](https://github.com/conventional-changelog/conventional-commits-parser/issues/224)
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="2.0.0"></a>
|
||||
# 2.0.0 (2017-07-17)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **cli:** commit can be split when testing a commit file ([f3b3a3f](https://github.com/conventional-changelog/conventional-commits-parser/commit/f3b3a3f))
|
||||
* **cli:** error handling for ENOENT is fixed ([3c92233](https://github.com/conventional-changelog/conventional-commits-parser/commit/3c92233))
|
||||
* **cli:** fix "undefined" in json string ([0680e42](https://github.com/conventional-changelog/conventional-commits-parser/commit/0680e42))
|
||||
* **cli:** options format ([491357e](https://github.com/conventional-changelog/conventional-commits-parser/commit/491357e))
|
||||
* **deps:** require split2 ([1941c37](https://github.com/conventional-changelog/conventional-commits-parser/commit/1941c37))
|
||||
* **error:** change error type and wordings ([d8be5e5](https://github.com/conventional-changelog/conventional-commits-parser/commit/d8be5e5))
|
||||
* **footer:** notes contains more than one paragraphs after references ([d744ec7](https://github.com/conventional-changelog/conventional-commits-parser/commit/d744ec7))
|
||||
* **headerCorrespondence:** string value for cli ([fb774fc](https://github.com/conventional-changelog/conventional-commits-parser/commit/fb774fc))
|
||||
* **headerPattern:** change how capturing groups works ([fe1fe0c](https://github.com/conventional-changelog/conventional-commits-parser/commit/fe1fe0c))
|
||||
* **issuePrefixes:** should return noMatch if falsy ([72db2bf](https://github.com/conventional-changelog/conventional-commits-parser/commit/72db2bf))
|
||||
* **mention:** fix mention matching ([965986b](https://github.com/conventional-changelog/conventional-commits-parser/commit/965986b)), closes [#26](https://github.com/conventional-changelog/conventional-commits-parser/issues/26)
|
||||
* **newlines:** preserve newlines in a part ([06b8c7c](https://github.com/conventional-changelog/conventional-commits-parser/commit/06b8c7c)), closes [#15](https://github.com/conventional-changelog/conventional-commits-parser/issues/15)
|
||||
* **notes:** note keywords must appear at the beginning of a sentence ([5a2059e](https://github.com/conventional-changelog/conventional-commits-parser/commit/5a2059e)), closes [#23](https://github.com/conventional-changelog/conventional-commits-parser/issues/23)
|
||||
* **parser:** do not trim spaces but newlines ([1e8c4c5](https://github.com/conventional-changelog/conventional-commits-parser/commit/1e8c4c5))
|
||||
* **parser:** it returns null if there is no header ([8571c9e](https://github.com/conventional-changelog/conventional-commits-parser/commit/8571c9e))
|
||||
* **regex:** do not treat it as note if there are texts after keywords ([571b03e](https://github.com/conventional-changelog/conventional-commits-parser/commit/571b03e))
|
||||
* **regex:** make getReferencePartsRegex stricter ([62adf54](https://github.com/conventional-changelog/conventional-commits-parser/commit/62adf54)), closes [#27](https://github.com/conventional-changelog/conventional-commits-parser/issues/27) [#30](https://github.com/conventional-changelog/conventional-commits-parser/issues/30) [#27](https://github.com/conventional-changelog/conventional-commits-parser/issues/27) [#28](https://github.com/conventional-changelog/conventional-commits-parser/issues/28)
|
||||
* **revertPattern:** correct regex ([8628983](https://github.com/conventional-changelog/conventional-commits-parser/commit/8628983))
|
||||
* **util:** remove an accidentally commited file ([3710a8c](https://github.com/conventional-changelog/conventional-commits-parser/commit/3710a8c))
|
||||
* **warn:** should tell which commit cannot be parsed ([04b0a9b](https://github.com/conventional-changelog/conventional-commits-parser/commit/04b0a9b))
|
||||
|
||||
|
||||
### Chores
|
||||
|
||||
* init ([a529841](https://github.com/conventional-changelog/conventional-commits-parser/commit/a529841))
|
||||
|
||||
|
||||
### Code Refactoring
|
||||
|
||||
* **breaks:** change `breaks` to `notes` ([5189a61](https://github.com/conventional-changelog/conventional-commits-parser/commit/5189a61)), closes [#2](https://github.com/conventional-changelog/conventional-commits-parser/issues/2)
|
||||
* **merge:** pull-request should be merge ([4e7c61c](https://github.com/conventional-changelog/conventional-commits-parser/commit/4e7c61c))
|
||||
* **regex:** regex now takes `options` ([eea319a](https://github.com/conventional-changelog/conventional-commits-parser/commit/eea319a))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **cli:** able to have two files, separator works for interactive ([db1e3b5](https://github.com/conventional-changelog/conventional-commits-parser/commit/db1e3b5))
|
||||
* **cli:** add aliases, more help details and tests ([eb654a2](https://github.com/conventional-changelog/conventional-commits-parser/commit/eb654a2))
|
||||
* **cli:** add missing options ([8ac1cf7](https://github.com/conventional-changelog/conventional-commits-parser/commit/8ac1cf7))
|
||||
* **cli:** add warn function for interactive shell ([84fe31f](https://github.com/conventional-changelog/conventional-commits-parser/commit/84fe31f))
|
||||
* **correspondence:** add `headerCorrespondence` and improve commit parts ([aca9e95](https://github.com/conventional-changelog/conventional-commits-parser/commit/aca9e95)), closes [#6](https://github.com/conventional-changelog/conventional-commits-parser/issues/6)
|
||||
* **fieldPattern:** should support string format ([b6b6b52](https://github.com/conventional-changelog/conventional-commits-parser/commit/b6b6b52))
|
||||
* **hash:** drop support ([1ccc751](https://github.com/conventional-changelog/conventional-commits-parser/commit/1ccc751))
|
||||
* **headerParts:** headerParts can be anything ([31e1c11](https://github.com/conventional-changelog/conventional-commits-parser/commit/31e1c11)), closes [#10](https://github.com/conventional-changelog/conventional-commits-parser/issues/10)
|
||||
* **issuePrefixes:** init and referenceKeywords -> referenceActions ([86bf798](https://github.com/conventional-changelog/conventional-commits-parser/commit/86bf798)), closes [#11](https://github.com/conventional-changelog/conventional-commits-parser/issues/11)
|
||||
* **maxSubjectLength:** removed ([3448582](https://github.com/conventional-changelog/conventional-commits-parser/commit/3448582))
|
||||
* **mentions:** [@someone](https://github.com/someone) in commit ([d60fe76](https://github.com/conventional-changelog/conventional-commits-parser/commit/d60fe76)), closes [#24](https://github.com/conventional-changelog/conventional-commits-parser/issues/24)
|
||||
* **newline:** fields does not contain leading or trailing newlines ([6db453b](https://github.com/conventional-changelog/conventional-commits-parser/commit/6db453b)), closes [#14](https://github.com/conventional-changelog/conventional-commits-parser/issues/14)
|
||||
* **note:** noteKeywords is case insensitive ([f779a29](https://github.com/conventional-changelog/conventional-commits-parser/commit/f779a29)), closes [#21](https://github.com/conventional-changelog/conventional-commits-parser/issues/21)
|
||||
* **options:** all options can be a string ([0fa17b4](https://github.com/conventional-changelog/conventional-commits-parser/commit/0fa17b4))
|
||||
* **otherFields:** other fields are possible to be included ([9e06278](https://github.com/conventional-changelog/conventional-commits-parser/commit/9e06278))
|
||||
* improvements and bug fixes ([1cde104](https://github.com/conventional-changelog/conventional-commits-parser/commit/1cde104)), closes [#5](https://github.com/conventional-changelog/conventional-commits-parser/issues/5)
|
||||
* migrate repo to lerna mono-repo ([793e823](https://github.com/conventional-changelog/conventional-commits-parser/commit/793e823))
|
||||
* **regex:** matching JIRA-123 like references ([20f1f7a](https://github.com/conventional-changelog/conventional-commits-parser/commit/20f1f7a)), closes [#19](https://github.com/conventional-changelog/conventional-commits-parser/issues/19)
|
||||
* support squash commits ([#31](https://github.com/conventional-changelog/conventional-changelog/issues/31)) ([fff60c0](https://github.com/conventional-changelog/conventional-commits-parser/commit/fff60c0))
|
||||
* **owner:** yield owner field ([d8d0334](https://github.com/conventional-changelog/conventional-commits-parser/commit/d8d0334)), closes [#12](https://github.com/conventional-changelog/conventional-commits-parser/issues/12)
|
||||
* **parser:** notes can have more than one paragraph ([733bfa9](https://github.com/conventional-changelog/conventional-commits-parser/commit/733bfa9)), closes [#3](https://github.com/conventional-changelog/conventional-commits-parser/issues/3)
|
||||
* **pullRequest:** Allow to skip and parse pull request header ([a2e929f](https://github.com/conventional-changelog/conventional-commits-parser/commit/a2e929f)), closes [#20](https://github.com/conventional-changelog/conventional-commits-parser/issues/20)
|
||||
* **reference:** able to reference an issue without an action ([6474123](https://github.com/conventional-changelog/conventional-commits-parser/commit/6474123)), closes [#22](https://github.com/conventional-changelog/conventional-commits-parser/issues/22)
|
||||
* **reference:** expose prefix ([47df766](https://github.com/conventional-changelog/conventional-commits-parser/commit/47df766)), closes [#17](https://github.com/conventional-changelog/conventional-commits-parser/issues/17)
|
||||
* **references:** allow header to reference an issue ([df18a24](https://github.com/conventional-changelog/conventional-commits-parser/commit/df18a24))
|
||||
* **references:** support other formats of references ([7c70213](https://github.com/conventional-changelog/conventional-commits-parser/commit/7c70213)), closes [#4](https://github.com/conventional-changelog/conventional-commits-parser/issues/4) [#8](https://github.com/conventional-changelog/conventional-commits-parser/issues/8)
|
||||
* **regex:** leading and trailing space for closes and breaks keywords are trimmed ([9639860](https://github.com/conventional-changelog/conventional-commits-parser/commit/9639860))
|
||||
* **revert:** parse a commit that reverts ([2af7233](https://github.com/conventional-changelog/conventional-commits-parser/commit/2af7233))
|
||||
* **stream:** emmit an empty string to down stream if commit cannot be parsed ([76bf84e](https://github.com/conventional-changelog/conventional-commits-parser/commit/76bf84e))
|
||||
* **sync:** add the sync function ([82071c6](https://github.com/conventional-changelog/conventional-commits-parser/commit/82071c6)), closes [#13](https://github.com/conventional-changelog/conventional-commits-parser/issues/13)
|
||||
* **warn:** optionally warn user what is wrong when commit cannot be parsed ([32b3cda](https://github.com/conventional-changelog/conventional-commits-parser/commit/32b3cda))
|
||||
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* **regex:** regex should be constructed in index.html ([15afd26](https://github.com/conventional-changelog/conventional-commits-parser/commit/15afd26))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* **merge:** `pull request` should be `merge`. Also make the parsed result to be consistent with other parts.
|
||||
* This module is imported from https://github.com/ajoslin/conventional-changelog, and is originally written by @vojtajina, @btford and @ajoslin.
|
||||
* **hash:** hash is no longer supported. This parser should just parse raw commit messages. Also text fields are appended with a newline "
|
||||
".
|
||||
* **regex:** It returns a nomatch regex if it's keywords are missing.
|
||||
* **headerParts:** `headerParts` does not limit to `type`, `scope` and `subject`. They can now be defined in `options.headerCorrespondence` and the order is the order of capturing group in `options.headerPattern`. If part is missing in `options.headerCorrespondence` it is `undefined`. If part is not captured but is not missing in `options.headerCorrespondence` it is `null`.
|
||||
* **maxSubjectLength:** `maxSubjectLength` is not available any more.
|
||||
* **issuePrefixes:** `options.referenceKeywords` is now `options.referenceActions`
|
||||
* **references:** `closes` now becomes `references` and it is loosely based the links above.
|
||||
* **parser:** The regex for matching notes are loosen. The semicolon and space are optional. 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'
|
||||
}
|
||||
```
|
||||
The detection of notes, closes, continueNote and isBody are mutually exclusive.
|
||||
* **breaks:** Variable name related to `breaks` changes to `notes`, because "Important Notes" a more generic term. There is no functional changes.
|
||||
* **stream:** It no longer skips the chunk if commit cannot be parsed. An empty string is passed to down stream
|
||||
* **correspondence:** body and footer will be null if they are not found. type and subject are nullable too.
|
||||
|
||||
<a name="1.3.0"></a>
|
||||
# [1.3.0](https://github.com/conventional-changelog/conventional-commits-parser/compare/v1.2.3...v1.3.0) (2016-10-15)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* support squash commits (#31) ([860c7a1](https://github.com/conventional-changelog/conventional-commits-parser/commit/860c7a1))
|
||||
|
||||
|
||||
|
||||
<a name="1.2.3"></a>
|
||||
## [1.2.3](https://github.com/conventional-changelog/conventional-commits-parser/compare/v1.2.2...v1.2.3) (2016-08-06)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **regex:** do not treat it as note if there are texts after keywords ([9cb56bc](https://github.com/conventional-changelog/conventional-commits-parser/commit/9cb56bc))
|
||||
|
||||
|
||||
|
||||
<a name="1.2.2"></a>
|
||||
## [1.2.2](https://github.com/conventional-changelog/conventional-commits-parser/compare/v1.2.1...v1.2.2) (2016-05-04)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **regex:** make getReferencePartsRegex stricter ([b8a9fda](https://github.com/conventional-changelog/conventional-commits-parser/commit/b8a9fda)), closes [#27](https://github.com/conventional-changelog/conventional-commits-parser/issues/27) [(#30](https://github.com/(/issues/30) [#27](https://github.com/conventional-changelog/conventional-commits-parser/issues/27) [#28](https://github.com/conventional-changelog/conventional-commits-parser/issues/28)
|
||||
|
||||
|
||||
|
||||
<a name="1.2.1"></a>
|
||||
## [1.2.1](https://github.com/conventional-changelog/conventional-commits-parser/compare/v1.2.0...v1.2.1) (2016-04-24)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **mention:** fix mention matching ([43b32e7](https://github.com/conventional-changelog/conventional-commits-parser/commit/43b32e7)), closes [#26](https://github.com/conventional-changelog/conventional-commits-parser/issues/26)
|
||||
|
||||
|
||||
|
||||
<a name="1.2.0"></a>
|
||||
# [1.2.0](https://github.com/conventional-changelog/conventional-commits-parser/compare/v1.1.0...v1.2.0) (2016-04-15)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **mentions:** @someone in commit ([b2eabbf](https://github.com/conventional-changelog/conventional-commits-parser/commit/b2eabbf)), closes [#24](https://github.com/conventional-changelog/conventional-commits-parser/issues/24)
|
||||
|
||||
|
||||
|
||||
<a name="1.1.0"></a>
|
||||
# [1.1.0](https://github.com/conventional-changelog/conventional-commits-parser/compare/v1.0.1...v1.1.0) (2016-04-10)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **notes:** note keywords must appear at the beginning of a sentence ([6e13789](https://github.com/conventional-changelog/conventional-commits-parser/commit/6e13789)), closes [#23](https://github.com/conventional-changelog/conventional-commits-parser/issues/23)
|
||||
|
||||
### Features
|
||||
|
||||
* **reference:** able to reference an issue without an action ([cf847b1](https://github.com/conventional-changelog/conventional-commits-parser/commit/cf847b1)), closes [#22](https://github.com/conventional-changelog/conventional-commits-parser/issues/22)
|
||||
|
||||
|
||||
|
||||
<a name="1.0.1"></a>
|
||||
## [1.0.1](https://github.com/stevemao/conventional-commits-parser/compare/v1.0.0...v1.0.1) (2016-02-05)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **deps:** require split2 ([ad55810](https://github.com/stevemao/conventional-commits-parser/commit/ad55810))
|
||||
|
||||
|
||||
|
||||
<a name="1.0.0"></a>
|
||||
# [1.0.0](https://github.com/stevemao/conventional-commits-parser/compare/v0.2.0...v1.0.0) (2016-02-05)
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="0.2.0"></a>
|
||||
# [0.2.0](https://github.com/stevemao/conventional-commits-parser/compare/v0.1.2...v0.2.0) (2016-02-04)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **note:** noteKeywords is case insensitive ([4442b86](https://github.com/stevemao/conventional-commits-parser/commit/4442b86)), closes [#21](https://github.com/stevemao/conventional-commits-parser/issues/21)
|
||||
* **pullRequest:** Allow to skip and parse pull request header ([aa85033](https://github.com/stevemao/conventional-commits-parser/commit/aa85033)), closes [#20](https://github.com/stevemao/conventional-commits-parser/issues/20)
|
||||
* **regex:** matching JIRA-123 like references ([5342f45](https://github.com/stevemao/conventional-commits-parser/commit/5342f45)), closes [#19](https://github.com/stevemao/conventional-commits-parser/issues/19)
|
||||
|
||||
|
||||
|
||||
<a name="0.1.2"></a>
|
||||
## [0.1.2](https://github.com/stevemao/conventional-commits-parser/compare/v0.1.1...v0.1.2) (2015-09-18)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **parser:** do not trim spaces but newlines ([62e7bf5](https://github.com/stevemao/conventional-commits-parser/commit/62e7bf5))
|
||||
|
||||
|
||||
|
||||
<a name="0.1.1"></a>
|
||||
## [0.1.1](https://github.com/stevemao/conventional-commits-parser/compare/v0.1.0...v0.1.1) (2015-09-12)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **newlines:** preserve newlines in a part ([beb3d05](https://github.com/stevemao/conventional-commits-parser/commit/beb3d05)), closes [#15](https://github.com/stevemao/conventional-commits-parser/issues/15)
|
||||
|
||||
### Features
|
||||
|
||||
* **reference:** expose prefix ([9962dda](https://github.com/stevemao/conventional-commits-parser/commit/9962dda)), closes [#17](https://github.com/stevemao/conventional-commits-parser/issues/17)
|
||||
21
node_modules/conventional-commits-parser/LICENSE.md
generated
vendored
Normal file
21
node_modules/conventional-commits-parser/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.
|
||||
383
node_modules/conventional-commits-parser/README.md
generated
vendored
Normal file
383
node_modules/conventional-commits-parser/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,383 @@
|
|||
# [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage Status][coveralls-image]][coveralls-url]
|
||||
|
||||
> Parse raw conventional commits
|
||||
|
||||
|
||||
## Conventional Commit Message Format
|
||||
|
||||
A minimum input should contain a raw message.
|
||||
|
||||
Each commit message consists of a **merge header**, a **header** (mandatory), a **body** and a **footer**. **Mention** (optional) someone using the `@` notation.
|
||||
|
||||
```
|
||||
<merge>
|
||||
<header>
|
||||
<body>
|
||||
<footer>
|
||||
```
|
||||
|
||||
### merge
|
||||
|
||||
The merge header may optionally have a special format that includes other parts, such as **branch**, **issueId** or **source**.
|
||||
|
||||
```
|
||||
Merge branch <branch>
|
||||
Merge pull request <issue-id> from <source>
|
||||
```
|
||||
|
||||
### header
|
||||
|
||||
The header may optionally have a special format that includes other parts, such as **type**, **scope** and **subject**. You could **reference** (optional) issues here.
|
||||
|
||||
```
|
||||
<type>(<scope>): <subject>
|
||||
```
|
||||
|
||||
### footer
|
||||
|
||||
The footer should contain any information about **Important Notes** (optional) and is also the place to **reference** (optional) issues.
|
||||
|
||||
```
|
||||
<important note>
|
||||
<references>
|
||||
```
|
||||
|
||||
### other parts
|
||||
|
||||
This module will only parse the message body. However, it is possible to include other fields such as hash, committer or date.
|
||||
|
||||
```
|
||||
My commit message
|
||||
-sideNotes-
|
||||
It should warn the correct unfound file names.
|
||||
Also it should continue if one file cannot be found.
|
||||
Tests are added for these
|
||||
```
|
||||
|
||||
Then `sideNotes` will be `It should warn the correct unfound file names.\nAlso it should continue if one file cannot be found.\nTests are added for these`. You can customize the `fieldPattern`.
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
$ npm install --save conventional-commits-parser
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var conventionalCommitsParser = require('conventional-commits-parser');
|
||||
|
||||
conventionalCommitsParser(options);
|
||||
```
|
||||
|
||||
It returns a transform stream and expects an upstream that looks something like this:
|
||||
|
||||
```
|
||||
'feat(scope): broadcast $destroy event on scope destruction\nCloses #1'
|
||||
'feat(ng-list): Allow custom separator\nbla bla bla\n\nBREAKING CHANGE: some breaking change.\nThanks @stevemao\n'
|
||||
```
|
||||
|
||||
Each chunk should be a commit. The downstream will look something like this:
|
||||
|
||||
```js
|
||||
{ type: 'feat',
|
||||
scope: 'scope',
|
||||
subject: 'broadcast $destroy event on scope destruction',
|
||||
merge: null,
|
||||
header: 'feat(scope): broadcast $destroy event on scope destruction',
|
||||
body: null,
|
||||
footer: 'Closes #1',
|
||||
notes: [],
|
||||
references:
|
||||
[ { action: 'Closes',
|
||||
owner: null,
|
||||
repository: null,
|
||||
issue: '1',
|
||||
raw: '#1',
|
||||
prefix: '#' } ],
|
||||
mentions: [],
|
||||
revert: null }
|
||||
{ type: 'feat',
|
||||
scope: 'ng-list',
|
||||
subject: 'Allow custom separator',
|
||||
merge: null,
|
||||
header: 'feat(ng-list): Allow custom separator',
|
||||
body: 'bla bla bla',
|
||||
footer: 'BREAKING CHANGE: some breaking change.\nThanks @stevemao',
|
||||
notes:
|
||||
[ { title: 'BREAKING CHANGE',
|
||||
text: 'some breaking change.\nThanks @stevemao' } ],
|
||||
references: [],
|
||||
mentions: [ 'stevemao' ],
|
||||
revert: null }
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### conventionalCommitsParser([options])
|
||||
|
||||
Returns an transform stream. If there is any malformed commits it will be gracefully ignored (an empty data will be emitted so down stream can notice).
|
||||
|
||||
#### options
|
||||
|
||||
Type: `object`
|
||||
|
||||
##### mergePattern
|
||||
|
||||
Type: `regex` or `string` Default: null
|
||||
|
||||
Pattern to match merge headers. EG: branch merge, GitHub or GitLab like pull requests headers. When a merge header is parsed, the next line is used for conventional header parsing.
|
||||
|
||||
For example, if we have a commit
|
||||
|
||||
```
|
||||
Merge pull request #1 from user/feature/feature-name
|
||||
|
||||
feat(scope): broadcast $destroy event on scope destruction
|
||||
```
|
||||
|
||||
We can parse it with these options and the default headerPattern:
|
||||
|
||||
```js
|
||||
{
|
||||
mergePattern: /^Merge pull request #(\d+) from (.*)$/,
|
||||
mergeCorrespondence: ['id', 'source']
|
||||
}
|
||||
```
|
||||
|
||||
##### mergeCorrespondence
|
||||
|
||||
Type: `array` of `string` or `string` Default: null
|
||||
|
||||
Used to define what capturing group of `mergePattern`.
|
||||
|
||||
If it's a `string` it will be converted to an `array` separated by a comma.
|
||||
|
||||
##### headerPattern
|
||||
|
||||
Type: `regex` or `string` Default: `/^(\w*)(?:\(([\w\$\.\-\* ]*)\))?\: (.*)$/`
|
||||
|
||||
Used to match header pattern.
|
||||
|
||||
##### headerCorrespondence
|
||||
|
||||
Type: `array` of `string` or `string` Default `['type', 'scope', 'subject']`
|
||||
|
||||
Used to define what capturing group of `headerPattern` captures what header part. The order of the array should correspond to the order of `headerPattern`'s capturing group. If the part is not captured it is `null`. If it's a `string` it will be converted to an `array` separated by a comma.
|
||||
|
||||
##### referenceActions
|
||||
|
||||
Type: `array` of `string` or `string` Default:
|
||||
`[
|
||||
'close',
|
||||
'closes',
|
||||
'closed',
|
||||
'fix',
|
||||
'fixes',
|
||||
'fixed',
|
||||
'resolve',
|
||||
'resolves',
|
||||
'resolved'
|
||||
]`
|
||||
|
||||
Keywords to reference an issue. This value is case **insensitive**. If it's a `string` it will be converted to an `array` separated by a comma.
|
||||
|
||||
Set it to `null` to reference an issue without any action.
|
||||
|
||||
##### issuePrefixes
|
||||
|
||||
Type: `array` of `string` or `string` Default: `['#']`
|
||||
|
||||
The prefixes of an issue. EG: In `gh-123` `gh-` is the prefix.
|
||||
|
||||
##### issuePrefixesCaseSensitive
|
||||
|
||||
Type: `boolean` Default: false
|
||||
|
||||
Used to define if `issuePrefixes` should be considered case sensitive.
|
||||
|
||||
##### noteKeywords
|
||||
|
||||
Type: `array` of `string` or `string` Default: `['BREAKING CHANGE',
|
||||
'BREAKING-CHANGE']`
|
||||
|
||||
Keywords for important notes. This value is case **insensitive**. If it's a `string` it will be converted to an `array` separated by a comma.
|
||||
|
||||
##### notesPattern
|
||||
|
||||
Type: `function` Default: `noteKeywordsSelection => ^[\\s|*]*(' + noteKeywordsSelection + ')[:\\s]+(.*)` where `noteKeywordsSelection` is `join(noteKeywords, '|')`
|
||||
|
||||
A function that takes `noteKeywordsSelection` and returns a `RegExp` to be matched against the notes.
|
||||
|
||||
##### fieldPattern
|
||||
|
||||
Type: `regex` or `string` Default: `/^-(.*?)-$/`
|
||||
|
||||
Pattern to match other fields.
|
||||
|
||||
##### revertPattern
|
||||
|
||||
Type: `regex` or `string` Default: `/^Revert\s"([\s\S]*)"\s*This reverts commit (\w*)\./`
|
||||
|
||||
Pattern to match what this commit reverts.
|
||||
|
||||
##### revertCorrespondence
|
||||
|
||||
Type: `array` of `string` or `string` Default: `['header', 'hash']`
|
||||
|
||||
Used to define what capturing group of `revertPattern` captures what reverted commit fields. The order of the array should correspond to the order of `revertPattern`'s capturing group.
|
||||
|
||||
For example, if we had commit
|
||||
|
||||
```
|
||||
Revert "throw an error if a callback is passed"
|
||||
|
||||
This reverts commit 9bb4d6c.
|
||||
```
|
||||
|
||||
If configured correctly, the parsed result would be
|
||||
|
||||
```js
|
||||
{
|
||||
revert: {
|
||||
header: 'throw an error if a callback is passed',
|
||||
hash: '9bb4d6c'
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
It implies that this commit reverts a commit with header `'throw an error if a callback is passed'` and hash `'9bb4d6c'`.
|
||||
|
||||
If it's a `string` it will be converted to an `array` separated by a comma.
|
||||
|
||||
##### commentChar
|
||||
|
||||
Type: `string` or `null` Default: null
|
||||
|
||||
What commentChar to use. By default it is `null`, so no comments are stripped.
|
||||
Set to `#` if you pass the contents of `.git/COMMIT_EDITMSG` directly.
|
||||
|
||||
If you have configured the git commentchar via `git config core.commentchar` you'll want to pass what you have set there.
|
||||
|
||||
##### warn
|
||||
|
||||
Type: `function` or `boolean` Default: `function() {}`
|
||||
|
||||
What warn function to use. For example, `console.warn.bind(console)` or `grunt.log.writeln`. By default, it's a noop. If it is `true`, it will error if commit cannot be parsed (strict).
|
||||
|
||||
### conventionalCommitsParser.sync(commit, [options])
|
||||
|
||||
The sync version. Useful when parsing a single commit. Returns the result.
|
||||
|
||||
#### commit
|
||||
|
||||
A single commit to be parsed.
|
||||
|
||||
#### options
|
||||
|
||||
Same as the `options` of `conventionalCommitsParser`.
|
||||
|
||||
|
||||
## CLI
|
||||
|
||||
You can use cli to practice writing commit messages or parse messages from files. Note: the sample output might be different. It's just for demonstration purposes.
|
||||
|
||||
```sh
|
||||
$ npm install --global conventional-commits-parser
|
||||
```
|
||||
|
||||
If you run `conventional-commits-parser` without any arguments
|
||||
|
||||
```sh
|
||||
$ conventional-commits-parser
|
||||
```
|
||||
|
||||
You will enter an interactive shell. To show your parsed output enter "return" three times (or enter your specified separator).
|
||||
|
||||
```sh
|
||||
> fix(title): a title is fixed
|
||||
|
||||
|
||||
{"type":"fix","scope":"title","subject":"a title is fixed","header":"fix(title): a title is fixed","body":null,"footer":null,"notes":[],"references":[],"revert":null}
|
||||
```
|
||||
|
||||
You can also use cli to parse messages from files.
|
||||
|
||||
If you have log.txt
|
||||
|
||||
```text
|
||||
feat(ngMessages): provide support for dynamic message resolution
|
||||
|
||||
Prior to this fix it was impossible to apply a binding to a the ngMessage directive to represent the name of the error.
|
||||
|
||||
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.
|
||||
|
||||
Closes #10036
|
||||
Closes #9338
|
||||
```
|
||||
|
||||
And you run
|
||||
|
||||
```sh
|
||||
$ conventional-commits-parser log.txt
|
||||
# or
|
||||
$ cat log.txt | conventional-commits-parser
|
||||
```
|
||||
|
||||
An array of json will be printed to stdout.
|
||||
|
||||
```sh
|
||||
[
|
||||
{"type":"feat","scope":"ngMessages","subject":"provide support for dynamic message resolution","header":"feat(ngMessages): 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"}],"revert":null}
|
||||
]
|
||||
```
|
||||
|
||||
Commits should be split by at least three newlines (`\n\n\n`) or you can specify a separator as the second argument.
|
||||
|
||||
Eg: in log2.txt
|
||||
|
||||
```text
|
||||
|
||||
docs(ngMessageExp): split ngMessage docs up to show its alias more clearly
|
||||
===
|
||||
|
||||
fix($animate): applyStyles from options on leave
|
||||
|
||||
Closes #10068
|
||||
```
|
||||
|
||||
And you run
|
||||
|
||||
```sh
|
||||
$ conventional-commits-parser log2.txt '==='
|
||||
```
|
||||
|
||||
```sh
|
||||
[
|
||||
{"type":"docs","scope":"ngMessageExp","subject":"split ngMessage docs up to show its alias more clearly","header":"docs(ngMessageExp): split ngMessage docs up to show its alias more clearly","body":null,"footer":null,"notes":[],"references":[],"revert":null}
|
||||
,
|
||||
{"type":"fix","scope":"$animate","subject":"applyStyles from options on leave","header":"fix($animate): applyStyles from options on leave","body":null,"footer":"Closes #10068","notes":[],"references":[{"action":"Closes","owner":null,"repository":null,"issue":"10068","raw":"#10068"}],"revert":null}
|
||||
]
|
||||
```
|
||||
|
||||
Will be printed out.
|
||||
|
||||
You can specify one or more files. The output array will be in order of the input file paths. If you specify more than one separator, the last one will be used.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Steve Mao](https://github.com/stevemao)
|
||||
|
||||
|
||||
[npm-image]: https://badge.fury.io/js/conventional-commits-parser.svg
|
||||
[npm-url]: https://npmjs.org/package/conventional-commits-parser
|
||||
[travis-image]: https://travis-ci.org/conventional-changelog/conventional-commits-parser.svg?branch=master
|
||||
[travis-url]: https://travis-ci.org/conventional-changelog/conventional-commits-parser
|
||||
[daviddm-image]: https://david-dm.org/conventional-changelog/conventional-commits-parser.svg?theme=shields.io
|
||||
[daviddm-url]: https://david-dm.org/conventional-changelog/conventional-commits-parser
|
||||
[coveralls-image]: https://coveralls.io/repos/conventional-changelog/conventional-commits-parser/badge.svg
|
||||
[coveralls-url]: https://coveralls.io/r/conventional-changelog/conventional-commits-parser
|
||||
165
node_modules/conventional-commits-parser/cli.js
generated
vendored
Executable file
165
node_modules/conventional-commits-parser/cli.js
generated
vendored
Executable file
|
|
@ -0,0 +1,165 @@
|
|||
#!/usr/bin/env node
|
||||
'use strict'
|
||||
const conventionalCommitsParser = require('./')
|
||||
const forEach = require('lodash').forEach
|
||||
const fs = require('fs')
|
||||
const isTextPath = require('is-text-path')
|
||||
const JSONStream = require('JSONStream')
|
||||
const meow = require('meow')
|
||||
const readline = require('readline')
|
||||
const split = require('split2')
|
||||
const through = require('through2')
|
||||
|
||||
const filePaths = []
|
||||
let separator = '\n\n\n'
|
||||
|
||||
const cli = meow(`
|
||||
Practice writing commit messages or parse messages from files.
|
||||
If used without specifying a text file path, you will enter an interactive shell.
|
||||
Otherwise the commit messages in the files are parsed and printed
|
||||
By default, commits will be split by three newlines ('\\n\\n\\n') or you can specify a separator.
|
||||
|
||||
Usage
|
||||
conventional-commits-parser [<commit-separator>]
|
||||
conventional-commits-parser [<commit-separator>] <path> [<path> ...]
|
||||
cat <path> | conventional-commits-parser [<commit-separator>]
|
||||
|
||||
Example
|
||||
conventional-commits-parser
|
||||
conventional-commits-parser log.txt
|
||||
cat log.txt | conventional-commits-parser
|
||||
conventional-commits-parser log2.txt '===' >> parsed.txt
|
||||
|
||||
Options
|
||||
-p, --header-pattern Regex to match header pattern
|
||||
-c, --header-correspondence Comma separated parts used to define what capturing group of 'headerPattern' captures what
|
||||
-r, --reference-actions Comma separated keywords that used to reference issues
|
||||
-i, --issue-prefixes Comma separated prefixes of an issue
|
||||
--issue-prefixes-case-sensitive Treat issue prefixes as case sensitive
|
||||
-n, --note-keywords Comma separated keywords for important notes
|
||||
-f, --field-pattern Regex to match other fields
|
||||
--revert-pattern Regex to match revert pattern
|
||||
--revert-correspondence Comma separated fields used to define what the commit reverts
|
||||
-v, --verbose Verbose output
|
||||
`, {
|
||||
flags: {
|
||||
'header-pattern': {
|
||||
alias: 'p',
|
||||
type: 'string'
|
||||
},
|
||||
'header-correspondence': {
|
||||
alias: 'c',
|
||||
type: 'string'
|
||||
},
|
||||
'reference-actions': {
|
||||
alias: 'r',
|
||||
type: 'string'
|
||||
},
|
||||
'issue-prefixes': {
|
||||
alias: 'i',
|
||||
type: 'string'
|
||||
},
|
||||
'issue-prefixes-case-sensitive': {
|
||||
type: 'boolean'
|
||||
},
|
||||
'note-keywords': {
|
||||
alias: 'n',
|
||||
type: 'string'
|
||||
},
|
||||
'field-pattern': {
|
||||
alias: 'f',
|
||||
type: 'string'
|
||||
},
|
||||
'revert-pattern': {
|
||||
type: 'string'
|
||||
},
|
||||
'revert-correspondence': {
|
||||
type: 'string'
|
||||
},
|
||||
verbose: {
|
||||
alias: 'v',
|
||||
type: 'boolean'
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
forEach(cli.input, function (arg) {
|
||||
if (isTextPath(arg)) {
|
||||
filePaths.push(arg)
|
||||
} else {
|
||||
separator = arg
|
||||
}
|
||||
})
|
||||
|
||||
const length = filePaths.length
|
||||
const options = cli.flags
|
||||
|
||||
if (options.verbose) {
|
||||
options.warn = console.log.bind(console)
|
||||
}
|
||||
|
||||
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(separator))
|
||||
.pipe(conventionalCommitsParser(options))
|
||||
.pipe(JSONStream.stringify())
|
||||
.on('end', function () {
|
||||
if (++fileIndex < length) {
|
||||
processFile(fileIndex)
|
||||
}
|
||||
})
|
||||
.pipe(process.stdout)
|
||||
}
|
||||
|
||||
if (process.stdin.isTTY) {
|
||||
if (length > 0) {
|
||||
processFile(0)
|
||||
} else {
|
||||
let commit = ''
|
||||
const stream = through()
|
||||
const rl = readline.createInterface({
|
||||
input: process.stdin,
|
||||
output: process.stdout,
|
||||
terminal: true
|
||||
})
|
||||
|
||||
stream.pipe(conventionalCommitsParser(options))
|
||||
.pipe(JSONStream.stringify('', '', ''))
|
||||
.pipe(through(function (chunk, enc, cb) {
|
||||
if (chunk.toString() === '""') {
|
||||
cb(null, 'Commit cannot be parsed\n')
|
||||
} else {
|
||||
cb(null, chunk + '\n')
|
||||
}
|
||||
}))
|
||||
.pipe(process.stdout)
|
||||
|
||||
rl.on('line', function (line) {
|
||||
commit += line + '\n'
|
||||
if (commit.indexOf(separator) === -1) {
|
||||
return
|
||||
}
|
||||
|
||||
stream.write(commit)
|
||||
commit = ''
|
||||
})
|
||||
}
|
||||
} else {
|
||||
options.warn = true
|
||||
process.stdin
|
||||
.pipe(split(separator))
|
||||
.pipe(conventionalCommitsParser(options))
|
||||
.on('error', function (err) {
|
||||
console.error(err.toString())
|
||||
process.exit(1)
|
||||
})
|
||||
.pipe(JSONStream.stringify())
|
||||
.pipe(process.stdout)
|
||||
}
|
||||
101
node_modules/conventional-commits-parser/index.js
generated
vendored
Normal file
101
node_modules/conventional-commits-parser/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
'use strict'
|
||||
|
||||
const parser = require('./lib/parser')
|
||||
const regex = require('./lib/regex')
|
||||
const through = require('through2')
|
||||
const _ = require('lodash')
|
||||
|
||||
function assignOpts (options) {
|
||||
options = _.extend({
|
||||
headerPattern: /^(\w*)(?:\(([\w$.\-*/ ]*)\))?: (.*)$/,
|
||||
headerCorrespondence: ['type', 'scope', 'subject'],
|
||||
referenceActions: [
|
||||
'close',
|
||||
'closes',
|
||||
'closed',
|
||||
'fix',
|
||||
'fixes',
|
||||
'fixed',
|
||||
'resolve',
|
||||
'resolves',
|
||||
'resolved'
|
||||
],
|
||||
issuePrefixes: ['#'],
|
||||
noteKeywords: ['BREAKING CHANGE', 'BREAKING-CHANGE'],
|
||||
fieldPattern: /^-(.*?)-$/,
|
||||
revertPattern: /^Revert\s"([\s\S]*)"\s*This reverts commit (\w*)\./,
|
||||
revertCorrespondence: ['header', 'hash'],
|
||||
warn: function () {},
|
||||
mergePattern: null,
|
||||
mergeCorrespondence: null
|
||||
}, options)
|
||||
|
||||
if (typeof options.headerPattern === 'string') {
|
||||
options.headerPattern = new RegExp(options.headerPattern)
|
||||
}
|
||||
|
||||
if (typeof options.headerCorrespondence === 'string') {
|
||||
options.headerCorrespondence = options.headerCorrespondence.split(',')
|
||||
}
|
||||
|
||||
if (typeof options.referenceActions === 'string') {
|
||||
options.referenceActions = options.referenceActions.split(',')
|
||||
}
|
||||
|
||||
if (typeof options.issuePrefixes === 'string') {
|
||||
options.issuePrefixes = options.issuePrefixes.split(',')
|
||||
}
|
||||
|
||||
if (typeof options.noteKeywords === 'string') {
|
||||
options.noteKeywords = options.noteKeywords.split(',')
|
||||
}
|
||||
|
||||
if (typeof options.fieldPattern === 'string') {
|
||||
options.fieldPattern = new RegExp(options.fieldPattern)
|
||||
}
|
||||
|
||||
if (typeof options.revertPattern === 'string') {
|
||||
options.revertPattern = new RegExp(options.revertPattern)
|
||||
}
|
||||
|
||||
if (typeof options.revertCorrespondence === 'string') {
|
||||
options.revertCorrespondence = options.revertCorrespondence.split(',')
|
||||
}
|
||||
|
||||
if (typeof options.mergePattern === 'string') {
|
||||
options.mergePattern = new RegExp(options.mergePattern)
|
||||
}
|
||||
|
||||
return options
|
||||
}
|
||||
|
||||
function conventionalCommitsParser (options) {
|
||||
options = assignOpts(options)
|
||||
const reg = regex(options)
|
||||
|
||||
return through.obj(function (data, enc, cb) {
|
||||
let commit
|
||||
|
||||
try {
|
||||
commit = parser(data.toString(), options, reg)
|
||||
cb(null, commit)
|
||||
} catch (err) {
|
||||
if (options.warn === true) {
|
||||
cb(err)
|
||||
} else {
|
||||
options.warn(err.toString())
|
||||
cb(null, '')
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function sync (commit, options) {
|
||||
options = assignOpts(options)
|
||||
const reg = regex(options)
|
||||
|
||||
return parser(commit, options, reg)
|
||||
}
|
||||
|
||||
module.exports = conventionalCommitsParser
|
||||
module.exports.sync = sync
|
||||
316
node_modules/conventional-commits-parser/lib/parser.js
generated
vendored
Normal file
316
node_modules/conventional-commits-parser/lib/parser.js
generated
vendored
Normal file
|
|
@ -0,0 +1,316 @@
|
|||
'use strict'
|
||||
const _ = require('lodash')
|
||||
|
||||
const CATCH_ALL = /()(.+)/gi
|
||||
const SCISSOR = '# ------------------------ >8 ------------------------'
|
||||
|
||||
function trimOffNewlines (input) {
|
||||
const result = input.match(/[^\r\n]/)
|
||||
if (!result) {
|
||||
return ''
|
||||
}
|
||||
const firstIndex = result.index
|
||||
let lastIndex = input.length - 1
|
||||
while (input[lastIndex] === '\r' || input[lastIndex] === '\n') {
|
||||
lastIndex--
|
||||
}
|
||||
return input.substring(firstIndex, lastIndex + 1)
|
||||
}
|
||||
|
||||
function append (src, line) {
|
||||
if (src) {
|
||||
src += '\n' + line
|
||||
} else {
|
||||
src = line
|
||||
}
|
||||
|
||||
return src
|
||||
}
|
||||
|
||||
function getCommentFilter (char) {
|
||||
return function (line) {
|
||||
return line.charAt(0) !== char
|
||||
}
|
||||
}
|
||||
|
||||
function truncateToScissor (lines) {
|
||||
const scissorIndex = lines.indexOf(SCISSOR)
|
||||
|
||||
if (scissorIndex === -1) {
|
||||
return lines
|
||||
}
|
||||
|
||||
return lines.slice(0, scissorIndex)
|
||||
}
|
||||
|
||||
function getReferences (input, regex) {
|
||||
const references = []
|
||||
let referenceSentences
|
||||
let referenceMatch
|
||||
|
||||
const reApplicable = input.match(regex.references) !== null
|
||||
? regex.references
|
||||
: CATCH_ALL
|
||||
|
||||
while ((referenceSentences = reApplicable.exec(input))) {
|
||||
const action = referenceSentences[1] || null
|
||||
const sentence = referenceSentences[2]
|
||||
|
||||
while ((referenceMatch = regex.referenceParts.exec(sentence))) {
|
||||
let owner = null
|
||||
let repository = referenceMatch[1] || ''
|
||||
const ownerRepo = repository.split('/')
|
||||
|
||||
if (ownerRepo.length > 1) {
|
||||
owner = ownerRepo.shift()
|
||||
repository = ownerRepo.join('/')
|
||||
}
|
||||
|
||||
const reference = {
|
||||
action: action,
|
||||
owner: owner,
|
||||
repository: repository || null,
|
||||
issue: referenceMatch[3],
|
||||
raw: referenceMatch[0],
|
||||
prefix: referenceMatch[2]
|
||||
}
|
||||
|
||||
references.push(reference)
|
||||
}
|
||||
}
|
||||
|
||||
return references
|
||||
}
|
||||
|
||||
function passTrough () {
|
||||
return true
|
||||
}
|
||||
|
||||
function parser (raw, options, regex) {
|
||||
if (!raw || !raw.trim()) {
|
||||
throw new TypeError('Expected a raw commit')
|
||||
}
|
||||
|
||||
if (_.isEmpty(options)) {
|
||||
throw new TypeError('Expected options')
|
||||
}
|
||||
|
||||
if (_.isEmpty(regex)) {
|
||||
throw new TypeError('Expected regex')
|
||||
}
|
||||
|
||||
let currentProcessedField
|
||||
let mentionsMatch
|
||||
const otherFields = {}
|
||||
const commentFilter = typeof options.commentChar === 'string'
|
||||
? getCommentFilter(options.commentChar)
|
||||
: passTrough
|
||||
const gpgFilter = line => !line.match(/^\s*gpg:/)
|
||||
|
||||
const rawLines = trimOffNewlines(raw).split(/\r?\n/)
|
||||
const lines = truncateToScissor(rawLines).filter(commentFilter).filter(gpgFilter)
|
||||
|
||||
let continueNote = false
|
||||
let isBody = true
|
||||
const headerCorrespondence = _.map(options.headerCorrespondence, function (part) {
|
||||
return part.trim()
|
||||
})
|
||||
const revertCorrespondence = _.map(options.revertCorrespondence, function (field) {
|
||||
return field.trim()
|
||||
})
|
||||
const mergeCorrespondence = _.map(options.mergeCorrespondence, function (field) {
|
||||
return field.trim()
|
||||
})
|
||||
|
||||
let body = null
|
||||
let footer = null
|
||||
let header = null
|
||||
const mentions = []
|
||||
let merge = null
|
||||
const notes = []
|
||||
const references = []
|
||||
let revert = null
|
||||
|
||||
if (lines.length === 0) {
|
||||
return {
|
||||
body: body,
|
||||
footer: footer,
|
||||
header: header,
|
||||
mentions: mentions,
|
||||
merge: merge,
|
||||
notes: notes,
|
||||
references: references,
|
||||
revert: revert,
|
||||
scope: null,
|
||||
subject: null,
|
||||
type: null
|
||||
}
|
||||
}
|
||||
|
||||
// msg parts
|
||||
merge = lines.shift()
|
||||
const mergeParts = {}
|
||||
const headerParts = {}
|
||||
body = ''
|
||||
footer = ''
|
||||
|
||||
const mergeMatch = merge.match(options.mergePattern)
|
||||
if (mergeMatch && options.mergePattern) {
|
||||
merge = mergeMatch[0]
|
||||
|
||||
header = lines.shift()
|
||||
while (header !== undefined && !header.trim()) {
|
||||
header = lines.shift()
|
||||
}
|
||||
if (!header) {
|
||||
header = ''
|
||||
}
|
||||
|
||||
_.forEach(mergeCorrespondence, function (partName, index) {
|
||||
const partValue = mergeMatch[index + 1] || null
|
||||
mergeParts[partName] = partValue
|
||||
})
|
||||
} else {
|
||||
header = merge
|
||||
merge = null
|
||||
|
||||
_.forEach(mergeCorrespondence, function (partName) {
|
||||
mergeParts[partName] = null
|
||||
})
|
||||
}
|
||||
|
||||
const headerMatch = header.match(options.headerPattern)
|
||||
if (headerMatch) {
|
||||
_.forEach(headerCorrespondence, function (partName, index) {
|
||||
const partValue = headerMatch[index + 1] || null
|
||||
headerParts[partName] = partValue
|
||||
})
|
||||
} else {
|
||||
_.forEach(headerCorrespondence, function (partName) {
|
||||
headerParts[partName] = null
|
||||
})
|
||||
}
|
||||
|
||||
Array.prototype.push.apply(references, getReferences(header, {
|
||||
references: regex.references,
|
||||
referenceParts: regex.referenceParts
|
||||
}))
|
||||
|
||||
// body or footer
|
||||
_.forEach(lines, function (line) {
|
||||
if (options.fieldPattern) {
|
||||
const fieldMatch = options.fieldPattern.exec(line)
|
||||
|
||||
if (fieldMatch) {
|
||||
currentProcessedField = fieldMatch[1]
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
if (currentProcessedField) {
|
||||
otherFields[currentProcessedField] = append(otherFields[currentProcessedField], line)
|
||||
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
let referenceMatched
|
||||
|
||||
// this is a new important note
|
||||
const notesMatch = line.match(regex.notes)
|
||||
if (notesMatch) {
|
||||
continueNote = true
|
||||
isBody = false
|
||||
footer = append(footer, line)
|
||||
|
||||
const note = {
|
||||
title: notesMatch[1],
|
||||
text: notesMatch[2]
|
||||
}
|
||||
|
||||
notes.push(note)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
const lineReferences = getReferences(line, {
|
||||
references: regex.references,
|
||||
referenceParts: regex.referenceParts
|
||||
})
|
||||
|
||||
if (lineReferences.length > 0) {
|
||||
isBody = false
|
||||
referenceMatched = true
|
||||
continueNote = false
|
||||
}
|
||||
|
||||
Array.prototype.push.apply(references, lineReferences)
|
||||
|
||||
if (referenceMatched) {
|
||||
footer = append(footer, line)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
if (continueNote) {
|
||||
notes[notes.length - 1].text = append(notes[notes.length - 1].text, line)
|
||||
footer = append(footer, line)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
if (isBody) {
|
||||
body = append(body, line)
|
||||
} else {
|
||||
footer = append(footer, line)
|
||||
}
|
||||
})
|
||||
|
||||
if (options.breakingHeaderPattern && notes.length === 0) {
|
||||
const breakingHeader = header.match(options.breakingHeaderPattern)
|
||||
if (breakingHeader) {
|
||||
const noteText = breakingHeader[3] // the description of the change.
|
||||
notes.push({
|
||||
title: 'BREAKING CHANGE',
|
||||
text: noteText
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
while ((mentionsMatch = regex.mentions.exec(raw))) {
|
||||
mentions.push(mentionsMatch[1])
|
||||
}
|
||||
|
||||
// does this commit revert any other commit?
|
||||
const revertMatch = raw.match(options.revertPattern)
|
||||
if (revertMatch) {
|
||||
revert = {}
|
||||
_.forEach(revertCorrespondence, function (partName, index) {
|
||||
const partValue = revertMatch[index + 1] || null
|
||||
revert[partName] = partValue
|
||||
})
|
||||
} else {
|
||||
revert = null
|
||||
}
|
||||
|
||||
_.map(notes, function (note) {
|
||||
note.text = trimOffNewlines(note.text)
|
||||
|
||||
return note
|
||||
})
|
||||
|
||||
const msg = _.merge(headerParts, mergeParts, {
|
||||
merge: merge,
|
||||
header: header,
|
||||
body: body ? trimOffNewlines(body) : null,
|
||||
footer: footer ? trimOffNewlines(footer) : null,
|
||||
notes: notes,
|
||||
references: references,
|
||||
mentions: mentions,
|
||||
revert: revert
|
||||
}, otherFields)
|
||||
|
||||
return msg
|
||||
}
|
||||
|
||||
module.exports = parser
|
||||
61
node_modules/conventional-commits-parser/lib/regex.js
generated
vendored
Normal file
61
node_modules/conventional-commits-parser/lib/regex.js
generated
vendored
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
'use strict'
|
||||
|
||||
const reNomatch = /(?!.*)/
|
||||
|
||||
function join (array, joiner) {
|
||||
return array
|
||||
.map(function (val) {
|
||||
return val.trim()
|
||||
})
|
||||
.filter(function (val) {
|
||||
return val.length
|
||||
})
|
||||
.join(joiner)
|
||||
}
|
||||
|
||||
function getNotesRegex (noteKeywords, notesPattern) {
|
||||
if (!noteKeywords) {
|
||||
return reNomatch
|
||||
}
|
||||
|
||||
const noteKeywordsSelection = join(noteKeywords, '|')
|
||||
|
||||
if (!notesPattern) {
|
||||
return new RegExp('^[\\s|*]*(' + noteKeywordsSelection + ')[:\\s]+(.*)', 'i')
|
||||
}
|
||||
|
||||
return notesPattern(noteKeywordsSelection)
|
||||
}
|
||||
|
||||
function getReferencePartsRegex (issuePrefixes, issuePrefixesCaseSensitive) {
|
||||
if (!issuePrefixes) {
|
||||
return reNomatch
|
||||
}
|
||||
|
||||
const flags = issuePrefixesCaseSensitive ? 'g' : 'gi'
|
||||
return new RegExp('(?:.*?)??\\s*([\\w-\\.\\/]*?)??(' + join(issuePrefixes, '|') + ')([\\w-]*\\d+)', flags)
|
||||
}
|
||||
|
||||
function getReferencesRegex (referenceActions) {
|
||||
if (!referenceActions) {
|
||||
// matches everything
|
||||
return /()(.+)/gi
|
||||
}
|
||||
|
||||
const joinedKeywords = join(referenceActions, '|')
|
||||
return new RegExp('(' + joinedKeywords + ')(?:\\s+(.*?))(?=(?:' + joinedKeywords + ')|$)', 'gi')
|
||||
}
|
||||
|
||||
module.exports = function (options) {
|
||||
options = options || {}
|
||||
const reNotes = getNotesRegex(options.noteKeywords, options.notesPattern)
|
||||
const reReferenceParts = getReferencePartsRegex(options.issuePrefixes, options.issuePrefixesCaseSensitive)
|
||||
const reReferences = getReferencesRegex(options.referenceActions)
|
||||
|
||||
return {
|
||||
notes: reNotes,
|
||||
referenceParts: reReferenceParts,
|
||||
references: reReferences,
|
||||
mentions: /@([\w-]+)/g
|
||||
}
|
||||
}
|
||||
13
node_modules/conventional-commits-parser/node_modules/split2/LICENSE
generated
vendored
Normal file
13
node_modules/conventional-commits-parser/node_modules/split2/LICENSE
generated
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
Copyright (c) 2014-2018, Matteo Collina <hello@matteocollina.com>
|
||||
|
||||
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.
|
||||
97
node_modules/conventional-commits-parser/node_modules/split2/README.md
generated
vendored
Normal file
97
node_modules/conventional-commits-parser/node_modules/split2/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
# Split2(matcher, mapper, options)
|
||||
|
||||

|
||||
|
||||
Break up a stream and reassemble it so that each line is a chunk.
|
||||
`split2` is inspired by [@dominictarr](https://github.com/dominictarr) [`split`](https://github.com/dominictarr/split) module,
|
||||
and it is totally API compatible with it.
|
||||
However, it is based on Node.js core [`Transform`](https://nodejs.org/api/stream.html#stream_new_stream_transform_options) via [`readable-stream`](https://github.com/nodejs/readable-stream)
|
||||
|
||||
`matcher` may be a `String`, or a `RegExp`. Example, read every line in a file ...
|
||||
|
||||
``` js
|
||||
fs.createReadStream(file)
|
||||
.pipe(split2())
|
||||
.on('data', function (line) {
|
||||
//each chunk now is a separate line!
|
||||
})
|
||||
|
||||
```
|
||||
|
||||
`split` takes the same arguments as `string.split` except it defaults to '/\r?\n/', and the optional `limit` paremeter is ignored.
|
||||
[String#split](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/split)
|
||||
|
||||
`split` takes an optional options object on it's third argument, which
|
||||
is directly passed as a
|
||||
[Transform](https://nodejs.org/api/stream.html#stream_new_stream_transform_options)
|
||||
option.
|
||||
|
||||
Additionally, the `.maxLength` and `.skipOverflow` options are implemented, which set limits on the internal
|
||||
buffer size and the stream's behavior when the limit is exceeded. There is no limit unless `maxLength` is set. When
|
||||
the internal buffer size exceeds `maxLength`, the stream emits an error by default. You may also set `skipOverflow` to
|
||||
true to suppress the error and instead skip past any lines that cause the internal buffer to exceed `maxLength`.
|
||||
|
||||
Calling `.destroy` will make the stream emit `close`. Use this to perform cleanup logic
|
||||
|
||||
``` js
|
||||
var splitFile = function(filename) {
|
||||
var file = fs.createReadStream(filename)
|
||||
|
||||
return file
|
||||
.pipe(split2())
|
||||
.on('close', function() {
|
||||
// destroy the file stream in case the split stream was destroyed
|
||||
file.destroy()
|
||||
})
|
||||
}
|
||||
|
||||
var stream = splitFile('my-file.txt')
|
||||
|
||||
stream.destroy() // will destroy the input file stream
|
||||
```
|
||||
|
||||
# NDJ - Newline Delimited Json
|
||||
|
||||
`split2` accepts a function which transforms each line.
|
||||
|
||||
``` js
|
||||
fs.createReadStream(file)
|
||||
.pipe(split2(JSON.parse))
|
||||
.on('data', function (obj) {
|
||||
//each chunk now is a js object
|
||||
})
|
||||
.on("error", function(error) => {
|
||||
//handling parsing errors
|
||||
})
|
||||
```
|
||||
|
||||
However, in [@dominictarr](https://github.com/dominictarr) [`split`](https://github.com/dominictarr/split) the mapper
|
||||
is wrapped in a try-catch, while here it is not: if your parsing logic can throw, wrap it yourself. Otherwise, you can also use the stream error handling when mapper function throw.
|
||||
|
||||
# Benchmark
|
||||
|
||||
```bash
|
||||
$ node bench.js
|
||||
benchSplit*10000: 1484.983ms
|
||||
benchBinarySplit*10000: 1484.080ms
|
||||
benchSplit*10000: 1407.334ms
|
||||
benchBinarySplit*10000: 1500.281ms
|
||||
```
|
||||
|
||||
Benchmark taken on Node 8.11.3, on a Macbook i5 2018.
|
||||
|
||||
# License
|
||||
|
||||
Copyright (c) 2014-2018, Matteo Collina <hello@matteocollina.com>
|
||||
|
||||
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.
|
||||
27
node_modules/conventional-commits-parser/node_modules/split2/bench.js
generated
vendored
Normal file
27
node_modules/conventional-commits-parser/node_modules/split2/bench.js
generated
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
'use strict'
|
||||
|
||||
var split = require('./')
|
||||
var bench = require('fastbench')
|
||||
var binarySplit = require('binary-split')
|
||||
var fs = require('fs')
|
||||
|
||||
function benchSplit (cb) {
|
||||
fs.createReadStream('package.json')
|
||||
.pipe(split())
|
||||
.on('end', cb)
|
||||
.resume()
|
||||
}
|
||||
|
||||
function benchBinarySplit (cb) {
|
||||
fs.createReadStream('package.json')
|
||||
.pipe(binarySplit())
|
||||
.on('end', cb)
|
||||
.resume()
|
||||
}
|
||||
|
||||
var run = bench([
|
||||
benchSplit,
|
||||
benchBinarySplit
|
||||
], 10000)
|
||||
|
||||
run(run)
|
||||
132
node_modules/conventional-commits-parser/node_modules/split2/index.js
generated
vendored
Normal file
132
node_modules/conventional-commits-parser/node_modules/split2/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,132 @@
|
|||
/*
|
||||
Copyright (c) 2014-2018, Matteo Collina <hello@matteocollina.com>
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
const { Transform } = require('readable-stream')
|
||||
const { StringDecoder } = require('string_decoder')
|
||||
const kLast = Symbol('last')
|
||||
const kDecoder = Symbol('decoder')
|
||||
|
||||
function transform (chunk, enc, cb) {
|
||||
var list
|
||||
if (this.overflow) { // Line buffer is full. Skip to start of next line.
|
||||
var buf = this[kDecoder].write(chunk)
|
||||
list = buf.split(this.matcher)
|
||||
|
||||
if (list.length === 1) return cb() // Line ending not found. Discard entire chunk.
|
||||
|
||||
// Line ending found. Discard trailing fragment of previous line and reset overflow state.
|
||||
list.shift()
|
||||
this.overflow = false
|
||||
} else {
|
||||
this[kLast] += this[kDecoder].write(chunk)
|
||||
list = this[kLast].split(this.matcher)
|
||||
}
|
||||
|
||||
this[kLast] = list.pop()
|
||||
|
||||
for (var i = 0; i < list.length; i++) {
|
||||
try {
|
||||
push(this, this.mapper(list[i]))
|
||||
} catch (error) {
|
||||
return cb(error)
|
||||
}
|
||||
}
|
||||
|
||||
this.overflow = this[kLast].length > this.maxLength
|
||||
if (this.overflow && !this.skipOverflow) return cb(new Error('maximum buffer reached'))
|
||||
|
||||
cb()
|
||||
}
|
||||
|
||||
function flush (cb) {
|
||||
// forward any gibberish left in there
|
||||
this[kLast] += this[kDecoder].end()
|
||||
|
||||
if (this[kLast]) {
|
||||
try {
|
||||
push(this, this.mapper(this[kLast]))
|
||||
} catch (error) {
|
||||
return cb(error)
|
||||
}
|
||||
}
|
||||
|
||||
cb()
|
||||
}
|
||||
|
||||
function push (self, val) {
|
||||
if (val !== undefined) {
|
||||
self.push(val)
|
||||
}
|
||||
}
|
||||
|
||||
function noop (incoming) {
|
||||
return incoming
|
||||
}
|
||||
|
||||
function split (matcher, mapper, options) {
|
||||
// Set defaults for any arguments not supplied.
|
||||
matcher = matcher || /\r?\n/
|
||||
mapper = mapper || noop
|
||||
options = options || {}
|
||||
|
||||
// Test arguments explicitly.
|
||||
switch (arguments.length) {
|
||||
case 1:
|
||||
// If mapper is only argument.
|
||||
if (typeof matcher === 'function') {
|
||||
mapper = matcher
|
||||
matcher = /\r?\n/
|
||||
// If options is only argument.
|
||||
} else if (typeof matcher === 'object' && !(matcher instanceof RegExp)) {
|
||||
options = matcher
|
||||
matcher = /\r?\n/
|
||||
}
|
||||
break
|
||||
|
||||
case 2:
|
||||
// If mapper and options are arguments.
|
||||
if (typeof matcher === 'function') {
|
||||
options = mapper
|
||||
mapper = matcher
|
||||
matcher = /\r?\n/
|
||||
// If matcher and options are arguments.
|
||||
} else if (typeof mapper === 'object') {
|
||||
options = mapper
|
||||
mapper = noop
|
||||
}
|
||||
}
|
||||
|
||||
options = Object.assign({}, options)
|
||||
options.transform = transform
|
||||
options.flush = flush
|
||||
options.readableObjectMode = true
|
||||
|
||||
const stream = new Transform(options)
|
||||
|
||||
stream[kLast] = ''
|
||||
stream[kDecoder] = new StringDecoder('utf8')
|
||||
stream.matcher = matcher
|
||||
stream.mapper = mapper
|
||||
stream.maxLength = options.maxLength
|
||||
stream.skipOverflow = options.skipOverflow
|
||||
stream.overflow = false
|
||||
|
||||
return stream
|
||||
}
|
||||
|
||||
module.exports = split
|
||||
40
node_modules/conventional-commits-parser/node_modules/split2/package.json
generated
vendored
Normal file
40
node_modules/conventional-commits-parser/node_modules/split2/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
"name": "split2",
|
||||
"version": "3.2.2",
|
||||
"description": "split a Text Stream into a Line Stream, using Stream 3",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"lint": "standard --verbose",
|
||||
"unit": "nyc --lines 100 --branches 100 --functions 100 --check-coverage --reporter=text tape test.js",
|
||||
"coverage": "nyc --reporter=html --reporter=cobertura --reporter=text tape test/test.js",
|
||||
"test:report": "npm run lint && npm run unit:report",
|
||||
"test": "npm run lint && npm run unit",
|
||||
"legacy": "tape test.js"
|
||||
},
|
||||
"pre-commit": [
|
||||
"test"
|
||||
],
|
||||
"website": "https://github.com/mcollina/split2",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/mcollina/split2.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "http://github.com/mcollina/split2/issues"
|
||||
},
|
||||
"author": "Matteo Collina <hello@matteocollina.com>",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"binary-split": "^1.0.3",
|
||||
"callback-stream": "^1.1.0",
|
||||
"fastbench": "^1.0.0",
|
||||
"nyc": "^15.0.1",
|
||||
"pre-commit": "^1.1.2",
|
||||
"safe-buffer": "^5.1.1",
|
||||
"standard": "^14.0.0",
|
||||
"tape": "^5.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"readable-stream": "^3.0.0"
|
||||
}
|
||||
}
|
||||
392
node_modules/conventional-commits-parser/node_modules/split2/test.js
generated
vendored
Normal file
392
node_modules/conventional-commits-parser/node_modules/split2/test.js
generated
vendored
Normal file
|
|
@ -0,0 +1,392 @@
|
|||
'use strict'
|
||||
|
||||
var test = require('tape')
|
||||
var split = require('./')
|
||||
var callback = require('callback-stream')
|
||||
var Buffer = require('safe-buffer').Buffer
|
||||
var strcb = callback.bind(null, { decodeStrings: false })
|
||||
var objcb = callback.bind(null, { objectMode: true })
|
||||
|
||||
test('split two lines on end', function (t) {
|
||||
t.plan(2)
|
||||
|
||||
var input = split()
|
||||
|
||||
input.pipe(strcb(function (err, list) {
|
||||
t.error(err)
|
||||
t.deepEqual(list, ['hello', 'world'])
|
||||
}))
|
||||
|
||||
input.end('hello\nworld')
|
||||
})
|
||||
|
||||
test('split two lines on two writes', function (t) {
|
||||
t.plan(2)
|
||||
|
||||
var input = split()
|
||||
|
||||
input.pipe(strcb(function (err, list) {
|
||||
t.error(err)
|
||||
t.deepEqual(list, ['hello', 'world'])
|
||||
}))
|
||||
|
||||
input.write('hello')
|
||||
input.write('\nworld')
|
||||
input.end()
|
||||
})
|
||||
|
||||
test('split four lines on three writes', function (t) {
|
||||
t.plan(2)
|
||||
|
||||
var input = split()
|
||||
|
||||
input.pipe(strcb(function (err, list) {
|
||||
t.error(err)
|
||||
t.deepEqual(list, ['hello', 'world', 'bye', 'world'])
|
||||
}))
|
||||
|
||||
input.write('hello\nwor')
|
||||
input.write('ld\nbye\nwo')
|
||||
input.write('rld')
|
||||
input.end()
|
||||
})
|
||||
|
||||
test('accumulate multiple writes', function (t) {
|
||||
t.plan(2)
|
||||
|
||||
var input = split()
|
||||
|
||||
input.pipe(strcb(function (err, list) {
|
||||
t.error(err)
|
||||
t.deepEqual(list, ['helloworld'])
|
||||
}))
|
||||
|
||||
input.write('hello')
|
||||
input.write('world')
|
||||
input.end()
|
||||
})
|
||||
|
||||
test('split using a custom string matcher', function (t) {
|
||||
t.plan(2)
|
||||
|
||||
var input = split('~')
|
||||
|
||||
input.pipe(strcb(function (err, list) {
|
||||
t.error(err)
|
||||
t.deepEqual(list, ['hello', 'world'])
|
||||
}))
|
||||
|
||||
input.end('hello~world')
|
||||
})
|
||||
|
||||
test('split using a custom regexp matcher', function (t) {
|
||||
t.plan(2)
|
||||
|
||||
var input = split(/~/)
|
||||
|
||||
input.pipe(strcb(function (err, list) {
|
||||
t.error(err)
|
||||
t.deepEqual(list, ['hello', 'world'])
|
||||
}))
|
||||
|
||||
input.end('hello~world')
|
||||
})
|
||||
|
||||
test('support an option argument', function (t) {
|
||||
t.plan(2)
|
||||
|
||||
var input = split({ highWaterMark: 2 })
|
||||
|
||||
input.pipe(strcb(function (err, list) {
|
||||
t.error(err)
|
||||
t.deepEqual(list, ['hello', 'world'])
|
||||
}))
|
||||
|
||||
input.end('hello\nworld')
|
||||
})
|
||||
|
||||
test('support a mapper function', function (t) {
|
||||
t.plan(2)
|
||||
|
||||
var a = { a: '42' }
|
||||
var b = { b: '24' }
|
||||
|
||||
var input = split(JSON.parse)
|
||||
|
||||
input.pipe(objcb(function (err, list) {
|
||||
t.error(err)
|
||||
t.deepEqual(list, [a, b])
|
||||
}))
|
||||
|
||||
input.write(JSON.stringify(a))
|
||||
input.write('\n')
|
||||
input.end(JSON.stringify(b))
|
||||
})
|
||||
|
||||
test('split lines windows-style', function (t) {
|
||||
t.plan(2)
|
||||
|
||||
var input = split()
|
||||
|
||||
input.pipe(strcb(function (err, list) {
|
||||
t.error(err)
|
||||
t.deepEqual(list, ['hello', 'world'])
|
||||
}))
|
||||
|
||||
input.end('hello\r\nworld')
|
||||
})
|
||||
|
||||
test('splits a buffer', function (t) {
|
||||
t.plan(2)
|
||||
|
||||
var input = split()
|
||||
|
||||
input.pipe(strcb(function (err, list) {
|
||||
t.error(err)
|
||||
t.deepEqual(list, ['hello', 'world'])
|
||||
}))
|
||||
|
||||
input.end(Buffer.from('hello\nworld'))
|
||||
})
|
||||
|
||||
test('do not end on undefined', function (t) {
|
||||
t.plan(2)
|
||||
|
||||
var input = split(function (line) { })
|
||||
|
||||
input.pipe(strcb(function (err, list) {
|
||||
t.error(err)
|
||||
t.deepEqual(list, [])
|
||||
}))
|
||||
|
||||
input.end(Buffer.from('hello\nworld'))
|
||||
})
|
||||
|
||||
test('has destroy method', function (t) {
|
||||
t.plan(1)
|
||||
|
||||
var input = split(function (line) { })
|
||||
|
||||
input.on('close', function () {
|
||||
t.ok(true, 'close emitted')
|
||||
t.end()
|
||||
})
|
||||
|
||||
input.destroy()
|
||||
})
|
||||
|
||||
test('support custom matcher and mapper', function (t) {
|
||||
t.plan(4)
|
||||
|
||||
var a = { a: '42' }
|
||||
var b = { b: '24' }
|
||||
var input = split('~', JSON.parse)
|
||||
|
||||
t.equal(input.matcher, '~')
|
||||
t.equal(typeof input.mapper, 'function')
|
||||
|
||||
input.pipe(objcb(function (err, list) {
|
||||
t.notOk(err, 'no errors')
|
||||
t.deepEqual(list, [a, b])
|
||||
}))
|
||||
|
||||
input.write(JSON.stringify(a))
|
||||
input.write('~')
|
||||
input.end(JSON.stringify(b))
|
||||
})
|
||||
|
||||
test('support custom matcher and options', function (t) {
|
||||
t.plan(6)
|
||||
|
||||
var input = split('~', { highWaterMark: 1024 })
|
||||
|
||||
t.equal(input.matcher, '~')
|
||||
t.equal(typeof input.mapper, 'function')
|
||||
t.equal(input._readableState.highWaterMark, 1024)
|
||||
t.equal(input._writableState.highWaterMark, 1024)
|
||||
|
||||
input.pipe(strcb(function (err, list) {
|
||||
t.error(err)
|
||||
t.deepEqual(list, ['hello', 'world'])
|
||||
}))
|
||||
|
||||
input.end('hello~world')
|
||||
})
|
||||
|
||||
test('support mapper and options', function (t) {
|
||||
t.plan(6)
|
||||
|
||||
var a = { a: '42' }
|
||||
var b = { b: '24' }
|
||||
var input = split(JSON.parse, { highWaterMark: 1024 })
|
||||
|
||||
t.ok(input.matcher instanceof RegExp, 'matcher is RegExp')
|
||||
t.equal(typeof input.mapper, 'function')
|
||||
t.equal(input._readableState.highWaterMark, 1024)
|
||||
t.equal(input._writableState.highWaterMark, 1024)
|
||||
|
||||
input.pipe(objcb(function (err, list) {
|
||||
t.error(err)
|
||||
t.deepEqual(list, [a, b])
|
||||
}))
|
||||
|
||||
input.write(JSON.stringify(a))
|
||||
input.write('\n')
|
||||
input.end(JSON.stringify(b))
|
||||
})
|
||||
|
||||
test('split utf8 chars', function (t) {
|
||||
t.plan(2)
|
||||
|
||||
var input = split()
|
||||
|
||||
input.pipe(strcb(function (err, list) {
|
||||
t.error(err)
|
||||
t.deepEqual(list, ['烫烫烫', '锟斤拷'])
|
||||
}))
|
||||
|
||||
var buf = Buffer.from('烫烫烫\r\n锟斤拷', 'utf8')
|
||||
for (var i = 0; i < buf.length; ++i) {
|
||||
input.write(buf.slice(i, i + 1))
|
||||
}
|
||||
input.end()
|
||||
})
|
||||
|
||||
test('split utf8 chars 2by2', function (t) {
|
||||
t.plan(2)
|
||||
|
||||
var input = split()
|
||||
|
||||
input.pipe(strcb(function (err, list) {
|
||||
t.error(err)
|
||||
t.deepEqual(list, ['烫烫烫', '烫烫烫'])
|
||||
}))
|
||||
|
||||
var str = '烫烫烫\r\n烫烫烫'
|
||||
var buf = Buffer.from(str, 'utf8')
|
||||
for (var i = 0; i < buf.length; i += 2) {
|
||||
input.write(buf.slice(i, i + 2))
|
||||
}
|
||||
input.end()
|
||||
})
|
||||
|
||||
test('split lines when the \n comes at the end of a chunk', function (t) {
|
||||
t.plan(2)
|
||||
|
||||
var input = split()
|
||||
|
||||
input.pipe(strcb(function (err, list) {
|
||||
t.error(err)
|
||||
t.deepEqual(list, ['hello', 'world'])
|
||||
}))
|
||||
|
||||
input.write('hello\n')
|
||||
input.end('world')
|
||||
})
|
||||
|
||||
test('truncated utf-8 char', function (t) {
|
||||
t.plan(2)
|
||||
|
||||
var input = split()
|
||||
|
||||
input.pipe(strcb(function (err, list) {
|
||||
t.error(err)
|
||||
t.deepEqual(list, ['烫' + Buffer.from('e7', 'hex').toString()])
|
||||
}))
|
||||
|
||||
var str = '烫烫'
|
||||
var buf = Buffer.from(str, 'utf8')
|
||||
|
||||
input.write(buf.slice(0, 3))
|
||||
input.end(buf.slice(3, 4))
|
||||
})
|
||||
|
||||
test('maximum buffer limit', function (t) {
|
||||
t.plan(1)
|
||||
|
||||
var input = split({ maxLength: 2 })
|
||||
|
||||
input.pipe(strcb(function (err, list) {
|
||||
t.ok(err)
|
||||
}))
|
||||
|
||||
input.write('hey')
|
||||
})
|
||||
|
||||
test('readable highWaterMark', function (t) {
|
||||
var input = split()
|
||||
t.equal(input._readableState.highWaterMark, 16)
|
||||
t.end()
|
||||
})
|
||||
|
||||
test('maxLength < chunk size', function (t) {
|
||||
t.plan(2)
|
||||
|
||||
var input = split({ maxLength: 2 })
|
||||
|
||||
input.pipe(strcb(function (err, list) {
|
||||
t.error(err)
|
||||
t.deepEqual(list, ['a', 'b'])
|
||||
}))
|
||||
|
||||
input.end('a\nb')
|
||||
})
|
||||
|
||||
test('maximum buffer limit w/skip', function (t) {
|
||||
t.plan(2)
|
||||
|
||||
var input = split({ maxLength: 2, skipOverflow: true })
|
||||
|
||||
input.pipe(strcb(function (err, list) {
|
||||
t.error(err)
|
||||
t.deepEqual(list, ['a', 'b', 'c'])
|
||||
}))
|
||||
|
||||
input.write('a\n123')
|
||||
input.write('456')
|
||||
input.write('789\nb\nc')
|
||||
input.end()
|
||||
})
|
||||
|
||||
test("don't modify the options object", function (t) {
|
||||
t.plan(2)
|
||||
|
||||
var options = {}
|
||||
var input = split(options)
|
||||
|
||||
input.pipe(strcb(function (err, list) {
|
||||
t.error(err)
|
||||
t.same(options, {})
|
||||
}))
|
||||
|
||||
input.end()
|
||||
})
|
||||
|
||||
test('mapper throws flush', function (t) {
|
||||
t.plan(1)
|
||||
var error = new Error()
|
||||
var input = split(function () {
|
||||
throw error
|
||||
})
|
||||
|
||||
input.on('error', (err, list) => {
|
||||
t.same(err, error)
|
||||
})
|
||||
input.end('hello')
|
||||
})
|
||||
|
||||
test('mapper throws on transform', function (t) {
|
||||
t.plan(2)
|
||||
|
||||
var error = new Error()
|
||||
var input = split(function (l) {
|
||||
throw error
|
||||
})
|
||||
|
||||
input.on('error', (err) => {
|
||||
t.same(err, error)
|
||||
})
|
||||
input.write('a')
|
||||
input.write('\n')
|
||||
input.end('b')
|
||||
})
|
||||
52
node_modules/conventional-commits-parser/package.json
generated
vendored
Normal file
52
node_modules/conventional-commits-parser/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
{
|
||||
"name": "conventional-commits-parser",
|
||||
"version": "3.2.4",
|
||||
"description": "Parse raw conventional commits",
|
||||
"bugs": {
|
||||
"url": "https://github.com/conventional-changelog/conventional-changelog/issues"
|
||||
},
|
||||
"homepage": "https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-commits-parser#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"
|
||||
],
|
||||
"keywords": [
|
||||
"conventional-commits-parser",
|
||||
"changelog",
|
||||
"conventional",
|
||||
"parser",
|
||||
"parsing",
|
||||
"logs"
|
||||
],
|
||||
"dependencies": {
|
||||
"is-text-path": "^1.0.1",
|
||||
"JSONStream": "^1.0.4",
|
||||
"lodash": "^4.17.15",
|
||||
"meow": "^8.0.0",
|
||||
"split2": "^3.0.0",
|
||||
"through2": "^4.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test-windows": "echo 'make work on windows'"
|
||||
},
|
||||
"bin": {
|
||||
"conventional-commits-parser": "cli.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"forceable-tty": "^0.1.0"
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue