@commitlint/load
Advanced tools
Comparing version 8.3.2 to 8.3.3
@@ -197,5 +197,13 @@ 'use strict'; | ||
return Promise.resolve(new Promise(resolve => { | ||
parser.parserOpts((_, opts) => { | ||
const result = parser.parserOpts((_, opts) => { | ||
resolve(opts.parserOpts); | ||
}); | ||
// If result has data or a promise, the parser doesn't support factory-init | ||
// due to https://github.com/nodejs/promises-debugging/issues/16 it just quits, so let's use this fallback | ||
if (result) { | ||
Promise.resolve(result).then(opts => { | ||
resolve(opts.parserOpts); | ||
}); | ||
} | ||
})).then($return, $error); | ||
@@ -202,0 +210,0 @@ } |
@@ -814,2 +814,26 @@ 'use strict'; | ||
}.bind(this))); | ||
(0, _ava2.default)('resolves parser preset from conventional commits without factory support', t => new Promise(function ($return, $error) { | ||
var cwd, actual; | ||
return Promise.resolve(_test.npm.bootstrap('fixtures/parser-preset-conventional-without-factory')).then(function ($await_62) { | ||
try { | ||
cwd = $await_62; | ||
return Promise.resolve((0, _2.default)({}, { cwd })).then(function ($await_63) { | ||
try { | ||
actual = $await_63; | ||
t.is(actual.parserPreset.name, 'conventional-changelog-conventionalcommits'); | ||
t.is(typeof actual.parserPreset.parserOpts, 'object'); | ||
t.deepEqual(actual.parserPreset.parserOpts.headerPattern, /^(\w*)(?:\((.*)\))?!?: (.*)$/); | ||
return $return(); | ||
} catch ($boundEx) { | ||
return $error($boundEx); | ||
} | ||
}.bind(this), $error); | ||
} catch ($boundEx) { | ||
return $error($boundEx); | ||
} | ||
}.bind(this), $error); | ||
}.bind(this))); | ||
//# sourceMappingURL=index.test.js.map |
{ | ||
"name": "@commitlint/load", | ||
"version": "8.3.2", | ||
"version": "8.3.3", | ||
"description": "Load shared commitlint configuration", | ||
@@ -79,3 +79,3 @@ "main": "lib/index.js", | ||
}, | ||
"gitHead": "0382070379cfc841da8dc57718d232d1649dac6f" | ||
"gitHead": "9a1dd6fc3d08a6295b21e767ef54fd2182d962d6" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
100757
1216