Socket
Socket
Sign inDemoInstall

@commitlint/load

Package Overview
Dependencies
Maintainers
4
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@commitlint/load - npm Package Compare versions

Comparing version 15.0.0 to 16.0.0

11

CHANGELOG.md

@@ -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 @@

13

lib/load.js

@@ -8,2 +8,3 @@ "use strict";

const resolve_extends_1 = __importDefault(require("@commitlint/resolve-extends"));
const config_validator_1 = require("@commitlint/config-validator");
const isPlainObject_1 = __importDefault(require("lodash/isPlainObject"));

@@ -17,3 +18,2 @@ const merge_1 = __importDefault(require("lodash/merge"));

const load_plugin_1 = __importDefault(require("./utils/load-plugin"));
const pick_config_1 = require("./utils/pick-config");
async function load(seed = {}, options = {}) {

@@ -23,10 +23,13 @@ const cwd = typeof options.cwd === 'undefined' ? process.cwd() : options.cwd;

const base = loaded && loaded.filepath ? path_1.default.dirname(loaded.filepath) : cwd;
// TODO: validate loaded.config against UserConfig type
// Might amount to breaking changes, defer until 9.0.0
let config = {};
if (loaded) {
(0, config_validator_1.validateConfig)(loaded.filepath || '', loaded.config);
config = loaded.config;
}
// Merge passed config with file based options
const config = (0, pick_config_1.pickConfig)((0, merge_1.default)({
config = (0, merge_1.default)({
extends: [],
plugins: [],
rules: {},
}, loaded ? loaded.config : null, seed));
}, config, seed);
// Resolve parserPreset key

@@ -33,0 +36,0 @@ if (typeof config.parserPreset === 'string') {

@@ -7,5 +7,5 @@ "use strict";

exports.loadConfig = void 0;
const cosmiconfig_1 = require("cosmiconfig");
const cosmiconfig_typescript_loader_1 = __importDefault(require("cosmiconfig-typescript-loader"));
const path_1 = __importDefault(require("path"));
const cosmiconfig_1 = require("cosmiconfig");
const cosmiconfig_typescript_loader_1 = __importDefault(require("@endemolshinegroup/cosmiconfig-typescript-loader"));
async function loadConfig(cwd, configPath) {

@@ -31,3 +31,3 @@ const moduleName = 'commitlint';

loaders: {
'.ts': cosmiconfig_typescript_loader_1.default,
'.ts': (0, cosmiconfig_typescript_loader_1.default)(),
},

@@ -34,0 +34,0 @@ });

{
"name": "@commitlint/load",
"version": "15.0.0",
"version": "16.0.0",
"description": "Load shared commitlint configuration",

@@ -38,5 +38,5 @@ "main": "lib/load.js",

"devDependencies": {
"@commitlint/test": "^15.0.0",
"@commitlint/utils": "^15.0.0",
"@types/lodash": "4.14.177",
"@commitlint/test": "^16.0.0",
"@commitlint/utils": "^16.0.0",
"@types/lodash": "4.14.178",
"conventional-changelog-atom": "^2.0.8",

@@ -46,8 +46,9 @@ "execa": "^5.0.0"

"dependencies": {
"@commitlint/execute-rule": "^15.0.0",
"@commitlint/resolve-extends": "^15.0.0",
"@commitlint/types": "^15.0.0",
"@endemolshinegroup/cosmiconfig-typescript-loader": "^3.0.2",
"@commitlint/config-validator": "^16.0.0",
"@commitlint/execute-rule": "^16.0.0",
"@commitlint/resolve-extends": "^16.0.0",
"@commitlint/types": "^16.0.0",
"chalk": "^4.0.0",
"cosmiconfig": "^7.0.0",
"cosmiconfig-typescript-loader": "^1.0.0",
"lodash": "^4.17.19",

@@ -57,3 +58,3 @@ "resolve-from": "^5.0.0",

},
"gitHead": "399a0289356c670a87524387cc96d8fb0a33fdca"
"gitHead": "70f7f4688b51774e7ac5e40e896cdaa3f132b2bc"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc