@commitlint/resolve-extends
Advanced tools
Comparing version 15.0.0 to 16.0.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [16.0.0](https://github.com/conventional-changelog/commitlint/compare/v15.0.0...v16.0.0) (2021-12-26) | ||
### Features | ||
* config validation ([#2412](https://github.com/conventional-changelog/commitlint/issues/2412)) ([c717202](https://github.com/conventional-changelog/commitlint/commit/c7172022097b11f46b33617e4a94d751243c1049)), closes [#327](https://github.com/conventional-changelog/commitlint/issues/327) | ||
# [15.0.0](https://github.com/conventional-changelog/commitlint/compare/v14.2.0...v15.0.0) (2021-11-17) | ||
@@ -8,0 +19,0 @@ |
import 'resolve-global'; | ||
export interface ResolvedConfig { | ||
parserPreset?: unknown; | ||
[key: string]: unknown; | ||
} | ||
export interface ResolveExtendsConfig { | ||
extends?: string | string[]; | ||
helpUrl?: string; | ||
[key: string]: unknown; | ||
} | ||
import { UserConfig } from '@commitlint/types'; | ||
export interface ResolveExtendsContext { | ||
@@ -22,3 +14,3 @@ cwd?: string; | ||
} | ||
export default function resolveExtends(config?: ResolveExtendsConfig, context?: ResolveExtendsContext): ResolvedConfig; | ||
export default function resolveExtends(config?: UserConfig, context?: ResolveExtendsContext): UserConfig; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -20,4 +20,4 @@ "use strict"; | ||
const resolve_from_1 = __importDefault(require("resolve-from")); | ||
const merge_1 = __importDefault(require("lodash/merge")); | ||
const mergeWith_1 = __importDefault(require("lodash/mergeWith")); | ||
const config_validator_1 = require("@commitlint/config-validator"); | ||
const importFresh = require('import-fresh'); | ||
@@ -51,3 +51,3 @@ function resolveExtends(config = {}, context = {}) { | ||
const cwd = path_1.default.dirname(resolved); | ||
const ctx = (0, merge_1.default)({}, context, { cwd }); | ||
const ctx = Object.assign(Object.assign({}, context), { cwd }); | ||
// Resolve parser preset if none was present before | ||
@@ -68,2 +68,3 @@ if (!context.parserPreset && | ||
} | ||
(0, config_validator_1.validateConfig)(resolved, config); | ||
return [...configs, ...loadExtends(c, ctx), c]; | ||
@@ -70,0 +71,0 @@ }, []); |
{ | ||
"name": "@commitlint/resolve-extends", | ||
"version": "15.0.0", | ||
"version": "16.0.0", | ||
"description": "Lint your commit messages", | ||
@@ -38,6 +38,8 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"@commitlint/utils": "^15.0.0", | ||
"@commitlint/utils": "^16.0.0", | ||
"@types/lodash": "^4.14.161" | ||
}, | ||
"dependencies": { | ||
"@commitlint/config-validator": "^16.0.0", | ||
"@commitlint/types": "^16.0.0", | ||
"import-fresh": "^3.0.0", | ||
@@ -48,3 +50,3 @@ "lodash": "^4.17.19", | ||
}, | ||
"gitHead": "399a0289356c670a87524387cc96d8fb0a33fdca" | ||
"gitHead": "d829bf6260304ca8d6811f329fcdd1b6c50e9749" | ||
} |
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
22117
6
134
+ Added@commitlint/types@^16.0.0
+ Added@commitlint/config-validator@16.2.1(transitive)
+ Added@commitlint/types@16.2.1(transitive)
+ Addedajv@6.12.6(transitive)
+ Addedansi-styles@4.3.0(transitive)
+ Addedchalk@4.1.2(transitive)
+ Addedcolor-convert@2.0.1(transitive)
+ Addedcolor-name@1.1.4(transitive)
+ Addedfast-deep-equal@3.1.3(transitive)
+ Addedfast-json-stable-stringify@2.1.0(transitive)
+ Addedhas-flag@4.0.0(transitive)
+ Addedjson-schema-traverse@0.4.1(transitive)
+ Addedpunycode@2.3.1(transitive)
+ Addedsupports-color@7.2.0(transitive)
+ Addeduri-js@4.4.1(transitive)