Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: conventional-changelog/commitlint
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v17.0.0
Choose a base ref
...
head repository: conventional-changelog/commitlint
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v17.0.3
Choose a head ref

Commits on May 16, 2022

  1. docs: add v17 release

    escapedcat committed May 16, 2022
    Copy the full SHA
    1c8fa3c View commit details

Commits on May 17, 2022

  1. chore: update typescript-eslint monorepo to v5.24.0 (#3184)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored May 17, 2022
    Copy the full SHA
    e68f1d9 View commit details
  2. chore: update babel monorepo to v7.17.12 (#3185)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored May 17, 2022
    Copy the full SHA
    a81abd8 View commit details

Commits on May 18, 2022

  1. chore: update typescript-eslint monorepo to v5.25.0 (#3187)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored May 18, 2022
    Copy the full SHA
    d88d372 View commit details
  2. Copy the full SHA
    fad8ddc View commit details

Commits on May 20, 2022

  1. chore: update babel monorepo to v7.18.0 (#3188)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored May 20, 2022
    Copy the full SHA
    83b1f52 View commit details

Commits on May 21, 2022

  1. chore: update dependency eslint to v8.16.0 (#3189)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored May 21, 2022
    Copy the full SHA
    5ca9cfd View commit details

Commits on May 24, 2022

  1. chore: update typescript-eslint monorepo to v5.26.0 (#3192)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored May 24, 2022
    Copy the full SHA
    0722081 View commit details
  2. chore: update dependency ts-jest to v28.0.3 (#3193)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored May 24, 2022
    Copy the full SHA
    afbb11f View commit details
  3. fix(cli): use core.commentChar from git config with --edit flag (#…

    …3191)
    
    * fix(cli): use core.commentChar from git config with --edit flag (#3190)
    
    When parsing `.git/COMMIT_EDITMSG` use the `core.commentChar` git
    setting if present, falling back to the default comment char `#`
    otherwise.
    
    Use the `parserOpts.commentChar` setting only when parsing other
    messages (e.g. from stdin.)
    
    * fix(cli): tweaks for core.commentChar handling (#3190)
    
    - Remove useless change to test git repository setup
    - Add comment on git config error handling
    
    * fix(cli): make tests independent of global git config (#3190)
    
    - Don't apply global changes
    - Set $HOME to ensure default global settings aren't picked up
    
    * ci: try fixing HOME setting on Windows
    
    * test: use cross-env for setting $HOME
    jscheid authored May 24, 2022
    Copy the full SHA
    e5fee05 View commit details
  4. chore: update dependency lint-staged to v12.4.2 (#3194)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored May 24, 2022
    Copy the full SHA
    3a8f01f View commit details
  5. chore: update dependency typescript to v4.7.2 (#3196)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored May 24, 2022
    Copy the full SHA
    f31c282 View commit details
  6. chore: update dependency @lerna/project to v5 (#3195)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored May 24, 2022
    Copy the full SHA
    ca1600c View commit details

Commits on May 25, 2022

  1. v17.0.1

    escapedcat committed May 25, 2022
    Copy the full SHA
    b0bc456 View commit details
  2. chore: update babel monorepo to v7.18.2 (#3197)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored May 25, 2022
    Copy the full SHA
    a7c6e7d View commit details

Commits on May 26, 2022

  1. chore: update dependency lerna to v5 (#3198)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored May 26, 2022
    Copy the full SHA
    6edd8d9 View commit details

Commits on May 28, 2022

  1. fix: update dependency conventional-changelog-conventionalcommits to …

    …v5 (#3201)
    
    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored May 28, 2022
    Copy the full SHA
    c20fd19 View commit details
  2. fix: update dependency cosmiconfig-typescript-loader to v2.0.1 (#3202)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored May 28, 2022
    Copy the full SHA
    9cf4b71 View commit details
  3. chore: update dependency eslint-plugin-jest to v26.3.0 (#3203)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored May 28, 2022
    Copy the full SHA
    c2085db View commit details

Commits on May 29, 2022

  1. chore: update dependency eslint-plugin-jest to v26.4.2 (#3204)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored May 29, 2022
    Copy the full SHA
    c4ddf46 View commit details

Commits on May 30, 2022

  1. chore: update dependency eslint-plugin-jest to v26.4.4 (#3205)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored May 30, 2022
    Copy the full SHA
    1190eb7 View commit details

Commits on May 31, 2022

  1. chore: update dependency lint-staged to v12.4.3 (#3207)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored May 31, 2022
    Copy the full SHA
    d255b0a View commit details
  2. chore: update dependency eslint-plugin-jest to v26.4.6 (#3209)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored May 31, 2022
    Copy the full SHA
    3fb3dc2 View commit details
  3. chore: update typescript-eslint monorepo to v5.27.0 (#3210)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored May 31, 2022
    Copy the full SHA
    aefc2bd View commit details

Commits on Jun 1, 2022

  1. chore: update dependency @types/node to v12.20.54 (#3214)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jun 1, 2022
    Copy the full SHA
    6057932 View commit details
  2. chore: update dependency lint-staged to v12.5.0 (#3212)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jun 1, 2022
    Copy the full SHA
    2f464f9 View commit details
  3. chore: update dependency @types/node to v12.20.54 (#3213)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jun 1, 2022
    Copy the full SHA
    110e833 View commit details
  4. v17.0.2

    escapedcat committed Jun 1, 2022
    Copy the full SHA
    ab71044 View commit details
  5. chore: update dependency lint-staged to v13 (#3215)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jun 1, 2022
    Copy the full SHA
    92d34ca View commit details

Commits on Jun 2, 2022

  1. chore: update dependency @types/jest to v28 (#3217)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jun 2, 2022
    Copy the full SHA
    1b6e010 View commit details

Commits on Jun 3, 2022

  1. chore: update dependency ts-jest to v28.0.4 (#3219)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jun 3, 2022
    Copy the full SHA
    a83bcbe View commit details
  2. chore(deps): bump tar from 6.1.0 to 6.1.11 (#3220)

    Bumps [tar](https://github.com/npm/node-tar) from 6.1.0 to 6.1.11.
    - [Release notes](https://github.com/npm/node-tar/releases)
    - [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
    - [Commits](isaacs/node-tar@v6.1.0...v6.1.11)
    
    ---
    updated-dependencies:
    - dependency-name: tar
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jun 3, 2022
    Copy the full SHA
    6005909 View commit details

Commits on Jun 4, 2022

  1. chore: update dependency eslint to v8.17.0 (#3223)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jun 4, 2022
    Copy the full SHA
    8a0b7dd View commit details
  2. chore: update dependency typescript to v4.7.3 (#3222)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jun 4, 2022
    Copy the full SHA
    a1824c7 View commit details

Commits on Jun 5, 2022

  1. chore: update dependency @types/jest to v28.1.1 (#3224)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jun 5, 2022
    Copy the full SHA
    c9bf8be View commit details
  2. chore: update dependency eslint-plugin-jest to v26.5.0 (#3225)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jun 5, 2022
    1
    Copy the full SHA
    e841b40 View commit details

Commits on Jun 6, 2022

  1. chore: update dependency eslint-plugin-jest to v26.5.3 (#3226)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jun 6, 2022
    Copy the full SHA
    35482bd View commit details

Commits on Jun 7, 2022

  1. chore: update typescript-eslint monorepo to v5.27.1 (#3228)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jun 7, 2022
    Copy the full SHA
    f1bfde3 View commit details

Commits on Jun 8, 2022

  1. chore: update dependency @types/node to v12.20.55 (#3233)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jun 8, 2022
    Copy the full SHA
    c0d635e View commit details
  2. chore: update dependency @types/node to v12.20.55 (#3232)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jun 8, 2022
    Copy the full SHA
    e604a57 View commit details
  3. chore: update jest monorepo to v28.1.1 (#3230)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jun 8, 2022
    Copy the full SHA
    39c6cc2 View commit details

Commits on Jun 9, 2022

  1. chore: update dependency lint-staged to v13.0.1 (#3235)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jun 9, 2022
    Copy the full SHA
    e184b84 View commit details

Commits on Jun 14, 2022

  1. chore: update dependency @babel/core to v7.18.5 (#3237)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jun 14, 2022
    Copy the full SHA
    46b9ce1 View commit details
  2. chore: update typescript-eslint monorepo to v5.28.0 (#3238)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jun 14, 2022
    Copy the full SHA
    2e2cfb3 View commit details
  3. chore: update dependency ts-jest to v28.0.5 (#3239)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jun 14, 2022
    Copy the full SHA
    c7033e5 View commit details

Commits on Jun 16, 2022

  1. chore: update dependency @types/semver to v7.3.10 (#3241)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jun 16, 2022
    Copy the full SHA
    77bb1e0 View commit details

Commits on Jun 17, 2022

  1. chore: update dependency prettier to v2.7.1 (#3240)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jun 17, 2022
    Copy the full SHA
    1155c6d View commit details
  2. chore: update dependency lint-staged to v13.0.2 (#3243)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jun 17, 2022
    Copy the full SHA
    97da86a View commit details
  3. chore: update dependency @types/jest to v28.1.2 (#3244)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jun 17, 2022
    Copy the full SHA
    a979bba View commit details

Commits on Jun 18, 2022

  1. chore: update dependency eslint to v8.18.0 (#3246)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jun 18, 2022
    Copy the full SHA
    3c0b3bf View commit details
Showing with 2,572 additions and 1,991 deletions.
  1. +8 −0 @alias/commitlint-config-angular/CHANGELOG.md
  2. +2 −2 @alias/commitlint-config-angular/package.json
  3. +8 −0 @alias/commitlint-config-lerna-scopes/CHANGELOG.md
  4. +2 −2 @alias/commitlint-config-lerna-scopes/package.json
  5. +8 −0 @alias/commitlint-config-patternplate/CHANGELOG.md
  6. +2 −2 @alias/commitlint-config-patternplate/package.json
  7. +24 −0 @alias/commitlint/CHANGELOG.md
  8. +2 −2 @alias/commitlint/package.json
  9. +27 −0 @commitlint/cli/CHANGELOG.md
  10. +1 −1 @commitlint/cli/fixtures/comment-char/commitlint.config.js
  11. +5 −5 @commitlint/cli/package.json
  12. +40 −3 @commitlint/cli/src/cli.test.ts
  13. +21 −5 @commitlint/cli/src/cli.ts
  14. +8 −0 @commitlint/config-angular/CHANGELOG.md
  15. +2 −2 @commitlint/config-angular/package.json
  16. +19 −0 @commitlint/config-conventional/CHANGELOG.md
  17. +3 −3 @commitlint/config-conventional/package.json
  18. +8 −0 @commitlint/config-lerna-scopes/CHANGELOG.md
  19. +2 −2 @commitlint/config-lerna-scopes/package.json
  20. +8 −0 @commitlint/config-patternplate/CHANGELOG.md
  21. +2 −2 @commitlint/config-patternplate/package.json
  22. +8 −0 @commitlint/config-validator/CHANGELOG.md
  23. +2 −2 @commitlint/config-validator/package.json
  24. +39 −39 @commitlint/config-validator/src/__snapshots__/validate.test.ts.snap
  25. +6 −2 @commitlint/config-validator/src/commitlint.schema.json
  26. +6 −6 @commitlint/config-validator/src/formatErrors.ts
  27. +3 −3 @commitlint/config-validator/src/validate.ts
  28. +8 −0 @commitlint/core/CHANGELOG.md
  29. +3 −3 @commitlint/core/package.json
  30. +8 −0 @commitlint/cz-commitlint/CHANGELOG.md
  31. +2 −2 @commitlint/cz-commitlint/package.json
  32. +8 −0 @commitlint/is-ignored/CHANGELOG.md
  33. +2 −2 @commitlint/is-ignored/package.json
  34. +8 −0 @commitlint/lint/CHANGELOG.md
  35. +2 −2 @commitlint/lint/package.json
  36. +8 −0 @commitlint/load/CHANGELOG.md
  37. +3 −3 @commitlint/load/package.json
  38. +8 −0 @commitlint/prompt-cli/CHANGELOG.md
  39. +2 −2 @commitlint/prompt-cli/package.json
  40. +8 −0 @commitlint/prompt/CHANGELOG.md
  41. +3 −3 @commitlint/prompt/package.json
  42. +8 −0 @commitlint/resolve-extends/CHANGELOG.md
  43. +2 −2 @commitlint/resolve-extends/package.json
  44. +24 −0 @commitlint/travis-cli/CHANGELOG.md
  45. +2 −2 @commitlint/travis-cli/package.json
  46. +34 −0 CHANGELOG.md
  47. +1 −0 README.md
  48. +10 −2 docs/guides-local-setup.md
  49. +1 −1 lerna.json
  50. +9 −8 package.json
  51. +2,142 −1,876 yarn.lock
8 changes: 8 additions & 0 deletions @alias/commitlint-config-angular/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [17.0.3](https://github.com/conventional-changelog/commitlint/compare/v17.0.2...v17.0.3) (2022-06-25)

**Note:** Version bump only for package commitlint-config-angular





# [17.0.0](https://github.com/conventional-changelog/commitlint/compare/v16.3.0...v17.0.0) (2022-05-16)


4 changes: 2 additions & 2 deletions @alias/commitlint-config-angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "commitlint-config-angular",
"version": "17.0.0",
"version": "17.0.3",
"description": "Shareable commitlint config enforcing the angular commit convention",
"files": [
"index.js"
@@ -30,7 +30,7 @@
"node": ">=v14"
},
"dependencies": {
"@commitlint/config-angular": "^17.0.0"
"@commitlint/config-angular": "^17.0.3"
},
"devDependencies": {
"@commitlint/utils": "^17.0.0"
8 changes: 8 additions & 0 deletions @alias/commitlint-config-lerna-scopes/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [17.0.2](https://github.com/conventional-changelog/commitlint/compare/v17.0.1...v17.0.2) (2022-06-01)

**Note:** Version bump only for package commitlint-config-lerna-scopes





# [17.0.0](https://github.com/conventional-changelog/commitlint/compare/v16.3.0...v17.0.0) (2022-05-16)


4 changes: 2 additions & 2 deletions @alias/commitlint-config-lerna-scopes/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "commitlint-config-lerna-scopes",
"version": "17.0.0",
"version": "17.0.2",
"description": "Shareable commitlint config enforcing lerna package names as scopes",
"files": [
"index.js"
@@ -30,7 +30,7 @@
"node": ">=v14"
},
"dependencies": {
"@commitlint/config-lerna-scopes": "^17.0.0"
"@commitlint/config-lerna-scopes": "^17.0.2"
},
"devDependencies": {
"@commitlint/utils": "^17.0.0"
8 changes: 8 additions & 0 deletions @alias/commitlint-config-patternplate/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [17.0.3](https://github.com/conventional-changelog/commitlint/compare/v17.0.2...v17.0.3) (2022-06-25)

**Note:** Version bump only for package commitlint-config-patternplate





# [17.0.0](https://github.com/conventional-changelog/commitlint/compare/v16.3.0...v17.0.0) (2022-05-16)


4 changes: 2 additions & 2 deletions @alias/commitlint-config-patternplate/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "commitlint-config-patternplate",
"version": "17.0.0",
"version": "17.0.3",
"description": "Lint your commits, patternplate-style",
"files": [
"index.js"
@@ -30,7 +30,7 @@
"node": ">=v14"
},
"dependencies": {
"@commitlint/config-patternplate": "^17.0.0"
"@commitlint/config-patternplate": "^17.0.3"
},
"devDependencies": {
"@commitlint/utils": "^17.0.0"
24 changes: 24 additions & 0 deletions @alias/commitlint/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [17.0.3](https://github.com/conventional-changelog/commitlint/compare/v17.0.2...v17.0.3) (2022-06-25)

**Note:** Version bump only for package commitlint





## [17.0.2](https://github.com/conventional-changelog/commitlint/compare/v17.0.1...v17.0.2) (2022-06-01)

**Note:** Version bump only for package commitlint





## [17.0.1](https://github.com/conventional-changelog/commitlint/compare/v17.0.0...v17.0.1) (2022-05-25)

**Note:** Version bump only for package commitlint





# [17.0.0](https://github.com/conventional-changelog/commitlint/compare/v16.3.0...v17.0.0) (2022-05-16)


4 changes: 2 additions & 2 deletions @alias/commitlint/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "commitlint",
"version": "17.0.0",
"version": "17.0.3",
"description": "Lint your commit messages",
"files": [
"cli.js"
@@ -35,7 +35,7 @@
},
"license": "MIT",
"dependencies": {
"@commitlint/cli": "^17.0.0",
"@commitlint/cli": "^17.0.3",
"@commitlint/types": "^17.0.0"
},
"devDependencies": {
27 changes: 27 additions & 0 deletions @commitlint/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,33 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [17.0.3](https://github.com/conventional-changelog/commitlint/compare/v17.0.2...v17.0.3) (2022-06-25)

**Note:** Version bump only for package @commitlint/cli





## [17.0.2](https://github.com/conventional-changelog/commitlint/compare/v17.0.1...v17.0.2) (2022-06-01)

**Note:** Version bump only for package @commitlint/cli





## [17.0.1](https://github.com/conventional-changelog/commitlint/compare/v17.0.0...v17.0.1) (2022-05-25)


### Bug Fixes

* **cli:** use `core.commentChar` from git config with `--edit` flag ([#3191](https://github.com/conventional-changelog/commitlint/issues/3191)) ([e5fee05](https://github.com/conventional-changelog/commitlint/commit/e5fee05301ab7441b6091e4ee6fc095d26bbd589)), closes [#3190](https://github.com/conventional-changelog/commitlint/issues/3190) [#3190](https://github.com/conventional-changelog/commitlint/issues/3190) [#3190](https://github.com/conventional-changelog/commitlint/issues/3190)





# [17.0.0](https://github.com/conventional-changelog/commitlint/compare/v16.3.0...v17.0.0) (2022-05-16)


2 changes: 1 addition & 1 deletion @commitlint/cli/fixtures/comment-char/commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
rules: {
'subject-empty': [2, 'never']
'body-empty': [2, 'never']
},
parserPreset: {
parserOpts: {
10 changes: 5 additions & 5 deletions @commitlint/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@commitlint/cli",
"version": "17.0.0",
"version": "17.0.3",
"description": "Lint your commit messages",
"files": [
"index.js",
@@ -39,17 +39,17 @@
"devDependencies": {
"@commitlint/test": "^17.0.0",
"@commitlint/utils": "^17.0.0",
"@types/node": "12.20.52",
"@types/node": "12.20.55",
"@types/yargs": "^17.0.0",
"execa": "^5.0.0",
"fs-extra": "^10.0.0"
},
"dependencies": {
"@commitlint/format": "^17.0.0",
"@commitlint/lint": "^17.0.0",
"@commitlint/load": "^17.0.0",
"@commitlint/lint": "^17.0.3",
"@commitlint/load": "^17.0.3",
"@commitlint/read": "^17.0.0",
"@commitlint/types": "^17.0.0",
"execa": "^5.0.0",
"lodash": "^4.17.19",
"resolve-from": "5.0.0",
"resolve-global": "1.0.0",
43 changes: 40 additions & 3 deletions @commitlint/cli/src/cli.test.ts
Original file line number Diff line number Diff line change
@@ -329,13 +329,50 @@ test('should handle --amend with signoff', async () => {
expect(commit).toBeTruthy();
}, 10000);

test('should fail with an empty message and a commentChar is set', async () => {
test('it uses parserOpts.commentChar when not using edit mode', async () => {
const cwd = await gitBootstrap('fixtures/comment-char');
const input = 'header: foo\n$body\n';

const actual = await cli([], {cwd})(input);
expect(actual.stdout).toContain('[body-empty]');
expect(actual.exitCode).toBe(1);
});

test("it doesn't use parserOpts.commentChar when using edit mode", async () => {
const cwd = await gitBootstrap('fixtures/comment-char');
await fs.writeFile(
path.join(cwd, '.git', 'COMMIT_EDITMSG'),
'header: foo\n\n$body\n'
);

const actual = await cli(['--edit', '.git/COMMIT_EDITMSG'], {cwd})();
expect(actual.stdout).not.toContain('[body-empty]');
expect(actual.exitCode).toBe(0);
});

test('it uses core.commentChar git config when using edit mode', async () => {
const cwd = await gitBootstrap('fixtures/comment-char');
await execa('git', ['config', '--local', 'core.commentChar', '$'], {cwd});
await fs.writeFile(path.join(cwd, '.git', 'COMMIT_EDITMSG'), '#1234');
await fs.writeFile(
path.join(cwd, '.git', 'COMMIT_EDITMSG'),
'header: foo\n\n$body\n'
);

const actual = await cli(['--edit', '.git/COMMIT_EDITMSG'], {cwd})();
expect(actual.stdout).toContain('[body-empty]');
expect(actual.exitCode).toBe(1);
});

test('it falls back to # for core.commentChar when using edit mode', async () => {
const cwd = await gitBootstrap('fixtures/comment-char');
await fs.writeFile(
path.join(cwd, '.git', 'COMMIT_EDITMSG'),
'header: foo\n\n#body\n'
);

const actual = await cli(['--edit', '.git/COMMIT_EDITMSG'], {cwd})();
expect(actual.stdout).toContain('[subject-empty]');
expect(actual.stdout).toContain('[body-empty]');
expect(actual.stderr).toEqual('');
expect(actual.exitCode).toBe(1);
});

26 changes: 21 additions & 5 deletions @commitlint/cli/src/cli.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import execa, {ExecaError} from 'execa';
import load from '@commitlint/load';
import lint from '@commitlint/lint';
import read from '@commitlint/read';
@@ -21,6 +22,8 @@ import {CliError} from './cli-error';

const pkg = require('../package');

const gitDefaultCommentChar = '#';

const cli = yargs
.options({
color: {
@@ -221,11 +224,24 @@ async function main(args: MainArgs) {
}
const format = loadFormatter(loaded, flags);

// Strip comments if reading from `.git/COMMIT_EDIT_MSG` using the
// commentChar from the parser preset falling back to a `#` if that is not
// set
if (flags.edit && typeof opts.parserOpts.commentChar !== 'string') {
opts.parserOpts.commentChar = '#';
// If reading from `.git/COMMIT_EDIT_MSG`, strip comments using
// core.commentChar from git configuration, falling back to '#'.
if (flags.edit) {
try {
const {stdout} = await execa('git', ['config', 'core.commentChar']);
opts.parserOpts.commentChar = stdout.trim() || gitDefaultCommentChar;
} catch (e) {
const execaError = e as ExecaError;
// git config returns exit code 1 when the setting is unset,
// don't warn in this case.
if (!execaError.failed || execaError.exitCode !== 1) {
console.warn(
'Could not determine core.commentChar git configuration',
e
);
}
opts.parserOpts.commentChar = gitDefaultCommentChar;
}
}

const results = await Promise.all(
8 changes: 8 additions & 0 deletions @commitlint/config-angular/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [17.0.3](https://github.com/conventional-changelog/commitlint/compare/v17.0.2...v17.0.3) (2022-06-25)

**Note:** Version bump only for package @commitlint/config-angular





# [17.0.0](https://github.com/conventional-changelog/commitlint/compare/v16.3.0...v17.0.0) (2022-05-16)


4 changes: 2 additions & 2 deletions @commitlint/config-angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@commitlint/config-angular",
"version": "17.0.0",
"version": "17.0.3",
"description": "Shareable commitlint config enforcing the angular commit convention",
"files": [
"index.js"
@@ -30,7 +30,7 @@
"node": ">=v14"
},
"devDependencies": {
"@commitlint/lint": "^17.0.0",
"@commitlint/lint": "^17.0.3",
"@commitlint/utils": "^17.0.0"
},
"dependencies": {
19 changes: 19 additions & 0 deletions @commitlint/config-conventional/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,25 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [17.0.3](https://github.com/conventional-changelog/commitlint/compare/v17.0.2...v17.0.3) (2022-06-25)

**Note:** Version bump only for package @commitlint/config-conventional





## [17.0.2](https://github.com/conventional-changelog/commitlint/compare/v17.0.1...v17.0.2) (2022-06-01)


### Bug Fixes

* update dependency conventional-changelog-conventionalcommits to v5 ([#3201](https://github.com/conventional-changelog/commitlint/issues/3201)) ([c20fd19](https://github.com/conventional-changelog/commitlint/commit/c20fd1952ed02df987165d96e4cef650c7fbaa4b))





# [17.0.0](https://github.com/conventional-changelog/commitlint/compare/v16.3.0...v17.0.0) (2022-05-16)


6 changes: 3 additions & 3 deletions @commitlint/config-conventional/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@commitlint/config-conventional",
"version": "17.0.0",
"version": "17.0.3",
"description": "Shareable commitlint config enforcing conventional commits",
"files": [
"index.js"
@@ -33,11 +33,11 @@
"node": ">=v14"
},
"devDependencies": {
"@commitlint/lint": "^17.0.0",
"@commitlint/lint": "^17.0.3",
"@commitlint/utils": "^17.0.0"
},
"dependencies": {
"conventional-changelog-conventionalcommits": "^4.3.1"
"conventional-changelog-conventionalcommits": "^5.0.0"
},
"gitHead": "70f7f4688b51774e7ac5e40e896cdaa3f132b2bc"
}
Loading