diff --git a/package.json b/package.json index 4ffb6670..3030ae3c 100644 --- a/package.json +++ b/package.json @@ -125,7 +125,7 @@ "prettier": "^2.5.1", "typescript": "^4.5.5", "vite": "^2.8.6", - "vitest": "^0.8.0" + "vitest": "latest" }, "dependencies": { "@babel/parser": "^7.17.3", diff --git a/samples/basic/test/add.test.ts b/samples/basic/test/add.test.ts index 89141f23..ab2fed04 100644 --- a/samples/basic/test/add.test.ts +++ b/samples/basic/test/add.test.ts @@ -1,23 +1,25 @@ import { describe, expect, it } from "vitest"; describe("addition", () => { - it("run", () => { - console.log("================="); - console.log("Console Output"); - expect(1 + 1).toBe(2); - }); + describe("haha", () => { + it("run", () => { + console.log("================="); + console.log("Console Output"); + expect(1 + 1).toBe(2); + }); - it("should failed", async () => { - await new Promise((r) => setTimeout(r, 100)); - expect(1 + 2).toBe(2); - }); + it("should failed", async () => { + await new Promise((r) => setTimeout(r, 100)); + expect(1 + 2).toBe(2); + }); - it.skip("skipped", () => { - expect(1 + 1).toBe(3); - }); + it.skip("skipped", () => { + expect(1 + 1).toBe(3); + }); - it.todo("todo"); - it("same name", () => {}); + it.todo("todo"); + it("same name", () => {}); + }); }); describe("testing", () => { diff --git a/src/pure/parsers/babel_parser.ts b/src/pure/parsers/babel_parser.ts index 1c77a045..f7f1f10a 100644 --- a/src/pure/parsers/babel_parser.ts +++ b/src/pure/parsers/babel_parser.ts @@ -9,16 +9,25 @@ * @flow */ -import { readFileSync } from 'fs'; -import { File as BabelFile, Node as BabelNode, Statement } from '@babel/types'; -import * as parser from '@babel/parser'; -import type { ParsedNodeType } from './parser_nodes'; -import { NamedBlock, ParsedRange, ParseResult, ParsedNode } from './parser_nodes'; -import { parseOptions } from './helper'; - -const _getASTfor = (file: string, data?: string, options?: parser.ParserOptions): [BabelFile, string] => { +import { readFileSync } from "fs"; +import { File as BabelFile, Node as BabelNode, Statement } from "@babel/types"; +import * as parser from "@babel/parser"; +import type { ParsedNodeType } from "./parser_nodes"; +import { + NamedBlock, + ParsedNode, + ParsedRange, + ParseResult, +} from "./parser_nodes"; +import { parseOptions } from "./helper"; + +const _getASTfor = ( + file: string, + data?: string, + options?: parser.ParserOptions, +): [BabelFile, string] => { const _data = data || readFileSync(file).toString(); - const config = { ...options, sourceType: 'module' as const }; + const config = { ...options, sourceType: "module" as const }; return [parser.parse(_data, config), _data]; }; @@ -28,12 +37,16 @@ export const getASTfor = (file: string, data?: string): BabelFile => { }; export function doesImportVitest(ast: BabelFile): boolean { - return ast.program.body.some(x => { - return x.type === 'ImportDeclaration' && x.source.value === 'vitest'; + return ast.program.body.some((x) => { + return x.type === "ImportDeclaration" && x.source.value === "vitest"; }); } -export const parse = (file: string, data?: string, options?: parser.ParserOptions): ParseResult => { +export const parse = ( + file: string, + data?: string, + options?: parser.ParserOptions, +): ParseResult => { const parseResult = new ParseResult(file); const [ast, _data] = _getASTfor(file, data, options); @@ -47,14 +60,18 @@ export const parse = (file: string, data?: string, options?: parser.ParserOption return rootForType; }, node); - const updateNameInfo = (nBlock: NamedBlock, bNode: BabelNode, lastProperty?: string) => { + const updateNameInfo = ( + nBlock: NamedBlock, + bNode: BabelNode, + lastProperty?: string, + ) => { //@ts-ignore const arg = bNode.expression.arguments[0]; let name = arg.value; if (!name) { switch (arg.type) { - case 'TemplateLiteral': + case "TemplateLiteral": name = _data.substring(arg.start + 1, arg.end - 1); break; default: @@ -70,11 +87,15 @@ export const parse = (file: string, data?: string, options?: parser.ParserOption arg.loc.start.line, arg.loc.start.column + 2, arg.loc.end.line, - arg.loc.end.column - 1 + arg.loc.end.column - 1, ); }; - const updateNode = (node: ParsedNode, babylonNode: BabelNode, lastProperty?: string) => { + const updateNode = ( + node: ParsedNode, + babylonNode: BabelNode, + lastProperty?: string, + ) => { //@ts-ignore node.start = babylonNode.loc.start; //@ts-ignore @@ -88,23 +109,24 @@ export const parse = (file: string, data?: string, options?: parser.ParserOption }; const isFunctionCall = (node: BabelNode) => - node && node.type === 'ExpressionStatement' && node.expression && node.expression.type === 'CallExpression'; + node && node.type === "ExpressionStatement" && node.expression && + node.expression.type === "CallExpression"; const isFunctionDeclaration = (nodeType: string) => - nodeType === 'ArrowFunctionExpression' || nodeType === 'FunctionExpression'; + nodeType === "ArrowFunctionExpression" || nodeType === "FunctionExpression"; // Pull out the name of a CallExpression (describe/it) and the last property (each, skip etc) const getNameForNode = (node: any) => { if (isFunctionCall(node) && node.expression.callee) { // Get root callee in case it's a chain of higher-order functions (e.g. .each(table)(name, fn)) - const rootCallee = deepGet(node.expression, 'callee'); - const property = rootCallee.property?.name || deepGet(rootCallee, 'tag').property?.name; - const name = - rootCallee.name || + const rootCallee = deepGet(node.expression, "callee"); + const property = rootCallee.property?.name || + deepGet(rootCallee, "tag").property?.name; + const name = rootCallee.name || // handle cases where it's a member expression (e.g .only or .concurrent.only) - deepGet(rootCallee, 'object').name || + deepGet(rootCallee, "object").name || // handle cases where it's part of a tag (e.g. .each`table`) - deepGet(rootCallee, 'tag', 'object').name; + deepGet(rootCallee, "tag", "object").name; return [name, property]; } @@ -114,11 +136,11 @@ export const parse = (file: string, data?: string, options?: parser.ParserOption // When given a node in the AST, does this represent // the start of an it/test block? const isAnIt = (name?: string) => { - return name === 'it' || name === 'fit' || name === 'test'; + return name === "it" || name === "fit" || name === "test"; }; const isAnDescribe = (name?: string) => { - return name === 'describe'; + return name === "describe"; }; // When given a node in the AST, does this represent @@ -127,7 +149,7 @@ export const parse = (file: string, data?: string, options?: parser.ParserOption if (!isFunctionCall(node)) { return false; } - let name = ''; + let name = ""; let element = node && node.expression ? node.expression.callee : undefined; while (!name && element) { // eslint-disable-next-line prefer-destructuring @@ -136,14 +158,14 @@ export const parse = (file: string, data?: string, options?: parser.ParserOption // (expect()) we have to check multiple levels for the name element = element.object || element.callee; } - return name === 'expect'; + return name === "expect"; }; const addNode = ( type: ParsedNodeType, parent: ParsedNode, babylonNode: BabelNode, - lastProperty?: string + lastProperty?: string, ): ParsedNode => { const child = parent.addChild(type); updateNode(child, babylonNode, lastProperty); @@ -171,25 +193,29 @@ export const parse = (file: string, data?: string, options?: parser.ParserOption const [name, lastProperty] = getNameForNode(element); if (isAnDescribe(name)) { - child = addNode('describe', parent, element, lastProperty); + child = addNode("describe", parent, element, lastProperty); } else if (isAnIt(name)) { - child = addNode('it', parent, element, lastProperty); + child = addNode("it", parent, element, lastProperty); } else if (isAnExpect(element)) { - child = addNode('expect', parent, element); - } else if (element && element.type === 'VariableDeclaration') { + child = addNode("expect", parent, element); + } else if (element && element.type === "VariableDeclaration") { element.declarations - .filter((declaration) => declaration.init && isFunctionDeclaration(declaration.init.type)) + .filter((declaration) => + declaration.init && isFunctionDeclaration(declaration.init.type) + ) .forEach((declaration) => searchNodes(declaration.init.body, parent)); } else if ( element && - element.type === 'ExpressionStatement' && + element.type === "ExpressionStatement" && element.expression && - element.expression.type === 'AssignmentExpression' && + element.expression.type === "AssignmentExpression" && element.expression.right && isFunctionDeclaration(element.expression.right.type) ) { searchNodes(element.expression.right.body, parent); - } else if (element.type === 'ReturnStatement' && element.argument?.arguments) { + } else if ( + element.type === "ReturnStatement" && element.argument?.arguments + ) { element.argument.arguments .filter((argument) => isFunctionDeclaration(argument.type)) .forEach((argument) => searchNodes(argument.body, parent)); diff --git a/src/pure/parsers/helper.ts b/src/pure/parsers/helper.ts index ddd5f851..8d7cd226 100644 --- a/src/pure/parsers/helper.ts +++ b/src/pure/parsers/helper.ts @@ -3,55 +3,72 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - * */ -import {ParserOptions, ParserPlugin} from '@babel/parser'; +import { ParserOptions, ParserPlugin } from "@babel/parser"; const commonPlugins: ParserPlugin[] = [ - 'asyncGenerators', - 'bigInt', - 'classPrivateMethods', - 'classPrivateProperties', - 'classProperties', - 'doExpressions', - 'dynamicImport', - 'estree', - 'exportDefaultFrom', - 'exportNamespaceFrom', // deprecated - 'functionBind', - 'functionSent', - 'importMeta', - 'logicalAssignment', - 'nullishCoalescingOperator', - 'numericSeparator', - 'objectRestSpread', - 'optionalCatchBinding', - 'optionalChaining', - 'partialApplication', - 'throwExpressions', - 'topLevelAwait', - ['decorators', {decoratorsBeforeExport: true}], - ['pipelineOperator', {proposal: 'smart'}], + "asyncGenerators", + "bigInt", + "classPrivateMethods", + "classPrivateProperties", + "classProperties", + "doExpressions", + "dynamicImport", + "estree", + "exportDefaultFrom", + "exportNamespaceFrom", // deprecated + "functionBind", + "functionSent", + "importMeta", + "logicalAssignment", + "nullishCoalescingOperator", + "numericSeparator", + "objectRestSpread", + "optionalCatchBinding", + "optionalChaining", + "partialApplication", + "throwExpressions", + "topLevelAwait", + ["pipelineOperator", { proposal: "smart" }], ]; -export const jsPlugins: ParserPlugin[] = [...commonPlugins, 'flow', 'jsx']; -export const tsPlugins: ParserPlugin[] = [...commonPlugins, 'typescript']; -export const tsxPlugins: ParserPlugin[] = [...commonPlugins, 'typescript', 'jsx']; +export const jsPlugins: ParserPlugin[] = [ + ...commonPlugins, + ["decorators", { decoratorsBeforeExport: true }], + "flow", + "jsx", +]; +export const tsPlugins: ParserPlugin[] = [ + ...commonPlugins, + "decorators-legacy", + "typescript", +]; +export const tsxPlugins: ParserPlugin[] = [ + ...commonPlugins, + "decorators-legacy", + "typescript", + "jsx", +]; -export const parseOptions = (filePath: string, strictMode = false): ParserOptions => { +export const parseOptions = ( + filePath: string, + strictMode = false, +): ParserOptions => { if (filePath.match(/\.ts$/i)) { - return {plugins: [...tsPlugins]}; + return { plugins: [...tsPlugins] }; } if (filePath.match(/\.tsx$/i)) { - return {plugins: [...tsxPlugins]}; + return { plugins: [...tsxPlugins] }; } // for backward compatibility, use js parser as default unless in strict mode if (!strictMode || filePath.match(/\.m?jsx?$/i)) { - return {plugins: [...jsPlugins]}; + return { plugins: [...jsPlugins] }; } - throw new TypeError(`unable to find parser options for unrecognized file extension: ${filePath}`); + throw new TypeError( + `unable to find parser options for unrecognized file extension: ${filePath}`, + ); }; diff --git a/test/parse.test.ts b/test/parse.test.ts index b08b6d01..a209d3e8 100644 --- a/test/parse.test.ts +++ b/test/parse.test.ts @@ -1,19 +1,34 @@ -import { expect, describe, it } from "vitest"; -import { parse } from "../src/pure/parsers/babel_parser"; +import { describe, expect, it } from "vitest"; +import parse from "../src/pure/parsers"; describe("parse", () => { it("parse", () => { const out = parse( - "x", + "x.js", "" + "let a = 10;\n" + "describe(`x ${a} sdf`, () => {\n" + " for (let i = 0; i < 5; i++){it('run' + i, () => {})}\n" + "}); \n" + - "test('add', () => {})" + "test('add', () => {})", ); - console.dir(out.describeBlocks); - console.dir(out.itBlocks); + expect(out.describeBlocks.length).toBe(1); + expect(out.itBlocks.length).toBe(1); + }); + + it("parse decorator", () => { + const out = parse( + "x.ts", + "" + + "let a = 10;\n" + + "describe(`x ${a} sdf`, () => {\n" + + " class B { \n" + + " constructor(@Inject(A) public a: A) {} \n" + + " } " + + "});", + ); + + expect(out.describeBlocks.length).toBe(1); }); }); diff --git a/yarn.lock b/yarn.lock index 0fa6fbf6..a86e8f9f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -89,11 +89,16 @@ dependencies: "@types/chai" "*" -"@types/chai@*", "@types/chai@^4.3.0": +"@types/chai@*": version "4.3.0" resolved "https://registry.npmmirror.com/@types/chai/-/chai-4.3.0.tgz" integrity sha512-/ceqdqeRraGolFTcfoXNiqjyQhZzbINDngeoAq9GoHa8PPK1yNzTaxWjA6BFWp5Ua9JpXEMSS4s5i9tS0hOJtw== +"@types/chai@^4.3.1": + version "4.3.1" + resolved "https://registry.npmmirror.com/@types/chai/-/chai-4.3.1.tgz#e2c6e73e0bdeb2521d00756d099218e9f5d90a04" + integrity sha512-/zPMqDkzSZ8t3VtxOa4KPq7uzzW978M9Tvh+j7GHKuo6k6GTLxPJ4J5gE5cjfJ26pnXst0N5Hax8Sr0T2Mi9zQ== + "@types/fs-extra@^9.0.13": version "9.0.13" resolved "https://registry.npmmirror.com/@types/fs-extra/-/fs-extra-9.0.13.tgz" @@ -534,101 +539,201 @@ esbuild-android-64@0.14.25: resolved "https://registry.npmmirror.com/esbuild-android-64/-/esbuild-android-64-0.14.25.tgz#d532d38cb5fe0ae45167ce35f4bbc784c636be40" integrity sha512-L5vCUk7TzFbBnoESNoXjU3x9+/+7TDIE/1mTfy/erAfvZAqC+S3sp/Qa9wkypFMcFvN9FzvESkTlpeQDolREtQ== +esbuild-android-64@0.14.38: + version "0.14.38" + resolved "https://registry.npmmirror.com/esbuild-android-64/-/esbuild-android-64-0.14.38.tgz#5b94a1306df31d55055f64a62ff6b763a47b7f64" + integrity sha512-aRFxR3scRKkbmNuGAK+Gee3+yFxkTJO/cx83Dkyzo4CnQl/2zVSurtG6+G86EQIZ+w+VYngVyK7P3HyTBKu3nw== + esbuild-android-arm64@0.14.25: version "0.14.25" resolved "https://registry.npmmirror.com/esbuild-android-arm64/-/esbuild-android-arm64-0.14.25.tgz#9c5bb3366aabfd14a1c726d36978b79441dfcb6e" integrity sha512-4jv5xPjM/qNm27T5j3ZEck0PvjgQtoMHnz4FzwF5zNP56PvY2CT0WStcAIl6jNlsuDdN63rk2HRBIsO6xFbcFw== +esbuild-android-arm64@0.14.38: + version "0.14.38" + resolved "https://registry.npmmirror.com/esbuild-android-arm64/-/esbuild-android-arm64-0.14.38.tgz#78acc80773d16007de5219ccce544c036abd50b8" + integrity sha512-L2NgQRWuHFI89IIZIlpAcINy9FvBk6xFVZ7xGdOwIm8VyhX1vNCEqUJO3DPSSy945Gzdg98cxtNt8Grv1CsyhA== + esbuild-darwin-64@0.14.25: version "0.14.25" resolved "https://registry.npmmirror.com/esbuild-darwin-64/-/esbuild-darwin-64-0.14.25.tgz#05dcdb6d884f427039ffee5e92ff97527e56c26d" integrity sha512-TGp8tuudIxOyWd1+8aYPxQmC1ZQyvij/AfNBa35RubixD0zJ1vkKHVAzo0Zao1zcG6pNqiSyzfPto8vmg0s7oA== +esbuild-darwin-64@0.14.38: + version "0.14.38" + resolved "https://registry.npmmirror.com/esbuild-darwin-64/-/esbuild-darwin-64-0.14.38.tgz#e02b1291f629ebdc2aa46fabfacc9aa28ff6aa46" + integrity sha512-5JJvgXkX87Pd1Og0u/NJuO7TSqAikAcQQ74gyJ87bqWRVeouky84ICoV4sN6VV53aTW+NE87qLdGY4QA2S7KNA== + esbuild-darwin-arm64@0.14.25: version "0.14.25" resolved "https://registry.npmmirror.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.25.tgz" integrity sha512-oTcDgdm0MDVEmw2DWu8BV68pYuImpFgvWREPErBZmNA4MYKGuBRaCiJqq6jZmBR1x+3y1DWCjez+5uLtuAm6mw== +esbuild-darwin-arm64@0.14.38: + version "0.14.38" + resolved "https://registry.npmmirror.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.38.tgz#01eb6650ec010b18c990e443a6abcca1d71290a9" + integrity sha512-eqF+OejMI3mC5Dlo9Kdq/Ilbki9sQBw3QlHW3wjLmsLh+quNfHmGMp3Ly1eWm981iGBMdbtSS9+LRvR2T8B3eQ== + esbuild-freebsd-64@0.14.25: version "0.14.25" resolved "https://registry.npmmirror.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.25.tgz#200d3664a3b945bc9fdcba73614b49a11ebd1cfa" integrity sha512-ueAqbnMZ8arnuLH8tHwTCQYeptnHOUV7vA6px6j4zjjQwDx7TdP7kACPf3TLZLdJQ3CAD1XCvQ2sPhX+8tacvQ== +esbuild-freebsd-64@0.14.38: + version "0.14.38" + resolved "https://registry.npmmirror.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.38.tgz#790b8786729d4aac7be17648f9ea8e0e16475b5e" + integrity sha512-epnPbhZUt93xV5cgeY36ZxPXDsQeO55DppzsIgWM8vgiG/Rz+qYDLmh5ts3e+Ln1wA9dQ+nZmVHw+RjaW3I5Ig== + esbuild-freebsd-arm64@0.14.25: version "0.14.25" resolved "https://registry.npmmirror.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.25.tgz#624b08c5da6013bdc312aaa23c4ff409580f5c3c" integrity sha512-+ZVWud2HKh+Ob6k/qiJWjBtUg4KmJGGmbvEXXW1SNKS7hW7HU+Zq2ZCcE1akFxOPkVB+EhOty/sSek30tkCYug== +esbuild-freebsd-arm64@0.14.38: + version "0.14.38" + resolved "https://registry.npmmirror.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.38.tgz#b66340ab28c09c1098e6d9d8ff656db47d7211e6" + integrity sha512-/9icXUYJWherhk+y5fjPI5yNUdFPtXHQlwP7/K/zg8t8lQdHVj20SqU9/udQmeUo5pDFHMYzcEFfJqgOVeKNNQ== + esbuild-linux-32@0.14.25: version "0.14.25" resolved "https://registry.npmmirror.com/esbuild-linux-32/-/esbuild-linux-32-0.14.25.tgz#0238e597eb0b60aa06c7e98fccbbfd6bb9a0d6c5" integrity sha512-3OP/lwV3kCzEz45tobH9nj+uE4ubhGsfx+tn0L26WAGtUbmmcRpqy7XRG/qK7h1mClZ+eguIANcQntYMdYklfw== +esbuild-linux-32@0.14.38: + version "0.14.38" + resolved "https://registry.npmmirror.com/esbuild-linux-32/-/esbuild-linux-32-0.14.38.tgz#7927f950986fd39f0ff319e92839455912b67f70" + integrity sha512-QfgfeNHRFvr2XeHFzP8kOZVnal3QvST3A0cgq32ZrHjSMFTdgXhMhmWdKzRXP/PKcfv3e2OW9tT9PpcjNvaq6g== + esbuild-linux-64@0.14.25: version "0.14.25" resolved "https://registry.npmmirror.com/esbuild-linux-64/-/esbuild-linux-64-0.14.25.tgz#8a8b8cf47dfce127c858e71229d9a385a82c62e8" integrity sha512-+aKHdHZmX9qwVlQmu5xYXh7GsBFf4TWrePgeJTalhXHOG7NNuUwoHmketGiZEoNsWyyqwH9rE5BC+iwcLY30Ug== +esbuild-linux-64@0.14.38: + version "0.14.38" + resolved "https://registry.npmmirror.com/esbuild-linux-64/-/esbuild-linux-64-0.14.38.tgz#4893d07b229d9cfe34a2b3ce586399e73c3ac519" + integrity sha512-uuZHNmqcs+Bj1qiW9k/HZU3FtIHmYiuxZ/6Aa+/KHb/pFKr7R3aVqvxlAudYI9Fw3St0VCPfv7QBpUITSmBR1Q== + esbuild-linux-arm64@0.14.25: version "0.14.25" resolved "https://registry.npmmirror.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.25.tgz#7ac94371418a2640ba413bc1700aaedeb2794e52" integrity sha512-UxfenPx/wSZx55gScCImPtXekvZQLI2GW3qe5dtlmU7luiqhp5GWPzGeQEbD3yN3xg/pHc671m5bma5Ns7lBHw== +esbuild-linux-arm64@0.14.38: + version "0.14.38" + resolved "https://registry.npmmirror.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.38.tgz#8442402e37d0b8ae946ac616784d9c1a2041056a" + integrity sha512-HlMGZTEsBrXrivr64eZ/EO0NQM8H8DuSENRok9d+Jtvq8hOLzrxfsAT9U94K3KOGk2XgCmkaI2KD8hX7F97lvA== + esbuild-linux-arm@0.14.25: version "0.14.25" resolved "https://registry.npmmirror.com/esbuild-linux-arm/-/esbuild-linux-arm-0.14.25.tgz#034bd18e9310b9f010c89f90ef7f05706689600b" integrity sha512-aTLcE2VBoLydL943REcAcgnDi3bHtmULSXWLbjtBdtykRatJVSxKMjK9YlBXUZC4/YcNQfH7AxwVeQr9fNxPhw== +esbuild-linux-arm@0.14.38: + version "0.14.38" + resolved "https://registry.npmmirror.com/esbuild-linux-arm/-/esbuild-linux-arm-0.14.38.tgz#d5dbf32d38b7f79be0ec6b5fb2f9251fd9066986" + integrity sha512-FiFvQe8J3VKTDXG01JbvoVRXQ0x6UZwyrU4IaLBZeq39Bsbatd94Fuc3F1RGqPF5RbIWW7RvkVQjn79ejzysnA== + esbuild-linux-mips64le@0.14.25: version "0.14.25" resolved "https://registry.npmmirror.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.25.tgz#05f98a8cf6b578eab6b4e6b0ab094f37530934f4" integrity sha512-wLWYyqVfYx9Ur6eU5RT92yJVsaBGi5RdkoWqRHOqcJ38Kn60QMlcghsKeWfe9jcYut8LangYZ98xO1LxIoSXrQ== +esbuild-linux-mips64le@0.14.38: + version "0.14.38" + resolved "https://registry.npmmirror.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.38.tgz#95081e42f698bbe35d8ccee0e3a237594b337eb5" + integrity sha512-qd1dLf2v7QBiI5wwfil9j0HG/5YMFBAmMVmdeokbNAMbcg49p25t6IlJFXAeLzogv1AvgaXRXvgFNhScYEUXGQ== + esbuild-linux-ppc64le@0.14.25: version "0.14.25" resolved "https://registry.npmmirror.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.25.tgz#46fd0add8d8535678439d7a9c2876ad20042d952" integrity sha512-0dR6Csl6Zas3g4p9ULckEl8Mo8IInJh33VCJ3eaV1hj9+MHGdmDOakYMN8MZP9/5nl+NU/0ygpd14cWgy8uqRw== +esbuild-linux-ppc64le@0.14.38: + version "0.14.38" + resolved "https://registry.npmmirror.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.38.tgz#dceb0a1b186f5df679618882a7990bd422089b47" + integrity sha512-mnbEm7o69gTl60jSuK+nn+pRsRHGtDPfzhrqEUXyCl7CTOCLtWN2bhK8bgsdp6J/2NyS/wHBjs1x8aBWwP2X9Q== + esbuild-linux-riscv64@0.14.25: version "0.14.25" resolved "https://registry.npmmirror.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.25.tgz#ea2e986f0f3e5df73c635135dd778051734fc605" integrity sha512-J4d20HDmTrgvhR0bdkDhvvJGaikH3LzXQnNaseo8rcw9Yqby9A90gKUmWpfwqLVNRILvNnAmKLfBjCKU9ajg8w== +esbuild-linux-riscv64@0.14.38: + version "0.14.38" + resolved "https://registry.npmmirror.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.38.tgz#61fb8edb75f475f9208c4a93ab2bfab63821afd2" + integrity sha512-+p6YKYbuV72uikChRk14FSyNJZ4WfYkffj6Af0/Tw63/6TJX6TnIKE+6D3xtEc7DeDth1fjUOEqm+ApKFXbbVQ== + esbuild-linux-s390x@0.14.25: version "0.14.25" resolved "https://registry.npmmirror.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.25.tgz#efe89486e9a1b1508925048076e3f3a6698aa6a3" integrity sha512-YI2d5V6nTE73ZnhEKQD7MtsPs1EtUZJ3obS21oxQxGbbRw1G+PtJKjNyur+3t6nzHP9oTg6GHQ3S3hOLLmbDIQ== +esbuild-linux-s390x@0.14.38: + version "0.14.38" + resolved "https://registry.npmmirror.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.38.tgz#34c7126a4937406bf6a5e69100185fd702d12fe0" + integrity sha512-0zUsiDkGJiMHxBQ7JDU8jbaanUY975CdOW1YDrurjrM0vWHfjv9tLQsW9GSyEb/heSK1L5gaweRjzfUVBFoybQ== + esbuild-netbsd-64@0.14.25: version "0.14.25" resolved "https://registry.npmmirror.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.25.tgz#439fe27d8ee3b5887501ee63988e85f920107db6" integrity sha512-TKIVgNWLUOkr+Exrye70XTEE1lJjdQXdM4tAXRzfHE9iBA7LXWcNtVIuSnphTqpanPzTDFarF0yqq4kpbC6miA== +esbuild-netbsd-64@0.14.38: + version "0.14.38" + resolved "https://registry.npmmirror.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.38.tgz#322ea9937d9e529183ee281c7996b93eb38a5d95" + integrity sha512-cljBAApVwkpnJZfnRVThpRBGzCi+a+V9Ofb1fVkKhtrPLDYlHLrSYGtmnoTVWDQdU516qYI8+wOgcGZ4XIZh0Q== + esbuild-openbsd-64@0.14.25: version "0.14.25" resolved "https://registry.npmmirror.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.25.tgz#31ebf616aadf6e60674469f2b92cec92280d9930" integrity sha512-QgFJ37A15D7NIXBTYEqz29+uw3nNBOIyog+3kFidANn6kjw0GHZ0lEYQn+cwjyzu94WobR+fes7cTl/ZYlHb1A== +esbuild-openbsd-64@0.14.38: + version "0.14.38" + resolved "https://registry.npmmirror.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.38.tgz#1ca29bb7a2bf09592dcc26afdb45108f08a2cdbd" + integrity sha512-CDswYr2PWPGEPpLDUO50mL3WO/07EMjnZDNKpmaxUPsrW+kVM3LoAqr/CE8UbzugpEiflYqJsGPLirThRB18IQ== + esbuild-sunos-64@0.14.25: version "0.14.25" resolved "https://registry.npmmirror.com/esbuild-sunos-64/-/esbuild-sunos-64-0.14.25.tgz#815e4f936d74970292a63ccfd5791fe5e3569f5f" integrity sha512-rmWfjUItYIVlqr5EnTH1+GCxXiBOC42WBZ3w++qh7n2cS9Xo0lO5pGSG2N+huOU2fX5L+6YUuJ78/vOYvefeFw== +esbuild-sunos-64@0.14.38: + version "0.14.38" + resolved "https://registry.npmmirror.com/esbuild-sunos-64/-/esbuild-sunos-64-0.14.38.tgz#c9446f7d8ebf45093e7bb0e7045506a88540019b" + integrity sha512-2mfIoYW58gKcC3bck0j7lD3RZkqYA7MmujFYmSn9l6TiIcAMpuEvqksO+ntBgbLep/eyjpgdplF7b+4T9VJGOA== + esbuild-windows-32@0.14.25: version "0.14.25" resolved "https://registry.npmmirror.com/esbuild-windows-32/-/esbuild-windows-32-0.14.25.tgz#189e14df2478f2c193c86968ab1fb54e1ceaafd2" integrity sha512-HGAxVUofl3iUIz9W10Y9XKtD0bNsK9fBXv1D55N/ljNvkrAYcGB8YCm0v7DjlwtyS6ws3dkdQyXadbxkbzaKOA== +esbuild-windows-32@0.14.38: + version "0.14.38" + resolved "https://registry.npmmirror.com/esbuild-windows-32/-/esbuild-windows-32-0.14.38.tgz#f8e9b4602fd0ccbd48e5c8d117ec0ba4040f2ad1" + integrity sha512-L2BmEeFZATAvU+FJzJiRLFUP+d9RHN+QXpgaOrs2klshoAm1AE6Us4X6fS9k33Uy5SzScn2TpcgecbqJza1Hjw== + esbuild-windows-64@0.14.25: version "0.14.25" resolved "https://registry.npmmirror.com/esbuild-windows-64/-/esbuild-windows-64-0.14.25.tgz#3d5fbfdc3856850bb47439299e3b60dd18be111f" integrity sha512-TirEohRkfWU9hXLgoDxzhMQD1g8I2mOqvdQF2RS9E/wbkORTAqJHyh7wqGRCQAwNzdNXdg3JAyhQ9/177AadWA== +esbuild-windows-64@0.14.38: + version "0.14.38" + resolved "https://registry.npmmirror.com/esbuild-windows-64/-/esbuild-windows-64-0.14.38.tgz#280f58e69f78535f470905ce3e43db1746518107" + integrity sha512-Khy4wVmebnzue8aeSXLC+6clo/hRYeNIm0DyikoEqX+3w3rcvrhzpoix0S+MF9vzh6JFskkIGD7Zx47ODJNyCw== + esbuild-windows-arm64@0.14.25: version "0.14.25" resolved "https://registry.npmmirror.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.25.tgz#8b243cbbad8a86cf98697da9ccb88c05df2ef458" integrity sha512-4ype9ERiI45rSh+R8qUoBtaj6kJvUOI7oVLhKqPEpcF4Pa5PpT3hm/mXAyotJHREkHpM87PAJcA442mLnbtlNA== +esbuild-windows-arm64@0.14.38: + version "0.14.38" + resolved "https://registry.npmmirror.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.38.tgz#d97e9ac0f95a4c236d9173fa9f86c983d6a53f54" + integrity sha512-k3FGCNmHBkqdJXuJszdWciAH77PukEyDsdIryEHn9cKLQFxzhT39dSumeTuggaQcXY57UlmLGIkklWZo2qzHpw== + esbuild@^0.14.14: version "0.14.25" resolved "https://registry.npmmirror.com/esbuild/-/esbuild-0.14.25.tgz" @@ -655,6 +760,32 @@ esbuild@^0.14.14: esbuild-windows-64 "0.14.25" esbuild-windows-arm64 "0.14.25" +esbuild@^0.14.27: + version "0.14.38" + resolved "https://registry.npmmirror.com/esbuild/-/esbuild-0.14.38.tgz#99526b778cd9f35532955e26e1709a16cca2fb30" + integrity sha512-12fzJ0fsm7gVZX1YQ1InkOE5f9Tl7cgf6JPYXRJtPIoE0zkWAbHdPHVPPaLi9tYAcEBqheGzqLn/3RdTOyBfcA== + optionalDependencies: + esbuild-android-64 "0.14.38" + esbuild-android-arm64 "0.14.38" + esbuild-darwin-64 "0.14.38" + esbuild-darwin-arm64 "0.14.38" + esbuild-freebsd-64 "0.14.38" + esbuild-freebsd-arm64 "0.14.38" + esbuild-linux-32 "0.14.38" + esbuild-linux-64 "0.14.38" + esbuild-linux-arm "0.14.38" + esbuild-linux-arm64 "0.14.38" + esbuild-linux-mips64le "0.14.38" + esbuild-linux-ppc64le "0.14.38" + esbuild-linux-riscv64 "0.14.38" + esbuild-linux-s390x "0.14.38" + esbuild-netbsd-64 "0.14.38" + esbuild-openbsd-64 "0.14.38" + esbuild-sunos-64 "0.14.38" + esbuild-windows-32 "0.14.38" + esbuild-windows-64 "0.14.38" + esbuild-windows-arm64 "0.14.38" + escalade@^3.1.1: version "3.1.1" resolved "https://registry.npmmirror.com/escalade/-/escalade-3.1.1.tgz" @@ -1242,6 +1373,11 @@ nanoid@3.3.1, nanoid@^3.3.1: resolved "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.1.tgz" integrity sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw== +nanoid@^3.3.3: + version "3.3.3" + resolved "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25" + integrity sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w== + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.npmmirror.com/natural-compare/-/natural-compare-1.4.0.tgz" @@ -1332,6 +1468,15 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3: resolved "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.1.tgz" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== +postcss@^8.4.12: + version "8.4.13" + resolved "https://registry.npmmirror.com/postcss/-/postcss-8.4.13.tgz#7c87bc268e79f7f86524235821dfdf9f73e5d575" + integrity sha512-jtL6eTBrza5MPzy8oJLFuUscHDXTV5KcLlqAWHl5q5WYRfnNRGSmOZmOZ1T6Gy7A99mOZfqungmZMpMmCVJ8ZA== + dependencies: + nanoid "^3.3.3" + picocolors "^1.0.0" + source-map-js "^1.0.2" + postcss@^8.4.6: version "8.4.8" resolved "https://registry.npmmirror.com/postcss/-/postcss-8.4.8.tgz" @@ -1558,10 +1703,10 @@ tinypool@^0.1.2: resolved "https://registry.npmmirror.com/tinypool/-/tinypool-0.1.2.tgz" integrity sha512-fvtYGXoui2RpeMILfkvGIgOVkzJEGediv8UJt7TxdAOY8pnvUkFg/fkvqTfXG9Acc9S17Cnn1S4osDc2164guA== -tinyspy@^0.3.0: - version "0.3.0" - resolved "https://registry.npmmirror.com/tinyspy/-/tinyspy-0.3.0.tgz" - integrity sha512-c5uFHqtUp74R2DJE3/Efg0mH5xicmgziaQXMm/LvuuZn3RdpADH32aEGDRyCzObXT1DNfwDMqRQ/Drh1MlO12g== +tinyspy@^0.3.2: + version "0.3.2" + resolved "https://registry.npmmirror.com/tinyspy/-/tinyspy-0.3.2.tgz#2f95cb14c38089ca690385f339781cd35faae566" + integrity sha512-2+40EP4D3sFYy42UkgkFFB+kiX2Tg3URG/lVvAZFfLxgGpnWl5qQJuBw1gaLttq8UOS+2p3C0WrhJnQigLTT2Q== to-fast-properties@^2.0.0: version "2.0.0" @@ -1652,7 +1797,7 @@ v8-compile-cache@^2.0.3: resolved "https://registry.npmmirror.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz" integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== -vite@^2.7.10, vite@^2.8.6: +vite@^2.8.6: version "2.8.6" resolved "https://registry.npmmirror.com/vite/-/vite-2.8.6.tgz" integrity sha512-e4H0QpludOVKkmOsRyqQ7LTcMUDF3mcgyNU4lmi0B5JUbe0ZxeBBl8VoZ8Y6Rfn9eFKYtdXNPcYK97ZwH+K2ug== @@ -1664,18 +1809,30 @@ vite@^2.7.10, vite@^2.8.6: optionalDependencies: fsevents "~2.3.2" -vitest@^0.6.2: - version "0.6.3" - resolved "https://registry.npmmirror.com/vitest/-/vitest-0.6.3.tgz#27839a37fcf20cdc2835d8276f3496cafe2b2d9c" - integrity sha512-0x5UeYQ5Mqniurxv9KT0+FI4IszLBbNBiBPSXSdyQAEodeq400Q00YB0f1qNbf7YsxyLqFJvGpoOTKJWUYm6mQ== +vite@^2.9.5: + version "2.9.6" + resolved "https://registry.npmmirror.com/vite/-/vite-2.9.6.tgz#29f1b33193b0de9e155d67ba0dd097501c3c3281" + integrity sha512-3IffdrByHW95Yjv0a13TQOQfJs7L5dVlSPuTt432XLbRMriWbThqJN2k/IS6kXn5WY4xBLhK9XoaWay1B8VzUw== + dependencies: + esbuild "^0.14.27" + postcss "^8.4.12" + resolve "^1.22.0" + rollup "^2.59.0" + optionalDependencies: + fsevents "~2.3.2" + +vitest@latest: + version "0.10.0" + resolved "https://registry.npmmirror.com/vitest/-/vitest-0.10.0.tgz#ab8930194f2a8943c533cca735cba2bca705d5bc" + integrity sha512-8UXemUg9CA4QYppDTsDV76nH0e1p6C8lV9q+o9i0qMSK9AQ7vA2sjoxtkDP0M+pwNmc3ZGYetBXgSJx0M1D/gg== dependencies: - "@types/chai" "^4.3.0" + "@types/chai" "^4.3.1" "@types/chai-subset" "^1.3.3" chai "^4.3.6" local-pkg "^0.4.1" tinypool "^0.1.2" - tinyspy "^0.3.0" - vite "^2.7.10" + tinyspy "^0.3.2" + vite "^2.9.5" which@2.0.2, which@^2.0.1: version "2.0.2"