From eb62d9470b1b1ea975de4eea407d9f35a6974694 Mon Sep 17 00:00:00 2001 From: Marcisbee Date: Tue, 5 Jan 2021 12:27:46 +0200 Subject: [PATCH 1/6] Adds line numbers in output errors --- package.json | 2 +- src/diagnostics/validation-error.js | 4 +- src/diagnostics/warning.js | 4 +- src/index.js | 2 +- src/parser.js | 353 ++++++++++++++++++++++++++++ src/report.js | 14 +- src/utils/get-line-number.js | 10 + src/validate.js | 10 +- src/validate/properties.js | 3 + src/validate/required.js | 3 + 10 files changed, 391 insertions(+), 14 deletions(-) create mode 100644 src/parser.js create mode 100644 src/utils/get-line-number.js diff --git a/package.json b/package.json index dd4a2ec..bf815e9 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "esjson": "bin/esjson.js" }, "scripts": { - "start": "node src/index.js", + "start": "node bin/esjson.js", "lint": "rome check", "test": "uvu", "coverage": "c8 --check-coverage npm test" diff --git a/src/diagnostics/validation-error.js b/src/diagnostics/validation-error.js index ff7ed7b..32c7fec 100644 --- a/src/diagnostics/validation-error.js +++ b/src/diagnostics/validation-error.js @@ -3,13 +3,15 @@ class ValidationError { * @param {string} message * @param {string} code * @param {(string | number)[]=} position + * @param {number=} lineNo * @param {string=} filePath */ - constructor(message, code, position = [], filePath = null) { + constructor(message, code, position = [], filePath = null, lineNo = null) { this.message = message; this.position = position; this.code = code; this.path = filePath; + this.lineNo = lineNo; } } diff --git a/src/diagnostics/warning.js b/src/diagnostics/warning.js index 0f9e523..272270b 100644 --- a/src/diagnostics/warning.js +++ b/src/diagnostics/warning.js @@ -3,13 +3,15 @@ class Warning extends Error { * @param {string} message * @param {string} code * @param {(string | number)[]} position + * @param {number=} lineNo * @param {string=} path */ - constructor(message, code, position, path) { + constructor(message, code, position, path, lineNo = null) { super(message); this.code = code; this.position = position; this.path = path; + this.lineNo = lineNo; } } diff --git a/src/index.js b/src/index.js index 07b1de0..4b14318 100644 --- a/src/index.js +++ b/src/index.js @@ -24,7 +24,7 @@ const defaultConfig = { /** * @typedef Context * @property {(json: *, position: (string | number)[], currentSchema?: *) => void} validateSchema - * @property {(message: string, code: string, position: (string | number)[], ref?: Ref) => (import('./diagnostics/validation-error') | Warning | Error)} error + * @property {(message: string, code: string, position: (string | number)[], ref?: Ref, lineNo?: number) => (import('./diagnostics/validation-error') | Warning | Error)} error * @property {(import('./diagnostics/validation-error') | Warning | Diagnostics | Error)[]} errors * @property {Record} schema * @property {Record} config diff --git a/src/parser.js b/src/parser.js new file mode 100644 index 0000000..c5daa63 --- /dev/null +++ b/src/parser.js @@ -0,0 +1,353 @@ +/** + * @param {...any} args + * @returns {any} + */ +function nullishCoalescing(...args) { + for (let arg of args) { + if (arg === null || arg === undefined) { + continue; + } + + return arg; + } +} + +/** + * @param {string} str + * @returns {JSON} + */ +module.exports = function parseJSON(str) { + let lineNo = 0; + let i = 0; + + const value = parseValue(); + expectEndOfInput(); + return value; + + function parseObject() { + if (str[i] === "{") { + const startingLineNo = lineNo + 1; + i++; + skipWhitespace(); + + const result = {}; + + let initial = true; + // if it is not '}', + // we take the path of string -> whitespace -> ':' -> value -> ... + while (i < str.length && str[i] !== "}") { + if (!initial) { + eatComma(); + skipWhitespace(); + } + if (initial) { + Object.defineProperty( + result, + '__line_no', + { + value: lineNo, + writable: false, + }, + ); + } + const key = parseString(); + if (key === undefined) { + expectObjectKey(); + } + skipWhitespace(); + eatColon(); + const line = lineNo; + const value = parseValue(); + result[key] = value; + Object.defineProperty( + result, + `__line_no:${key}`, + { + value: line, + writable: false, + }, + ); + initial = false; + } + + if (initial) { + Object.defineProperty( + result, + '__line_no', + { + value: startingLineNo, + writable: false, + }, + ); + } + + expectNotEndOfInput("}"); + // move to the next character of '}' + i++; + + return result; + } + } + + function parseArray() { + if (str[i] === "[") { + i++; + skipWhitespace(); + + const result = []; + let initial = true; + while (i < str.length && str[i] !== "]") { + if (!initial) { + eatComma(); + } + const line = lineNo; + const value = parseValue(); + result.push(value); + Object.defineProperty( + result, + `__line_no:${result.length - 1}`, + { + value: line, + writable: false, + }, + ); + initial = false; + } + expectNotEndOfInput("]"); + // move to the next character of ']' + i++; + return result; + } + } + + function parseValue() { + skipWhitespace(); + const value = nullishCoalescing( + parseString(), + parseNumber(), + parseObject(), + parseArray(), + parseKeyword("true", true), + parseKeyword("false", false), + parseKeyword("null", null), + ); + skipWhitespace(); + return value; + } + + function parseKeyword(name, value) { + if (str.slice(i, i + name.length) === name) { + i += name.length; + return value; + } + } + + function skipWhitespace() { + while ( + str[i] === " " || + str[i] === "\n" || + str[i] === "\t" || + str[i] === "\r" + ) { + if (str[i] === "\r" || str[i] === "\n") { + lineNo++; + } + i++; + } + } + + function parseString() { + if (str[i] === '"') { + i++; + let result = ""; + while (i < str.length && str[i] !== '"') { + if (str[i] === "\\") { + const char = str[i + 1]; + if ( + char === '"' || + char === "\\" || + char === "/" || + char === "b" || + char === "f" || + char === "n" || + char === "r" || + char === "t" + ) { + result += char; + i++; + } else if (char === "u") { + if ( + isHexadecimal(str[i + 2]) && + isHexadecimal(str[i + 3]) && + isHexadecimal(str[i + 4]) && + isHexadecimal(str[i + 5]) + ) { + result += String.fromCharCode( + parseInt(str.slice(i + 2, i + 6), 16), + ); + i += 5; + } else { + i += 2; + expectEscapeUnicode(result); + } + } else { + expectEscapeCharacter(result); + } + } else { + result += str[i]; + } + i++; + } + expectNotEndOfInput('"'); + i++; + return result; + } + } + + function isHexadecimal(char) { + return ( + (char >= "0" && char <= "9") || + (char.toLowerCase() >= "a" && char.toLowerCase() <= "f") + ); + } + + function parseNumber() { + let start = i; + if (str[i] === "-") { + i++; + expectDigit(str.slice(start, i)); + } + if (str[i] === "0") { + i++; + } else if (str[i] >= "1" && str[i] <= "9") { + i++; + while (str[i] >= "0" && str[i] <= "9") { + i++; + } + } + + if (str[i] === ".") { + i++; + expectDigit(str.slice(start, i)); + while (str[i] >= "0" && str[i] <= "9") { + i++; + } + } + if (str[i] === "e" || str[i] === "E") { + i++; + if (str[i] === "-" || str[i] === "+") { + i++; + } + expectDigit(str.slice(start, i)); + while (str[i] >= "0" && str[i] <= "9") { + i++; + } + } + if (i > start) { + return Number(str.slice(start, i)); + } + } + + function eatComma() { + expectCharacter(","); + i++; + } + + function eatColon() { + expectCharacter(":"); + i++; + } + + // error handling + function expectNotEndOfInput(expected) { + if (i === str.length) { + printCodeSnippet(`Expecting a \`${expected}\` here`); + throw new Error("JSON_ERROR_0001 Unexpected End of Input"); + } + } + + function expectEndOfInput() { + if (i < str.length) { + printCodeSnippet("Expecting to end here"); + throw new Error("JSON_ERROR_0002 Expected End of Input"); + } + } + + function expectObjectKey() { + printCodeSnippet( + `Expecting object key here + +For example: +{ "foo": "bar" } + ^^^^^`, + ); + throw new Error("JSON_ERROR_0003 Expecting JSON Key"); + } + + function expectCharacter(expected) { + if (str[i] !== expected) { + printCodeSnippet(`Expecting a \`${expected}\` here`); + throw new Error("JSON_ERROR_0004 Unexpected token"); + } + } + + /** + * @param {string} numSoFar + */ + function expectDigit(numSoFar) { + if (!(str[i] >= "0" && str[i] <= "9")) { + printCodeSnippet( + `JSON_ERROR_0005 Expecting a digit here + +For example: +${numSoFar}5 +${" ".repeat(numSoFar.length)}^`, + ); + throw new Error("JSON_ERROR_0006 Expecting a digit"); + } + } + + /** + * @param {string} strSoFar + */ + function expectEscapeCharacter(strSoFar) { + printCodeSnippet( + `JSON_ERROR_0007 Expecting escape character + +For example: +"${strSoFar}\\n" +${" ".repeat(strSoFar.length + 1)}^^ +List of escape characters are: \\", \\\\, \\/, \\b, \\f, \\n, \\r, \\t, \\u`, + ); + throw new Error("JSON_ERROR_0008 Expecting an escape character"); + } + + /** + * @param {string} strSoFar + */ + function expectEscapeUnicode(strSoFar) { + printCodeSnippet( + `Expect escape unicode + +For example: +"${strSoFar}\\u0123 +${" ".repeat(strSoFar.length + 1)}^^^^^^`, + ); + throw new Error("JSON_ERROR_0009 Expecting an escape unicode"); + } + + /** + * @param {string} message + */ + function printCodeSnippet(message) { + const from = Math.max(0, i - 10); + const trimmed = from > 0; + const padding = (trimmed ? 4 : 0) + (i - from); + const snippet = [ + (trimmed ? "... " : "") + str.slice(from, i + 1), + `${" ".repeat(padding)}^`, + " ".repeat(padding) + message, + ].join("\n"); + console.log(snippet); + } +}; diff --git a/src/report.js b/src/report.js index eeb9fe7..837cd4f 100644 --- a/src/report.js +++ b/src/report.js @@ -11,15 +11,17 @@ const plural = require("./utils/plural"); */ function report(params) { if (params instanceof Warning) { - return ` ${yellow("warning")} ${params.message} ${dim( - `#/${params.position.join("/")}`, - )}`; + const position = params.lineNo === null + ? dim(`#/${params.position.join("/")}`) + : dim(`on line ${params.lineNo}`); + return ` ${yellow("warning")} ${params.message} ${position}`; } if (params instanceof ValidationError) { - return ` ${red("error")} ${params.message} ${dim( - `#/${params.position.join("/")}`, - )}`; + const position = params.lineNo === null + ? dim(`#/${params.position.join("/")}`) + : dim(`on line ${params.lineNo}`); + return ` ${red("error")} ${params.message} ${position}`; } if (params instanceof Error) { diff --git a/src/utils/get-line-number.js b/src/utils/get-line-number.js new file mode 100644 index 0000000..a266e51 --- /dev/null +++ b/src/utils/get-line-number.js @@ -0,0 +1,10 @@ +/** + * @param {JSON} object + * @param {string} key + * @returns {number | undefined} + */ +function getLineNumber(object, key) { + return object[`__line_no:${key}`] || object['__line_no']; +} + +module.exports = getLineNumber; diff --git a/src/validate.js b/src/validate.js index 5063d40..b37bbf6 100644 --- a/src/validate.js +++ b/src/validate.js @@ -2,6 +2,7 @@ const ValidationError = require("./diagnostics/validation-error"); const Warning = require("./diagnostics/warning"); const isInRuleset = require("./utils/is-in-ruleset"); const validateSchema = require("./validate/schema"); +const parseJSON = require("./parser"); /** * @param {string} filePath @@ -11,7 +12,8 @@ const validateSchema = require("./validate/schema"); * @param {(string | number)[]} position */ function validate(filePath, fileContents, schema, config, position = []) { - const json = JSON.parse(fileContents); + // const json = JSON.parse(fileContents); + const json = parseJSON(fileContents); const isEmpty = !fileContents.trim() || (json && Object.keys(json).length === 0); @@ -29,7 +31,7 @@ function validate(filePath, fileContents, schema, config, position = []) { schema, config, errors: [], - error(message, code, pos, ref) { + error(message, code, pos, ref, lineNo) { if ( ref && this.config.allow && @@ -37,7 +39,7 @@ function validate(filePath, fileContents, schema, config, position = []) { ((ref.definition && this.config.allow[code][ref.key] === ref.definition) || this.config.allow[code][ref.key] === true) ) { - const warning = new Warning(message, code, pos); + const warning = new Warning(message, code, pos, undefined, lineNo); if (this.shallow) { throw warning; @@ -48,7 +50,7 @@ function validate(filePath, fileContents, schema, config, position = []) { return warning; } - const error = new ValidationError(message, code, pos); + const error = new ValidationError(message, code, pos, undefined, lineNo); if (this.shallow) { throw error; diff --git a/src/validate/properties.js b/src/validate/properties.js index df3058e..837fa6b 100644 --- a/src/validate/properties.js +++ b/src/validate/properties.js @@ -1,3 +1,5 @@ +const getLineNumber = require('../utils/get-line-number'); + /** * @this {import('src').Context} * @param {*} object @@ -21,6 +23,7 @@ function validateProperties(object, currentSchema, position) { key, definition: currentSchema.title, }, + getLineNumber(object, key), ); } diff --git a/src/validate/required.js b/src/validate/required.js index b412eb5..ccaa036 100644 --- a/src/validate/required.js +++ b/src/validate/required.js @@ -1,3 +1,5 @@ +const getLineNumber = require('../utils/get-line-number'); + /** * @this {import('src').Context} * @param {*} object @@ -15,6 +17,7 @@ function validateRequired(object, currentSchema, position) { key, definition: currentSchema.title, }, + getLineNumber(object, key), ); } } From cb292670cde82c01715e6382bafe93f84279c7d9 Mon Sep 17 00:00:00 2001 From: Marcis Bergmanis Date: Thu, 4 Feb 2021 09:43:17 +0200 Subject: [PATCH 2/6] fix tests --- package-lock.json | 758 +++++++++++++++++++++++++++- package.json | 2 +- src/parser.js | 2 + tests/additional-properties.test.js | 4 +- tests/properties.test.js | 2 +- tests/required.test.js | 16 +- 6 files changed, 770 insertions(+), 14 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1d3fb22..9bb7689 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,8 +1,762 @@ { "name": "esjson", - "version": "0.8.0", - "lockfileVersion": 1, + "version": "1.0.0", + "lockfileVersion": 2, "requires": true, + "packages": { + "": { + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "arg": "^4.1.3", + "colorette": "^1.2.1" + }, + "bin": { + "esjson": "bin/esjson.js" + }, + "devDependencies": { + "c8": "^7.3.5", + "rome": "^10.0.4-beta", + "uvu": "^0.4.1" + } + }, + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.2.tgz", + "integrity": "sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@types/is-windows": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@types/is-windows/-/is-windows-1.0.0.tgz", + "integrity": "sha512-tJ1rq04tGKuIJoWIH0Gyuwv4RQ3+tIu7wQrC0MV47raQ44kIzXSSFKfrxFUOWVRvesoF7mrTqigXmqoZJsXwTg==", + "dev": true + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz", + "integrity": "sha512-sz7iLqvVUg1gIedBOvlkxPlc8/uVzyS5OwGz1cKjXzkl3FpL3al0crU8YGU1WoHkxn0Wxbw5tyi6hvzJKNzFsw==", + "dev": true + }, + "node_modules/ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" + }, + "node_modules/balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/c8": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/c8/-/c8-7.3.5.tgz", + "integrity": "sha512-VNiZoxnInBJLW8uUuyLkiqMKWh1OAsYS+DjWsMhvcrfGPrVx3vwqD9627/7ZhFSF86MCBINDi+PD6Midw0KHRg==", + "dev": true, + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@istanbuljs/schema": "^0.1.2", + "find-up": "^5.0.0", + "foreground-child": "^2.0.0", + "furi": "^2.0.0", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-reports": "^3.0.2", + "rimraf": "^3.0.0", + "test-exclude": "^6.0.0", + "v8-to-istanbul": "^7.0.0", + "yargs": "^16.0.0", + "yargs-parser": "^20.0.0" + }, + "bin": { + "c8": "bin/c8.js" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/colorette": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.1.tgz", + "integrity": "sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw==" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "node_modules/convert-source-map": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.1" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/dequal": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.2.tgz", + "integrity": "sha512-q9K8BlJVxK7hQYqa6XISGmBZbtQQWVXSrRrWreHC94rMt1QL/Impruc+7p2CYSYuVIUr+YCt6hjrs1kkdJRTug==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/foreground-child": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", + "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "node_modules/furi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/furi/-/furi-2.0.0.tgz", + "integrity": "sha512-uKuNsaU0WVaK/vmvj23wW1bicOFfyqSsAIH71bRZx8kA4Xj+YCHin7CJKJJjkIsmxYaPFLk9ljmjEyB7xF7WvQ==", + "dev": true, + "dependencies": { + "@types/is-windows": "^1.0.0", + "is-windows": "^1.0.2" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", + "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "dev": true, + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^3.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-reports": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz", + "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==", + "dev": true, + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/kleur": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.3.tgz", + "integrity": "sha512-H1tr8QP2PxFTNwAFM74Mui2b6ovcY9FoxJefgrwxY+OCJcq01k5nvhf4M/KnizzrJvLRap5STUy7dgDV35iUBw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/mri": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/mri/-/mri-1.1.6.tgz", + "integrity": "sha512-oi1b3MfbyGa7FJMP9GmLTttni5JoICpYBRlq+x5V16fZbLsnL9N3wFqqIm/nIG43FjUFkFh9Epzp/kzUGUnJxQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/p-limit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.0.2.tgz", + "integrity": "sha512-iwqZSOoWIW+Ew4kAGUlN16J4M7OB3ysMLSZtnhmqx7njIHFPlxWBX8xo3lVTyFVq6mI/lL9qt2IsN1sHwaxJkg==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/rome": { + "version": "10.0.4-beta", + "resolved": "https://registry.npmjs.org/rome/-/rome-10.0.4-beta.tgz", + "integrity": "sha512-wDD/ZdImSt7Cg1/u3TxIBjIs56tEhPmXV/Rry1nExV+RogaLaF1IXTUbYNXDFzXBk9fEg+gnBovkY4WN/f41WQ==", + "dev": true, + "hasInstallScript": true, + "bin": { + "rome": "bin/rome/index.js" + }, + "engines": { + "node": ">=12.8.1" + } + }, + "node_modules/sade": { + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/sade/-/sade-1.7.4.tgz", + "integrity": "sha512-y5yauMD93rX840MwUJr7C1ysLFBgMspsdTo4UVrDg3fXDvtwOyIqykhVAAm6fk/3au77773itJStObgK+LKaiA==", + "dev": true, + "dependencies": { + "mri": "^1.1.0" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", + "dev": true + }, + "node_modules/source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/totalist": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/totalist/-/totalist-2.0.0.tgz", + "integrity": "sha512-+Y17F0YzxfACxTyjfhnJQEe7afPA0GSpYlFkl2VFMxYP7jshQf9gXV7cH47EfToBumFThfKBvfAcoUn6fdNeRQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/uvu": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/uvu/-/uvu-0.4.1.tgz", + "integrity": "sha512-JgAGSdts0VawIRPpnG4t1G5O0RoSrkJZTvTH+iSrFrlsJq9w12hksrfvd8wHIVAw/215T7WfQalCwYa3vN8tTA==", + "dev": true, + "dependencies": { + "dequal": "^2.0.0", + "diff": "^4.0.2", + "kleur": "^4.0.3", + "sade": "^1.7.3", + "totalist": "^2.0.0" + }, + "bin": { + "uvu": "bin.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/v8-to-istanbul": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-7.0.0.tgz", + "integrity": "sha512-fLL2rFuQpMtm9r8hrAV2apXX/WqHJ6+IC4/eQVdMDGBUgH/YMV4Gv3duk3kjmyg6uiQWBAA9nJwue4iJUOkHeA==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^1.6.0", + "source-map": "^0.7.3" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "node_modules/y18n": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.5.tgz", + "integrity": "sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs": { + "version": "16.1.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.1.0.tgz", + "integrity": "sha512-upWFJOmDdHN0syLuESuvXDmrRcWd1QafJolHskzaw79uZa7/x53gxQKiR07W59GWY1tFhhU/Th9DrtSfpS782g==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.2", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "dev": true, + "engines": { + "node": ">=10" + } + } + }, "dependencies": { "@bcoe/v8-coverage": { "version": "0.2.3", diff --git a/package.json b/package.json index bf815e9..a977d18 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "esjson", - "version": "0.9.0", + "version": "1.0.0", "description": "JSON Schema validator (cli)", "main": "src/index.js", "bin": { diff --git a/src/parser.js b/src/parser.js index c5daa63..03e8e6d 100644 --- a/src/parser.js +++ b/src/parser.js @@ -10,6 +10,8 @@ function nullishCoalescing(...args) { return arg; } + + return null; } /** diff --git a/tests/additional-properties.test.js b/tests/additional-properties.test.js index fac8446..3c422a4 100644 --- a/tests/additional-properties.test.js +++ b/tests/additional-properties.test.js @@ -112,10 +112,10 @@ test("throws error with extra property in object and `additionalProperties` set additionalProperties: false, }; - const errors = output('{"asd": 123}', customSchema, userConfig); + const errors = output('{\n"asd": 123\n}', customSchema, userConfig); assert.equal(errors, [ - new ValidationError('Property "asd" is not allowed', "additionalProperties", []) + new ValidationError('Property "asd" is not allowed', "additionalProperties", [], undefined, 1) ]); }); diff --git a/tests/properties.test.js b/tests/properties.test.js index 8040659..56d0d39 100644 --- a/tests/properties.test.js +++ b/tests/properties.test.js @@ -61,7 +61,7 @@ test("throws error with invalid productId", () => { ]); }); -test("throws error with invalid productId", () => { +test("throws error with invalid productName", () => { const errors = output('{"productName": null}', schema, userConfig); assert.equal(errors, [ diff --git a/tests/required.test.js b/tests/required.test.js index 2191e20..8ac07f3 100644 --- a/tests/required.test.js +++ b/tests/required.test.js @@ -31,8 +31,8 @@ test("throws error with empty object", () => { const errors = output("{}", schema, userConfig); assert.equal(errors, [ - new ValidationError('Missing required key "productId"', "required", []), - new ValidationError('Missing required key "productName"', "required", []) + new ValidationError('Missing required key "productId"', "required", [], undefined, 1), + new ValidationError('Missing required key "productName"', "required", [], undefined, 1) ]); }); @@ -40,15 +40,15 @@ test("throws error with valid productId", () => { const errors = output('{"productId": 123}', schema, userConfig); assert.equal(errors, [ - new ValidationError('Missing required key "productName"', "required", []) + new ValidationError('Missing required key "productName"', "required", [], undefined, 0) ]); }); test("throws error with valid productName", () => { - const errors = output('{"productName": "asd"}', schema, userConfig); + const errors = output('{\n"productName": "asd"\n}', schema, userConfig); assert.equal(errors, [ - new ValidationError('Missing required key "productId"', "required", []) + new ValidationError('Missing required key "productId"', "required", [], undefined, 1) ]); }); @@ -62,16 +62,16 @@ test("throws error with invalid productId", () => { const errors = output('{"productId": null}', schema, userConfig); assert.equal(errors, [ - new ValidationError('Missing required key "productName"', "required", []), + new ValidationError('Missing required key "productName"', "required", [], undefined, 0), new ValidationError('"null" should be number', "type", ["productId"]) ]); }); -test("throws error with invalid productId", () => { +test("throws error with invalid productName", () => { const errors = output('{"productName": null}', schema, userConfig); assert.equal(errors, [ - new ValidationError('Missing required key "productId"', "required", []), + new ValidationError('Missing required key "productId"', "required", [], undefined, 0), new ValidationError('"null" should be string', "type", ["productName"]) ]); }); From 0009728ee671ed96341508e51a34be21b8f30001 Mon Sep 17 00:00:00 2001 From: Marcis Bergmanis Date: Thu, 4 Feb 2021 09:43:46 +0200 Subject: [PATCH 3/6] lint fixes --- src/parser.js | 4 ++-- src/report.js | 14 ++++++++------ src/utils/get-line-number.js | 2 +- src/validate/properties.js | 2 +- src/validate/required.js | 2 +- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/parser.js b/src/parser.js index 03e8e6d..5f2a698 100644 --- a/src/parser.js +++ b/src/parser.js @@ -45,7 +45,7 @@ module.exports = function parseJSON(str) { if (initial) { Object.defineProperty( result, - '__line_no', + "__line_no", { value: lineNo, writable: false, @@ -75,7 +75,7 @@ module.exports = function parseJSON(str) { if (initial) { Object.defineProperty( result, - '__line_no', + "__line_no", { value: startingLineNo, writable: false, diff --git a/src/report.js b/src/report.js index 837cd4f..daa141e 100644 --- a/src/report.js +++ b/src/report.js @@ -11,16 +11,18 @@ const plural = require("./utils/plural"); */ function report(params) { if (params instanceof Warning) { - const position = params.lineNo === null - ? dim(`#/${params.position.join("/")}`) - : dim(`on line ${params.lineNo}`); + const position = + params.lineNo === null + ? dim(`#/${params.position.join("/")}`) + : dim(`on line ${params.lineNo}`); return ` ${yellow("warning")} ${params.message} ${position}`; } if (params instanceof ValidationError) { - const position = params.lineNo === null - ? dim(`#/${params.position.join("/")}`) - : dim(`on line ${params.lineNo}`); + const position = + params.lineNo === null + ? dim(`#/${params.position.join("/")}`) + : dim(`on line ${params.lineNo}`); return ` ${red("error")} ${params.message} ${position}`; } diff --git a/src/utils/get-line-number.js b/src/utils/get-line-number.js index a266e51..4fb535a 100644 --- a/src/utils/get-line-number.js +++ b/src/utils/get-line-number.js @@ -4,7 +4,7 @@ * @returns {number | undefined} */ function getLineNumber(object, key) { - return object[`__line_no:${key}`] || object['__line_no']; + return object[`__line_no:${key}`] || object["__line_no"]; } module.exports = getLineNumber; diff --git a/src/validate/properties.js b/src/validate/properties.js index 837fa6b..df7eaa2 100644 --- a/src/validate/properties.js +++ b/src/validate/properties.js @@ -1,4 +1,4 @@ -const getLineNumber = require('../utils/get-line-number'); +const getLineNumber = require("../utils/get-line-number"); /** * @this {import('src').Context} diff --git a/src/validate/required.js b/src/validate/required.js index ccaa036..36060a7 100644 --- a/src/validate/required.js +++ b/src/validate/required.js @@ -1,4 +1,4 @@ -const getLineNumber = require('../utils/get-line-number'); +const getLineNumber = require("../utils/get-line-number"); /** * @this {import('src').Context} From 2fc56f3dd22d5c23fdffa31ef98853795dc44c86 Mon Sep 17 00:00:00 2001 From: Marcis Bergmanis Date: Thu, 4 Feb 2021 09:47:23 +0200 Subject: [PATCH 4/6] update rome --- package-lock.json | 132 ++++++++++++++++++++++++++++------------------ 1 file changed, 81 insertions(+), 51 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9bb7689..2ce1c1d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -66,6 +66,9 @@ }, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/arg": { @@ -90,9 +93,9 @@ } }, "node_modules/c8": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/c8/-/c8-7.3.5.tgz", - "integrity": "sha512-VNiZoxnInBJLW8uUuyLkiqMKWh1OAsYS+DjWsMhvcrfGPrVx3vwqD9627/7ZhFSF86MCBINDi+PD6Midw0KHRg==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/c8/-/c8-7.5.0.tgz", + "integrity": "sha512-GSkLsbvDr+FIwjNSJ8OwzWAyuznEYGTAd1pzb/Kr0FMLuV4vqYJTyjboDTwmlUNAG6jAU3PFWzqIdKrOt1D8tw==", "dev": true, "dependencies": { "@bcoe/v8-coverage": "^0.2.3", @@ -105,7 +108,7 @@ "istanbul-reports": "^3.0.2", "rimraf": "^3.0.0", "test-exclude": "^6.0.0", - "v8-to-istanbul": "^7.0.0", + "v8-to-istanbul": "^7.1.0", "yargs": "^16.0.0", "yargs-parser": "^20.0.0" }, @@ -223,6 +226,9 @@ }, "engines": { "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/foreground-child": { @@ -278,6 +284,9 @@ }, "engines": { "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/has-flag": { @@ -372,9 +381,9 @@ } }, "node_modules/kleur": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.3.tgz", - "integrity": "sha512-H1tr8QP2PxFTNwAFM74Mui2b6ovcY9FoxJefgrwxY+OCJcq01k5nvhf4M/KnizzrJvLRap5STUy7dgDV35iUBw==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.4.tgz", + "integrity": "sha512-8QADVssbrFjivHWQU7KkMgptGTl6WAcSdlbBPY4uNF+mWr6DGcKrvY2w4FQJoXch7+fKMjj0dRrL75vk3k23OA==", "dev": true, "engines": { "node": ">=6" @@ -390,6 +399,9 @@ }, "engines": { "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/make-dir": { @@ -402,6 +414,9 @@ }, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/minimatch": { @@ -435,15 +450,18 @@ } }, "node_modules/p-limit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.0.2.tgz", - "integrity": "sha512-iwqZSOoWIW+Ew4kAGUlN16J4M7OB3ysMLSZtnhmqx7njIHFPlxWBX8xo3lVTyFVq6mI/lL9qt2IsN1sHwaxJkg==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "dependencies": { - "p-try": "^2.0.0" + "yocto-queue": "^0.1.0" }, "engines": { "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-locate": { @@ -456,15 +474,9 @@ }, "engines": { "node": ">=10" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "engines": { - "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/path-exists": { @@ -513,6 +525,9 @@ }, "bin": { "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/rome": { @@ -672,9 +687,9 @@ } }, "node_modules/v8-to-istanbul": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-7.0.0.tgz", - "integrity": "sha512-fLL2rFuQpMtm9r8hrAV2apXX/WqHJ6+IC4/eQVdMDGBUgH/YMV4Gv3duk3kjmyg6uiQWBAA9nJwue4iJUOkHeA==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-7.1.0.tgz", + "integrity": "sha512-uXUVqNUCLa0AH1vuVxzi+MI4RfxEOKt9pBgKwHbgH7st8Kv2P1m+jvWNnektzBh5QShF3ODgKmUFCf38LnVz1g==", "dev": true, "dependencies": { "@types/istanbul-lib-coverage": "^2.0.1", @@ -712,6 +727,9 @@ }, "engines": { "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, "node_modules/wrappy": { @@ -730,9 +748,9 @@ } }, "node_modules/yargs": { - "version": "16.1.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.1.0.tgz", - "integrity": "sha512-upWFJOmDdHN0syLuESuvXDmrRcWd1QafJolHskzaw79uZa7/x53gxQKiR07W59GWY1tFhhU/Th9DrtSfpS782g==", + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, "dependencies": { "cliui": "^7.0.2", @@ -740,7 +758,7 @@ "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.0", - "y18n": "^5.0.2", + "y18n": "^5.0.5", "yargs-parser": "^20.2.2" }, "engines": { @@ -755,6 +773,18 @@ "engines": { "node": ">=10" } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } }, "dependencies": { @@ -819,9 +849,9 @@ } }, "c8": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/c8/-/c8-7.3.5.tgz", - "integrity": "sha512-VNiZoxnInBJLW8uUuyLkiqMKWh1OAsYS+DjWsMhvcrfGPrVx3vwqD9627/7ZhFSF86MCBINDi+PD6Midw0KHRg==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/c8/-/c8-7.5.0.tgz", + "integrity": "sha512-GSkLsbvDr+FIwjNSJ8OwzWAyuznEYGTAd1pzb/Kr0FMLuV4vqYJTyjboDTwmlUNAG6jAU3PFWzqIdKrOt1D8tw==", "dev": true, "requires": { "@bcoe/v8-coverage": "^0.2.3", @@ -834,7 +864,7 @@ "istanbul-reports": "^3.0.2", "rimraf": "^3.0.0", "test-exclude": "^6.0.0", - "v8-to-istanbul": "^7.0.0", + "v8-to-istanbul": "^7.1.0", "yargs": "^16.0.0", "yargs-parser": "^20.0.0" } @@ -1050,9 +1080,9 @@ } }, "kleur": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.3.tgz", - "integrity": "sha512-H1tr8QP2PxFTNwAFM74Mui2b6ovcY9FoxJefgrwxY+OCJcq01k5nvhf4M/KnizzrJvLRap5STUy7dgDV35iUBw==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.4.tgz", + "integrity": "sha512-8QADVssbrFjivHWQU7KkMgptGTl6WAcSdlbBPY4uNF+mWr6DGcKrvY2w4FQJoXch7+fKMjj0dRrL75vk3k23OA==", "dev": true }, "locate-path": { @@ -1098,12 +1128,12 @@ } }, "p-limit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.0.2.tgz", - "integrity": "sha512-iwqZSOoWIW+Ew4kAGUlN16J4M7OB3ysMLSZtnhmqx7njIHFPlxWBX8xo3lVTyFVq6mI/lL9qt2IsN1sHwaxJkg==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "requires": { - "p-try": "^2.0.0" + "yocto-queue": "^0.1.0" } }, "p-locate": { @@ -1115,12 +1145,6 @@ "p-limit": "^3.0.2" } }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, "path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -1268,9 +1292,9 @@ } }, "v8-to-istanbul": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-7.0.0.tgz", - "integrity": "sha512-fLL2rFuQpMtm9r8hrAV2apXX/WqHJ6+IC4/eQVdMDGBUgH/YMV4Gv3duk3kjmyg6uiQWBAA9nJwue4iJUOkHeA==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-7.1.0.tgz", + "integrity": "sha512-uXUVqNUCLa0AH1vuVxzi+MI4RfxEOKt9pBgKwHbgH7st8Kv2P1m+jvWNnektzBh5QShF3ODgKmUFCf38LnVz1g==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.1", @@ -1311,9 +1335,9 @@ "dev": true }, "yargs": { - "version": "16.1.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.1.0.tgz", - "integrity": "sha512-upWFJOmDdHN0syLuESuvXDmrRcWd1QafJolHskzaw79uZa7/x53gxQKiR07W59GWY1tFhhU/Th9DrtSfpS782g==", + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, "requires": { "cliui": "^7.0.2", @@ -1321,7 +1345,7 @@ "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.0", - "y18n": "^5.0.2", + "y18n": "^5.0.5", "yargs-parser": "^20.2.2" } }, @@ -1330,6 +1354,12 @@ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", "dev": true + }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true } } } From 0f09d2adba0a62c4a0338eeed9a024cfcdc567e5 Mon Sep 17 00:00:00 2001 From: Marcis Bergmanis Date: Thu, 4 Feb 2021 09:47:50 +0200 Subject: [PATCH 5/6] update uvu --- package-lock.json | 30 +++++++++++++++--------------- package.json | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2ce1c1d..065d9d6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "devDependencies": { "c8": "^7.3.5", "rome": "^10.0.4-beta", - "uvu": "^0.4.1" + "uvu": "^0.5.1" } }, "node_modules/@bcoe/v8-coverage": { @@ -192,9 +192,9 @@ } }, "node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", "dev": true, "engines": { "node": ">=0.3.1" @@ -668,13 +668,13 @@ } }, "node_modules/uvu": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/uvu/-/uvu-0.4.1.tgz", - "integrity": "sha512-JgAGSdts0VawIRPpnG4t1G5O0RoSrkJZTvTH+iSrFrlsJq9w12hksrfvd8wHIVAw/215T7WfQalCwYa3vN8tTA==", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/uvu/-/uvu-0.5.1.tgz", + "integrity": "sha512-JGxttnOGDFs77FaZ0yMUHIzczzQ5R1IlDeNW6Wymw6gAscwMdAffVOP6TlxLIfReZyK8tahoGwWZaTCJzNFDkg==", "dev": true, "dependencies": { "dequal": "^2.0.0", - "diff": "^4.0.2", + "diff": "^5.0.0", "kleur": "^4.0.3", "sade": "^1.7.3", "totalist": "^2.0.0" @@ -933,9 +933,9 @@ "dev": true }, "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", "dev": true }, "emoji-regex": { @@ -1279,13 +1279,13 @@ "dev": true }, "uvu": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/uvu/-/uvu-0.4.1.tgz", - "integrity": "sha512-JgAGSdts0VawIRPpnG4t1G5O0RoSrkJZTvTH+iSrFrlsJq9w12hksrfvd8wHIVAw/215T7WfQalCwYa3vN8tTA==", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/uvu/-/uvu-0.5.1.tgz", + "integrity": "sha512-JGxttnOGDFs77FaZ0yMUHIzczzQ5R1IlDeNW6Wymw6gAscwMdAffVOP6TlxLIfReZyK8tahoGwWZaTCJzNFDkg==", "dev": true, "requires": { "dequal": "^2.0.0", - "diff": "^4.0.2", + "diff": "^5.0.0", "kleur": "^4.0.3", "sade": "^1.7.3", "totalist": "^2.0.0" diff --git a/package.json b/package.json index a977d18..6ca2c1a 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "devDependencies": { "c8": "^7.3.5", "rome": "^10.0.4-beta", - "uvu": "^0.4.1" + "uvu": "^0.5.1" }, "files": [ "bin", From 1df6a563113b2a5ecda8547f35b5964b12085a34 Mon Sep 17 00:00:00 2001 From: Marcis Bergmanis Date: Thu, 4 Feb 2021 09:51:15 +0200 Subject: [PATCH 6/6] upgrade arg --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 065d9d6..308da9d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "arg": "^4.1.3", + "arg": "^5.0.0", "colorette": "^1.2.1" }, "bin": { @@ -72,9 +72,9 @@ } }, "node_modules/arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.0.tgz", + "integrity": "sha512-4P8Zm2H+BRS+c/xX1LrHw0qKpEhdlZjLCgWy+d78T9vqa2Z2SiD2wMrYuWIAFy5IZUD7nnNXroRttz+0RzlrzQ==" }, "node_modules/balanced-match": { "version": "1.0.0", @@ -828,9 +828,9 @@ } }, "arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.0.tgz", + "integrity": "sha512-4P8Zm2H+BRS+c/xX1LrHw0qKpEhdlZjLCgWy+d78T9vqa2Z2SiD2wMrYuWIAFy5IZUD7nnNXroRttz+0RzlrzQ==" }, "balanced-match": { "version": "1.0.0", diff --git a/package.json b/package.json index 6ca2c1a..8380e4c 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "src" ], "dependencies": { - "arg": "^4.1.3", + "arg": "^5.0.0", "colorette": "^1.2.1" } }