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: v9.1.1
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: v9.1.2
Choose a head ref
  • 12 commits
  • 89 files changed
  • 4 contributors

Commits on Jun 30, 2020

  1. Copy the full SHA
    a406053 View commit details

Commits on Jul 5, 2020

  1. chore: update dependency eslint to v7.4.0 (#1987)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jul 5, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ac54d5c View commit details

Commits on Jul 6, 2020

  1. chore: update dependency eslint-plugin-jest to v23.18.0 (#1988)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jul 6, 2020
    Copy the full SHA
    be3c3a4 View commit details

Commits on Jul 7, 2020

  1. chore: update typescript-eslint monorepo to v3.6.0 (#1989)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jul 7, 2020
    Copy the full SHA
    5161307 View commit details
  2. chore: update dependency @types/jest to v26.0.4 (#1992)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jul 7, 2020
    Copy the full SHA
    94e7211 View commit details
  3. chore: update node.js to >=v8.17.0 (#1990)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jul 7, 2020
    Copy the full SHA
    46a27bf View commit details
  4. chore: update dependency @types/node to v12.12.48 (#1991)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jul 7, 2020
    Copy the full SHA
    4e830b3 View commit details

Commits on Jul 12, 2020

  1. chore: update dependency @types/node to v12.12.50 (#1997)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jul 12, 2020
    Copy the full SHA
    d4f064c View commit details

Commits on Jul 13, 2020

  1. Refactor/armano cli (#1998)

    * chore: merge armanos branch
    
    * refactor: merge cli typescript refactor with conflicts
    
    Fixes #1691
    
    Co-authored-by: escapedcat <github@htmlcss.de>
    byCedric and escapedcat authored Jul 13, 2020
    Copy the full SHA
    dabdfc9 View commit details
  2. Copy the full SHA
    0eaee18 View commit details
  3. Copy the full SHA
    935e3cf View commit details
  4. v9.1.2

    escapedcat committed Jul 13, 2020
    Copy the full SHA
    41d4f58 View commit details
Showing with 1,035 additions and 644 deletions.
  1. +8 −0 @alias/commitlint-config-angular/CHANGELOG.md
  2. +5 −5 @alias/commitlint-config-angular/package.json
  3. +8 −0 @alias/commitlint-config-lerna-scopes/CHANGELOG.md
  4. +5 −5 @alias/commitlint-config-lerna-scopes/package.json
  5. +8 −0 @alias/commitlint-config-patternplate/CHANGELOG.md
  6. +5 −5 @alias/commitlint-config-patternplate/package.json
  7. +8 −0 @alias/commitlint/CHANGELOG.md
  8. +6 −6 @alias/commitlint/package.json
  9. +8 −0 @commitlint/cli/CHANGELOG.md
  10. +2 −0 @commitlint/cli/cli.js
  11. +1 −1 @commitlint/cli/index.js
  12. +18 −30 @commitlint/cli/package.json
  13. +13 −0 @commitlint/cli/src/cli-error.ts
  14. +51 −5 @commitlint/cli/src/{cli.test.js → cli.test.ts}
  15. +153 −144 @commitlint/cli/src/{cli.js → cli.ts}
  16. +0 −34 @commitlint/cli/src/help.js
  17. +24 −0 @commitlint/cli/src/types.ts
  18. +10 −0 @commitlint/cli/tsconfig.json
  19. +8 −0 @commitlint/config-angular-type-enum/CHANGELOG.md
  20. +4 −4 @commitlint/config-angular-type-enum/package.json
  21. +8 −0 @commitlint/config-angular/CHANGELOG.md
  22. +5 −5 @commitlint/config-angular/package.json
  23. +8 −0 @commitlint/config-conventional/CHANGELOG.md
  24. +5 −5 @commitlint/config-conventional/package.json
  25. +8 −0 @commitlint/config-lerna-scopes/CHANGELOG.md
  26. +5 −5 @commitlint/config-lerna-scopes/package.json
  27. +8 −0 @commitlint/config-patternplate/CHANGELOG.md
  28. +6 −6 @commitlint/config-patternplate/package.json
  29. +8 −0 @commitlint/core/CHANGELOG.md
  30. +8 −8 @commitlint/core/package.json
  31. +8 −0 @commitlint/ensure/CHANGELOG.md
  32. +6 −6 @commitlint/ensure/package.json
  33. +8 −0 @commitlint/execute-rule/CHANGELOG.md
  34. +4 −4 @commitlint/execute-rule/package.json
  35. +8 −0 @commitlint/format/CHANGELOG.md
  36. +5 −5 @commitlint/format/package.json
  37. +8 −30 @commitlint/format/src/format.ts
  38. +2 −1 @commitlint/format/tsconfig.json
  39. +8 −0 @commitlint/is-ignored/CHANGELOG.md
  40. +7 −7 @commitlint/is-ignored/package.json
  41. +8 −0 @commitlint/lint/CHANGELOG.md
  42. +9 −9 @commitlint/lint/package.json
  43. +2 −2 @commitlint/lint/src/lint.test.ts
  44. +10 −13 @commitlint/lint/src/lint.ts
  45. +8 −0 @commitlint/load/CHANGELOG.md
  46. +9 −9 @commitlint/load/package.json
  47. +1 −1 @commitlint/load/src/load.test.ts
  48. +8 −0 @commitlint/message/CHANGELOG.md
  49. +5 −5 @commitlint/message/package.json
  50. +8 −0 @commitlint/parse/CHANGELOG.md
  51. +5 −5 @commitlint/parse/package.json
  52. +8 −0 @commitlint/prompt-cli/CHANGELOG.md
  53. +6 −6 @commitlint/prompt-cli/package.json
  54. +8 −0 @commitlint/prompt/CHANGELOG.md
  55. +7 −7 @commitlint/prompt/package.json
  56. +8 −0 @commitlint/read/CHANGELOG.md
  57. +6 −6 @commitlint/read/package.json
  58. +8 −0 @commitlint/resolve-extends/CHANGELOG.md
  59. +5 −5 @commitlint/resolve-extends/package.json
  60. +8 −0 @commitlint/rules/CHANGELOG.md
  61. +10 −10 @commitlint/rules/package.json
  62. +8 −0 @commitlint/to-lines/CHANGELOG.md
  63. +4 −4 @commitlint/to-lines/package.json
  64. +8 −0 @commitlint/top-level/CHANGELOG.md
  65. +4 −4 @commitlint/top-level/package.json
  66. +8 −0 @commitlint/travis-cli/CHANGELOG.md
  67. +7 −7 @commitlint/travis-cli/package.json
  68. +8 −0 @commitlint/types/CHANGELOG.md
  69. +4 −4 @commitlint/types/package.json
  70. +37 −0 @commitlint/types/src/format.ts
  71. +1 −0 @commitlint/types/src/index.ts
  72. +4 −3 @commitlint/types/src/lint.ts
  73. +5 −81 @commitlint/types/src/load.ts
  74. +99 −8 @commitlint/types/src/rules.ts
  75. +8 −0 @packages/babel-preset-commitlint/CHANGELOG.md
  76. +2 −2 @packages/babel-preset-commitlint/package.json
  77. +8 −0 @packages/test-environment/CHANGELOG.md
  78. +2 −2 @packages/test-environment/package.json
  79. +8 −0 @packages/test/CHANGELOG.md
  80. +2 −2 @packages/test/package.json
  81. +8 −0 @packages/utils/CHANGELOG.md
  82. +3 −3 @packages/utils/package.json
  83. +8 −0 CHANGELOG.md
  84. +14 −2 README.md
  85. +25 −15 docs/reference-cli.md
  86. +1 −1 lerna.json
  87. +4 −4 package.json
  88. +2 −1 tsconfig.json
  89. +118 −102 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.

## [9.1.2](https://github.com/conventional-changelog/commitlint/compare/v9.1.1...v9.1.2) (2020-07-13)

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





## [9.1.1](https://github.com/conventional-changelog/commitlint/compare/v9.1.0...v9.1.1) (2020-06-30)

**Note:** Version bump only for package commitlint-config-angular
10 changes: 5 additions & 5 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": "9.1.1",
"version": "9.1.2",
"description": "Shareable commitlint config enforcing the angular commit convention",
"files": [
"index.js"
@@ -26,13 +26,13 @@
},
"homepage": "https://github.com/conventional-changelog/commitlint#readme",
"engines": {
"node": ">=8"
"node": ">=v8.17.0"
},
"dependencies": {
"@commitlint/config-angular": "^9.1.1"
"@commitlint/config-angular": "^9.1.2"
},
"devDependencies": {
"@commitlint/utils": "^9.1.1"
"@commitlint/utils": "^9.1.2"
},
"gitHead": "71f0194f33943954a8dac1c458be47e5049717cd"
"gitHead": "cb565dfcca3128380b9b3dc274aedbcae34ce5ca"
}
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.

## [9.1.2](https://github.com/conventional-changelog/commitlint/compare/v9.1.1...v9.1.2) (2020-07-13)

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





## [9.1.1](https://github.com/conventional-changelog/commitlint/compare/v9.1.0...v9.1.1) (2020-06-30)

**Note:** Version bump only for package commitlint-config-lerna-scopes
10 changes: 5 additions & 5 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": "9.1.1",
"version": "9.1.2",
"description": "Shareable commitlint config enforcing lerna package names as scopes",
"files": [
"index.js"
@@ -26,13 +26,13 @@
},
"homepage": "https://github.com/conventional-changelog/commitlint#readme",
"engines": {
"node": ">=8"
"node": ">=v8.17.0"
},
"dependencies": {
"@commitlint/config-lerna-scopes": "^9.1.1"
"@commitlint/config-lerna-scopes": "^9.1.2"
},
"devDependencies": {
"@commitlint/utils": "^9.1.1"
"@commitlint/utils": "^9.1.2"
},
"gitHead": "71f0194f33943954a8dac1c458be47e5049717cd"
"gitHead": "cb565dfcca3128380b9b3dc274aedbcae34ce5ca"
}
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.

## [9.1.2](https://github.com/conventional-changelog/commitlint/compare/v9.1.1...v9.1.2) (2020-07-13)

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





## [9.1.1](https://github.com/conventional-changelog/commitlint/compare/v9.1.0...v9.1.1) (2020-06-30)

**Note:** Version bump only for package commitlint-config-patternplate
10 changes: 5 additions & 5 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": "9.1.1",
"version": "9.1.2",
"description": "Lint your commits, patternplate-style",
"files": [
"index.js"
@@ -26,13 +26,13 @@
},
"homepage": "https://github.com/conventional-changelog/commitlint#readme",
"engines": {
"node": ">=8"
"node": ">=v8.17.0"
},
"dependencies": {
"@commitlint/config-patternplate": "^9.1.1"
"@commitlint/config-patternplate": "^9.1.2"
},
"devDependencies": {
"@commitlint/utils": "^9.1.1"
"@commitlint/utils": "^9.1.2"
},
"gitHead": "71f0194f33943954a8dac1c458be47e5049717cd"
"gitHead": "cb565dfcca3128380b9b3dc274aedbcae34ce5ca"
}
8 changes: 8 additions & 0 deletions @alias/commitlint/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.

## [9.1.2](https://github.com/conventional-changelog/commitlint/compare/v9.1.1...v9.1.2) (2020-07-13)

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





## [9.1.1](https://github.com/conventional-changelog/commitlint/compare/v9.1.0...v9.1.1) (2020-06-30)

**Note:** Version bump only for package commitlint
12 changes: 6 additions & 6 deletions @alias/commitlint/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "commitlint",
"version": "9.1.1",
"version": "9.1.2",
"description": "Lint your commit messages",
"files": [
"cli.js"
@@ -13,7 +13,7 @@
"pkg": "pkg-check --skip-main"
},
"engines": {
"node": ">=8"
"node": ">=v8.17.0"
},
"repository": {
"type": "git",
@@ -34,11 +34,11 @@
},
"license": "MIT",
"dependencies": {
"@commitlint/cli": "^9.1.1"
"@commitlint/cli": "^9.1.2"
},
"devDependencies": {
"@commitlint/test": "^9.1.1",
"@commitlint/utils": "^9.1.1"
"@commitlint/test": "^9.1.2",
"@commitlint/utils": "^9.1.2"
},
"gitHead": "71f0194f33943954a8dac1c458be47e5049717cd"
"gitHead": "cb565dfcca3128380b9b3dc274aedbcae34ce5ca"
}
8 changes: 8 additions & 0 deletions @commitlint/cli/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.

## [9.1.2](https://github.com/conventional-changelog/commitlint/compare/v9.1.1...v9.1.2) (2020-07-13)

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





## [9.1.1](https://github.com/conventional-changelog/commitlint/compare/v9.1.0...v9.1.1) (2020-06-30)

**Note:** Version bump only for package @commitlint/cli
2 changes: 2 additions & 0 deletions @commitlint/cli/cli.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env node
require('./lib/cli.js');
2 changes: 1 addition & 1 deletion @commitlint/cli/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
const path = require('path');

module.exports = path.join(__dirname, 'lib/cli.js');
module.exports = path.join(__dirname, 'cli.js');
48 changes: 18 additions & 30 deletions @commitlint/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,21 @@
{
"name": "@commitlint/cli",
"version": "9.1.1",
"version": "9.1.2",
"description": "Lint your commit messages",
"files": [
"index.js",
"lib",
"!*.test.js*"
"cli.js",
"lib"
],
"bin": {
"commitlint": "./lib/cli.js"
"commitlint": "./cli.js"
},
"scripts": {
"build": "cross-env NODE_ENV=production babel src --out-dir lib --source-maps",
"deps": "dep-check",
"pkg": "pkg-check",
"start": "yarn run watch",
"watch": "babel src --out-dir lib --watch --source-maps"
},
"babel": {
"presets": [
"babel-preset-commitlint"
],
"ignore": [
"**/*.test.js"
]
"pkg": "pkg-check"
},
"engines": {
"node": ">=8"
"node": ">=v8.17.0"
},
"repository": {
"type": "git",
@@ -49,27 +38,26 @@
"devDependencies": {
"@babel/cli": "^7.7.7",
"@babel/core": "^7.7.7",
"@commitlint/test": "^9.1.1",
"@commitlint/utils": "^9.1.1",
"babel-preset-commitlint": "^9.1.1",
"@commitlint/test": "^9.1.2",
"@commitlint/utils": "^9.1.2",
"@types/yargs": "^15.0.3",
"babel-preset-commitlint": "^9.1.2",
"cross-env": "7.0.2",
"execa": "^3.4.0",
"fs-extra": "^8.1.0"
},
"dependencies": {
"@babel/runtime": "^7.9.6",
"@commitlint/format": "^9.1.1",
"@commitlint/lint": "^9.1.1",
"@commitlint/load": "^9.1.1",
"@commitlint/read": "^9.1.1",
"@commitlint/format": "^9.1.2",
"@commitlint/lint": "^9.1.2",
"@commitlint/load": "^9.1.2",
"@commitlint/read": "^9.1.2",
"chalk": "4.1.0",
"core-js": "^3.6.1",
"get-stdin": "7.0.0",
"lodash": "^4.17.15",
"meow": "5.0.0",
"regenerator-runtime": "0.13.5",
"lodash": "^4.17.19",
"resolve-from": "5.0.0",
"resolve-global": "1.0.0"
},
"gitHead": "71f0194f33943954a8dac1c458be47e5049717cd"
"resolve-global": "1.0.0",
"yargs": "^15.1.0"
}
}
13 changes: 13 additions & 0 deletions @commitlint/cli/src/cli-error.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export class CliError extends Error {
__proto__ = Error;

public type: string;

constructor(message: string, type: string) {
super(message);

this.type = type;

Object.setPrototypeOf(this, CliError.prototype);
}
}
Original file line number Diff line number Diff line change
@@ -4,9 +4,14 @@ import execa from 'execa';
import merge from 'lodash/merge';
import fs from 'fs-extra';

const bin = require.resolve('../lib/cli.js');
const bin = require.resolve('../cli.js');

const cli = (args, options) => {
interface TestOptions {
cwd: string;
env?: Record<string, string>;
}

const cli = (args: string[], options: TestOptions) => {
return (input = '') => {
return execa(bin, args, {
cwd: options.cwd,
@@ -17,8 +22,8 @@ const cli = (args, options) => {
};
};

const gitBootstrap = fixture => git.bootstrap(fixture, __dirname);
const fixBootstrap = fixture => fix.bootstrap(fixture, __dirname);
const gitBootstrap = (fixture: string) => git.bootstrap(fixture, __dirname);
const fixBootstrap = (fixture: string) => fix.bootstrap(fixture, __dirname);

test('should throw when called without [input]', async () => {
const cwd = await gitBootstrap('fixtures/default');
@@ -423,7 +428,48 @@ test('should work with relative formatter path', async () => {
expect(actual.exitCode).toBe(0);
});

async function writePkg(payload, options) {
test('should print help', async () => {
const cwd = await gitBootstrap('fixtures/default');
const actual = await cli(['--help'], {cwd})();
expect(actual.stdout).toMatchInlineSnapshot(`
"@commitlint/cli@9.1.1 - Lint your commit messages
[input] reads from stdin if --edit, --env, --from and --to are omitted
Options:
--color, -c toggle colored output [boolean] [default: true]
--config, -g path to the config file [string]
--cwd, -d directory to execute in
[string] [default: (Working Directory)]
--edit, -e read last commit message from the specified file or
fallbacks to ./.git/COMMIT_EDITMSG
[string] [default: false]
--env, -E check message in the file at path given by environment
variable value [string]
--extends, -x array of shareable configurations to extend [array]
--help-url, -H help url in error message [string]
--from, -f lower end of the commit range to lint; applies if
edit=false [string]
--format, -o output format of the results [string]
--parser-preset, -p configuration preset to use for
conventional-commits-parser [string]
--quiet, -q toggle console output [boolean] [default: false]
--to, -t upper end of the commit range to lint; applies if
edit=false [string]
--verbose, -V enable verbose output for reports without problems
[boolean]
-v, --version display version information [boolean]
-h, --help Show help [boolean]"
`);
});

test('should print version', async () => {
const cwd = await gitBootstrap('fixtures/default');
const actual = await cli(['--version'], {cwd})();
expect(actual.stdout).toMatch('@commitlint/cli@');
});

async function writePkg(payload: unknown, options: TestOptions) {
const pkgPath = path.join(options.cwd, 'package.json');
const pkg = JSON.parse(await fs.readFile(pkgPath, 'utf-8'));
const result = merge(pkg, payload);
Loading