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: v8.3.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: v8.3.1
Choose a head ref
  • 2 commits
  • 22 files changed
  • 1 contributor

Commits on Oct 16, 2019

  1. fix(load): resolve nested parser preset factories (#831)

    * test: add failing testcase for nested parser preset factories
    
    * fix(load): resolve nested parser preset factories
    
    * refactor(load): remove old console log statement
    
    * refactor(load): remove extraneous white line
    byCedric authored Oct 16, 2019
    Copy the full SHA
    73a7df7 View commit details
  2. v8.3.1

    byCedric committed Oct 16, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    fbf2389 View commit details
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.

## [8.3.1](https://github.com/conventional-changelog/commitlint/compare/v8.3.0...v8.3.1) (2019-10-16)

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





# [8.3.0](https://github.com/conventional-changelog/commitlint/compare/v8.2.0...v8.3.0) (2019-10-16)

**Note:** Version bump only for package commitlint
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": "8.3.0",
"version": "8.3.1",
"description": "Lint your commit messages",
"files": [
"cli.js"
@@ -34,7 +34,7 @@
},
"license": "MIT",
"dependencies": {
"@commitlint/cli": "^8.3.0",
"@commitlint/cli": "^8.3.1",
"read-pkg": "5.2.0",
"resolve-pkg": "2.0.0"
},
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.

## [8.3.1](https://github.com/conventional-changelog/commitlint/compare/v8.3.0...v8.3.1) (2019-10-16)

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





# [8.3.0](https://github.com/conventional-changelog/commitlint/compare/v8.2.0...v8.3.0) (2019-10-16)


4 changes: 2 additions & 2 deletions @commitlint/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@commitlint/cli",
"version": "8.3.0",
"version": "8.3.1",
"description": "Lint your commit messages",
"files": [
"index.js",
@@ -72,7 +72,7 @@
"dependencies": {
"@commitlint/format": "^8.3.0",
"@commitlint/lint": "^8.3.0",
"@commitlint/load": "^8.3.0",
"@commitlint/load": "^8.3.1",
"@commitlint/read": "^8.3.0",
"babel-polyfill": "6.26.0",
"chalk": "2.4.2",
8 changes: 8 additions & 0 deletions @commitlint/core/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.

## [8.3.1](https://github.com/conventional-changelog/commitlint/compare/v8.3.0...v8.3.1) (2019-10-16)

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





# [8.3.0](https://github.com/conventional-changelog/commitlint/compare/v8.2.0...v8.3.0) (2019-10-16)

**Note:** Version bump only for package @commitlint/core
4 changes: 2 additions & 2 deletions @commitlint/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@commitlint/core",
"version": "8.3.0",
"version": "8.3.1",
"description": "Lint your commit messages",
"files": [
"index.js"
@@ -34,7 +34,7 @@
"dependencies": {
"@commitlint/format": "^8.3.0",
"@commitlint/lint": "^8.3.0",
"@commitlint/load": "^8.3.0",
"@commitlint/load": "^8.3.1",
"@commitlint/read": "^8.3.0"
}
}
11 changes: 11 additions & 0 deletions @commitlint/load/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [8.3.1](https://github.com/conventional-changelog/commitlint/compare/v8.3.0...v8.3.1) (2019-10-16)


### Bug Fixes

* **load:** resolve nested parser preset factories ([#831](https://github.com/conventional-changelog/commitlint/issues/831)) ([73a7df7](https://github.com/conventional-changelog/commitlint/commit/73a7df7))





# [8.3.0](https://github.com/conventional-changelog/commitlint/compare/v8.2.0...v8.3.0) (2019-10-16)


Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['./first-extended']
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['./second-extended']
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = Promise.resolve().then(
() =>
function factory() {
return {
parserOpts: {
headerPattern: /^(\w*)(?:\((.*)\))?-(.*)$/
}
};
}
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
parserPreset: './conventional-changelog-factory'
};
2 changes: 1 addition & 1 deletion @commitlint/load/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@commitlint/load",
"version": "8.3.0",
"version": "8.3.1",
"description": "Load shared commitlint configuration",
"main": "lib/index.js",
"files": [
14 changes: 10 additions & 4 deletions @commitlint/load/src/index.js
Original file line number Diff line number Diff line change
@@ -30,12 +30,12 @@ export default async (seed = {}, options = {cwd: process.cwd()}) => {
pick(config, 'extends', 'plugins', 'ignores', 'defaultIgnores')
);

// Resolve parserPreset key
// Resolve parserPreset key from flat-non-extended config
if (typeof config.parserPreset === 'string') {
const resolvedParserPreset = resolveFrom(base, config.parserPreset);
let resolvedParserConfig = await require(resolvedParserPreset);

// Resolve loaded parser preset if its a factory
// Resolve loaded parser preset factory
if (typeof resolvedParserConfig === 'function') {
resolvedParserConfig = await resolvedParserConfig();
}
@@ -61,8 +61,14 @@ export default async (seed = {}, options = {cwd: process.cwd()}) => {
typeof preset.parserPreset.parserOpts === 'object' &&
typeof preset.parserPreset.parserOpts.then === 'function'
) {
preset.parserPreset.parserOpts = (await preset.parserPreset
.parserOpts).parserOpts;
let parserPreset = await preset.parserPreset.parserOpts;

// Resolve loaded parser preset factory from extended config
if (typeof parserPreset === 'function') {
parserPreset = await parserPreset();
}

preset.parserPreset.parserOpts = parserPreset.parserOpts;
}

// Resolve config-relative formatter module
10 changes: 10 additions & 0 deletions @commitlint/load/src/index.test.js
Original file line number Diff line number Diff line change
@@ -228,6 +228,16 @@ test('recursive extends with parserPreset', async t => {
);
});

test('recursive extends with parserPreset factory', async t => {
const cwd = await git.bootstrap('fixtures/recursive-parser-preset-factory');
const actual = await load({}, {cwd});

t.is(actual.parserPreset.name, './conventional-changelog-factory');
t.deepEqual(actual.parserPreset.parserOpts, {
headerPattern: /^(\w*)(?:\((.*)\))?-(.*)$/
});
});

test('ignores unknow keys', async t => {
const cwd = await git.bootstrap('fixtures/trash-file');
const actual = await load({}, {cwd});
8 changes: 8 additions & 0 deletions @commitlint/prompt-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.

## [8.3.1](https://github.com/conventional-changelog/commitlint/compare/v8.3.0...v8.3.1) (2019-10-16)

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





# [8.3.0](https://github.com/conventional-changelog/commitlint/compare/v8.2.0...v8.3.0) (2019-10-16)

**Note:** Version bump only for package @commitlint/prompt-cli
4 changes: 2 additions & 2 deletions @commitlint/prompt-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@commitlint/prompt-cli",
"version": "8.3.0",
"version": "8.3.1",
"description": "commit prompt using commitlint.config.js",
"files": [
"cli.js"
@@ -34,7 +34,7 @@
"ava": "0.25.0"
},
"dependencies": {
"@commitlint/prompt": "^8.3.0",
"@commitlint/prompt": "^8.3.1",
"execa": "0.11.0",
"string-to-stream": "1.1.1"
}
8 changes: 8 additions & 0 deletions @commitlint/prompt/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.

## [8.3.1](https://github.com/conventional-changelog/commitlint/compare/v8.3.0...v8.3.1) (2019-10-16)

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





# [8.3.0](https://github.com/conventional-changelog/commitlint/compare/v8.2.0...v8.3.0) (2019-10-16)

**Note:** Version bump only for package @commitlint/prompt
4 changes: 2 additions & 2 deletions @commitlint/prompt/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@commitlint/prompt",
"version": "8.3.0",
"version": "8.3.1",
"description": "commitizen prompt using commitlint.config.js",
"main": "./lib/index.js",
"files": [
@@ -65,7 +65,7 @@
"cross-env": "6.0.0"
},
"dependencies": {
"@commitlint/load": "^8.3.0",
"@commitlint/load": "^8.3.1",
"babel-runtime": "^6.23.0",
"chalk": "^2.0.0",
"lodash": "4.17.15",
8 changes: 8 additions & 0 deletions @commitlint/travis-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.

## [8.3.1](https://github.com/conventional-changelog/commitlint/compare/v8.3.0...v8.3.1) (2019-10-16)

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





# [8.3.0](https://github.com/conventional-changelog/commitlint/compare/v8.2.0...v8.3.0) (2019-10-16)

**Note:** Version bump only for package @commitlint/travis-cli
4 changes: 2 additions & 2 deletions @commitlint/travis-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@commitlint/travis-cli",
"version": "8.3.0",
"version": "8.3.1",
"description": "Lint all relevant commits for a change or PR on Travis CI",
"files": [
"lib/"
@@ -65,7 +65,7 @@
"which": "1.3.1"
},
"dependencies": {
"@commitlint/cli": "^8.3.0",
"@commitlint/cli": "^8.3.1",
"babel-runtime": "6.26.0",
"execa": "0.11.0"
}
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [8.3.1](https://github.com/conventional-changelog/commitlint/compare/v8.3.0...v8.3.1) (2019-10-16)


### Bug Fixes

* **load:** resolve nested parser preset factories ([#831](https://github.com/conventional-changelog/commitlint/issues/831)) ([73a7df7](https://github.com/conventional-changelog/commitlint/commit/73a7df7))





# [8.3.0](https://github.com/conventional-changelog/commitlint/compare/v8.2.0...v8.3.0) (2019-10-16)


2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -2,5 +2,5 @@
"lerna": "2",
"npmClient": "yarn",
"useWorkspaces": true,
"version": "8.3.0"
"version": "8.3.1"
}