Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency updates #4627

Merged
merged 8 commits into from
Mar 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 3 additions & 19 deletions node_modules/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,13 @@ readme*
/@babel/code-frame
/@babel/core
/@babel/generator
/@babel/helper-environment-visitor
/@babel/helper-function-name
/@babel/helper-get-function-arity
/@babel/helper-member-expression-to-functions
/@babel/helper-hoist-variables
/@babel/helper-module-imports
/@babel/helper-module-transforms
/@babel/helper-optimise-call-expression
/@babel/helper-plugin-utils
/@babel/helper-replace-supers
/@babel/helper-simple-access
/@babel/helper-split-export-declaration
/@babel/helper-validator-identifier
Expand Down Expand Up @@ -68,15 +67,13 @@ readme*
/acorn-jsx
/acorn-walk
/ajv
/ansi-colors
/anymatch
/append-transform
/arg
/argparse
/array-find-index
/asn1
/assert-plus
/assertion-error
/async-hook-domain
/asynckit
/aws-sign2
Expand All @@ -102,11 +99,9 @@ readme*
/camelcase-css
/caseless
/ccount
/chai
/character-entities
/character-entities-legacy
/character-reference-invalid
/check-error
/chokidar
/cliui
/cmark-gfm
Expand All @@ -127,8 +122,6 @@ readme*
/decamelize
/decimal.js
/decompress-response
/deep-eql
/deep-equal
/deep-extend
/deep-is
/default-require-extensions
Expand All @@ -142,7 +135,6 @@ readme*
/domexception
/ecc-jsbn
/end-of-stream
/enquirer
/es-abstract
/es-to-primitive
/es6-error
Expand Down Expand Up @@ -188,7 +180,6 @@ readme*
/functional-red-black-tree
/gensync
/get-caller-file
/get-func-name
/get-intrinsic
/get-package-type
/get-symbol-description
Expand Down Expand Up @@ -219,7 +210,6 @@ readme*
/internal-slot
/is-alphabetical
/is-alphanumerical
/is-arguments
/is-bigint
/is-binary-path
/is-boolean-object
Expand Down Expand Up @@ -300,7 +290,6 @@ readme*
/node-addon-api
/node-modules-regexp
/node-preload
/noop-logger
/normalize-path
/npm-license-corrections
/null-check
Expand All @@ -310,7 +299,6 @@ readme*
/oauth-sign
/object-assign
/object-inspect
/object-is
/object-keys
/object.assign
/object.getownpropertydescriptors
Expand All @@ -323,7 +311,6 @@ readme*
/parse5
/path-key
/path-parse
/pathval
/performance-now
/picomatch
/pirates
Expand All @@ -332,7 +319,6 @@ readme*
/prelude-ls
/process-nextick-args
/process-on-spawn
/progress
/propagate
/property-information
/psl
Expand All @@ -343,7 +329,6 @@ readme*
/rc
/read-package-tree
/readdirp
/regexp.prototype.flags
/regexpp
/release-zalgo
/remark-footnotes
Expand Down Expand Up @@ -382,6 +367,7 @@ readme*
/string.prototype.trimstart
/strip-json-comments
/style-to-object
/supports-preserve-symlinks-flag
/symbol-tree
/tap
/tap-mocha-reporter
Expand All @@ -403,7 +389,6 @@ readme*
/tunnel-agent
/tweetnacl
/type-check
/type-detect
/type-fest
/typescript
/unbox-primitive
Expand Down Expand Up @@ -446,7 +431,6 @@ readme*
/xtend
/y18n
/yaml
/yapool
/yargs
/yargs-parser
/yn
Expand Down
2 changes: 1 addition & 1 deletion node_modules/debug/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "debug",
"version": "4.3.3",
"version": "4.3.4",
"repository": {
"type": "git",
"url": "git://github.com/debug-js/debug.git"
Expand Down
2 changes: 1 addition & 1 deletion node_modules/debug/src/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ function setup(env) {
namespaces = split[i].replace(/\*/g, '.*?');

if (namespaces[0] === '-') {
createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));
} else {
createDebug.names.push(new RegExp('^' + namespaces + '$'));
}
Expand Down
3 changes: 1 addition & 2 deletions node_modules/gauge/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ Gauge.prototype._computeTheme = function (theme) {
if (typeof theme === 'string') {
theme = this._themes.getTheme(theme)
} else if (
theme &&
(Object.keys(theme).length === 0 || theme.hasUnicode != null || theme.hasColor != null)
Object.keys(theme).length === 0 || theme.hasUnicode != null || theme.hasColor != null
) {
var useUnicode = theme.hasUnicode == null ? hasUnicode() : theme.hasUnicode
var useColor = theme.hasColor == null ? hasColor : theme.hasColor
Expand Down
24 changes: 13 additions & 11 deletions node_modules/gauge/package.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"name": "gauge",
"version": "4.0.3",
"version": "4.0.4",
"description": "A terminal based horizontal gauge",
"main": "lib",
"scripts": {
"test": "tap",
"lint": "eslint '**/*.js'",
"postlint": "npm-template-check",
"lint": "eslint \"**/*.js\"",
"postlint": "template-oss-check",
"lintfix": "npm run lint -- --fix",
"preversion": "npm test",
"postversion": "npm publish",
"prepublishOnly": "git push origin --follow-tags",
"snap": "tap",
"posttest": "npm run lint",
"template-copy": "npm-template-copy --force"
"template-oss-apply": "template-oss-apply --force"
},
"repository": {
"type": "git",
"url": "https://github.com/npm/gauge"
"url": "https://github.com/npm/gauge.git"
},
"keywords": [
"progressbar",
Expand All @@ -41,16 +41,17 @@
"wide-align": "^1.1.5"
},
"devDependencies": {
"@npmcli/template-oss": "^2.9.2",
"@npmcli/eslint-config": "^3.0.1",
"@npmcli/template-oss": "3.2.0",
"readable-stream": "^3.6.0",
"tap": "^15.1.6"
"tap": "^16.0.1"
},
"files": [
"bin",
"lib"
"bin/",
"lib/"
],
"engines": {
"node": "^12.13.0 || ^14.15.0 || >=16"
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
},
"tap": {
"branches": 79,
Expand All @@ -59,6 +60,7 @@
"lines": 90
},
"templateOSS": {
"version": "2.9.2"
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"version": "3.2.0"
}
}
17 changes: 17 additions & 0 deletions node_modules/just-diff-apply/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Definitions by: Eddie Atkinson <https://github.com/eddie-atkinson>

type Operation = "add" | "replace" | "remove";

type DiffOps = Array<{
op: Operation;
path: Array<string | number>;
value?: any;
}>;
type PathConverter = (path: string) => string[];

export function diffApply<T extends object>(
obj: T,
diff: DiffOps,
pathConverter?: PathConverter
): T;
export const jsonPatchPathConverter: PathConverter;
78 changes: 67 additions & 11 deletions node_modules/just-diff-apply/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ module.exports = {
var REMOVE = 'remove';
var REPLACE = 'replace';
var ADD = 'add';
var MOVE = 'move';

function diffApply(obj, diff, pathConverter) {
if (!obj || typeof obj != 'object') {
Expand All @@ -62,44 +63,99 @@ function diffApply(obj, diff, pathConverter) {
var thisDiff = diff[i];
var subObject = obj;
var thisOp = thisDiff.op;
var thisPath = thisDiff.path;
if (pathConverter) {
thisPath = pathConverter(thisPath);
if (!Array.isArray(thisPath)) {
throw new Error('pathConverter must return an array');

var thisPath = transformPath(pathConverter, thisDiff.path);
var thisFromPath = thisDiff.from && transformPath(pathConverter, thisDiff.from);
var toPath, toPathCopy, lastToProp, subToObject, valueToMove;

if (thisFromPath) {
// MOVE only, "fromPath" is effectively path and "path" is toPath
toPath = thisPath;
thisPath = thisFromPath;

toPathCopy = toPath.slice();
lastToProp = toPathCopy.pop();
prototypeCheck(lastToProp);
if (lastToProp == null) {
return false;
}
} else {
if (!Array.isArray(thisPath)) {
throw new Error('diff path must be an array, consider supplying a path converter');

var thisToProp;
while (((thisToProp = toPathCopy.shift())) != null) {
prototypeCheck(thisToProp);
if (!(thisToProp in subToObject)) {
subToObject[thisToProp] = {};
}
subToObject = subToObject[thisToProp];
}
}

var pathCopy = thisPath.slice();
var lastProp = pathCopy.pop();
prototypeCheck(lastProp);
if (lastProp == null) {
return false;
}

var thisProp;
while (((thisProp = pathCopy.shift())) != null) {
prototypeCheck(thisProp);
if (!(thisProp in subObject)) {
subObject[thisProp] = {};
}
subObject = subObject[thisProp];
}
if (thisOp === REMOVE || thisOp === REPLACE) {
if (thisOp === REMOVE || thisOp === REPLACE || thisOp === MOVE) {
var path = thisOp === MOVE ? thisDiff.from : thisDiff.path;
if (!subObject.hasOwnProperty(lastProp)) {
throw new Error(['expected to find property', thisDiff.path, 'in object', obj].join(' '));
throw new Error(['expected to find property', path, 'in object', obj].join(' '));
}
}
if (thisOp === REMOVE) {
if (thisOp === REMOVE || thisOp === MOVE) {
if (thisOp === MOVE) {
valueToMove = subObject[lastProp];
}
Array.isArray(subObject) ? subObject.splice(lastProp, 1) : delete subObject[lastProp];
}
if (thisOp === REPLACE || thisOp === ADD) {
subObject[lastProp] = thisDiff.value;
}

if (thisOp === MOVE) {
subObject[lastToProp] = valueToMove;
}
}
return subObject;
}

function transformPath(pathConverter, thisPath) {
if(pathConverter) {
thisPath = pathConverter(thisPath);
if(!Array.isArray(thisPath)) {
throw new Error([
'pathConverter must return an array, returned:',
thisPath,
].join(' '));
}
} else {
if(!Array.isArray(thisPath)) {
throw new Error([
'diff path',
thisPath,
'must be an array, consider supplying a path converter']
.join(' '));
}
}
return thisPath;
}

function jsonPatchPathConverter(stringPath) {
return stringPath.split('/').slice(1);
}

function prototypeCheck(prop) {
// coercion is intentional to catch prop values like `['__proto__']`
if (prop == '__proto__' || prop == 'constructor' || prop == 'prototype') {
throw new Error('setting of prototype values not supported');
}
}
Loading