@commitlint/load
Advanced tools
Comparing version 7.6.1 to 7.6.2
@@ -165,3 +165,3 @@ 'use strict'; | ||
explorer = (0, _cosmiconfig2.default)('commitlint'); | ||
explicitPath = configPath ? _path2.default.join(cwd, configPath) : undefined; | ||
explicitPath = configPath ? _path2.default.resolve(cwd, configPath) : undefined; | ||
explore = explicitPath ? explorer.load : explorer.search; | ||
@@ -168,0 +168,0 @@ searchPath = explicitPath ? explicitPath : cwd; |
@@ -67,3 +67,3 @@ 'use strict'; | ||
(0, _ava2.default)('rules should be loaded from specify config file', t => new Promise(function ($return, $error) { | ||
(0, _ava2.default)('rules should be loaded from relative config file', t => new Promise(function ($return, $error) { | ||
var file, cwd, actual; | ||
@@ -90,2 +90,24 @@ file = 'config/commitlint.config.js'; | ||
(0, _ava2.default)('rules should be loaded from absolute config file', t => new Promise(function ($return, $error) { | ||
var cwd, file, actual; | ||
return Promise.resolve(_test.git.bootstrap('fixtures/specify-config-file')).then(function ($await_7) { | ||
try { | ||
cwd = $await_7; | ||
file = _path2.default.join(cwd, 'config/commitlint.config.js'); | ||
return Promise.resolve((0, _2.default)({}, { cwd: process.cwd(), file })).then(function ($await_8) { | ||
try { | ||
actual = $await_8; | ||
t.is(actual.rules.foo, 'bar'); | ||
return $return(); | ||
} catch ($boundEx) { | ||
return $error($boundEx); | ||
} | ||
}.bind(this), $error); | ||
} catch ($boundEx) { | ||
return $error($boundEx); | ||
} | ||
}.bind(this), $error); | ||
}.bind(this))); | ||
(0, _ava2.default)('plugins should be loaded from seed', t => new Promise(function ($return, $error) { | ||
@@ -99,8 +121,8 @@ var plugin, scopedPlugin, stubbedLoad, cwd, actual; | ||
}); | ||
return Promise.resolve(_test.git.bootstrap('fixtures/extends-empty')).then(function ($await_7) { | ||
return Promise.resolve(_test.git.bootstrap('fixtures/extends-empty')).then(function ($await_9) { | ||
try { | ||
cwd = $await_7; | ||
return Promise.resolve(stubbedLoad({ plugins: ['example', '@scope/example'] }, { cwd })).then(function ($await_8) { | ||
cwd = $await_9; | ||
return Promise.resolve(stubbedLoad({ plugins: ['example', '@scope/example'] }, { cwd })).then(function ($await_10) { | ||
try { | ||
actual = $await_8; | ||
actual = $await_10; | ||
@@ -130,8 +152,8 @@ t.deepEqual(actual.plugins, { | ||
}); | ||
return Promise.resolve(_test.git.bootstrap('fixtures/extends-plugins')).then(function ($await_9) { | ||
return Promise.resolve(_test.git.bootstrap('fixtures/extends-plugins')).then(function ($await_11) { | ||
try { | ||
cwd = $await_9; | ||
return Promise.resolve(stubbedLoad({}, { cwd })).then(function ($await_10) { | ||
cwd = $await_11; | ||
return Promise.resolve(stubbedLoad({}, { cwd })).then(function ($await_12) { | ||
try { | ||
actual = $await_10; | ||
actual = $await_12; | ||
@@ -156,10 +178,10 @@ t.deepEqual(actual.plugins, { | ||
return Promise.resolve(_test.git.bootstrap('fixtures/parser-preset')).then(function ($await_11) { | ||
return Promise.resolve(_test.git.bootstrap('fixtures/parser-preset')).then(function ($await_13) { | ||
try { | ||
cwd = $await_11; | ||
cwd = $await_13; | ||
return Promise.resolve((0, _2.default)({ | ||
parserPreset: './conventional-changelog-custom' | ||
}, { cwd })).then(function ($await_12) { | ||
}, { cwd })).then(function ($await_14) { | ||
try { | ||
_ref = $await_12; | ||
_ref = $await_14; | ||
actual = _ref.parserPreset; | ||
@@ -184,6 +206,6 @@ | ||
var cwd; | ||
return Promise.resolve(_test.git.bootstrap('fixtures/extends-invalid')).then(function ($await_13) { | ||
return Promise.resolve(_test.git.bootstrap('fixtures/extends-invalid')).then(function ($await_15) { | ||
try { | ||
cwd = $await_13; | ||
return Promise.resolve(t.throws((0, _2.default)({}, { cwd }))).then(function ($await_14) { | ||
cwd = $await_15; | ||
return Promise.resolve(t.throws((0, _2.default)({}, { cwd }))).then(function ($await_16) { | ||
try { | ||
@@ -203,8 +225,8 @@ return $return(); | ||
var cwd, actual; | ||
return Promise.resolve(_test.git.bootstrap('fixtures/empty-object-file')).then(function ($await_15) { | ||
return Promise.resolve(_test.git.bootstrap('fixtures/empty-object-file')).then(function ($await_17) { | ||
try { | ||
cwd = $await_15; | ||
return Promise.resolve((0, _2.default)({}, { cwd })).then(function ($await_16) { | ||
cwd = $await_17; | ||
return Promise.resolve((0, _2.default)({}, { cwd })).then(function ($await_18) { | ||
try { | ||
actual = $await_16; | ||
actual = $await_18; | ||
@@ -225,8 +247,8 @@ t.deepEqual(actual.rules, {}); | ||
var cwd, actual; | ||
return Promise.resolve(_test.git.bootstrap('fixtures/empty-file')).then(function ($await_17) { | ||
return Promise.resolve(_test.git.bootstrap('fixtures/empty-file')).then(function ($await_19) { | ||
try { | ||
cwd = $await_17; | ||
return Promise.resolve((0, _2.default)({}, { cwd })).then(function ($await_18) { | ||
cwd = $await_19; | ||
return Promise.resolve((0, _2.default)({}, { cwd })).then(function ($await_20) { | ||
try { | ||
actual = $await_18; | ||
actual = $await_20; | ||
@@ -247,8 +269,8 @@ t.deepEqual(actual.extends, []); | ||
var cwd, actual; | ||
return Promise.resolve(_test.git.bootstrap('fixtures/recursive-extends/first-extended')).then(function ($await_19) { | ||
return Promise.resolve(_test.git.bootstrap('fixtures/recursive-extends/first-extended')).then(function ($await_21) { | ||
try { | ||
cwd = $await_19; | ||
return Promise.resolve((0, _2.default)({}, { cwd })).then(function ($await_20) { | ||
cwd = $await_21; | ||
return Promise.resolve((0, _2.default)({}, { cwd })).then(function ($await_22) { | ||
try { | ||
actual = $await_20; | ||
actual = $await_22; | ||
@@ -277,8 +299,8 @@ t.deepEqual(actual, { | ||
var cwd, actual; | ||
return Promise.resolve(_test.git.bootstrap('fixtures/recursive-extends')).then(function ($await_21) { | ||
return Promise.resolve(_test.git.bootstrap('fixtures/recursive-extends')).then(function ($await_23) { | ||
try { | ||
cwd = $await_21; | ||
return Promise.resolve((0, _2.default)({}, { cwd })).then(function ($await_22) { | ||
cwd = $await_23; | ||
return Promise.resolve((0, _2.default)({}, { cwd })).then(function ($await_24) { | ||
try { | ||
actual = $await_22; | ||
actual = $await_24; | ||
@@ -308,8 +330,8 @@ t.deepEqual(actual, { | ||
var cwd, actual; | ||
return Promise.resolve(_test.git.bootstrap('fixtures/recursive-extends-json')).then(function ($await_23) { | ||
return Promise.resolve(_test.git.bootstrap('fixtures/recursive-extends-json')).then(function ($await_25) { | ||
try { | ||
cwd = $await_23; | ||
return Promise.resolve((0, _2.default)({}, { cwd })).then(function ($await_24) { | ||
cwd = $await_25; | ||
return Promise.resolve((0, _2.default)({}, { cwd })).then(function ($await_26) { | ||
try { | ||
actual = $await_24; | ||
actual = $await_26; | ||
@@ -340,8 +362,8 @@ | ||
var cwd, actual; | ||
return Promise.resolve(_test.git.bootstrap('fixtures/recursive-extends-yaml')).then(function ($await_25) { | ||
return Promise.resolve(_test.git.bootstrap('fixtures/recursive-extends-yaml')).then(function ($await_27) { | ||
try { | ||
cwd = $await_25; | ||
return Promise.resolve((0, _2.default)({}, { cwd })).then(function ($await_26) { | ||
cwd = $await_27; | ||
return Promise.resolve((0, _2.default)({}, { cwd })).then(function ($await_28) { | ||
try { | ||
actual = $await_26; | ||
actual = $await_28; | ||
@@ -372,8 +394,8 @@ | ||
var cwd, actual; | ||
return Promise.resolve(_test.git.bootstrap('fixtures/recursive-extends-js')).then(function ($await_27) { | ||
return Promise.resolve(_test.git.bootstrap('fixtures/recursive-extends-js')).then(function ($await_29) { | ||
try { | ||
cwd = $await_27; | ||
return Promise.resolve((0, _2.default)({}, { cwd })).then(function ($await_28) { | ||
cwd = $await_29; | ||
return Promise.resolve((0, _2.default)({}, { cwd })).then(function ($await_30) { | ||
try { | ||
actual = $await_28; | ||
actual = $await_30; | ||
@@ -404,8 +426,8 @@ | ||
var cwd, actual; | ||
return Promise.resolve(_test.git.bootstrap('fixtures/recursive-extends-package')).then(function ($await_29) { | ||
return Promise.resolve(_test.git.bootstrap('fixtures/recursive-extends-package')).then(function ($await_31) { | ||
try { | ||
cwd = $await_29; | ||
return Promise.resolve((0, _2.default)({}, { cwd })).then(function ($await_30) { | ||
cwd = $await_31; | ||
return Promise.resolve((0, _2.default)({}, { cwd })).then(function ($await_32) { | ||
try { | ||
actual = $await_30; | ||
actual = $await_32; | ||
@@ -436,8 +458,8 @@ | ||
var cwd, actual; | ||
return Promise.resolve(_test.git.bootstrap('fixtures/parser-preset-override')).then(function ($await_31) { | ||
return Promise.resolve(_test.git.bootstrap('fixtures/parser-preset-override')).then(function ($await_33) { | ||
try { | ||
cwd = $await_31; | ||
return Promise.resolve((0, _2.default)({}, { cwd })).then(function ($await_32) { | ||
cwd = $await_33; | ||
return Promise.resolve((0, _2.default)({}, { cwd })).then(function ($await_34) { | ||
try { | ||
actual = $await_32; | ||
actual = $await_34; | ||
@@ -461,8 +483,8 @@ t.is(actual.parserPreset.name, './custom'); | ||
var cwd, actual; | ||
return Promise.resolve(_test.git.bootstrap('fixtures/recursive-parser-preset')).then(function ($await_33) { | ||
return Promise.resolve(_test.git.bootstrap('fixtures/recursive-parser-preset')).then(function ($await_35) { | ||
try { | ||
cwd = $await_33; | ||
return Promise.resolve((0, _2.default)({}, { cwd })).then(function ($await_34) { | ||
cwd = $await_35; | ||
return Promise.resolve((0, _2.default)({}, { cwd })).then(function ($await_36) { | ||
try { | ||
actual = $await_34; | ||
actual = $await_36; | ||
@@ -485,8 +507,8 @@ t.is(actual.parserPreset.name, './conventional-changelog-custom'); | ||
var cwd, actual; | ||
return Promise.resolve(_test.git.bootstrap('fixtures/trash-file')).then(function ($await_35) { | ||
return Promise.resolve(_test.git.bootstrap('fixtures/trash-file')).then(function ($await_37) { | ||
try { | ||
cwd = $await_35; | ||
return Promise.resolve((0, _2.default)({}, { cwd })).then(function ($await_36) { | ||
cwd = $await_37; | ||
return Promise.resolve((0, _2.default)({}, { cwd })).then(function ($await_38) { | ||
try { | ||
actual = $await_36; | ||
actual = $await_38; | ||
@@ -516,8 +538,8 @@ | ||
var cwd, actual; | ||
return Promise.resolve(_test.git.bootstrap('fixtures/trash-extend')).then(function ($await_37) { | ||
return Promise.resolve(_test.git.bootstrap('fixtures/trash-extend')).then(function ($await_39) { | ||
try { | ||
cwd = $await_37; | ||
return Promise.resolve((0, _2.default)({}, { cwd })).then(function ($await_38) { | ||
cwd = $await_39; | ||
return Promise.resolve((0, _2.default)({}, { cwd })).then(function ($await_40) { | ||
try { | ||
actual = $await_38; | ||
actual = $await_40; | ||
@@ -547,11 +569,11 @@ | ||
var outer, cwd, actual; | ||
return Promise.resolve(_test.fix.bootstrap('fixtures/outer-scope')).then(function ($await_39) { | ||
return Promise.resolve(_test.fix.bootstrap('fixtures/outer-scope')).then(function ($await_41) { | ||
try { | ||
outer = $await_39; | ||
return Promise.resolve(_test.git.init(_path2.default.join(outer, 'inner-scope'))).then(function ($await_40) { | ||
outer = $await_41; | ||
return Promise.resolve(_test.git.init(_path2.default.join(outer, 'inner-scope'))).then(function ($await_42) { | ||
try { | ||
cwd = _path2.default.join(outer, 'inner-scope', 'child-scope'); | ||
return Promise.resolve((0, _2.default)({}, { cwd })).then(function ($await_41) { | ||
return Promise.resolve((0, _2.default)({}, { cwd })).then(function ($await_43) { | ||
try { | ||
actual = $await_41; | ||
actual = $await_43; | ||
@@ -586,11 +608,11 @@ | ||
var outer, cwd, actual; | ||
return Promise.resolve(_test.fix.bootstrap('fixtures/outer-scope')).then(function ($await_42) { | ||
return Promise.resolve(_test.fix.bootstrap('fixtures/outer-scope')).then(function ($await_44) { | ||
try { | ||
outer = $await_42; | ||
return Promise.resolve(_test.git.init(_path2.default.join(outer, 'inner-scope'))).then(function ($await_43) { | ||
outer = $await_44; | ||
return Promise.resolve(_test.git.init(_path2.default.join(outer, 'inner-scope'))).then(function ($await_45) { | ||
try { | ||
cwd = $await_43; | ||
return Promise.resolve((0, _2.default)({}, { cwd })).then(function ($await_44) { | ||
cwd = $await_45; | ||
return Promise.resolve((0, _2.default)({}, { cwd })).then(function ($await_46) { | ||
try { | ||
actual = $await_44; | ||
actual = $await_46; | ||
@@ -625,8 +647,8 @@ | ||
var cwd, actual; | ||
return Promise.resolve(_test.git.bootstrap('fixtures/formatter')).then(function ($await_45) { | ||
return Promise.resolve(_test.git.bootstrap('fixtures/formatter')).then(function ($await_47) { | ||
try { | ||
cwd = $await_45; | ||
return Promise.resolve((0, _2.default)({}, { cwd })).then(function ($await_46) { | ||
cwd = $await_47; | ||
return Promise.resolve((0, _2.default)({}, { cwd })).then(function ($await_48) { | ||
try { | ||
actual = $await_46; | ||
actual = $await_48; | ||
@@ -653,8 +675,8 @@ | ||
var cwd, actual; | ||
return Promise.resolve(_test.git.bootstrap('fixtures/formatter-local-module')).then(function ($await_47) { | ||
return Promise.resolve(_test.git.bootstrap('fixtures/formatter-local-module')).then(function ($await_49) { | ||
try { | ||
cwd = $await_47; | ||
return Promise.resolve((0, _2.default)({}, { cwd })).then(function ($await_48) { | ||
cwd = $await_49; | ||
return Promise.resolve((0, _2.default)({}, { cwd })).then(function ($await_50) { | ||
try { | ||
actual = $await_48; | ||
actual = $await_50; | ||
@@ -681,8 +703,8 @@ | ||
var cwd, actual; | ||
return Promise.resolve(_test.git.bootstrap('fixtures/formatter-local-module')).then(function ($await_49) { | ||
return Promise.resolve(_test.git.bootstrap('fixtures/formatter-local-module')).then(function ($await_51) { | ||
try { | ||
cwd = $await_49; | ||
return Promise.resolve((0, _2.default)({ formatter: './doesnt/exists.js' }, { cwd })).then(function ($await_50) { | ||
cwd = $await_51; | ||
return Promise.resolve((0, _2.default)({ formatter: './doesnt/exists.js' }, { cwd })).then(function ($await_52) { | ||
try { | ||
actual = $await_50; | ||
actual = $await_52; | ||
@@ -689,0 +711,0 @@ |
{ | ||
"name": "@commitlint/load", | ||
"version": "7.6.1", | ||
"version": "7.6.2", | ||
"description": "Load shared commitlint configuration", | ||
@@ -77,4 +77,3 @@ "main": "lib/index.js", | ||
"resolve-from": "^5.0.0" | ||
}, | ||
"gitHead": "dc5619dea62b7b8ac72dc7758d70b684e010557b" | ||
} | ||
} |
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
86175
1063