Skip to content

Commit

Permalink
tools: update minimist@1.2.5
Browse files Browse the repository at this point in the history
Update minimist used by lint-md.js to 1.2.5.

Refs: https://app.snyk.io/vuln/SNYK-JS-MINIMIST-559764
Signed-off-by: Rich Trott <rtrott@gmail.com>

PR-URL: #32274
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
Trott authored and MylesBorins committed Mar 24, 2020
1 parent 59a21e2 commit 5adaf10
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 21 deletions.
22 changes: 16 additions & 6 deletions tools/lint-md.js
Original file line number Diff line number Diff line change
Expand Up @@ -5962,12 +5962,21 @@ var minimist = function (args, opts) {

function setKey (obj, keys, value) {
var o = obj;
keys.slice(0,-1).forEach(function (key) {
for (var i = 0; i < keys.length-1; i++) {
var key = keys[i];
if (key === '__proto__') return;
if (o[key] === undefined) o[key] = {};
if (o[key] === Object.prototype || o[key] === Number.prototype
|| o[key] === String.prototype) o[key] = {};
if (o[key] === Array.prototype) o[key] = [];
o = o[key];
});
}

var key = keys[keys.length - 1];
if (key === '__proto__') return;
if (o === Object.prototype || o === Number.prototype
|| o === String.prototype) o = {};
if (o === Array.prototype) o = [];
if (o[key] === undefined || flags.bools[key] || typeof o[key] === 'boolean') {
o[key] = value;
}
Expand Down Expand Up @@ -6065,7 +6074,7 @@ var minimist = function (args, opts) {
setArg(key, args[i+1], arg);
i++;
}
else if (args[i+1] && /true|false/.test(args[i+1])) {
else if (args[i+1] && /^(true|false)$/.test(args[i+1])) {
setArg(key, args[i+1] === 'true', arg);
i++;
}
Expand Down Expand Up @@ -11282,6 +11291,7 @@ function writeSync(description, options) {
file.contents || '',
options
);
return file
}

var sync$1 = {
Expand Down Expand Up @@ -11368,7 +11378,7 @@ function write$1(description, options, callback) {
if (error) {
reject(error);
} else {
resolve();
resolve(file);
}
}
}
Expand Down Expand Up @@ -13910,7 +13920,7 @@ var chars = windows$1 ? {error: '×', warning: '‼'} : {error: '✖', warning:
var trailing = /\s*$/;

// Default filename.
var DEFAULT = '<stdin>';
var defaultName = '<stdin>';

var noop = {open: '', close: ''};

Expand Down Expand Up @@ -14014,7 +14024,7 @@ function parse$4(files, options) {
type: 'header',
origin: origin,
destination: destination,
name: origin || options.defaultName || DEFAULT,
name: origin || options.defaultName || defaultName,
stored: Boolean(file.stored),
moved: Boolean(file.stored && destination !== origin),
stats: vfileStatistics(messages)
Expand Down
30 changes: 15 additions & 15 deletions tools/node-lint-md-cli-rollup/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5adaf10

Please sign in to comment.