Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@markuplint/ml-config

Package Overview
Dependencies
Maintainers
1
Versions
137
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@markuplint/ml-config - npm Package Compare versions

Comparing version 2.0.0-dev.36 to 2.0.0-dev.2021116.0

3

lib/merge-config.d.ts

@@ -1,2 +0,3 @@

import type { Config } from './types';
import type { Config, Nullable, AnyRule } from './types';
export declare function mergeConfig(a: Config, b: Config): Config;
export declare function mergeRule(a: Nullable<AnyRule>, b: AnyRule): AnyRule;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.mergeConfig = void 0;
exports.mergeRule = exports.mergeConfig = void 0;
const tslib_1 = require("tslib");

@@ -112,2 +112,9 @@ const deepmerge_1 = (0, tslib_1.__importDefault)(require("deepmerge"));

function mergeRule(a, b) {
// Particular behavior:
//
// If the right-side value is false, return false.
// In short; The `false` makes the rule to be disabled absolutely.
if (b === false || (!isRuleConfigValue(b) && b.value === false)) {
return false;
}
if (a === undefined) {

@@ -134,2 +141,3 @@ return b;

const option = mergeObject(!isRuleConfigValue(a) ? a.option : undefined, b.option);
const reason = b.reason || (!isRuleConfigValue(a) ? a.reason : undefined);
const res = {

@@ -139,2 +147,3 @@ severity,

option,
reason,
};

@@ -144,2 +153,3 @@ deleteUndefProp(res);

}
exports.mergeRule = mergeRule;
function isRuleConfigValue(v) {

@@ -146,0 +156,0 @@ switch (typeof v) {

@@ -65,2 +65,9 @@ "use strict";

}
if (rule.reason != null) {
const exchangedValue = exchangeValue(rule.reason, data);
rule = {
...rule,
reason: exchangedValue ? `${exchangedValue}` : undefined,
};
}
return rule;

@@ -67,0 +74,0 @@ }

{
"name": "@markuplint/ml-config",
"version": "2.0.0-dev.36+6a10aede",
"version": "2.0.0-dev.2021116.0",
"description": "JSON Schema and TypeScript types of markuplint configure JSON",

@@ -26,3 +26,3 @@ "repository": "git@github.com:markuplint/markuplint.git",

},
"gitHead": "6a10aede7385e2e97d0ba2c272a2e8c08e5429fd"
"gitHead": "9a97f1e837bd86d72bd3980b0fb11245c6b3e8f7"
}

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