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

deps updates #5795

Merged
merged 7 commits into from Nov 2, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions node_modules/.gitignore
Expand Up @@ -157,6 +157,7 @@
/node-gyp/node_modules/@npmcli/*
!/node-gyp/node_modules/@npmcli/fs
!/node-gyp/node_modules/@npmcli/move-file
!/node-gyp/node_modules/abbrev
!/node-gyp/node_modules/are-we-there-yet
!/node-gyp/node_modules/brace-expansion
!/node-gyp/node_modules/cacache
Expand Down
8 changes: 4 additions & 4 deletions node_modules/@npmcli/ci-detect/package.json
@@ -1,6 +1,6 @@
{
"name": "@npmcli/ci-detect",
"version": "3.0.0",
"version": "3.0.1",
"description": "Detect what kind of CI environment the program is in",
"author": "GitHub Inc.",
"license": "ISC",
Expand All @@ -22,8 +22,8 @@
]
},
"devDependencies": {
"@npmcli/eslint-config": "^3.0.1",
"@npmcli/template-oss": "4.4.4",
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/template-oss": "4.6.2",
"tap": "^16.0.1"
},
"files": [
Expand All @@ -39,6 +39,6 @@
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"version": "4.4.4"
"version": "4.6.2"
}
}
50 changes: 50 additions & 0 deletions node_modules/abbrev/lib/index.js
@@ -0,0 +1,50 @@
module.exports = abbrev

function abbrev (...args) {
let list = args.length === 1 || Array.isArray(args[0]) ? args[0] : args

for (let i = 0, l = list.length; i < l; i++) {
list[i] = typeof list[i] === 'string' ? list[i] : String(list[i])
}

// sort them lexicographically, so that they're next to their nearest kin
list = list.sort(lexSort)

// walk through each, seeing how much it has in common with the next and previous
const abbrevs = {}
let prev = ''
for (let ii = 0, ll = list.length; ii < ll; ii++) {
const current = list[ii]
const next = list[ii + 1] || ''
let nextMatches = true
let prevMatches = true
if (current === next) {
continue
}
let j = 0
const cl = current.length
for (; j < cl; j++) {
const curChar = current.charAt(j)
nextMatches = nextMatches && curChar === next.charAt(j)
prevMatches = prevMatches && curChar === prev.charAt(j)
if (!nextMatches && !prevMatches) {
j++
break
}
}
prev = current
if (j === cl) {
abbrevs[current] = current
continue
}
for (let a = current.slice(0, j); j <= cl; j++) {
abbrevs[a] = current
a += current.charAt(j)
}
}
return abbrevs
}

function lexSort (a, b) {
return a === b ? 0 : a > b ? 1 : -1
}
44 changes: 33 additions & 11 deletions node_modules/abbrev/package.json
@@ -1,21 +1,43 @@
{
"name": "abbrev",
"version": "1.1.1",
"version": "2.0.0",
"description": "Like ruby's abbrev module, but in js",
"author": "Isaac Z. Schlueter <i@izs.me>",
"main": "abbrev.js",
"author": "GitHub Inc.",
"main": "lib/index.js",
"scripts": {
"test": "tap test.js --100",
"preversion": "npm test",
"postversion": "npm publish",
"postpublish": "git push origin --all; git push origin --tags"
"test": "tap",
"lint": "eslint \"**/*.js\"",
"postlint": "template-oss-check",
"template-oss-apply": "template-oss-apply --force",
"lintfix": "npm run lint -- --fix",
"snap": "tap",
"posttest": "npm run lint"
},
"repository": {
"type": "git",
"url": "https://github.com/npm/abbrev-js.git"
},
"repository": "http://github.com/isaacs/abbrev-js",
"license": "ISC",
"devDependencies": {
"tap": "^10.1"
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/template-oss": "4.8.0",
"tap": "^16.3.0"
},
"tap": {
"nyc-arg": [
"--exclude",
"tap-snapshots/**"
]
},
"files": [
"abbrev.js"
]
"bin/",
"lib/"
],
"engines": {
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"version": "4.8.0"
}
}
2 changes: 1 addition & 1 deletion node_modules/cli-table3/package.json
@@ -1,6 +1,6 @@
{
"name": "cli-table3",
"version": "0.6.2",
"version": "0.6.3",
"description": "Pretty unicode tables for the command line. Based on the original cli-table.",
"main": "index.js",
"types": "index.d.ts",
Expand Down
7 changes: 5 additions & 2 deletions node_modules/cli-table3/src/cell.js
Expand Up @@ -73,7 +73,9 @@ class Cell {
}

computeLines(tableOptions) {
if (this.fixedWidth && (tableOptions.wordWrap || tableOptions.textWrap)) {
const tableWordWrap = tableOptions.wordWrap || tableOptions.textWrap;
const { wordWrap = tableWordWrap } = this.options;
if (this.fixedWidth && wordWrap) {
this.fixedWidth -= this.paddingLeft + this.paddingRight;
if (this.colSpan) {
let i = 1;
Expand All @@ -82,7 +84,8 @@ class Cell {
i++;
}
}
const { wrapOnWordBoundary = true } = tableOptions;
const { wrapOnWordBoundary: tableWrapOnWordBoundary = true } = tableOptions;
const { wrapOnWordBoundary = tableWrapOnWordBoundary } = this.options;
return this.wrapLines(utils.wordWrap(this.fixedWidth, this.content, wrapOnWordBoundary));
}
return this.wrapLines(this.content.split('\n'));
Expand Down
96 changes: 96 additions & 0 deletions node_modules/fastest-levenshtein/bench.js
@@ -0,0 +1,96 @@
"use strict";
exports.__esModule = true;
/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable no-console */
var Benchmark = require("benchmark");
var mod_js_1 = require("./mod.js");
var fast_levenshtein_1 = require("fast-levenshtein");
var fs = require("fs");
var jslevenshtein = require("js-levenshtein");
var leven = require("leven");
var levenshteinEditDistance = require("levenshtein-edit-distance");
var suite = new Benchmark.Suite();
var randomstring = function (length) {
var result = "";
var characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
var charactersLength = characters.length;
for (var i = 0; i < length; i++) {
result += characters.charAt(Math.floor(Math.random() * charactersLength));
}
return result;
};
var randomstringArr = function (stringSize, arraySize) {
var i = 0;
var arr = [];
for (i = 0; i < arraySize; i++) {
arr.push(randomstring(stringSize));
}
return arr;
};
var arrSize = 1000;
if (!fs.existsSync("data.json")) {
var data_1 = [
randomstringArr(4, arrSize),
randomstringArr(8, arrSize),
randomstringArr(16, arrSize),
randomstringArr(32, arrSize),
randomstringArr(64, arrSize),
randomstringArr(128, arrSize),
randomstringArr(256, arrSize),
randomstringArr(512, arrSize),
randomstringArr(1024, arrSize),
];
fs.writeFileSync("data.json", JSON.stringify(data_1));
}
var data = JSON.parse(fs.readFileSync("data.json", "utf8"));
var _loop_1 = function (i) {
var datapick = data[i];
if (process.argv[2] !== "no") {
suite
.add("".concat(i, " - js-levenshtein"), function () {
for (var j = 0; j < arrSize - 1; j += 2) {
jslevenshtein(datapick[j], datapick[j + 1]);
}
})
.add("".concat(i, " - leven"), function () {
for (var j = 0; j < arrSize - 1; j += 2) {
leven(datapick[j], datapick[j + 1]);
}
})
.add("".concat(i, " - fast-levenshtein"), function () {
for (var j = 0; j < arrSize - 1; j += 2) {
(0, fast_levenshtein_1.get)(datapick[j], datapick[j + 1]);
}
})
.add("".concat(i, " - levenshtein-edit-distance"), function () {
for (var j = 0; j < arrSize - 1; j += 2) {
levenshteinEditDistance(datapick[j], datapick[j + 1]);
}
});
}
suite.add("".concat(i, " - fastest-levenshtein"), function () {
for (var j = 0; j < arrSize - 1; j += 2) {
(0, mod_js_1.distance)(datapick[j], datapick[j + 1]);
}
});
};
// BENCHMARKS
for (var i = 0; i < 9; i++) {
_loop_1(i);
}
var results = new Map();
suite
.on("cycle", function (event) {
console.log(String(event.target));
if (results.has(event.target.name[0])) {
results.get(event.target.name[0]).push(event.target.hz);
}
else {
results.set(event.target.name[0], [event.target.hz]);
}
})
.on("complete", function () {
console.log(results);
})
// run async
.run({ async: true });
4 changes: 4 additions & 0 deletions node_modules/fastest-levenshtein/esm/mod.d.ts
@@ -0,0 +1,4 @@
declare const distance: (a: string, b: string) => number;
declare const closest: (str: string, arr: readonly string[]) => string;
export { closest, distance };
//# sourceMappingURL=mod.d.ts.map
1 change: 1 addition & 0 deletions node_modules/fastest-levenshtein/esm/mod.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../mod.ts"],"names":[],"mappings":"AAiHA,QAAA,MAAM,QAAQ,MAAO,MAAM,KAAK,MAAM,KAAG,MAaxC,CAAC;AAEF,QAAA,MAAM,OAAO,QAAS,MAAM,OAAO,SAAS,MAAM,EAAE,KAAG,MAWtD,CAAC;AAEF,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC"}