Skip to content

Commit

Permalink
tools: update [email protected]
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 <[email protected]>

PR-URL: nodejs#32274
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
Trott authored and MylesBorins committed Apr 2, 2020
1 parent fae680f commit c0e6e60
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 c0e6e60

Please sign in to comment.