From d03d0cec6071dbe7b8c3c5906b128642b02224e6 Mon Sep 17 00:00:00 2001 From: stefnotch Date: Wed, 6 Nov 2024 22:54:07 +0100 Subject: [PATCH 01/17] Add expression parser --- packages/linker/src/ParseSupport.ts | 1 + packages/linker/src/ParseWgslD.ts | 86 +++++++++++++++++-- .../linker/src/test/ParseExpression.test.ts | 18 ++++ 3 files changed, 98 insertions(+), 7 deletions(-) create mode 100644 packages/linker/src/test/ParseExpression.test.ts diff --git a/packages/linker/src/ParseSupport.ts b/packages/linker/src/ParseSupport.ts index 5cc97ce53..75927e199 100644 --- a/packages/linker/src/ParseSupport.ts +++ b/packages/linker/src/ParseSupport.ts @@ -23,6 +23,7 @@ import { lineComment } from "./ParseDirective.js"; export const word = kind(mainTokens.word); export const wordNum = or(word, kind(mainTokens.digits)); +export const literal = or("true", "false", kind(mainTokens.digits)); export const unknown = any().map(r => { const { kind, text } = r.value; diff --git a/packages/linker/src/ParseWgslD.ts b/packages/linker/src/ParseWgslD.ts index f546d5d9e..a4737aeed 100644 --- a/packages/linker/src/ParseWgslD.ts +++ b/packages/linker/src/ParseWgslD.ts @@ -28,6 +28,7 @@ import { identTokens, mainTokens } from "./MatchWgslD.js"; import { directive } from "./ParseDirective.js"; import { comment, + literal, makeElem, unknown, word, @@ -157,7 +158,80 @@ const variableDecl = seq( req(typeSpecifier).tag("typeRefs") ); -const expression = repeatPlus(anyNot(or("{", ":"))); // TBD +// TODO: Fix everything else to also use this instead of "template" +const opt_template_args = opt( + seq( + "<", + withSep(",", () => template_arg_expression, { + requireOne: true, + }), + ">", + ).tag("template"), +); + +const primary_expression = or( + literal, + seq( + word, + opt_template_args, + opt( + seq( + "(", + withSep(",", () => expression), + req(")"), + ), + ), + ), + seq("(", () => expression, req(")")), +); +const component_or_swizzle = repeatPlus( + or( + seq(".", word), + seq("[", () => expression, req("]")), + ), +); + +/** + * bitwise_expression.post.unary_expression + * & ^ | + * expression + * && || + * relational_expression.post.unary_expression + * > >= < <= != == + * shift_expression.post.unary_expression + * % * / + - << >> + */ +const makeExpressionOperator = (isTemplate: boolean) => { + const allowedOps = ( + "& | ^ << <= < != == % * / + -" + (isTemplate ? "" : " && || >> >= >") + ).split(" "); + return or(...allowedOps) + .traceName("operator") + .trace({ + shallow: true, + }); +}; +const unary_expression: Parser = or( + seq( + or(..."! & * - ~".split(" ")) + .traceName("unary_op") + .trace({ + shallow: true, + }), + () => unary_expression, + ), + seq(primary_expression, opt(component_or_swizzle)), +); +const makeExpression = (isTemplate: boolean) => { + return seq( + unary_expression, + repeat(seq(makeExpressionOperator(isTemplate), unary_expression)), + ); +}; + +export const expression = makeExpression(false); +const template_arg_expression = makeExpression(true); + const statement = repeatPlus(anyNot(or("{", "}"))); // TBD const compound_statement = seq(optAttributes, "{", repeat(statement), "}"); @@ -170,12 +244,7 @@ const switch_clause = or(case_clause, default_alone_clause); const switch_body = seq(optAttributes, "{", repeatPlus(switch_clause), "}"); -const switch_statement = seq( - optAttributes, - "switch", - expression, - switch_body, -); +const switch_statement = seq(optAttributes, "switch", expression, switch_body); // prettier-ignore const block: Parser = seq( @@ -276,6 +345,9 @@ if (tracing) { fnCall, fnParam, fnParamList, + opt_template_args, + primary_expression, + component_or_swizzle, expression, statement, compound_statement, diff --git a/packages/linker/src/test/ParseExpression.test.ts b/packages/linker/src/test/ParseExpression.test.ts new file mode 100644 index 000000000..9651d41e5 --- /dev/null +++ b/packages/linker/src/test/ParseExpression.test.ts @@ -0,0 +1,18 @@ +import { expect, test } from "vitest"; +import { testAppParse } from "./TestUtil"; +import { expression } from "../ParseWgslD"; +import { eof, seq } from "mini-parse"; +test("parse number", () => { + const src = `3`; + + const { parsed } = testAppParse(seq(expression, eof), src); + expect(parsed).not.toBeNull(); +}); + +test("parse comparisons with && ||", () => { + const src = `array<3 && 4>(5)`; + + const { parsed } = testAppParse(seq(expression, eof), src); + expect(parsed).not.toBeNull(); + // TODO: Check that it doesn't have a template generic +}); From 9281a6cc0f6a0411a910e3dc1478ace300cc11bd Mon Sep 17 00:00:00 2001 From: stefnotch Date: Tue, 5 Nov 2024 03:27:52 +0100 Subject: [PATCH 02/17] Migrate to Deno WIP --- .gitignore | 21 +- .vscode/settings.json | 5 + README.md | 8 + {packages/cli => cli}/README.md | 0 {packages/cli/src => cli}/cli.ts | 4 +- cli/deno.json | 9 + cli/main.ts | 3 + .../test/__snapshots__/wgsl-link.test.ts.snap | 0 .../cli/src => cli}/test/wgsl-link.test.ts | 2 +- {packages/cli/src => cli}/test/wgsl/main.wgsl | 0 {packages/cli/src => cli}/test/wgsl/util.wgsl | 0 deno.json | 28 + deno.lock | 216 + .../linker/src => linker}/AbstractElems.ts | 4 +- .../linker/src => linker}/Conditionals.ts | 6 +- .../linker/src => linker}/GleamImport.ts | 10 +- .../src => linker}/ImportResolutionMap.ts | 21 +- {packages/linker/src => linker}/ImportTree.ts | 0 {packages/linker => linker}/Internals.md | 0 .../linker/src => linker}/LinkedElems.ts | 4 +- {packages/linker/src => linker}/Linker.ts | 15 +- .../linker/src => linker}/LinkerLogging.ts | 8 +- .../linker/src => linker}/LogResolveMap.ts | 4 +- {packages/linker/src => linker}/MatchWgslD.ts | 6 +- .../linker/src => linker}/ModuleRegistry.ts | 10 +- .../linker/src => linker}/ParseDirective.ts | 12 +- .../linker/src => linker}/ParseModule.ts | 12 +- .../linker/src => linker}/ParseSupport.ts | 10 +- {packages/linker/src => linker}/ParseWgslD.ts | 10 +- .../linker/src => linker}/ParsedRegistry.ts | 12 +- {packages/linker/src => linker}/PathUtil.ts | 0 {packages/linker/src => linker}/RefDebug.ts | 7 +- .../linker/src => linker}/ResolveImport.ts | 9 +- {packages/linker/src => linker}/Slicer.ts | 4 +- .../linker/src => linker}/TraverseRefs.ts | 20 +- {packages/linker/src => linker}/Util.ts | 0 {packages/linker/src => linker}/WgslBundle.ts | 0 linker/deno.json | 10 + linker/mod.ts | 7 + .../templates/SimpleTemplate.ts | 4 +- linker/templates/index.ts | 1 + .../src => linker}/test/Conditionals.test.ts | 71 +- .../src => linker}/test/Extends.test.ts | 22 +- linker/test/GleamImport.test.ts | 41 + linker/test/ImportCases.test.ts | 301 + .../test/ImportResolutionMap.test.ts | 14 +- .../test/ImportSyntaxCases.test.ts | 7 +- .../src => linker}/test/Importing.test.ts | 6 +- .../src => linker}/test/LinkPackage.test.ts | 7 +- .../linker/src => linker}/test/Linker.test.ts | 8 +- .../test/LinkerGenerator.test.ts | 4 +- .../src => linker}/test/MatchWgslD.test.ts | 4 +- .../test/ModuleRegistry.test.ts | 2 +- .../src => linker}/test/ParseComments.test.ts | 29 +- .../test/ParseDirectives.test.ts | 113 +- .../src => linker}/test/ParseModule.test.ts | 66 +- .../src => linker}/test/ParseWgslD.test.ts | 158 +- .../src => linker}/test/PathUtil.test.ts | 2 +- .../src => linker}/test/ResolveImport.test.ts | 8 +- .../src => linker}/test/ScratchTest.test.ts | 0 .../linker/src => linker}/test/Slicer.test.ts | 33 +- .../linker/src => linker}/test/TestSetup.ts | 2 +- .../linker/src => linker}/test/TestUtil.ts | 10 +- .../src => linker}/test/TraverseRefs.test.ts | 47 +- .../linker/src => linker}/test/Util.test.ts | 2 +- .../linker/src => linker}/test/WgslTests.ts | 0 .../__snapshots__/Conditionals.test.ts.snap | 57 + .../__snapshots__/ParseComments.test.ts.snap | 44 + .../ParseDirectives.test.ts.snap | 83 + .../__snapshots__/ParseModule.test.ts.snap | 222 + .../__snapshots__/ParseWgslD.test.ts.snap | 417 ++ linker/test/__snapshots__/Slicer.test.ts.snap | 27 + .../__snapshots__/TraverseRefs.test.ts.snap | 10 + .../src => linker}/test/shared/StringUtil.ts | 0 .../test/shared/test/StringUtil.test.ts | 2 +- .../src => mini-parse}/CombinatorTypes.ts | 2 +- .../src => mini-parse}/MatchingLexer.ts | 8 +- .../mini-parse/src => mini-parse}/Parser.ts | 14 +- .../src => mini-parse}/ParserCombinator.ts | 12 +- .../src => mini-parse}/ParserLogging.ts | 6 +- .../src => mini-parse}/ParserTracing.ts | 2 +- .../src => mini-parse}/ParserUtil.ts | 0 {packages/mini-parse => mini-parse}/README.md | 0 .../mini-parse/src => mini-parse}/SrcMap.ts | 0 .../src => mini-parse}/TokenMatcher.ts | 12 +- mini-parse/deno.json | 13 + .../examples/BlogExample.ts | 6 +- .../examples/CalculatorExample.ts | 8 +- .../examples/CalculatorResultsExample.ts | 8 +- .../examples/DocExamples.ts | 4 +- mini-parse/mod.ts | 7 + .../test-util/LogCatcher.ts | 0 .../src => mini-parse}/test-util/TestParse.ts | 6 +- mini-parse/test-util/index.ts | 2 + .../test/BlogExample.test.ts | 8 +- .../test/CalculatorExample.test.ts | 8 +- .../test/CalculatorResultsExample.test.ts | 7 +- .../src => mini-parse}/test/Chain.test.ts | 0 .../test/ParserCombinator.test.ts | 74 +- .../test/ParserLogging.test.ts | 31 +- .../test/ParserUtil.test.ts | 2 +- .../src => mini-parse}/test/SrcMap.test.ts | 38 +- mini-parse/test/TestSetup.ts | 4 + .../test/TokenMatcher.test.ts | 2 +- .../ParserCombinator.test.ts.snap | 60 + .../__snapshots__/ParserLogging.test.ts.snap | 19 + .../test/__snapshots__/SrcMap.test.ts.snap | 32 + package.json | 40 - .../packager/ReadMe.md => packager/README.md | 0 packager/deno.json | 8 + packager/main.ts | 3 + .../packager/src => packager}/packageWgsl.ts | 4 +- .../packager/src => packager}/packagerCli.ts | 2 +- .../src => packager}/test/packager.test.ts | 4 + .../test/wgsl-package/package.json | 0 .../test/wgsl-package/src/lib.wesl | 0 .../test/wgsl-package/src/util.wgsl | 0 .../test/wgsl-package}/src/viteTypes.d.ts | 0 packages/bulk-test/tsconfig.json | 25 - packages/cli/.gitignore | 2 - packages/cli/package.json | 25 - packages/cli/src/main.ts | 7 - packages/cli/tsconfig.json | 25 - packages/cli/vite.config.ts | 9 - packages/linker/.gitignore | 2 - packages/linker/base.vite.config.ts | 23 - packages/linker/minified.vite.config.ts | 11 - packages/linker/package.json | 53 - packages/linker/src/index.ts | 7 - packages/linker/src/templates/index.ts | 1 - packages/linker/src/test/LinkGlob.test.ts | 25 - .../__snapshots__/ParseComments.test.ts.snap | 44 - .../ParseDirectives.test.ts.snap | 110 - .../__snapshots__/ParseModule.test.ts.snap | 210 - .../__snapshots__/ParseWgslD.test.ts.snap | 383 -- .../__snapshots__/RustDirective.test.ts.snap | 359 -- .../__snapshots__/TraverseRefs.test.ts.snap | 41 - packages/linker/src/test/wgsl_1/main.wgsl | 4 - packages/linker/src/test/wgsl_1/util.wgsl | 3 - packages/linker/src/test/wgsl_2/main2.wgsl | 4 - packages/linker/src/test/wgsl_2/util2.wgsl | 3 - packages/linker/templates.vite.config.ts | 14 - packages/linker/tsconfig-node.json | 11 - packages/linker/tsconfig.json | 30 - packages/linker/vite.config.ts | 9 - packages/mini-parse/.markdownlint.json | 4 - packages/mini-parse/base.vite.config.ts | 21 - packages/mini-parse/minified.vite.config.ts | 17 - packages/mini-parse/package.json | 59 - packages/mini-parse/src/index.ts | 7 - packages/mini-parse/src/test-util/index.ts | 2 - packages/mini-parse/src/test/TestSetup.ts | 4 - .../ParserCombinator.test.ts.snap | 54 - packages/mini-parse/test-util.vite.config.ts | 40 - packages/mini-parse/tsconfig-node.json | 11 - packages/mini-parse/tsconfig.json | 28 - packages/mini-parse/vite.config.ts | 10 - packages/packager/.gitignore | 2 - packages/packager/build.ts | 41 - packages/packager/package.json | 23 - .../src/test/wgsl-package/src/viteTypes.d.ts | 1 - packages/packager/tsconfig.json | 25 - packages/packager/vite.config.ts | 9 - packages/test-package/out/wgsl.d.ts | 19 - packages/test-package/out/wgsl.js | 56 - packages/test-package/package.json | 12 - pnpm-lock.yaml | 5309 ----------------- pnpm-workspace.yaml | 2 - scripts/bump.ts | 52 - scripts/runTs | 6 - testlib/README.md | 3 + testlib/deno.json | 7 + testlib/mod.ts | 3 + 173 files changed, 2096 insertions(+), 7948 deletions(-) create mode 100644 .vscode/settings.json rename {packages/cli => cli}/README.md (100%) rename {packages/cli/src => cli}/cli.ts (97%) create mode 100644 cli/deno.json create mode 100644 cli/main.ts rename {packages/cli/src => cli}/test/__snapshots__/wgsl-link.test.ts.snap (100%) rename {packages/cli/src => cli}/test/wgsl-link.test.ts (96%) rename {packages/cli/src => cli}/test/wgsl/main.wgsl (100%) rename {packages/cli/src => cli}/test/wgsl/util.wgsl (100%) create mode 100644 deno.json create mode 100644 deno.lock rename {packages/linker/src => linker}/AbstractElems.ts (96%) rename {packages/linker/src => linker}/Conditionals.ts (97%) rename {packages/linker/src => linker}/GleamImport.ts (95%) rename {packages/linker/src => linker}/ImportResolutionMap.ts (93%) rename {packages/linker/src => linker}/ImportTree.ts (100%) rename {packages/linker => linker}/Internals.md (100%) rename {packages/linker/src => linker}/LinkedElems.ts (60%) rename {packages/linker/src => linker}/Linker.ts (96%) rename {packages/linker/src => linker}/LinkerLogging.ts (76%) rename {packages/linker/src => linker}/LogResolveMap.ts (90%) rename {packages/linker/src => linker}/MatchWgslD.ts (95%) rename {packages/linker/src => linker}/ModuleRegistry.ts (94%) rename {packages/linker/src => linker}/ParseDirective.ts (94%) rename {packages/linker/src => linker}/ParseModule.ts (94%) rename {packages/linker/src => linker}/ParseSupport.ts (93%) rename {packages/linker/src => linker}/ParseWgslD.ts (97%) rename {packages/linker/src => linker}/ParsedRegistry.ts (95%) rename {packages/linker/src => linker}/PathUtil.ts (100%) rename {packages/linker/src => linker}/RefDebug.ts (88%) rename {packages/linker/src => linker}/ResolveImport.ts (87%) rename {packages/linker/src => linker}/Slicer.ts (97%) rename {packages/linker/src => linker}/TraverseRefs.ts (97%) rename {packages/linker/src => linker}/Util.ts (100%) rename {packages/linker/src => linker}/WgslBundle.ts (100%) create mode 100644 linker/deno.json create mode 100644 linker/mod.ts rename {packages/linker/src => linker}/templates/SimpleTemplate.ts (63%) create mode 100644 linker/templates/index.ts rename {packages/linker/src => linker}/test/Conditionals.test.ts (64%) rename {packages/linker/src => linker}/test/Extends.test.ts (83%) create mode 100644 linker/test/GleamImport.test.ts create mode 100644 linker/test/ImportCases.test.ts rename {packages/linker/src => linker}/test/ImportResolutionMap.test.ts (88%) rename {packages/linker/src => linker}/test/ImportSyntaxCases.test.ts (70%) rename {packages/linker/src => linker}/test/Importing.test.ts (88%) rename {packages/linker/src => linker}/test/LinkPackage.test.ts (84%) rename {packages/linker/src => linker}/test/Linker.test.ts (94%) rename {packages/linker/src => linker}/test/LinkerGenerator.test.ts (98%) rename {packages/linker/src => linker}/test/MatchWgslD.test.ts (83%) rename {packages/linker/src => linker}/test/ModuleRegistry.test.ts (93%) rename {packages/linker/src => linker}/test/ParseComments.test.ts (67%) rename {packages/linker/src => linker}/test/ParseDirectives.test.ts (51%) rename {packages/linker/src => linker}/test/ParseModule.test.ts (67%) rename {packages/linker/src => linker}/test/ParseWgslD.test.ts (67%) rename {packages/linker/src => linker}/test/PathUtil.test.ts (94%) rename {packages/linker/src => linker}/test/ResolveImport.test.ts (87%) rename {packages/linker/src => linker}/test/ScratchTest.test.ts (100%) rename {packages/linker/src => linker}/test/Slicer.test.ts (78%) rename {packages/linker/src => linker}/test/TestSetup.ts (50%) rename {packages/linker/src => linker}/test/TestUtil.ts (81%) rename {packages/linker/src => linker}/test/TraverseRefs.test.ts (89%) rename {packages/linker/src => linker}/test/Util.test.ts (91%) rename {packages/linker/src => linker}/test/WgslTests.ts (100%) create mode 100644 linker/test/__snapshots__/Conditionals.test.ts.snap create mode 100644 linker/test/__snapshots__/ParseComments.test.ts.snap create mode 100644 linker/test/__snapshots__/ParseDirectives.test.ts.snap create mode 100644 linker/test/__snapshots__/ParseModule.test.ts.snap create mode 100644 linker/test/__snapshots__/ParseWgslD.test.ts.snap create mode 100644 linker/test/__snapshots__/Slicer.test.ts.snap create mode 100644 linker/test/__snapshots__/TraverseRefs.test.ts.snap rename {packages/linker/src => linker}/test/shared/StringUtil.ts (100%) rename {packages/linker/src => linker}/test/shared/test/StringUtil.test.ts (93%) rename {packages/mini-parse/src => mini-parse}/CombinatorTypes.ts (98%) rename {packages/mini-parse/src => mini-parse}/MatchingLexer.ts (94%) rename {packages/mini-parse/src => mini-parse}/Parser.ts (98%) rename {packages/mini-parse/src => mini-parse}/ParserCombinator.ts (97%) rename {packages/mini-parse/src => mini-parse}/ParserLogging.ts (96%) rename {packages/mini-parse/src => mini-parse}/ParserTracing.ts (98%) rename {packages/mini-parse/src => mini-parse}/ParserUtil.ts (100%) rename {packages/mini-parse => mini-parse}/README.md (100%) rename {packages/mini-parse/src => mini-parse}/SrcMap.ts (100%) rename {packages/mini-parse/src => mini-parse}/TokenMatcher.ts (94%) create mode 100644 mini-parse/deno.json rename {packages/mini-parse/src => mini-parse}/examples/BlogExample.ts (72%) rename {packages/mini-parse/src => mini-parse}/examples/CalculatorExample.ts (89%) rename {packages/mini-parse/src => mini-parse}/examples/CalculatorResultsExample.ts (88%) rename {packages/mini-parse/src => mini-parse}/examples/DocExamples.ts (95%) create mode 100644 mini-parse/mod.ts rename {packages/mini-parse/src => mini-parse}/test-util/LogCatcher.ts (100%) rename {packages/mini-parse/src => mini-parse}/test-util/TestParse.ts (90%) create mode 100644 mini-parse/test-util/index.ts rename {packages/mini-parse/src => mini-parse}/test/BlogExample.test.ts (89%) rename {packages/mini-parse/src => mini-parse}/test/CalculatorExample.test.ts (86%) rename {packages/mini-parse/src => mini-parse}/test/CalculatorResultsExample.test.ts (85%) rename {packages/mini-parse/src => mini-parse}/test/Chain.test.ts (100%) rename {packages/mini-parse/src => mini-parse}/test/ParserCombinator.test.ts (88%) rename {packages/mini-parse/src => mini-parse}/test/ParserLogging.test.ts (65%) rename {packages/mini-parse/src => mini-parse}/test/ParserUtil.test.ts (84%) rename {packages/mini-parse/src => mini-parse}/test/SrcMap.test.ts (58%) create mode 100644 mini-parse/test/TestSetup.ts rename {packages/mini-parse/src => mini-parse}/test/TokenMatcher.test.ts (91%) create mode 100644 mini-parse/test/__snapshots__/ParserCombinator.test.ts.snap create mode 100644 mini-parse/test/__snapshots__/ParserLogging.test.ts.snap create mode 100644 mini-parse/test/__snapshots__/SrcMap.test.ts.snap delete mode 100644 package.json rename packages/packager/ReadMe.md => packager/README.md (100%) create mode 100644 packager/deno.json create mode 100644 packager/main.ts rename {packages/packager/src => packager}/packageWgsl.ts (96%) rename {packages/packager/src => packager}/packagerCli.ts (95%) rename {packages/packager/src => packager}/test/packager.test.ts (81%) rename {packages/packager/src => packager}/test/wgsl-package/package.json (100%) rename {packages/packager/src => packager}/test/wgsl-package/src/lib.wesl (100%) rename {packages/packager/src => packager}/test/wgsl-package/src/util.wgsl (100%) rename {packages/cli => packager/test/wgsl-package}/src/viteTypes.d.ts (100%) delete mode 100644 packages/bulk-test/tsconfig.json delete mode 100644 packages/cli/.gitignore delete mode 100644 packages/cli/package.json delete mode 100644 packages/cli/src/main.ts delete mode 100644 packages/cli/tsconfig.json delete mode 100644 packages/cli/vite.config.ts delete mode 100644 packages/linker/.gitignore delete mode 100644 packages/linker/base.vite.config.ts delete mode 100644 packages/linker/minified.vite.config.ts delete mode 100644 packages/linker/package.json delete mode 100644 packages/linker/src/index.ts delete mode 100644 packages/linker/src/templates/index.ts delete mode 100644 packages/linker/src/test/LinkGlob.test.ts delete mode 100644 packages/linker/src/test/__snapshots__/ParseComments.test.ts.snap delete mode 100644 packages/linker/src/test/__snapshots__/ParseDirectives.test.ts.snap delete mode 100644 packages/linker/src/test/__snapshots__/ParseModule.test.ts.snap delete mode 100644 packages/linker/src/test/__snapshots__/ParseWgslD.test.ts.snap delete mode 100644 packages/linker/src/test/__snapshots__/RustDirective.test.ts.snap delete mode 100644 packages/linker/src/test/__snapshots__/TraverseRefs.test.ts.snap delete mode 100644 packages/linker/src/test/wgsl_1/main.wgsl delete mode 100644 packages/linker/src/test/wgsl_1/util.wgsl delete mode 100644 packages/linker/src/test/wgsl_2/main2.wgsl delete mode 100644 packages/linker/src/test/wgsl_2/util2.wgsl delete mode 100644 packages/linker/templates.vite.config.ts delete mode 100644 packages/linker/tsconfig-node.json delete mode 100644 packages/linker/tsconfig.json delete mode 100644 packages/linker/vite.config.ts delete mode 100644 packages/mini-parse/.markdownlint.json delete mode 100644 packages/mini-parse/base.vite.config.ts delete mode 100644 packages/mini-parse/minified.vite.config.ts delete mode 100644 packages/mini-parse/package.json delete mode 100644 packages/mini-parse/src/index.ts delete mode 100644 packages/mini-parse/src/test-util/index.ts delete mode 100644 packages/mini-parse/src/test/TestSetup.ts delete mode 100644 packages/mini-parse/src/test/__snapshots__/ParserCombinator.test.ts.snap delete mode 100644 packages/mini-parse/test-util.vite.config.ts delete mode 100644 packages/mini-parse/tsconfig-node.json delete mode 100644 packages/mini-parse/tsconfig.json delete mode 100644 packages/mini-parse/vite.config.ts delete mode 100644 packages/packager/.gitignore delete mode 100644 packages/packager/build.ts delete mode 100644 packages/packager/package.json delete mode 100644 packages/packager/src/test/wgsl-package/src/viteTypes.d.ts delete mode 100644 packages/packager/tsconfig.json delete mode 100644 packages/packager/vite.config.ts delete mode 100644 packages/test-package/out/wgsl.d.ts delete mode 100644 packages/test-package/out/wgsl.js delete mode 100644 packages/test-package/package.json delete mode 100644 pnpm-lock.yaml delete mode 100644 pnpm-workspace.yaml delete mode 100644 scripts/bump.ts delete mode 100755 scripts/runTs create mode 100644 testlib/README.md create mode 100644 testlib/deno.json create mode 100644 testlib/mod.ts diff --git a/.gitignore b/.gitignore index da183bd09..77738287f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,20 +1 @@ -# dependency packages -node_modules - -# bundled release -dist - -# macOS -.DS_Store - -# vi temp files -*.swp - -# typescript build info cache files -*.tsbuildinfo - -# output file for esbuild meta.data for bundle size analysis -meta.json - -# output file for rollup-plugin-visualizer -stats.html \ No newline at end of file +dist/ \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..f0820f072 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "deno.enable": true, + "deno.lint": true, + "[typescript]": { "editor.defaultFormatter": "denoland.vscode-deno" } +} diff --git a/README.md b/README.md index 684ca356e..40bd6c41c 100644 --- a/README.md +++ b/README.md @@ -20,3 +20,11 @@ The linker will rename one of them, and all the calls to the renamed function. You get only that function and its references, not the whole file. **wgsl-linker** is currently being revised to follow the upcoming community [WESL standard](https://github.com/wgsl-tooling-wg/wesl-spec). + +## Development + +Deno is used for almost everything. +- `deno install` for setup +- `deno lint` for linting +- `deno test --allow-read` to run the unit tests + - To update the snapshots, run `deno test --allow-all -- --update` \ No newline at end of file diff --git a/packages/cli/README.md b/cli/README.md similarity index 100% rename from packages/cli/README.md rename to cli/README.md diff --git a/packages/cli/src/cli.ts b/cli/cli.ts similarity index 97% rename from packages/cli/src/cli.ts rename to cli/cli.ts index 8903b1d21..6444b2508 100644 --- a/packages/cli/src/cli.ts +++ b/cli/cli.ts @@ -1,8 +1,8 @@ import { createTwoFilesPatch } from "diff"; import fs from "fs"; import { ModuleRegistry, normalize } from "wgsl-linker"; -import yargs from "yargs"; -import { TypeRefElem } from "../../linker/src/AbstractElems.js"; +import { createTwoFilesPatch } from "diff"; +import { TypeRefElem } from "../linker/AbstractElems.ts"; type CliArgs = ReturnType; let argv: CliArgs; diff --git a/cli/deno.json b/cli/deno.json new file mode 100644 index 000000000..86da9cac2 --- /dev/null +++ b/cli/deno.json @@ -0,0 +1,9 @@ +{ + "version": "0.1.0", + "tasks": { + "dev": "deno run --watch main.ts" + }, + "imports": { + "yargs": "https://deno.land/x/yargs@v17.7.2-deno/deno.ts" + } +} \ No newline at end of file diff --git a/cli/main.ts b/cli/main.ts new file mode 100644 index 000000000..500f549dc --- /dev/null +++ b/cli/main.ts @@ -0,0 +1,3 @@ +#!/usr/bin/env node +import { cli } from "./cli.ts"; +cli(Deno.args); diff --git a/packages/cli/src/test/__snapshots__/wgsl-link.test.ts.snap b/cli/test/__snapshots__/wgsl-link.test.ts.snap similarity index 100% rename from packages/cli/src/test/__snapshots__/wgsl-link.test.ts.snap rename to cli/test/__snapshots__/wgsl-link.test.ts.snap diff --git a/packages/cli/src/test/wgsl-link.test.ts b/cli/test/wgsl-link.test.ts similarity index 96% rename from packages/cli/src/test/wgsl-link.test.ts rename to cli/test/wgsl-link.test.ts index 8f9de3825..24054d086 100644 --- a/packages/cli/src/test/wgsl-link.test.ts +++ b/cli/test/wgsl-link.test.ts @@ -1,5 +1,5 @@ import { expect, test, vi } from "vitest"; -import { cli } from "../cli.js"; +import { cli } from "../cli.ts"; /** so vitest triggers when these files change */ import("./src/test/wgsl/main.wgsl?raw"); diff --git a/packages/cli/src/test/wgsl/main.wgsl b/cli/test/wgsl/main.wgsl similarity index 100% rename from packages/cli/src/test/wgsl/main.wgsl rename to cli/test/wgsl/main.wgsl diff --git a/packages/cli/src/test/wgsl/util.wgsl b/cli/test/wgsl/util.wgsl similarity index 100% rename from packages/cli/src/test/wgsl/util.wgsl rename to cli/test/wgsl/util.wgsl diff --git a/deno.json b/deno.json new file mode 100644 index 000000000..46413ae2f --- /dev/null +++ b/deno.json @@ -0,0 +1,28 @@ +{ + "tasks": { + "dev": "deno test --watch --allow-read" + }, + "license": "MIT", + "imports": { + "@std/assert": "jsr:@std/assert@1", + "@std/expect": "jsr:@std/expect@1", + "@std/testing": "jsr:@std/testing@1", + "vitest": "./testlib/mod.ts", + "wesl-testsuite": "../../wesl-testsuite/src/index.ts" + }, + "workspace": [ + "./mini-parse", + "./packager", + "./cli", + "./linker", + "./testlib" + ], + "compilerOptions": { + "lib": [ + "dom", + "dom.iterable", + "dom.asynciterable", + "deno.ns" + ] + } +} \ No newline at end of file diff --git a/deno.lock b/deno.lock new file mode 100644 index 000000000..d27c6a12a --- /dev/null +++ b/deno.lock @@ -0,0 +1,216 @@ +{ + "version": "4", + "specifiers": { + "jsr:@std/assert@1": "1.0.7", + "jsr:@std/assert@^1.0.7": "1.0.7", + "jsr:@std/async@^1.0.8": "1.0.8", + "jsr:@std/data-structures@^1.0.4": "1.0.4", + "jsr:@std/expect@1": "1.0.7", + "jsr:@std/fs@^1.0.5": "1.0.5", + "jsr:@std/internal@^1.0.5": "1.0.5", + "jsr:@std/path@^1.0.7": "1.0.8", + "jsr:@std/path@^1.0.8": "1.0.8", + "jsr:@std/testing@1": "1.0.4" + }, + "jsr": { + "@std/assert@1.0.7": { + "integrity": "64ce9fac879e0b9f3042a89b3c3f8ccfc9c984391af19e2087513a79d73e28c3", + "dependencies": [ + "jsr:@std/internal" + ] + }, + "@std/async@1.0.8": { + "integrity": "c057c5211a0f1d12e7dcd111ab430091301b8d64b4250052a79d277383bc3ba7" + }, + "@std/data-structures@1.0.4": { + "integrity": "fa0e20c11eb9ba673417450915c750a0001405a784e2a4e0c3725031681684a0" + }, + "@std/expect@1.0.7": { + "integrity": "3904afa77cfe5c45dd2cd2c476e6fc5b6f57103d712890f0783d74c19d4b05a9", + "dependencies": [ + "jsr:@std/assert@^1.0.7", + "jsr:@std/internal" + ] + }, + "@std/fs@1.0.5": { + "integrity": "41806ad6823d0b5f275f9849a2640d87e4ef67c51ee1b8fb02426f55e02fd44e", + "dependencies": [ + "jsr:@std/path@^1.0.7" + ] + }, + "@std/internal@1.0.5": { + "integrity": "54a546004f769c1ac9e025abd15a76b6671ddc9687e2313b67376125650dc7ba" + }, + "@std/path@1.0.8": { + "integrity": "548fa456bb6a04d3c1a1e7477986b6cffbce95102d0bb447c67c4ee70e0364be" + }, + "@std/testing@1.0.4": { + "integrity": "ca1368d720b183f572d40c469bb9faf09643ddd77b54f8b44d36ae6b94940576", + "dependencies": [ + "jsr:@std/assert@^1.0.7", + "jsr:@std/async", + "jsr:@std/data-structures", + "jsr:@std/fs", + "jsr:@std/internal", + "jsr:@std/path@^1.0.8" + ] + } + }, + "redirects": { + "https://deno.land/std/fmt/printf.ts": "https://deno.land/std@0.224.0/fmt/printf.ts", + "https://deno.land/std/path/mod.ts": "https://deno.land/std@0.224.0/path/mod.ts", + "https://deno.land/std/testing/asserts.ts": "https://deno.land/std@0.224.0/testing/asserts.ts" + }, + "remote": { + "https://deno.land/std@0.224.0/assert/_constants.ts": "a271e8ef5a573f1df8e822a6eb9d09df064ad66a4390f21b3e31f820a38e0975", + "https://deno.land/std@0.224.0/assert/assert.ts": "09d30564c09de846855b7b071e62b5974b001bb72a4b797958fe0660e7849834", + "https://deno.land/std@0.224.0/assert/assert_almost_equals.ts": "9e416114322012c9a21fa68e187637ce2d7df25bcbdbfd957cd639e65d3cf293", + "https://deno.land/std@0.224.0/assert/assert_array_includes.ts": "14c5094471bc8e4a7895fc6aa5a184300d8a1879606574cb1cd715ef36a4a3c7", + "https://deno.land/std@0.224.0/assert/assert_equals.ts": "3bbca947d85b9d374a108687b1a8ba3785a7850436b5a8930d81f34a32cb8c74", + "https://deno.land/std@0.224.0/assert/assert_exists.ts": "43420cf7f956748ae6ed1230646567b3593cb7a36c5a5327269279c870c5ddfd", + "https://deno.land/std@0.224.0/assert/assert_false.ts": "3e9be8e33275db00d952e9acb0cd29481a44fa0a4af6d37239ff58d79e8edeff", + "https://deno.land/std@0.224.0/assert/assert_greater.ts": "5e57b201fd51b64ced36c828e3dfd773412c1a6120c1a5a99066c9b261974e46", + "https://deno.land/std@0.224.0/assert/assert_greater_or_equal.ts": "9870030f997a08361b6f63400273c2fb1856f5db86c0c3852aab2a002e425c5b", + "https://deno.land/std@0.224.0/assert/assert_instance_of.ts": "e22343c1fdcacfaea8f37784ad782683ec1cf599ae9b1b618954e9c22f376f2c", + "https://deno.land/std@0.224.0/assert/assert_is_error.ts": "f856b3bc978a7aa6a601f3fec6603491ab6255118afa6baa84b04426dd3cc491", + "https://deno.land/std@0.224.0/assert/assert_less.ts": "60b61e13a1982865a72726a5fa86c24fad7eb27c3c08b13883fb68882b307f68", + "https://deno.land/std@0.224.0/assert/assert_less_or_equal.ts": "d2c84e17faba4afe085e6c9123a63395accf4f9e00150db899c46e67420e0ec3", + "https://deno.land/std@0.224.0/assert/assert_match.ts": "ace1710dd3b2811c391946954234b5da910c5665aed817943d086d4d4871a8b7", + "https://deno.land/std@0.224.0/assert/assert_not_equals.ts": "78d45dd46133d76ce624b2c6c09392f6110f0df9b73f911d20208a68dee2ef29", + "https://deno.land/std@0.224.0/assert/assert_not_instance_of.ts": "3434a669b4d20cdcc5359779301a0588f941ffdc2ad68803c31eabdb4890cf7a", + "https://deno.land/std@0.224.0/assert/assert_not_match.ts": "df30417240aa2d35b1ea44df7e541991348a063d9ee823430e0b58079a72242a", + "https://deno.land/std@0.224.0/assert/assert_not_strict_equals.ts": "37f73880bd672709373d6dc2c5f148691119bed161f3020fff3548a0496f71b8", + "https://deno.land/std@0.224.0/assert/assert_object_match.ts": "411450fd194fdaabc0089ae68f916b545a49d7b7e6d0026e84a54c9e7eed2693", + "https://deno.land/std@0.224.0/assert/assert_rejects.ts": "4bee1d6d565a5b623146a14668da8f9eb1f026a4f338bbf92b37e43e0aa53c31", + "https://deno.land/std@0.224.0/assert/assert_strict_equals.ts": "b4f45f0fd2e54d9029171876bd0b42dd9ed0efd8f853ab92a3f50127acfa54f5", + "https://deno.land/std@0.224.0/assert/assert_string_includes.ts": "496b9ecad84deab72c8718735373feb6cdaa071eb91a98206f6f3cb4285e71b8", + "https://deno.land/std@0.224.0/assert/assert_throws.ts": "c6508b2879d465898dab2798009299867e67c570d7d34c90a2d235e4553906eb", + "https://deno.land/std@0.224.0/assert/assertion_error.ts": "ba8752bd27ebc51f723702fac2f54d3e94447598f54264a6653d6413738a8917", + "https://deno.land/std@0.224.0/assert/equal.ts": "bddf07bb5fc718e10bb72d5dc2c36c1ce5a8bdd3b647069b6319e07af181ac47", + "https://deno.land/std@0.224.0/assert/fail.ts": "0eba674ffb47dff083f02ced76d5130460bff1a9a68c6514ebe0cdea4abadb68", + "https://deno.land/std@0.224.0/assert/mod.ts": "48b8cb8a619ea0b7958ad7ee9376500fe902284bb36f0e32c598c3dc34cbd6f3", + "https://deno.land/std@0.224.0/assert/unimplemented.ts": "8c55a5793e9147b4f1ef68cd66496b7d5ba7a9e7ca30c6da070c1a58da723d73", + "https://deno.land/std@0.224.0/assert/unreachable.ts": "5ae3dbf63ef988615b93eb08d395dda771c96546565f9e521ed86f6510c29e19", + "https://deno.land/std@0.224.0/fmt/colors.ts": "508563c0659dd7198ba4bbf87e97f654af3c34eb56ba790260f252ad8012e1c5", + "https://deno.land/std@0.224.0/fmt/printf.ts": "8d01408076e2f956b03dd8377010c4974515d6cc909978d2edc5c8cd75077eeb", + "https://deno.land/std@0.224.0/internal/diff.ts": "6234a4b493ebe65dc67a18a0eb97ef683626a1166a1906232ce186ae9f65f4e6", + "https://deno.land/std@0.224.0/internal/format.ts": "0a98ee226fd3d43450245b1844b47003419d34d210fa989900861c79820d21c2", + "https://deno.land/std@0.224.0/internal/mod.ts": "534125398c8e7426183e12dc255bb635d94e06d0f93c60a297723abe69d3b22e", + "https://deno.land/std@0.224.0/path/_common/assert_path.ts": "dbdd757a465b690b2cc72fc5fb7698c51507dec6bfafce4ca500c46b76ff7bd8", + "https://deno.land/std@0.224.0/path/_common/basename.ts": "569744855bc8445f3a56087fd2aed56bdad39da971a8d92b138c9913aecc5fa2", + "https://deno.land/std@0.224.0/path/_common/common.ts": "ef73c2860694775fe8ffcbcdd387f9f97c7a656febf0daa8c73b56f4d8a7bd4c", + "https://deno.land/std@0.224.0/path/_common/constants.ts": "dc5f8057159f4b48cd304eb3027e42f1148cf4df1fb4240774d3492b5d12ac0c", + "https://deno.land/std@0.224.0/path/_common/dirname.ts": "684df4aa71a04bbcc346c692c8485594fc8a90b9408dfbc26ff32cf3e0c98cc8", + "https://deno.land/std@0.224.0/path/_common/format.ts": "92500e91ea5de21c97f5fe91e178bae62af524b72d5fcd246d6d60ae4bcada8b", + "https://deno.land/std@0.224.0/path/_common/from_file_url.ts": "d672bdeebc11bf80e99bf266f886c70963107bdd31134c4e249eef51133ceccf", + "https://deno.land/std@0.224.0/path/_common/glob_to_reg_exp.ts": "6cac16d5c2dc23af7d66348a7ce430e5de4e70b0eede074bdbcf4903f4374d8d", + "https://deno.land/std@0.224.0/path/_common/normalize.ts": "684df4aa71a04bbcc346c692c8485594fc8a90b9408dfbc26ff32cf3e0c98cc8", + "https://deno.land/std@0.224.0/path/_common/normalize_string.ts": "33edef773c2a8e242761f731adeb2bd6d683e9c69e4e3d0092985bede74f4ac3", + "https://deno.land/std@0.224.0/path/_common/relative.ts": "faa2753d9b32320ed4ada0733261e3357c186e5705678d9dd08b97527deae607", + "https://deno.land/std@0.224.0/path/_common/strip_trailing_separators.ts": "7024a93447efcdcfeaa9339a98fa63ef9d53de363f1fbe9858970f1bba02655a", + "https://deno.land/std@0.224.0/path/_common/to_file_url.ts": "7f76adbc83ece1bba173e6e98a27c647712cab773d3f8cbe0398b74afc817883", + "https://deno.land/std@0.224.0/path/_interface.ts": "8dfeb930ca4a772c458a8c7bbe1e33216fe91c253411338ad80c5b6fa93ddba0", + "https://deno.land/std@0.224.0/path/_os.ts": "8fb9b90fb6b753bd8c77cfd8a33c2ff6c5f5bc185f50de8ca4ac6a05710b2c15", + "https://deno.land/std@0.224.0/path/basename.ts": "7ee495c2d1ee516ffff48fb9a93267ba928b5a3486b550be73071bc14f8cc63e", + "https://deno.land/std@0.224.0/path/common.ts": "03e52e22882402c986fe97ca3b5bb4263c2aa811c515ce84584b23bac4cc2643", + "https://deno.land/std@0.224.0/path/constants.ts": "0c206169ca104938ede9da48ac952de288f23343304a1c3cb6ec7625e7325f36", + "https://deno.land/std@0.224.0/path/dirname.ts": "85bd955bf31d62c9aafdd7ff561c4b5fb587d11a9a5a45e2b01aedffa4238a7c", + "https://deno.land/std@0.224.0/path/extname.ts": "593303db8ae8c865cbd9ceec6e55d4b9ac5410c1e276bfd3131916591b954441", + "https://deno.land/std@0.224.0/path/format.ts": "6ce1779b0980296cf2bc20d66436b12792102b831fd281ab9eb08fa8a3e6f6ac", + "https://deno.land/std@0.224.0/path/from_file_url.ts": "911833ae4fd10a1c84f6271f36151ab785955849117dc48c6e43b929504ee069", + "https://deno.land/std@0.224.0/path/glob_to_regexp.ts": "7f30f0a21439cadfdae1be1bf370880b415e676097fda584a63ce319053b5972", + "https://deno.land/std@0.224.0/path/is_absolute.ts": "4791afc8bfd0c87f0526eaa616b0d16e7b3ab6a65b62942e50eac68de4ef67d7", + "https://deno.land/std@0.224.0/path/is_glob.ts": "a65f6195d3058c3050ab905705891b412ff942a292bcbaa1a807a74439a14141", + "https://deno.land/std@0.224.0/path/join.ts": "ae2ec5ca44c7e84a235fd532e4a0116bfb1f2368b394db1c4fb75e3c0f26a33a", + "https://deno.land/std@0.224.0/path/join_globs.ts": "5b3bf248b93247194f94fa6947b612ab9d3abd571ca8386cf7789038545e54a0", + "https://deno.land/std@0.224.0/path/mod.ts": "f6bd79cb08be0e604201bc9de41ac9248582699d1b2ee0ab6bc9190d472cf9cd", + "https://deno.land/std@0.224.0/path/normalize.ts": "4155743ccceeed319b350c1e62e931600272fad8ad00c417b91df093867a8352", + "https://deno.land/std@0.224.0/path/normalize_glob.ts": "cc89a77a7d3b1d01053b9dcd59462b75482b11e9068ae6c754b5cf5d794b374f", + "https://deno.land/std@0.224.0/path/parse.ts": "77ad91dcb235a66c6f504df83087ce2a5471e67d79c402014f6e847389108d5a", + "https://deno.land/std@0.224.0/path/posix/_util.ts": "1e3937da30f080bfc99fe45d7ed23c47dd8585c5e473b2d771380d3a6937cf9d", + "https://deno.land/std@0.224.0/path/posix/basename.ts": "d2fa5fbbb1c5a3ab8b9326458a8d4ceac77580961b3739cd5bfd1d3541a3e5f0", + "https://deno.land/std@0.224.0/path/posix/common.ts": "26f60ccc8b2cac3e1613000c23ac5a7d392715d479e5be413473a37903a2b5d4", + "https://deno.land/std@0.224.0/path/posix/constants.ts": "93481efb98cdffa4c719c22a0182b994e5a6aed3047e1962f6c2c75b7592bef1", + "https://deno.land/std@0.224.0/path/posix/dirname.ts": "76cd348ffe92345711409f88d4d8561d8645353ac215c8e9c80140069bf42f00", + "https://deno.land/std@0.224.0/path/posix/extname.ts": "e398c1d9d1908d3756a7ed94199fcd169e79466dd88feffd2f47ce0abf9d61d2", + "https://deno.land/std@0.224.0/path/posix/format.ts": "185e9ee2091a42dd39e2a3b8e4925370ee8407572cee1ae52838aed96310c5c1", + "https://deno.land/std@0.224.0/path/posix/from_file_url.ts": "951aee3a2c46fd0ed488899d024c6352b59154c70552e90885ed0c2ab699bc40", + "https://deno.land/std@0.224.0/path/posix/glob_to_regexp.ts": "76f012fcdb22c04b633f536c0b9644d100861bea36e9da56a94b9c589a742e8f", + "https://deno.land/std@0.224.0/path/posix/is_absolute.ts": "cebe561ad0ae294f0ce0365a1879dcfca8abd872821519b4fcc8d8967f888ede", + "https://deno.land/std@0.224.0/path/posix/is_glob.ts": "8a8b08c08bf731acf2c1232218f1f45a11131bc01de81e5f803450a5914434b9", + "https://deno.land/std@0.224.0/path/posix/join.ts": "7fc2cb3716aa1b863e990baf30b101d768db479e70b7313b4866a088db016f63", + "https://deno.land/std@0.224.0/path/posix/join_globs.ts": "a9475b44645feddceb484ee0498e456f4add112e181cb94042cdc6d47d1cdd25", + "https://deno.land/std@0.224.0/path/posix/mod.ts": "2301fc1c54a28b349e20656f68a85f75befa0ee9b6cd75bfac3da5aca9c3f604", + "https://deno.land/std@0.224.0/path/posix/normalize.ts": "baeb49816a8299f90a0237d214cef46f00ba3e95c0d2ceb74205a6a584b58a91", + "https://deno.land/std@0.224.0/path/posix/normalize_glob.ts": "9c87a829b6c0f445d03b3ecadc14492e2864c3ebb966f4cea41e98326e4435c6", + "https://deno.land/std@0.224.0/path/posix/parse.ts": "09dfad0cae530f93627202f28c1befa78ea6e751f92f478ca2cc3b56be2cbb6a", + "https://deno.land/std@0.224.0/path/posix/relative.ts": "3907d6eda41f0ff723d336125a1ad4349112cd4d48f693859980314d5b9da31c", + "https://deno.land/std@0.224.0/path/posix/resolve.ts": "08b699cfeee10cb6857ccab38fa4b2ec703b0ea33e8e69964f29d02a2d5257cf", + "https://deno.land/std@0.224.0/path/posix/to_file_url.ts": "7aa752ba66a35049e0e4a4be5a0a31ac6b645257d2e031142abb1854de250aaf", + "https://deno.land/std@0.224.0/path/posix/to_namespaced_path.ts": "28b216b3c76f892a4dca9734ff1cc0045d135532bfd9c435ae4858bfa5a2ebf0", + "https://deno.land/std@0.224.0/path/relative.ts": "ab739d727180ed8727e34ed71d976912461d98e2b76de3d3de834c1066667add", + "https://deno.land/std@0.224.0/path/resolve.ts": "a6f977bdb4272e79d8d0ed4333e3d71367cc3926acf15ac271f1d059c8494d8d", + "https://deno.land/std@0.224.0/path/to_file_url.ts": "88f049b769bce411e2d2db5bd9e6fd9a185a5fbd6b9f5ad8f52bef517c4ece1b", + "https://deno.land/std@0.224.0/path/to_namespaced_path.ts": "b706a4103b104cfadc09600a5f838c2ba94dbcdb642344557122dda444526e40", + "https://deno.land/std@0.224.0/path/windows/_util.ts": "d5f47363e5293fced22c984550d5e70e98e266cc3f31769e1710511803d04808", + "https://deno.land/std@0.224.0/path/windows/basename.ts": "6bbc57bac9df2cec43288c8c5334919418d784243a00bc10de67d392ab36d660", + "https://deno.land/std@0.224.0/path/windows/common.ts": "26f60ccc8b2cac3e1613000c23ac5a7d392715d479e5be413473a37903a2b5d4", + "https://deno.land/std@0.224.0/path/windows/constants.ts": "5afaac0a1f67b68b0a380a4ef391bf59feb55856aa8c60dfc01bd3b6abb813f5", + "https://deno.land/std@0.224.0/path/windows/dirname.ts": "33e421be5a5558a1346a48e74c330b8e560be7424ed7684ea03c12c21b627bc9", + "https://deno.land/std@0.224.0/path/windows/extname.ts": "165a61b00d781257fda1e9606a48c78b06815385e7d703232548dbfc95346bef", + "https://deno.land/std@0.224.0/path/windows/format.ts": "bbb5ecf379305b472b1082cd2fdc010e44a0020030414974d6029be9ad52aeb6", + "https://deno.land/std@0.224.0/path/windows/from_file_url.ts": "ced2d587b6dff18f963f269d745c4a599cf82b0c4007356bd957cb4cb52efc01", + "https://deno.land/std@0.224.0/path/windows/glob_to_regexp.ts": "e45f1f89bf3fc36f94ab7b3b9d0026729829fabc486c77f414caebef3b7304f8", + "https://deno.land/std@0.224.0/path/windows/is_absolute.ts": "4a8f6853f8598cf91a835f41abed42112cebab09478b072e4beb00ec81f8ca8a", + "https://deno.land/std@0.224.0/path/windows/is_glob.ts": "8a8b08c08bf731acf2c1232218f1f45a11131bc01de81e5f803450a5914434b9", + "https://deno.land/std@0.224.0/path/windows/join.ts": "8d03530ab89195185103b7da9dfc6327af13eabdcd44c7c63e42e27808f50ecf", + "https://deno.land/std@0.224.0/path/windows/join_globs.ts": "a9475b44645feddceb484ee0498e456f4add112e181cb94042cdc6d47d1cdd25", + "https://deno.land/std@0.224.0/path/windows/mod.ts": "2301fc1c54a28b349e20656f68a85f75befa0ee9b6cd75bfac3da5aca9c3f604", + "https://deno.land/std@0.224.0/path/windows/normalize.ts": "78126170ab917f0ca355a9af9e65ad6bfa5be14d574c5fb09bb1920f52577780", + "https://deno.land/std@0.224.0/path/windows/normalize_glob.ts": "9c87a829b6c0f445d03b3ecadc14492e2864c3ebb966f4cea41e98326e4435c6", + "https://deno.land/std@0.224.0/path/windows/parse.ts": "08804327b0484d18ab4d6781742bf374976de662f8642e62a67e93346e759707", + "https://deno.land/std@0.224.0/path/windows/relative.ts": "3e1abc7977ee6cc0db2730d1f9cb38be87b0ce4806759d271a70e4997fc638d7", + "https://deno.land/std@0.224.0/path/windows/resolve.ts": "8dae1dadfed9d46ff46cc337c9525c0c7d959fb400a6308f34595c45bdca1972", + "https://deno.land/std@0.224.0/path/windows/to_file_url.ts": "40e560ee4854fe5a3d4d12976cef2f4e8914125c81b11f1108e127934ced502e", + "https://deno.land/std@0.224.0/path/windows/to_namespaced_path.ts": "4ffa4fb6fae321448d5fe810b3ca741d84df4d7897e61ee29be961a6aac89a4c", + "https://deno.land/std@0.224.0/testing/asserts.ts": "d0cdbabadc49cc4247a50732ee0df1403fdcd0f95360294ad448ae8c240f3f5c", + "https://deno.land/x/cliui@v7.0.4-deno/build/lib/index.js": "fb6030c7b12602a4fca4d81de3ddafa301ba84fd9df73c53de6f3bdda7b482d5", + "https://deno.land/x/cliui@v7.0.4-deno/build/lib/string-utils.js": "b3eb9d2e054a43a3064af17332fb1839a7dadb205c5371af4789616afb1a117f", + "https://deno.land/x/cliui@v7.0.4-deno/deno.ts": "d07bc3338661f8011e3a5fd215061d17a52107a5383c29f40ce0c1ecb8bb8cc3", + "https://deno.land/x/escalade@v3.0.3/sync.ts": "493bc66563292c5c10c4a75a467a5933f24dad67d74b0f5a87e7b988fe97c104", + "https://deno.land/x/y18n@v5.0.0-deno/build/lib/index.js": "92c4624714aa508d33c6d21c0b0ffa072369a8b306e5f8c7727662f570bbd026", + "https://deno.land/x/y18n@v5.0.0-deno/deno.ts": "80997f0709a0b43d29931e2b33946f2bbc32b13fd82f80a5409628455427e28d", + "https://deno.land/x/y18n@v5.0.0-deno/lib/platform-shims/deno.ts": "8fa2c96ac03734966260cfd2c5bc240e41725c913e5b64a0297aede09f52b39d", + "https://deno.land/x/yargs@v17.7.2-deno/build/lib/argsert.js": "eb085555452eac3ff300935994a42f35d16e04cf698cb775cb5ad4f5653c0627", + "https://deno.land/x/yargs@v17.7.2-deno/build/lib/command.js": "6249ffd299e16a1e531ccff13a23aed7b7eef37e20b6e6ab7f254413aece6ca6", + "https://deno.land/x/yargs@v17.7.2-deno/build/lib/completion-templates.js": "d9bbed244af4394b786f8abce9efbbdc3777a73458ebd7b6bf23b2495ac11027", + "https://deno.land/x/yargs@v17.7.2-deno/build/lib/completion.js": "62e41220b5baa7c082f72638c7eab23a69fff46a78011f2c448e2a2f1fcfd05a", + "https://deno.land/x/yargs@v17.7.2-deno/build/lib/middleware.js": "6ab9c953a83264739aa50d7fa6b1ab693500336dfd593b9958865e12beb8bdeb", + "https://deno.land/x/yargs@v17.7.2-deno/build/lib/parse-command.js": "327242c0afae207b7aefa13133439e3b321d7db4229febc5b7bd5285770ac7f7", + "https://deno.land/x/yargs@v17.7.2-deno/build/lib/typings/common-types.js": "9618b81a86acb88a61fd9988e9bc3ec21c5250d94fc2231ba7d898e71500789d", + "https://deno.land/x/yargs@v17.7.2-deno/build/lib/usage.js": "31faaa7aa61e5a57a2cac5a269b773aa8b1fcab2db7cac2f8252396f3ccc2f5e", + "https://deno.land/x/yargs@v17.7.2-deno/build/lib/utils/apply-extends.js": "64640dce92669705abead3bdbe2c46c8318c8623843a55e4726fb3c55ff9dd1d", + "https://deno.land/x/yargs@v17.7.2-deno/build/lib/utils/is-promise.js": "be45baa3090c5106dd4e442cceef6b357a268783a2ee28ec10fe131a8cd8db72", + "https://deno.land/x/yargs@v17.7.2-deno/build/lib/utils/levenshtein.js": "d8638efc3376b5f794b1c8df6ef4f3d484b29d919127c7fdc242400e3cfded91", + "https://deno.land/x/yargs@v17.7.2-deno/build/lib/utils/maybe-async-result.js": "31cf4026279e14c87d16faa14ac758f35c8cc5795d29393c5ce07120f5a3caf6", + "https://deno.land/x/yargs@v17.7.2-deno/build/lib/utils/obj-filter.js": "5523fb2288d1e86ed48c460e176770b49587554df4ae2405b468c093786b040b", + "https://deno.land/x/yargs@v17.7.2-deno/build/lib/utils/set-blocking.js": "6fa8ffc3299f456e42902736bae35fbc1f2dc96b3905a02ba9629f5bd9f80af1", + "https://deno.land/x/yargs@v17.7.2-deno/build/lib/utils/which-module.js": "9267633b2c9f8990b2c699101b641e59ae59932e0dee5270613c0508bfa13c5d", + "https://deno.land/x/yargs@v17.7.2-deno/build/lib/validation.js": "af040834cb9201d4238bbeb8f673eb2ebaff9611857270524a7c86dfcf2ca51b", + "https://deno.land/x/yargs@v17.7.2-deno/build/lib/yargs-factory.js": "05326932b431801d7459d5b14b21f73f13ebd74a8a74e9b7b8cec5f99ba14819", + "https://deno.land/x/yargs@v17.7.2-deno/build/lib/yerror.js": "9729aaa8bce1a0d00c57f470efb2ad76ad2988661bb48f3769e496a3435b4462", + "https://deno.land/x/yargs@v17.7.2-deno/deno.ts": "f3df0bfd08ba367ec36dc59ef6cab1a391ace49ad44387ec5fe5d76289af08af", + "https://deno.land/x/yargs@v17.7.2-deno/lib/platform-shims/deno.ts": "1d3d490a7f3c6f971a44dd92e12a042f988f1b6496df3a9c43ccc69563032dff", + "https://deno.land/x/yargs_parser@v20.2.4-deno/build/lib/string-utils.js": "12fc056b23703bc370aae5b179dc5abee53fca277abc30eaf76f78d2546d6413", + "https://deno.land/x/yargs_parser@v20.2.4-deno/build/lib/tokenize-arg-string.js": "7e0875b11795b8e217386e45f14b24a6e501ebbc62e15aa469aa8829d4d0ee61", + "https://deno.land/x/yargs_parser@v20.2.4-deno/build/lib/yargs-parser.js": "453200a7dfbb002e605d8009b7dad30f2b1d93665e046ab89c073a4fe63dfd48", + "https://deno.land/x/yargs_parser@v20.2.4-deno/deno.ts": "ad53c0c82c3982c4fc5be9472384b259e0a32ce1f7ae0f68de7b2445df5642fc" + }, + "workspace": { + "dependencies": [ + "jsr:@std/assert@1", + "jsr:@std/expect@1", + "jsr:@std/testing@1" + ] + } +} diff --git a/packages/linker/src/AbstractElems.ts b/linker/AbstractElems.ts similarity index 96% rename from packages/linker/src/AbstractElems.ts rename to linker/AbstractElems.ts index e9a781a67..8b799747a 100644 --- a/packages/linker/src/AbstractElems.ts +++ b/linker/AbstractElems.ts @@ -1,7 +1,7 @@ /** Structures for the abstract syntax tree constructed by the parser. */ -import { ImportTree } from "./ImportTree.js"; -import { FoundRef } from "./TraverseRefs.js"; +import { ImportTree } from "./ImportTree.ts"; +import { FoundRef } from "./TraverseRefs.ts"; export type AbstractElem = | AliasElem diff --git a/packages/linker/src/Conditionals.ts b/linker/Conditionals.ts similarity index 97% rename from packages/linker/src/Conditionals.ts rename to linker/Conditionals.ts index 80ae19129..7da4e756c 100644 --- a/packages/linker/src/Conditionals.ts +++ b/linker/Conditionals.ts @@ -23,9 +23,9 @@ import { tokenMatcher, tokenSkipSet, tracing, -} from "mini-parse"; -import { directive, eol } from "./MatchWgslD.js"; -import { ParseState } from "./ParseWgslD.js"; +} from "@wesl/mini-parse"; +import { directive, eol } from "./MatchWgslD.ts"; +import { ParseState } from "./ParseWgslD.ts"; export const conditionalsTokens = tokenMatcher( { diff --git a/packages/linker/src/GleamImport.ts b/linker/GleamImport.ts similarity index 95% rename from packages/linker/src/GleamImport.ts rename to linker/GleamImport.ts index 42a548b43..4d31de838 100644 --- a/packages/linker/src/GleamImport.ts +++ b/linker/GleamImport.ts @@ -17,17 +17,17 @@ import { tracing, withSepPlus, withTags, -} from "mini-parse"; -import { TreeImportElem } from "./AbstractElems.js"; +} from "@wesl/mini-parse"; +import { TreeImportElem } from "./AbstractElems.ts"; import { ImportTree, PathSegment, SegmentList, SimpleSegment, Wildcard, -} from "./ImportTree.js"; -import { digits, eol, word } from "./MatchWgslD.js"; -import { makeElem } from "./ParseSupport.js"; +} from "./ImportTree.ts"; +import { digits, eol, word } from "./MatchWgslD.ts"; +import { makeElem } from "./ParseSupport.ts"; const gleamImportSymbolSet = "/ { } , ( ) .. . * ;"; const gleamImportSymbol = matchOneOf(gleamImportSymbolSet); diff --git a/packages/linker/src/ImportResolutionMap.ts b/linker/ImportResolutionMap.ts similarity index 93% rename from packages/linker/src/ImportResolutionMap.ts rename to linker/ImportResolutionMap.ts index 2e255148e..3703636e8 100644 --- a/packages/linker/src/ImportResolutionMap.ts +++ b/linker/ImportResolutionMap.ts @@ -1,21 +1,21 @@ -import { ExportElem, TreeImportElem } from "./AbstractElems.js"; +import { ExportElem, TreeImportElem } from "./AbstractElems.ts"; import { ImportTree, PathSegment, SegmentList, SimpleSegment, Wildcard, -} from "./ImportTree.js"; -import { moduleLog } from "./LinkerLogging.js"; +} from "./ImportTree.ts"; +import { moduleLog } from "./LinkerLogging.ts"; import { GeneratorExport, GeneratorModule, ModuleExport, -} from "./ModuleRegistry.js"; -import { exportName, ParsedRegistry } from "./ParsedRegistry.js"; -import { TextModule } from "./ParseModule.js"; -import { dirname, normalize } from "./PathUtil.js"; -import { StringPairs } from "./TraverseRefs.js"; +} from "./ModuleRegistry.ts"; +import { exportName, ParsedRegistry } from "./ParsedRegistry.ts"; +import { TextModule } from "./ParseModule.ts"; +import { dirname, normalize } from "./PathUtil.ts"; +import { StringPairs } from "./TraverseRefs.ts"; /** * Maps to resolve imports to exports. @@ -60,10 +60,7 @@ class ExportPathToExport { } class ImportToExportPath { - constructor( - public importPath: string[], - public exportPath: string, - ) {} + constructor(public importPath: string[], public exportPath: string) {} } /** Expand all imports paths to their corresponding export paths diff --git a/packages/linker/src/ImportTree.ts b/linker/ImportTree.ts similarity index 100% rename from packages/linker/src/ImportTree.ts rename to linker/ImportTree.ts diff --git a/packages/linker/Internals.md b/linker/Internals.md similarity index 100% rename from packages/linker/Internals.md rename to linker/Internals.md diff --git a/packages/linker/src/LinkedElems.ts b/linker/LinkedElems.ts similarity index 60% rename from packages/linker/src/LinkedElems.ts rename to linker/LinkedElems.ts index 324e2550d..c2182ce59 100644 --- a/packages/linker/src/LinkedElems.ts +++ b/linker/LinkedElems.ts @@ -1,5 +1,5 @@ -import { CallElem, FnElem } from "./AbstractElems.js"; -import { TextModule } from "./ParseModule.js"; +import { CallElem, FnElem } from "./AbstractElems.ts"; +import { TextModule } from "./ParseModule.ts"; /** this is starting to look a lot like a FoundRef */ export interface LinkedCall { diff --git a/packages/linker/src/Linker.ts b/linker/Linker.ts similarity index 96% rename from packages/linker/src/Linker.ts rename to linker/Linker.ts index 232680777..0230e644c 100644 --- a/packages/linker/src/Linker.ts +++ b/linker/Linker.ts @@ -6,19 +6,20 @@ import { StructMemberElem, TypeRefElem, VarElem, -} from "./AbstractElems.js"; -import { refLog } from "./LinkerLogging.js"; -import { ParsedRegistry } from "./ParsedRegistry.js"; -import { TextModule } from "./ParseModule.js"; -import { SliceReplace, sliceReplace } from "./Slicer.js"; +} from "./AbstractElems.ts"; +import { refLog } from "./LinkerLogging.ts"; +import { ParsedRegistry } from "./ParsedRegistry.ts"; +import { TextModule } from "./ParseModule.ts"; +import { SliceReplace, sliceReplace } from "./Slicer.ts"; import { FoundRef, GeneratorRef, refName, TextRef, traverseRefs, -} from "./TraverseRefs.js"; -import { partition, replaceWords } from "./Util.js"; +} from "./TraverseRefs.ts"; +import { partition, replaceWords } from "./Util.ts"; +import { printRef } from "./RefDebug.ts"; type DirectiveRef = { kind: "dir"; diff --git a/packages/linker/src/LinkerLogging.ts b/linker/LinkerLogging.ts similarity index 76% rename from packages/linker/src/LinkerLogging.ts rename to linker/LinkerLogging.ts index cab471f47..a99aaebfb 100644 --- a/packages/linker/src/LinkerLogging.ts +++ b/linker/LinkerLogging.ts @@ -1,7 +1,7 @@ -import { logger, srcLog } from "mini-parse"; -import { AbstractElem } from "./AbstractElems.js"; -import { TextModule } from "./ParseModule.js"; -import { FoundRef } from "./TraverseRefs.js"; +import { logger, srcLog } from "@wesl/mini-parse"; +import { AbstractElem } from "./AbstractElems.ts"; +import { TextModule } from "./ParseModule.ts"; +import { FoundRef } from "./TraverseRefs.ts"; export function refLog(ref: FoundRef, ...msgs: any[]): void { if (ref.kind !== "gen") { diff --git a/packages/linker/src/LogResolveMap.ts b/linker/LogResolveMap.ts similarity index 90% rename from packages/linker/src/LogResolveMap.ts rename to linker/LogResolveMap.ts index b5fa66056..a00db7549 100644 --- a/packages/linker/src/LogResolveMap.ts +++ b/linker/LogResolveMap.ts @@ -1,5 +1,5 @@ -import { ResolveMap } from "./ImportResolutionMap.js"; -import { ModuleExport } from "./ModuleRegistry.js"; +import { ResolveMap } from "./ImportResolutionMap.ts"; +import { ModuleExport } from "./ModuleRegistry.ts"; export function logResolveMap(resolveMap: ResolveMap): void { const pathEntries = pathsToStrings(resolveMap); diff --git a/packages/linker/src/MatchWgslD.ts b/linker/MatchWgslD.ts similarity index 95% rename from packages/linker/src/MatchWgslD.ts rename to linker/MatchWgslD.ts index 2fdd2ceaf..dde5ba037 100644 --- a/packages/linker/src/MatchWgslD.ts +++ b/linker/MatchWgslD.ts @@ -1,4 +1,4 @@ -import { matchOneOf, tokenMatcher } from "mini-parse"; +import { matchOneOf, tokenMatcher } from "@wesl/mini-parse"; /** token matchers for wgsl with #directives */ @@ -85,7 +85,7 @@ export const treeImportTokens = tokenMatcher( word, digits, }, - "treeTokens", + "treeTokens" ); export const rootWs = tokenMatcher( @@ -93,5 +93,5 @@ export const rootWs = tokenMatcher( blanks: /\s+/, other: /[^\s]+/, }, - "rootWs", + "rootWs" ); diff --git a/packages/linker/src/ModuleRegistry.ts b/linker/ModuleRegistry.ts similarity index 94% rename from packages/linker/src/ModuleRegistry.ts rename to linker/ModuleRegistry.ts index ff6f2a7cf..4d3e08e10 100644 --- a/packages/linker/src/ModuleRegistry.ts +++ b/linker/ModuleRegistry.ts @@ -1,8 +1,8 @@ -import { SrcMap } from "mini-parse"; -import { ParsedRegistry } from "./ParsedRegistry.js"; -import { TextExport, TextModule } from "./ParseModule.js"; -import { normalize } from "./PathUtil.js"; -import { WgslBundle } from "./WgslBundle.js"; +import { SrcMap } from "@wesl/mini-parse"; +import { ParsedRegistry } from "./ParsedRegistry.ts"; +import { TextExport, TextModule } from "./ParseModule.ts"; +import { normalize } from "./PathUtil.ts"; +import { WgslBundle } from "./WgslBundle.ts"; /** A named function to transform code fragments (e.g. by inserting parameters) */ export interface Template { diff --git a/packages/linker/src/ParseDirective.ts b/linker/ParseDirective.ts similarity index 94% rename from packages/linker/src/ParseDirective.ts rename to linker/ParseDirective.ts index 2184daa1b..b5a5579b5 100644 --- a/packages/linker/src/ParseDirective.ts +++ b/linker/ParseDirective.ts @@ -11,17 +11,17 @@ import { tokens, tracing, withSep, -} from "mini-parse"; -import { ExtendsElem } from "./AbstractElems.js"; -import { gleamImport } from "./GleamImport.js"; -import { ImportTree, SimpleSegment } from "./ImportTree.js"; +} from "@wesl/mini-parse"; +import { ExtendsElem } from "./AbstractElems.ts"; +import { gleamImport } from "./GleamImport.ts"; +import { ImportTree, SimpleSegment } from "./ImportTree.ts"; import { argsTokens, lineCommentTokens, mainTokens, moduleTokens, -} from "./MatchWgslD.js"; -import { eolf, makeElem } from "./ParseSupport.js"; +} from "./MatchWgslD.ts"; +import { eolf, makeElem } from "./ParseSupport.ts"; /* parse #directive enhancements to wgsl: #import, #export, etc. */ diff --git a/packages/linker/src/ParseModule.ts b/linker/ParseModule.ts similarity index 94% rename from packages/linker/src/ParseModule.ts rename to linker/ParseModule.ts index 7a0fe3b94..68c6d744b 100644 --- a/packages/linker/src/ParseModule.ts +++ b/linker/ParseModule.ts @@ -1,4 +1,4 @@ -import { srcLog, SrcMap } from "mini-parse"; +import { srcLog, SrcMap } from "@wesl/mini-parse"; import { AbstractElem, AliasElem, @@ -11,11 +11,11 @@ import { TemplateElem, TreeImportElem, VarElem, -} from "./AbstractElems.js"; -import { processConditionals } from "./Conditionals.js"; -import { ApplyTemplateFn } from "./ModuleRegistry.js"; -import { parseWgslD } from "./ParseWgslD.js"; -import { SliceReplace, sliceReplace } from "./Slicer.js"; +} from "./AbstractElems.ts"; +import { processConditionals } from "./Conditionals.ts"; +import { ApplyTemplateFn } from "./ModuleRegistry.ts"; +import { parseWgslD } from "./ParseWgslD.ts"; +import { SliceReplace, sliceReplace } from "./Slicer.ts"; /** module with exportable text fragments that are optionally transformed by a templating engine */ export interface TextModule { diff --git a/packages/linker/src/ParseSupport.ts b/linker/ParseSupport.ts similarity index 93% rename from packages/linker/src/ParseSupport.ts rename to linker/ParseSupport.ts index 5cc97ce53..c06e5faaa 100644 --- a/packages/linker/src/ParseSupport.ts +++ b/linker/ParseSupport.ts @@ -14,10 +14,10 @@ import { setTraceName, tracing, withSep, -} from "mini-parse"; -import { AbstractElem, AbstractElemBase } from "./AbstractElems.js"; -import { argsTokens, mainTokens } from "./MatchWgslD.js"; -import { lineComment } from "./ParseDirective.js"; +} from "@wesl/mini-parse"; +import { AbstractElem, AbstractElemBase } from "./AbstractElems.ts"; +import { argsTokens, mainTokens } from "./MatchWgslD.ts"; +import { lineComment } from "./ParseDirective.ts"; /* Basic parsing functions for comment handling, eol, etc. */ @@ -71,7 +71,7 @@ export function makeElem< U extends AbstractElem, K extends U["kind"], // 'kind' of AbtractElem "fn" E extends ByKind, // FnElem - T extends TagsType, // {name: string[]} + T extends TagsType // {name: string[]} >( kind: K, er: ExtendedResult>, diff --git a/packages/linker/src/ParseWgslD.ts b/linker/ParseWgslD.ts similarity index 97% rename from packages/linker/src/ParseWgslD.ts rename to linker/ParseWgslD.ts index f546d5d9e..25b93263a 100644 --- a/packages/linker/src/ParseWgslD.ts +++ b/linker/ParseWgslD.ts @@ -22,17 +22,17 @@ import { tokens, tracing, withSep, -} from "mini-parse"; -import { AbstractElem, TypeNameElem, TypeRefElem } from "./AbstractElems.js"; -import { identTokens, mainTokens } from "./MatchWgslD.js"; -import { directive } from "./ParseDirective.js"; +} from "@wesl/mini-parse"; +import { AbstractElem, TypeNameElem, TypeRefElem } from "./AbstractElems.ts"; +import { identTokens, mainTokens } from "./MatchWgslD.ts"; +import { directive } from "./ParseDirective.ts"; import { comment, makeElem, unknown, word, wordNumArgs, -} from "./ParseSupport.js"; +} from "./ParseSupport.ts"; /** parser that recognizes key parts of WGSL and also directives like #import */ diff --git a/packages/linker/src/ParsedRegistry.ts b/linker/ParsedRegistry.ts similarity index 95% rename from packages/linker/src/ParsedRegistry.ts rename to linker/ParsedRegistry.ts index 051531f9f..05f1f5bcc 100644 --- a/packages/linker/src/ParsedRegistry.ts +++ b/linker/ParsedRegistry.ts @@ -1,6 +1,6 @@ -import { TreeImportElem } from "./AbstractElems.js"; -import { importResolutionMap, ResolveMap } from "./ImportResolutionMap.js"; -import { linkWgslModule } from "./Linker.js"; +import { TreeImportElem } from "./AbstractElems.ts"; +import { importResolutionMap, ResolveMap } from "./ImportResolutionMap.ts"; +import { linkWgslModule } from "./Linker.ts"; import { GeneratorExport, GeneratorModule, @@ -9,9 +9,9 @@ import { ModuleRegistry, relativeToAbsolute, TextModuleExport, -} from "./ModuleRegistry.js"; -import { parseModule, TextExport, TextModule } from "./ParseModule.js"; -import { dirname, normalize, noSuffix } from "./PathUtil.js"; +} from "./ModuleRegistry.ts"; +import { parseModule, TextExport, TextModule } from "./ParseModule.ts"; +import { dirname, normalize, noSuffix } from "./PathUtil.ts"; /** parse wgsl files and provided indexed access to modules and exports */ export class ParsedRegistry { diff --git a/packages/linker/src/PathUtil.ts b/linker/PathUtil.ts similarity index 100% rename from packages/linker/src/PathUtil.ts rename to linker/PathUtil.ts diff --git a/packages/linker/src/RefDebug.ts b/linker/RefDebug.ts similarity index 88% rename from packages/linker/src/RefDebug.ts rename to linker/RefDebug.ts index fa9c7d4f0..61cccf9a8 100644 --- a/packages/linker/src/RefDebug.ts +++ b/linker/RefDebug.ts @@ -1,11 +1,10 @@ -import { dlog } from "berry-pretty"; -import { AbstractElem, CallElem, FnElem } from "./AbstractElems.js"; -import { FoundRef, TextRef } from "./TraverseRefs.js"; +import { FoundRef, TextRef } from "./TraverseRefs.ts"; +import { AbstractElem, CallElem, FnElem } from "./AbstractElems.ts"; export function printRef(r: FoundRef, msg = ""): void { const { kind, elem, rename } = r as TextRef; const renameFields = rename ? { rename } : {}; - dlog( + console.log( msg, { kind, diff --git a/packages/linker/src/ResolveImport.ts b/linker/ResolveImport.ts similarity index 87% rename from packages/linker/src/ResolveImport.ts rename to linker/ResolveImport.ts index 55df32395..2d0eca7ee 100644 --- a/packages/linker/src/ResolveImport.ts +++ b/linker/ResolveImport.ts @@ -1,7 +1,8 @@ -import { ResolveMap } from "./ImportResolutionMap.js"; -import { ModuleExport } from "./ModuleRegistry.js"; -import { StringPairs } from "./TraverseRefs.js"; -import { overlapTail } from "./Util.js"; +import { ResolveMap } from "./ImportResolutionMap.ts"; +import { ModuleExport } from "./ModuleRegistry.ts"; +import { StringPairs } from "./TraverseRefs.ts"; +import { overlapTail } from "./Util.ts"; +import { logResolveMap } from "./LogResolveMap.ts"; export interface ResolvedImport { modExp: ModuleExport; diff --git a/packages/linker/src/Slicer.ts b/linker/Slicer.ts similarity index 97% rename from packages/linker/src/Slicer.ts rename to linker/Slicer.ts index a38373dbf..b30992e8e 100644 --- a/packages/linker/src/Slicer.ts +++ b/linker/Slicer.ts @@ -1,5 +1,5 @@ -import { SrcMap, SrcMapEntry } from "mini-parse"; -import { last, scan } from "./Util.js"; +import { SrcMap, SrcMapEntry } from "@wesl/mini-parse"; +import { last, scan } from "./Util.ts"; /** specify a start,end portion of a string to be replaced */ export interface SliceReplace { diff --git a/packages/linker/src/TraverseRefs.ts b/linker/TraverseRefs.ts similarity index 97% rename from packages/linker/src/TraverseRefs.ts rename to linker/TraverseRefs.ts index c7d2fb0d6..808f3977a 100644 --- a/packages/linker/src/TraverseRefs.ts +++ b/linker/TraverseRefs.ts @@ -8,14 +8,18 @@ import { TreeImportElem, TypeRefElem, VarElem, -} from "./AbstractElems.js"; -import { refFullName } from "./Linker.js"; -import { moduleLog } from "./LinkerLogging.js"; -import { GeneratorExport, GeneratorModule } from "./ModuleRegistry.js"; -import { ParsedRegistry } from "./ParsedRegistry.js"; -import { TextExport, TextModule } from "./ParseModule.js"; -import { resolveImport } from "./ResolveImport.js"; -import { groupBy, last } from "./Util.js"; +} from "./AbstractElems.ts"; +import { refFullName } from "./Linker.ts"; +import { moduleLog } from "./LinkerLogging.ts"; +import { + GeneratorExport, + GeneratorModule, + ModuleExport, +} from "./ModuleRegistry.ts"; +import { ParsedRegistry } from "./ParsedRegistry.ts"; +import { TextExport, TextModule } from "./ParseModule.ts"; +import { resolveImport } from "./ResolveImport.ts"; +import { groupBy, last } from "./Util.ts"; /** * A wrapper around a wgsl element targeted for inclusion in the link diff --git a/packages/linker/src/Util.ts b/linker/Util.ts similarity index 100% rename from packages/linker/src/Util.ts rename to linker/Util.ts diff --git a/packages/linker/src/WgslBundle.ts b/linker/WgslBundle.ts similarity index 100% rename from packages/linker/src/WgslBundle.ts rename to linker/WgslBundle.ts diff --git a/linker/deno.json b/linker/deno.json new file mode 100644 index 000000000..3ffa30331 --- /dev/null +++ b/linker/deno.json @@ -0,0 +1,10 @@ +{ + "name": "@wesl/linker", + "version": "0.1.0", + "exports": "./mod.ts", + "tasks": { + "dev": "deno test --allow-read --watch" + }, + "license": "MIT", + "imports": {} +} \ No newline at end of file diff --git a/linker/mod.ts b/linker/mod.ts new file mode 100644 index 000000000..7ea0b8ade --- /dev/null +++ b/linker/mod.ts @@ -0,0 +1,7 @@ +export * from "./Linker.ts"; +export * from "./ModuleRegistry.ts"; +export * from "./ParseWgslD.ts"; +export * from "./PathUtil.ts"; +export * from "./Util.ts"; +export * from "./WgslBundle.ts"; +export { preProcess } from "./ParseModule.ts"; diff --git a/packages/linker/src/templates/SimpleTemplate.ts b/linker/templates/SimpleTemplate.ts similarity index 63% rename from packages/linker/src/templates/SimpleTemplate.ts rename to linker/templates/SimpleTemplate.ts index 280fa7284..bc5baf1c2 100644 --- a/packages/linker/src/templates/SimpleTemplate.ts +++ b/linker/templates/SimpleTemplate.ts @@ -1,5 +1,5 @@ -import { Template } from "../ModuleRegistry.js"; -import { sliceReplace, sliceWords } from "../Slicer.js"; +import { Template } from "../ModuleRegistry.ts"; +import { sliceReplace, sliceWords } from "../Slicer.ts"; export const simpleTemplate: Template = { name: "simple", diff --git a/linker/templates/index.ts b/linker/templates/index.ts new file mode 100644 index 000000000..a43f7297b --- /dev/null +++ b/linker/templates/index.ts @@ -0,0 +1 @@ +export * from "./SimpleTemplate.ts"; diff --git a/packages/linker/src/test/Conditionals.test.ts b/linker/test/Conditionals.test.ts similarity index 64% rename from packages/linker/src/test/Conditionals.test.ts rename to linker/test/Conditionals.test.ts index 8058b1976..e73d88ad5 100644 --- a/packages/linker/src/test/Conditionals.test.ts +++ b/linker/test/Conditionals.test.ts @@ -1,9 +1,10 @@ -import { srcLog, _withBaseLogger } from "mini-parse"; -import { expectNoLogErr, logCatch } from "mini-parse/test-util"; +import { srcLog, _withBaseLogger } from "@wesl/mini-parse"; +import { expectNoLogErr, logCatch } from "@wesl/mini-parse/test-util"; import { expect, test } from "vitest"; -import { processConditionals } from "../Conditionals.js"; +import { assertSnapshot } from "@std/testing/snapshot"; +import { processConditionals } from "../Conditionals.ts"; -test("parse #if #endif", () => { +test("parse #if #endif", async (ctx) => { const src = ` #if foo fn f() { } @@ -12,43 +13,7 @@ test("parse #if #endif", () => { const sourceMap = processConditionals(src, { foo: true }); expect(sourceMap.dest).toContain("fn f() { }"); - expect(sourceMap.entries).toMatchInlineSnapshot(` - [ - { - "destEnd": 1, - "destStart": 0, - "src": " - #if foo - fn f() { } - #endif - ", - "srcEnd": 1, - "srcStart": 0, - }, - { - "destEnd": 16, - "destStart": 1, - "src": " - #if foo - fn f() { } - #endif - ", - "srcEnd": 28, - "srcStart": 13, - }, - { - "destEnd": 20, - "destStart": 16, - "src": " - #if foo - fn f() { } - #endif - ", - "srcEnd": 43, - "srcStart": 39, - }, - ] - `); + await assertSnapshot(ctx, sourceMap.entries); }); test("parse // #if !foo", () => { @@ -127,7 +92,7 @@ test("parse last line", () => { expect(dest).toBe(src); }); -test("srcLog with srcMap", () => { +test("srcLog with srcMap", async (ctx) => { const src = ` #if !foo 1234 @@ -139,14 +104,10 @@ test("srcLog with srcMap", () => { srcLog(sourceMap, [3, 6], "found:"); }); - expect(logged()).toMatchInlineSnapshot(` - "found: - 1234 Ln 3 - ^ ^" - `); + await assertSnapshot(ctx, logged()); }); -test("unterminated #if", () => { +test("unterminated #if", async (ctx) => { const src = ` #if foo // bar @@ -155,14 +116,10 @@ test("unterminated #if", () => { _withBaseLogger(log, () => { processConditionals(src, {}); }); - expect(logged()).toMatchInlineSnapshot(` - "unmatched #if/#else - #if foo Ln 2 - ^" - `); + await assertSnapshot(ctx, logged()); }); -test("unterminated #else", () => { +test("unterminated #else", async (ctx) => { const src = ` #if foo #else @@ -172,9 +129,5 @@ test("unterminated #else", () => { _withBaseLogger(log, () => { processConditionals(src, {}); }); - expect(logged()).toMatchInlineSnapshot(` - "unmatched #if/#else - #else Ln 3 - ^" - `); + await assertSnapshot(ctx, logged()); }); diff --git a/packages/linker/src/test/Extends.test.ts b/linker/test/Extends.test.ts similarity index 83% rename from packages/linker/src/test/Extends.test.ts rename to linker/test/Extends.test.ts index 57497ceec..8788f7601 100644 --- a/packages/linker/src/test/Extends.test.ts +++ b/linker/test/Extends.test.ts @@ -1,7 +1,11 @@ +import { _withBaseLogger } from "@wesl/mini-parse"; +import { logCatch } from "@wesl/mini-parse/test-util"; import { expect, test } from "vitest"; -import { linkTest } from "./TestUtil.js"; +import { ModuleRegistry } from "../ModuleRegistry.ts"; +import { simpleTemplate } from "../templates/SimpleTemplate.ts"; +import { linkTestOpts, linkTest } from "./TestUtil.ts"; -test.skip("#extends a struct in the root src", () => { +test.ignore("#extends a struct in the root src", () => { const src = ` #extends AStruct from ./file1 struct MyStruct { @@ -23,7 +27,7 @@ test.skip("#extends a struct in the root src", () => { expect(linked).toContain(`struct MyStruct {\n x: u32,\n y: u32\n}`); }); -test.skip("#extends an empty struct", () => { +test.ignore("#extends an empty struct", () => { const src = ` #extends AStruct struct MyStruct { @@ -44,7 +48,7 @@ test.skip("#extends an empty struct", () => { expect(linked).toContain(`struct MyStruct {\n y: u32\n}`); }); -test.skip("#extends a struct in a module", () => { +test.ignore("#extends a struct in a module", () => { const src = ` #import AStruct from ./file1 fn main() { @@ -70,7 +74,7 @@ test.skip("#extends a struct in a module", () => { expect(linked).toContain(`struct AStruct {\n x: i32,\n z: u32\n}`); }); -test.skip("two #extends on the same struct", () => { +test.ignore("two #extends on the same struct", () => { const src = ` #import AStruct from ./file1 fn main() { @@ -105,7 +109,7 @@ test.skip("two #extends on the same struct", () => { ); }); -test.skip("#extends struct with imp/exp param", () => { +test.ignore("#extends struct with imp/exp param", () => { const src = ` #import AStruct(i32) fn main() { @@ -131,7 +135,7 @@ test.skip("#extends struct with imp/exp param", () => { expect(linked).toContain(`struct AStruct {\n x: i32,\n z: u32\n}`); }); -test.skip("transitive #extends ", () => { +test.ignore("transitive #extends ", () => { const src = ` #import AStruct @@ -164,7 +168,7 @@ test.skip("transitive #extends ", () => { ); }); -test.skip("transitive #extends from root", () => { +test.ignore("transitive #extends from root", () => { const src = ` #extends BStruct struct AStruct { @@ -191,7 +195,7 @@ test.skip("transitive #extends from root", () => { ); }); -test.skip("extend struct with rename", () => { +test.ignore("extend struct with rename", () => { const src = ` // #extends HasColor(fill) struct Sprite { diff --git a/linker/test/GleamImport.test.ts b/linker/test/GleamImport.test.ts new file mode 100644 index 000000000..808a2d7a8 --- /dev/null +++ b/linker/test/GleamImport.test.ts @@ -0,0 +1,41 @@ +import { testParse, TestParseResult } from "@wesl/mini-parse/test-util"; +import { expect, test } from "vitest"; +import { assertSnapshot } from "@std/testing/snapshot"; +import { gleamImport } from "../GleamImport.ts"; + +function expectParses(ctx: Deno.TestContext): TestParseResult { + const result = testParse(gleamImport, ctx.name); + expect(result.parsed).not.toBeNull(); + return result; +} +/* ------ success cases ------- */ + +test("import ./foo/bar;", (ctx) => { + const result = expectParses(ctx); + expect(result.position).toBe(ctx.name.length); // consume semicolon (so that linking will remove it) +}); + +test("import foo-bar/boo", (ctx) => { + expectParses(ctx); +}); + +/** ----- extraction tests ----- */ +test("import foo/bar", async (ctx) => { + const { appState } = expectParses(ctx); + await assertSnapshot(ctx, appState); +}); + +test("import foo/* as b", async (ctx) => { + const { appState } = expectParses(ctx); + await assertSnapshot(ctx, appState); +}); + +test(`import a/{ b, c/{d, e}, f/* }`, async (ctx) => { + const { appState } = expectParses(ctx); + await assertSnapshot(ctx, appState); +}); + +test("import ./foo/bar", async (ctx) => { + const { appState } = expectParses(ctx); + await assertSnapshot(ctx, appState); +}); diff --git a/linker/test/ImportCases.test.ts b/linker/test/ImportCases.test.ts new file mode 100644 index 000000000..c1dd83a1e --- /dev/null +++ b/linker/test/ImportCases.test.ts @@ -0,0 +1,301 @@ +import { expect, test } from "vitest"; +import { importCases } from "wesl-testsuite"; + +import { ModuleRegistry } from "../ModuleRegistry.ts"; +import { trimSrc } from "./shared/StringUtil.ts"; + +interface LinkExpectation { + includes?: string[]; + excludes?: string[]; + linked?: string; +} + +// wgsl example src, indexed by name +const examplesByName = new Map(importCases.map((t) => [t.name, t.src])); +const testNameSet = new Set(); + +linkTest("import ./bar/foo", { + linked: ` + fn main() { + foo(); + } + + fn foo() { } + `, +}); + +linkTest("main has other root elements", { + linked: ` + struct Uniforms { + a: u32 + } + + @group(0) @binding(0) var u: Uniforms; + + fn main() { } + `, +}); + +linkTest("import foo as bar", { + linked: ` + fn main() { + bar(); + } + + fn bar() { /* fooImpl */ } + `, +}); + +linkTest("import twice doesn't get two copies", { + linked: ` + fn main() { + foo(); + bar(); + } + + fn foo() { /* fooImpl */ } + + fn bar() { foo(); } + `, +}); + +linkTest("imported fn calls support fn with root conflict", { + linked: ` + fn main() { foo(); } + + fn conflicted() { } + + fn foo() { + conflicted0(0); + conflicted0(1); + } + + fn conflicted0(a:i32) {} + `, +}); + +linkTest("import twice with two as names", { + linked: ` + fn main() { bar(); bar(); } + + fn bar() { } + `, +}); + +linkTest("import transitive conflicts with main", { + linked: ` + fn main() { + mid(); + } + + fn grand() { + /* main impl */ + } + + fn mid() { grand0(); } + + fn grand0() { /* grandImpl */ } + `, +}); + +linkTest("multiple exports from the same module", { + linked: ` + fn main() { + foo(); + bar(); + } + + fn foo() { } + + fn bar() { } + `, +}); + +linkTest("import and resolve conflicting support function", { + linked: ` + fn support() { + bar(); + } + + fn bar() { + support0(); + } + + fn support0() { } + `, +}); + +linkTest("import support fn that references another import", { + linked: ` + fn support() { + foo(); + } + + fn foo() { + support0(); + bar(); + } + + fn support0() { } + + fn bar() { + support1(); + } + + fn support1() { } + `, +}); + +linkTest("import support fn from two exports", { + linked: ` + fn main() { + foo(); + bar(); + } + + fn foo() { + support(); + } + + fn bar() { + support(); + } + + fn support() { } + `, +}); + +linkTest("import a struct", { + linked: ` + fn main() { + let a = AStruct(1u); + } + + struct AStruct { + x: u32 + } + `, +}); + +linkTest("import fn with support struct constructor", { + linked: ` + fn main() { + let ze = elemOne(); + } + + fn elemOne() -> Elem { + return Elem(1u); + } + + struct Elem { + sum: u32 + } + `, +}); + +linkTest("import a transitive struct", { + linked: ` + struct SrcStruct { + a: AStruct + } + + struct AStruct { + s: BStruct + } + + struct BStruct { + x: u32 + } + `, +}); + +linkTest("'import as' a struct", { + linked: ` + fn foo (a: AA) { } + + struct AA { + x: u32 + } + `, +}); + +linkTest("import a struct with name conflicting support struct", { + linked: ` + struct Base { + b: i32 + } + + fn foo() -> AStruct {let a:AStruct; return a;} + + struct AStruct { + x: Base0 + } + + struct Base0 { + x: u32 + } + `, +}); + +linkTest("copy alias to output", { + linked: ` + alias MyType = u32; + `, +}); + +linkTest("copy diagnostics to output", { + linked: ` + diagnostic(off,derivative_uniformity); + `, +}); + +function linkTest(name: string, expectation: LinkExpectation): void { + testNameSet.add(name); + test(name, () => { + const exampleSrc = examplesByName.get(name); + if (!exampleSrc) { + throw new Error(`Skipping test "${name}"\nNo example found.`); + } + const srcs = Object.entries(exampleSrc).map(([name, wgsl]) => { + const trimmedSrc = trimSrc(wgsl); + return [name, trimmedSrc] as [string, string]; + }); + const main = srcs[0][0]; + const wgsl = Object.fromEntries(srcs); + const registry = new ModuleRegistry({ wgsl }); + const result = registry.link(main); + + const { linked, includes, excludes } = expectation; + + if (linked !== undefined) { + const expectTrimmed = trimSrc(linked); + const resultTrimmed = trimSrc(result); + if (resultTrimmed !== expectTrimmed) { + const expectLines = expectTrimmed.split("\n"); + const resultLines = result.split("\n"); + expectLines.forEach((line, i) => { + expect(resultLines[i]).toBe(line); + }); + } + } + if (includes !== undefined) { + includes.forEach((inc) => { + expect(result).toContain(inc); + }); + } + if (excludes !== undefined) { + excludes.forEach((exc) => { + expect(result).not.toContain(exc); + }); + } + }); +} + +(() => { + const cases = importCases.map((c) => c.name); + const missing = cases.filter((name) => !testNameSet.has(name)); + if (missing.length > 0) { + console.error("Missing tests for cases:", missing); + expect("missing test: " + missing.toString()).toBe(""); + } +}); diff --git a/packages/linker/src/test/ImportResolutionMap.test.ts b/linker/test/ImportResolutionMap.test.ts similarity index 88% rename from packages/linker/src/test/ImportResolutionMap.test.ts rename to linker/test/ImportResolutionMap.test.ts index c8cb3f4ee..f36044fca 100644 --- a/packages/linker/src/test/ImportResolutionMap.test.ts +++ b/linker/test/ImportResolutionMap.test.ts @@ -1,12 +1,12 @@ import { expect, test } from "vitest"; -import { importResolutionMap } from "../ImportResolutionMap.js"; +import { importResolutionMap } from "../ImportResolutionMap.ts"; import { exportsToStrings, logResolveMap, pathsToStrings, -} from "../LogResolveMap.js"; -import { ModuleRegistry } from "../ModuleRegistry.js"; -import { TextExport } from "../ParseModule.js"; +} from "../LogResolveMap.ts"; +import { ModuleRegistry } from "../ModuleRegistry.ts"; +import { TextExport } from "../ParseModule.ts"; test("simple tree", () => { const registry = new ModuleRegistry({ @@ -69,7 +69,7 @@ test("tree with path segment list", () => { }); // TODO fixme wildcards -test.skip("tree with trailing wildcard", () => { +test.ignore("tree with trailing wildcard", () => { const registry = new ModuleRegistry({ wgsl: { "main.wgsl": ` @@ -97,5 +97,5 @@ test.skip("tree with trailing wildcard", () => { // ]); }); -test.skip("tree with generator"); -test.skip("tree with segment list of trees"); +test.ignore("tree with generator", () => {}); +test.ignore("tree with segment list of trees", () => {}); diff --git a/packages/linker/src/test/ImportSyntaxCases.test.ts b/linker/test/ImportSyntaxCases.test.ts similarity index 70% rename from packages/linker/src/test/ImportSyntaxCases.test.ts rename to linker/test/ImportSyntaxCases.test.ts index 711744f62..9b041d692 100644 --- a/packages/linker/src/test/ImportSyntaxCases.test.ts +++ b/linker/test/ImportSyntaxCases.test.ts @@ -1,17 +1,16 @@ -import { testParse, TestParseResult } from "mini-parse/test-util"; +import { testParse } from "@wesl/mini-parse/test-util"; import { expect, test } from "vitest"; import { importSyntaxCases } from "wesl-testsuite"; -import { gleamImport } from "../GleamImport.js"; +import { gleamImport } from "../GleamImport.ts"; function expectParseFail(src: string): void { const result = testParse(gleamImport, src); expect(result.parsed).toBeNull(); } -function expectParses(src: string): TestParseResult { +function expectParses(src: string) { const result = testParse(gleamImport, src); expect(result.parsed).not.toBeNull(); - return result; } importSyntaxCases.forEach(c => { diff --git a/packages/linker/src/test/Importing.test.ts b/linker/test/Importing.test.ts similarity index 88% rename from packages/linker/src/test/Importing.test.ts rename to linker/test/Importing.test.ts index 8b1df726e..a8aeab196 100644 --- a/packages/linker/src/test/Importing.test.ts +++ b/linker/test/Importing.test.ts @@ -1,7 +1,7 @@ import { expect, test } from "vitest"; -import { linkTest } from "./TestUtil.js"; +import { linkTest } from "./TestUtil.ts"; -test.skip("transitive with importing", () => { +test.ignore("transitive with importing", () => { const binOpModule = ` #export(Elem) fn binaryOp(a: Elem, b: Elem) -> Elem { @@ -25,7 +25,7 @@ test.skip("transitive with importing", () => { expect(linked).toContain("binOpImpl"); }); -test.skip("#export importing", () => { +test.ignore("#export importing", () => { const src = ` #import foo(A, B) from ./file1 fn main() { diff --git a/packages/linker/src/test/LinkPackage.test.ts b/linker/test/LinkPackage.test.ts similarity index 84% rename from packages/linker/src/test/LinkPackage.test.ts rename to linker/test/LinkPackage.test.ts index 32964aace..38ade7b90 100644 --- a/packages/linker/src/test/LinkPackage.test.ts +++ b/linker/test/LinkPackage.test.ts @@ -1,6 +1,8 @@ +// TODO: +/* import { expect, test } from "vitest"; -import lib from "wgsl-rand"; -import { ModuleRegistry } from "../ModuleRegistry.js"; +import lib from "test-package/wgsl-rand"; +import { ModuleRegistry } from "../ModuleRegistry.ts"; test("import rand() from a package", () => { const src = ` @@ -22,3 +24,4 @@ test("import rand() from a package", () => { const result = registry.link("./main"); expect(result).toContain("fn pcg_2u_3f"); }); +*/ diff --git a/packages/linker/src/test/Linker.test.ts b/linker/test/Linker.test.ts similarity index 94% rename from packages/linker/src/test/Linker.test.ts rename to linker/test/Linker.test.ts index 60e5494cd..eb0ef16ab 100644 --- a/packages/linker/src/test/Linker.test.ts +++ b/linker/test/Linker.test.ts @@ -1,7 +1,9 @@ +import { _withBaseLogger } from "@wesl/mini-parse"; +import { logCatch } from "@wesl/mini-parse/test-util"; import { expect, test } from "vitest"; -import { ModuleRegistry } from "../ModuleRegistry.js"; -import { simpleTemplate } from "../templates/SimpleTemplate.js"; -import { linkTest, linkTestOpts } from "./TestUtil.js"; +import { ModuleRegistry } from "../ModuleRegistry.ts"; +import { simpleTemplate } from "../templates/SimpleTemplate.ts"; +import { linkTestOpts, linkTest } from "./TestUtil.ts"; /* --- these tests rely on features not yet portable in wesl --- */ diff --git a/packages/linker/src/test/LinkerGenerator.test.ts b/linker/test/LinkerGenerator.test.ts similarity index 98% rename from packages/linker/src/test/LinkerGenerator.test.ts rename to linker/test/LinkerGenerator.test.ts index 2f6ad7b62..224f4acaa 100644 --- a/packages/linker/src/test/LinkerGenerator.test.ts +++ b/linker/test/LinkerGenerator.test.ts @@ -1,6 +1,6 @@ import { expect, test } from "vitest"; -import { ModuleRegistry, RegisterGenerator } from "../ModuleRegistry.js"; -import { linkTestOpts } from "./TestUtil.js"; +import { ModuleRegistry, RegisterGenerator } from "../ModuleRegistry.ts"; +import { linkTestOpts } from "./TestUtil.ts"; const fooGenerator: RegisterGenerator = { name: "foo", diff --git a/packages/linker/src/test/MatchWgslD.test.ts b/linker/test/MatchWgslD.test.ts similarity index 83% rename from packages/linker/src/test/MatchWgslD.test.ts rename to linker/test/MatchWgslD.test.ts index f868d2705..74a8fadb4 100644 --- a/packages/linker/src/test/MatchWgslD.test.ts +++ b/linker/test/MatchWgslD.test.ts @@ -1,6 +1,6 @@ -import { matchingLexer } from "mini-parse"; +import { matchingLexer } from "@wesl/mini-parse"; import { expect, test } from "vitest"; -import { mainTokens } from "../MatchWgslD.js"; +import { mainTokens } from "../MatchWgslD.ts"; test("lex #import foo", () => { const lexer = matchingLexer(`#import foo`, mainTokens); diff --git a/packages/linker/src/test/ModuleRegistry.test.ts b/linker/test/ModuleRegistry.test.ts similarity index 93% rename from packages/linker/src/test/ModuleRegistry.test.ts rename to linker/test/ModuleRegistry.test.ts index 7ff831cc6..81db46c73 100644 --- a/packages/linker/src/test/ModuleRegistry.test.ts +++ b/linker/test/ModuleRegistry.test.ts @@ -1,5 +1,5 @@ import { expect, test } from "vitest"; -import { ModuleRegistry } from "../ModuleRegistry.js"; +import { ModuleRegistry } from "../ModuleRegistry.ts"; test("findTextModule", () => { const registry = new ModuleRegistry({ diff --git a/packages/linker/src/test/ParseComments.test.ts b/linker/test/ParseComments.test.ts similarity index 67% rename from packages/linker/src/test/ParseComments.test.ts rename to linker/test/ParseComments.test.ts index fe24db8f6..18fc7518a 100644 --- a/packages/linker/src/test/ParseComments.test.ts +++ b/linker/test/ParseComments.test.ts @@ -1,11 +1,12 @@ -import { preParse } from "mini-parse"; -import { expectNoLogErr } from "mini-parse/test-util"; +import { preParse } from "@wesl/mini-parse"; +import { expectNoLogErr } from "@wesl/mini-parse/test-util"; import { expect, test } from "vitest"; -import { lineComment } from "../ParseDirective.js"; -import { blockComment, comment, wordNumArgs } from "../ParseSupport.js"; -import { parseWgslD } from "../ParseWgslD.js"; -import { testAppParse } from "./TestUtil.js"; +import { assertSnapshot } from "@std/testing/snapshot"; +import { lineComment } from "../ParseDirective.ts"; +import { blockComment, comment, wordNumArgs } from "../ParseSupport.ts"; +import { parseWgslD } from "../ParseWgslD.ts"; +import { testAppParse } from "./TestUtil.ts"; test("lineComment parse // foo bar", () => { const src = "// foo bar"; @@ -19,11 +20,11 @@ test("lineComment parse // foo bar \\n", () => { expect(position).toBe(src.length); }); -test("blockComment parses /* comment */", () => { +test("blockComment parses /* comment */", async (ctx) => { const src = "/* comment */"; - expectNoLogErr(() => { + await expectNoLogErr(async () => { const { parsed } = testAppParse(blockComment, src); - expect(parsed).toMatchSnapshot(); + await assertSnapshot(ctx, parsed); }); }); @@ -34,15 +35,15 @@ test("skipBlockComment parses nested comment", () => { }); }); -test("parse fn with line comment", () => { +test("parse fn with line comment", async (ctx) => { const src = ` fn binaryOp() { // binOpImpl }`; const parsed = parseWgslD(src); - expect(parsed).toMatchSnapshot(); + await assertSnapshot(ctx, parsed); }); -test("wordNumArgs parses (a, b, 1) with line comments everywhere", () => { +test("wordNumArgs parses (a, b, 1) with line comments everywhere", async (ctx) => { const src = `( // aah a, @@ -53,7 +54,7 @@ test("wordNumArgs parses (a, b, 1) with line comments everywhere", () => { // satsified )`; const { parsed } = testAppParse(preParse(comment, wordNumArgs), src); - expect(parsed?.value).toMatchSnapshot(); + await assertSnapshot(ctx, parsed?.value); }); test("parse empty line comment", () => { @@ -63,7 +64,7 @@ test("parse empty line comment", () => { expectNoLogErr(() => parseWgslD(src)); }); -test.skip("parse line comment with #replace", () => { +test.ignore("parse line comment with #replace", () => { const src = ` const workgroupThreads= 4; // #replace 4=workgroupThreads `; diff --git a/packages/linker/src/test/ParseDirectives.test.ts b/linker/test/ParseDirectives.test.ts similarity index 51% rename from packages/linker/src/test/ParseDirectives.test.ts rename to linker/test/ParseDirectives.test.ts index 49551fcf4..9baebf189 100644 --- a/packages/linker/src/test/ParseDirectives.test.ts +++ b/linker/test/ParseDirectives.test.ts @@ -1,14 +1,15 @@ -import { tokens, _withBaseLogger } from "mini-parse"; -import { logCatch } from "mini-parse/test-util"; +import { _withBaseLogger, tokens } from "@wesl/mini-parse"; +import { logCatch } from "@wesl/mini-parse/test-util"; import { expect, test } from "vitest"; -import { ModuleElem, TreeImportElem } from "../AbstractElems.js"; -import { SimpleSegment, treeToString } from "../ImportTree.js"; -import { argsTokens } from "../MatchWgslD.js"; -import { directive, importing } from "../ParseDirective.js"; -import { parseWgslD } from "../ParseWgslD.js"; -import { last } from "../Util.js"; -import { testAppParse } from "./TestUtil.js"; +import { assertSnapshot } from "@std/testing/snapshot"; +import { ModuleElem, TreeImportElem } from "../AbstractElems.ts"; +import { SimpleSegment, treeToString } from "../ImportTree.ts"; +import { argsTokens } from "../MatchWgslD.ts"; +import { directive, importing } from "../ParseDirective.ts"; +import { parseWgslD } from "../ParseWgslD.ts"; +import { last } from "../Util.ts"; +import { testAppParse } from "./TestUtil.ts"; test("directive parses #export", () => { const { appState } = testAppParse(directive, "#export"); @@ -20,89 +21,59 @@ test("parse #export", () => { expect(parsed[0].kind).toBe("export"); }); -test("parse import foo/bar", () => { +test("parse import foo/bar", async (ctx) => { const parsed = parseWgslD("import foo/bar"); - expect(parsed).toMatchSnapshot(); + await assertSnapshot(ctx, parsed); }); -test("parse #import foo(a,b) as baz from bar", () => { +test("parse #import foo(a,b) as baz from bar", async (ctx) => { const parsed = parseWgslD("#import foo as baz from bar"); - expect(parsed).toMatchSnapshot(); + await assertSnapshot(ctx, parsed); }); -test("parse #export(foo) with trailing space", () => { +test("parse #export(foo) with trailing space", async (ctx) => { const src = ` export (Elem) `; const parsed = parseWgslD(src); - expect(parsed).toMatchSnapshot(); + await assertSnapshot(ctx, parsed); }); -test.skip("importing parses importing bar(A) fog(B)", () => { +test.ignore("importing parses importing bar(A) fog(B)", async (ctx) => { const src = ` importing bar(A), fog(B)`; const { parsed } = testAppParse(tokens(argsTokens, importing), src); - expect(parsed?.tags.importing).toMatchSnapshot(); + await assertSnapshot(ctx, parsed?.tags.importing); }); -test.skip("parse #export(A, B) importing bar(A)", () => { +test.ignore("parse #export(A, B) importing bar(A)", async (ctx) => { const src = ` #export(A, B) importing bar(A) fn foo(a:A, b:B) { bar(a); } `; const parsed = parseWgslD(src); - expect(parsed[0]).toMatchSnapshot(); + await assertSnapshot(ctx, parsed[0]); }); -test("#export w/o closing paren", () => { +test("#export w/o closing paren", async (ctx) => { const src = `#export (A ) `; const { log, logged } = logCatch(); _withBaseLogger(log, () => parseWgslD(src)); - expect(logged()).toMatchInlineSnapshot(` - "expected text ')'' - #export (A Ln 1 - ^" - `); + await assertSnapshot(ctx, logged()); }); -test.skip("parse #extends", () => { +test.ignore("parse #extends", async (ctx) => { const src = `#extends Foo(a,b) as Bar from baz`; const appState = parseWgslD(src); - expect(appState[0]).toMatchInlineSnapshot(` - { - "args": [ - "a", - "b", - ], - "as": "Bar", - "end": 33, - "from": "baz", - "kind": "extends", - "name": "Foo", - "start": 0, - } - `); -}); - -test("parse extends", () => { + await assertSnapshot(ctx, appState[0]); +}); + +test("parse extends", async (ctx) => { const src = `extends Foo(a,b) as Bar from baz`; const appState = parseWgslD(src); - expect(appState[0]).toMatchInlineSnapshot(` - { - "args": [ - "a", - "b", - ], - "as": "Bar", - "end": 32, - "from": "baz", - "kind": "extends", - "name": "Foo", - "start": 0, - } - `); + await assertSnapshot(ctx, appState[0]); }); test("parse module foo.bar.ca", () => { @@ -112,20 +83,20 @@ test("parse module foo.bar.ca", () => { expect((appState[0] as ModuleElem).name).toBe("foo.bar.ca"); }); -test("module foo.bar.ca", ctx => { - const appState = parseWgslD(ctx.task.name); +test("module foo.bar.ca", (ctx) => { + const appState = parseWgslD(ctx.name); expect(appState[0].kind).toBe("module"); expect((appState[0] as ModuleElem).name).toBe("foo.bar.ca"); }); -test("module foo::bar::ba", ctx => { - const appState = parseWgslD(ctx.task.name); +test("module foo::bar::ba", (ctx) => { + const appState = parseWgslD(ctx.name); expect(appState[0].kind).toBe("module"); expect((appState[0] as ModuleElem).name).toBe("foo/bar/ba"); }); -test("module foo/bar/ba", ctx => { - const appState = parseWgslD(ctx.task.name); +test("module foo/bar/ba", (ctx) => { + const appState = parseWgslD(ctx.name); expect(appState[0].kind).toBe("module"); expect((appState[0] as ModuleElem).name).toBe("foo/bar/ba"); }); @@ -140,24 +111,24 @@ test("parse import with numeric types", () => { expect(lastSegment.args).toEqual(nums); }); -test("#import foo from ./util", ctx => { - const appState = parseWgslD(ctx.task.name); +test("#import foo from ./util", (ctx) => { + const appState = parseWgslD(ctx.name); const importElem = appState[0] as TreeImportElem; const segments = treeToString(importElem.imports); expect(segments).toBe("./util/foo"); }); -test('import { foo } from "./bar"', ctx => { - const appState = parseWgslD(ctx.task.name); +test('import { foo } from "./bar"', (ctx) => { + const appState = parseWgslD(ctx.name); const importElem = appState[0] as TreeImportElem; const segments = treeToString(importElem.imports); expect(segments).toBe("./bar/foo"); }); -test('import { foo, bar } from "./bar"', ctx => { - const appState = parseWgslD(ctx.task.name); - const imports = appState.filter(e => e.kind === "treeImport"); - const segments = imports.map(i => treeToString(i.imports)); +test('import { foo, bar } from "./bar"', (ctx) => { + const appState = parseWgslD(ctx.name); + const imports = appState.filter((e) => e.kind === "treeImport"); + const segments = imports.map((i) => treeToString(i.imports)); expect(segments).toContain("./bar/foo"); expect(segments).toContain("./bar/bar"); }); diff --git a/packages/linker/src/test/ParseModule.test.ts b/linker/test/ParseModule.test.ts similarity index 67% rename from packages/linker/src/test/ParseModule.test.ts rename to linker/test/ParseModule.test.ts index f217a2799..38d1839bb 100644 --- a/packages/linker/src/test/ParseModule.test.ts +++ b/linker/test/ParseModule.test.ts @@ -1,10 +1,11 @@ -import { _withBaseLogger } from "mini-parse"; -import { logCatch } from "mini-parse/test-util"; +import { _withBaseLogger } from "@wesl/mini-parse"; +import { logCatch } from "@wesl/mini-parse/test-util"; import { expect, test } from "vitest"; -import { parseModule, TextModule } from "../ParseModule.js"; -import { simpleTemplate } from "../templates/SimpleTemplate.js"; +import { assertSnapshot } from "@std/testing/snapshot"; +import { parseModule, TextModule } from "../ParseModule.ts"; +import { simpleTemplate } from "../templates/SimpleTemplate.ts"; -test("simple fn export", () => { +test("simple fn export", async (ctx) => { const src = ` export fn one() -> i32 { @@ -13,10 +14,10 @@ test("simple fn export", () => { `; const module = testParseModule(src); expect(module.exports.length).toBe(1); - expect(module).toMatchSnapshot(); + await assertSnapshot(ctx, module); }); -test("simple fn import", () => { +test("simple fn import", async (ctx) => { const src = ` import bar/foo @@ -24,10 +25,10 @@ test("simple fn import", () => { `; const module = testParseModule(src); expect(module.imports.length).toBe(1); - expect(module).toMatchSnapshot(); + await assertSnapshot(ctx, module); }); -test.skip("match #extends", () => { +test.ignore("match #extends", () => { const src = ` // #extends Foo from pkg // #extends Bar from pkg @@ -63,7 +64,7 @@ test("read #module", () => { expect(textModule.modulePath).toBe("my.module.com"); }); -test.skip("simple #template preserves src map", () => { +test.ignore("simple #template preserves src map", () => { const src = ` #template simple fn foo() { XX } @@ -78,25 +79,24 @@ test.skip("simple #template preserves src map", () => { expect(textModule.srcMap.entries.length).toBe(3); }); -test.skip("parse error shows correct line after simple #template", () => { - const src = ` +test.ignore( + "parse error shows correct line after simple #template", + async (ctx) => { + const src = ` #template simple fn foo () { XX } fn () { } // oops `; - const templates = new Map([["simple", simpleTemplate.apply]]); - const { log, logged } = logCatch(); - _withBaseLogger(log, () => { - parseModule(src, "./foo", { XX: "/**/" }, templates); - }); - expect(logged()).toMatchInlineSnapshot(` - "missing fn name - fn () { } // oops Ln 4 - ^" - `); -}); + const templates = new Map([["simple", simpleTemplate.apply]]); + const { log, logged } = logCatch(); + _withBaseLogger(log, () => { + parseModule(src, "./foo", { XX: "/**/" }, templates); + }); + await assertSnapshot(ctx, logged()); + } +); -test("parse error shows correct line after #ifdef ", () => { +test("parse error shows correct line after #ifdef ", async (ctx) => { const src = ` // #if FALSE foo @@ -109,14 +109,10 @@ test("parse error shows correct line after #ifdef ", () => { _withBaseLogger(log, () => { parseModule(src, "./foo", { XX: "/**/" }, templates); }); - expect(logged()).toMatchInlineSnapshot(` - "missing fn name - fn () { } // oops Ln 6 - ^" - `); + await assertSnapshot(ctx, logged()); }); -test("parse error shows correct line after #ifdef and simple #template", () => { +test("parse error shows correct line after #ifdef and simple #template", async (ctx) => { const src = ` // #if FALSE foo @@ -131,21 +127,17 @@ test("parse error shows correct line after #ifdef and simple #template", () => { _withBaseLogger(log, () => { parseModule(src, "./foo", { XX: "/**/" }, templates); }); - expect(logged()).toMatchInlineSnapshot(` - "missing fn name - fn () { } // oops Ln 8 - ^" - `); + await assertSnapshot(ctx, logged()); }); -test("import gleam style", () => { +test("import gleam style", async (ctx) => { const src = ` import my/foo fn bar() { foo(); } `; const module = testParseModule(src); - expect(module.imports).toMatchSnapshot(); + await assertSnapshot(ctx, module.imports); }); function testParseModule(src: string): TextModule { diff --git a/packages/linker/src/test/ParseWgslD.test.ts b/linker/test/ParseWgslD.test.ts similarity index 67% rename from packages/linker/src/test/ParseWgslD.test.ts rename to linker/test/ParseWgslD.test.ts index fbc4a39b4..2fc76945f 100644 --- a/packages/linker/src/test/ParseWgslD.test.ts +++ b/linker/test/ParseWgslD.test.ts @@ -1,38 +1,39 @@ -import { _withBaseLogger, or, repeat } from "mini-parse"; -import { expectNoLogErr, logCatch } from "mini-parse/test-util"; +import { _withBaseLogger, or, repeat } from "@wesl/mini-parse"; +import { expectNoLogErr, logCatch } from "@wesl/mini-parse/test-util"; import { expect, test } from "vitest"; -import { AbstractElem, FnElem, StructElem, VarElem } from "../AbstractElems.js"; -import { filterElems } from "../ParseModule.js"; -import { unknown, wordNumArgs } from "../ParseSupport.js"; +import { assertSnapshot } from "@std/testing/snapshot"; +import { AbstractElem, FnElem, StructElem, VarElem } from "../AbstractElems.ts"; +import { filterElems } from "../ParseModule.ts"; +import { unknown, wordNumArgs } from "../ParseSupport.ts"; import { fnDecl, globalVar, parseWgslD, structDecl, typeSpecifier, -} from "../ParseWgslD.js"; -import { testAppParse } from "./TestUtil.js"; +} from "../ParseWgslD.ts"; +import { testAppParse } from "./TestUtil.ts"; function testParseWgsl(src: string): AbstractElem[] { return parseWgslD(src, undefined, {}, 500); } -test("parse empty string", () => { +test("parse empty string", async (ctx) => { const parsed = testParseWgsl(""); - expect(parsed).toMatchSnapshot(); + await assertSnapshot(ctx, parsed); }); -test("parse fn foo() { }", () => { +test("parse fn foo() { }", async (ctx) => { const src = "fn foo() { }"; const parsed = testParseWgsl(src); - expect(parsed).toMatchSnapshot(); + await assertSnapshot(ctx, parsed); }); -test("parse fn with calls", () => { +test("parse fn with calls", async (ctx) => { const src = "fn foo() { foo(); bar(); }"; const parsed = testParseWgsl(src); - expect(parsed).toMatchSnapshot(); + await assertSnapshot(ctx, parsed); }); test("structDecl parses struct member types", () => { @@ -43,166 +44,117 @@ test("structDecl parses struct member types", () => { expect(typeNames).toEqual(["f32", "i32"]); }); -test("parse struct", () => { +test("parse struct", async (ctx) => { const src = "struct Foo { a: f32, b: i32 }"; const parsed = testParseWgsl(src); - expect(parsed).toMatchInlineSnapshot(` - [ - { - "end": 29, - "kind": "struct", - "members": [ - { - "end": 19, - "kind": "member", - "name": "a", - "start": 13, - "typeRefs": [ - { - "end": 19, - "kind": "typeRef", - "name": "f32", - "start": 16, - }, - ], - }, - { - "end": 27, - "kind": "member", - "name": "b", - "start": 21, - "typeRefs": [ - { - "end": 27, - "kind": "typeRef", - "name": "i32", - "start": 24, - }, - ], - }, - ], - "name": "Foo", - "nameElem": { - "end": 10, - "kind": "typeName", - "name": "Foo", - "start": 7, - }, - "start": 0, - }, - ] - `); -}); - -test("parse @attribute before fn", () => { + await assertSnapshot(ctx, parsed); +}); + +test("parse @attribute before fn", async (ctx) => { const src = ` @compute fn main() {} `; const parsed = testParseWgsl(src); - expect(parsed).toMatchSnapshot(); + await assertSnapshot(ctx, parsed); }); -test("wordNumArgs parses (a, b, 1)", () => { +test("wordNumArgs parses (a, b, 1)", async (ctx) => { const src = `(a, b, 1)`; const { parsed } = testAppParse(wordNumArgs, src); - expect(parsed?.value).toMatchSnapshot(); + await assertSnapshot(ctx, parsed?.value); }); -test("parse @compute @workgroup_size(a, b, 1) before fn", () => { +test("parse @compute @workgroup_size(a, b, 1) before fn", async (ctx) => { const src = ` @compute @workgroup_size(a, b, 1) fn main() {} `; const parsed = testParseWgsl(src); - expect(parsed).toMatchSnapshot(); + await assertSnapshot(ctx, parsed); }); -test("parse global diagnostic", () => { +test("parse global diagnostic", async (ctx) => { const src = ` diagnostic(off,derivative_uniformity); fn main() {} `; - expectNoLogErr(() => { + await expectNoLogErr(async () => { const parsed = testParseWgsl(src); - expect(parsed).toMatchSnapshot(); + await assertSnapshot(ctx, parsed); }); }); -test("parse const_assert", () => { +test("parse const_assert", async (ctx) => { const src = ` const_assert x < y; fn main() {} `; - expectNoLogErr(() => { + await expectNoLogErr(async () => { const parsed = testParseWgsl(src); - expect(parsed).toMatchSnapshot(); + await assertSnapshot(ctx, parsed); }); }); -test("parse top level var", () => { +test("parse top level var", async (ctx) => { const src = ` @group(0) @binding(0) var u: Uniforms; fn main() {} `; - expectNoLogErr(() => { + await expectNoLogErr(async () => { const parsed = testParseWgsl(src); - expect(parsed).toMatchSnapshot(); + await assertSnapshot(ctx, parsed); }); }); -test("parse top level override and const", () => { +test("parse top level override and const", async (ctx) => { const src = ` override x = 21; const y = 1; fn main() {} `; - expectNoLogErr(() => { + await expectNoLogErr(async () => { const parsed = testParseWgsl(src); - expect(parsed).toMatchSnapshot(); + await assertSnapshot(ctx, parsed); }); }); -test("parse root level ;;", () => { +test("parse root level ;;", async (ctx) => { const src = ";;"; - expectNoLogErr(() => { + await expectNoLogErr(async () => { const parsed = testParseWgsl(src); - expect(parsed).toMatchSnapshot(); + await assertSnapshot(ctx, parsed); }); }); -test("parse simple alias", () => { +test("parse simple alias", async (ctx) => { const src = `alias NewType = OldType;`; - expectNoLogErr(() => { + await expectNoLogErr(async () => { const parsed = testParseWgsl(src); - expect(parsed).toMatchSnapshot(); + await assertSnapshot(ctx, parsed); }); }); -test("parse array alias", () => { +test("parse array alias", async (ctx) => { const src = ` alias Points3 = array; `; - expectNoLogErr(() => { + await expectNoLogErr(async () => { const parsed = testParseWgsl(src); - expect(parsed).toMatchSnapshot(); + await assertSnapshot(ctx, parsed); }); }); -test("unexpected token", () => { +test("unexpected token", async (ctx) => { const p = repeat(or("a", unknown)); const { log, logged } = logCatch(); _withBaseLogger(log, () => testAppParse(p, "a b")); - expect(logged()).toMatchInlineSnapshot(` - "??? word: 'b' repeat > or > map - a b Ln 1 - ^" - `); + await assertSnapshot(ctx, logged()); }); test("fnDecl parses fn with return type", () => { @@ -313,28 +265,28 @@ test("parse fn with attributes and suffix comma", () => { }); }); -test("parse foo::bar(); ", () => { +test("parse foo::bar(); ", async (ctx) => { const src = "fn main() { foo::bar(); }"; const parsed = testParseWgsl(src); - expect(parsed).toMatchSnapshot(); + await assertSnapshot(ctx, parsed); }); -test("parse foo.bar(); ", () => { +test("parse foo.bar(); ", async (ctx) => { const src = "fn main() { foo.bar(); }"; const parsed = testParseWgsl(src); - expect(parsed).toMatchSnapshot(); + await assertSnapshot(ctx, parsed); }); -test("parse let x: foo::bar; ", () => { +test("parse let x: foo::bar; ", async (ctx) => { const src = "fn main() { let x: foo::bar = 1; }"; const parsed = testParseWgsl(src); - expect(parsed).toMatchSnapshot(); + await assertSnapshot(ctx, parsed); }); -test("parse let x: foo.bar; ", () => { +test("parse let x: foo.bar; ", async (ctx) => { const src = "fn main() { let x: foo.bar = 1; }"; const parsed = testParseWgsl(src); - expect(parsed).toMatchSnapshot(); + await assertSnapshot(ctx, parsed); }); test("parse var x: foo.bar;", () => { diff --git a/packages/linker/src/test/PathUtil.test.ts b/linker/test/PathUtil.test.ts similarity index 94% rename from packages/linker/src/test/PathUtil.test.ts rename to linker/test/PathUtil.test.ts index 7f9946b7a..52a81a99c 100644 --- a/packages/linker/src/test/PathUtil.test.ts +++ b/linker/test/PathUtil.test.ts @@ -1,5 +1,5 @@ import { expect, test } from "vitest"; -import { normalize } from "../PathUtil.js"; +import { normalize } from "../PathUtil.ts"; // ../../../lib/webgpu-samples/src/anim/anim.wgsl diff --git a/packages/linker/src/test/ResolveImport.test.ts b/linker/test/ResolveImport.test.ts similarity index 87% rename from packages/linker/src/test/ResolveImport.test.ts rename to linker/test/ResolveImport.test.ts index 1aea95bd9..3894b0b42 100644 --- a/packages/linker/src/test/ResolveImport.test.ts +++ b/linker/test/ResolveImport.test.ts @@ -1,8 +1,8 @@ import { expect, test } from "vitest"; -import { importResolutionMap } from "../ImportResolutionMap.js"; -import { ModuleRegistry } from "../ModuleRegistry.js"; -import { TextExport } from "../ParseModule.js"; -import { resolveImport } from "../ResolveImport.js"; +import { importResolutionMap } from "../ImportResolutionMap.ts"; +import { ModuleRegistry } from "../ModuleRegistry.ts"; +import { TextExport } from "../ParseModule.ts"; +import { resolveImport } from "../ResolveImport.ts"; test("resolveImport foo() from import bar/foo", () => { const registry = new ModuleRegistry({ diff --git a/packages/linker/src/test/ScratchTest.test.ts b/linker/test/ScratchTest.test.ts similarity index 100% rename from packages/linker/src/test/ScratchTest.test.ts rename to linker/test/ScratchTest.test.ts diff --git a/packages/linker/src/test/Slicer.test.ts b/linker/test/Slicer.test.ts similarity index 78% rename from packages/linker/src/test/Slicer.test.ts rename to linker/test/Slicer.test.ts index 53bec9696..b32b41180 100644 --- a/packages/linker/src/test/Slicer.test.ts +++ b/linker/test/Slicer.test.ts @@ -1,37 +1,14 @@ -import { SrcMap } from "mini-parse"; +import { SrcMap } from "@wesl/mini-parse"; import { expect, test } from "vitest"; -import { sliceReplace } from "../Slicer.js"; +import { assertSnapshot } from "@std/testing/snapshot"; +import { sliceReplace } from "../Slicer.ts"; -test("slice middle", () => { +test("slice middle", async (ctx) => { const src = "aaabbbc"; const srcMap = sliceReplace(src, [{ start: 3, end: 6, replacement: "X" }]); const { dest, entries } = srcMap; expect(dest).toBe("aaaXc"); - expect(entries).toMatchInlineSnapshot(` - [ - { - "destEnd": 3, - "destStart": 0, - "src": "aaabbbc", - "srcEnd": 3, - "srcStart": 0, - }, - { - "destEnd": 4, - "destStart": 3, - "src": "aaabbbc", - "srcEnd": 6, - "srcStart": 3, - }, - { - "destEnd": 5, - "destStart": 4, - "src": "aaabbbc", - "srcEnd": 7, - "srcStart": 6, - }, - ] - `); + await assertSnapshot(ctx, entries); }); test("slice end", () => { diff --git a/packages/linker/src/test/TestSetup.ts b/linker/test/TestSetup.ts similarity index 50% rename from packages/linker/src/test/TestSetup.ts rename to linker/test/TestSetup.ts index 202091ec0..ca2cfcef4 100644 --- a/packages/linker/src/test/TestSetup.ts +++ b/linker/test/TestSetup.ts @@ -1,4 +1,4 @@ -import { enableTracing } from "mini-parse"; +import { enableTracing } from "@wesl/mini-parse"; // enable parser tracing features enableTracing(); diff --git a/packages/linker/src/test/TestUtil.ts b/linker/test/TestUtil.ts similarity index 81% rename from packages/linker/src/test/TestUtil.ts rename to linker/test/TestUtil.ts index d80941280..6e9b0f144 100644 --- a/packages/linker/src/test/TestUtil.ts +++ b/linker/test/TestUtil.ts @@ -1,12 +1,12 @@ -import { NoTags, Parser, TagRecord } from "mini-parse"; -import { testParse, TestParseResult } from "mini-parse/test-util"; -import { AbstractElem } from "../AbstractElems.js"; -import { mainTokens } from "../MatchWgslD.js"; +import { NoTags, Parser, TagRecord } from "@wesl/mini-parse"; +import { testParse, TestParseResult } from "@wesl/mini-parse/test-util"; +import { AbstractElem } from "../AbstractElems.ts"; +import { mainTokens } from "../MatchWgslD.ts"; import { ModuleRegistry, RegisterGenerator, Template, -} from "../ModuleRegistry.js"; +} from "../ModuleRegistry.ts"; export function testAppParse( parser: Parser, diff --git a/packages/linker/src/test/TraverseRefs.test.ts b/linker/test/TraverseRefs.test.ts similarity index 89% rename from packages/linker/src/test/TraverseRefs.test.ts rename to linker/test/TraverseRefs.test.ts index ec7d57d1d..442989d4a 100644 --- a/packages/linker/src/test/TraverseRefs.test.ts +++ b/linker/test/TraverseRefs.test.ts @@ -1,9 +1,10 @@ -import { _withBaseLogger } from "mini-parse"; -import { logCatch } from "mini-parse/test-util"; +import { _withBaseLogger } from "@wesl/mini-parse"; +import { logCatch } from "@wesl/mini-parse/test-util"; import { expect, test } from "vitest"; -import { refFullName } from "../Linker.js"; -import { ModuleRegistry } from "../ModuleRegistry.js"; -import { FoundRef, refName, TextRef, traverseRefs } from "../TraverseRefs.js"; +import { assertSnapshot } from "@std/testing/snapshot"; +import { refFullName } from "../Linker.ts"; +import { ModuleRegistry } from "../ModuleRegistry.ts"; +import { FoundRef, TextRef, refName, traverseRefs } from "../TraverseRefs.ts"; test("traverse a fn to struct ref", () => { const src = ` @@ -77,7 +78,7 @@ test("traverse nested import with params and support fn", () => { expect(second.elem.name).toBe("support"); }); -test.skip("traverse importing", () => { +test.ignore("traverse importing", () => { const src = ` #import foo(A, B) from ./file1 fn main() { @@ -97,7 +98,7 @@ test.skip("traverse importing", () => { expect(importingRef.expInfo?.expImpArgs).toEqual([["X", "B"]]); }); -test.skip("traverse double importing", () => { +test.ignore("traverse double importing", () => { const src = ` #import foo(A, B) from ./file1 fn main() { @@ -123,7 +124,7 @@ test.skip("traverse double importing", () => { expect(expImpArgs[3]).toEqual([["Y", "B"]]); }); -test.skip("traverse importing from a support fn", () => { +test.ignore("traverse importing from a support fn", async (ctx) => { const src = ` #import foo(A, B) from ./file1 fn main() { @@ -146,10 +147,10 @@ test.skip("traverse importing from a support fn", () => { const er = r as TextRef; return er ? [{ name: er.elem.name, args: er.expInfo?.expImpArgs }] : []; }); - expect(expImpArgs).toMatchSnapshot(); + await assertSnapshot(ctx, expImpArgs); }); -test.skip("traverse importing from a local call fails", () => { +test.ignore("traverse importing from a local call fails", () => { const src = ` #import foo(A, B) from ./file1 fn main() { @@ -169,7 +170,7 @@ test.skip("traverse importing from a local call fails", () => { expect(log.length).not.toBe(0); }); -test.skip("importing args don't match", () => { +test.ignore("importing args don't match", async (ctx) => { const src = ` #import foo(A, B) from ./file1 fn main() { @@ -184,17 +185,10 @@ test.skip("importing args don't match", () => { const { log } = traverseWithLog(src, module1, module2); - expect(log).toMatchInlineSnapshot(` - "importing arg doesn't match export module: moduleFile0 moduleFile0 - #export(C, D) importing bar(E) Ln 2 - ^ - reference not found: X module: moduleFile1 moduleFile1 - fn bar(x:X) { } Ln 3 - ^" - `); + await assertSnapshot(ctx, log); }); -test("mismatched import export params", () => { +test("mismatched import export params", async (ctx) => { const src = ` #import foo(A, B) from ./file1 fn main() { @@ -205,14 +199,7 @@ test("mismatched import export params", () => { fn foo(c:C) { } `; const { log } = traverseWithLog(src, module1); - expect(log).toMatchInlineSnapshot(` - "mismatched import and export params module: _root/main.wgsl - #import foo(A, B) from ./file1 Ln 2 - ^ - module: _root/file1.wgsl - #export(C) Ln 2 - ^" - `); + await assertSnapshot(ctx, log); }); test("traverse var to gleam style struct ref", () => { @@ -301,7 +288,7 @@ test("traverse transitive struct refs", () => { expect(refName(refs[2])).toBe("BStruct"); }); -test.skip("traverse #export importing struct to struct", () => { +test.ignore("traverse #export importing struct to struct", () => { const src = ` #import AStruct(MyStruct) @@ -350,7 +337,7 @@ test("traverse ref from struct constructor", () => { expect(refName(refs[1])).toBe("AStruct"); }); -test.skip("traverse #extends", () => { +test.ignore("traverse #extends", () => { const src = ` #extends A struct B { diff --git a/packages/linker/src/test/Util.test.ts b/linker/test/Util.test.ts similarity index 91% rename from packages/linker/src/test/Util.test.ts rename to linker/test/Util.test.ts index 9f84593a7..4a2c52ced 100644 --- a/packages/linker/src/test/Util.test.ts +++ b/linker/test/Util.test.ts @@ -1,5 +1,5 @@ import { expect, test } from "vitest"; -import { overlapTail, scan } from "../Util.js"; +import { overlapTail, scan } from "../Util.ts"; test("scan", () => { const result = scan([1, 2, 1], (a, b: string) => b.slice(a), "foobar"); diff --git a/packages/linker/src/test/WgslTests.ts b/linker/test/WgslTests.ts similarity index 100% rename from packages/linker/src/test/WgslTests.ts rename to linker/test/WgslTests.ts diff --git a/linker/test/__snapshots__/Conditionals.test.ts.snap b/linker/test/__snapshots__/Conditionals.test.ts.snap new file mode 100644 index 000000000..2098f9613 --- /dev/null +++ b/linker/test/__snapshots__/Conditionals.test.ts.snap @@ -0,0 +1,57 @@ +export const snapshot = {}; + +snapshot[`parse #if #endif 1`] = ` +[ + { + destEnd: 1, + destStart: 0, + src: " + #if foo + fn f() { } + #endif + ", + srcEnd: 1, + srcStart: 0, + }, + { + destEnd: 16, + destStart: 1, + src: " + #if foo + fn f() { } + #endif + ", + srcEnd: 28, + srcStart: 13, + }, + { + destEnd: 20, + destStart: 16, + src: " + #if foo + fn f() { } + #endif + ", + srcEnd: 43, + srcStart: 39, + }, +] +`; + +snapshot[`srcLog with srcMap 1`] = ` +"found: + 1234 Ln 3 + ^ ^" +`; + +snapshot[`unterminated #if 1`] = ` +"unmatched #if/#else + #if foo Ln 2 + ^" +`; + +snapshot[`unterminated #else 1`] = ` +"unmatched #if/#else + #else Ln 3 + ^" +`; diff --git a/linker/test/__snapshots__/ParseComments.test.ts.snap b/linker/test/__snapshots__/ParseComments.test.ts.snap new file mode 100644 index 000000000..570534343 --- /dev/null +++ b/linker/test/__snapshots__/ParseComments.test.ts.snap @@ -0,0 +1,44 @@ +export const snapshot = {}; + +snapshot[`blockComment parses /* comment */ 1`] = ` +{ + tags: {}, + value: [ + "/*", + [ + { + kind: "word", + text: "comment", + }, + ], + "*/", + ], +} +`; + +snapshot[`parse fn with line comment 1`] = ` +[ + { + calls: [], + end: 39, + kind: "fn", + name: "binaryOp", + nameElem: { + end: 16, + kind: "fnName", + name: "binaryOp", + start: 8, + }, + start: 5, + typeRefs: [], + }, +] +`; + +snapshot[`wordNumArgs parses (a, b, 1) with line comments everywhere 1`] = ` +[ + "a", + "b", + "1", +] +`; diff --git a/linker/test/__snapshots__/ParseDirectives.test.ts.snap b/linker/test/__snapshots__/ParseDirectives.test.ts.snap new file mode 100644 index 000000000..8f42c5d0d --- /dev/null +++ b/linker/test/__snapshots__/ParseDirectives.test.ts.snap @@ -0,0 +1,83 @@ +export const snapshot = {}; + +snapshot[`parse import foo/bar 1`] = ` +[ + { + end: 14, + imports: ImportTree { + segments: [ + SimpleSegment { + args: undefined, + as: undefined, + name: "foo", + }, + SimpleSegment { + args: undefined, + as: undefined, + name: "bar", + }, + ], + }, + kind: "treeImport", + start: 0, + }, +] +`; + +snapshot[`parse #import foo(a,b) as baz from bar 1`] = ` +[ + { + end: 27, + imports: ImportTree { + segments: [ + SimpleSegment { + args: undefined, + as: undefined, + name: "bar", + }, + SimpleSegment { + args: undefined, + as: "baz", + name: "foo", + }, + ], + }, + kind: "treeImport", + start: 0, + }, +] +`; + +snapshot[`parse #export(foo) with trailing space 1`] = ` +[ + { + args: [ + "Elem", + ], + end: 20, + kind: "export", + start: 5, + }, +] +`; + +snapshot[`#export w/o closing paren 1`] = ` +"expected text ')'' +#export (A Ln 1 + ^" +`; + +snapshot[`parse extends 1`] = ` +{ + args: [ + "a", + "b", + ], + as: "Bar", + end: 32, + from: "baz", + kind: "extends", + name: "Foo", + start: 0, +} +`; diff --git a/linker/test/__snapshots__/ParseModule.test.ts.snap b/linker/test/__snapshots__/ParseModule.test.ts.snap new file mode 100644 index 000000000..2b51aff43 --- /dev/null +++ b/linker/test/__snapshots__/ParseModule.test.ts.snap @@ -0,0 +1,222 @@ +export const snapshot = {}; + +snapshot[`simple fn export 1`] = ` +{ + aliases: [], + exports: [ + { + end: 12, + kind: "export", + ref: { + calls: [], + end: 55, + kind: "fn", + name: "one", + nameElem: { + end: 22, + kind: "fnName", + name: "one", + start: 19, + }, + start: 16, + typeRefs: [ + { + end: 31, + kind: "typeRef", + name: "i32", + start: 28, + }, + ], + }, + start: 5, + }, + ], + fns: [ + { + calls: [], + end: 55, + kind: "fn", + name: "one", + nameElem: { + end: 22, + kind: "fnName", + name: "one", + start: 19, + }, + start: 16, + typeRefs: [ + { + end: 31, + kind: "typeRef", + name: "i32", + start: 28, + }, + ], + }, + ], + globalDirectives: [], + imports: [], + kind: "text", + modulePath: "./test.wgsl", + preppedSrc: " + export + fn one() -> i32 { + return 1; + } + ", + src: " + export + fn one() -> i32 { + return 1; + } + ", + srcMap: SrcMap { + dest: " + export + fn one() -> i32 { + return 1; + } + ", + entries: [ + { + destEnd: 58, + destStart: 0, + src: " + export + fn one() -> i32 { + return 1; + } + ", + srcEnd: 58, + srcStart: 0, + }, + ], + }, + structs: [], + template: undefined, + vars: [], +} +`; + +snapshot[`simple fn import 1`] = ` +{ + aliases: [], + exports: [], + fns: [ + { + calls: [ + { + end: 39, + kind: "call", + name: "foo", + start: 36, + }, + ], + end: 44, + kind: "fn", + name: "bar", + nameElem: { + end: 31, + kind: "fnName", + name: "bar", + start: 28, + }, + start: 25, + typeRefs: [], + }, + ], + globalDirectives: [], + imports: [ + { + end: 20, + imports: ImportTree { + segments: [ + SimpleSegment { + args: undefined, + as: undefined, + name: "bar", + }, + SimpleSegment { + args: undefined, + as: undefined, + name: "foo", + }, + ], + }, + kind: "treeImport", + start: 5, + }, + ], + kind: "text", + modulePath: "./test.wgsl", + preppedSrc: " + import bar/foo + + fn bar() { foo(); } + ", + src: " + import bar/foo + + fn bar() { foo(); } + ", + srcMap: SrcMap { + dest: " + import bar/foo + + fn bar() { foo(); } + ", + entries: [ + { + destEnd: 47, + destStart: 0, + src: " + import bar/foo + + fn bar() { foo(); } + ", + srcEnd: 47, + srcStart: 0, + }, + ], + }, + structs: [], + template: undefined, + vars: [], +} +`; + +snapshot[`parse error shows correct line after #ifdef 1`] = ` +"missing fn name + fn () { } // oops Ln 6 + ^" +`; + +snapshot[`parse error shows correct line after #ifdef and simple #template 1`] = ` +"missing fn name + fn () { } // oops Ln 8 + ^" +`; + +snapshot[`import gleam style 1`] = ` +[ + { + end: 19, + imports: ImportTree { + segments: [ + SimpleSegment { + args: undefined, + as: undefined, + name: "my", + }, + SimpleSegment { + args: undefined, + as: undefined, + name: "foo", + }, + ], + }, + kind: "treeImport", + start: 5, + }, +] +`; diff --git a/linker/test/__snapshots__/ParseWgslD.test.ts.snap b/linker/test/__snapshots__/ParseWgslD.test.ts.snap new file mode 100644 index 000000000..e31829353 --- /dev/null +++ b/linker/test/__snapshots__/ParseWgslD.test.ts.snap @@ -0,0 +1,417 @@ +export const snapshot = {}; + +snapshot[`parse empty string 1`] = `[]`; + +snapshot[`parse fn foo() { } 1`] = ` +[ + { + calls: [], + end: 12, + kind: "fn", + name: "foo", + nameElem: { + end: 6, + kind: "fnName", + name: "foo", + start: 3, + }, + start: 0, + typeRefs: [], + }, +] +`; + +snapshot[`parse fn with calls 1`] = ` +[ + { + calls: [ + { + end: 14, + kind: "call", + name: "foo", + start: 11, + }, + { + end: 21, + kind: "call", + name: "bar", + start: 18, + }, + ], + end: 26, + kind: "fn", + name: "foo", + nameElem: { + end: 6, + kind: "fnName", + name: "foo", + start: 3, + }, + start: 0, + typeRefs: [], + }, +] +`; + +snapshot[`parse struct 1`] = ` +[ + { + end: 29, + kind: "struct", + members: [ + { + end: 19, + kind: "member", + name: "a", + start: 13, + typeRefs: [ + { + end: 19, + kind: "typeRef", + name: "f32", + start: 16, + }, + ], + }, + { + end: 27, + kind: "member", + name: "b", + start: 21, + typeRefs: [ + { + end: 27, + kind: "typeRef", + name: "i32", + start: 24, + }, + ], + }, + ], + name: "Foo", + nameElem: { + end: 10, + kind: "typeName", + name: "Foo", + start: 7, + }, + start: 0, + }, +] +`; + +snapshot[`parse @attribute before fn 1`] = ` +[ + { + calls: [], + end: 31, + kind: "fn", + name: "main", + nameElem: { + end: 26, + kind: "fnName", + name: "main", + start: 22, + }, + start: 5, + typeRefs: [], + }, +] +`; + +snapshot[`wordNumArgs parses (a, b, 1) 1`] = ` +[ + "a", + "b", + "1", +] +`; + +snapshot[`parse @compute @workgroup_size(a, b, 1) before fn 1`] = ` +[ + { + calls: [], + end: 61, + kind: "fn", + name: "main", + nameElem: { + end: 56, + kind: "fnName", + name: "main", + start: 52, + }, + start: 5, + typeRefs: [], + }, +] +`; + +snapshot[`parse global diagnostic 1`] = ` +[ + { + end: 43, + kind: "globalDirective", + start: 5, + }, + { + calls: [], + end: 61, + kind: "fn", + name: "main", + nameElem: { + end: 56, + kind: "fnName", + name: "main", + start: 52, + }, + start: 49, + typeRefs: [], + }, +] +`; + +snapshot[`parse const_assert 1`] = ` +[ + { + end: 24, + kind: "globalDirective", + start: 5, + }, + { + calls: [], + end: 42, + kind: "fn", + name: "main", + nameElem: { + end: 37, + kind: "fnName", + name: "main", + start: 33, + }, + start: 30, + typeRefs: [], + }, +] +`; + +snapshot[`parse top level var 1`] = ` +[ + { + end: 52, + kind: "var", + name: "u", + start: 5, + typeRefs: [ + { + end: 51, + kind: "typeRef", + name: "Uniforms", + start: 43, + }, + ], + }, + { + calls: [], + end: 76, + kind: "fn", + name: "main", + nameElem: { + end: 71, + kind: "fnName", + name: "main", + start: 67, + }, + start: 64, + typeRefs: [], + }, +] +`; + +snapshot[`parse top level override and const 1`] = ` +[ + { + end: 21, + kind: "var", + name: "x", + start: 5, + typeRefs: [], + }, + { + end: 38, + kind: "var", + name: "y", + start: 26, + typeRefs: [], + }, + { + calls: [], + end: 56, + kind: "fn", + name: "main", + nameElem: { + end: 51, + kind: "fnName", + name: "main", + start: 47, + }, + start: 44, + typeRefs: [], + }, +] +`; + +snapshot[`parse root level ;; 1`] = `[]`; + +snapshot[`parse simple alias 1`] = ` +[ + { + end: 24, + kind: "alias", + name: "NewType", + start: 0, + typeRefs: [ + { + end: 23, + kind: "typeRef", + name: "OldType", + start: 16, + }, + ], + }, +] +`; + +snapshot[`parse array alias 1`] = ` +[ + { + end: 37, + kind: "alias", + name: "Points3", + start: 5, + typeRefs: [ + { + end: 36, + kind: "typeRef", + name: "array", + start: 21, + }, + { + end: 36, + kind: "typeRef", + name: "Point", + start: 21, + }, + ], + }, +] +`; + +snapshot[`unexpected token 1`] = ` +"??? word: 'b' +a b Ln 1 + ^" +`; + +snapshot[`parse foo::bar(); 1`] = ` +[ + { + calls: [ + { + end: 20, + kind: "call", + name: "foo::bar", + start: 12, + }, + ], + end: 25, + kind: "fn", + name: "main", + nameElem: { + end: 7, + kind: "fnName", + name: "main", + start: 3, + }, + start: 0, + typeRefs: [], + }, +] +`; + +snapshot[`parse foo.bar(); 1`] = ` +[ + { + calls: [ + { + end: 19, + kind: "call", + name: "foo.bar", + start: 12, + }, + ], + end: 24, + kind: "fn", + name: "main", + nameElem: { + end: 7, + kind: "fnName", + name: "main", + start: 3, + }, + start: 0, + typeRefs: [], + }, +] +`; + +snapshot[`parse let x: foo::bar; 1`] = ` +[ + { + calls: [], + end: 34, + kind: "fn", + name: "main", + nameElem: { + end: 7, + kind: "fnName", + name: "main", + start: 3, + }, + start: 0, + typeRefs: [ + { + end: 27, + kind: "typeRef", + name: "foo::bar", + start: 19, + }, + ], + }, +] +`; + +snapshot[`parse let x: foo.bar; 1`] = ` +[ + { + calls: [], + end: 33, + kind: "fn", + name: "main", + nameElem: { + end: 7, + kind: "fnName", + name: "main", + start: 3, + }, + start: 0, + typeRefs: [ + { + end: 26, + kind: "typeRef", + name: "foo.bar", + start: 19, + }, + ], + }, +] +`; diff --git a/linker/test/__snapshots__/Slicer.test.ts.snap b/linker/test/__snapshots__/Slicer.test.ts.snap new file mode 100644 index 000000000..19b9077c6 --- /dev/null +++ b/linker/test/__snapshots__/Slicer.test.ts.snap @@ -0,0 +1,27 @@ +export const snapshot = {}; + +snapshot[`slice middle 1`] = ` +[ + { + destEnd: 3, + destStart: 0, + src: "aaabbbc", + srcEnd: 3, + srcStart: 0, + }, + { + destEnd: 4, + destStart: 3, + src: "aaabbbc", + srcEnd: 6, + srcStart: 3, + }, + { + destEnd: 5, + destStart: 4, + src: "aaabbbc", + srcEnd: 7, + srcStart: 6, + }, +] +`; diff --git a/linker/test/__snapshots__/TraverseRefs.test.ts.snap b/linker/test/__snapshots__/TraverseRefs.test.ts.snap new file mode 100644 index 000000000..4c1201ab8 --- /dev/null +++ b/linker/test/__snapshots__/TraverseRefs.test.ts.snap @@ -0,0 +1,10 @@ +export const snapshot = {}; + +snapshot[`mismatched import export params 1`] = ` +"mismatched import and export params module: _root/main.wgsl + #import foo(A, B) from ./file1 Ln 2 + ^ + module: _root/file1.wgsl + #export(C) Ln 2 + ^" +`; diff --git a/packages/linker/src/test/shared/StringUtil.ts b/linker/test/shared/StringUtil.ts similarity index 100% rename from packages/linker/src/test/shared/StringUtil.ts rename to linker/test/shared/StringUtil.ts diff --git a/packages/linker/src/test/shared/test/StringUtil.test.ts b/linker/test/shared/test/StringUtil.test.ts similarity index 93% rename from packages/linker/src/test/shared/test/StringUtil.test.ts rename to linker/test/shared/test/StringUtil.test.ts index 89358130f..ce9fab94e 100644 --- a/packages/linker/src/test/shared/test/StringUtil.test.ts +++ b/linker/test/shared/test/StringUtil.test.ts @@ -1,5 +1,5 @@ import { expect, test } from "vitest"; -import { trimSrc } from "../StringUtil.js"; +import { trimSrc } from "../StringUtil.ts"; test("trimSrc on blank", () => { const trimmed = trimSrc(``); diff --git a/packages/mini-parse/src/CombinatorTypes.ts b/mini-parse/CombinatorTypes.ts similarity index 98% rename from packages/mini-parse/src/CombinatorTypes.ts rename to mini-parse/CombinatorTypes.ts index 02e135e9a..4a0c1bf73 100644 --- a/packages/mini-parse/src/CombinatorTypes.ts +++ b/mini-parse/CombinatorTypes.ts @@ -1,4 +1,4 @@ -import { NoTags, Parser, TagRecord } from "./Parser.js"; +import { NoTags, Parser, TagRecord } from "./Parser.ts"; /** Typescript types for parser combinators */ diff --git a/packages/mini-parse/src/MatchingLexer.ts b/mini-parse/MatchingLexer.ts similarity index 94% rename from packages/mini-parse/src/MatchingLexer.ts rename to mini-parse/MatchingLexer.ts index 4ebc54068..411f32800 100644 --- a/packages/mini-parse/src/MatchingLexer.ts +++ b/mini-parse/MatchingLexer.ts @@ -1,7 +1,7 @@ -import { srcTrace } from "./ParserLogging.js"; -import { tracing } from "./ParserTracing.js"; -import { SrcMap } from "./SrcMap.js"; -import { Token, TokenMatcher } from "./TokenMatcher.js"; +import { srcTrace } from "./ParserLogging.ts"; +import { tracing } from "./ParserTracing.ts"; +import { SrcMap } from "./SrcMap.ts"; +import { Token, TokenMatcher } from "./TokenMatcher.ts"; export interface Lexer { /** return the next token, advancing the the current position */ diff --git a/packages/mini-parse/src/Parser.ts b/mini-parse/Parser.ts similarity index 98% rename from packages/mini-parse/src/Parser.ts rename to mini-parse/Parser.ts index 0241e7919..d8278b4eb 100644 --- a/packages/mini-parse/src/Parser.ts +++ b/mini-parse/Parser.ts @@ -1,7 +1,7 @@ -import { CombinatorArg, ParserFromArg } from "./CombinatorTypes.js"; -import { Lexer } from "./MatchingLexer.js"; -import { ParseError, parserArg } from "./ParserCombinator.js"; -import { srcLog } from "./ParserLogging.js"; +import { CombinatorArg, ParserFromArg } from "./CombinatorTypes.ts"; +import { Lexer } from "./MatchingLexer.ts"; +import { ParseError, parserArg } from "./ParserCombinator.ts"; +import { srcLog } from "./ParserLogging.ts"; import { debugNames, parserLog, @@ -9,9 +9,9 @@ import { TraceOptions, tracing, withTraceLogging, -} from "./ParserTracing.js"; -import { mergeTags } from "./ParserUtil.js"; -import { SrcMap } from "./SrcMap.js"; +} from "./ParserTracing.ts"; +import { mergeTags } from "./ParserUtil.ts"; +import { SrcMap } from "./SrcMap.ts"; export interface AppState { /** diff --git a/packages/mini-parse/src/ParserCombinator.ts b/mini-parse/ParserCombinator.ts similarity index 97% rename from packages/mini-parse/src/ParserCombinator.ts rename to mini-parse/ParserCombinator.ts index 054dadf5b..39a166812 100644 --- a/packages/mini-parse/src/ParserCombinator.ts +++ b/mini-parse/ParserCombinator.ts @@ -7,8 +7,8 @@ import { SeqParser, SeqValues, TagsFromArg, -} from "./CombinatorTypes.js"; -import { quotedText } from "./MatchingLexer.js"; +} from "./CombinatorTypes.ts"; +import { quotedText } from "./MatchingLexer.ts"; import { ExtendedResult, NoTags, @@ -21,10 +21,10 @@ import { simpleParser, TagRecord, tokenSkipSet, -} from "./Parser.js"; -import { ctxLog } from "./ParserLogging.js"; -import { mergeTags } from "./ParserUtil.js"; -import { Token, TokenMatcher } from "./TokenMatcher.js"; +} from "./Parser.ts"; +import { ctxLog } from "./ParserLogging.ts"; +import { mergeTags } from "./ParserUtil.ts"; +import { Token, TokenMatcher } from "./TokenMatcher.ts"; /** Parsing Combinators * diff --git a/packages/mini-parse/src/ParserLogging.ts b/mini-parse/ParserLogging.ts similarity index 96% rename from packages/mini-parse/src/ParserLogging.ts rename to mini-parse/ParserLogging.ts index cc8014f53..286046606 100644 --- a/packages/mini-parse/src/ParserLogging.ts +++ b/mini-parse/ParserLogging.ts @@ -1,6 +1,6 @@ -import { ExtendedResult, ParserContext } from "./Parser.js"; -import { logger, parserLog } from "./ParserTracing.js"; -import { SrcMap } from "./SrcMap.js"; +import { ExtendedResult, ParserContext } from "./Parser.ts"; +import { logger, parserLog } from "./ParserTracing.ts"; +import { SrcMap } from "./SrcMap.ts"; /** log an message along with the source line and a caret indicating the error position in the line * @param pos is the position the source string, or if src is a SrcMap, then diff --git a/packages/mini-parse/src/ParserTracing.ts b/mini-parse/ParserTracing.ts similarity index 98% rename from packages/mini-parse/src/ParserTracing.ts rename to mini-parse/ParserTracing.ts index 6be8a1ab8..8b0a511a7 100644 --- a/packages/mini-parse/src/ParserTracing.ts +++ b/mini-parse/ParserTracing.ts @@ -1,4 +1,4 @@ -import { Parser, ParserContext, setTraceName } from "./Parser.js"; +import { Parser, ParserContext, setTraceName } from "./Parser.ts"; /** true if parser tracing is enabled */ export let tracing = false; diff --git a/packages/mini-parse/src/ParserUtil.ts b/mini-parse/ParserUtil.ts similarity index 100% rename from packages/mini-parse/src/ParserUtil.ts rename to mini-parse/ParserUtil.ts diff --git a/packages/mini-parse/README.md b/mini-parse/README.md similarity index 100% rename from packages/mini-parse/README.md rename to mini-parse/README.md diff --git a/packages/mini-parse/src/SrcMap.ts b/mini-parse/SrcMap.ts similarity index 100% rename from packages/mini-parse/src/SrcMap.ts rename to mini-parse/SrcMap.ts diff --git a/packages/mini-parse/src/TokenMatcher.ts b/mini-parse/TokenMatcher.ts similarity index 94% rename from packages/mini-parse/src/TokenMatcher.ts rename to mini-parse/TokenMatcher.ts index a1827db80..ba201e30e 100644 --- a/packages/mini-parse/src/TokenMatcher.ts +++ b/mini-parse/TokenMatcher.ts @@ -1,4 +1,4 @@ -import { srcLog } from "./ParserLogging.js"; +import { srcLog } from "./ParserLogging.ts"; export interface Token { kind: string; @@ -22,10 +22,12 @@ class Cache extends Map { super(); } - set(k: K, v: V): this { + override set(k: K, v: V): this { if (this.size > this.max) { - const first = this.keys().next().value; - if (first) this.delete(first); + const next = this.keys().next(); + if (!next.done) { + this.delete(next.value); + } } return super.set(k, v); } @@ -153,6 +155,6 @@ export function escapeRegex(s: string): string { */ export function matchOneOf(syms: string): RegExp { const symbolList = syms.split(" ").sort((a, b) => b.length - a.length); - const escaped = symbolList.filter(s => s).map(escapeRegex); + const escaped = symbolList.filter((s) => s).map(escapeRegex); return new RegExp(escaped.join("|")); } diff --git a/mini-parse/deno.json b/mini-parse/deno.json new file mode 100644 index 000000000..eb47f6898 --- /dev/null +++ b/mini-parse/deno.json @@ -0,0 +1,13 @@ +{ + "name": "@wesl/mini-parse", + "version": "0.1.0", + "exports": { + ".": "./mod.ts", + "./test-util": "./test-util/index.ts" + }, + "tasks": { + "dev": "deno test --allow-read --watch" + }, + "license": "MIT", + "imports": {} +} \ No newline at end of file diff --git a/packages/mini-parse/src/examples/BlogExample.ts b/mini-parse/examples/BlogExample.ts similarity index 72% rename from packages/mini-parse/src/examples/BlogExample.ts rename to mini-parse/examples/BlogExample.ts index bedd7be7e..5f0a3b268 100644 --- a/packages/mini-parse/src/examples/BlogExample.ts +++ b/mini-parse/examples/BlogExample.ts @@ -1,6 +1,6 @@ -import { matchingLexer } from "../MatchingLexer.js"; -import { kind, seq } from "../ParserCombinator.js"; -import { matchOneOf, tokenMatcher } from "../TokenMatcher.js"; +import { matchingLexer } from "../MatchingLexer.ts"; +import { kind, seq } from "../ParserCombinator.ts"; +import { matchOneOf, tokenMatcher } from "../TokenMatcher.ts"; const src = "fn foo()"; diff --git a/packages/mini-parse/src/examples/CalculatorExample.ts b/mini-parse/examples/CalculatorExample.ts similarity index 89% rename from packages/mini-parse/src/examples/CalculatorExample.ts rename to mini-parse/examples/CalculatorExample.ts index 05b1f0cc2..f3fc00c4d 100644 --- a/packages/mini-parse/src/examples/CalculatorExample.ts +++ b/mini-parse/examples/CalculatorExample.ts @@ -1,7 +1,7 @@ -import { Parser, setTraceName } from "../Parser.js"; -import { kind, opt, or, repeat, seq } from "../ParserCombinator.js"; -import { tracing } from "../ParserTracing.js"; -import { matchOneOf, tokenMatcher } from "../TokenMatcher.js"; +import { Parser, setTraceName } from "../Parser.ts"; +import { kind, opt, or, repeat, seq } from "../ParserCombinator.ts"; +import { tracing } from "../ParserTracing.ts"; +import { matchOneOf, tokenMatcher } from "../TokenMatcher.ts"; export const calcTokens = tokenMatcher({ number: /\d+/, diff --git a/packages/mini-parse/src/examples/CalculatorResultsExample.ts b/mini-parse/examples/CalculatorResultsExample.ts similarity index 88% rename from packages/mini-parse/src/examples/CalculatorResultsExample.ts rename to mini-parse/examples/CalculatorResultsExample.ts index 6b24027b6..7f75aa998 100644 --- a/packages/mini-parse/src/examples/CalculatorResultsExample.ts +++ b/mini-parse/examples/CalculatorResultsExample.ts @@ -1,7 +1,7 @@ -import { Parser, setTraceName } from "../Parser.js"; -import { fn, opt, or, repeat, seq } from "../ParserCombinator.js"; -import { tracing } from "../ParserTracing.js"; -import { mulDiv, num, plusMinus } from "./CalculatorExample.js"; +import { Parser, setTraceName } from "../Parser.ts"; +import { fn, opt, or, repeat, seq } from "../ParserCombinator.ts"; +import { tracing } from "../ParserTracing.ts"; +import { mulDiv, num, plusMinus } from "./CalculatorExample.ts"; let expr: Parser = null as any; // help TS with forward reference diff --git a/packages/mini-parse/src/examples/DocExamples.ts b/mini-parse/examples/DocExamples.ts similarity index 95% rename from packages/mini-parse/src/examples/DocExamples.ts rename to mini-parse/examples/DocExamples.ts index e1a63fda2..8b88d988b 100644 --- a/packages/mini-parse/src/examples/DocExamples.ts +++ b/mini-parse/examples/DocExamples.ts @@ -1,5 +1,5 @@ -import { kind, or, repeat, seq, tokens } from "../ParserCombinator.js"; -import { matchOneOf, tokenMatcher } from "../TokenMatcher.js"; +import { kind, or, repeat, seq, tokens } from "../ParserCombinator.ts"; +import { matchOneOf, tokenMatcher } from "../TokenMatcher.ts"; export const simpleTokens = tokenMatcher({ number: /\d+/, diff --git a/mini-parse/mod.ts b/mini-parse/mod.ts new file mode 100644 index 000000000..832671515 --- /dev/null +++ b/mini-parse/mod.ts @@ -0,0 +1,7 @@ +export * from "./MatchingLexer.ts"; +export * from "./Parser.ts"; +export * from "./ParserCombinator.ts"; +export * from "./ParserLogging.ts"; +export * from "./ParserTracing.ts"; +export * from "./SrcMap.ts"; +export * from "./TokenMatcher.ts"; diff --git a/packages/mini-parse/src/test-util/LogCatcher.ts b/mini-parse/test-util/LogCatcher.ts similarity index 100% rename from packages/mini-parse/src/test-util/LogCatcher.ts rename to mini-parse/test-util/LogCatcher.ts diff --git a/packages/mini-parse/src/test-util/TestParse.ts b/mini-parse/test-util/TestParse.ts similarity index 90% rename from packages/mini-parse/src/test-util/TestParse.ts rename to mini-parse/test-util/TestParse.ts index 8352cffd2..76b6d4494 100644 --- a/packages/mini-parse/src/test-util/TestParse.ts +++ b/mini-parse/test-util/TestParse.ts @@ -10,9 +10,9 @@ import { tokenMatcher, tracing, _withBaseLogger, -} from "mini-parse"; +} from "@wesl/mini-parse"; import { expect } from "vitest"; -import { logCatch } from "./LogCatcher.js"; +import { logCatch } from "./LogCatcher.ts"; const symbolSet = "& && -> @ / ! [ ] { } : , = == != > >= < << <= % - -- ' \"" + @@ -47,7 +47,7 @@ export function testParse( return { parsed, position: lexer.position(), appState: app.state }; } -/** run a test function and expect that no error logs are produced */ +/** run a test function and expect that no error logs are produced. If used with an async function, make sure that all calls to log happen within the sync part */ export function expectNoLogErr(fn: () => T): T { const { log, logged } = logCatch(); const result = _withBaseLogger(log, fn); diff --git a/mini-parse/test-util/index.ts b/mini-parse/test-util/index.ts new file mode 100644 index 000000000..5b76481ce --- /dev/null +++ b/mini-parse/test-util/index.ts @@ -0,0 +1,2 @@ +export * from "./LogCatcher.ts"; +export * from "./TestParse.ts"; diff --git a/packages/mini-parse/src/test/BlogExample.test.ts b/mini-parse/test/BlogExample.test.ts similarity index 89% rename from packages/mini-parse/src/test/BlogExample.test.ts rename to mini-parse/test/BlogExample.test.ts index 25a6f07cb..f495e019e 100644 --- a/packages/mini-parse/src/test/BlogExample.test.ts +++ b/mini-parse/test/BlogExample.test.ts @@ -1,7 +1,7 @@ import { expect, test } from "vitest"; -import { matchingLexer } from "../MatchingLexer.js"; -import { kind, opt, repeat, seq } from "../ParserCombinator.js"; -import { matchOneOf, tokenMatcher } from "../TokenMatcher.js"; +import { matchingLexer } from "../MatchingLexer.ts"; +import { kind, opt, repeat, seq } from "../ParserCombinator.ts"; +import { matchOneOf, tokenMatcher } from "../TokenMatcher.ts"; test("parse fn foo()", () => { const src = "fn foo()"; @@ -78,6 +78,6 @@ test("parse fn foo() with tagged results", () => { const [fnName] = result.tags.fnName; expect(fnName).toBe("foo"); const annotations: string[] = result.tags.annotation; - expect(annotations).to.toEqual(["export"]); + expect(annotations).toEqual(["export"]); } }); diff --git a/packages/mini-parse/src/test/CalculatorExample.test.ts b/mini-parse/test/CalculatorExample.test.ts similarity index 86% rename from packages/mini-parse/src/test/CalculatorExample.test.ts rename to mini-parse/test/CalculatorExample.test.ts index 25591d449..d61707c86 100644 --- a/packages/mini-parse/src/test/CalculatorExample.test.ts +++ b/mini-parse/test/CalculatorExample.test.ts @@ -1,13 +1,13 @@ -import { testParse } from "mini-parse/test-util"; +import { testParse } from "@wesl/mini-parse/test-util"; import { expect, test } from "vitest"; -import { calcTokens, statement } from "../examples/CalculatorExample.js"; +import { matchingLexer } from "../MatchingLexer.ts"; +import { calcTokens, statement } from "../examples/CalculatorExample.ts"; import { simpleSum, simpleTokens, sumResults, taggedSum, -} from "../examples/DocExamples.js"; -import { matchingLexer } from "../MatchingLexer.js"; +} from "../examples/DocExamples.ts"; test("parse 3 + 4", () => { const src = "3 + 4"; diff --git a/packages/mini-parse/src/test/CalculatorResultsExample.test.ts b/mini-parse/test/CalculatorResultsExample.test.ts similarity index 85% rename from packages/mini-parse/src/test/CalculatorResultsExample.test.ts rename to mini-parse/test/CalculatorResultsExample.test.ts index db80f3265..d204b88a8 100644 --- a/packages/mini-parse/src/test/CalculatorResultsExample.test.ts +++ b/mini-parse/test/CalculatorResultsExample.test.ts @@ -1,13 +1,14 @@ import { testParse } from "mini-parse/test-util"; import { expect, test } from "vitest"; -import { calcTokens } from "../examples/CalculatorExample.js"; +import { calcTokens } from "../examples/CalculatorExample.ts"; import { power, product, resultsStatement, sum, -} from "../examples/CalculatorResultsExample.js"; -import { Parser } from "../Parser.js"; +} from "../examples/CalculatorResultsExample.ts"; +import { Parser } from "../Parser.ts"; +import { testParse } from "@wesl/mini-parse/test-util"; test("power 2 ^ 4", () => { const { parsed } = testParse(power, "2 ^ 3", calcTokens); diff --git a/packages/mini-parse/src/test/Chain.test.ts b/mini-parse/test/Chain.test.ts similarity index 100% rename from packages/mini-parse/src/test/Chain.test.ts rename to mini-parse/test/Chain.test.ts diff --git a/packages/mini-parse/src/test/ParserCombinator.test.ts b/mini-parse/test/ParserCombinator.test.ts similarity index 88% rename from packages/mini-parse/src/test/ParserCombinator.test.ts rename to mini-parse/test/ParserCombinator.test.ts index cf6bcb6c8..0e8059641 100644 --- a/packages/mini-parse/src/test/ParserCombinator.test.ts +++ b/mini-parse/test/ParserCombinator.test.ts @@ -3,8 +3,9 @@ import { testParse, testTokens, withTracingDisabled, -} from "mini-parse/test-util"; +} from "@wesl/mini-parse/test-util"; import { expect, test } from "vitest"; +import { assertSnapshot } from "@std/testing/snapshot"; import { disablePreParse, NoTags, @@ -12,7 +13,7 @@ import { preParse, setTraceName, tokenSkipSet, -} from "../Parser.js"; +} from "../Parser.ts"; import { any, anyNot, @@ -28,8 +29,8 @@ import { text, withSep, withTags, -} from "../ParserCombinator.js"; -import { enableTracing, _withBaseLogger } from "../ParserTracing.js"; +} from "../ParserCombinator.ts"; +import { _withBaseLogger, enableTracing } from "../ParserTracing.ts"; const m = testTokens; @@ -65,11 +66,11 @@ test("seq() returns null with partial match", () => { expect(position).toEqual(0); }); -test("seq() handles two element match", () => { +test("seq() handles two element match", async (ctx) => { const src = "#import foo"; const p = seq("#import", kind(m.word)); const { parsed } = testParse(p, src); - expect(parsed).toMatchSnapshot(); + await assertSnapshot(ctx, parsed); }); test("tagged kind match", () => { @@ -86,12 +87,12 @@ test("seq() with tagged result", () => { expect(parsed?.tags.yo).toEqual(["foo"]); }); -test("opt() makes failing match ok", () => { +test("opt() makes failing match ok", async (ctx) => { const src = "foo"; const p = seq(opt("#import"), kind("word")); const { parsed } = testParse(p, src); expect(parsed).not.toBeNull(); - expect(parsed).toMatchSnapshot(); + await assertSnapshot(ctx, parsed); }); test("repeat() to (1,2,3,4) via tag", () => { @@ -123,13 +124,13 @@ test("toParser()", () => { expect(parsed?.tags.bang).toEqual(["!"]); }); -test("not() success", () => { +test("not() success", async (ctx) => { const src = "foo bar"; const p = repeat(seq(not("{"), any())); const { parsed } = testParse(p, src); const values = parsed!.value; - expect(values).toMatchSnapshot(); + await assertSnapshot(ctx, values); }); test("not() failure", () => { @@ -151,7 +152,7 @@ test("recurse with fn()", () => { expect(app[0]).toEqual(["a", "b"]); }); -test("tracing", () => { +test("tracing", async (ctx) => { const src = "a"; const { log, logged } = logCatch(); const p = repeat(seq(kind(m.word)).traceName("wordz")).trace(); @@ -160,7 +161,7 @@ test("tracing", () => { _withBaseLogger(log, () => { testParse(p, src); }); - expect(logged()).toMatchSnapshot(); + await assertSnapshot(ctx, logged()); }); test("infinite loop detection", () => { @@ -177,9 +178,9 @@ test("infinite loop detection", () => { test("preparse simple comment", () => { // prettier-ignore const pre = seq( - "/*", - repeat(anyNot("*/")), - "*/" + "/*", + repeat(anyNot("*/")), + "*/", ).traceName("pre"); const p = preParse(pre, repeat(kind(m.word))); const src = "boo /* bar */ baz"; @@ -191,22 +192,23 @@ test("preparse simple comment", () => { test("disable preParse inside quote", () => { // prettier-ignore const comment = seq( - "/*", - repeat(anyNot("*/")), - "*/" + "/*", + repeat(anyNot("*/")), + "*/", ).traceName("comment"); // prettier-ignore const quote = disablePreParse( - tokenSkipSet(null, // disable ws skipping - seq( - opt(kind(m.ws)), - "^", - repeat(anyNot("^").tag("contents")), - "^" - ) - ) - ) + tokenSkipSet( + null, // disable ws skipping + seq( + opt(kind(m.ws)), + "^", + repeat(anyNot("^").tag("contents")), + "^", + ), + ), + ) .map((r) => r.tags.contents.map((tok) => tok.text).join("")) .traceName("quote"); @@ -221,10 +223,10 @@ test("disablePreParse restores preParse context", () => { withTracingDisabled(() => { // prettier-ignore const comment = seq( - "/*", - repeat(anyNot("*/")), - "*/" - ).traceName("comment"); + "/*", + repeat(anyNot("*/")), + "*/", + ).traceName("comment"); const quote = withTags( disablePreParse( @@ -265,7 +267,7 @@ test("token start is after ignored ws", () => { expect(parsed?.value).toBe(1); }); -test("req logs a message on failure", () => { +test("req logs a message on failure", async (ctx) => { const src = "a 1;"; const p = seq("a", req("b")); const { log, logged } = logCatch(); @@ -273,11 +275,7 @@ test("req logs a message on failure", () => { _withBaseLogger(log, () => { testParse(p, src); }); - expect(logged()).toMatchInlineSnapshot(` - "expected text 'b'' - a 1; Ln 1 - ^" - `); + await assertSnapshot(ctx, logged()); }); test("repeatWhile", () => { @@ -306,7 +304,7 @@ test("withTags blocks tags accumulation", () => { const p = withTags( kind(m.word) .tag("w") - .map(r => r.tags.w), + .map((r) => r.tags.w), ); const s = seq(p.tag("w")).map(r => r.tags.w); diff --git a/packages/mini-parse/src/test/ParserLogging.test.ts b/mini-parse/test/ParserLogging.test.ts similarity index 65% rename from packages/mini-parse/src/test/ParserLogging.test.ts rename to mini-parse/test/ParserLogging.test.ts index 108d3e2a6..76b686aa3 100644 --- a/packages/mini-parse/src/test/ParserLogging.test.ts +++ b/mini-parse/test/ParserLogging.test.ts @@ -1,7 +1,8 @@ import { expect, test } from "vitest"; -import { srcLine, srcLog } from "../ParserLogging.js"; -import { _withBaseLogger } from "../ParserTracing.js"; -import { logCatch } from "../test-util/LogCatcher.js"; +import { assertSnapshot } from "@std/testing/snapshot"; +import { srcLine, srcLog } from "../ParserLogging.ts"; +import { _withBaseLogger } from "../ParserTracing.ts"; +import { logCatch } from "../test-util/LogCatcher.ts"; test("srcLine", () => { const src1 = "1"; @@ -25,21 +26,17 @@ test("srcLine", () => { expect(line3).toBe(src3); }); -test("srcLog", () => { +test("srcLog", async (ctx) => { const src = `a\n12345\nb`; const { log, logged } = logCatch(); _withBaseLogger(log, () => { srcLog(src, 5, "uh-oh:"); }); - expect(logged()).toMatchInlineSnapshot(` - "uh-oh: - 12345 Ln 2 - ^" - `); + await assertSnapshot(ctx, logged()); }); -test("srcLog on longer example", () => { +test("srcLog on longer example", async (ctx) => { const src = ` #export(C, D) importing bar(D) fn foo(c:C, d:D) { support(d); } @@ -50,23 +47,15 @@ test("srcLog on longer example", () => { _withBaseLogger(log, () => { srcLog(src, 101, "ugh:"); }); - expect(logged()).toMatchInlineSnapshot(` - "ugh: - fn support(d:D) { bar(d); } Ln 5 - ^" - `); + await assertSnapshot(ctx, logged()); }); -test("srcLog with two carets", () => { +test("srcLog with two carets", async (ctx) => { const src = `a\n12345\nb`; const { log, logged } = logCatch(); _withBaseLogger(log, () => { srcLog(src, [2, 7], "found:"); }); - expect(logged()).toMatchInlineSnapshot(` - "found: - 12345 Ln 2 - ^ ^" - `); + await assertSnapshot(ctx, logged()); }); diff --git a/packages/mini-parse/src/test/ParserUtil.test.ts b/mini-parse/test/ParserUtil.test.ts similarity index 84% rename from packages/mini-parse/src/test/ParserUtil.test.ts rename to mini-parse/test/ParserUtil.test.ts index 1f97223e6..81ba72d52 100644 --- a/packages/mini-parse/src/test/ParserUtil.test.ts +++ b/mini-parse/test/ParserUtil.test.ts @@ -1,5 +1,5 @@ import { expect, test } from "vitest"; -import { mergeTags } from "../ParserUtil.js"; +import { mergeTags } from "../ParserUtil.ts"; test("mergeNamed with symbols", () => { const s = Symbol("s"); diff --git a/packages/mini-parse/src/test/SrcMap.test.ts b/mini-parse/test/SrcMap.test.ts similarity index 58% rename from packages/mini-parse/src/test/SrcMap.test.ts rename to mini-parse/test/SrcMap.test.ts index d1eec24fb..7addebb1a 100644 --- a/packages/mini-parse/src/test/SrcMap.test.ts +++ b/mini-parse/test/SrcMap.test.ts @@ -1,7 +1,8 @@ import { expect, test } from "vitest"; -import { SrcMap } from "../SrcMap.js"; +import { assertSnapshot } from "@std/testing/snapshot"; +import { SrcMap } from "../SrcMap.ts"; -test("compact", () => { +test("compact", async (ctx) => { const src = "a b"; const dest = "|" + src + " d"; @@ -11,20 +12,10 @@ test("compact", () => { { src, srcStart: 2, srcEnd: 3, destStart: 3, destEnd: 4 }, ]); srcMap.compact(); - expect(srcMap.entries).toMatchInlineSnapshot(` - [ - { - "destEnd": 4, - "destStart": 1, - "src": "a b", - "srcEnd": 3, - "srcStart": 0, - }, - ] - `); + await assertSnapshot(ctx, srcMap.entries); }); -test("merge", () => { +test("merge", async (ctx) => { const src = "a b"; const src2 = "d"; const mid = "|" + src + " " + src2; @@ -48,22 +39,5 @@ test("merge", () => { ]); const merged = map1.merge(map2); - expect(merged.entries).toMatchInlineSnapshot(` - [ - { - "destEnd": 6, - "destStart": 3, - "src": "a b", - "srcEnd": 3, - "srcStart": 0, - }, - { - "destEnd": 9, - "destStart": 8, - "src": "d", - "srcEnd": 1, - "srcStart": 0, - }, - ] - `); + await assertSnapshot(ctx, merged.entries); }); diff --git a/mini-parse/test/TestSetup.ts b/mini-parse/test/TestSetup.ts new file mode 100644 index 000000000..791bbdad0 --- /dev/null +++ b/mini-parse/test/TestSetup.ts @@ -0,0 +1,4 @@ +import { enableTracing } from "../ParserTracing.ts"; + +// enable parser tracing features +enableTracing(); diff --git a/packages/mini-parse/src/test/TokenMatcher.test.ts b/mini-parse/test/TokenMatcher.test.ts similarity index 91% rename from packages/mini-parse/src/test/TokenMatcher.test.ts rename to mini-parse/test/TokenMatcher.test.ts index ced3317d5..5a5ae971b 100644 --- a/packages/mini-parse/src/test/TokenMatcher.test.ts +++ b/mini-parse/test/TokenMatcher.test.ts @@ -1,5 +1,5 @@ import { expect, test } from "vitest"; -import { tokenMatcher } from "../TokenMatcher.js"; +import { tokenMatcher } from "../TokenMatcher.ts"; test("token matcher", () => { const m = tokenMatcher({ diff --git a/mini-parse/test/__snapshots__/ParserCombinator.test.ts.snap b/mini-parse/test/__snapshots__/ParserCombinator.test.ts.snap new file mode 100644 index 000000000..a0ae36e07 --- /dev/null +++ b/mini-parse/test/__snapshots__/ParserCombinator.test.ts.snap @@ -0,0 +1,60 @@ +export const snapshot = {}; + +snapshot[`seq() handles two element match 1`] = ` +{ + tags: {}, + value: [ + "#import", + "foo", + ], +} +`; + +snapshot[`opt() makes failing match ok 1`] = ` +{ + tags: {}, + value: [ + undefined, + "foo", + ], +} +`; + +snapshot[`not() success 1`] = ` +[ + [ + true, + { + kind: "word", + text: "foo", + }, + ], + [ + true, + { + kind: "word", + text: "bar", + }, + ], +] +`; + +snapshot[`tracing 1`] = ` +"..repeat + ..wordz + : 'a' (word) + a Ln 1 + ^ + ✓ kind 'word' + ✓ wordz + ..wordz + x kind 'word' + x wordz +✓ repeat" +`; + +snapshot[`req logs a message on failure 1`] = ` +"expected text 'b'' +a 1; Ln 1 + ^" +`; diff --git a/mini-parse/test/__snapshots__/ParserLogging.test.ts.snap b/mini-parse/test/__snapshots__/ParserLogging.test.ts.snap new file mode 100644 index 000000000..98cfd432e --- /dev/null +++ b/mini-parse/test/__snapshots__/ParserLogging.test.ts.snap @@ -0,0 +1,19 @@ +export const snapshot = {}; + +snapshot[`srcLog 1`] = ` +"uh-oh: +12345 Ln 2 + ^" +`; + +snapshot[`srcLog on longer example 1`] = ` +"ugh: + fn support(d:D) { bar(d); } Ln 5 + ^" +`; + +snapshot[`srcLog with two carets 1`] = ` +"found: +12345 Ln 2 +^ ^" +`; diff --git a/mini-parse/test/__snapshots__/SrcMap.test.ts.snap b/mini-parse/test/__snapshots__/SrcMap.test.ts.snap new file mode 100644 index 000000000..aa9912798 --- /dev/null +++ b/mini-parse/test/__snapshots__/SrcMap.test.ts.snap @@ -0,0 +1,32 @@ +export const snapshot = {}; + +snapshot[`compact 1`] = ` +[ + { + destEnd: 4, + destStart: 1, + src: "a b", + srcEnd: 3, + srcStart: 0, + }, +] +`; + +snapshot[`merge 1`] = ` +[ + { + destEnd: 6, + destStart: 3, + src: "a b", + srcEnd: 3, + srcStart: 0, + }, + { + destEnd: 9, + destStart: 8, + src: "d", + srcEnd: 1, + srcStart: 0, + }, +] +`; diff --git a/package.json b/package.json deleted file mode 100644 index a1830562e..000000000 --- a/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "root", - "type": "module", - "scripts": { - "bump": "scripts/runTs bump --version", - "build:all": "pnpm --filter './packages/**' build", - "format:all": "pnpm --filter './packages/**' format", - "lint:all": "pnpm --no-bail --filter './packages/**' lint", - "organize:all": "pnpm --filter './packages/**' organize", - "publish:all": "pnpm --filter './packages/**' publish", - "test:all": "run-s test:once", - "test:once": "pnpm --filter './packages/**' test:once" - }, - "devDependencies": { - "@eslint/js": "^9.14.0", - "@types/eslint__js": "^8.42.3", - "@types/node": "^22.9.0", - "@types/yargs": "^17.0.33", - "@typescript-eslint/eslint-plugin": "^8.13.0", - "@typescript-eslint/parser": "^8.13.0", - "@vitest/ui": "^2.1.4", - "berry-pretty": "^0.0.5", - "brotli": "^1.3.3", - "esbuild": "^0.24.0", - "eslint": "^9.14.0", - "fast-glob": "^3.3.2", - "glob": "^11.0.0", - "npm-run-all": "^4.1.5", - "organize-imports-cli": "^0.10.0", - "prettier": "^3.3.3", - "rimraf": "^6.0.1", - "tsx": "^4.19.2", - "typescript": "^5.6.3", - "typescript-eslint": "^8.13.0", - "vite": "^5.4.10", - "vite-tsconfig-paths": "^5.1.0", - "vitest": "^2.1.4", - "yargs": "^17.7.2" - } -} diff --git a/packages/packager/ReadMe.md b/packager/README.md similarity index 100% rename from packages/packager/ReadMe.md rename to packager/README.md diff --git a/packager/deno.json b/packager/deno.json new file mode 100644 index 000000000..a656fe465 --- /dev/null +++ b/packager/deno.json @@ -0,0 +1,8 @@ +{ + "tasks": { + "dev": "deno run --watch main.ts" + }, + "imports": { + "yargs": "https://deno.land/x/yargs@v17.7.2-deno/deno.ts" + } +} \ No newline at end of file diff --git a/packager/main.ts b/packager/main.ts new file mode 100644 index 000000000..c53205b17 --- /dev/null +++ b/packager/main.ts @@ -0,0 +1,3 @@ +#!/usr/bin/env node +import { packagerCli } from "./packagerCli.ts"; +packagerCli(Deno.args); diff --git a/packages/packager/src/packageWgsl.ts b/packager/packageWgsl.ts similarity index 96% rename from packages/packager/src/packageWgsl.ts rename to packager/packageWgsl.ts index 0d431fd3d..a12f6bf9b 100644 --- a/packages/packager/src/packageWgsl.ts +++ b/packager/packageWgsl.ts @@ -1,7 +1,7 @@ +import { CliArgs } from "./packagerCli.ts"; import { glob } from "glob"; import fs, { mkdir } from "node:fs/promises"; -import path from "node:path"; -import { WgslBundle } from "wgsl-linker"; +import { WgslBundle } from "@wesl/linker"; import wgslBundleDecl from "../../linker/src/WgslBundle.ts?raw"; import { CliArgs } from "./packagerCli.js"; diff --git a/packages/packager/src/packagerCli.ts b/packager/packagerCli.ts similarity index 95% rename from packages/packager/src/packagerCli.ts rename to packager/packagerCli.ts index 68bfd369b..1805c2db7 100644 --- a/packages/packager/src/packagerCli.ts +++ b/packager/packagerCli.ts @@ -1,5 +1,5 @@ import yargs from "yargs"; -import { packageWgsl } from "./packageWgsl.js"; +import { packageWgsl } from "./packageWgsl.ts"; export type CliArgs = ReturnType; let cliArgs: CliArgs; diff --git a/packages/packager/src/test/packager.test.ts b/packager/test/packager.test.ts similarity index 81% rename from packages/packager/src/test/packager.test.ts rename to packager/test/packager.test.ts index 5cdd7c858..fbd1963dd 100644 --- a/packages/packager/src/test/packager.test.ts +++ b/packager/test/packager.test.ts @@ -1,3 +1,7 @@ +import { expect, test } from "vitest"; +import { packagerCli } from "../packagerCli.ts"; +import { rimraf } from "rimraf"; +import path from "path"; import { mkdir } from "node:fs/promises"; import path from "path"; import { rimraf } from "rimraf"; diff --git a/packages/packager/src/test/wgsl-package/package.json b/packager/test/wgsl-package/package.json similarity index 100% rename from packages/packager/src/test/wgsl-package/package.json rename to packager/test/wgsl-package/package.json diff --git a/packages/packager/src/test/wgsl-package/src/lib.wesl b/packager/test/wgsl-package/src/lib.wesl similarity index 100% rename from packages/packager/src/test/wgsl-package/src/lib.wesl rename to packager/test/wgsl-package/src/lib.wesl diff --git a/packages/packager/src/test/wgsl-package/src/util.wgsl b/packager/test/wgsl-package/src/util.wgsl similarity index 100% rename from packages/packager/src/test/wgsl-package/src/util.wgsl rename to packager/test/wgsl-package/src/util.wgsl diff --git a/packages/cli/src/viteTypes.d.ts b/packager/test/wgsl-package/src/viteTypes.d.ts similarity index 100% rename from packages/cli/src/viteTypes.d.ts rename to packager/test/wgsl-package/src/viteTypes.d.ts diff --git a/packages/bulk-test/tsconfig.json b/packages/bulk-test/tsconfig.json deleted file mode 100644 index e65418e9b..000000000 --- a/packages/bulk-test/tsconfig.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "compilerOptions": { - "target": "ESNext", - "lib": ["ESNext"], - "types": ["node"], - "module": "ESNext", - "moduleResolution": "Node", - "esModuleInterop": false, - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - "allowJs": false, - "strict": true, - "forceConsistentCasingInFileNames": true, - "importsNotUsedAsValues": "remove", - "resolveJsonModule": true, - "isolatedModules": true, - "noEmit": true, - "paths": { - "wgsl-linker": ["../linker/src"], - "mini-parse": ["../mini-parse/src"] - } - }, - "include": ["src/**/*", "src/viteTypes.d.ts"], - "exclude": ["node_modules"] -} diff --git a/packages/cli/.gitignore b/packages/cli/.gitignore deleted file mode 100644 index 54a5ba0d8..000000000 --- a/packages/cli/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# built executable -bin \ No newline at end of file diff --git a/packages/cli/package.json b/packages/cli/package.json deleted file mode 100644 index b20a2d1bb..000000000 --- a/packages/cli/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "wgsl-link", - "version": "0.5.0-d1", - "type": "module", - "scripts": { - "build": "esbuild --bundle --platform=node --format=esm --outfile=bin/wgsl-link src/main.ts", - "format": "prettier . --write", - "lint": "eslint src", - "organize": "organize-imports-cli tsconfig.json", - "prepublishOnly": "run-s build", - "test": "vitest", - "test:once": "vitest run" - }, - "repository": "https://github.com/wgsl-tooling-wg/wgsl-linker/tree/main/packages/cli", - "homepage": "https://github.com/wgsl-tooling-wg/wgsl-linker/tree/main/packages/cli#readme", - "files": [ - "bin" - ], - "bin": "bin/wgsl-link", - "dependencies": { - "@types/diff": "^5.0.9", - "diff": "^5.2.0", - "wgsl-linker": "workspace:*" - } -} diff --git a/packages/cli/src/main.ts b/packages/cli/src/main.ts deleted file mode 100644 index bf6e922cb..000000000 --- a/packages/cli/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node -import { hideBin } from "yargs/helpers"; -import { cli } from "./cli.js"; - -const rawArgs = hideBin(process.argv); - -cli(rawArgs); diff --git a/packages/cli/tsconfig.json b/packages/cli/tsconfig.json deleted file mode 100644 index e65418e9b..000000000 --- a/packages/cli/tsconfig.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "compilerOptions": { - "target": "ESNext", - "lib": ["ESNext"], - "types": ["node"], - "module": "ESNext", - "moduleResolution": "Node", - "esModuleInterop": false, - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - "allowJs": false, - "strict": true, - "forceConsistentCasingInFileNames": true, - "importsNotUsedAsValues": "remove", - "resolveJsonModule": true, - "isolatedModules": true, - "noEmit": true, - "paths": { - "wgsl-linker": ["../linker/src"], - "mini-parse": ["../mini-parse/src"] - } - }, - "include": ["src/**/*", "src/viteTypes.d.ts"], - "exclude": ["node_modules"] -} diff --git a/packages/cli/vite.config.ts b/packages/cli/vite.config.ts deleted file mode 100644 index 73deae856..000000000 --- a/packages/cli/vite.config.ts +++ /dev/null @@ -1,9 +0,0 @@ -/// -import { UserConfig } from "vite"; -import tsconfigPaths from "vite-tsconfig-paths"; - -const config: UserConfig = { - plugins: [tsconfigPaths()], -}; - -export default config; diff --git a/packages/linker/.gitignore b/packages/linker/.gitignore deleted file mode 100644 index d31fa08f3..000000000 --- a/packages/linker/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# (we copy the README from the root dir) -README.md \ No newline at end of file diff --git a/packages/linker/base.vite.config.ts b/packages/linker/base.vite.config.ts deleted file mode 100644 index fb81876a3..000000000 --- a/packages/linker/base.vite.config.ts +++ /dev/null @@ -1,23 +0,0 @@ -/// -import { resolve } from "path"; -import { UserConfig } from "vite"; -import dts from "vite-plugin-dts"; -import tsconfigPaths from "vite-tsconfig-paths"; - -export function baseViteConfig(): UserConfig { - return { - plugins: [ - tsconfigPaths(), - dts(), // generate .d.ts files - ], - build: { - lib: { - name: "wgsl-linker", - entry: [resolve(__dirname, "src/index.ts")], - formats: ["es", "cjs"], - }, - minify: false, - sourcemap: true, - }, - }; -} diff --git a/packages/linker/minified.vite.config.ts b/packages/linker/minified.vite.config.ts deleted file mode 100644 index 7208ef437..000000000 --- a/packages/linker/minified.vite.config.ts +++ /dev/null @@ -1,11 +0,0 @@ -/// -import { LibraryOptions, defineConfig } from "vite"; -import { baseViteConfig } from "./base.vite.config.js"; -// import { visualizer } from "rollup-plugin-visualizer"; - -const config = baseViteConfig(); -config.build.minify = "terser"; -config.build.emptyOutDir = false; -(config.build.lib as LibraryOptions).fileName = "minified"; - -export default defineConfig(config); diff --git a/packages/linker/package.json b/packages/linker/package.json deleted file mode 100644 index e177ca89e..000000000 --- a/packages/linker/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "wgsl-linker", - "version": "0.5.0-d1", - "files": [ - "dist", - "src" - ], - "scripts": { - "build:readme": "ncp ../../README.md README.md", - "build": "run-s build:main build:templates build:minified", - "build:main": "vite build", - "build:minified": "vite build -c minified.vite.config.js", - "build:brotli": "brotli dist/minified.cjs && ls -l dist/minified.cjs.br", - "build:templates": "vite build -c templates.vite.config.js", - "format": "prettier . --write", - "lint": "eslint src", - "organize": "organize-imports-cli tsconfig.json", - "prepublishOnly": "run-s build build:readme", - "test": "vitest", - "test:once": "vitest run" - }, - "type": "module", - "repository": "github:wgsl-tooling-wg/wgsl-linker", - "exports": { - ".": { - "types": "./dist/linker/src/index.d.ts", - "import": "./dist/index.js", - "require": "./dist/index.cjs" - }, - "./templates": { - "types": "./dist/linker/src/templates/index.d.ts", - "import": "./dist/templates.js", - "require": "./dist/templates.cjs" - }, - "./minified": { - "types": "./dist/linker/src/index.d.ts", - "import": "./dist/minified.js", - "require": "./dist/minified.cjs" - } - }, - "dependencies": { - "mini-parse": "workspace:*" - }, - "devDependencies": { - "ncp": "^2.0.0", - "rollup-plugin-visualizer": "^5.12.0", - "terser": "^5.36.0", - "vite-plugin-dts": "^4.3.0", - "vitest": "^2.1.4", - "wesl-testsuite": "file:../../../wesl-testsuite", - "wgsl-rand": "workspace:*" - } -} diff --git a/packages/linker/src/index.ts b/packages/linker/src/index.ts deleted file mode 100644 index 1dc3d3fb6..000000000 --- a/packages/linker/src/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -export * from "./Linker.js"; -export * from "./ModuleRegistry.js"; -export { preProcess } from "./ParseModule.js"; -export * from "./ParseWgslD.js"; -export * from "./PathUtil.js"; -export * from "./Util.js"; -export * from "./WgslBundle.js"; diff --git a/packages/linker/src/templates/index.ts b/packages/linker/src/templates/index.ts deleted file mode 100644 index 4c89311ec..000000000 --- a/packages/linker/src/templates/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./SimpleTemplate.js"; diff --git a/packages/linker/src/test/LinkGlob.test.ts b/packages/linker/src/test/LinkGlob.test.ts deleted file mode 100644 index 3a3eed653..000000000 --- a/packages/linker/src/test/LinkGlob.test.ts +++ /dev/null @@ -1,25 +0,0 @@ -/// -import { expect, test } from "vitest"; -import { ModuleRegistry } from "../ModuleRegistry.js"; - -const wgsl1: Record = import.meta.glob("./wgsl_1/*.wgsl", { - query: "?raw", - eager: true, - import: "default", -}); - -const wgsl2: Record = import.meta.glob("./wgsl_2/*.wgsl", { - query: "?raw", - eager: true, - import: "default", -}); - -test("basic import glob", async () => { - const linked = new ModuleRegistry({ wgsl: wgsl1 }).link("main"); - expect(linked).toContain("fn bar()"); -}); - -test("#import from path ./util", async () => { - const linked = new ModuleRegistry({ wgsl: wgsl2 }).link("main2"); - expect(linked).toContain("fn bar()"); -}); diff --git a/packages/linker/src/test/__snapshots__/ParseComments.test.ts.snap b/packages/linker/src/test/__snapshots__/ParseComments.test.ts.snap deleted file mode 100644 index 2e4a5357d..000000000 --- a/packages/linker/src/test/__snapshots__/ParseComments.test.ts.snap +++ /dev/null @@ -1,44 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`blockComment parses /* comment */ 1`] = ` -{ - "tags": {}, - "value": [ - "/*", - [ - { - "kind": "word", - "text": "comment", - }, - ], - "*/", - ], -} -`; - -exports[`parse fn with line comment 1`] = ` -[ - { - "calls": [], - "end": 39, - "kind": "fn", - "name": "binaryOp", - "nameElem": { - "end": 16, - "kind": "fnName", - "name": "binaryOp", - "start": 8, - }, - "start": 5, - "typeRefs": [], - }, -] -`; - -exports[`wordNumArgs parses (a, b, 1) with line comments everywhere 1`] = ` -[ - "a", - "b", - "1", -] -`; diff --git a/packages/linker/src/test/__snapshots__/ParseDirectives.test.ts.snap b/packages/linker/src/test/__snapshots__/ParseDirectives.test.ts.snap deleted file mode 100644 index a64a3d225..000000000 --- a/packages/linker/src/test/__snapshots__/ParseDirectives.test.ts.snap +++ /dev/null @@ -1,110 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`importing parses importing bar(A) fog(B) 1`] = ` -[ - [ - { - "args": [ - "A", - ], - "end": 25, - "kind": "import", - "name": "bar", - "start": 11, - }, - { - "args": [ - "B", - ], - "end": 25, - "kind": "import", - "name": "fog", - "start": 11, - }, - ], -] -`; - -exports[`parse #export(A, B) importing bar(A) 1`] = ` -{ - "args": [ - "A", - "B", - ], - "end": 36, - "importing": [ - { - "args": [ - "A", - ], - "end": 35, - "kind": "import", - "name": "bar", - "start": 29, - }, - ], - "kind": "export", - "start": 5, -} -`; - -exports[`parse #export(foo) with trailing space 1`] = ` -[ - { - "args": [ - "Elem", - ], - "end": 20, - "kind": "export", - "start": 5, - }, -] -`; - -exports[`parse #import foo(a,b) as baz from bar 1`] = ` -[ - { - "end": 27, - "imports": ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "bar", - }, - SimpleSegment { - "args": undefined, - "as": "baz", - "name": "foo", - }, - ], - }, - "kind": "treeImport", - "start": 0, - }, -] -`; - -exports[`parse import foo/bar 1`] = ` -[ - { - "end": 14, - "imports": ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "foo", - }, - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "bar", - }, - ], - }, - "kind": "treeImport", - "start": 0, - }, -] -`; diff --git a/packages/linker/src/test/__snapshots__/ParseModule.test.ts.snap b/packages/linker/src/test/__snapshots__/ParseModule.test.ts.snap deleted file mode 100644 index 458d08377..000000000 --- a/packages/linker/src/test/__snapshots__/ParseModule.test.ts.snap +++ /dev/null @@ -1,210 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`import gleam style 1`] = ` -[ - { - "end": 19, - "imports": ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "my", - }, - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "foo", - }, - ], - }, - "kind": "treeImport", - "start": 5, - }, -] -`; - -exports[`simple fn export 1`] = ` -{ - "aliases": [], - "exports": [ - { - "end": 12, - "kind": "export", - "ref": { - "calls": [], - "end": 55, - "kind": "fn", - "name": "one", - "nameElem": { - "end": 22, - "kind": "fnName", - "name": "one", - "start": 19, - }, - "start": 16, - "typeRefs": [ - { - "end": 31, - "kind": "typeRef", - "name": "i32", - "start": 28, - }, - ], - }, - "start": 5, - }, - ], - "fns": [ - { - "calls": [], - "end": 55, - "kind": "fn", - "name": "one", - "nameElem": { - "end": 22, - "kind": "fnName", - "name": "one", - "start": 19, - }, - "start": 16, - "typeRefs": [ - { - "end": 31, - "kind": "typeRef", - "name": "i32", - "start": 28, - }, - ], - }, - ], - "globalDirectives": [], - "imports": [], - "kind": "text", - "modulePath": "./test.wgsl", - "preppedSrc": " - export - fn one() -> i32 { - return 1; - } - ", - "src": " - export - fn one() -> i32 { - return 1; - } - ", - "srcMap": SrcMap { - "dest": " - export - fn one() -> i32 { - return 1; - } - ", - "entries": [ - { - "destEnd": 58, - "destStart": 0, - "src": " - export - fn one() -> i32 { - return 1; - } - ", - "srcEnd": 58, - "srcStart": 0, - }, - ], - }, - "structs": [], - "template": undefined, - "vars": [], -} -`; - -exports[`simple fn import 1`] = ` -{ - "aliases": [], - "exports": [], - "fns": [ - { - "calls": [ - { - "end": 39, - "kind": "call", - "name": "foo", - "start": 36, - }, - ], - "end": 44, - "kind": "fn", - "name": "bar", - "nameElem": { - "end": 31, - "kind": "fnName", - "name": "bar", - "start": 28, - }, - "start": 25, - "typeRefs": [], - }, - ], - "globalDirectives": [], - "imports": [ - { - "end": 20, - "imports": ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "bar", - }, - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "foo", - }, - ], - }, - "kind": "treeImport", - "start": 5, - }, - ], - "kind": "text", - "modulePath": "./test.wgsl", - "preppedSrc": " - import bar/foo - - fn bar() { foo(); } - ", - "src": " - import bar/foo - - fn bar() { foo(); } - ", - "srcMap": SrcMap { - "dest": " - import bar/foo - - fn bar() { foo(); } - ", - "entries": [ - { - "destEnd": 47, - "destStart": 0, - "src": " - import bar/foo - - fn bar() { foo(); } - ", - "srcEnd": 47, - "srcStart": 0, - }, - ], - }, - "structs": [], - "template": undefined, - "vars": [], -} -`; diff --git a/packages/linker/src/test/__snapshots__/ParseWgslD.test.ts.snap b/packages/linker/src/test/__snapshots__/ParseWgslD.test.ts.snap deleted file mode 100644 index 70cf860e0..000000000 --- a/packages/linker/src/test/__snapshots__/ParseWgslD.test.ts.snap +++ /dev/null @@ -1,383 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`parse @attribute before fn 1`] = ` -[ - { - "calls": [], - "end": 31, - "kind": "fn", - "name": "main", - "nameElem": { - "end": 26, - "kind": "fnName", - "name": "main", - "start": 22, - }, - "start": 5, - "typeRefs": [], - }, -] -`; - -exports[`parse @compute @workgroup_size(a, b, 1) before fn 1`] = ` -[ - { - "calls": [], - "end": 61, - "kind": "fn", - "name": "main", - "nameElem": { - "end": 56, - "kind": "fnName", - "name": "main", - "start": 52, - }, - "start": 5, - "typeRefs": [], - }, -] -`; - -exports[`parse array alias 1`] = ` -[ - { - "end": 37, - "kind": "alias", - "name": "Points3", - "start": 5, - "typeRefs": [ - { - "end": 36, - "kind": "typeRef", - "name": "array", - "start": 21, - }, - { - "end": 36, - "kind": "typeRef", - "name": "Point", - "start": 21, - }, - ], - }, -] -`; - -exports[`parse const_assert 1`] = ` -[ - { - "end": 24, - "kind": "globalDirective", - "start": 5, - }, - { - "calls": [], - "end": 42, - "kind": "fn", - "name": "main", - "nameElem": { - "end": 37, - "kind": "fnName", - "name": "main", - "start": 33, - }, - "start": 30, - "typeRefs": [], - }, -] -`; - -exports[`parse empty string 1`] = `[]`; - -exports[`parse fn foo() { } 1`] = ` -[ - { - "calls": [], - "end": 12, - "kind": "fn", - "name": "foo", - "nameElem": { - "end": 6, - "kind": "fnName", - "name": "foo", - "start": 3, - }, - "start": 0, - "typeRefs": [], - }, -] -`; - -exports[`parse fn with calls 1`] = ` -[ - { - "calls": [ - { - "end": 14, - "kind": "call", - "name": "foo", - "start": 11, - }, - { - "end": 21, - "kind": "call", - "name": "bar", - "start": 18, - }, - ], - "end": 26, - "kind": "fn", - "name": "foo", - "nameElem": { - "end": 6, - "kind": "fnName", - "name": "foo", - "start": 3, - }, - "start": 0, - "typeRefs": [], - }, -] -`; - -exports[`parse foo.bar(); 1`] = ` -[ - { - "calls": [ - { - "end": 19, - "kind": "call", - "name": "foo.bar", - "start": 12, - }, - ], - "end": 24, - "kind": "fn", - "name": "main", - "nameElem": { - "end": 7, - "kind": "fnName", - "name": "main", - "start": 3, - }, - "start": 0, - "typeRefs": [], - }, -] -`; - -exports[`parse foo::bar(); 1`] = ` -[ - { - "calls": [ - { - "end": 20, - "kind": "call", - "name": "foo::bar", - "start": 12, - }, - ], - "end": 25, - "kind": "fn", - "name": "main", - "nameElem": { - "end": 7, - "kind": "fnName", - "name": "main", - "start": 3, - }, - "start": 0, - "typeRefs": [], - }, -] -`; - -exports[`parse global diagnostic 1`] = ` -[ - { - "end": 43, - "kind": "globalDirective", - "start": 5, - }, - { - "calls": [], - "end": 61, - "kind": "fn", - "name": "main", - "nameElem": { - "end": 56, - "kind": "fnName", - "name": "main", - "start": 52, - }, - "start": 49, - "typeRefs": [], - }, -] -`; - -exports[`parse let x: foo.bar; 1`] = ` -[ - { - "calls": [], - "end": 33, - "kind": "fn", - "name": "main", - "nameElem": { - "end": 7, - "kind": "fnName", - "name": "main", - "start": 3, - }, - "start": 0, - "typeRefs": [ - { - "end": 26, - "kind": "typeRef", - "name": "foo.bar", - "start": 19, - }, - ], - }, -] -`; - -exports[`parse let x: foo::bar; 1`] = ` -[ - { - "calls": [], - "end": 34, - "kind": "fn", - "name": "main", - "nameElem": { - "end": 7, - "kind": "fnName", - "name": "main", - "start": 3, - }, - "start": 0, - "typeRefs": [ - { - "end": 27, - "kind": "typeRef", - "name": "foo::bar", - "start": 19, - }, - ], - }, -] -`; - -exports[`parse root level ;; 1`] = `[]`; - -exports[`parse simple alias 1`] = ` -[ - { - "end": 24, - "kind": "alias", - "name": "NewType", - "start": 0, - "typeRefs": [ - { - "end": 23, - "kind": "typeRef", - "name": "OldType", - "start": 16, - }, - ], - }, -] -`; - -exports[`parse switch statement 1`] = ` -[ - { - "calls": [], - "end": 104, - "kind": "fn", - "name": "main", - "nameElem": { - "end": 12, - "kind": "fnName", - "name": "main", - "start": 8, - }, - "start": 5, - "typeRefs": [], - }, -] -`; - -exports[`parse top level override and const 1`] = ` -[ - { - "end": 21, - "kind": "var", - "name": "x", - "start": 5, - "typeRefs": [], - }, - { - "end": 38, - "kind": "var", - "name": "y", - "start": 26, - "typeRefs": [], - }, - { - "calls": [], - "end": 56, - "kind": "fn", - "name": "main", - "nameElem": { - "end": 51, - "kind": "fnName", - "name": "main", - "start": 47, - }, - "start": 44, - "typeRefs": [], - }, -] -`; - -exports[`parse top level var 1`] = ` -[ - { - "end": 52, - "kind": "var", - "name": "u", - "start": 5, - "typeRefs": [ - { - "end": 51, - "kind": "typeRef", - "name": "Uniforms", - "start": 43, - }, - ], - }, - { - "calls": [], - "end": 76, - "kind": "fn", - "name": "main", - "nameElem": { - "end": 71, - "kind": "fnName", - "name": "main", - "start": 67, - }, - "start": 64, - "typeRefs": [], - }, -] -`; - -exports[`wordNumArgs parses (a, b, 1) 1`] = ` -[ - "a", - "b", - "1", -] -`; diff --git a/packages/linker/src/test/__snapshots__/RustDirective.test.ts.snap b/packages/linker/src/test/__snapshots__/RustDirective.test.ts.snap deleted file mode 100644 index 3b5a111d1..000000000 --- a/packages/linker/src/test/__snapshots__/RustDirective.test.ts.snap +++ /dev/null @@ -1,359 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`import a 1`] = ` -[ - { - "end": 8, - "imports": ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "a", - }, - ], - }, - "kind": "treeImport", - "start": 0, - }, -] -`; - -exports[`import a::* 1`] = ` -[ - { - "end": 11, - "imports": ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "a", - }, - Wildcard { - "wildcard": "*", - }, - ], - }, - "kind": "treeImport", - "start": 0, - }, -] -`; - -exports[`import a::{b, c}::* 1`] = ` -[ - { - "end": 19, - "imports": ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "a", - }, - SegmentList { - "list": [ - ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "b", - }, - ], - }, - ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "c", - }, - ], - }, - ], - }, - Wildcard { - "wildcard": "*", - }, - ], - }, - "kind": "treeImport", - "start": 0, - }, -] -`; - -exports[`import a::b::c 1`] = ` -[ - { - "end": 14, - "imports": ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "a", - }, - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "b", - }, - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "c", - }, - ], - }, - "kind": "treeImport", - "start": 0, - }, -] -`; - -exports[`import my::lighting::{ pbr }; 1`] = ` -[ - { - "end": 29, - "imports": ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "my", - }, - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "lighting", - }, - SegmentList { - "list": [ - ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "pbr", - }, - ], - }, - ], - }, - ], - }, - "kind": "treeImport", - "start": 0, - }, -] -`; - -exports[`import my::lighting::{ pbr as lights } 1`] = ` -[ - { - "end": 38, - "imports": ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "my", - }, - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "lighting", - }, - SegmentList { - "list": [ - ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": "lights", - "name": "pbr", - }, - ], - }, - ], - }, - ], - }, - "kind": "treeImport", - "start": 0, - }, -] -`; - -exports[`import my::lighting::{ pbr, jelly }; 1`] = ` -[ - { - "end": 36, - "imports": ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "my", - }, - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "lighting", - }, - SegmentList { - "list": [ - ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "pbr", - }, - ], - }, - ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "jelly", - }, - ], - }, - ], - }, - ], - }, - "kind": "treeImport", - "start": 0, - }, -] -`; - -exports[`import my::lighting::{ pbr, jelly::jam }; 1`] = ` -[ - { - "end": 41, - "imports": ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "my", - }, - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "lighting", - }, - SegmentList { - "list": [ - ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "pbr", - }, - ], - }, - ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "jelly", - }, - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "jam", - }, - ], - }, - ], - }, - ], - }, - "kind": "treeImport", - "start": 0, - }, -] -`; - -exports[`import my::lighting::pbr; 1`] = ` -[ - { - "end": 25, - "imports": ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "my", - }, - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "lighting", - }, - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "pbr", - }, - ], - }, - "kind": "treeImport", - "start": 0, - }, -] -`; - -exports[`multiline import 1`] = ` -[ - { - "end": 29, - "imports": ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "a", - }, - SegmentList { - "list": [ - ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "b", - }, - ], - }, - ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "c", - }, - ], - }, - ], - }, - Wildcard { - "wildcard": "*", - }, - ], - }, - "kind": "treeImport", - "start": 0, - }, -] -`; diff --git a/packages/linker/src/test/__snapshots__/TraverseRefs.test.ts.snap b/packages/linker/src/test/__snapshots__/TraverseRefs.test.ts.snap deleted file mode 100644 index bc118d73b..000000000 --- a/packages/linker/src/test/__snapshots__/TraverseRefs.test.ts.snap +++ /dev/null @@ -1,41 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`traverse importing from a support fn 1`] = ` -[ - { - "args": undefined, - "name": "main", - }, - { - "args": [ - [ - "C", - "A", - ], - [ - "D", - "B", - ], - ], - "name": "foo", - }, - { - "args": [ - [ - "D", - "B", - ], - ], - "name": "support", - }, - { - "args": [ - [ - "X", - "B", - ], - ], - "name": "bar", - }, -] -`; diff --git a/packages/linker/src/test/wgsl_1/main.wgsl b/packages/linker/src/test/wgsl_1/main.wgsl deleted file mode 100644 index 75c7f9f78..000000000 --- a/packages/linker/src/test/wgsl_1/main.wgsl +++ /dev/null @@ -1,4 +0,0 @@ -module main -import util/bar - -fn main() { bar(); } diff --git a/packages/linker/src/test/wgsl_1/util.wgsl b/packages/linker/src/test/wgsl_1/util.wgsl deleted file mode 100644 index 07edb5a00..000000000 --- a/packages/linker/src/test/wgsl_1/util.wgsl +++ /dev/null @@ -1,3 +0,0 @@ -module util - -export fn bar() { } \ No newline at end of file diff --git a/packages/linker/src/test/wgsl_2/main2.wgsl b/packages/linker/src/test/wgsl_2/main2.wgsl deleted file mode 100644 index 03a4e1bff..000000000 --- a/packages/linker/src/test/wgsl_2/main2.wgsl +++ /dev/null @@ -1,4 +0,0 @@ -module main2 -import ./util2/bar - -fn main() { bar(); } \ No newline at end of file diff --git a/packages/linker/src/test/wgsl_2/util2.wgsl b/packages/linker/src/test/wgsl_2/util2.wgsl deleted file mode 100644 index a1aef85e2..000000000 --- a/packages/linker/src/test/wgsl_2/util2.wgsl +++ /dev/null @@ -1,3 +0,0 @@ -module util2 - -export fn bar() { } \ No newline at end of file diff --git a/packages/linker/templates.vite.config.ts b/packages/linker/templates.vite.config.ts deleted file mode 100644 index 6c4b81593..000000000 --- a/packages/linker/templates.vite.config.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { LibraryOptions, defineConfig } from "vite"; -import { baseViteConfig } from "./base.vite.config.js"; -import { resolve } from "path"; - -const config = baseViteConfig(); -config.build.emptyOutDir = false; - -const lib = config.build.lib as LibraryOptions; -lib.name = "wgsl-linker-templates"; -lib.entry = [resolve(__dirname, "src/templates/index.ts")]; -lib.fileName = "templates"; -config.build.rollupOptions = { external: ["wgsl-linker", "mini-parse"] }; - -export default defineConfig(config); diff --git a/packages/linker/tsconfig-node.json b/packages/linker/tsconfig-node.json deleted file mode 100644 index cbcfa1990..000000000 --- a/packages/linker/tsconfig-node.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "compilerOptions": { - "composite": true, - "module": "esnext", - "moduleResolution": "node", - "types": ["node"], - "skipLibCheck": true, - "outDir": "/tmp" - }, - "include": ["*vite.config.ts"] -} diff --git a/packages/linker/tsconfig.json b/packages/linker/tsconfig.json deleted file mode 100644 index 18e866462..000000000 --- a/packages/linker/tsconfig.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "compilerOptions": { - "target": "ESNext", - "lib": ["DOM", "DOM.Iterable", "ESNext", "ESNext.AsyncIterable"], - "esModuleInterop": false, - "downlevelIteration": true, - "importsNotUsedAsValues": "remove", - "experimentalDecorators": true, - "useDefineForClassFields": false, - "allowJs": false, - "skipLibCheck": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "forceConsistentCasingInFileNames": true, - "module": "ESNext", - "moduleResolution": "bundler", - "resolveJsonModule": true, - "isolatedModules": true, - "allowImportingTsExtensions": true, - "noEmit": true, - "paths": { - "mini-parse": ["../mini-parse/src"], - "wgsl-linker": ["./src"], - "mini-parse/test-util": ["../mini-parse/src/test-util"] - } - }, - "include": ["src/**/*"], - "exclude": ["node_modules"], - "references": [{ "path": "./tsconfig-node.json" }] -} diff --git a/packages/linker/vite.config.ts b/packages/linker/vite.config.ts deleted file mode 100644 index 0a6a43181..000000000 --- a/packages/linker/vite.config.ts +++ /dev/null @@ -1,9 +0,0 @@ -/// -import { defineConfig } from "vite"; -import { baseViteConfig } from "./base.vite.config.js"; -// import { visualizer } from "rollup-plugin-visualizer"; - -const config = baseViteConfig(); -config.test = { setupFiles: "./src/test/TestSetup.ts" }; - -export default defineConfig(config); diff --git a/packages/mini-parse/.markdownlint.json b/packages/mini-parse/.markdownlint.json deleted file mode 100644 index 2e0005a47..000000000 --- a/packages/mini-parse/.markdownlint.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "first-line-h1": false, - "no-inline-html": false -} diff --git a/packages/mini-parse/base.vite.config.ts b/packages/mini-parse/base.vite.config.ts deleted file mode 100644 index 3f923921c..000000000 --- a/packages/mini-parse/base.vite.config.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { UserConfig } from "vite"; -import tsconfigPaths from "vite-tsconfig-paths"; -import dts from "vite-plugin-dts"; -import { resolve } from "path"; - -export function baseViteConfig(): UserConfig { - return { - plugins: [ - tsconfigPaths(), - dts(), // generate .d.ts files - ], - build: { - lib: { - name: "mini-parse", - entry: [resolve(__dirname, "src/index.ts")], - }, - minify: false, - sourcemap: true, - }, - }; -} diff --git a/packages/mini-parse/minified.vite.config.ts b/packages/mini-parse/minified.vite.config.ts deleted file mode 100644 index e9f854b04..000000000 --- a/packages/mini-parse/minified.vite.config.ts +++ /dev/null @@ -1,17 +0,0 @@ -/// -import { LibraryOptions, defineConfig } from "vite"; -import { baseViteConfig } from "./base.vite.config.js"; -// import { visualizer } from "rollup-plugin-visualizer"; - -// Note that this will include the debug tracing code, so -// so the size estimate is an overestimate of production size - -const config = baseViteConfig(); -config.build!.emptyOutDir = false; -config.build!.minify = "terser"; -(config.build!.lib as LibraryOptions).formats = ["es", "cjs"]; -(config.build!.lib as LibraryOptions).fileName = "minified"; - -// config.plugins?.push(visualizer({ brotliSize: true, gzipSize: true })); // generate stats.html size report - -export default defineConfig(config); diff --git a/packages/mini-parse/package.json b/packages/mini-parse/package.json deleted file mode 100644 index 857c547c8..000000000 --- a/packages/mini-parse/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "mini-parse", - "version": "0.5.0-d1", - "files": [ - "dist", - "src" - ], - "scripts": { - "build": "run-s build:main build:util build:minified build:brotli", - "build:main": "vite build", - "build:util": "vite -c test-util.vite.config.ts build", - "build:minified": "vite -c minified.vite.config.ts build", - "build:brotli": "brotli dist/minified.cjs && ls -l dist/minified.cjs.br", - "format": "prettier . --write", - "lint": "eslint src", - "organize": "organize-imports-cli tsconfig.json", - "prepublishOnly": "run-s build", - "test": "vitest", - "test:once": "vitest run" - }, - "type": "module", - "repository": "github:wgsl-tooling-wg/wgsl-linker", - "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "require": "./dist/index.cjs" - }, - "./minified": { - "types": "./dist/index.d.ts", - "import": "./dist/minified.js", - "require": "./dist/minified.cjs" - }, - "./test-util": { - "import": "./dist/testUtil.js", - "types": "./dist/test-util/testUtil.d.ts" - } - }, - "devDependencies": { - "@types/node": "^22.5.0", - "@typescript-eslint/eslint-plugin": "^8.2.0", - "@typescript-eslint/parser": "^8.2.0", - "@vitest/ui": "^2.0.5", - "berry-pretty": "^0.0.5", - "esbuild": "^0.23.1", - "eslint": "^9.9.0", - "eslint-config-prettier": "^9.1.0", - "npm-run-all": "^4.1.5", - "organize-imports-cli": "^0.10.0", - "prettier-eslint-cli": "^8.0.1", - "rollup-plugin-visualizer": "^5.12.0", - "terser": "^5.31.6", - "typescript": "^5.5.4", - "vite": "^5.4.2", - "vite-plugin-dts": "^4.0.3", - "vite-tsconfig-paths": "^5.0.1", - "vitest": "^2.0.5" - } -} diff --git a/packages/mini-parse/src/index.ts b/packages/mini-parse/src/index.ts deleted file mode 100644 index bc1ee3092..000000000 --- a/packages/mini-parse/src/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -export * from "./MatchingLexer.js"; -export * from "./Parser.js"; -export * from "./ParserCombinator.js"; -export * from "./ParserLogging.js"; -export * from "./ParserTracing.js"; -export * from "./SrcMap.js"; -export * from "./TokenMatcher.js"; diff --git a/packages/mini-parse/src/test-util/index.ts b/packages/mini-parse/src/test-util/index.ts deleted file mode 100644 index fbb4548a2..000000000 --- a/packages/mini-parse/src/test-util/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "./LogCatcher.js"; -export * from "./TestParse.js"; diff --git a/packages/mini-parse/src/test/TestSetup.ts b/packages/mini-parse/src/test/TestSetup.ts deleted file mode 100644 index a2686b9c6..000000000 --- a/packages/mini-parse/src/test/TestSetup.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { enableTracing } from "../ParserTracing.js"; - -// enable parser tracing features -enableTracing(); diff --git a/packages/mini-parse/src/test/__snapshots__/ParserCombinator.test.ts.snap b/packages/mini-parse/src/test/__snapshots__/ParserCombinator.test.ts.snap deleted file mode 100644 index 8341ae077..000000000 --- a/packages/mini-parse/src/test/__snapshots__/ParserCombinator.test.ts.snap +++ /dev/null @@ -1,54 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`not() success 1`] = ` -[ - [ - true, - { - "kind": "word", - "text": "foo", - }, - ], - [ - true, - { - "kind": "word", - "text": "bar", - }, - ], -] -`; - -exports[`opt() makes failing match ok 1`] = ` -{ - "tags": {}, - "value": [ - undefined, - "foo", - ], -} -`; - -exports[`seq() handles two element match 1`] = ` -{ - "tags": {}, - "value": [ - "#import", - "foo", - ], -} -`; - -exports[`tracing 1`] = ` -"..repeat - ..wordz - : 'a' (word) - a Ln 1 - ^ - ✓ kind 'word' - ✓ wordz - ..wordz - x kind 'word' - x wordz -✓ repeat" -`; diff --git a/packages/mini-parse/test-util.vite.config.ts b/packages/mini-parse/test-util.vite.config.ts deleted file mode 100644 index 28e069fff..000000000 --- a/packages/mini-parse/test-util.vite.config.ts +++ /dev/null @@ -1,40 +0,0 @@ -/// -import { LibraryOptions, defineConfig } from "vite"; -import { baseViteConfig } from "./base.vite.config.js"; -import { resolve } from "path"; - -const config = baseViteConfig(); -config.build.emptyOutDir = false; -const lib = config.build.lib as LibraryOptions; -lib.name = "mini-parse-test-util"; -lib.formats = ["es"]; -lib.entry = [resolve(__dirname, "./src/test-util/index.ts")]; -lib.fileName = "testUtil"; - -// config.plugins?.push(visualizer({ brotliSize: true, gzipSize: true })); // generate stats.html size report - -export default defineConfig(config); - -// { -// plugins: [ -// tsconfigPaths(), -// dts(), // generate -// // visualizer({ brotliSize: true, gzipSize: true }), // generate stats.html size report -// ], -// build: { -// emptyOutDir: false, -// lib: { -// name: "mini-parse-testing", -// formats: ["es"], -// entry: [resolve(__dirname, "./src/test-util/index.ts")], -// fileName: "testUtil" -// }, -// rollupOptions: { -// // make sure to externalize deps that shouldn't be bundled -// // into your library -// external: ['vitest', 'mini-parse'], -// }, -// minify: false, -// sourcemap: true, -// }, -// }); diff --git a/packages/mini-parse/tsconfig-node.json b/packages/mini-parse/tsconfig-node.json deleted file mode 100644 index cbcfa1990..000000000 --- a/packages/mini-parse/tsconfig-node.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "compilerOptions": { - "composite": true, - "module": "esnext", - "moduleResolution": "node", - "types": ["node"], - "skipLibCheck": true, - "outDir": "/tmp" - }, - "include": ["*vite.config.ts"] -} diff --git a/packages/mini-parse/tsconfig.json b/packages/mini-parse/tsconfig.json deleted file mode 100644 index 53316e2c3..000000000 --- a/packages/mini-parse/tsconfig.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "compilerOptions": { - "target": "ESNext", - "lib": ["DOM", "DOM.Iterable", "ESNext", "ESNext.AsyncIterable"], - "esModuleInterop": false, - "downlevelIteration": true, - "importsNotUsedAsValues": "remove", - "experimentalDecorators": true, - "useDefineForClassFields": false, - "allowJs": false, - "skipLibCheck": true, - "allowSyntheticDefaultImports": true, - "strict": true, - "forceConsistentCasingInFileNames": true, - "module": "ESNext", - "moduleResolution": "Node", - "resolveJsonModule": true, - "isolatedModules": true, - "noEmit": true, - "paths": { - "mini-parse": ["./src"], - "mini-parse/test-util": ["./src/test-util"] - } - }, - "include": ["src/**/*"], - "exclude": ["node_modules"], - "references": [{ "path": "./tsconfig-node.json" }] -} diff --git a/packages/mini-parse/vite.config.ts b/packages/mini-parse/vite.config.ts deleted file mode 100644 index 3b5791481..000000000 --- a/packages/mini-parse/vite.config.ts +++ /dev/null @@ -1,10 +0,0 @@ -/// -import { LibraryOptions, defineConfig } from "vite"; -import { baseViteConfig } from "./base.vite.config.js"; - -const config = baseViteConfig(); -config.test = { setupFiles: "./src/test/TestSetup.ts" }; -(config.build.lib as LibraryOptions).formats = ["es", "cjs"]; -(config.build.lib as LibraryOptions).name = "mini-parse"; - -export default defineConfig(config); diff --git a/packages/packager/.gitignore b/packages/packager/.gitignore deleted file mode 100644 index ace2c2ab9..000000000 --- a/packages/packager/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# built executable scripts -bin \ No newline at end of file diff --git a/packages/packager/build.ts b/packages/packager/build.ts deleted file mode 100644 index 9dd78ffb4..000000000 --- a/packages/packager/build.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { build, Plugin } from "esbuild"; -import { readFile } from "node:fs/promises"; -import * as path from "path"; - -// an esbuild script with a plugin to handle ?raw style imports - -build({ - plugins: [raw()], - bundle: true, - platform: "node", - format: "esm", - outfile: "bin/wgsl-packager", - entryPoints: ["src/main.ts"], -}); - -/** Package resources as strings via ?raw */ -function raw(): Plugin { - return { - name: "raw", - setup(build) { - build.onResolve({ filter: /\?raw$/ }, args => { - return { - path: - path.isAbsolute(args.path) ? - args.path - : path.join(args.resolveDir, args.path), - namespace: "raw-loader", - }; - }); - build.onLoad( - { filter: /\?raw$/, namespace: "raw-loader" }, - async args => { - return { - contents: await readFile(args.path.replace(/\?raw$/, "")), - loader: "text", - }; - }, - ); - }, - }; -} diff --git a/packages/packager/package.json b/packages/packager/package.json deleted file mode 100644 index 66989d8fe..000000000 --- a/packages/packager/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "wgsl-packager", - "version": "0.5.0-d1", - "type": "module", - "scripts": { - "build": "tsx build.ts", - "format": "prettier . --write", - "lint": "eslint src", - "organize": "organize-imports-cli tsconfig.json", - "prepublishOnly": "run-s build", - "test": "vitest", - "test:once": "vitest run" - }, - "files": [ - "bin" - ], - "bin": "bin/wgsl-packager", - "dependencies": { - "glob": "^11.0.0", - "wgsl-linker": "workspace:*" - }, - "devDependencies": {} -} diff --git a/packages/packager/src/test/wgsl-package/src/viteTypes.d.ts b/packages/packager/src/test/wgsl-package/src/viteTypes.d.ts deleted file mode 100644 index 11f02fe2a..000000000 --- a/packages/packager/src/test/wgsl-package/src/viteTypes.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/packages/packager/tsconfig.json b/packages/packager/tsconfig.json deleted file mode 100644 index e65418e9b..000000000 --- a/packages/packager/tsconfig.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "compilerOptions": { - "target": "ESNext", - "lib": ["ESNext"], - "types": ["node"], - "module": "ESNext", - "moduleResolution": "Node", - "esModuleInterop": false, - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - "allowJs": false, - "strict": true, - "forceConsistentCasingInFileNames": true, - "importsNotUsedAsValues": "remove", - "resolveJsonModule": true, - "isolatedModules": true, - "noEmit": true, - "paths": { - "wgsl-linker": ["../linker/src"], - "mini-parse": ["../mini-parse/src"] - } - }, - "include": ["src/**/*", "src/viteTypes.d.ts"], - "exclude": ["node_modules"] -} diff --git a/packages/packager/vite.config.ts b/packages/packager/vite.config.ts deleted file mode 100644 index 73deae856..000000000 --- a/packages/packager/vite.config.ts +++ /dev/null @@ -1,9 +0,0 @@ -/// -import { UserConfig } from "vite"; -import tsconfigPaths from "vite-tsconfig-paths"; - -const config: UserConfig = { - plugins: [tsconfigPaths()], -}; - -export default config; diff --git a/packages/test-package/out/wgsl.d.ts b/packages/test-package/out/wgsl.d.ts deleted file mode 100644 index acd108ff1..000000000 --- a/packages/test-package/out/wgsl.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -export interface WgslBundle { - /** name of the package, e.g. wgsl-rand */ - name: string; - - /** npm version of the package e.g. 0.4.1 */ - version: string; - - /** wesl edition of the code e.g. wesl_unstable_2024_1 */ - edition: string; - - /** map of wesl/wgsl modules: - * keys are file paths, relative to package root (e.g. "./lib.wgsl") - * values are wgsl/wesl code strings - */ - modules: Record; -} - -export declare const wgsl: WgslBundle; -export default wgsl; diff --git a/packages/test-package/out/wgsl.js b/packages/test-package/out/wgsl.js deleted file mode 100644 index 0f2e7017a..000000000 --- a/packages/test-package/out/wgsl.js +++ /dev/null @@ -1,56 +0,0 @@ -export const wgsl = { - name: "wgsl-rand", - version: "0.1", - edition: "wesl_unstable_2024_1", - modules: { - "./lib.wesl": ` -// PCG pseudo random generator from vec2u to vec4f -// the random output is in the range from zero to 1 -export fn pcg_2u_3f(pos: vec2u) -> vec3f { - let seed = mix2to3(pos); - let random = pcg_3u_3u(seed); - let normalized = ldexp(vec3f(random), vec3(-32)); - return vec3f(normalized); -} - -// PCG random generator from vec3u to vec3u -// adapted from http://www.jcgt.org/published/0009/03/02/ -export fn pcg_3u_3u(seed: vec3u) -> vec3u { - var v = seed * 1664525u + 1013904223u; - - v = mixing(v); - v ^= v >> vec3(16u); - v = mixing(v); - - return v; -} - -// permuted lcg -fn mixing(v: vec3u) -> vec3u { - var m: vec3u = v; - m.x += v.y * v.z; - m.y += v.z * v.x; - m.z += v.x * v.y; - - return m; -} - -// mix position into a seed as per: https://www.shadertoy.com/view/XlGcRh -fn mix2to3(p: vec2u) -> vec3u { - let seed = vec3u( - p.x, - p.x ^ p.y, - p.x + p.y, - ); - return seed; -} - -fn sinRand(p: vec2u) -> vec2u { -// TBD -} - - ` - } -}; - -export default wgsl; \ No newline at end of file diff --git a/packages/test-package/package.json b/packages/test-package/package.json deleted file mode 100644 index e0a7c3337..000000000 --- a/packages/test-package/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "wgsl-rand", - "type": "module", - "files": [ - "out" - ], - "exports": { - "import": "./out/wgsl.js", - "types": "./out/wgsl.d.ts" - }, - "version": "0.5.0-d1" -} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml deleted file mode 100644 index f41071016..000000000 --- a/pnpm-lock.yaml +++ /dev/null @@ -1,5309 +0,0 @@ -lockfileVersion: '9.0' - -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - -importers: - - .: - devDependencies: - '@eslint/js': - specifier: ^9.14.0 - version: 9.14.0 - '@types/eslint__js': - specifier: ^8.42.3 - version: 8.42.3 - '@types/node': - specifier: ^22.9.0 - version: 22.9.0 - '@types/yargs': - specifier: ^17.0.33 - version: 17.0.33 - '@typescript-eslint/eslint-plugin': - specifier: ^8.13.0 - version: 8.13.0(@typescript-eslint/parser@8.13.0(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3) - '@typescript-eslint/parser': - specifier: ^8.13.0 - version: 8.13.0(eslint@9.14.0)(typescript@5.6.3) - '@vitest/ui': - specifier: ^2.1.4 - version: 2.1.4(vitest@2.1.4) - berry-pretty: - specifier: ^0.0.5 - version: 0.0.5 - brotli: - specifier: ^1.3.3 - version: 1.3.3 - esbuild: - specifier: ^0.24.0 - version: 0.24.0 - eslint: - specifier: ^9.14.0 - version: 9.14.0 - fast-glob: - specifier: ^3.3.2 - version: 3.3.2 - glob: - specifier: ^11.0.0 - version: 11.0.0 - npm-run-all: - specifier: ^4.1.5 - version: 4.1.5 - organize-imports-cli: - specifier: ^0.10.0 - version: 0.10.0 - prettier: - specifier: ^3.3.3 - version: 3.3.3 - rimraf: - specifier: ^6.0.1 - version: 6.0.1 - tsx: - specifier: ^4.19.2 - version: 4.19.2 - typescript: - specifier: ^5.6.3 - version: 5.6.3 - typescript-eslint: - specifier: ^8.13.0 - version: 8.13.0(eslint@9.14.0)(typescript@5.6.3) - vite: - specifier: ^5.4.10 - version: 5.4.10(@types/node@22.9.0)(terser@5.36.0) - vite-tsconfig-paths: - specifier: ^5.1.0 - version: 5.1.0(typescript@5.6.3)(vite@5.4.10(@types/node@22.9.0)(terser@5.36.0)) - vitest: - specifier: ^2.1.4 - version: 2.1.4(@types/node@22.9.0)(@vitest/ui@2.1.4)(terser@5.36.0) - yargs: - specifier: ^17.7.2 - version: 17.7.2 - - packages/bulk-test: - dependencies: - wgsl-linker: - specifier: workspace:* - version: link:../linker - - packages/cli: - dependencies: - '@types/diff': - specifier: ^5.0.9 - version: 5.2.3 - diff: - specifier: ^5.2.0 - version: 5.2.0 - wgsl-linker: - specifier: workspace:* - version: link:../linker - - packages/linker: - dependencies: - mini-parse: - specifier: workspace:* - version: link:../mini-parse - devDependencies: - ncp: - specifier: ^2.0.0 - version: 2.0.0 - rollup-plugin-visualizer: - specifier: ^5.12.0 - version: 5.12.0(rollup@4.24.4) - terser: - specifier: ^5.36.0 - version: 5.36.0 - vite-plugin-dts: - specifier: ^4.3.0 - version: 4.3.0(@types/node@22.9.0)(rollup@4.24.4)(typescript@5.6.3)(vite@5.4.10(@types/node@22.9.0)(terser@5.36.0)) - vitest: - specifier: ^2.1.4 - version: 2.1.4(@types/node@22.9.0)(@vitest/ui@2.1.4)(terser@5.36.0) - wesl-testsuite: - specifier: file:../../../wesl-testsuite - version: file:../wesl-testsuite - wgsl-rand: - specifier: workspace:* - version: link:../test-package - - packages/mini-parse: - devDependencies: - '@types/node': - specifier: ^22.5.0 - version: 22.9.0 - '@typescript-eslint/eslint-plugin': - specifier: ^8.2.0 - version: 8.13.0(@typescript-eslint/parser@8.13.0(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3) - '@typescript-eslint/parser': - specifier: ^8.2.0 - version: 8.13.0(eslint@9.14.0)(typescript@5.6.3) - '@vitest/ui': - specifier: ^2.0.5 - version: 2.1.4(vitest@2.1.4) - berry-pretty: - specifier: ^0.0.5 - version: 0.0.5 - esbuild: - specifier: ^0.23.1 - version: 0.23.1 - eslint: - specifier: ^9.9.0 - version: 9.14.0 - eslint-config-prettier: - specifier: ^9.1.0 - version: 9.1.0(eslint@9.14.0) - npm-run-all: - specifier: ^4.1.5 - version: 4.1.5 - organize-imports-cli: - specifier: ^0.10.0 - version: 0.10.0 - prettier-eslint-cli: - specifier: ^8.0.1 - version: 8.0.1(prettier-eslint@16.3.0) - rollup-plugin-visualizer: - specifier: ^5.12.0 - version: 5.12.0(rollup@4.24.4) - terser: - specifier: ^5.31.6 - version: 5.36.0 - typescript: - specifier: ^5.5.4 - version: 5.6.3 - vite: - specifier: ^5.4.2 - version: 5.4.10(@types/node@22.9.0)(terser@5.36.0) - vite-plugin-dts: - specifier: ^4.0.3 - version: 4.3.0(@types/node@22.9.0)(rollup@4.24.4)(typescript@5.6.3)(vite@5.4.10(@types/node@22.9.0)(terser@5.36.0)) - vite-tsconfig-paths: - specifier: ^5.0.1 - version: 5.1.0(typescript@5.6.3)(vite@5.4.10(@types/node@22.9.0)(terser@5.36.0)) - vitest: - specifier: ^2.0.5 - version: 2.1.4(@types/node@22.9.0)(@vitest/ui@2.1.4)(terser@5.36.0) - - packages/packager: - dependencies: - glob: - specifier: ^11.0.0 - version: 11.0.0 - wgsl-linker: - specifier: workspace:* - version: link:../linker - - packages/test-package: {} - -packages: - - '@babel/helper-string-parser@7.25.9': - resolution: {integrity: sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==} - engines: {node: '>=6.9.0'} - - '@babel/helper-validator-identifier@7.25.9': - resolution: {integrity: sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==} - engines: {node: '>=6.9.0'} - - '@babel/parser@7.26.2': - resolution: {integrity: sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==} - engines: {node: '>=6.0.0'} - hasBin: true - - '@babel/types@7.26.0': - resolution: {integrity: sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==} - engines: {node: '>=6.9.0'} - - '@esbuild/aix-ppc64@0.21.5': - resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==} - engines: {node: '>=12'} - cpu: [ppc64] - os: [aix] - - '@esbuild/aix-ppc64@0.23.1': - resolution: {integrity: sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==} - engines: {node: '>=18'} - cpu: [ppc64] - os: [aix] - - '@esbuild/aix-ppc64@0.24.0': - resolution: {integrity: sha512-WtKdFM7ls47zkKHFVzMz8opM7LkcsIp9amDUBIAWirg70RM71WRSjdILPsY5Uv1D42ZpUfaPILDlfactHgsRkw==} - engines: {node: '>=18'} - cpu: [ppc64] - os: [aix] - - '@esbuild/android-arm64@0.21.5': - resolution: {integrity: sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==} - engines: {node: '>=12'} - cpu: [arm64] - os: [android] - - '@esbuild/android-arm64@0.23.1': - resolution: {integrity: sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==} - engines: {node: '>=18'} - cpu: [arm64] - os: [android] - - '@esbuild/android-arm64@0.24.0': - resolution: {integrity: sha512-Vsm497xFM7tTIPYK9bNTYJyF/lsP590Qc1WxJdlB6ljCbdZKU9SY8i7+Iin4kyhV/KV5J2rOKsBQbB77Ab7L/w==} - engines: {node: '>=18'} - cpu: [arm64] - os: [android] - - '@esbuild/android-arm@0.21.5': - resolution: {integrity: sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==} - engines: {node: '>=12'} - cpu: [arm] - os: [android] - - '@esbuild/android-arm@0.23.1': - resolution: {integrity: sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==} - engines: {node: '>=18'} - cpu: [arm] - os: [android] - - '@esbuild/android-arm@0.24.0': - resolution: {integrity: sha512-arAtTPo76fJ/ICkXWetLCc9EwEHKaeya4vMrReVlEIUCAUncH7M4bhMQ+M9Vf+FFOZJdTNMXNBrWwW+OXWpSew==} - engines: {node: '>=18'} - cpu: [arm] - os: [android] - - '@esbuild/android-x64@0.21.5': - resolution: {integrity: sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==} - engines: {node: '>=12'} - cpu: [x64] - os: [android] - - '@esbuild/android-x64@0.23.1': - resolution: {integrity: sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==} - engines: {node: '>=18'} - cpu: [x64] - os: [android] - - '@esbuild/android-x64@0.24.0': - resolution: {integrity: sha512-t8GrvnFkiIY7pa7mMgJd7p8p8qqYIz1NYiAoKc75Zyv73L3DZW++oYMSHPRarcotTKuSs6m3hTOa5CKHaS02TQ==} - engines: {node: '>=18'} - cpu: [x64] - os: [android] - - '@esbuild/darwin-arm64@0.21.5': - resolution: {integrity: sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==} - engines: {node: '>=12'} - cpu: [arm64] - os: [darwin] - - '@esbuild/darwin-arm64@0.23.1': - resolution: {integrity: sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==} - engines: {node: '>=18'} - cpu: [arm64] - os: [darwin] - - '@esbuild/darwin-arm64@0.24.0': - resolution: {integrity: sha512-CKyDpRbK1hXwv79soeTJNHb5EiG6ct3efd/FTPdzOWdbZZfGhpbcqIpiD0+vwmpu0wTIL97ZRPZu8vUt46nBSw==} - engines: {node: '>=18'} - cpu: [arm64] - os: [darwin] - - '@esbuild/darwin-x64@0.21.5': - resolution: {integrity: sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==} - engines: {node: '>=12'} - cpu: [x64] - os: [darwin] - - '@esbuild/darwin-x64@0.23.1': - resolution: {integrity: sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==} - engines: {node: '>=18'} - cpu: [x64] - os: [darwin] - - '@esbuild/darwin-x64@0.24.0': - resolution: {integrity: sha512-rgtz6flkVkh58od4PwTRqxbKH9cOjaXCMZgWD905JOzjFKW+7EiUObfd/Kav+A6Gyud6WZk9w+xu6QLytdi2OA==} - engines: {node: '>=18'} - cpu: [x64] - os: [darwin] - - '@esbuild/freebsd-arm64@0.21.5': - resolution: {integrity: sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==} - engines: {node: '>=12'} - cpu: [arm64] - os: [freebsd] - - '@esbuild/freebsd-arm64@0.23.1': - resolution: {integrity: sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==} - engines: {node: '>=18'} - cpu: [arm64] - os: [freebsd] - - '@esbuild/freebsd-arm64@0.24.0': - resolution: {integrity: sha512-6Mtdq5nHggwfDNLAHkPlyLBpE5L6hwsuXZX8XNmHno9JuL2+bg2BX5tRkwjyfn6sKbxZTq68suOjgWqCicvPXA==} - engines: {node: '>=18'} - cpu: [arm64] - os: [freebsd] - - '@esbuild/freebsd-x64@0.21.5': - resolution: {integrity: sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [freebsd] - - '@esbuild/freebsd-x64@0.23.1': - resolution: {integrity: sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==} - engines: {node: '>=18'} - cpu: [x64] - os: [freebsd] - - '@esbuild/freebsd-x64@0.24.0': - resolution: {integrity: sha512-D3H+xh3/zphoX8ck4S2RxKR6gHlHDXXzOf6f/9dbFt/NRBDIE33+cVa49Kil4WUjxMGW0ZIYBYtaGCa2+OsQwQ==} - engines: {node: '>=18'} - cpu: [x64] - os: [freebsd] - - '@esbuild/linux-arm64@0.21.5': - resolution: {integrity: sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==} - engines: {node: '>=12'} - cpu: [arm64] - os: [linux] - - '@esbuild/linux-arm64@0.23.1': - resolution: {integrity: sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==} - engines: {node: '>=18'} - cpu: [arm64] - os: [linux] - - '@esbuild/linux-arm64@0.24.0': - resolution: {integrity: sha512-TDijPXTOeE3eaMkRYpcy3LarIg13dS9wWHRdwYRnzlwlA370rNdZqbcp0WTyyV/k2zSxfko52+C7jU5F9Tfj1g==} - engines: {node: '>=18'} - cpu: [arm64] - os: [linux] - - '@esbuild/linux-arm@0.21.5': - resolution: {integrity: sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==} - engines: {node: '>=12'} - cpu: [arm] - os: [linux] - - '@esbuild/linux-arm@0.23.1': - resolution: {integrity: sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==} - engines: {node: '>=18'} - cpu: [arm] - os: [linux] - - '@esbuild/linux-arm@0.24.0': - resolution: {integrity: sha512-gJKIi2IjRo5G6Glxb8d3DzYXlxdEj2NlkixPsqePSZMhLudqPhtZ4BUrpIuTjJYXxvF9njql+vRjB2oaC9XpBw==} - engines: {node: '>=18'} - cpu: [arm] - os: [linux] - - '@esbuild/linux-ia32@0.21.5': - resolution: {integrity: sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==} - engines: {node: '>=12'} - cpu: [ia32] - os: [linux] - - '@esbuild/linux-ia32@0.23.1': - resolution: {integrity: sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==} - engines: {node: '>=18'} - cpu: [ia32] - os: [linux] - - '@esbuild/linux-ia32@0.24.0': - resolution: {integrity: sha512-K40ip1LAcA0byL05TbCQ4yJ4swvnbzHscRmUilrmP9Am7//0UjPreh4lpYzvThT2Quw66MhjG//20mrufm40mA==} - engines: {node: '>=18'} - cpu: [ia32] - os: [linux] - - '@esbuild/linux-loong64@0.21.5': - resolution: {integrity: sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==} - engines: {node: '>=12'} - cpu: [loong64] - os: [linux] - - '@esbuild/linux-loong64@0.23.1': - resolution: {integrity: sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==} - engines: {node: '>=18'} - cpu: [loong64] - os: [linux] - - '@esbuild/linux-loong64@0.24.0': - resolution: {integrity: sha512-0mswrYP/9ai+CU0BzBfPMZ8RVm3RGAN/lmOMgW4aFUSOQBjA31UP8Mr6DDhWSuMwj7jaWOT0p0WoZ6jeHhrD7g==} - engines: {node: '>=18'} - cpu: [loong64] - os: [linux] - - '@esbuild/linux-mips64el@0.21.5': - resolution: {integrity: sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==} - engines: {node: '>=12'} - cpu: [mips64el] - os: [linux] - - '@esbuild/linux-mips64el@0.23.1': - resolution: {integrity: sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==} - engines: {node: '>=18'} - cpu: [mips64el] - os: [linux] - - '@esbuild/linux-mips64el@0.24.0': - resolution: {integrity: sha512-hIKvXm0/3w/5+RDtCJeXqMZGkI2s4oMUGj3/jM0QzhgIASWrGO5/RlzAzm5nNh/awHE0A19h/CvHQe6FaBNrRA==} - engines: {node: '>=18'} - cpu: [mips64el] - os: [linux] - - '@esbuild/linux-ppc64@0.21.5': - resolution: {integrity: sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==} - engines: {node: '>=12'} - cpu: [ppc64] - os: [linux] - - '@esbuild/linux-ppc64@0.23.1': - resolution: {integrity: sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==} - engines: {node: '>=18'} - cpu: [ppc64] - os: [linux] - - '@esbuild/linux-ppc64@0.24.0': - resolution: {integrity: sha512-HcZh5BNq0aC52UoocJxaKORfFODWXZxtBaaZNuN3PUX3MoDsChsZqopzi5UupRhPHSEHotoiptqikjN/B77mYQ==} - engines: {node: '>=18'} - cpu: [ppc64] - os: [linux] - - '@esbuild/linux-riscv64@0.21.5': - resolution: {integrity: sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==} - engines: {node: '>=12'} - cpu: [riscv64] - os: [linux] - - '@esbuild/linux-riscv64@0.23.1': - resolution: {integrity: sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==} - engines: {node: '>=18'} - cpu: [riscv64] - os: [linux] - - '@esbuild/linux-riscv64@0.24.0': - resolution: {integrity: sha512-bEh7dMn/h3QxeR2KTy1DUszQjUrIHPZKyO6aN1X4BCnhfYhuQqedHaa5MxSQA/06j3GpiIlFGSsy1c7Gf9padw==} - engines: {node: '>=18'} - cpu: [riscv64] - os: [linux] - - '@esbuild/linux-s390x@0.21.5': - resolution: {integrity: sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==} - engines: {node: '>=12'} - cpu: [s390x] - os: [linux] - - '@esbuild/linux-s390x@0.23.1': - resolution: {integrity: sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==} - engines: {node: '>=18'} - cpu: [s390x] - os: [linux] - - '@esbuild/linux-s390x@0.24.0': - resolution: {integrity: sha512-ZcQ6+qRkw1UcZGPyrCiHHkmBaj9SiCD8Oqd556HldP+QlpUIe2Wgn3ehQGVoPOvZvtHm8HPx+bH20c9pvbkX3g==} - engines: {node: '>=18'} - cpu: [s390x] - os: [linux] - - '@esbuild/linux-x64@0.21.5': - resolution: {integrity: sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==} - engines: {node: '>=12'} - cpu: [x64] - os: [linux] - - '@esbuild/linux-x64@0.23.1': - resolution: {integrity: sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==} - engines: {node: '>=18'} - cpu: [x64] - os: [linux] - - '@esbuild/linux-x64@0.24.0': - resolution: {integrity: sha512-vbutsFqQ+foy3wSSbmjBXXIJ6PL3scghJoM8zCL142cGaZKAdCZHyf+Bpu/MmX9zT9Q0zFBVKb36Ma5Fzfa8xA==} - engines: {node: '>=18'} - cpu: [x64] - os: [linux] - - '@esbuild/netbsd-x64@0.21.5': - resolution: {integrity: sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==} - engines: {node: '>=12'} - cpu: [x64] - os: [netbsd] - - '@esbuild/netbsd-x64@0.23.1': - resolution: {integrity: sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==} - engines: {node: '>=18'} - cpu: [x64] - os: [netbsd] - - '@esbuild/netbsd-x64@0.24.0': - resolution: {integrity: sha512-hjQ0R/ulkO8fCYFsG0FZoH+pWgTTDreqpqY7UnQntnaKv95uP5iW3+dChxnx7C3trQQU40S+OgWhUVwCjVFLvg==} - engines: {node: '>=18'} - cpu: [x64] - os: [netbsd] - - '@esbuild/openbsd-arm64@0.23.1': - resolution: {integrity: sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==} - engines: {node: '>=18'} - cpu: [arm64] - os: [openbsd] - - '@esbuild/openbsd-arm64@0.24.0': - resolution: {integrity: sha512-MD9uzzkPQbYehwcN583yx3Tu5M8EIoTD+tUgKF982WYL9Pf5rKy9ltgD0eUgs8pvKnmizxjXZyLt0z6DC3rRXg==} - engines: {node: '>=18'} - cpu: [arm64] - os: [openbsd] - - '@esbuild/openbsd-x64@0.21.5': - resolution: {integrity: sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==} - engines: {node: '>=12'} - cpu: [x64] - os: [openbsd] - - '@esbuild/openbsd-x64@0.23.1': - resolution: {integrity: sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==} - engines: {node: '>=18'} - cpu: [x64] - os: [openbsd] - - '@esbuild/openbsd-x64@0.24.0': - resolution: {integrity: sha512-4ir0aY1NGUhIC1hdoCzr1+5b43mw99uNwVzhIq1OY3QcEwPDO3B7WNXBzaKY5Nsf1+N11i1eOfFcq+D/gOS15Q==} - engines: {node: '>=18'} - cpu: [x64] - os: [openbsd] - - '@esbuild/sunos-x64@0.21.5': - resolution: {integrity: sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==} - engines: {node: '>=12'} - cpu: [x64] - os: [sunos] - - '@esbuild/sunos-x64@0.23.1': - resolution: {integrity: sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==} - engines: {node: '>=18'} - cpu: [x64] - os: [sunos] - - '@esbuild/sunos-x64@0.24.0': - resolution: {integrity: sha512-jVzdzsbM5xrotH+W5f1s+JtUy1UWgjU0Cf4wMvffTB8m6wP5/kx0KiaLHlbJO+dMgtxKV8RQ/JvtlFcdZ1zCPA==} - engines: {node: '>=18'} - cpu: [x64] - os: [sunos] - - '@esbuild/win32-arm64@0.21.5': - resolution: {integrity: sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==} - engines: {node: '>=12'} - cpu: [arm64] - os: [win32] - - '@esbuild/win32-arm64@0.23.1': - resolution: {integrity: sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==} - engines: {node: '>=18'} - cpu: [arm64] - os: [win32] - - '@esbuild/win32-arm64@0.24.0': - resolution: {integrity: sha512-iKc8GAslzRpBytO2/aN3d2yb2z8XTVfNV0PjGlCxKo5SgWmNXx82I/Q3aG1tFfS+A2igVCY97TJ8tnYwpUWLCA==} - engines: {node: '>=18'} - cpu: [arm64] - os: [win32] - - '@esbuild/win32-ia32@0.21.5': - resolution: {integrity: sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==} - engines: {node: '>=12'} - cpu: [ia32] - os: [win32] - - '@esbuild/win32-ia32@0.23.1': - resolution: {integrity: sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==} - engines: {node: '>=18'} - cpu: [ia32] - os: [win32] - - '@esbuild/win32-ia32@0.24.0': - resolution: {integrity: sha512-vQW36KZolfIudCcTnaTpmLQ24Ha1RjygBo39/aLkM2kmjkWmZGEJ5Gn9l5/7tzXA42QGIoWbICfg6KLLkIw6yw==} - engines: {node: '>=18'} - cpu: [ia32] - os: [win32] - - '@esbuild/win32-x64@0.21.5': - resolution: {integrity: sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==} - engines: {node: '>=12'} - cpu: [x64] - os: [win32] - - '@esbuild/win32-x64@0.23.1': - resolution: {integrity: sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==} - engines: {node: '>=18'} - cpu: [x64] - os: [win32] - - '@esbuild/win32-x64@0.24.0': - resolution: {integrity: sha512-7IAFPrjSQIJrGsK6flwg7NFmwBoSTyF3rl7If0hNUFQU4ilTsEPL6GuMuU9BfIWVVGuRnuIidkSMC+c0Otu8IA==} - engines: {node: '>=18'} - cpu: [x64] - os: [win32] - - '@eslint-community/eslint-utils@4.4.0': - resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - - '@eslint-community/eslint-utils@4.4.1': - resolution: {integrity: sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - - '@eslint-community/regexpp@4.12.1': - resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} - engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - - '@eslint/config-array@0.18.0': - resolution: {integrity: sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/core@0.7.0': - resolution: {integrity: sha512-xp5Jirz5DyPYlPiKat8jaq0EmYvDXKKpzTbxXMpT9eqlRJkRKIz9AGMdlvYjih+im+QlhWrpvVjl8IPC/lHlUw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/eslintrc@2.1.4': - resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - - '@eslint/eslintrc@3.1.0': - resolution: {integrity: sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/js@8.57.1': - resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - - '@eslint/js@9.14.0': - resolution: {integrity: sha512-pFoEtFWCPyDOl+C6Ift+wC7Ro89otjigCf5vcuWqWgqNSQbRrpjSvdeE6ofLz4dHmyxD5f7gIdGT4+p36L6Twg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/object-schema@2.1.4': - resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/plugin-kit@0.2.2': - resolution: {integrity: sha512-CXtq5nR4Su+2I47WPOlWud98Y5Lv8Kyxp2ukhgFx/eW6Blm18VXJO5WuQylPugRo8nbluoi6GvvxBLqHcvqUUw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@humanfs/core@0.19.1': - resolution: {integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==} - engines: {node: '>=18.18.0'} - - '@humanfs/node@0.16.6': - resolution: {integrity: sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==} - engines: {node: '>=18.18.0'} - - '@humanwhocodes/config-array@0.13.0': - resolution: {integrity: sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==} - engines: {node: '>=10.10.0'} - deprecated: Use @eslint/config-array instead - - '@humanwhocodes/module-importer@1.0.1': - resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} - engines: {node: '>=12.22'} - - '@humanwhocodes/object-schema@2.0.3': - resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} - deprecated: Use @eslint/object-schema instead - - '@humanwhocodes/retry@0.3.1': - resolution: {integrity: sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==} - engines: {node: '>=18.18'} - - '@humanwhocodes/retry@0.4.0': - resolution: {integrity: sha512-xnRgu9DxZbkWak/te3fcytNyp8MTbuiZIaueg2rgEvBuN55n04nwLYLU9TX/VVlusc9L2ZNXi99nUFNkHXtr5g==} - engines: {node: '>=18.18'} - - '@isaacs/cliui@8.0.2': - resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} - engines: {node: '>=12'} - - '@jest/schemas@29.6.3': - resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - '@jridgewell/gen-mapping@0.3.5': - resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==} - engines: {node: '>=6.0.0'} - - '@jridgewell/resolve-uri@3.1.2': - resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} - engines: {node: '>=6.0.0'} - - '@jridgewell/set-array@1.2.1': - resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==} - engines: {node: '>=6.0.0'} - - '@jridgewell/source-map@0.3.6': - resolution: {integrity: sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==} - - '@jridgewell/sourcemap-codec@1.5.0': - resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} - - '@jridgewell/trace-mapping@0.3.25': - resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} - - '@messageformat/core@3.3.0': - resolution: {integrity: sha512-YcXd3remTDdeMxAlbvW6oV9d/01/DZ8DHUFwSttO3LMzIZj3iO0NRw+u1xlsNNORFI+u0EQzD52ZX3+Udi0T3g==} - - '@messageformat/date-skeleton@1.0.1': - resolution: {integrity: sha512-jPXy8fg+WMPIgmGjxSlnGJn68h/2InfT0TNSkVx0IGXgp4ynnvYkbZ51dGWmGySEK+pBiYUttbQdu5XEqX5CRg==} - - '@messageformat/number-skeleton@1.2.0': - resolution: {integrity: sha512-xsgwcL7J7WhlHJ3RNbaVgssaIwcEyFkBqxHdcdaiJzwTZAWEOD8BuUFxnxV9k5S0qHN3v/KzUpq0IUpjH1seRg==} - - '@messageformat/parser@5.1.0': - resolution: {integrity: sha512-jKlkls3Gewgw6qMjKZ9SFfHUpdzEVdovKFtW1qRhJ3WI4FW5R/NnGDqr8SDGz+krWDO3ki94boMmQvGke1HwUQ==} - - '@messageformat/runtime@3.0.1': - resolution: {integrity: sha512-6RU5ol2lDtO8bD9Yxe6CZkl0DArdv0qkuoZC+ZwowU+cdRlVE1157wjCmlA5Rsf1Xc/brACnsZa5PZpEDfTFFg==} - - '@microsoft/api-extractor-model@7.29.8': - resolution: {integrity: sha512-t3Z/xcO6TRbMcnKGVMs4uMzv/gd5j0NhMiJIGjD4cJMeFJ1Hf8wnLSx37vxlRlL0GWlGJhnFgxvnaL6JlS+73g==} - - '@microsoft/api-extractor@7.47.11': - resolution: {integrity: sha512-lrudfbPub5wzBhymfFtgZKuBvXxoSIAdrvS2UbHjoMT2TjIEddq6Z13pcve7A03BAouw0x8sW8G4txdgfiSwpQ==} - hasBin: true - - '@microsoft/tsdoc-config@0.17.0': - resolution: {integrity: sha512-v/EYRXnCAIHxOHW+Plb6OWuUoMotxTN0GLatnpOb1xq0KuTNw/WI3pamJx/UbsoJP5k9MCw1QxvvhPcF9pH3Zg==} - - '@microsoft/tsdoc@0.15.0': - resolution: {integrity: sha512-HZpPoABogPvjeJOdzCOSJsXeL/SMCBgBZMVC3X3d7YYp2gf31MfxhUoYUNwf1ERPJOnQc0wkFn9trqI6ZEdZuA==} - - '@nodelib/fs.scandir@2.1.5': - resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} - engines: {node: '>= 8'} - - '@nodelib/fs.stat@2.0.5': - resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} - engines: {node: '>= 8'} - - '@nodelib/fs.walk@1.2.8': - resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} - engines: {node: '>= 8'} - - '@pkgjs/parseargs@0.11.0': - resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} - engines: {node: '>=14'} - - '@polka/url@1.0.0-next.28': - resolution: {integrity: sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==} - - '@rollup/pluginutils@5.1.3': - resolution: {integrity: sha512-Pnsb6f32CD2W3uCaLZIzDmeFyQ2b8UWMFI7xtwUezpcGBDVDW6y9XgAWIlARiGAo6eNF5FK5aQTr0LFyNyqq5A==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - - '@rollup/rollup-android-arm-eabi@4.24.4': - resolution: {integrity: sha512-jfUJrFct/hTA0XDM5p/htWKoNNTbDLY0KRwEt6pyOA6k2fmk0WVwl65PdUdJZgzGEHWx+49LilkcSaumQRyNQw==} - cpu: [arm] - os: [android] - - '@rollup/rollup-android-arm64@4.24.4': - resolution: {integrity: sha512-j4nrEO6nHU1nZUuCfRKoCcvh7PIywQPUCBa2UsootTHvTHIoIu2BzueInGJhhvQO/2FTRdNYpf63xsgEqH9IhA==} - cpu: [arm64] - os: [android] - - '@rollup/rollup-darwin-arm64@4.24.4': - resolution: {integrity: sha512-GmU/QgGtBTeraKyldC7cDVVvAJEOr3dFLKneez/n7BvX57UdhOqDsVwzU7UOnYA7AAOt+Xb26lk79PldDHgMIQ==} - cpu: [arm64] - os: [darwin] - - '@rollup/rollup-darwin-x64@4.24.4': - resolution: {integrity: sha512-N6oDBiZCBKlwYcsEPXGDE4g9RoxZLK6vT98M8111cW7VsVJFpNEqvJeIPfsCzbf0XEakPslh72X0gnlMi4Ddgg==} - cpu: [x64] - os: [darwin] - - '@rollup/rollup-freebsd-arm64@4.24.4': - resolution: {integrity: sha512-py5oNShCCjCyjWXCZNrRGRpjWsF0ic8f4ieBNra5buQz0O/U6mMXCpC1LvrHuhJsNPgRt36tSYMidGzZiJF6mw==} - cpu: [arm64] - os: [freebsd] - - '@rollup/rollup-freebsd-x64@4.24.4': - resolution: {integrity: sha512-L7VVVW9FCnTTp4i7KrmHeDsDvjB4++KOBENYtNYAiYl96jeBThFfhP6HVxL74v4SiZEVDH/1ILscR5U9S4ms4g==} - cpu: [x64] - os: [freebsd] - - '@rollup/rollup-linux-arm-gnueabihf@4.24.4': - resolution: {integrity: sha512-10ICosOwYChROdQoQo589N5idQIisxjaFE/PAnX2i0Zr84mY0k9zul1ArH0rnJ/fpgiqfu13TFZR5A5YJLOYZA==} - cpu: [arm] - os: [linux] - - '@rollup/rollup-linux-arm-musleabihf@4.24.4': - resolution: {integrity: sha512-ySAfWs69LYC7QhRDZNKqNhz2UKN8LDfbKSMAEtoEI0jitwfAG2iZwVqGACJT+kfYvvz3/JgsLlcBP+WWoKCLcw==} - cpu: [arm] - os: [linux] - - '@rollup/rollup-linux-arm64-gnu@4.24.4': - resolution: {integrity: sha512-uHYJ0HNOI6pGEeZ/5mgm5arNVTI0nLlmrbdph+pGXpC9tFHFDQmDMOEqkmUObRfosJqpU8RliYoGz06qSdtcjg==} - cpu: [arm64] - os: [linux] - - '@rollup/rollup-linux-arm64-musl@4.24.4': - resolution: {integrity: sha512-38yiWLemQf7aLHDgTg85fh3hW9stJ0Muk7+s6tIkSUOMmi4Xbv5pH/5Bofnsb6spIwD5FJiR+jg71f0CH5OzoA==} - cpu: [arm64] - os: [linux] - - '@rollup/rollup-linux-powerpc64le-gnu@4.24.4': - resolution: {integrity: sha512-q73XUPnkwt9ZNF2xRS4fvneSuaHw2BXuV5rI4cw0fWYVIWIBeDZX7c7FWhFQPNTnE24172K30I+dViWRVD9TwA==} - cpu: [ppc64] - os: [linux] - - '@rollup/rollup-linux-riscv64-gnu@4.24.4': - resolution: {integrity: sha512-Aie/TbmQi6UXokJqDZdmTJuZBCU3QBDA8oTKRGtd4ABi/nHgXICulfg1KI6n9/koDsiDbvHAiQO3YAUNa/7BCw==} - cpu: [riscv64] - os: [linux] - - '@rollup/rollup-linux-s390x-gnu@4.24.4': - resolution: {integrity: sha512-P8MPErVO/y8ohWSP9JY7lLQ8+YMHfTI4bAdtCi3pC2hTeqFJco2jYspzOzTUB8hwUWIIu1xwOrJE11nP+0JFAQ==} - cpu: [s390x] - os: [linux] - - '@rollup/rollup-linux-x64-gnu@4.24.4': - resolution: {integrity: sha512-K03TljaaoPK5FOyNMZAAEmhlyO49LaE4qCsr0lYHUKyb6QacTNF9pnfPpXnFlFD3TXuFbFbz7tJ51FujUXkXYA==} - cpu: [x64] - os: [linux] - - '@rollup/rollup-linux-x64-musl@4.24.4': - resolution: {integrity: sha512-VJYl4xSl/wqG2D5xTYncVWW+26ICV4wubwN9Gs5NrqhJtayikwCXzPL8GDsLnaLU3WwhQ8W02IinYSFJfyo34Q==} - cpu: [x64] - os: [linux] - - '@rollup/rollup-win32-arm64-msvc@4.24.4': - resolution: {integrity: sha512-ku2GvtPwQfCqoPFIJCqZ8o7bJcj+Y54cZSr43hHca6jLwAiCbZdBUOrqE6y29QFajNAzzpIOwsckaTFmN6/8TA==} - cpu: [arm64] - os: [win32] - - '@rollup/rollup-win32-ia32-msvc@4.24.4': - resolution: {integrity: sha512-V3nCe+eTt/W6UYNr/wGvO1fLpHUrnlirlypZfKCT1fG6hWfqhPgQV/K/mRBXBpxc0eKLIF18pIOFVPh0mqHjlg==} - cpu: [ia32] - os: [win32] - - '@rollup/rollup-win32-x64-msvc@4.24.4': - resolution: {integrity: sha512-LTw1Dfd0mBIEqUVCxbvTE/LLo+9ZxVC9k99v1v4ahg9Aak6FpqOfNu5kRkeTAn0wphoC4JU7No1/rL+bBCEwhg==} - cpu: [x64] - os: [win32] - - '@rushstack/node-core-library@5.9.0': - resolution: {integrity: sha512-MMsshEWkTbXqxqFxD4gcIUWQOCeBChlGczdZbHfqmNZQFLHB3yWxDFSMHFUdu2/OB9NUk7Awn5qRL+rws4HQNg==} - peerDependencies: - '@types/node': '*' - peerDependenciesMeta: - '@types/node': - optional: true - - '@rushstack/rig-package@0.5.3': - resolution: {integrity: sha512-olzSSjYrvCNxUFZowevC3uz8gvKr3WTpHQ7BkpjtRpA3wK+T0ybep/SRUMfr195gBzJm5gaXw0ZMgjIyHqJUow==} - - '@rushstack/terminal@0.14.2': - resolution: {integrity: sha512-2fC1wqu1VCExKC0/L+0noVcFQEXEnoBOtCIex1TOjBzEDWcw8KzJjjj7aTP6mLxepG0XIyn9OufeFb6SFsa+sg==} - peerDependencies: - '@types/node': '*' - peerDependenciesMeta: - '@types/node': - optional: true - - '@rushstack/ts-command-line@4.23.0': - resolution: {integrity: sha512-jYREBtsxduPV6ptNq8jOKp9+yx0ld1Tb/Tkdnlj8gTjazl1sF3DwX2VbluyYrNd0meWIL0bNeer7WDf5tKFjaQ==} - - '@sinclair/typebox@0.27.8': - resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} - - '@ts-morph/common@0.16.0': - resolution: {integrity: sha512-SgJpzkTgZKLKqQniCjLaE3c2L2sdL7UShvmTmPBejAKd2OKV/yfMpQ2IWpAuA+VY5wy7PkSUaEObIqEK6afFuw==} - - '@types/argparse@1.0.38': - resolution: {integrity: sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA==} - - '@types/diff@5.2.3': - resolution: {integrity: sha512-K0Oqlrq3kQMaO2RhfrNQX5trmt+XLyom88zS0u84nnIcLvFnRUMRRHmrGny5GSM+kNO9IZLARsdQHDzkhAgmrQ==} - - '@types/eslint@9.6.1': - resolution: {integrity: sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==} - - '@types/eslint__js@8.42.3': - resolution: {integrity: sha512-alfG737uhmPdnvkrLdZLcEKJ/B8s9Y4hrZ+YAdzUeoArBlSUERA2E87ROfOaS4jd/C45fzOoZzidLc1IPwLqOw==} - - '@types/estree@1.0.6': - resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} - - '@types/json-schema@7.0.15': - resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} - - '@types/node@22.9.0': - resolution: {integrity: sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ==} - - '@types/strip-bom@3.0.0': - resolution: {integrity: sha512-xevGOReSYGM7g/kUBZzPqCrR/KYAo+F0yiPc85WFTJa0MSLtyFTVTU6cJu/aV4mid7IffDIWqo69THF2o4JiEQ==} - - '@types/strip-json-comments@0.0.30': - resolution: {integrity: sha512-7NQmHra/JILCd1QqpSzl8+mJRc8ZHz3uDm8YV1Ks9IhK0epEiTw8aIErbvH9PI+6XbqhyIQy3462nEsn7UVzjQ==} - - '@types/yargs-parser@21.0.3': - resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} - - '@types/yargs@17.0.33': - resolution: {integrity: sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==} - - '@typescript-eslint/eslint-plugin@8.13.0': - resolution: {integrity: sha512-nQtBLiZYMUPkclSeC3id+x4uVd1SGtHuElTxL++SfP47jR0zfkZBJHc+gL4qPsgTuypz0k8Y2GheaDYn6Gy3rg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 - eslint: ^8.57.0 || ^9.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@typescript-eslint/parser@6.21.0': - resolution: {integrity: sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==} - engines: {node: ^16.0.0 || >=18.0.0} - peerDependencies: - eslint: ^7.0.0 || ^8.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@typescript-eslint/parser@8.13.0': - resolution: {integrity: sha512-w0xp+xGg8u/nONcGw1UXAr6cjCPU1w0XVyBs6Zqaj5eLmxkKQAByTdV/uGgNN5tVvN/kKpoQlP2cL7R+ajZZIQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@typescript-eslint/scope-manager@6.21.0': - resolution: {integrity: sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==} - engines: {node: ^16.0.0 || >=18.0.0} - - '@typescript-eslint/scope-manager@8.13.0': - resolution: {integrity: sha512-XsGWww0odcUT0gJoBZ1DeulY1+jkaHUciUq4jKNv4cpInbvvrtDoyBH9rE/n2V29wQJPk8iCH1wipra9BhmiMA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@typescript-eslint/type-utils@8.13.0': - resolution: {integrity: sha512-Rqnn6xXTR316fP4D2pohZenJnp+NwQ1mo7/JM+J1LWZENSLkJI8ID8QNtlvFeb0HnFSK94D6q0cnMX6SbE5/vA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@typescript-eslint/types@6.21.0': - resolution: {integrity: sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==} - engines: {node: ^16.0.0 || >=18.0.0} - - '@typescript-eslint/types@8.13.0': - resolution: {integrity: sha512-4cyFErJetFLckcThRUFdReWJjVsPCqyBlJTi6IDEpc1GWCIIZRFxVppjWLIMcQhNGhdWJJRYFHpHoDWvMlDzng==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@typescript-eslint/typescript-estree@6.21.0': - resolution: {integrity: sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==} - engines: {node: ^16.0.0 || >=18.0.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@typescript-eslint/typescript-estree@8.13.0': - resolution: {integrity: sha512-v7SCIGmVsRK2Cy/LTLGN22uea6SaUIlpBcO/gnMGT/7zPtxp90bphcGf4fyrCQl3ZtiBKqVTG32hb668oIYy1g==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@typescript-eslint/utils@8.13.0': - resolution: {integrity: sha512-A1EeYOND6Uv250nybnLZapeXpYMl8tkzYUxqmoKAWnI4sei3ihf2XdZVd+vVOmHGcp3t+P7yRrNsyyiXTvShFQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - - '@typescript-eslint/visitor-keys@6.21.0': - resolution: {integrity: sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==} - engines: {node: ^16.0.0 || >=18.0.0} - - '@typescript-eslint/visitor-keys@8.13.0': - resolution: {integrity: sha512-7N/+lztJqH4Mrf0lb10R/CbI1EaAMMGyF5y0oJvFoAhafwgiRA7TXyd8TFn8FC8k5y2dTsYogg238qavRGNnlw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@ungap/structured-clone@1.2.0': - resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} - - '@vitest/expect@2.1.4': - resolution: {integrity: sha512-DOETT0Oh1avie/D/o2sgMHGrzYUFFo3zqESB2Hn70z6QB1HrS2IQ9z5DfyTqU8sg4Bpu13zZe9V4+UTNQlUeQA==} - - '@vitest/mocker@2.1.4': - resolution: {integrity: sha512-Ky/O1Lc0QBbutJdW0rqLeFNbuLEyS+mIPiNdlVlp2/yhJ0SbyYqObS5IHdhferJud8MbbwMnexg4jordE5cCoQ==} - peerDependencies: - msw: ^2.4.9 - vite: ^5.0.0 - peerDependenciesMeta: - msw: - optional: true - vite: - optional: true - - '@vitest/pretty-format@2.1.4': - resolution: {integrity: sha512-L95zIAkEuTDbUX1IsjRl+vyBSLh3PwLLgKpghl37aCK9Jvw0iP+wKwIFhfjdUtA2myLgjrG6VU6JCFLv8q/3Ww==} - - '@vitest/runner@2.1.4': - resolution: {integrity: sha512-sKRautINI9XICAMl2bjxQM8VfCMTB0EbsBc/EDFA57V6UQevEKY/TOPOF5nzcvCALltiLfXWbq4MaAwWx/YxIA==} - - '@vitest/snapshot@2.1.4': - resolution: {integrity: sha512-3Kab14fn/5QZRog5BPj6Rs8dc4B+mim27XaKWFWHWA87R56AKjHTGcBFKpvZKDzC4u5Wd0w/qKsUIio3KzWW4Q==} - - '@vitest/spy@2.1.4': - resolution: {integrity: sha512-4JOxa+UAizJgpZfaCPKK2smq9d8mmjZVPMt2kOsg/R8QkoRzydHH1qHxIYNvr1zlEaFj4SXiaaJWxq/LPLKaLg==} - - '@vitest/ui@2.1.4': - resolution: {integrity: sha512-Zd9e5oU063c+j9N9XzGJagCLNvG71x/2tOme3Js4JEZKX55zsgxhJwUgLI8hkN6NjMLpdJO8d7nVUUuPGAA58Q==} - peerDependencies: - vitest: 2.1.4 - - '@vitest/utils@2.1.4': - resolution: {integrity: sha512-MXDnZn0Awl2S86PSNIim5PWXgIAx8CIkzu35mBdSApUip6RFOGXBCf3YFyeEu8n1IHk4bWD46DeYFu9mQlFIRg==} - - '@volar/language-core@2.4.8': - resolution: {integrity: sha512-K/GxMOXGq997bO00cdFhTNuR85xPxj0BEEAy+BaqqayTmy9Tmhfgmq2wpJcVspRhcwfgPoE2/mEJa26emUhG/g==} - - '@volar/source-map@2.4.8': - resolution: {integrity: sha512-jeWJBkC/WivdelMwxKkpFL811uH/jJ1kVxa+c7OvG48DXc3VrP7pplSWPP2W1dLMqBxD+awRlg55FQQfiup4cA==} - - '@volar/typescript@2.4.8': - resolution: {integrity: sha512-6xkIYJ5xxghVBhVywMoPMidDDAFT1OoQeXwa27HSgJ6AiIKRe61RXLoik+14Z7r0JvnblXVsjsRLmCr42SGzqg==} - - '@vue/compiler-core@3.5.12': - resolution: {integrity: sha512-ISyBTRMmMYagUxhcpyEH0hpXRd/KqDU4ymofPgl2XAkY9ZhQ+h0ovEZJIiPop13UmR/54oA2cgMDjgroRelaEw==} - - '@vue/compiler-dom@3.5.12': - resolution: {integrity: sha512-9G6PbJ03uwxLHKQ3P42cMTi85lDRvGLB2rSGOiQqtXELat6uI4n8cNz9yjfVHRPIu+MsK6TE418Giruvgptckg==} - - '@vue/compiler-vue2@2.7.16': - resolution: {integrity: sha512-qYC3Psj9S/mfu9uVi5WvNZIzq+xnXMhOwbTFKKDD7b1lhpnn71jXSFdTQ+WsIEk0ONCd7VV2IMm7ONl6tbQ86A==} - - '@vue/language-core@2.1.6': - resolution: {integrity: sha512-MW569cSky9R/ooKMh6xa2g1D0AtRKbL56k83dzus/bx//RDJk24RHWkMzbAlXjMdDNyxAaagKPRquBIxkxlCkg==} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@vue/shared@3.5.12': - resolution: {integrity: sha512-L2RPSAwUFbgZH20etwrXyVyCBu9OxRSi8T/38QsvnkJyvq2LufW2lDCOzm7t/U9C1mkhJGWYfCuFBCmIuNivrg==} - - acorn-jsx@5.3.2: - resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} - peerDependencies: - acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - - acorn@8.14.0: - resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} - engines: {node: '>=0.4.0'} - hasBin: true - - ajv-draft-04@1.0.0: - resolution: {integrity: sha512-mv00Te6nmYbRp5DCwclxtt7yV/joXJPGS7nM+97GdxvuttCOfgI3K4U25zboyeX0O+myI8ERluxQe5wljMmVIw==} - peerDependencies: - ajv: ^8.5.0 - peerDependenciesMeta: - ajv: - optional: true - - ajv-formats@3.0.1: - resolution: {integrity: sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==} - peerDependencies: - ajv: ^8.0.0 - peerDependenciesMeta: - ajv: - optional: true - - ajv@6.12.6: - resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} - - ajv@8.12.0: - resolution: {integrity: sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==} - - ajv@8.13.0: - resolution: {integrity: sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA==} - - ansi-regex@2.1.1: - resolution: {integrity: sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==} - engines: {node: '>=0.10.0'} - - ansi-regex@5.0.1: - resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} - engines: {node: '>=8'} - - ansi-regex@6.0.1: - resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==} - engines: {node: '>=12'} - - ansi-styles@2.2.1: - resolution: {integrity: sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==} - engines: {node: '>=0.10.0'} - - ansi-styles@3.2.1: - resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} - engines: {node: '>=4'} - - ansi-styles@4.3.0: - resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} - engines: {node: '>=8'} - - ansi-styles@5.2.0: - resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} - engines: {node: '>=10'} - - ansi-styles@6.2.1: - resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} - engines: {node: '>=12'} - - argparse@1.0.10: - resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} - - argparse@2.0.1: - resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - - array-buffer-byte-length@1.0.1: - resolution: {integrity: sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==} - engines: {node: '>= 0.4'} - - array-union@2.1.0: - resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} - engines: {node: '>=8'} - - arraybuffer.prototype.slice@1.0.3: - resolution: {integrity: sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==} - engines: {node: '>= 0.4'} - - arrify@2.0.1: - resolution: {integrity: sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==} - engines: {node: '>=8'} - - assertion-error@2.0.1: - resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} - engines: {node: '>=12'} - - available-typed-arrays@1.0.7: - resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} - engines: {node: '>= 0.4'} - - balanced-match@1.0.2: - resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - - base64-js@1.5.1: - resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} - - berry-pretty@0.0.5: - resolution: {integrity: sha512-qxHrpEhESFm+2sd/M7beQiPkR3KSBLu5vvcgYuIedhkCtJSnVQhAPKQ1y0nHMf1Pm6fYdWGWQCyp4E0Oe8CEIQ==} - - boolify@1.0.1: - resolution: {integrity: sha512-ma2q0Tc760dW54CdOyJjhrg/a54317o1zYADQJFgperNGKIKgAUGIcKnuMiff8z57+yGlrGNEt4lPgZfCgTJgA==} - - brace-expansion@1.1.11: - resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} - - brace-expansion@2.0.1: - resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} - - braces@3.0.3: - resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} - engines: {node: '>=8'} - - brotli@1.3.3: - resolution: {integrity: sha512-oTKjJdShmDuGW94SyyaoQvAjf30dZaHnjJ8uAF+u2/vGJkJbJPJAT1gDiOJP5v1Zb6f9KEyW/1HpuaWIXtGHPg==} - - buffer-from@1.1.2: - resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} - - cac@6.7.14: - resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} - engines: {node: '>=8'} - - call-bind@1.0.7: - resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} - engines: {node: '>= 0.4'} - - callsites@3.1.0: - resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} - engines: {node: '>=6'} - - camelcase-keys@9.1.3: - resolution: {integrity: sha512-Rircqi9ch8AnZscQcsA1C47NFdaO3wukpmIRzYcDOrmvgt78hM/sj5pZhZNec2NM12uk5vTwRHZ4anGcrC4ZTg==} - engines: {node: '>=16'} - - camelcase@8.0.0: - resolution: {integrity: sha512-8WB3Jcas3swSvjIeA2yvCJ+Miyz5l1ZmB6HFb9R1317dt9LCQoswg/BGrmAmkWVEszSrrg4RwmO46qIm2OEnSA==} - engines: {node: '>=16'} - - chai@5.1.2: - resolution: {integrity: sha512-aGtmf24DW6MLHHG5gCx4zaI3uBq3KRtxeVs0DjFH6Z0rDNbsvTxFASFvdj79pxjxZ8/5u3PIiN3IwEIQkiiuPw==} - engines: {node: '>=12'} - - chalk@1.1.3: - resolution: {integrity: sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==} - engines: {node: '>=0.10.0'} - - chalk@2.4.2: - resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} - engines: {node: '>=4'} - - chalk@4.1.2: - resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} - engines: {node: '>=10'} - - check-error@2.1.1: - resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==} - engines: {node: '>= 16'} - - cliui@8.0.1: - resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} - engines: {node: '>=12'} - - code-block-writer@11.0.3: - resolution: {integrity: sha512-NiujjUFB4SwScJq2bwbYUtXbZhBSlY6vYzm++3Q6oC+U+injTqfPYFK8wS9COOmb2lueqp0ZRB4nK1VYeHgNyw==} - - color-convert@1.9.3: - resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} - - color-convert@2.0.1: - resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} - engines: {node: '>=7.0.0'} - - color-name@1.1.3: - resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} - - color-name@1.1.4: - resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - - commander@2.20.3: - resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} - - common-tags@1.8.2: - resolution: {integrity: sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==} - engines: {node: '>=4.0.0'} - - compare-versions@6.1.1: - resolution: {integrity: sha512-4hm4VPpIecmlg59CHXnRDnqGplJFrbLG4aFEl5vl6cK1u76ws3LLvX7ikFnTDl5vo39sjWD6AaDPYodJp/NNHg==} - - computeds@0.0.1: - resolution: {integrity: sha512-7CEBgcMjVmitjYo5q8JTJVra6X5mQ20uTThdK+0kR7UEaDrAWEQcRiBtWJzga4eRpP6afNwwLsX2SET2JhVB1Q==} - - concat-map@0.0.1: - resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} - - confbox@0.1.8: - resolution: {integrity: sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==} - - core-js@3.38.1: - resolution: {integrity: sha512-OP35aUorbU3Zvlx7pjsFdu1rGNnD4pgw/CWoYzRY3t2EzoVT7shKHY1dlAy3f41cGIO7ZDPQimhGFTlEYkG/Hw==} - - cross-spawn@6.0.5: - resolution: {integrity: sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==} - engines: {node: '>=4.8'} - - cross-spawn@7.0.3: - resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} - engines: {node: '>= 8'} - - data-view-buffer@1.0.1: - resolution: {integrity: sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==} - engines: {node: '>= 0.4'} - - data-view-byte-length@1.0.1: - resolution: {integrity: sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==} - engines: {node: '>= 0.4'} - - data-view-byte-offset@1.0.0: - resolution: {integrity: sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==} - engines: {node: '>= 0.4'} - - de-indent@1.0.2: - resolution: {integrity: sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==} - - debug@4.3.7: - resolution: {integrity: sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - - deep-eql@5.0.2: - resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==} - engines: {node: '>=6'} - - deep-is@0.1.4: - resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} - - define-data-property@1.1.4: - resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} - engines: {node: '>= 0.4'} - - define-lazy-prop@2.0.0: - resolution: {integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==} - engines: {node: '>=8'} - - define-properties@1.2.1: - resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} - engines: {node: '>= 0.4'} - - diff@5.2.0: - resolution: {integrity: sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==} - engines: {node: '>=0.3.1'} - - dir-glob@3.0.1: - resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} - engines: {node: '>=8'} - - dlv@1.1.3: - resolution: {integrity: sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==} - - doctrine@3.0.0: - resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} - engines: {node: '>=6.0.0'} - - eastasianwidth@0.2.0: - resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} - - editorconfig@0.15.3: - resolution: {integrity: sha512-M9wIMFx96vq0R4F+gRpY3o2exzb8hEj/n9S8unZtHSvYjibBp/iMufSzvmOcV/laG0ZtuTVGtiJggPOSW2r93g==} - hasBin: true - - emoji-regex@8.0.0: - resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} - - emoji-regex@9.2.2: - resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} - - entities@4.5.0: - resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} - engines: {node: '>=0.12'} - - error-ex@1.3.2: - resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} - - es-abstract@1.23.3: - resolution: {integrity: sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==} - engines: {node: '>= 0.4'} - - es-define-property@1.0.0: - resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} - engines: {node: '>= 0.4'} - - es-errors@1.3.0: - resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} - engines: {node: '>= 0.4'} - - es-object-atoms@1.0.0: - resolution: {integrity: sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==} - engines: {node: '>= 0.4'} - - es-set-tostringtag@2.0.3: - resolution: {integrity: sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==} - engines: {node: '>= 0.4'} - - es-to-primitive@1.2.1: - resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} - engines: {node: '>= 0.4'} - - esbuild@0.21.5: - resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==} - engines: {node: '>=12'} - hasBin: true - - esbuild@0.23.1: - resolution: {integrity: sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==} - engines: {node: '>=18'} - hasBin: true - - esbuild@0.24.0: - resolution: {integrity: sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ==} - engines: {node: '>=18'} - hasBin: true - - escalade@3.2.0: - resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} - engines: {node: '>=6'} - - escape-string-regexp@1.0.5: - resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} - engines: {node: '>=0.8.0'} - - escape-string-regexp@4.0.0: - resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} - engines: {node: '>=10'} - - eslint-config-prettier@9.1.0: - resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} - hasBin: true - peerDependencies: - eslint: '>=7.0.0' - - eslint-scope@7.2.2: - resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - - eslint-scope@8.2.0: - resolution: {integrity: sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - eslint-visitor-keys@3.4.3: - resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - - eslint-visitor-keys@4.2.0: - resolution: {integrity: sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - eslint@8.57.1: - resolution: {integrity: sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. - hasBin: true - - eslint@9.14.0: - resolution: {integrity: sha512-c2FHsVBr87lnUtjP4Yhvk4yEhKrQavGafRA/Se1ouse8PfbfC/Qh9Mxa00yWsZRlqeUB9raXip0aiiUZkgnr9g==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - hasBin: true - peerDependencies: - jiti: '*' - peerDependenciesMeta: - jiti: - optional: true - - espree@10.3.0: - resolution: {integrity: sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - espree@9.6.1: - resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - - esquery@1.6.0: - resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} - engines: {node: '>=0.10'} - - esrecurse@4.3.0: - resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} - engines: {node: '>=4.0'} - - estraverse@5.3.0: - resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} - engines: {node: '>=4.0'} - - estree-walker@2.0.2: - resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} - - estree-walker@3.0.3: - resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} - - esutils@2.0.3: - resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} - engines: {node: '>=0.10.0'} - - expect-type@1.1.0: - resolution: {integrity: sha512-bFi65yM+xZgk+u/KRIpekdSYkTB5W1pEf0Lt8Q8Msh7b+eQ7LXVtIB1Bkm4fvclDEL1b2CZkMhv2mOeF8tMdkA==} - engines: {node: '>=12.0.0'} - - fast-deep-equal@3.1.3: - resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} - - fast-glob@3.3.2: - resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} - engines: {node: '>=8.6.0'} - - fast-json-stable-stringify@2.1.0: - resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} - - fast-levenshtein@2.0.6: - resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} - - fastq@1.17.1: - resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} - - fdir@6.4.2: - resolution: {integrity: sha512-KnhMXsKSPZlAhp7+IjUkRZKPb4fUyccpDrdFXbi4QL1qkmFh9kVY09Yox+n4MaOb3lHZ1Tv829C3oaaXoMYPDQ==} - peerDependencies: - picomatch: ^3 || ^4 - peerDependenciesMeta: - picomatch: - optional: true - - fflate@0.8.2: - resolution: {integrity: sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==} - - file-entry-cache@6.0.1: - resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} - engines: {node: ^10.12.0 || >=12.0.0} - - file-entry-cache@8.0.0: - resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} - engines: {node: '>=16.0.0'} - - fill-range@7.1.1: - resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} - engines: {node: '>=8'} - - find-up@5.0.0: - resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} - engines: {node: '>=10'} - - flat-cache@3.2.0: - resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} - engines: {node: ^10.12.0 || >=12.0.0} - - flat-cache@4.0.1: - resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} - engines: {node: '>=16'} - - flatted@3.3.1: - resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} - - for-each@0.3.3: - resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} - - foreground-child@3.3.0: - resolution: {integrity: sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==} - engines: {node: '>=14'} - - fs-extra@7.0.1: - resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} - engines: {node: '>=6 <7 || >=8'} - - fs.realpath@1.0.0: - resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} - - fsevents@2.3.3: - resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} - engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} - os: [darwin] - - function-bind@1.1.2: - resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} - - function.prototype.name@1.1.6: - resolution: {integrity: sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==} - engines: {node: '>= 0.4'} - - functions-have-names@1.2.3: - resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} - - get-caller-file@2.0.5: - resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} - engines: {node: 6.* || 8.* || >= 10.*} - - get-intrinsic@1.2.4: - resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} - engines: {node: '>= 0.4'} - - get-stdin@8.0.0: - resolution: {integrity: sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==} - engines: {node: '>=10'} - - get-symbol-description@1.0.2: - resolution: {integrity: sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==} - engines: {node: '>= 0.4'} - - get-tsconfig@4.8.1: - resolution: {integrity: sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==} - - glob-parent@5.1.2: - resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} - engines: {node: '>= 6'} - - glob-parent@6.0.2: - resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} - engines: {node: '>=10.13.0'} - - glob@10.4.5: - resolution: {integrity: sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==} - hasBin: true - - glob@11.0.0: - resolution: {integrity: sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==} - engines: {node: 20 || >=22} - hasBin: true - - glob@7.2.3: - resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} - deprecated: Glob versions prior to v9 are no longer supported - - globals@13.24.0: - resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} - engines: {node: '>=8'} - - globals@14.0.0: - resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} - engines: {node: '>=18'} - - globalthis@1.0.4: - resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} - engines: {node: '>= 0.4'} - - globby@11.1.0: - resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} - engines: {node: '>=10'} - - globrex@0.1.2: - resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==} - - gopd@1.0.1: - resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} - - graceful-fs@4.2.11: - resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} - - graphemer@1.4.0: - resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} - - has-ansi@2.0.0: - resolution: {integrity: sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==} - engines: {node: '>=0.10.0'} - - has-bigints@1.0.2: - resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} - - has-flag@3.0.0: - resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} - engines: {node: '>=4'} - - has-flag@4.0.0: - resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} - engines: {node: '>=8'} - - has-property-descriptors@1.0.2: - resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} - - has-proto@1.0.3: - resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==} - engines: {node: '>= 0.4'} - - has-symbols@1.0.3: - resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} - engines: {node: '>= 0.4'} - - has-tostringtag@1.0.2: - resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} - engines: {node: '>= 0.4'} - - hasown@2.0.2: - resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} - engines: {node: '>= 0.4'} - - he@1.2.0: - resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} - hasBin: true - - hosted-git-info@2.8.9: - resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} - - ignore@5.3.2: - resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} - engines: {node: '>= 4'} - - import-fresh@3.3.0: - resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} - engines: {node: '>=6'} - - import-lazy@4.0.0: - resolution: {integrity: sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==} - engines: {node: '>=8'} - - imurmurhash@0.1.4: - resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} - engines: {node: '>=0.8.19'} - - indent-string@4.0.0: - resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} - engines: {node: '>=8'} - - inflight@1.0.6: - resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} - deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. - - inherits@2.0.4: - resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - - internal-slot@1.0.7: - resolution: {integrity: sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==} - engines: {node: '>= 0.4'} - - is-array-buffer@3.0.4: - resolution: {integrity: sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==} - engines: {node: '>= 0.4'} - - is-arrayish@0.2.1: - resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} - - is-bigint@1.0.4: - resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} - - is-boolean-object@1.1.2: - resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} - engines: {node: '>= 0.4'} - - is-callable@1.2.7: - resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} - engines: {node: '>= 0.4'} - - is-core-module@2.15.1: - resolution: {integrity: sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==} - engines: {node: '>= 0.4'} - - is-data-view@1.0.1: - resolution: {integrity: sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==} - engines: {node: '>= 0.4'} - - is-date-object@1.0.5: - resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} - engines: {node: '>= 0.4'} - - is-docker@2.2.1: - resolution: {integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==} - engines: {node: '>=8'} - hasBin: true - - is-extglob@2.1.1: - resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} - engines: {node: '>=0.10.0'} - - is-fullwidth-code-point@3.0.0: - resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} - engines: {node: '>=8'} - - is-glob@4.0.3: - resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} - engines: {node: '>=0.10.0'} - - is-negative-zero@2.0.3: - resolution: {integrity: sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==} - engines: {node: '>= 0.4'} - - is-number-object@1.0.7: - resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} - engines: {node: '>= 0.4'} - - is-number@7.0.0: - resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} - engines: {node: '>=0.12.0'} - - is-path-inside@3.0.3: - resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} - engines: {node: '>=8'} - - is-regex@1.1.4: - resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} - engines: {node: '>= 0.4'} - - is-shared-array-buffer@1.0.3: - resolution: {integrity: sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==} - engines: {node: '>= 0.4'} - - is-string@1.0.7: - resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} - engines: {node: '>= 0.4'} - - is-symbol@1.0.4: - resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} - engines: {node: '>= 0.4'} - - is-typed-array@1.1.13: - resolution: {integrity: sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==} - engines: {node: '>= 0.4'} - - is-weakref@1.0.2: - resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} - - is-wsl@2.2.0: - resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==} - engines: {node: '>=8'} - - isarray@2.0.5: - resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} - - isexe@2.0.0: - resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} - - jackspeak@3.4.3: - resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} - - jackspeak@4.0.2: - resolution: {integrity: sha512-bZsjR/iRjl1Nk1UkjGpAzLNfQtzuijhn2g+pbZb98HQ1Gk8vM9hfbxeMBP+M2/UUdwj0RqGG3mlvk2MsAqwvEw==} - engines: {node: 20 || >=22} - - jju@1.4.0: - resolution: {integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==} - - js-yaml@4.1.0: - resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} - hasBin: true - - json-buffer@3.0.1: - resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} - - json-parse-better-errors@1.0.2: - resolution: {integrity: sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==} - - json-schema-traverse@0.4.1: - resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} - - json-schema-traverse@1.0.0: - resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} - - json-stable-stringify-without-jsonify@1.0.1: - resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} - - jsonfile@4.0.0: - resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} - - keyv@4.5.4: - resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} - - kolorist@1.8.0: - resolution: {integrity: sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==} - - levn@0.4.1: - resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} - engines: {node: '>= 0.8.0'} - - load-json-file@4.0.0: - resolution: {integrity: sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==} - engines: {node: '>=4'} - - local-pkg@0.5.0: - resolution: {integrity: sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==} - engines: {node: '>=14'} - - locate-path@6.0.0: - resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} - engines: {node: '>=10'} - - lodash.memoize@4.1.2: - resolution: {integrity: sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==} - - lodash.merge@4.6.2: - resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} - - lodash@4.17.21: - resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} - - loglevel-colored-level-prefix@1.0.0: - resolution: {integrity: sha512-u45Wcxxc+SdAlh4yeF/uKlC1SPUPCy0gullSNKXod5I4bmifzk+Q4lSLExNEVn19tGaJipbZ4V4jbFn79/6mVA==} - - loglevel@1.9.1: - resolution: {integrity: sha512-hP3I3kCrDIMuRwAwHltphhDM1r8i55H33GgqjXbrisuJhF4kRhW1dNuxsRklp4bXl8DSdLaNLuiL4A/LWRfxvg==} - engines: {node: '>= 0.6.0'} - - loupe@3.1.2: - resolution: {integrity: sha512-23I4pFZHmAemUnz8WZXbYRSKYj801VDaNv9ETuMh7IrMc7VuVVSo+Z9iLE3ni30+U48iDWfi30d3twAXBYmnCg==} - - lru-cache@10.4.3: - resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} - - lru-cache@11.0.1: - resolution: {integrity: sha512-CgeuL5uom6j/ZVrg7G/+1IXqRY8JXX4Hghfy5YE0EhoYQWvndP1kufu58cmZLNIDKnRhZrXfdS9urVWx98AipQ==} - engines: {node: 20 || >=22} - - lru-cache@4.1.5: - resolution: {integrity: sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==} - - lru-cache@6.0.0: - resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} - engines: {node: '>=10'} - - magic-string@0.30.12: - resolution: {integrity: sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==} - - make-plural@7.4.0: - resolution: {integrity: sha512-4/gC9KVNTV6pvYg2gFeQYTW3mWaoJt7WZE5vrp1KnQDgW92JtYZnzmZT81oj/dUTqAIu0ufI2x3dkgu3bB1tYg==} - - map-obj@5.0.0: - resolution: {integrity: sha512-2L3MIgJynYrZ3TYMriLDLWocz15okFakV6J12HXvMXDHui2x/zgChzg1u9mFFGbbGWE+GsLpQByt4POb9Or+uA==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - - memorystream@0.3.1: - resolution: {integrity: sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==} - engines: {node: '>= 0.10.0'} - - merge2@1.4.1: - resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} - engines: {node: '>= 8'} - - micromatch@4.0.8: - resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} - engines: {node: '>=8.6'} - - minimatch@10.0.1: - resolution: {integrity: sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==} - engines: {node: 20 || >=22} - - minimatch@3.0.8: - resolution: {integrity: sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==} - - minimatch@3.1.2: - resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} - - minimatch@5.1.6: - resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} - engines: {node: '>=10'} - - minimatch@9.0.3: - resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} - engines: {node: '>=16 || 14 >=14.17'} - - minimatch@9.0.5: - resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} - engines: {node: '>=16 || 14 >=14.17'} - - minipass@7.1.2: - resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} - engines: {node: '>=16 || 14 >=14.17'} - - mkdirp@1.0.4: - resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} - engines: {node: '>=10'} - hasBin: true - - mlly@1.7.2: - resolution: {integrity: sha512-tN3dvVHYVz4DhSXinXIk7u9syPYaJvio118uomkovAtWBT+RdbP6Lfh/5Lvo519YMmwBafwlh20IPTXIStscpA==} - - moo@0.5.2: - resolution: {integrity: sha512-iSAJLHYKnX41mKcJKjqvnAN9sf0LMDTXDEvFv+ffuRR9a1MIuXLjMNL6EsnDHSkKLTWNqQQ5uo61P4EbU4NU+Q==} - - mrmime@2.0.0: - resolution: {integrity: sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==} - engines: {node: '>=10'} - - ms@2.1.3: - resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - - muggle-string@0.4.1: - resolution: {integrity: sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ==} - - nanoid@3.3.7: - resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} - engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} - hasBin: true - - natural-compare@1.4.0: - resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} - - ncp@2.0.0: - resolution: {integrity: sha512-zIdGUrPRFTUELUvr3Gmc7KZ2Sw/h1PiVM0Af/oHB6zgnV1ikqSfRk+TOufi79aHYCW3NiOXmr1BP5nWbzojLaA==} - hasBin: true - - nice-try@1.0.5: - resolution: {integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==} - - normalize-package-data@2.5.0: - resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} - - npm-run-all@4.1.5: - resolution: {integrity: sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==} - engines: {node: '>= 4'} - hasBin: true - - object-inspect@1.13.2: - resolution: {integrity: sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==} - engines: {node: '>= 0.4'} - - object-keys@1.1.1: - resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} - engines: {node: '>= 0.4'} - - object.assign@4.1.5: - resolution: {integrity: sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==} - engines: {node: '>= 0.4'} - - once@1.4.0: - resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} - - open@8.4.2: - resolution: {integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==} - engines: {node: '>=12'} - - optionator@0.9.4: - resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} - engines: {node: '>= 0.8.0'} - - organize-imports-cli@0.10.0: - resolution: {integrity: sha512-cVyNEeiDxX/zA6gdK1QS2rr3TK1VymIkT0LagnAk4f6eE0IC0bo3BeUkMzm3q3GnCJzYC+6lfuMpBE0Cequ7Vg==} - hasBin: true - - p-limit@3.1.0: - resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} - engines: {node: '>=10'} - - p-locate@5.0.0: - resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} - engines: {node: '>=10'} - - package-json-from-dist@1.0.0: - resolution: {integrity: sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==} - - package-json-from-dist@1.0.1: - resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} - - parent-module@1.0.1: - resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} - engines: {node: '>=6'} - - parse-json@4.0.0: - resolution: {integrity: sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==} - engines: {node: '>=4'} - - path-browserify@1.0.1: - resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} - - path-exists@4.0.0: - resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} - engines: {node: '>=8'} - - path-is-absolute@1.0.1: - resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} - engines: {node: '>=0.10.0'} - - path-key@2.0.1: - resolution: {integrity: sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==} - engines: {node: '>=4'} - - path-key@3.1.1: - resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} - engines: {node: '>=8'} - - path-parse@1.0.7: - resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} - - path-scurry@1.11.1: - resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} - engines: {node: '>=16 || 14 >=14.18'} - - path-scurry@2.0.0: - resolution: {integrity: sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==} - engines: {node: 20 || >=22} - - path-type@3.0.0: - resolution: {integrity: sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==} - engines: {node: '>=4'} - - path-type@4.0.0: - resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} - engines: {node: '>=8'} - - pathe@1.1.2: - resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} - - pathval@2.0.0: - resolution: {integrity: sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==} - engines: {node: '>= 14.16'} - - picocolors@1.1.1: - resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} - - picomatch@2.3.1: - resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} - engines: {node: '>=8.6'} - - picomatch@4.0.2: - resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} - engines: {node: '>=12'} - - pidtree@0.3.1: - resolution: {integrity: sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==} - engines: {node: '>=0.10'} - hasBin: true - - pify@3.0.0: - resolution: {integrity: sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==} - engines: {node: '>=4'} - - pkg-types@1.2.1: - resolution: {integrity: sha512-sQoqa8alT3nHjGuTjuKgOnvjo4cljkufdtLMnO2LBP/wRwuDlo1tkaEdMxCRhyGRPacv/ztlZgDPm2b7FAmEvw==} - - possible-typed-array-names@1.0.0: - resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} - engines: {node: '>= 0.4'} - - postcss@8.4.47: - resolution: {integrity: sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==} - engines: {node: ^10 || ^12 || >=14} - - prelude-ls@1.2.1: - resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} - engines: {node: '>= 0.8.0'} - - prettier-eslint-cli@8.0.1: - resolution: {integrity: sha512-jru4JUDHzWEtM/SOxqagU7hQTVP8BVrxO2J0qNauWZuPRld6Ea2eyNaEzIGx6I+yjmOLCsjNM+vU1AJgaW1ZSQ==} - engines: {node: '>=16.10.0'} - hasBin: true - peerDependencies: - prettier-eslint: '*' - peerDependenciesMeta: - prettier-eslint: - optional: true - - prettier-eslint@16.3.0: - resolution: {integrity: sha512-Lh102TIFCr11PJKUMQ2kwNmxGhTsv/KzUg9QYF2Gkw259g/kPgndZDWavk7/ycbRvj2oz4BPZ1gCU8bhfZH/Xg==} - engines: {node: '>=16.10.0'} - peerDependencies: - prettier-plugin-svelte: ^3.0.0 - svelte-eslint-parser: '*' - peerDependenciesMeta: - prettier-plugin-svelte: - optional: true - svelte-eslint-parser: - optional: true - - prettier@3.3.3: - resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==} - engines: {node: '>=14'} - hasBin: true - - pretty-format@29.7.0: - resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - - pseudomap@1.0.2: - resolution: {integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==} - - punycode@2.3.1: - resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} - engines: {node: '>=6'} - - queue-microtask@1.2.3: - resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} - - quick-lru@6.1.2: - resolution: {integrity: sha512-AAFUA5O1d83pIHEhJwWCq/RQcRukCkn/NSm2QsTEMle5f2hP0ChI2+3Xb051PZCkLryI/Ir1MVKviT2FIloaTQ==} - engines: {node: '>=12'} - - react-is@18.3.1: - resolution: {integrity: sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==} - - read-pkg@3.0.0: - resolution: {integrity: sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==} - engines: {node: '>=4'} - - regexp.prototype.flags@1.5.3: - resolution: {integrity: sha512-vqlC04+RQoFalODCbCumG2xIOvapzVMHwsyIGM/SIE8fRhFFsXeH8/QQ+s0T0kDAhKc4k30s73/0ydkHQz6HlQ==} - engines: {node: '>= 0.4'} - - require-directory@2.1.1: - resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} - engines: {node: '>=0.10.0'} - - require-from-string@2.0.2: - resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} - engines: {node: '>=0.10.0'} - - require-relative@0.8.7: - resolution: {integrity: sha512-AKGr4qvHiryxRb19m3PsLRGuKVAbJLUD7E6eOaHkfKhwc+vSgVOCY5xNvm9EkolBKTOf0GrQAZKLimOCz81Khg==} - - resolve-from@4.0.0: - resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} - engines: {node: '>=4'} - - resolve-pkg-maps@1.0.0: - resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} - - resolve@1.22.8: - resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} - hasBin: true - - reusify@1.0.4: - resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} - engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - - rimraf@3.0.2: - resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} - deprecated: Rimraf versions prior to v4 are no longer supported - hasBin: true - - rimraf@6.0.1: - resolution: {integrity: sha512-9dkvaxAsk/xNXSJzMgFqqMCuFgt2+KsOFek3TMLfo8NCPfWpBmqwyNn5Y+NX56QUYfCtsyhF3ayiboEoUmJk/A==} - engines: {node: 20 || >=22} - hasBin: true - - rollup-plugin-visualizer@5.12.0: - resolution: {integrity: sha512-8/NU9jXcHRs7Nnj07PF2o4gjxmm9lXIrZ8r175bT9dK8qoLlvKTwRMArRCMgpMGlq8CTLugRvEmyMeMXIU2pNQ==} - engines: {node: '>=14'} - hasBin: true - peerDependencies: - rollup: 2.x || 3.x || 4.x - peerDependenciesMeta: - rollup: - optional: true - - rollup@4.24.4: - resolution: {integrity: sha512-vGorVWIsWfX3xbcyAS+I047kFKapHYivmkaT63Smj77XwvLSJos6M1xGqZnBPFQFBRZDOcG1QnYEIxAvTr/HjA==} - engines: {node: '>=18.0.0', npm: '>=8.0.0'} - hasBin: true - - run-parallel@1.2.0: - resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} - - rxjs@7.8.1: - resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} - - safe-array-concat@1.1.2: - resolution: {integrity: sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==} - engines: {node: '>=0.4'} - - safe-identifier@0.4.2: - resolution: {integrity: sha512-6pNbSMW6OhAi9j+N8V+U715yBQsaWJ7eyEUaOrawX+isg5ZxhUlV1NipNtgaKHmFGiABwt+ZF04Ii+3Xjkg+8w==} - - safe-regex-test@1.0.3: - resolution: {integrity: sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==} - engines: {node: '>= 0.4'} - - semver@5.7.2: - resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} - hasBin: true - - semver@7.5.4: - resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} - engines: {node: '>=10'} - hasBin: true - - semver@7.6.3: - resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} - engines: {node: '>=10'} - hasBin: true - - set-function-length@1.2.2: - resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} - engines: {node: '>= 0.4'} - - set-function-name@2.0.2: - resolution: {integrity: sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==} - engines: {node: '>= 0.4'} - - shebang-command@1.2.0: - resolution: {integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==} - engines: {node: '>=0.10.0'} - - shebang-command@2.0.0: - resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} - engines: {node: '>=8'} - - shebang-regex@1.0.0: - resolution: {integrity: sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==} - engines: {node: '>=0.10.0'} - - shebang-regex@3.0.0: - resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} - engines: {node: '>=8'} - - shell-quote@1.8.1: - resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==} - - side-channel@1.0.6: - resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} - engines: {node: '>= 0.4'} - - siginfo@2.0.0: - resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} - - sigmund@1.0.1: - resolution: {integrity: sha512-fCvEXfh6NWpm+YSuY2bpXb/VIihqWA6hLsgboC+0nl71Q7N7o2eaCW8mJa/NLvQhs6jpd3VZV4UiUQlV6+lc8g==} - - signal-exit@4.1.0: - resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} - engines: {node: '>=14'} - - sirv@3.0.0: - resolution: {integrity: sha512-BPwJGUeDaDCHihkORDchNyyTvWFhcusy1XMmhEVTQTwGeybFbp8YEmB+njbPnth1FibULBSBVwCQni25XlCUDg==} - engines: {node: '>=18'} - - slash@3.0.0: - resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} - engines: {node: '>=8'} - - source-map-js@1.2.1: - resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} - engines: {node: '>=0.10.0'} - - source-map-support@0.5.21: - resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} - - source-map@0.6.1: - resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} - engines: {node: '>=0.10.0'} - - source-map@0.7.4: - resolution: {integrity: sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==} - engines: {node: '>= 8'} - - spdx-correct@3.2.0: - resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==} - - spdx-exceptions@2.5.0: - resolution: {integrity: sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==} - - spdx-expression-parse@3.0.1: - resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} - - spdx-license-ids@3.0.20: - resolution: {integrity: sha512-jg25NiDV/1fLtSgEgyvVyDunvaNHbuwF9lfNV17gSmPFAlYzdfNBlLtLzXTevwkPj7DhGbmN9VnmJIgLnhvaBw==} - - sprintf-js@1.0.3: - resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} - - stackback@0.0.2: - resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} - - std-env@3.7.0: - resolution: {integrity: sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==} - - string-argv@0.3.2: - resolution: {integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==} - engines: {node: '>=0.6.19'} - - string-width@4.2.3: - resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} - engines: {node: '>=8'} - - string-width@5.1.2: - resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} - engines: {node: '>=12'} - - string.prototype.padend@3.1.6: - resolution: {integrity: sha512-XZpspuSB7vJWhvJc9DLSlrXl1mcA2BdoY5jjnS135ydXqLoqhs96JjDtCkjJEQHvfqZIp9hBuBMgI589peyx9Q==} - engines: {node: '>= 0.4'} - - string.prototype.trim@1.2.9: - resolution: {integrity: sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==} - engines: {node: '>= 0.4'} - - string.prototype.trimend@1.0.8: - resolution: {integrity: sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==} - - string.prototype.trimstart@1.0.8: - resolution: {integrity: sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==} - engines: {node: '>= 0.4'} - - strip-ansi@3.0.1: - resolution: {integrity: sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==} - engines: {node: '>=0.10.0'} - - strip-ansi@6.0.1: - resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} - engines: {node: '>=8'} - - strip-ansi@7.1.0: - resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} - engines: {node: '>=12'} - - strip-bom@3.0.0: - resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} - engines: {node: '>=4'} - - strip-json-comments@2.0.1: - resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} - engines: {node: '>=0.10.0'} - - strip-json-comments@3.1.1: - resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} - engines: {node: '>=8'} - - supports-color@2.0.0: - resolution: {integrity: sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==} - engines: {node: '>=0.8.0'} - - supports-color@5.5.0: - resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} - engines: {node: '>=4'} - - supports-color@7.2.0: - resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} - engines: {node: '>=8'} - - supports-color@8.1.1: - resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} - engines: {node: '>=10'} - - supports-preserve-symlinks-flag@1.0.0: - resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} - engines: {node: '>= 0.4'} - - terser@5.36.0: - resolution: {integrity: sha512-IYV9eNMuFAV4THUspIRXkLakHnV6XO7FEdtKjf/mDyrnqUg9LnlOn6/RwRvM9SZjR4GUq8Nk8zj67FzVARr74w==} - engines: {node: '>=10'} - hasBin: true - - text-table@0.2.0: - resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} - - tinybench@2.9.0: - resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} - - tinyexec@0.3.1: - resolution: {integrity: sha512-WiCJLEECkO18gwqIp6+hJg0//p23HXp4S+gGtAKu3mI2F2/sXC4FvHvXvB0zJVVaTPhx1/tOwdbRsa1sOBIKqQ==} - - tinyglobby@0.2.10: - resolution: {integrity: sha512-Zc+8eJlFMvgatPZTl6A9L/yht8QqdmUNtURHaKZLmKBE12hNPSrqNkUp2cs3M/UKmNVVAMFQYSjYIVHDjW5zew==} - engines: {node: '>=12.0.0'} - - tinypool@1.0.1: - resolution: {integrity: sha512-URZYihUbRPcGv95En+sz6MfghfIc2OJ1sv/RmhWZLouPY0/8Vo80viwPvg3dlaS9fuq7fQMEfgRRK7BBZThBEA==} - engines: {node: ^18.0.0 || >=20.0.0} - - tinyrainbow@1.2.0: - resolution: {integrity: sha512-weEDEq7Z5eTHPDh4xjX789+fHfF+P8boiFB+0vbWzpbnbsEr/GRaohi/uMKxg8RZMXnl1ItAi/IUHWMsjDV7kQ==} - engines: {node: '>=14.0.0'} - - tinyspy@3.0.2: - resolution: {integrity: sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==} - engines: {node: '>=14.0.0'} - - to-regex-range@5.0.1: - resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} - engines: {node: '>=8.0'} - - totalist@3.0.1: - resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==} - engines: {node: '>=6'} - - ts-api-utils@1.4.0: - resolution: {integrity: sha512-032cPxaEKwM+GT3vA5JXNzIaizx388rhsSW79vGRNGXfRRAdEAn2mvk36PvK5HnOchyWZ7afLEXqYCvPCrzuzQ==} - engines: {node: '>=16'} - peerDependencies: - typescript: '>=4.2.0' - - ts-morph@15.1.0: - resolution: {integrity: sha512-RBsGE2sDzUXFTnv8Ba22QfeuKbgvAGJFuTN7HfmIRUkgT/NaVLfDM/8OFm2NlFkGlWEXdpW5OaFIp1jvqdDuOg==} - - tsconfck@3.1.4: - resolution: {integrity: sha512-kdqWFGVJqe+KGYvlSO9NIaWn9jT1Ny4oKVzAJsKii5eoE9snzTJzL4+MMVOMn+fikWGFmKEylcXL710V/kIPJQ==} - engines: {node: ^18 || >=20} - hasBin: true - peerDependencies: - typescript: ^5.0.0 - peerDependenciesMeta: - typescript: - optional: true - - tsconfig@7.0.0: - resolution: {integrity: sha512-vZXmzPrL+EmC4T/4rVlT2jNVMWCi/O4DIiSj3UHg1OE5kCKbk4mfrXc6dZksLgRM/TZlKnousKH9bbTazUWRRw==} - - tslib@2.6.3: - resolution: {integrity: sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==} - - tsx@4.19.2: - resolution: {integrity: sha512-pOUl6Vo2LUq/bSa8S5q7b91cgNSjctn9ugq/+Mvow99qW6x/UZYwzxy/3NmqoT66eHYfCVvFvACC58UBPFf28g==} - engines: {node: '>=18.0.0'} - hasBin: true - - type-check@0.4.0: - resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} - engines: {node: '>= 0.8.0'} - - type-fest@0.20.2: - resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} - engines: {node: '>=10'} - - type-fest@4.25.0: - resolution: {integrity: sha512-bRkIGlXsnGBRBQRAY56UXBm//9qH4bmJfFvq83gSz41N282df+fjy8ofcEgc1sM8geNt5cl6mC2g9Fht1cs8Aw==} - engines: {node: '>=16'} - - typed-array-buffer@1.0.2: - resolution: {integrity: sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==} - engines: {node: '>= 0.4'} - - typed-array-byte-length@1.0.1: - resolution: {integrity: sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==} - engines: {node: '>= 0.4'} - - typed-array-byte-offset@1.0.2: - resolution: {integrity: sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==} - engines: {node: '>= 0.4'} - - typed-array-length@1.0.6: - resolution: {integrity: sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==} - engines: {node: '>= 0.4'} - - typescript-eslint@8.13.0: - resolution: {integrity: sha512-vIMpDRJrQd70au2G8w34mPps0ezFSPMEX4pXkTzUkrNbRX+36ais2ksGWN0esZL+ZMaFJEneOBHzCgSqle7DHw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - typescript@5.4.2: - resolution: {integrity: sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==} - engines: {node: '>=14.17'} - hasBin: true - - typescript@5.6.3: - resolution: {integrity: sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==} - engines: {node: '>=14.17'} - hasBin: true - - ufo@1.5.4: - resolution: {integrity: sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==} - - unbox-primitive@1.0.2: - resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} - - undici-types@6.19.8: - resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} - - universalify@0.1.2: - resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} - engines: {node: '>= 4.0.0'} - - uri-js@4.4.1: - resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} - - validate-npm-package-license@3.0.4: - resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} - - vite-node@2.1.4: - resolution: {integrity: sha512-kqa9v+oi4HwkG6g8ufRnb5AeplcRw8jUF6/7/Qz1qRQOXHImG8YnLbB+LLszENwFnoBl9xIf9nVdCFzNd7GQEg==} - engines: {node: ^18.0.0 || >=20.0.0} - hasBin: true - - vite-plugin-dts@4.3.0: - resolution: {integrity: sha512-LkBJh9IbLwL6/rxh0C1/bOurDrIEmRE7joC+jFdOEEciAFPbpEKOLSAr5nNh5R7CJ45cMbksTrFfy52szzC5eA==} - engines: {node: ^14.18.0 || >=16.0.0} - peerDependencies: - typescript: '*' - vite: '*' - peerDependenciesMeta: - vite: - optional: true - - vite-tsconfig-paths@5.1.0: - resolution: {integrity: sha512-Y1PLGHCJfAq1Zf4YIGEsmuU/NCX1epoZx9zwSr32Gjn3aalwQHRKr5aUmbo6r0JHeHkqmWpmDg7WOynhYXw1og==} - peerDependencies: - vite: '*' - peerDependenciesMeta: - vite: - optional: true - - vite@5.4.10: - resolution: {integrity: sha512-1hvaPshuPUtxeQ0hsVH3Mud0ZanOLwVTneA1EgbAM5LhaZEqyPWGRQ7BtaMvUrTDeEaC8pxtj6a6jku3x4z6SQ==} - engines: {node: ^18.0.0 || >=20.0.0} - hasBin: true - peerDependencies: - '@types/node': ^18.0.0 || >=20.0.0 - less: '*' - lightningcss: ^1.21.0 - sass: '*' - sass-embedded: '*' - stylus: '*' - sugarss: '*' - terser: ^5.4.0 - peerDependenciesMeta: - '@types/node': - optional: true - less: - optional: true - lightningcss: - optional: true - sass: - optional: true - sass-embedded: - optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true - - vitest@2.1.4: - resolution: {integrity: sha512-eDjxbVAJw1UJJCHr5xr/xM86Zx+YxIEXGAR+bmnEID7z9qWfoxpHw0zdobz+TQAFOLT+nEXz3+gx6nUJ7RgmlQ==} - engines: {node: ^18.0.0 || >=20.0.0} - hasBin: true - peerDependencies: - '@edge-runtime/vm': '*' - '@types/node': ^18.0.0 || >=20.0.0 - '@vitest/browser': 2.1.4 - '@vitest/ui': 2.1.4 - happy-dom: '*' - jsdom: '*' - peerDependenciesMeta: - '@edge-runtime/vm': - optional: true - '@types/node': - optional: true - '@vitest/browser': - optional: true - '@vitest/ui': - optional: true - happy-dom: - optional: true - jsdom: - optional: true - - vscode-uri@3.0.8: - resolution: {integrity: sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==} - - vue-eslint-parser@9.4.3: - resolution: {integrity: sha512-2rYRLWlIpaiN8xbPiDyXZXRgLGOtWxERV7ND5fFAv5qo1D2N9Fu9MNajBNc6o13lZ+24DAWCkQCvj4klgmcITg==} - engines: {node: ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: '>=6.0.0' - - wesl-testsuite@file:../wesl-testsuite: - resolution: {directory: ../wesl-testsuite, type: directory} - - which-boxed-primitive@1.0.2: - resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} - - which-typed-array@1.1.15: - resolution: {integrity: sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==} - engines: {node: '>= 0.4'} - - which@1.3.1: - resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} - hasBin: true - - which@2.0.2: - resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} - engines: {node: '>= 8'} - hasBin: true - - why-is-node-running@2.3.0: - resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} - engines: {node: '>=8'} - hasBin: true - - word-wrap@1.2.5: - resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} - engines: {node: '>=0.10.0'} - - wrap-ansi@7.0.0: - resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} - engines: {node: '>=10'} - - wrap-ansi@8.1.0: - resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} - engines: {node: '>=12'} - - wrappy@1.0.2: - resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - - y18n@5.0.8: - resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} - engines: {node: '>=10'} - - yallist@2.1.2: - resolution: {integrity: sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==} - - yallist@4.0.0: - resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} - - yargs-parser@21.1.1: - resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} - engines: {node: '>=12'} - - yargs@17.7.2: - resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} - engines: {node: '>=12'} - - yocto-queue@0.1.0: - resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} - engines: {node: '>=10'} - -snapshots: - - '@babel/helper-string-parser@7.25.9': {} - - '@babel/helper-validator-identifier@7.25.9': {} - - '@babel/parser@7.26.2': - dependencies: - '@babel/types': 7.26.0 - - '@babel/types@7.26.0': - dependencies: - '@babel/helper-string-parser': 7.25.9 - '@babel/helper-validator-identifier': 7.25.9 - - '@esbuild/aix-ppc64@0.21.5': - optional: true - - '@esbuild/aix-ppc64@0.23.1': - optional: true - - '@esbuild/aix-ppc64@0.24.0': - optional: true - - '@esbuild/android-arm64@0.21.5': - optional: true - - '@esbuild/android-arm64@0.23.1': - optional: true - - '@esbuild/android-arm64@0.24.0': - optional: true - - '@esbuild/android-arm@0.21.5': - optional: true - - '@esbuild/android-arm@0.23.1': - optional: true - - '@esbuild/android-arm@0.24.0': - optional: true - - '@esbuild/android-x64@0.21.5': - optional: true - - '@esbuild/android-x64@0.23.1': - optional: true - - '@esbuild/android-x64@0.24.0': - optional: true - - '@esbuild/darwin-arm64@0.21.5': - optional: true - - '@esbuild/darwin-arm64@0.23.1': - optional: true - - '@esbuild/darwin-arm64@0.24.0': - optional: true - - '@esbuild/darwin-x64@0.21.5': - optional: true - - '@esbuild/darwin-x64@0.23.1': - optional: true - - '@esbuild/darwin-x64@0.24.0': - optional: true - - '@esbuild/freebsd-arm64@0.21.5': - optional: true - - '@esbuild/freebsd-arm64@0.23.1': - optional: true - - '@esbuild/freebsd-arm64@0.24.0': - optional: true - - '@esbuild/freebsd-x64@0.21.5': - optional: true - - '@esbuild/freebsd-x64@0.23.1': - optional: true - - '@esbuild/freebsd-x64@0.24.0': - optional: true - - '@esbuild/linux-arm64@0.21.5': - optional: true - - '@esbuild/linux-arm64@0.23.1': - optional: true - - '@esbuild/linux-arm64@0.24.0': - optional: true - - '@esbuild/linux-arm@0.21.5': - optional: true - - '@esbuild/linux-arm@0.23.1': - optional: true - - '@esbuild/linux-arm@0.24.0': - optional: true - - '@esbuild/linux-ia32@0.21.5': - optional: true - - '@esbuild/linux-ia32@0.23.1': - optional: true - - '@esbuild/linux-ia32@0.24.0': - optional: true - - '@esbuild/linux-loong64@0.21.5': - optional: true - - '@esbuild/linux-loong64@0.23.1': - optional: true - - '@esbuild/linux-loong64@0.24.0': - optional: true - - '@esbuild/linux-mips64el@0.21.5': - optional: true - - '@esbuild/linux-mips64el@0.23.1': - optional: true - - '@esbuild/linux-mips64el@0.24.0': - optional: true - - '@esbuild/linux-ppc64@0.21.5': - optional: true - - '@esbuild/linux-ppc64@0.23.1': - optional: true - - '@esbuild/linux-ppc64@0.24.0': - optional: true - - '@esbuild/linux-riscv64@0.21.5': - optional: true - - '@esbuild/linux-riscv64@0.23.1': - optional: true - - '@esbuild/linux-riscv64@0.24.0': - optional: true - - '@esbuild/linux-s390x@0.21.5': - optional: true - - '@esbuild/linux-s390x@0.23.1': - optional: true - - '@esbuild/linux-s390x@0.24.0': - optional: true - - '@esbuild/linux-x64@0.21.5': - optional: true - - '@esbuild/linux-x64@0.23.1': - optional: true - - '@esbuild/linux-x64@0.24.0': - optional: true - - '@esbuild/netbsd-x64@0.21.5': - optional: true - - '@esbuild/netbsd-x64@0.23.1': - optional: true - - '@esbuild/netbsd-x64@0.24.0': - optional: true - - '@esbuild/openbsd-arm64@0.23.1': - optional: true - - '@esbuild/openbsd-arm64@0.24.0': - optional: true - - '@esbuild/openbsd-x64@0.21.5': - optional: true - - '@esbuild/openbsd-x64@0.23.1': - optional: true - - '@esbuild/openbsd-x64@0.24.0': - optional: true - - '@esbuild/sunos-x64@0.21.5': - optional: true - - '@esbuild/sunos-x64@0.23.1': - optional: true - - '@esbuild/sunos-x64@0.24.0': - optional: true - - '@esbuild/win32-arm64@0.21.5': - optional: true - - '@esbuild/win32-arm64@0.23.1': - optional: true - - '@esbuild/win32-arm64@0.24.0': - optional: true - - '@esbuild/win32-ia32@0.21.5': - optional: true - - '@esbuild/win32-ia32@0.23.1': - optional: true - - '@esbuild/win32-ia32@0.24.0': - optional: true - - '@esbuild/win32-x64@0.21.5': - optional: true - - '@esbuild/win32-x64@0.23.1': - optional: true - - '@esbuild/win32-x64@0.24.0': - optional: true - - '@eslint-community/eslint-utils@4.4.0(eslint@8.57.1)': - dependencies: - eslint: 8.57.1 - eslint-visitor-keys: 3.4.3 - - '@eslint-community/eslint-utils@4.4.1(eslint@9.14.0)': - dependencies: - eslint: 9.14.0 - eslint-visitor-keys: 3.4.3 - - '@eslint-community/regexpp@4.12.1': {} - - '@eslint/config-array@0.18.0': - dependencies: - '@eslint/object-schema': 2.1.4 - debug: 4.3.7 - minimatch: 3.1.2 - transitivePeerDependencies: - - supports-color - - '@eslint/core@0.7.0': {} - - '@eslint/eslintrc@2.1.4': - dependencies: - ajv: 6.12.6 - debug: 4.3.7 - espree: 9.6.1 - globals: 13.24.0 - ignore: 5.3.2 - import-fresh: 3.3.0 - js-yaml: 4.1.0 - minimatch: 3.1.2 - strip-json-comments: 3.1.1 - transitivePeerDependencies: - - supports-color - - '@eslint/eslintrc@3.1.0': - dependencies: - ajv: 6.12.6 - debug: 4.3.7 - espree: 10.3.0 - globals: 14.0.0 - ignore: 5.3.2 - import-fresh: 3.3.0 - js-yaml: 4.1.0 - minimatch: 3.1.2 - strip-json-comments: 3.1.1 - transitivePeerDependencies: - - supports-color - - '@eslint/js@8.57.1': {} - - '@eslint/js@9.14.0': {} - - '@eslint/object-schema@2.1.4': {} - - '@eslint/plugin-kit@0.2.2': - dependencies: - levn: 0.4.1 - - '@humanfs/core@0.19.1': {} - - '@humanfs/node@0.16.6': - dependencies: - '@humanfs/core': 0.19.1 - '@humanwhocodes/retry': 0.3.1 - - '@humanwhocodes/config-array@0.13.0': - dependencies: - '@humanwhocodes/object-schema': 2.0.3 - debug: 4.3.7 - minimatch: 3.1.2 - transitivePeerDependencies: - - supports-color - - '@humanwhocodes/module-importer@1.0.1': {} - - '@humanwhocodes/object-schema@2.0.3': {} - - '@humanwhocodes/retry@0.3.1': {} - - '@humanwhocodes/retry@0.4.0': {} - - '@isaacs/cliui@8.0.2': - dependencies: - string-width: 5.1.2 - string-width-cjs: string-width@4.2.3 - strip-ansi: 7.1.0 - strip-ansi-cjs: strip-ansi@6.0.1 - wrap-ansi: 8.1.0 - wrap-ansi-cjs: wrap-ansi@7.0.0 - - '@jest/schemas@29.6.3': - dependencies: - '@sinclair/typebox': 0.27.8 - - '@jridgewell/gen-mapping@0.3.5': - dependencies: - '@jridgewell/set-array': 1.2.1 - '@jridgewell/sourcemap-codec': 1.5.0 - '@jridgewell/trace-mapping': 0.3.25 - - '@jridgewell/resolve-uri@3.1.2': {} - - '@jridgewell/set-array@1.2.1': {} - - '@jridgewell/source-map@0.3.6': - dependencies: - '@jridgewell/gen-mapping': 0.3.5 - '@jridgewell/trace-mapping': 0.3.25 - - '@jridgewell/sourcemap-codec@1.5.0': {} - - '@jridgewell/trace-mapping@0.3.25': - dependencies: - '@jridgewell/resolve-uri': 3.1.2 - '@jridgewell/sourcemap-codec': 1.5.0 - - '@messageformat/core@3.3.0': - dependencies: - '@messageformat/date-skeleton': 1.0.1 - '@messageformat/number-skeleton': 1.2.0 - '@messageformat/parser': 5.1.0 - '@messageformat/runtime': 3.0.1 - make-plural: 7.4.0 - safe-identifier: 0.4.2 - - '@messageformat/date-skeleton@1.0.1': {} - - '@messageformat/number-skeleton@1.2.0': {} - - '@messageformat/parser@5.1.0': - dependencies: - moo: 0.5.2 - - '@messageformat/runtime@3.0.1': - dependencies: - make-plural: 7.4.0 - - '@microsoft/api-extractor-model@7.29.8(@types/node@22.9.0)': - dependencies: - '@microsoft/tsdoc': 0.15.0 - '@microsoft/tsdoc-config': 0.17.0 - '@rushstack/node-core-library': 5.9.0(@types/node@22.9.0) - transitivePeerDependencies: - - '@types/node' - - '@microsoft/api-extractor@7.47.11(@types/node@22.9.0)': - dependencies: - '@microsoft/api-extractor-model': 7.29.8(@types/node@22.9.0) - '@microsoft/tsdoc': 0.15.0 - '@microsoft/tsdoc-config': 0.17.0 - '@rushstack/node-core-library': 5.9.0(@types/node@22.9.0) - '@rushstack/rig-package': 0.5.3 - '@rushstack/terminal': 0.14.2(@types/node@22.9.0) - '@rushstack/ts-command-line': 4.23.0(@types/node@22.9.0) - lodash: 4.17.21 - minimatch: 3.0.8 - resolve: 1.22.8 - semver: 7.5.4 - source-map: 0.6.1 - typescript: 5.4.2 - transitivePeerDependencies: - - '@types/node' - - '@microsoft/tsdoc-config@0.17.0': - dependencies: - '@microsoft/tsdoc': 0.15.0 - ajv: 8.12.0 - jju: 1.4.0 - resolve: 1.22.8 - - '@microsoft/tsdoc@0.15.0': {} - - '@nodelib/fs.scandir@2.1.5': - dependencies: - '@nodelib/fs.stat': 2.0.5 - run-parallel: 1.2.0 - - '@nodelib/fs.stat@2.0.5': {} - - '@nodelib/fs.walk@1.2.8': - dependencies: - '@nodelib/fs.scandir': 2.1.5 - fastq: 1.17.1 - - '@pkgjs/parseargs@0.11.0': - optional: true - - '@polka/url@1.0.0-next.28': {} - - '@rollup/pluginutils@5.1.3(rollup@4.24.4)': - dependencies: - '@types/estree': 1.0.6 - estree-walker: 2.0.2 - picomatch: 4.0.2 - optionalDependencies: - rollup: 4.24.4 - - '@rollup/rollup-android-arm-eabi@4.24.4': - optional: true - - '@rollup/rollup-android-arm64@4.24.4': - optional: true - - '@rollup/rollup-darwin-arm64@4.24.4': - optional: true - - '@rollup/rollup-darwin-x64@4.24.4': - optional: true - - '@rollup/rollup-freebsd-arm64@4.24.4': - optional: true - - '@rollup/rollup-freebsd-x64@4.24.4': - optional: true - - '@rollup/rollup-linux-arm-gnueabihf@4.24.4': - optional: true - - '@rollup/rollup-linux-arm-musleabihf@4.24.4': - optional: true - - '@rollup/rollup-linux-arm64-gnu@4.24.4': - optional: true - - '@rollup/rollup-linux-arm64-musl@4.24.4': - optional: true - - '@rollup/rollup-linux-powerpc64le-gnu@4.24.4': - optional: true - - '@rollup/rollup-linux-riscv64-gnu@4.24.4': - optional: true - - '@rollup/rollup-linux-s390x-gnu@4.24.4': - optional: true - - '@rollup/rollup-linux-x64-gnu@4.24.4': - optional: true - - '@rollup/rollup-linux-x64-musl@4.24.4': - optional: true - - '@rollup/rollup-win32-arm64-msvc@4.24.4': - optional: true - - '@rollup/rollup-win32-ia32-msvc@4.24.4': - optional: true - - '@rollup/rollup-win32-x64-msvc@4.24.4': - optional: true - - '@rushstack/node-core-library@5.9.0(@types/node@22.9.0)': - dependencies: - ajv: 8.13.0 - ajv-draft-04: 1.0.0(ajv@8.13.0) - ajv-formats: 3.0.1(ajv@8.13.0) - fs-extra: 7.0.1 - import-lazy: 4.0.0 - jju: 1.4.0 - resolve: 1.22.8 - semver: 7.5.4 - optionalDependencies: - '@types/node': 22.9.0 - - '@rushstack/rig-package@0.5.3': - dependencies: - resolve: 1.22.8 - strip-json-comments: 3.1.1 - - '@rushstack/terminal@0.14.2(@types/node@22.9.0)': - dependencies: - '@rushstack/node-core-library': 5.9.0(@types/node@22.9.0) - supports-color: 8.1.1 - optionalDependencies: - '@types/node': 22.9.0 - - '@rushstack/ts-command-line@4.23.0(@types/node@22.9.0)': - dependencies: - '@rushstack/terminal': 0.14.2(@types/node@22.9.0) - '@types/argparse': 1.0.38 - argparse: 1.0.10 - string-argv: 0.3.2 - transitivePeerDependencies: - - '@types/node' - - '@sinclair/typebox@0.27.8': {} - - '@ts-morph/common@0.16.0': - dependencies: - fast-glob: 3.3.2 - minimatch: 5.1.6 - mkdirp: 1.0.4 - path-browserify: 1.0.1 - - '@types/argparse@1.0.38': {} - - '@types/diff@5.2.3': {} - - '@types/eslint@9.6.1': - dependencies: - '@types/estree': 1.0.6 - '@types/json-schema': 7.0.15 - - '@types/eslint__js@8.42.3': - dependencies: - '@types/eslint': 9.6.1 - - '@types/estree@1.0.6': {} - - '@types/json-schema@7.0.15': {} - - '@types/node@22.9.0': - dependencies: - undici-types: 6.19.8 - - '@types/strip-bom@3.0.0': {} - - '@types/strip-json-comments@0.0.30': {} - - '@types/yargs-parser@21.0.3': {} - - '@types/yargs@17.0.33': - dependencies: - '@types/yargs-parser': 21.0.3 - - '@typescript-eslint/eslint-plugin@8.13.0(@typescript-eslint/parser@8.13.0(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3)': - dependencies: - '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.13.0(eslint@9.14.0)(typescript@5.6.3) - '@typescript-eslint/scope-manager': 8.13.0 - '@typescript-eslint/type-utils': 8.13.0(eslint@9.14.0)(typescript@5.6.3) - '@typescript-eslint/utils': 8.13.0(eslint@9.14.0)(typescript@5.6.3) - '@typescript-eslint/visitor-keys': 8.13.0 - eslint: 9.14.0 - graphemer: 1.4.0 - ignore: 5.3.2 - natural-compare: 1.4.0 - ts-api-utils: 1.4.0(typescript@5.6.3) - optionalDependencies: - typescript: 5.6.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.3)': - dependencies: - '@typescript-eslint/scope-manager': 6.21.0 - '@typescript-eslint/types': 6.21.0 - '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.6.3) - '@typescript-eslint/visitor-keys': 6.21.0 - debug: 4.3.7 - eslint: 8.57.1 - optionalDependencies: - typescript: 5.6.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/parser@8.13.0(eslint@9.14.0)(typescript@5.6.3)': - dependencies: - '@typescript-eslint/scope-manager': 8.13.0 - '@typescript-eslint/types': 8.13.0 - '@typescript-eslint/typescript-estree': 8.13.0(typescript@5.6.3) - '@typescript-eslint/visitor-keys': 8.13.0 - debug: 4.3.7 - eslint: 9.14.0 - optionalDependencies: - typescript: 5.6.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/scope-manager@6.21.0': - dependencies: - '@typescript-eslint/types': 6.21.0 - '@typescript-eslint/visitor-keys': 6.21.0 - - '@typescript-eslint/scope-manager@8.13.0': - dependencies: - '@typescript-eslint/types': 8.13.0 - '@typescript-eslint/visitor-keys': 8.13.0 - - '@typescript-eslint/type-utils@8.13.0(eslint@9.14.0)(typescript@5.6.3)': - dependencies: - '@typescript-eslint/typescript-estree': 8.13.0(typescript@5.6.3) - '@typescript-eslint/utils': 8.13.0(eslint@9.14.0)(typescript@5.6.3) - debug: 4.3.7 - ts-api-utils: 1.4.0(typescript@5.6.3) - optionalDependencies: - typescript: 5.6.3 - transitivePeerDependencies: - - eslint - - supports-color - - '@typescript-eslint/types@6.21.0': {} - - '@typescript-eslint/types@8.13.0': {} - - '@typescript-eslint/typescript-estree@6.21.0(typescript@5.6.3)': - dependencies: - '@typescript-eslint/types': 6.21.0 - '@typescript-eslint/visitor-keys': 6.21.0 - debug: 4.3.7 - globby: 11.1.0 - is-glob: 4.0.3 - minimatch: 9.0.3 - semver: 7.6.3 - ts-api-utils: 1.4.0(typescript@5.6.3) - optionalDependencies: - typescript: 5.6.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/typescript-estree@8.13.0(typescript@5.6.3)': - dependencies: - '@typescript-eslint/types': 8.13.0 - '@typescript-eslint/visitor-keys': 8.13.0 - debug: 4.3.7 - fast-glob: 3.3.2 - is-glob: 4.0.3 - minimatch: 9.0.5 - semver: 7.6.3 - ts-api-utils: 1.4.0(typescript@5.6.3) - optionalDependencies: - typescript: 5.6.3 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/utils@8.13.0(eslint@9.14.0)(typescript@5.6.3)': - dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) - '@typescript-eslint/scope-manager': 8.13.0 - '@typescript-eslint/types': 8.13.0 - '@typescript-eslint/typescript-estree': 8.13.0(typescript@5.6.3) - eslint: 9.14.0 - transitivePeerDependencies: - - supports-color - - typescript - - '@typescript-eslint/visitor-keys@6.21.0': - dependencies: - '@typescript-eslint/types': 6.21.0 - eslint-visitor-keys: 3.4.3 - - '@typescript-eslint/visitor-keys@8.13.0': - dependencies: - '@typescript-eslint/types': 8.13.0 - eslint-visitor-keys: 3.4.3 - - '@ungap/structured-clone@1.2.0': {} - - '@vitest/expect@2.1.4': - dependencies: - '@vitest/spy': 2.1.4 - '@vitest/utils': 2.1.4 - chai: 5.1.2 - tinyrainbow: 1.2.0 - - '@vitest/mocker@2.1.4(vite@5.4.10(@types/node@22.9.0)(terser@5.36.0))': - dependencies: - '@vitest/spy': 2.1.4 - estree-walker: 3.0.3 - magic-string: 0.30.12 - optionalDependencies: - vite: 5.4.10(@types/node@22.9.0)(terser@5.36.0) - - '@vitest/pretty-format@2.1.4': - dependencies: - tinyrainbow: 1.2.0 - - '@vitest/runner@2.1.4': - dependencies: - '@vitest/utils': 2.1.4 - pathe: 1.1.2 - - '@vitest/snapshot@2.1.4': - dependencies: - '@vitest/pretty-format': 2.1.4 - magic-string: 0.30.12 - pathe: 1.1.2 - - '@vitest/spy@2.1.4': - dependencies: - tinyspy: 3.0.2 - - '@vitest/ui@2.1.4(vitest@2.1.4)': - dependencies: - '@vitest/utils': 2.1.4 - fflate: 0.8.2 - flatted: 3.3.1 - pathe: 1.1.2 - sirv: 3.0.0 - tinyglobby: 0.2.10 - tinyrainbow: 1.2.0 - vitest: 2.1.4(@types/node@22.9.0)(@vitest/ui@2.1.4)(terser@5.36.0) - - '@vitest/utils@2.1.4': - dependencies: - '@vitest/pretty-format': 2.1.4 - loupe: 3.1.2 - tinyrainbow: 1.2.0 - - '@volar/language-core@2.4.8': - dependencies: - '@volar/source-map': 2.4.8 - - '@volar/source-map@2.4.8': {} - - '@volar/typescript@2.4.8': - dependencies: - '@volar/language-core': 2.4.8 - path-browserify: 1.0.1 - vscode-uri: 3.0.8 - - '@vue/compiler-core@3.5.12': - dependencies: - '@babel/parser': 7.26.2 - '@vue/shared': 3.5.12 - entities: 4.5.0 - estree-walker: 2.0.2 - source-map-js: 1.2.1 - - '@vue/compiler-dom@3.5.12': - dependencies: - '@vue/compiler-core': 3.5.12 - '@vue/shared': 3.5.12 - - '@vue/compiler-vue2@2.7.16': - dependencies: - de-indent: 1.0.2 - he: 1.2.0 - - '@vue/language-core@2.1.6(typescript@5.6.3)': - dependencies: - '@volar/language-core': 2.4.8 - '@vue/compiler-dom': 3.5.12 - '@vue/compiler-vue2': 2.7.16 - '@vue/shared': 3.5.12 - computeds: 0.0.1 - minimatch: 9.0.5 - muggle-string: 0.4.1 - path-browserify: 1.0.1 - optionalDependencies: - typescript: 5.6.3 - - '@vue/shared@3.5.12': {} - - acorn-jsx@5.3.2(acorn@8.14.0): - dependencies: - acorn: 8.14.0 - - acorn@8.14.0: {} - - ajv-draft-04@1.0.0(ajv@8.13.0): - optionalDependencies: - ajv: 8.13.0 - - ajv-formats@3.0.1(ajv@8.13.0): - optionalDependencies: - ajv: 8.13.0 - - ajv@6.12.6: - dependencies: - fast-deep-equal: 3.1.3 - fast-json-stable-stringify: 2.1.0 - json-schema-traverse: 0.4.1 - uri-js: 4.4.1 - - ajv@8.12.0: - dependencies: - fast-deep-equal: 3.1.3 - json-schema-traverse: 1.0.0 - require-from-string: 2.0.2 - uri-js: 4.4.1 - - ajv@8.13.0: - dependencies: - fast-deep-equal: 3.1.3 - json-schema-traverse: 1.0.0 - require-from-string: 2.0.2 - uri-js: 4.4.1 - - ansi-regex@2.1.1: {} - - ansi-regex@5.0.1: {} - - ansi-regex@6.0.1: {} - - ansi-styles@2.2.1: {} - - ansi-styles@3.2.1: - dependencies: - color-convert: 1.9.3 - - ansi-styles@4.3.0: - dependencies: - color-convert: 2.0.1 - - ansi-styles@5.2.0: {} - - ansi-styles@6.2.1: {} - - argparse@1.0.10: - dependencies: - sprintf-js: 1.0.3 - - argparse@2.0.1: {} - - array-buffer-byte-length@1.0.1: - dependencies: - call-bind: 1.0.7 - is-array-buffer: 3.0.4 - - array-union@2.1.0: {} - - arraybuffer.prototype.slice@1.0.3: - dependencies: - array-buffer-byte-length: 1.0.1 - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.3 - es-errors: 1.3.0 - get-intrinsic: 1.2.4 - is-array-buffer: 3.0.4 - is-shared-array-buffer: 1.0.3 - - arrify@2.0.1: {} - - assertion-error@2.0.1: {} - - available-typed-arrays@1.0.7: - dependencies: - possible-typed-array-names: 1.0.0 - - balanced-match@1.0.2: {} - - base64-js@1.5.1: {} - - berry-pretty@0.0.5: {} - - boolify@1.0.1: {} - - brace-expansion@1.1.11: - dependencies: - balanced-match: 1.0.2 - concat-map: 0.0.1 - - brace-expansion@2.0.1: - dependencies: - balanced-match: 1.0.2 - - braces@3.0.3: - dependencies: - fill-range: 7.1.1 - - brotli@1.3.3: - dependencies: - base64-js: 1.5.1 - - buffer-from@1.1.2: {} - - cac@6.7.14: {} - - call-bind@1.0.7: - dependencies: - es-define-property: 1.0.0 - es-errors: 1.3.0 - function-bind: 1.1.2 - get-intrinsic: 1.2.4 - set-function-length: 1.2.2 - - callsites@3.1.0: {} - - camelcase-keys@9.1.3: - dependencies: - camelcase: 8.0.0 - map-obj: 5.0.0 - quick-lru: 6.1.2 - type-fest: 4.25.0 - - camelcase@8.0.0: {} - - chai@5.1.2: - dependencies: - assertion-error: 2.0.1 - check-error: 2.1.1 - deep-eql: 5.0.2 - loupe: 3.1.2 - pathval: 2.0.0 - - chalk@1.1.3: - dependencies: - ansi-styles: 2.2.1 - escape-string-regexp: 1.0.5 - has-ansi: 2.0.0 - strip-ansi: 3.0.1 - supports-color: 2.0.0 - - chalk@2.4.2: - dependencies: - ansi-styles: 3.2.1 - escape-string-regexp: 1.0.5 - supports-color: 5.5.0 - - chalk@4.1.2: - dependencies: - ansi-styles: 4.3.0 - supports-color: 7.2.0 - - check-error@2.1.1: {} - - cliui@8.0.1: - dependencies: - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 7.0.0 - - code-block-writer@11.0.3: {} - - color-convert@1.9.3: - dependencies: - color-name: 1.1.3 - - color-convert@2.0.1: - dependencies: - color-name: 1.1.4 - - color-name@1.1.3: {} - - color-name@1.1.4: {} - - commander@2.20.3: {} - - common-tags@1.8.2: {} - - compare-versions@6.1.1: {} - - computeds@0.0.1: {} - - concat-map@0.0.1: {} - - confbox@0.1.8: {} - - core-js@3.38.1: {} - - cross-spawn@6.0.5: - dependencies: - nice-try: 1.0.5 - path-key: 2.0.1 - semver: 5.7.2 - shebang-command: 1.2.0 - which: 1.3.1 - - cross-spawn@7.0.3: - dependencies: - path-key: 3.1.1 - shebang-command: 2.0.0 - which: 2.0.2 - - data-view-buffer@1.0.1: - dependencies: - call-bind: 1.0.7 - es-errors: 1.3.0 - is-data-view: 1.0.1 - - data-view-byte-length@1.0.1: - dependencies: - call-bind: 1.0.7 - es-errors: 1.3.0 - is-data-view: 1.0.1 - - data-view-byte-offset@1.0.0: - dependencies: - call-bind: 1.0.7 - es-errors: 1.3.0 - is-data-view: 1.0.1 - - de-indent@1.0.2: {} - - debug@4.3.7: - dependencies: - ms: 2.1.3 - - deep-eql@5.0.2: {} - - deep-is@0.1.4: {} - - define-data-property@1.1.4: - dependencies: - es-define-property: 1.0.0 - es-errors: 1.3.0 - gopd: 1.0.1 - - define-lazy-prop@2.0.0: {} - - define-properties@1.2.1: - dependencies: - define-data-property: 1.1.4 - has-property-descriptors: 1.0.2 - object-keys: 1.1.1 - - diff@5.2.0: {} - - dir-glob@3.0.1: - dependencies: - path-type: 4.0.0 - - dlv@1.1.3: {} - - doctrine@3.0.0: - dependencies: - esutils: 2.0.3 - - eastasianwidth@0.2.0: {} - - editorconfig@0.15.3: - dependencies: - commander: 2.20.3 - lru-cache: 4.1.5 - semver: 5.7.2 - sigmund: 1.0.1 - - emoji-regex@8.0.0: {} - - emoji-regex@9.2.2: {} - - entities@4.5.0: {} - - error-ex@1.3.2: - dependencies: - is-arrayish: 0.2.1 - - es-abstract@1.23.3: - dependencies: - array-buffer-byte-length: 1.0.1 - arraybuffer.prototype.slice: 1.0.3 - available-typed-arrays: 1.0.7 - call-bind: 1.0.7 - data-view-buffer: 1.0.1 - data-view-byte-length: 1.0.1 - data-view-byte-offset: 1.0.0 - es-define-property: 1.0.0 - es-errors: 1.3.0 - es-object-atoms: 1.0.0 - es-set-tostringtag: 2.0.3 - es-to-primitive: 1.2.1 - function.prototype.name: 1.1.6 - get-intrinsic: 1.2.4 - get-symbol-description: 1.0.2 - globalthis: 1.0.4 - gopd: 1.0.1 - has-property-descriptors: 1.0.2 - has-proto: 1.0.3 - has-symbols: 1.0.3 - hasown: 2.0.2 - internal-slot: 1.0.7 - is-array-buffer: 3.0.4 - is-callable: 1.2.7 - is-data-view: 1.0.1 - is-negative-zero: 2.0.3 - is-regex: 1.1.4 - is-shared-array-buffer: 1.0.3 - is-string: 1.0.7 - is-typed-array: 1.1.13 - is-weakref: 1.0.2 - object-inspect: 1.13.2 - object-keys: 1.1.1 - object.assign: 4.1.5 - regexp.prototype.flags: 1.5.3 - safe-array-concat: 1.1.2 - safe-regex-test: 1.0.3 - string.prototype.trim: 1.2.9 - string.prototype.trimend: 1.0.8 - string.prototype.trimstart: 1.0.8 - typed-array-buffer: 1.0.2 - typed-array-byte-length: 1.0.1 - typed-array-byte-offset: 1.0.2 - typed-array-length: 1.0.6 - unbox-primitive: 1.0.2 - which-typed-array: 1.1.15 - - es-define-property@1.0.0: - dependencies: - get-intrinsic: 1.2.4 - - es-errors@1.3.0: {} - - es-object-atoms@1.0.0: - dependencies: - es-errors: 1.3.0 - - es-set-tostringtag@2.0.3: - dependencies: - get-intrinsic: 1.2.4 - has-tostringtag: 1.0.2 - hasown: 2.0.2 - - es-to-primitive@1.2.1: - dependencies: - is-callable: 1.2.7 - is-date-object: 1.0.5 - is-symbol: 1.0.4 - - esbuild@0.21.5: - optionalDependencies: - '@esbuild/aix-ppc64': 0.21.5 - '@esbuild/android-arm': 0.21.5 - '@esbuild/android-arm64': 0.21.5 - '@esbuild/android-x64': 0.21.5 - '@esbuild/darwin-arm64': 0.21.5 - '@esbuild/darwin-x64': 0.21.5 - '@esbuild/freebsd-arm64': 0.21.5 - '@esbuild/freebsd-x64': 0.21.5 - '@esbuild/linux-arm': 0.21.5 - '@esbuild/linux-arm64': 0.21.5 - '@esbuild/linux-ia32': 0.21.5 - '@esbuild/linux-loong64': 0.21.5 - '@esbuild/linux-mips64el': 0.21.5 - '@esbuild/linux-ppc64': 0.21.5 - '@esbuild/linux-riscv64': 0.21.5 - '@esbuild/linux-s390x': 0.21.5 - '@esbuild/linux-x64': 0.21.5 - '@esbuild/netbsd-x64': 0.21.5 - '@esbuild/openbsd-x64': 0.21.5 - '@esbuild/sunos-x64': 0.21.5 - '@esbuild/win32-arm64': 0.21.5 - '@esbuild/win32-ia32': 0.21.5 - '@esbuild/win32-x64': 0.21.5 - - esbuild@0.23.1: - optionalDependencies: - '@esbuild/aix-ppc64': 0.23.1 - '@esbuild/android-arm': 0.23.1 - '@esbuild/android-arm64': 0.23.1 - '@esbuild/android-x64': 0.23.1 - '@esbuild/darwin-arm64': 0.23.1 - '@esbuild/darwin-x64': 0.23.1 - '@esbuild/freebsd-arm64': 0.23.1 - '@esbuild/freebsd-x64': 0.23.1 - '@esbuild/linux-arm': 0.23.1 - '@esbuild/linux-arm64': 0.23.1 - '@esbuild/linux-ia32': 0.23.1 - '@esbuild/linux-loong64': 0.23.1 - '@esbuild/linux-mips64el': 0.23.1 - '@esbuild/linux-ppc64': 0.23.1 - '@esbuild/linux-riscv64': 0.23.1 - '@esbuild/linux-s390x': 0.23.1 - '@esbuild/linux-x64': 0.23.1 - '@esbuild/netbsd-x64': 0.23.1 - '@esbuild/openbsd-arm64': 0.23.1 - '@esbuild/openbsd-x64': 0.23.1 - '@esbuild/sunos-x64': 0.23.1 - '@esbuild/win32-arm64': 0.23.1 - '@esbuild/win32-ia32': 0.23.1 - '@esbuild/win32-x64': 0.23.1 - - esbuild@0.24.0: - optionalDependencies: - '@esbuild/aix-ppc64': 0.24.0 - '@esbuild/android-arm': 0.24.0 - '@esbuild/android-arm64': 0.24.0 - '@esbuild/android-x64': 0.24.0 - '@esbuild/darwin-arm64': 0.24.0 - '@esbuild/darwin-x64': 0.24.0 - '@esbuild/freebsd-arm64': 0.24.0 - '@esbuild/freebsd-x64': 0.24.0 - '@esbuild/linux-arm': 0.24.0 - '@esbuild/linux-arm64': 0.24.0 - '@esbuild/linux-ia32': 0.24.0 - '@esbuild/linux-loong64': 0.24.0 - '@esbuild/linux-mips64el': 0.24.0 - '@esbuild/linux-ppc64': 0.24.0 - '@esbuild/linux-riscv64': 0.24.0 - '@esbuild/linux-s390x': 0.24.0 - '@esbuild/linux-x64': 0.24.0 - '@esbuild/netbsd-x64': 0.24.0 - '@esbuild/openbsd-arm64': 0.24.0 - '@esbuild/openbsd-x64': 0.24.0 - '@esbuild/sunos-x64': 0.24.0 - '@esbuild/win32-arm64': 0.24.0 - '@esbuild/win32-ia32': 0.24.0 - '@esbuild/win32-x64': 0.24.0 - - escalade@3.2.0: {} - - escape-string-regexp@1.0.5: {} - - escape-string-regexp@4.0.0: {} - - eslint-config-prettier@9.1.0(eslint@9.14.0): - dependencies: - eslint: 9.14.0 - - eslint-scope@7.2.2: - dependencies: - esrecurse: 4.3.0 - estraverse: 5.3.0 - - eslint-scope@8.2.0: - dependencies: - esrecurse: 4.3.0 - estraverse: 5.3.0 - - eslint-visitor-keys@3.4.3: {} - - eslint-visitor-keys@4.2.0: {} - - eslint@8.57.1: - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) - '@eslint-community/regexpp': 4.12.1 - '@eslint/eslintrc': 2.1.4 - '@eslint/js': 8.57.1 - '@humanwhocodes/config-array': 0.13.0 - '@humanwhocodes/module-importer': 1.0.1 - '@nodelib/fs.walk': 1.2.8 - '@ungap/structured-clone': 1.2.0 - ajv: 6.12.6 - chalk: 4.1.2 - cross-spawn: 7.0.3 - debug: 4.3.7 - doctrine: 3.0.0 - escape-string-regexp: 4.0.0 - eslint-scope: 7.2.2 - eslint-visitor-keys: 3.4.3 - espree: 9.6.1 - esquery: 1.6.0 - esutils: 2.0.3 - fast-deep-equal: 3.1.3 - file-entry-cache: 6.0.1 - find-up: 5.0.0 - glob-parent: 6.0.2 - globals: 13.24.0 - graphemer: 1.4.0 - ignore: 5.3.2 - imurmurhash: 0.1.4 - is-glob: 4.0.3 - is-path-inside: 3.0.3 - js-yaml: 4.1.0 - json-stable-stringify-without-jsonify: 1.0.1 - levn: 0.4.1 - lodash.merge: 4.6.2 - minimatch: 3.1.2 - natural-compare: 1.4.0 - optionator: 0.9.4 - strip-ansi: 6.0.1 - text-table: 0.2.0 - transitivePeerDependencies: - - supports-color - - eslint@9.14.0: - dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) - '@eslint-community/regexpp': 4.12.1 - '@eslint/config-array': 0.18.0 - '@eslint/core': 0.7.0 - '@eslint/eslintrc': 3.1.0 - '@eslint/js': 9.14.0 - '@eslint/plugin-kit': 0.2.2 - '@humanfs/node': 0.16.6 - '@humanwhocodes/module-importer': 1.0.1 - '@humanwhocodes/retry': 0.4.0 - '@types/estree': 1.0.6 - '@types/json-schema': 7.0.15 - ajv: 6.12.6 - chalk: 4.1.2 - cross-spawn: 7.0.3 - debug: 4.3.7 - escape-string-regexp: 4.0.0 - eslint-scope: 8.2.0 - eslint-visitor-keys: 4.2.0 - espree: 10.3.0 - esquery: 1.6.0 - esutils: 2.0.3 - fast-deep-equal: 3.1.3 - file-entry-cache: 8.0.0 - find-up: 5.0.0 - glob-parent: 6.0.2 - ignore: 5.3.2 - imurmurhash: 0.1.4 - is-glob: 4.0.3 - json-stable-stringify-without-jsonify: 1.0.1 - lodash.merge: 4.6.2 - minimatch: 3.1.2 - natural-compare: 1.4.0 - optionator: 0.9.4 - text-table: 0.2.0 - transitivePeerDependencies: - - supports-color - - espree@10.3.0: - dependencies: - acorn: 8.14.0 - acorn-jsx: 5.3.2(acorn@8.14.0) - eslint-visitor-keys: 4.2.0 - - espree@9.6.1: - dependencies: - acorn: 8.14.0 - acorn-jsx: 5.3.2(acorn@8.14.0) - eslint-visitor-keys: 3.4.3 - - esquery@1.6.0: - dependencies: - estraverse: 5.3.0 - - esrecurse@4.3.0: - dependencies: - estraverse: 5.3.0 - - estraverse@5.3.0: {} - - estree-walker@2.0.2: {} - - estree-walker@3.0.3: - dependencies: - '@types/estree': 1.0.6 - - esutils@2.0.3: {} - - expect-type@1.1.0: {} - - fast-deep-equal@3.1.3: {} - - fast-glob@3.3.2: - dependencies: - '@nodelib/fs.stat': 2.0.5 - '@nodelib/fs.walk': 1.2.8 - glob-parent: 5.1.2 - merge2: 1.4.1 - micromatch: 4.0.8 - - fast-json-stable-stringify@2.1.0: {} - - fast-levenshtein@2.0.6: {} - - fastq@1.17.1: - dependencies: - reusify: 1.0.4 - - fdir@6.4.2(picomatch@4.0.2): - optionalDependencies: - picomatch: 4.0.2 - - fflate@0.8.2: {} - - file-entry-cache@6.0.1: - dependencies: - flat-cache: 3.2.0 - - file-entry-cache@8.0.0: - dependencies: - flat-cache: 4.0.1 - - fill-range@7.1.1: - dependencies: - to-regex-range: 5.0.1 - - find-up@5.0.0: - dependencies: - locate-path: 6.0.0 - path-exists: 4.0.0 - - flat-cache@3.2.0: - dependencies: - flatted: 3.3.1 - keyv: 4.5.4 - rimraf: 3.0.2 - - flat-cache@4.0.1: - dependencies: - flatted: 3.3.1 - keyv: 4.5.4 - - flatted@3.3.1: {} - - for-each@0.3.3: - dependencies: - is-callable: 1.2.7 - - foreground-child@3.3.0: - dependencies: - cross-spawn: 7.0.3 - signal-exit: 4.1.0 - - fs-extra@7.0.1: - dependencies: - graceful-fs: 4.2.11 - jsonfile: 4.0.0 - universalify: 0.1.2 - - fs.realpath@1.0.0: {} - - fsevents@2.3.3: - optional: true - - function-bind@1.1.2: {} - - function.prototype.name@1.1.6: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.3 - functions-have-names: 1.2.3 - - functions-have-names@1.2.3: {} - - get-caller-file@2.0.5: {} - - get-intrinsic@1.2.4: - dependencies: - es-errors: 1.3.0 - function-bind: 1.1.2 - has-proto: 1.0.3 - has-symbols: 1.0.3 - hasown: 2.0.2 - - get-stdin@8.0.0: {} - - get-symbol-description@1.0.2: - dependencies: - call-bind: 1.0.7 - es-errors: 1.3.0 - get-intrinsic: 1.2.4 - - get-tsconfig@4.8.1: - dependencies: - resolve-pkg-maps: 1.0.0 - - glob-parent@5.1.2: - dependencies: - is-glob: 4.0.3 - - glob-parent@6.0.2: - dependencies: - is-glob: 4.0.3 - - glob@10.4.5: - dependencies: - foreground-child: 3.3.0 - jackspeak: 3.4.3 - minimatch: 9.0.5 - minipass: 7.1.2 - package-json-from-dist: 1.0.1 - path-scurry: 1.11.1 - - glob@11.0.0: - dependencies: - foreground-child: 3.3.0 - jackspeak: 4.0.2 - minimatch: 10.0.1 - minipass: 7.1.2 - package-json-from-dist: 1.0.0 - path-scurry: 2.0.0 - - glob@7.2.3: - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.1.2 - once: 1.4.0 - path-is-absolute: 1.0.1 - - globals@13.24.0: - dependencies: - type-fest: 0.20.2 - - globals@14.0.0: {} - - globalthis@1.0.4: - dependencies: - define-properties: 1.2.1 - gopd: 1.0.1 - - globby@11.1.0: - dependencies: - array-union: 2.1.0 - dir-glob: 3.0.1 - fast-glob: 3.3.2 - ignore: 5.3.2 - merge2: 1.4.1 - slash: 3.0.0 - - globrex@0.1.2: {} - - gopd@1.0.1: - dependencies: - get-intrinsic: 1.2.4 - - graceful-fs@4.2.11: {} - - graphemer@1.4.0: {} - - has-ansi@2.0.0: - dependencies: - ansi-regex: 2.1.1 - - has-bigints@1.0.2: {} - - has-flag@3.0.0: {} - - has-flag@4.0.0: {} - - has-property-descriptors@1.0.2: - dependencies: - es-define-property: 1.0.0 - - has-proto@1.0.3: {} - - has-symbols@1.0.3: {} - - has-tostringtag@1.0.2: - dependencies: - has-symbols: 1.0.3 - - hasown@2.0.2: - dependencies: - function-bind: 1.1.2 - - he@1.2.0: {} - - hosted-git-info@2.8.9: {} - - ignore@5.3.2: {} - - import-fresh@3.3.0: - dependencies: - parent-module: 1.0.1 - resolve-from: 4.0.0 - - import-lazy@4.0.0: {} - - imurmurhash@0.1.4: {} - - indent-string@4.0.0: {} - - inflight@1.0.6: - dependencies: - once: 1.4.0 - wrappy: 1.0.2 - - inherits@2.0.4: {} - - internal-slot@1.0.7: - dependencies: - es-errors: 1.3.0 - hasown: 2.0.2 - side-channel: 1.0.6 - - is-array-buffer@3.0.4: - dependencies: - call-bind: 1.0.7 - get-intrinsic: 1.2.4 - - is-arrayish@0.2.1: {} - - is-bigint@1.0.4: - dependencies: - has-bigints: 1.0.2 - - is-boolean-object@1.1.2: - dependencies: - call-bind: 1.0.7 - has-tostringtag: 1.0.2 - - is-callable@1.2.7: {} - - is-core-module@2.15.1: - dependencies: - hasown: 2.0.2 - - is-data-view@1.0.1: - dependencies: - is-typed-array: 1.1.13 - - is-date-object@1.0.5: - dependencies: - has-tostringtag: 1.0.2 - - is-docker@2.2.1: {} - - is-extglob@2.1.1: {} - - is-fullwidth-code-point@3.0.0: {} - - is-glob@4.0.3: - dependencies: - is-extglob: 2.1.1 - - is-negative-zero@2.0.3: {} - - is-number-object@1.0.7: - dependencies: - has-tostringtag: 1.0.2 - - is-number@7.0.0: {} - - is-path-inside@3.0.3: {} - - is-regex@1.1.4: - dependencies: - call-bind: 1.0.7 - has-tostringtag: 1.0.2 - - is-shared-array-buffer@1.0.3: - dependencies: - call-bind: 1.0.7 - - is-string@1.0.7: - dependencies: - has-tostringtag: 1.0.2 - - is-symbol@1.0.4: - dependencies: - has-symbols: 1.0.3 - - is-typed-array@1.1.13: - dependencies: - which-typed-array: 1.1.15 - - is-weakref@1.0.2: - dependencies: - call-bind: 1.0.7 - - is-wsl@2.2.0: - dependencies: - is-docker: 2.2.1 - - isarray@2.0.5: {} - - isexe@2.0.0: {} - - jackspeak@3.4.3: - dependencies: - '@isaacs/cliui': 8.0.2 - optionalDependencies: - '@pkgjs/parseargs': 0.11.0 - - jackspeak@4.0.2: - dependencies: - '@isaacs/cliui': 8.0.2 - - jju@1.4.0: {} - - js-yaml@4.1.0: - dependencies: - argparse: 2.0.1 - - json-buffer@3.0.1: {} - - json-parse-better-errors@1.0.2: {} - - json-schema-traverse@0.4.1: {} - - json-schema-traverse@1.0.0: {} - - json-stable-stringify-without-jsonify@1.0.1: {} - - jsonfile@4.0.0: - optionalDependencies: - graceful-fs: 4.2.11 - - keyv@4.5.4: - dependencies: - json-buffer: 3.0.1 - - kolorist@1.8.0: {} - - levn@0.4.1: - dependencies: - prelude-ls: 1.2.1 - type-check: 0.4.0 - - load-json-file@4.0.0: - dependencies: - graceful-fs: 4.2.11 - parse-json: 4.0.0 - pify: 3.0.0 - strip-bom: 3.0.0 - - local-pkg@0.5.0: - dependencies: - mlly: 1.7.2 - pkg-types: 1.2.1 - - locate-path@6.0.0: - dependencies: - p-locate: 5.0.0 - - lodash.memoize@4.1.2: {} - - lodash.merge@4.6.2: {} - - lodash@4.17.21: {} - - loglevel-colored-level-prefix@1.0.0: - dependencies: - chalk: 1.1.3 - loglevel: 1.9.1 - - loglevel@1.9.1: {} - - loupe@3.1.2: {} - - lru-cache@10.4.3: {} - - lru-cache@11.0.1: {} - - lru-cache@4.1.5: - dependencies: - pseudomap: 1.0.2 - yallist: 2.1.2 - - lru-cache@6.0.0: - dependencies: - yallist: 4.0.0 - - magic-string@0.30.12: - dependencies: - '@jridgewell/sourcemap-codec': 1.5.0 - - make-plural@7.4.0: {} - - map-obj@5.0.0: {} - - memorystream@0.3.1: {} - - merge2@1.4.1: {} - - micromatch@4.0.8: - dependencies: - braces: 3.0.3 - picomatch: 2.3.1 - - minimatch@10.0.1: - dependencies: - brace-expansion: 2.0.1 - - minimatch@3.0.8: - dependencies: - brace-expansion: 1.1.11 - - minimatch@3.1.2: - dependencies: - brace-expansion: 1.1.11 - - minimatch@5.1.6: - dependencies: - brace-expansion: 2.0.1 - - minimatch@9.0.3: - dependencies: - brace-expansion: 2.0.1 - - minimatch@9.0.5: - dependencies: - brace-expansion: 2.0.1 - - minipass@7.1.2: {} - - mkdirp@1.0.4: {} - - mlly@1.7.2: - dependencies: - acorn: 8.14.0 - pathe: 1.1.2 - pkg-types: 1.2.1 - ufo: 1.5.4 - - moo@0.5.2: {} - - mrmime@2.0.0: {} - - ms@2.1.3: {} - - muggle-string@0.4.1: {} - - nanoid@3.3.7: {} - - natural-compare@1.4.0: {} - - ncp@2.0.0: {} - - nice-try@1.0.5: {} - - normalize-package-data@2.5.0: - dependencies: - hosted-git-info: 2.8.9 - resolve: 1.22.8 - semver: 5.7.2 - validate-npm-package-license: 3.0.4 - - npm-run-all@4.1.5: - dependencies: - ansi-styles: 3.2.1 - chalk: 2.4.2 - cross-spawn: 6.0.5 - memorystream: 0.3.1 - minimatch: 3.1.2 - pidtree: 0.3.1 - read-pkg: 3.0.0 - shell-quote: 1.8.1 - string.prototype.padend: 3.1.6 - - object-inspect@1.13.2: {} - - object-keys@1.1.1: {} - - object.assign@4.1.5: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - has-symbols: 1.0.3 - object-keys: 1.1.1 - - once@1.4.0: - dependencies: - wrappy: 1.0.2 - - open@8.4.2: - dependencies: - define-lazy-prop: 2.0.0 - is-docker: 2.2.1 - is-wsl: 2.2.0 - - optionator@0.9.4: - dependencies: - deep-is: 0.1.4 - fast-levenshtein: 2.0.6 - levn: 0.4.1 - prelude-ls: 1.2.1 - type-check: 0.4.0 - word-wrap: 1.2.5 - - organize-imports-cli@0.10.0: - dependencies: - chalk: 4.1.2 - editorconfig: 0.15.3 - ts-morph: 15.1.0 - tsconfig: 7.0.0 - - p-limit@3.1.0: - dependencies: - yocto-queue: 0.1.0 - - p-locate@5.0.0: - dependencies: - p-limit: 3.1.0 - - package-json-from-dist@1.0.0: {} - - package-json-from-dist@1.0.1: {} - - parent-module@1.0.1: - dependencies: - callsites: 3.1.0 - - parse-json@4.0.0: - dependencies: - error-ex: 1.3.2 - json-parse-better-errors: 1.0.2 - - path-browserify@1.0.1: {} - - path-exists@4.0.0: {} - - path-is-absolute@1.0.1: {} - - path-key@2.0.1: {} - - path-key@3.1.1: {} - - path-parse@1.0.7: {} - - path-scurry@1.11.1: - dependencies: - lru-cache: 10.4.3 - minipass: 7.1.2 - - path-scurry@2.0.0: - dependencies: - lru-cache: 11.0.1 - minipass: 7.1.2 - - path-type@3.0.0: - dependencies: - pify: 3.0.0 - - path-type@4.0.0: {} - - pathe@1.1.2: {} - - pathval@2.0.0: {} - - picocolors@1.1.1: {} - - picomatch@2.3.1: {} - - picomatch@4.0.2: {} - - pidtree@0.3.1: {} - - pify@3.0.0: {} - - pkg-types@1.2.1: - dependencies: - confbox: 0.1.8 - mlly: 1.7.2 - pathe: 1.1.2 - - possible-typed-array-names@1.0.0: {} - - postcss@8.4.47: - dependencies: - nanoid: 3.3.7 - picocolors: 1.1.1 - source-map-js: 1.2.1 - - prelude-ls@1.2.1: {} - - prettier-eslint-cli@8.0.1(prettier-eslint@16.3.0): - dependencies: - '@messageformat/core': 3.3.0 - '@prettier/eslint': prettier-eslint@16.3.0 - arrify: 2.0.1 - boolify: 1.0.1 - camelcase-keys: 9.1.3 - chalk: 4.1.2 - common-tags: 1.8.2 - core-js: 3.38.1 - eslint: 8.57.1 - find-up: 5.0.0 - get-stdin: 8.0.0 - glob: 10.4.5 - ignore: 5.3.2 - indent-string: 4.0.0 - lodash.memoize: 4.1.2 - loglevel-colored-level-prefix: 1.0.0 - rxjs: 7.8.1 - yargs: 17.7.2 - optionalDependencies: - prettier-eslint: 16.3.0 - transitivePeerDependencies: - - prettier-plugin-svelte - - supports-color - - svelte-eslint-parser - - prettier-eslint@16.3.0: - dependencies: - '@typescript-eslint/parser': 6.21.0(eslint@8.57.1)(typescript@5.6.3) - common-tags: 1.8.2 - dlv: 1.1.3 - eslint: 8.57.1 - indent-string: 4.0.0 - lodash.merge: 4.6.2 - loglevel-colored-level-prefix: 1.0.0 - prettier: 3.3.3 - pretty-format: 29.7.0 - require-relative: 0.8.7 - typescript: 5.6.3 - vue-eslint-parser: 9.4.3(eslint@8.57.1) - transitivePeerDependencies: - - supports-color - - prettier@3.3.3: {} - - pretty-format@29.7.0: - dependencies: - '@jest/schemas': 29.6.3 - ansi-styles: 5.2.0 - react-is: 18.3.1 - - pseudomap@1.0.2: {} - - punycode@2.3.1: {} - - queue-microtask@1.2.3: {} - - quick-lru@6.1.2: {} - - react-is@18.3.1: {} - - read-pkg@3.0.0: - dependencies: - load-json-file: 4.0.0 - normalize-package-data: 2.5.0 - path-type: 3.0.0 - - regexp.prototype.flags@1.5.3: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-errors: 1.3.0 - set-function-name: 2.0.2 - - require-directory@2.1.1: {} - - require-from-string@2.0.2: {} - - require-relative@0.8.7: {} - - resolve-from@4.0.0: {} - - resolve-pkg-maps@1.0.0: {} - - resolve@1.22.8: - dependencies: - is-core-module: 2.15.1 - path-parse: 1.0.7 - supports-preserve-symlinks-flag: 1.0.0 - - reusify@1.0.4: {} - - rimraf@3.0.2: - dependencies: - glob: 7.2.3 - - rimraf@6.0.1: - dependencies: - glob: 11.0.0 - package-json-from-dist: 1.0.1 - - rollup-plugin-visualizer@5.12.0(rollup@4.24.4): - dependencies: - open: 8.4.2 - picomatch: 2.3.1 - source-map: 0.7.4 - yargs: 17.7.2 - optionalDependencies: - rollup: 4.24.4 - - rollup@4.24.4: - dependencies: - '@types/estree': 1.0.6 - optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.24.4 - '@rollup/rollup-android-arm64': 4.24.4 - '@rollup/rollup-darwin-arm64': 4.24.4 - '@rollup/rollup-darwin-x64': 4.24.4 - '@rollup/rollup-freebsd-arm64': 4.24.4 - '@rollup/rollup-freebsd-x64': 4.24.4 - '@rollup/rollup-linux-arm-gnueabihf': 4.24.4 - '@rollup/rollup-linux-arm-musleabihf': 4.24.4 - '@rollup/rollup-linux-arm64-gnu': 4.24.4 - '@rollup/rollup-linux-arm64-musl': 4.24.4 - '@rollup/rollup-linux-powerpc64le-gnu': 4.24.4 - '@rollup/rollup-linux-riscv64-gnu': 4.24.4 - '@rollup/rollup-linux-s390x-gnu': 4.24.4 - '@rollup/rollup-linux-x64-gnu': 4.24.4 - '@rollup/rollup-linux-x64-musl': 4.24.4 - '@rollup/rollup-win32-arm64-msvc': 4.24.4 - '@rollup/rollup-win32-ia32-msvc': 4.24.4 - '@rollup/rollup-win32-x64-msvc': 4.24.4 - fsevents: 2.3.3 - - run-parallel@1.2.0: - dependencies: - queue-microtask: 1.2.3 - - rxjs@7.8.1: - dependencies: - tslib: 2.6.3 - - safe-array-concat@1.1.2: - dependencies: - call-bind: 1.0.7 - get-intrinsic: 1.2.4 - has-symbols: 1.0.3 - isarray: 2.0.5 - - safe-identifier@0.4.2: {} - - safe-regex-test@1.0.3: - dependencies: - call-bind: 1.0.7 - es-errors: 1.3.0 - is-regex: 1.1.4 - - semver@5.7.2: {} - - semver@7.5.4: - dependencies: - lru-cache: 6.0.0 - - semver@7.6.3: {} - - set-function-length@1.2.2: - dependencies: - define-data-property: 1.1.4 - es-errors: 1.3.0 - function-bind: 1.1.2 - get-intrinsic: 1.2.4 - gopd: 1.0.1 - has-property-descriptors: 1.0.2 - - set-function-name@2.0.2: - dependencies: - define-data-property: 1.1.4 - es-errors: 1.3.0 - functions-have-names: 1.2.3 - has-property-descriptors: 1.0.2 - - shebang-command@1.2.0: - dependencies: - shebang-regex: 1.0.0 - - shebang-command@2.0.0: - dependencies: - shebang-regex: 3.0.0 - - shebang-regex@1.0.0: {} - - shebang-regex@3.0.0: {} - - shell-quote@1.8.1: {} - - side-channel@1.0.6: - dependencies: - call-bind: 1.0.7 - es-errors: 1.3.0 - get-intrinsic: 1.2.4 - object-inspect: 1.13.2 - - siginfo@2.0.0: {} - - sigmund@1.0.1: {} - - signal-exit@4.1.0: {} - - sirv@3.0.0: - dependencies: - '@polka/url': 1.0.0-next.28 - mrmime: 2.0.0 - totalist: 3.0.1 - - slash@3.0.0: {} - - source-map-js@1.2.1: {} - - source-map-support@0.5.21: - dependencies: - buffer-from: 1.1.2 - source-map: 0.6.1 - - source-map@0.6.1: {} - - source-map@0.7.4: {} - - spdx-correct@3.2.0: - dependencies: - spdx-expression-parse: 3.0.1 - spdx-license-ids: 3.0.20 - - spdx-exceptions@2.5.0: {} - - spdx-expression-parse@3.0.1: - dependencies: - spdx-exceptions: 2.5.0 - spdx-license-ids: 3.0.20 - - spdx-license-ids@3.0.20: {} - - sprintf-js@1.0.3: {} - - stackback@0.0.2: {} - - std-env@3.7.0: {} - - string-argv@0.3.2: {} - - string-width@4.2.3: - dependencies: - emoji-regex: 8.0.0 - is-fullwidth-code-point: 3.0.0 - strip-ansi: 6.0.1 - - string-width@5.1.2: - dependencies: - eastasianwidth: 0.2.0 - emoji-regex: 9.2.2 - strip-ansi: 7.1.0 - - string.prototype.padend@3.1.6: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.3 - es-object-atoms: 1.0.0 - - string.prototype.trim@1.2.9: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.3 - es-object-atoms: 1.0.0 - - string.prototype.trimend@1.0.8: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-object-atoms: 1.0.0 - - string.prototype.trimstart@1.0.8: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-object-atoms: 1.0.0 - - strip-ansi@3.0.1: - dependencies: - ansi-regex: 2.1.1 - - strip-ansi@6.0.1: - dependencies: - ansi-regex: 5.0.1 - - strip-ansi@7.1.0: - dependencies: - ansi-regex: 6.0.1 - - strip-bom@3.0.0: {} - - strip-json-comments@2.0.1: {} - - strip-json-comments@3.1.1: {} - - supports-color@2.0.0: {} - - supports-color@5.5.0: - dependencies: - has-flag: 3.0.0 - - supports-color@7.2.0: - dependencies: - has-flag: 4.0.0 - - supports-color@8.1.1: - dependencies: - has-flag: 4.0.0 - - supports-preserve-symlinks-flag@1.0.0: {} - - terser@5.36.0: - dependencies: - '@jridgewell/source-map': 0.3.6 - acorn: 8.14.0 - commander: 2.20.3 - source-map-support: 0.5.21 - - text-table@0.2.0: {} - - tinybench@2.9.0: {} - - tinyexec@0.3.1: {} - - tinyglobby@0.2.10: - dependencies: - fdir: 6.4.2(picomatch@4.0.2) - picomatch: 4.0.2 - - tinypool@1.0.1: {} - - tinyrainbow@1.2.0: {} - - tinyspy@3.0.2: {} - - to-regex-range@5.0.1: - dependencies: - is-number: 7.0.0 - - totalist@3.0.1: {} - - ts-api-utils@1.4.0(typescript@5.6.3): - dependencies: - typescript: 5.6.3 - - ts-morph@15.1.0: - dependencies: - '@ts-morph/common': 0.16.0 - code-block-writer: 11.0.3 - - tsconfck@3.1.4(typescript@5.6.3): - optionalDependencies: - typescript: 5.6.3 - - tsconfig@7.0.0: - dependencies: - '@types/strip-bom': 3.0.0 - '@types/strip-json-comments': 0.0.30 - strip-bom: 3.0.0 - strip-json-comments: 2.0.1 - - tslib@2.6.3: {} - - tsx@4.19.2: - dependencies: - esbuild: 0.23.1 - get-tsconfig: 4.8.1 - optionalDependencies: - fsevents: 2.3.3 - - type-check@0.4.0: - dependencies: - prelude-ls: 1.2.1 - - type-fest@0.20.2: {} - - type-fest@4.25.0: {} - - typed-array-buffer@1.0.2: - dependencies: - call-bind: 1.0.7 - es-errors: 1.3.0 - is-typed-array: 1.1.13 - - typed-array-byte-length@1.0.1: - dependencies: - call-bind: 1.0.7 - for-each: 0.3.3 - gopd: 1.0.1 - has-proto: 1.0.3 - is-typed-array: 1.1.13 - - typed-array-byte-offset@1.0.2: - dependencies: - available-typed-arrays: 1.0.7 - call-bind: 1.0.7 - for-each: 0.3.3 - gopd: 1.0.1 - has-proto: 1.0.3 - is-typed-array: 1.1.13 - - typed-array-length@1.0.6: - dependencies: - call-bind: 1.0.7 - for-each: 0.3.3 - gopd: 1.0.1 - has-proto: 1.0.3 - is-typed-array: 1.1.13 - possible-typed-array-names: 1.0.0 - - typescript-eslint@8.13.0(eslint@9.14.0)(typescript@5.6.3): - dependencies: - '@typescript-eslint/eslint-plugin': 8.13.0(@typescript-eslint/parser@8.13.0(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3) - '@typescript-eslint/parser': 8.13.0(eslint@9.14.0)(typescript@5.6.3) - '@typescript-eslint/utils': 8.13.0(eslint@9.14.0)(typescript@5.6.3) - optionalDependencies: - typescript: 5.6.3 - transitivePeerDependencies: - - eslint - - supports-color - - typescript@5.4.2: {} - - typescript@5.6.3: {} - - ufo@1.5.4: {} - - unbox-primitive@1.0.2: - dependencies: - call-bind: 1.0.7 - has-bigints: 1.0.2 - has-symbols: 1.0.3 - which-boxed-primitive: 1.0.2 - - undici-types@6.19.8: {} - - universalify@0.1.2: {} - - uri-js@4.4.1: - dependencies: - punycode: 2.3.1 - - validate-npm-package-license@3.0.4: - dependencies: - spdx-correct: 3.2.0 - spdx-expression-parse: 3.0.1 - - vite-node@2.1.4(@types/node@22.9.0)(terser@5.36.0): - dependencies: - cac: 6.7.14 - debug: 4.3.7 - pathe: 1.1.2 - vite: 5.4.10(@types/node@22.9.0)(terser@5.36.0) - transitivePeerDependencies: - - '@types/node' - - less - - lightningcss - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - - vite-plugin-dts@4.3.0(@types/node@22.9.0)(rollup@4.24.4)(typescript@5.6.3)(vite@5.4.10(@types/node@22.9.0)(terser@5.36.0)): - dependencies: - '@microsoft/api-extractor': 7.47.11(@types/node@22.9.0) - '@rollup/pluginutils': 5.1.3(rollup@4.24.4) - '@volar/typescript': 2.4.8 - '@vue/language-core': 2.1.6(typescript@5.6.3) - compare-versions: 6.1.1 - debug: 4.3.7 - kolorist: 1.8.0 - local-pkg: 0.5.0 - magic-string: 0.30.12 - typescript: 5.6.3 - optionalDependencies: - vite: 5.4.10(@types/node@22.9.0)(terser@5.36.0) - transitivePeerDependencies: - - '@types/node' - - rollup - - supports-color - - vite-tsconfig-paths@5.1.0(typescript@5.6.3)(vite@5.4.10(@types/node@22.9.0)(terser@5.36.0)): - dependencies: - debug: 4.3.7 - globrex: 0.1.2 - tsconfck: 3.1.4(typescript@5.6.3) - optionalDependencies: - vite: 5.4.10(@types/node@22.9.0)(terser@5.36.0) - transitivePeerDependencies: - - supports-color - - typescript - - vite@5.4.10(@types/node@22.9.0)(terser@5.36.0): - dependencies: - esbuild: 0.21.5 - postcss: 8.4.47 - rollup: 4.24.4 - optionalDependencies: - '@types/node': 22.9.0 - fsevents: 2.3.3 - terser: 5.36.0 - - vitest@2.1.4(@types/node@22.9.0)(@vitest/ui@2.1.4)(terser@5.36.0): - dependencies: - '@vitest/expect': 2.1.4 - '@vitest/mocker': 2.1.4(vite@5.4.10(@types/node@22.9.0)(terser@5.36.0)) - '@vitest/pretty-format': 2.1.4 - '@vitest/runner': 2.1.4 - '@vitest/snapshot': 2.1.4 - '@vitest/spy': 2.1.4 - '@vitest/utils': 2.1.4 - chai: 5.1.2 - debug: 4.3.7 - expect-type: 1.1.0 - magic-string: 0.30.12 - pathe: 1.1.2 - std-env: 3.7.0 - tinybench: 2.9.0 - tinyexec: 0.3.1 - tinypool: 1.0.1 - tinyrainbow: 1.2.0 - vite: 5.4.10(@types/node@22.9.0)(terser@5.36.0) - vite-node: 2.1.4(@types/node@22.9.0)(terser@5.36.0) - why-is-node-running: 2.3.0 - optionalDependencies: - '@types/node': 22.9.0 - '@vitest/ui': 2.1.4(vitest@2.1.4) - transitivePeerDependencies: - - less - - lightningcss - - msw - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - - vscode-uri@3.0.8: {} - - vue-eslint-parser@9.4.3(eslint@8.57.1): - dependencies: - debug: 4.3.7 - eslint: 8.57.1 - eslint-scope: 7.2.2 - eslint-visitor-keys: 3.4.3 - espree: 9.6.1 - esquery: 1.6.0 - lodash: 4.17.21 - semver: 7.6.3 - transitivePeerDependencies: - - supports-color - - wesl-testsuite@file:../wesl-testsuite: {} - - which-boxed-primitive@1.0.2: - dependencies: - is-bigint: 1.0.4 - is-boolean-object: 1.1.2 - is-number-object: 1.0.7 - is-string: 1.0.7 - is-symbol: 1.0.4 - - which-typed-array@1.1.15: - dependencies: - available-typed-arrays: 1.0.7 - call-bind: 1.0.7 - for-each: 0.3.3 - gopd: 1.0.1 - has-tostringtag: 1.0.2 - - which@1.3.1: - dependencies: - isexe: 2.0.0 - - which@2.0.2: - dependencies: - isexe: 2.0.0 - - why-is-node-running@2.3.0: - dependencies: - siginfo: 2.0.0 - stackback: 0.0.2 - - word-wrap@1.2.5: {} - - wrap-ansi@7.0.0: - dependencies: - ansi-styles: 4.3.0 - string-width: 4.2.3 - strip-ansi: 6.0.1 - - wrap-ansi@8.1.0: - dependencies: - ansi-styles: 6.2.1 - string-width: 5.1.2 - strip-ansi: 7.1.0 - - wrappy@1.0.2: {} - - y18n@5.0.8: {} - - yallist@2.1.2: {} - - yallist@4.0.0: {} - - yargs-parser@21.1.1: {} - - yargs@17.7.2: - dependencies: - cliui: 8.0.1 - escalade: 3.2.0 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - string-width: 4.2.3 - y18n: 5.0.8 - yargs-parser: 21.1.1 - - yocto-queue@0.1.0: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml deleted file mode 100644 index f88960cbe..000000000 --- a/pnpm-workspace.yaml +++ /dev/null @@ -1,2 +0,0 @@ -packages: -- 'packages/*' diff --git a/scripts/bump.ts b/scripts/bump.ts deleted file mode 100644 index 6feb097c9..000000000 --- a/scripts/bump.ts +++ /dev/null @@ -1,52 +0,0 @@ -import fs from "fs"; -import glob from "fast-glob"; -import yargs from "yargs"; -import { hideBin } from "yargs/helpers"; -import { promisify } from "util"; -import { exec as execOrig } from "child_process"; -const execAsync = promisify(execOrig); - -const argv = yargs(hideBin(process.argv)) - .version(false) - .options({ - version: { - alias: "v", - type: "string", - demandOption: true, - requiresArg: true, - }, - }) - .parseSync(); - -run(argv.version); - -async function run(version: string): Promise { - const dirty = await gitDirty(); - if (dirty) { - console.error("git repository has uncommitted changes, aborting"); - process.exit(1); - } - await setPackageVersions(version); - await commitAndTag(version); -} - -async function setPackageVersions(version: string): Promise { - const packages = await glob("packages/*/package.json"); - - packages.forEach((packagePath) => { - const pkgString = fs.readFileSync(packagePath, { encoding: "utf8" }); - const packageJson = JSON.parse(pkgString); - packageJson.version = version; - fs.writeFileSync(packagePath, JSON.stringify(packageJson, null, 2) + "\n"); - }); -} - -async function gitDirty(): Promise { - const status = await execAsync("git status --short"); - return status.stdout !== ""; -} - -async function commitAndTag(version: string): Promise { - await execAsync(`git commit -a -m 'bump version to ${version}'`); - await execAsync(`git tag v${version}`); -} diff --git a/scripts/runTs b/scripts/runTs deleted file mode 100755 index 9f11d570f..000000000 --- a/scripts/runTs +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -SCRIPT_DIR=`dirname "$0"` -SCRIPT_NAME="$1".ts - -pnpm esbuild $SCRIPT_DIR/$SCRIPT_NAME --format=cjs --platform=node \ - | pnpm node - $@ diff --git a/testlib/README.md b/testlib/README.md new file mode 100644 index 000000000..56a43197c --- /dev/null +++ b/testlib/README.md @@ -0,0 +1,3 @@ +# Test Lib + +A little library to add the `toMatchSnapshot` function to Deno's testing library. \ No newline at end of file diff --git a/testlib/deno.json b/testlib/deno.json new file mode 100644 index 000000000..f5e394931 --- /dev/null +++ b/testlib/deno.json @@ -0,0 +1,7 @@ +{ + "name": "@wesl/testlib", + "exports": "./mod.ts", + "tasks": {}, + "license": "MIT", + "imports": {} +} \ No newline at end of file diff --git a/testlib/mod.ts b/testlib/mod.ts new file mode 100644 index 000000000..3a9ead9be --- /dev/null +++ b/testlib/mod.ts @@ -0,0 +1,3 @@ +import { expect } from "@std/expect"; +export const test = Deno.test; +export { expect }; From 6c4710b0a028b8543e3994f4e5a1e647133fe982 Mon Sep 17 00:00:00 2001 From: stefnotch Date: Tue, 5 Nov 2024 03:39:42 +0100 Subject: [PATCH 03/17] Updates --- README.md | 1 + deno.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 40bd6c41c..97111e833 100644 --- a/README.md +++ b/README.md @@ -26,5 +26,6 @@ You get only that function and its references, not the whole file. Deno is used for almost everything. - `deno install` for setup - `deno lint` for linting +- `deno fmt` for formatting - `deno test --allow-read` to run the unit tests - To update the snapshots, run `deno test --allow-all -- --update` \ No newline at end of file diff --git a/deno.json b/deno.json index 46413ae2f..0c2cf0e9b 100644 --- a/deno.json +++ b/deno.json @@ -8,7 +8,7 @@ "@std/expect": "jsr:@std/expect@1", "@std/testing": "jsr:@std/testing@1", "vitest": "./testlib/mod.ts", - "wesl-testsuite": "../../wesl-testsuite/src/index.ts" + "wesl-testsuite": "../wesl-testsuite/src/index.ts" }, "workspace": [ "./mini-parse", From b394bb5ada83f1d83f0295d643925ff5c729dc45 Mon Sep 17 00:00:00 2001 From: stefnotch Date: Fri, 8 Nov 2024 13:36:05 +0100 Subject: [PATCH 04/17] Deno rebase fixes --- {packages/bulk-test => bulk-test}/README.md | 0 bulk-test/deno.json | 7 + .../test/unitySamples.test.ts | 7 +- .../test/wgslExamples.test.ts | 0 cli/cli.ts | 22 +- eslint.config.mjs | 13 - linker/test/ParseWgslD.test.ts | 12 +- .../__snapshots__/ParseWgslD.test.ts.snap | 19 + .../test/CalculatorResultsExample.test.ts | 1 - old.eslintrc.cjs | 42 --- packages/bulk-test/package.json | 16 - packages/bulk-test/src/viteTypes.d.ts | 1 - packages/bulk-test/vite.config.ts | 9 - packages/linker/src/test/GleamImport.test.ts | 182 ---------- packages/linker/src/test/ImportCases.test.ts | 334 ------------------ packages/packager/src/main.ts | 7 - prettier.config.mjs | 9 - 17 files changed, 46 insertions(+), 635 deletions(-) rename {packages/bulk-test => bulk-test}/README.md (100%) create mode 100644 bulk-test/deno.json rename {packages/bulk-test/src => bulk-test}/test/unitySamples.test.ts (85%) rename {packages/bulk-test/src => bulk-test}/test/wgslExamples.test.ts (100%) delete mode 100644 eslint.config.mjs delete mode 100644 old.eslintrc.cjs delete mode 100644 packages/bulk-test/package.json delete mode 100644 packages/bulk-test/src/viteTypes.d.ts delete mode 100644 packages/bulk-test/vite.config.ts delete mode 100644 packages/linker/src/test/GleamImport.test.ts delete mode 100644 packages/linker/src/test/ImportCases.test.ts delete mode 100644 packages/packager/src/main.ts delete mode 100644 prettier.config.mjs diff --git a/packages/bulk-test/README.md b/bulk-test/README.md similarity index 100% rename from packages/bulk-test/README.md rename to bulk-test/README.md diff --git a/bulk-test/deno.json b/bulk-test/deno.json new file mode 100644 index 000000000..fd336a534 --- /dev/null +++ b/bulk-test/deno.json @@ -0,0 +1,7 @@ +{ + "version": "0.1.0", + "tasks": { + "dev": "deno run --watch main.ts" + }, + "imports": {} +} \ No newline at end of file diff --git a/packages/bulk-test/src/test/unitySamples.test.ts b/bulk-test/test/unitySamples.test.ts similarity index 85% rename from packages/bulk-test/src/test/unitySamples.test.ts rename to bulk-test/test/unitySamples.test.ts index 4a0c13461..f4c29e42b 100644 --- a/packages/bulk-test/src/test/unitySamples.test.ts +++ b/bulk-test/test/unitySamples.test.ts @@ -2,12 +2,11 @@ import { glob } from "glob"; import fs from "node:fs/promises"; import { test } from "vitest"; import { ModuleRegistry } from "wgsl-linker"; -import { dlog } from "berry-pretty"; const wgslRoot = "../../../community-wgsl/unity_web_research"; // these require composing some wgsl files together, so just skip em for now -const exclude:string[] = []; +const exclude: string[] = []; const texts = await loadFiles(exclude); @@ -25,9 +24,9 @@ async function loadFiles(exclude: string[]): Promise<[string, string][]> { ignore: ["node_modules/**"], }); const activeFiles = files.filter( - path => !exclude.some(e => path.includes(e)), + (path) => !exclude.some((e) => path.includes(e)), ).slice(0, 10); - const futureEntries = activeFiles.map(async path => { + const futureEntries = activeFiles.map(async (path) => { const text = await fs.readFile(path, { encoding: "utf8" }); return [path, text] as [string, string]; }); diff --git a/packages/bulk-test/src/test/wgslExamples.test.ts b/bulk-test/test/wgslExamples.test.ts similarity index 100% rename from packages/bulk-test/src/test/wgslExamples.test.ts rename to bulk-test/test/wgslExamples.test.ts diff --git a/cli/cli.ts b/cli/cli.ts index 6444b2508..7a13241e2 100644 --- a/cli/cli.ts +++ b/cli/cli.ts @@ -58,7 +58,7 @@ function parseArgs(args: string[]) { } function linkNormally(paths: string[]): void { - const pathAndTexts = paths.map(f => { + const pathAndTexts = paths.map((f) => { const text = fs.readFileSync(f, { encoding: "utf8" }); const basedPath = normalize(rmBaseDirPrefix(f)); return [basedPath, text]; @@ -70,7 +70,7 @@ function linkNormally(paths: string[]): void { } function linkSeparately(paths: string[]): void { - paths.forEach(f => { + paths.forEach((f) => { const srcText = fs.readFileSync(f, { encoding: "utf8" }); const basedPath = normalize(rmBaseDirPrefix(f)); const registry = new ModuleRegistry({ wgsl: { [basedPath]: srcText } }); @@ -92,9 +92,9 @@ function doLink( function externalDefines(): Record { if (!argv.define) return {}; - const pairs = argv.define.map(d => d.toString().split("=")); + const pairs = argv.define.map((d) => d.toString().split("=")); - const badPair = pairs.find(p => p.length !== 2); + const badPair = pairs.find((p) => p.length !== 2); if (badPair) { console.error("invalid define", badPair); return {}; @@ -127,27 +127,27 @@ function printDetails(modulePath: string, registry: ModuleRegistry): void { console.log(modulePath, ":"); const parsed = registry.parsed(externalDefines()); const m = parsed.findTextModule(modulePath)!; - m.fns.forEach(f => { + m.fns.forEach((f) => { console.log(` fn ${f.name}`); - const calls = f.calls.map(c => c.name).join(" "); + const calls = f.calls.map((c) => c.name).join(" "); console.log(` calls: ${calls}`); printTypeRefs(f); }); - m.vars.forEach(v => { + m.vars.forEach((v) => { console.log(` var ${v.name}`); printTypeRefs(v); }); - m.structs.forEach(s => { + m.structs.forEach((s) => { console.log(` struct ${s.name}`); - const members = (s.members ?? []).map(m => m.name).join(" "); + const members = (s.members ?? []).map((m) => m.name).join(" "); console.log(` members: ${members}`); - s.members.map(m => printTypeRefs(m)); + s.members.map((m) => printTypeRefs(m)); }); console.log(); } function printTypeRefs(hasTypeRefs: { typeRefs: TypeRefElem[] }): void { - const typeRefs = hasTypeRefs.typeRefs.map(t => t.name).join(" "); + const typeRefs = hasTypeRefs.typeRefs.map((t) => t.name).join(" "); console.log(` typeRefs: ${typeRefs}`); } diff --git a/eslint.config.mjs b/eslint.config.mjs deleted file mode 100644 index 3d033b4cd..000000000 --- a/eslint.config.mjs +++ /dev/null @@ -1,13 +0,0 @@ -import eslint from "@eslint/js"; -import tseslint from "typescript-eslint"; - -export default tseslint.config( - eslint.configs.recommended, - ...tseslint.configs.recommended, - { ignores: ["**/dist/", "**/bin/"] }, - { rules: { - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-unused-vars": "warn", - } - }, -); diff --git a/linker/test/ParseWgslD.test.ts b/linker/test/ParseWgslD.test.ts index 2fc76945f..4bcadb937 100644 --- a/linker/test/ParseWgslD.test.ts +++ b/linker/test/ParseWgslD.test.ts @@ -40,7 +40,7 @@ test("structDecl parses struct member types", () => { const src = "struct Foo { a: f32, b: i32 }"; const { appState } = testAppParse(structDecl, src); const { members } = appState[0] as StructElem; - const typeNames = members.flatMap(m => m.typeRefs.map(t => t.name)); + const typeNames = members.flatMap((m) => m.typeRefs.map((t) => t.name)); expect(typeNames).toEqual(["f32", "i32"]); }); @@ -207,7 +207,7 @@ test("parse nested template that ends with >> ", () => { const src = `vec2>`; const { parsed } = testAppParse(typeSpecifier, src); - const typeRefNames = parsed?.value.map(r => r.name); + const typeRefNames = parsed?.value.map((r) => r.name); expect(typeRefNames).toEqual(["vec2", "array", "MyStruct"]); }); @@ -215,7 +215,7 @@ test("parse struct member with templated type", () => { const src = `struct Foo { a: vec2> }`; const { appState } = testAppParse(structDecl, src); const members = filterElems(appState, "struct")[0].members; - const memberNames = members.flatMap(m => m.typeRefs.map(t => t.name)); + const memberNames = members.flatMap((m) => m.typeRefs.map((t) => t.name)); expect(memberNames).toEqual(["vec2", "array", "Bar"]); }); @@ -298,11 +298,11 @@ test("parse var x: foo.bar;", () => { `; const parsed = testParseWgsl(src); - const varRef = parsed.find(e => e.kind === "var"); + const varRef = parsed.find((e) => e.kind === "var"); expect(varRef?.typeRefs[0].name).toBe("foo.bar"); }); -test("parse switch statement", () => { +test("parse switch statement", async (ctx) => { const src = ` fn main() { switch (x) { @@ -312,5 +312,5 @@ test("parse switch statement", () => { } `; const parsed = testParseWgsl(src); - expect(parsed).toMatchSnapshot(); + await assertSnapshot(ctx, parsed); }); diff --git a/linker/test/__snapshots__/ParseWgslD.test.ts.snap b/linker/test/__snapshots__/ParseWgslD.test.ts.snap index e31829353..7d3d5836d 100644 --- a/linker/test/__snapshots__/ParseWgslD.test.ts.snap +++ b/linker/test/__snapshots__/ParseWgslD.test.ts.snap @@ -415,3 +415,22 @@ snapshot[`parse let x: foo.bar; 1`] = ` }, ] `; + +snapshot[`parse switch statement 1`] = ` +[ + { + calls: [], + end: 104, + kind: "fn", + name: "main", + nameElem: { + end: 12, + kind: "fnName", + name: "main", + start: 8, + }, + start: 5, + typeRefs: [], + }, +] +`; diff --git a/mini-parse/test/CalculatorResultsExample.test.ts b/mini-parse/test/CalculatorResultsExample.test.ts index d204b88a8..f71d51ac1 100644 --- a/mini-parse/test/CalculatorResultsExample.test.ts +++ b/mini-parse/test/CalculatorResultsExample.test.ts @@ -1,4 +1,3 @@ -import { testParse } from "mini-parse/test-util"; import { expect, test } from "vitest"; import { calcTokens } from "../examples/CalculatorExample.ts"; import { diff --git a/old.eslintrc.cjs b/old.eslintrc.cjs deleted file mode 100644 index af32b945e..000000000 --- a/old.eslintrc.cjs +++ /dev/null @@ -1,42 +0,0 @@ -// module.exports = { -// root: true, -// parser: "@typescript-eslint/parser", -// plugins: ["@typescript-eslint"], -// ignorePatterns: ["**/*.js"], -// env: { -// node: true, // fix vscode warning about module undefined -// browser: true, -// es6: true, -// }, -// extends: [ -// "eslint:recommended", -// "plugin:@typescript-eslint/recommended", -// "prettier", -// ], -// settings: { -// react: { -// version: "detect", -// }, -// }, -// rules: { -// strict: 1, -// "@typescript-eslint/no-non-null-assertion": "off", -// "@typescript-eslint/no-use-before-define": [ -// "error", -// { functions: false, classes: true }, -// ], -// "@typescript-eslint/explicit-function-return-type": [ -// "warn", -// { allowExpressions: true }, -// ], -// "@typescript-eslint/ban-ts-ignore": "off", -// "@typescript-eslint/no-explicit-any": "off", -// "@typescript-eslint/interface-name-prefix": "off", -// "@typescript-eslint/no-unused-vars": ["warn", { ignoreRestSiblings: true }], -// "@typescript-eslint/no-empty-function": [ -// "warn", -// { allow: ["arrowFunctions"] }, -// ], -// "@typescript-eslint/no-inferrable-types": "warn", -// }, -// }; diff --git a/packages/bulk-test/package.json b/packages/bulk-test/package.json deleted file mode 100644 index 31ea89702..000000000 --- a/packages/bulk-test/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "bulk-test", - "version": "0.5.0-d1", - "type": "module", - "scripts": { - "format": "prettier . --write", - "lint": "eslint src", - "organize": "organize-imports-cli tsconfig.json", - "prepublishOnly": "run-s build", - "test": "vitest", - "bulk-test:once": "vitest run" - }, - "dependencies": { - "wgsl-linker": "workspace:*" - } -} diff --git a/packages/bulk-test/src/viteTypes.d.ts b/packages/bulk-test/src/viteTypes.d.ts deleted file mode 100644 index 11f02fe2a..000000000 --- a/packages/bulk-test/src/viteTypes.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/packages/bulk-test/vite.config.ts b/packages/bulk-test/vite.config.ts deleted file mode 100644 index 73deae856..000000000 --- a/packages/bulk-test/vite.config.ts +++ /dev/null @@ -1,9 +0,0 @@ -/// -import { UserConfig } from "vite"; -import tsconfigPaths from "vite-tsconfig-paths"; - -const config: UserConfig = { - plugins: [tsconfigPaths()], -}; - -export default config; diff --git a/packages/linker/src/test/GleamImport.test.ts b/packages/linker/src/test/GleamImport.test.ts deleted file mode 100644 index ffda5b1db..000000000 --- a/packages/linker/src/test/GleamImport.test.ts +++ /dev/null @@ -1,182 +0,0 @@ -import { testParse, TestParseResult } from "mini-parse/test-util"; -import { expect, TaskContext, test } from "vitest"; -import { gleamImport } from "../GleamImport.js"; - -function expectParses(ctx: TaskContext): TestParseResult { - const result = testParse(gleamImport, ctx.task.name); - expect(result.parsed).not.toBeNull(); - return result; -} -/* ------ success cases ------- */ - -test("import ./foo/bar;", ctx => { - const result = expectParses(ctx); - expect(result.position).toBe(ctx.task.name.length); // consume semicolon (so that linking will remove it) -}); - -test("import foo-bar/boo", ctx => { - expectParses(ctx); -}); - -/** ----- extraction tests ----- */ -test("import foo/bar", ctx => { - const { appState } = expectParses(ctx); - expect(appState).toMatchInlineSnapshot(` - [ - { - "end": 14, - "imports": ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "foo", - }, - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "bar", - }, - ], - }, - "kind": "treeImport", - "start": 0, - }, - ] - `); -}); - -test("import foo/* as b", ctx => { - const { appState } = expectParses(ctx); - expect(appState).toMatchInlineSnapshot(` - [ - { - "end": 17, - "imports": ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "foo", - }, - Wildcard { - "as": "b", - }, - ], - }, - "kind": "treeImport", - "start": 0, - }, - ] - `); -}); - -test(`import a/{ b, c/{d, e}, f/* }`, ctx => { - const { appState } = expectParses(ctx); - expect(appState).toMatchInlineSnapshot(` - [ - { - "end": 29, - "imports": ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "a", - }, - SegmentList { - "list": [ - ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "b", - }, - ], - }, - ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "c", - }, - SegmentList { - "list": [ - ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "d", - }, - ], - }, - ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "e", - }, - ], - }, - ], - }, - ], - }, - ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "f", - }, - Wildcard { - "as": undefined, - }, - ], - }, - ], - }, - ], - }, - "kind": "treeImport", - "start": 0, - }, - ] - `); -}); - -test("import ./foo/bar", ctx => { - const { appState } = expectParses(ctx); - expect(appState).toMatchInlineSnapshot(` - [ - { - "end": 16, - "imports": ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": undefined, - "name": ".", - }, - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "foo", - }, - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "bar", - }, - ], - }, - "kind": "treeImport", - "start": 0, - }, - ] - `); -}); diff --git a/packages/linker/src/test/ImportCases.test.ts b/packages/linker/src/test/ImportCases.test.ts deleted file mode 100644 index 4bfb3464f..000000000 --- a/packages/linker/src/test/ImportCases.test.ts +++ /dev/null @@ -1,334 +0,0 @@ -import { afterAll, expect, test } from "vitest"; -import { importCases } from "wesl-testsuite"; - -import { ModuleRegistry } from "../ModuleRegistry.js"; -import { trimSrc } from "./shared/StringUtil.js"; - -interface LinkExpectation { - includes?: string[]; - excludes?: string[]; - linked?: string; -} - -// wgsl example src, indexed by name -const examplesByName = new Map(importCases.map(t => [t.name, t.src])); - -test("import ./bar/foo", ctx => { - linkTest(ctx.task.name, { - linked: ` - fn main() { - foo(); - } - - fn foo() { } - `, - }); -}); - -test("main has other root elements", ctx => { - linkTest(ctx.task.name, { - linked: ` - struct Uniforms { - a: u32 - } - - @group(0) @binding(0) var u: Uniforms; - - fn main() { } - `, - }); -}); - -test("import foo as bar", ctx => { - linkTest(ctx.task.name, { - linked: ` - fn main() { - bar(); - } - - fn bar() { /* fooImpl */ } - `, - }); -}); - -test("import twice doesn't get two copies", ctx => { - linkTest(ctx.task.name, { - linked: ` - fn main() { - foo(); - bar(); - } - - fn foo() { /* fooImpl */ } - - fn bar() { foo(); } - `, - }); -}); - -test("imported fn calls support fn with root conflict", ctx => { - linkTest(ctx.task.name, { - linked: ` - fn main() { foo(); } - - fn conflicted() { } - - fn foo() { - conflicted0(0); - conflicted0(1); - } - - fn conflicted0(a:i32) {} - `, - }); -}); - -test("import twice with two as names", ctx => { - linkTest(ctx.task.name, { - linked: ` - fn main() { bar(); bar(); } - - fn bar() { } - `, - }); -}); - -test("import transitive conflicts with main", ctx => { - linkTest(ctx.task.name, { - linked: ` - fn main() { - mid(); - } - - fn grand() { - /* main impl */ - } - - fn mid() { grand0(); } - - fn grand0() { /* grandImpl */ } - `, - }); -}); - -test("multiple exports from the same module", ctx => { - linkTest(ctx.task.name, { - linked: ` - fn main() { - foo(); - bar(); - } - - fn foo() { } - - fn bar() { } - `, - }); -}); - -test("import and resolve conflicting support function", ctx => { - linkTest(ctx.task.name, { - linked: ` - fn support() { - bar(); - } - - fn bar() { - support0(); - } - - fn support0() { } - `, - }); -}); - -test("import support fn that references another import", ctx => { - linkTest(ctx.task.name, { - linked: ` - fn support() { - foo(); - } - - fn foo() { - support0(); - bar(); - } - - fn support0() { } - - fn bar() { - support1(); - } - - fn support1() { } - `, - }); -}); - -test("import support fn from two exports", ctx => { - linkTest(ctx.task.name, { - linked: ` - fn main() { - foo(); - bar(); - } - - fn foo() { - support(); - } - - fn bar() { - support(); - } - - fn support() { } - `, - }); -}); - -test("import a struct", ctx => { - linkTest(ctx.task.name, { - linked: ` - fn main() { - let a = AStruct(1u); - } - - struct AStruct { - x: u32 - } - `, - }); -}); - -test("import fn with support struct constructor", ctx => { - linkTest(ctx.task.name, { - linked: ` - fn main() { - let ze = elemOne(); - } - - fn elemOne() -> Elem { - return Elem(1u); - } - - struct Elem { - sum: u32 - } - `, - }); -}); - -test("import a transitive struct", ctx => { - linkTest(ctx.task.name, { - linked: ` - struct SrcStruct { - a: AStruct - } - - struct AStruct { - s: BStruct - } - - struct BStruct { - x: u32 - } - `, - }); -}); - -test("'import as' a struct", ctx => { - linkTest(ctx.task.name, { - linked: ` - fn foo (a: AA) { } - - struct AA { - x: u32 - } - `, - }); -}); - -test("import a struct with name conflicting support struct", ctx => { - linkTest(ctx.task.name, { - linked: ` - struct Base { - b: i32 - } - - fn foo() -> AStruct {let a:AStruct; return a;} - - struct AStruct { - x: Base0 - } - - struct Base0 { - x: u32 - } - `, - }); -}); - -test("copy alias to output", ctx => { - linkTest(ctx.task.name, { - linked: ` - alias MyType = u32; - `, - }); -}); - -test("copy diagnostics to output", ctx => { - linkTest(ctx.task.name, { - linked: ` - diagnostic(off,derivative_uniformity); - `, - }); -}); - -afterAll(c => { - const testNameSet = new Set(c.tasks.map(t => t.name)); - const cases = importCases.map(c => c.name); - const missing = cases.filter(name => !testNameSet.has(name)); - if (missing.length) { - console.error("Missing tests for cases:", missing); - expect("missing test: " + missing.toString()).toBe(""); - } -}); - -function linkTest(name: string, expectation: LinkExpectation): void { - const exampleSrc = examplesByName.get(name); - if (!exampleSrc) { - throw new Error(`Skipping test "${name}"\nNo example found.`); - } - const srcs = Object.entries(exampleSrc).map(([name, wgsl]) => { - const trimmedSrc = trimSrc(wgsl); - return [name, trimmedSrc] as [string, string]; - }); - const main = srcs[0][0]; - const wgsl = Object.fromEntries(srcs); - const registry = new ModuleRegistry({ wgsl }); - const result = registry.link(main); - - const { linked, includes, excludes } = expectation; - - if (linked !== undefined) { - const expectTrimmed = trimSrc(linked); - const resultTrimmed = trimSrc(result); - if (resultTrimmed !== expectTrimmed) { - const expectLines = expectTrimmed.split("\n"); - const resultLines = result.split("\n"); - expectLines.forEach((line, i) => { - expect(resultLines[i]).toBe(line); - }); - } - } - if (includes !== undefined) { - includes.forEach(inc => { - expect(result).toContain(inc); - }); - } - if (excludes !== undefined) { - excludes.forEach(exc => { - expect(result).not.toContain(exc); - }); - } -} diff --git a/packages/packager/src/main.ts b/packages/packager/src/main.ts deleted file mode 100644 index 8c28f1be8..000000000 --- a/packages/packager/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node -import { hideBin } from "yargs/helpers"; -import { packagerCli } from "./packagerCli.js"; - -const rawArgs = hideBin(process.argv); - -packagerCli(rawArgs); diff --git a/prettier.config.mjs b/prettier.config.mjs deleted file mode 100644 index 0e068db0c..000000000 --- a/prettier.config.mjs +++ /dev/null @@ -1,9 +0,0 @@ -/** - * @type {import("prettier").Config} - */ -const config = { - experimentalTernaries: true, - arrowParens: "avoid", -}; - -export default config; \ No newline at end of file From 654d7e815ac3e3962b4fa4bd9cc8da80312d66ea Mon Sep 17 00:00:00 2001 From: stefnotch Date: Fri, 8 Nov 2024 13:38:12 +0100 Subject: [PATCH 05/17] Fix circular import --- linker/ParseDirective.ts | 9 -- linker/ParseSupport.ts | 28 ++-- linker/test/ParseComments.test.ts | 8 +- .../__snapshots__/GleamImport.test.ts.snap | 151 ++++++++++++++++++ 4 files changed, 174 insertions(+), 22 deletions(-) create mode 100644 linker/test/__snapshots__/GleamImport.test.ts.snap diff --git a/linker/ParseDirective.ts b/linker/ParseDirective.ts index b5a5579b5..70c626f9f 100644 --- a/linker/ParseDirective.ts +++ b/linker/ParseDirective.ts @@ -17,8 +17,6 @@ import { gleamImport } from "./GleamImport.ts"; import { ImportTree, SimpleSegment } from "./ImportTree.ts"; import { argsTokens, - lineCommentTokens, - mainTokens, moduleTokens, } from "./MatchWgslD.ts"; import { eolf, makeElem } from "./ParseSupport.ts"; @@ -174,11 +172,6 @@ export const directive = tokens( ), ); -const skipToEol = tokens(lineCommentTokens, anyThrough(eolf)); - -/** parse a line comment */ -export const lineComment = seq(tokens(mainTokens, "//"), skipToEol); - if (tracing) { setTraceNames({ directiveArgs, @@ -192,8 +185,6 @@ if (tracing) { importDirective, extendsDirective, exportDirective, - skipToEol, - lineComment, moduleDirective, directive, }); diff --git a/linker/ParseSupport.ts b/linker/ParseSupport.ts index c06e5faaa..a87ec4921 100644 --- a/linker/ParseSupport.ts +++ b/linker/ParseSupport.ts @@ -1,6 +1,7 @@ import { any, anyNot, + anyThrough, disablePreParse, ExtendedResult, kind, @@ -12,19 +13,19 @@ import { resultLog, seq, setTraceName, + tokens, tracing, withSep, } from "@wesl/mini-parse"; -import { AbstractElem, AbstractElemBase } from "./AbstractElems.ts"; -import { argsTokens, mainTokens } from "./MatchWgslD.ts"; -import { lineComment } from "./ParseDirective.ts"; +import type { AbstractElem, AbstractElemBase } from "./AbstractElems.ts"; +import { argsTokens, lineCommentTokens, mainTokens } from "./MatchWgslD.ts"; /* Basic parsing functions for comment handling, eol, etc. */ export const word = kind(mainTokens.word); export const wordNum = or(word, kind(mainTokens.digits)); -export const unknown = any().map(r => { +export const unknown = any().map((r) => { const { kind, text } = r.value; const deepName = r.ctx._debugNames.join(" > "); @@ -38,21 +39,26 @@ export const blockComment: Parser = seq( req("*/"), ); +export const eolf: Parser = disablePreParse( + makeEolf(argsTokens, argsTokens.ws), +); + +const skipToEol = tokens(lineCommentTokens, anyThrough(eolf)); + +/** parse a line comment */ +export const lineComment = seq(tokens(mainTokens, "//"), skipToEol); + export const comment = or(() => lineComment, blockComment); // .trace({ // hide: true, // }); -export const eolf: Parser = disablePreParse( - makeEolf(argsTokens, argsTokens.ws), -); - /** ( a1, b1* ) with optional comments */ export const wordNumArgs: Parser = seq( "(", withSep(",", wordNum), req(")"), -).map(r => r.value[1]); +).map((r) => r.value[1]); type ByKind = U extends { kind: T } ? U : never; @@ -71,7 +77,7 @@ export function makeElem< U extends AbstractElem, K extends U["kind"], // 'kind' of AbtractElem "fn" E extends ByKind, // FnElem - T extends TagsType // {name: string[]} + T extends TagsType, // {name: string[]} >( kind: K, er: ExtendedResult>, @@ -90,7 +96,7 @@ function mapIfDefined( array: Partial>, firstElemOnly?: boolean, ): Partial> { - const entries = keys.flatMap(k => { + const entries = keys.flatMap((k) => { const ak = array[k]; const v = firstElemOnly ? ak?.[0] : ak; diff --git a/linker/test/ParseComments.test.ts b/linker/test/ParseComments.test.ts index 18fc7518a..f585a76b4 100644 --- a/linker/test/ParseComments.test.ts +++ b/linker/test/ParseComments.test.ts @@ -3,8 +3,12 @@ import { expectNoLogErr } from "@wesl/mini-parse/test-util"; import { expect, test } from "vitest"; import { assertSnapshot } from "@std/testing/snapshot"; -import { lineComment } from "../ParseDirective.ts"; -import { blockComment, comment, wordNumArgs } from "../ParseSupport.ts"; +import { + blockComment, + comment, + lineComment, + wordNumArgs, +} from "../ParseSupport.ts"; import { parseWgslD } from "../ParseWgslD.ts"; import { testAppParse } from "./TestUtil.ts"; diff --git a/linker/test/__snapshots__/GleamImport.test.ts.snap b/linker/test/__snapshots__/GleamImport.test.ts.snap new file mode 100644 index 000000000..a31fa05b2 --- /dev/null +++ b/linker/test/__snapshots__/GleamImport.test.ts.snap @@ -0,0 +1,151 @@ +export const snapshot = {}; + +snapshot[`import foo/bar 1`] = ` +[ + { + end: 14, + imports: ImportTree { + segments: [ + SimpleSegment { + args: undefined, + as: undefined, + name: "foo", + }, + SimpleSegment { + args: undefined, + as: undefined, + name: "bar", + }, + ], + }, + kind: "treeImport", + start: 0, + }, +] +`; + +snapshot[`import foo/* as b 1`] = ` +[ + { + end: 17, + imports: ImportTree { + segments: [ + SimpleSegment { + args: undefined, + as: undefined, + name: "foo", + }, + Wildcard { + as: "b", + }, + ], + }, + kind: "treeImport", + start: 0, + }, +] +`; + +snapshot[`import a/{ b, c/{d, e}, f/* } 1`] = ` +[ + { + end: 29, + imports: ImportTree { + segments: [ + SimpleSegment { + args: undefined, + as: undefined, + name: "a", + }, + SegmentList { + list: [ + ImportTree { + segments: [ + SimpleSegment { + args: undefined, + as: undefined, + name: "b", + }, + ], + }, + ImportTree { + segments: [ + SimpleSegment { + args: undefined, + as: undefined, + name: "c", + }, + SegmentList { + list: [ + ImportTree { + segments: [ + SimpleSegment { + args: undefined, + as: undefined, + name: "d", + }, + ], + }, + ImportTree { + segments: [ + SimpleSegment { + args: undefined, + as: undefined, + name: "e", + }, + ], + }, + ], + }, + ], + }, + ImportTree { + segments: [ + SimpleSegment { + args: undefined, + as: undefined, + name: "f", + }, + Wildcard { + as: undefined, + }, + ], + }, + ], + }, + ], + }, + kind: "treeImport", + start: 0, + }, +] +`; + +snapshot[`import ./foo/bar 1`] = ` +[ + { + end: 16, + imports: ImportTree { + segments: [ + SimpleSegment { + args: undefined, + as: undefined, + name: ".", + }, + SimpleSegment { + args: undefined, + as: undefined, + name: "foo", + }, + SimpleSegment { + args: undefined, + as: undefined, + name: "bar", + }, + ], + }, + kind: "treeImport", + start: 0, + }, +] +`; From c07980da43cca9408528e265f38a93f2729c118c Mon Sep 17 00:00:00 2001 From: stefnotch Date: Fri, 8 Nov 2024 14:14:11 +0100 Subject: [PATCH 06/17] Fix packager --- deno.lock | 28 ++++++++-- packager/deno.json | 2 + packager/main.ts | 40 ++++++++++++-- packager/packageWgsl.ts | 54 +++++++++++++------ packager/packagerCli.ts | 39 -------------- {linker => packager}/test/LinkPackage.test.ts | 0 packager/test/packager.test.ts | 30 +++++------ 7 files changed, 115 insertions(+), 78 deletions(-) delete mode 100644 packager/packagerCli.ts rename {linker => packager}/test/LinkPackage.test.ts (100%) diff --git a/deno.lock b/deno.lock index d27c6a12a..07f653591 100644 --- a/deno.lock +++ b/deno.lock @@ -6,11 +6,14 @@ "jsr:@std/async@^1.0.8": "1.0.8", "jsr:@std/data-structures@^1.0.4": "1.0.4", "jsr:@std/expect@1": "1.0.7", + "jsr:@std/fs@*": "1.0.5", "jsr:@std/fs@^1.0.5": "1.0.5", "jsr:@std/internal@^1.0.5": "1.0.5", + "jsr:@std/path@*": "1.0.8", "jsr:@std/path@^1.0.7": "1.0.8", "jsr:@std/path@^1.0.8": "1.0.8", - "jsr:@std/testing@1": "1.0.4" + "jsr:@std/testing@1": "1.0.4", + "npm:@types/node@*": "22.5.4" }, "jsr": { "@std/assert@1.0.7": { @@ -50,12 +53,23 @@ "jsr:@std/assert@^1.0.7", "jsr:@std/async", "jsr:@std/data-structures", - "jsr:@std/fs", + "jsr:@std/fs@^1.0.5", "jsr:@std/internal", "jsr:@std/path@^1.0.8" ] } }, + "npm": { + "@types/node@22.5.4": { + "integrity": "sha512-FDuKUJQm/ju9fT/SeX/6+gBzoPzlVCzfzmGkwKvRHQVxi4BntVbyIwf6a4Xn62mrvndLiml6z/UBXIdEVjQLXg==", + "dependencies": [ + "undici-types" + ] + }, + "undici-types@6.19.8": { + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==" + } + }, "redirects": { "https://deno.land/std/fmt/printf.ts": "https://deno.land/std@0.224.0/fmt/printf.ts", "https://deno.land/std/path/mod.ts": "https://deno.land/std@0.224.0/path/mod.ts", @@ -211,6 +225,14 @@ "jsr:@std/assert@1", "jsr:@std/expect@1", "jsr:@std/testing@1" - ] + ], + "members": { + "packager": { + "dependencies": [ + "jsr:@std/fs@*", + "jsr:@std/path@*" + ] + } + } } } diff --git a/packager/deno.json b/packager/deno.json index a656fe465..3bb5b40ac 100644 --- a/packager/deno.json +++ b/packager/deno.json @@ -3,6 +3,8 @@ "dev": "deno run --watch main.ts" }, "imports": { + "@std/fs": "jsr:@std/fs", + "@std/path": "jsr:@std/path", "yargs": "https://deno.land/x/yargs@v17.7.2-deno/deno.ts" } } \ No newline at end of file diff --git a/packager/main.ts b/packager/main.ts index c53205b17..c673161e7 100644 --- a/packager/main.ts +++ b/packager/main.ts @@ -1,3 +1,37 @@ -#!/usr/bin/env node -import { packagerCli } from "./packagerCli.ts"; -packagerCli(Deno.args); +#!/usr/bin/env -S deno run --allow-read --allow-write + +import yargs from "yargs"; +import { CliArgs, packageWgsl } from "./packageWgsl.ts"; + +if (import.meta.main) { + await packageWgsl(parseArgs(Deno.args)); +} + +export function parseArgs(args: string[]): CliArgs { + return ( + yargs(args) + .command("$0", "create an npm package from WGSL/WESL files") + .option("rootDir", { + type: "string", + default: ".", + describe: "base directory of WGSL/WESL files", + }) + .option("projectDir", { + type: "string", + default: ".", + describe: "directory containing package.json", + }) + // .option("updatePackageJson", { + // type: "boolean", + // default: true, + // describe: "add export entries into package.json", + // }) + .option("outDir", { + type: "string", + default: "dist", + describe: "where to put bundled output files", + }) + .help() + .parseSync() + ); +} diff --git a/packager/packageWgsl.ts b/packager/packageWgsl.ts index a12f6bf9b..6919c0f9d 100644 --- a/packager/packageWgsl.ts +++ b/packager/packageWgsl.ts @@ -1,9 +1,31 @@ -import { CliArgs } from "./packagerCli.ts"; -import { glob } from "glob"; -import fs, { mkdir } from "node:fs/promises"; import { WgslBundle } from "@wesl/linker"; -import wgslBundleDecl from "../../linker/src/WgslBundle.ts?raw"; -import { CliArgs } from "./packagerCli.js"; +import { expandGlob } from "@std/fs"; +import * as path from "@std/path"; +// TODO: Replace this with a proper npm dependency +const wgslBundleDecl = ` +export interface WgslBundle { + /** name of the package, e.g. wgsl-rand */ + name: string; + + /** npm version of the package e.g. 0.4.1 */ + version: string; + + /** wesl edition of the code e.g. wesl_unstable_2024_1 */ + edition: string; + + /** map of wesl/wgsl modules: + * keys are file paths, relative to package root (e.g. "./lib.wgsl") + * values are wgsl/wesl code strings + */ + modules: Record; +} +`; + +export type CliArgs = { + rootDir: string; + projectDir: string; + outDir: string; +}; export async function packageWgsl(args: CliArgs): Promise { const { projectDir, outDir } = args; @@ -23,14 +45,14 @@ export default wgslBundle; `; const declText = wgslBundleDecl + constDecl; const outPath = path.join(outDir, "wgslBundle.d.ts"); - await fs.writeFile(outPath, declText); + await Deno.writeTextFile(outPath, declText); } async function writeJsBundle( wgslBundle: WgslBundle, outDir: string, ): Promise { - await mkdir(outDir, { recursive: true }); + await Deno.mkdir(outDir, { recursive: true }); const bundleString = JSON.stringify(wgslBundle, null, 2); const outString = ` @@ -39,19 +61,18 @@ export const wgslBundle = ${bundleString} export default wgslBundle; `; const outPath = path.join(outDir, "wgslBundle.js"); - await fs.writeFile(outPath, outString); + await Deno.writeTextFile(outPath, outString); } async function loadModules(args: CliArgs): Promise> { const { rootDir } = args; - const shaderFiles = await glob(`${rootDir}/*.w[ge]sl`, { - ignore: "node_modules/**", - }); - const promisedSrcs = shaderFiles.map(f => - fs.readFile(f, { encoding: "utf8" }), - ); + const shaderFiles = + (await Array.fromAsync(expandGlob(`${rootDir}/*.w[ge]sl`, { + exclude: ["node_modules/**"], + }))).filter((f) => f.isFile); + const promisedSrcs = shaderFiles.map((f) => Deno.readTextFile(f.path)); const src = await Promise.all(promisedSrcs); - const relativePaths = shaderFiles.map(p => path.relative(rootDir, p)); + const relativePaths = shaderFiles.map((p) => path.relative(rootDir, p.path)); const moduleEntries = zip(relativePaths, src); return Object.fromEntries(moduleEntries); } @@ -67,7 +88,8 @@ interface PkgFields { } async function loadPackageFields(pkgJsonPath: string): Promise { - const pkgJsonString = await fs.readFile(pkgJsonPath, { encoding: "utf8" }); + console.log(pkgJsonPath); + const pkgJsonString = await Deno.readTextFile(pkgJsonPath); const pkgJson = JSON.parse(pkgJsonString); const { version, name, exports } = pkgJson; verifyField("version", version); diff --git a/packager/packagerCli.ts b/packager/packagerCli.ts deleted file mode 100644 index 1805c2db7..000000000 --- a/packager/packagerCli.ts +++ /dev/null @@ -1,39 +0,0 @@ -import yargs from "yargs"; -import { packageWgsl } from "./packageWgsl.ts"; - -export type CliArgs = ReturnType; -let cliArgs: CliArgs; - -export async function packagerCli(rawArgs: string[]): Promise { - cliArgs = parseArgs(rawArgs); - await packageWgsl(cliArgs); -} - -function parseArgs(args: string[]) { - return ( - yargs(args) - .command("$0", "create an npm package from WGSL/WESL files") - .option("rootDir", { - type: "string", - default: ".", - describe: "base directory of WGSL/WESL files", - }) - .option("projectDir", { - type: "string", - default: ".", - describe: "directory containing package.json", - }) - // .option("updatePackageJson", { - // type: "boolean", - // default: true, - // describe: "add export entries into package.json", - // }) - .option("outDir", { - type: "string", - default: "dist", - describe: "where to put bundled output files", - }) - .help() - .parseSync() - ); -} diff --git a/linker/test/LinkPackage.test.ts b/packager/test/LinkPackage.test.ts similarity index 100% rename from linker/test/LinkPackage.test.ts rename to packager/test/LinkPackage.test.ts diff --git a/packager/test/packager.test.ts b/packager/test/packager.test.ts index fbd1963dd..bde14eeec 100644 --- a/packager/test/packager.test.ts +++ b/packager/test/packager.test.ts @@ -1,24 +1,20 @@ import { expect, test } from "vitest"; -import { packagerCli } from "../packagerCli.ts"; -import { rimraf } from "rimraf"; -import path from "path"; -import { mkdir } from "node:fs/promises"; -import path from "path"; -import { rimraf } from "rimraf"; -import { test } from "vitest"; -import { packagerCli } from "../packagerCli.js"; +import * as path from "@std/path"; +import { packageWgsl } from "../packageWgsl.ts"; +import { parseArgs } from "../main.ts"; test("package two wgsl files", async () => { - const projectDir = path.join(".", "src", "test", "wgsl-package"); + const projectDir = path.join(".", "test", "wgsl-package"); const distDir = path.join(projectDir, "dist"); const srcDir = path.join(projectDir, "src"); - await rimraf(distDir); - await mkdir(distDir); - packageCli( - `--projectDir ${projectDir} --rootDir ${srcDir} --outDir ${distDir}`, + await Deno.remove(distDir, { recursive: true }); + await Deno.mkdir(distDir); + + const args = parseArgs( + `--projectDir ${projectDir} --rootDir ${srcDir} --outDir ${distDir}`.split( + /\s+/, + ), ); + expect(args.projectDir).toEqual(projectDir); + await packageWgsl(args); }); - -function packageCli(argsLine: string): Promise { - return packagerCli(argsLine.split(/\s+/)); -} From cb857d366143c3638e4bb56243772bcc27b8673c Mon Sep 17 00:00:00 2001 From: stefnotch Date: Fri, 8 Nov 2024 16:39:59 +0100 Subject: [PATCH 07/17] Migrate CLI to deno --- cli/cli.ts | 76 +++++++++++-------- cli/deno.json | 3 +- cli/main.ts | 7 +- cli/test/__snapshots__/wgsl-link.test.ts.snap | 4 +- cli/test/wgsl-link.test.ts | 45 +++++------ deno.lock | 11 ++- linker/test/ParseWgslD.test.ts | 7 +- 7 files changed, 90 insertions(+), 63 deletions(-) diff --git a/cli/cli.ts b/cli/cli.ts index 7a13241e2..f2c4d3157 100644 --- a/cli/cli.ts +++ b/cli/cli.ts @@ -1,20 +1,27 @@ -import { createTwoFilesPatch } from "diff"; -import fs from "fs"; -import { ModuleRegistry, normalize } from "wgsl-linker"; +import { ModuleRegistry, normalize } from "@wesl/linker"; import { createTwoFilesPatch } from "diff"; import { TypeRefElem } from "../linker/AbstractElems.ts"; +import yargs from "yargs"; -type CliArgs = ReturnType; -let argv: CliArgs; +// TODO: Check if these are correct, and figure out why the types are broken +type CliArgs = { + define: string[]; + baseDir: string; + separately: boolean; + details: boolean; + diff: boolean; + emit: boolean; + files: string[]; +}; export async function cli(rawArgs: string[]): Promise { - argv = parseArgs(rawArgs); + const argv = parseArgs(rawArgs); const files = argv.files as string[]; - if (argv.separately) linkSeparately(files); - else linkNormally(files); + if (argv.separately) await linkSeparately(argv, files); + else await linkNormally(argv, files); } -function parseArgs(args: string[]) { +function parseArgs(args: string[]): CliArgs { return yargs(args) .command( "$0 ", @@ -57,40 +64,44 @@ function parseArgs(args: string[]) { .parseSync(); } -function linkNormally(paths: string[]): void { - const pathAndTexts = paths.map((f) => { - const text = fs.readFileSync(f, { encoding: "utf8" }); - const basedPath = normalize(rmBaseDirPrefix(f)); - return [basedPath, text]; - }); - const wgsl = Object.fromEntries(pathAndTexts); +async function linkNormally(argv: CliArgs, paths: string[]): Promise { + const basedPaths = paths.map((path) => ({ + path: path, + basedPath: normalize(rmBaseDirPrefix(argv.baseDir, path)), + })); + const wgsl: Record = {}; + for (const { path, basedPath } of basedPaths) { + wgsl[basedPath] = await Deno.readTextFile(path); + } const registry = new ModuleRegistry({ wgsl }); - const [srcPath, srcText] = pathAndTexts[0]; - doLink(srcPath, registry, srcText); + const srcPath = basedPaths[0].basedPath; + const srcText = wgsl[srcPath]; + doLink(argv, srcPath, registry, srcText); } -function linkSeparately(paths: string[]): void { - paths.forEach((f) => { - const srcText = fs.readFileSync(f, { encoding: "utf8" }); - const basedPath = normalize(rmBaseDirPrefix(f)); +async function linkSeparately(argv: CliArgs, paths: string[]): Promise { + for (const path of paths) { + const srcText = await Deno.readTextFile(path); + const basedPath = normalize(rmBaseDirPrefix(argv.baseDir, path)); const registry = new ModuleRegistry({ wgsl: { [basedPath]: srcText } }); - doLink(basedPath, registry, srcText); - }); + doLink(argv, basedPath, registry, srcText); + } } function doLink( + argv: CliArgs, srcPath: string, registry: ModuleRegistry, origWgsl: string, ): void { const asRelative = "./" + srcPath; - const linked = registry.link(asRelative, externalDefines()); + const linked = registry.link(asRelative, externalDefines(argv)); if (argv.emit) console.log(linked); if (argv.diff) printDiff(srcPath, origWgsl, linked); - if (argv.details) printDetails(srcPath, registry); + if (argv.details) printDetails(argv, srcPath, registry); } -function externalDefines(): Record { +function externalDefines(argv: CliArgs): Record { if (!argv.define) return {}; const pairs = argv.define.map((d) => d.toString().split("=")); @@ -123,9 +134,13 @@ function printDiff(modulePath: string, src: string, linked: string): void { } } -function printDetails(modulePath: string, registry: ModuleRegistry): void { +function printDetails( + argv: CliArgs, + modulePath: string, + registry: ModuleRegistry, +): void { console.log(modulePath, ":"); - const parsed = registry.parsed(externalDefines()); + const parsed = registry.parsed(externalDefines(argv)); const m = parsed.findTextModule(modulePath)!; m.fns.forEach((f) => { console.log(` fn ${f.name}`); @@ -151,8 +166,7 @@ function printTypeRefs(hasTypeRefs: { typeRefs: TypeRefElem[] }): void { console.log(` typeRefs: ${typeRefs}`); } -function rmBaseDirPrefix(path: string): string { - const baseDir = argv.baseDir; +function rmBaseDirPrefix(baseDir: string, path: string): string { if (baseDir) { const found = path.indexOf(baseDir); if (found !== -1) { diff --git a/cli/deno.json b/cli/deno.json index 86da9cac2..d0687630f 100644 --- a/cli/deno.json +++ b/cli/deno.json @@ -4,6 +4,7 @@ "dev": "deno run --watch main.ts" }, "imports": { - "yargs": "https://deno.land/x/yargs@v17.7.2-deno/deno.ts" + "yargs": "https://deno.land/x/yargs@v17.7.2-deno/deno.ts", + "diff": "npm:diff" } } \ No newline at end of file diff --git a/cli/main.ts b/cli/main.ts index 500f549dc..3e1982227 100644 --- a/cli/main.ts +++ b/cli/main.ts @@ -1,3 +1,6 @@ -#!/usr/bin/env node +#!/usr/bin/env -S deno run --allow-read --allow-write import { cli } from "./cli.ts"; -cli(Deno.args); + +if (import.meta.main) { + await cli(Deno.args); +} diff --git a/cli/test/__snapshots__/wgsl-link.test.ts.snap b/cli/test/__snapshots__/wgsl-link.test.ts.snap index 0e8f7c23f..f4f6b5770 100644 --- a/cli/test/__snapshots__/wgsl-link.test.ts.snap +++ b/cli/test/__snapshots__/wgsl-link.test.ts.snap @@ -1,6 +1,6 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html +export const snapshot = {}; -exports[`simple link 1`] = ` +snapshot[`simple link 1`] = ` "fn main() { foo(); } diff --git a/cli/test/wgsl-link.test.ts b/cli/test/wgsl-link.test.ts index 24054d086..456a3d3ec 100644 --- a/cli/test/wgsl-link.test.ts +++ b/cli/test/wgsl-link.test.ts @@ -1,36 +1,31 @@ -import { expect, test, vi } from "vitest"; +import { expect, test } from "vitest"; +import { stub } from "@std/testing/mock"; import { cli } from "../cli.ts"; +import { assertSnapshot } from "@std/testing/snapshot"; /** so vitest triggers when these files change */ -import("./src/test/wgsl/main.wgsl?raw"); -import("./src/test/wgsl/util.wgsl?raw"); +// Deno doesn't support this at the moment :( +// https://github.com/denoland/deno/issues/17994#issuecomment-1879636936 hasn't materialized yet +// import("./src/test/wgsl/main.wgsl?raw"); +// import("./src/test/wgsl/util.wgsl?raw"); -test("simple link", async () => { - const logged = await cliLine( - `./src/test/wgsl/main.wgsl - ./src/test/wgsl/util.wgsl`, +test("simple link", async (ctx) => { + using consoleStub = stub(console, "log", () => {}); + await cli( + `./test/wgsl/main.wgsl + ./test/wgsl/util.wgsl`.split(/\s+/), ); - expect(logged).toMatchSnapshot(); + const logged = consoleStub.calls[0].args.join(""); + await assertSnapshot(ctx, logged); }); test("link with definition", async () => { - const logged = await cliLine( - `./src/test/wgsl/main.wgsl - ./src/test/wgsl/util.wgsl - --define EXTRA=true`, + using consoleStub = stub(console, "log", () => {}); + await cli( + `./test/wgsl/main.wgsl + ./test/wgsl/util.wgsl + --define EXTRA=true`.split(/\s+/), ); + const logged = consoleStub.calls[0].args.join(""); expect(logged).toContain("fn extra()"); }); - -async function cliLine(argsLine: string): Promise { - return await withConsoleSpy(() => cli(argsLine.split(/\s+/))); -} - -async function withConsoleSpy(fn: () => Promise): Promise { - const consoleSpy = vi.spyOn(console, "log").mockImplementation(() => {}); - - await fn(); - const result = consoleSpy.mock.calls[0].join(""); - vi.resetAllMocks(); - return result; -} diff --git a/deno.lock b/deno.lock index 07f653591..5511061bc 100644 --- a/deno.lock +++ b/deno.lock @@ -13,7 +13,8 @@ "jsr:@std/path@^1.0.7": "1.0.8", "jsr:@std/path@^1.0.8": "1.0.8", "jsr:@std/testing@1": "1.0.4", - "npm:@types/node@*": "22.5.4" + "npm:@types/node@*": "22.5.4", + "npm:diff@*": "7.0.0" }, "jsr": { "@std/assert@1.0.7": { @@ -66,6 +67,9 @@ "undici-types" ] }, + "diff@7.0.0": { + "integrity": "sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==" + }, "undici-types@6.19.8": { "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==" } @@ -227,6 +231,11 @@ "jsr:@std/testing@1" ], "members": { + "cli": { + "dependencies": [ + "npm:diff@*" + ] + }, "packager": { "dependencies": [ "jsr:@std/fs@*", diff --git a/linker/test/ParseWgslD.test.ts b/linker/test/ParseWgslD.test.ts index 4bcadb937..c638f287e 100644 --- a/linker/test/ParseWgslD.test.ts +++ b/linker/test/ParseWgslD.test.ts @@ -3,7 +3,12 @@ import { expectNoLogErr, logCatch } from "@wesl/mini-parse/test-util"; import { expect, test } from "vitest"; import { assertSnapshot } from "@std/testing/snapshot"; -import { AbstractElem, FnElem, StructElem, VarElem } from "../AbstractElems.ts"; +import type { + AbstractElem, + FnElem, + StructElem, + VarElem, +} from "../AbstractElems.ts"; import { filterElems } from "../ParseModule.ts"; import { unknown, wordNumArgs } from "../ParseSupport.ts"; import { From f1a72e55efe1f88096e4d4250d5a720561da856f Mon Sep 17 00:00:00 2001 From: stefnotch Date: Fri, 8 Nov 2024 20:21:07 +0100 Subject: [PATCH 08/17] Add node_modules/ to make switching branches easier --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 77738287f..763301fc0 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -dist/ \ No newline at end of file +dist/ +node_modules/ \ No newline at end of file From 9b9f060fc95ac58572305afceb57e680205f9161 Mon Sep 17 00:00:00 2001 From: stefnotch Date: Fri, 8 Nov 2024 20:40:45 +0100 Subject: [PATCH 09/17] Fix type definitions --- cli/cli.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/cli.ts b/cli/cli.ts index f2c4d3157..65ca5b035 100644 --- a/cli/cli.ts +++ b/cli/cli.ts @@ -5,8 +5,8 @@ import yargs from "yargs"; // TODO: Check if these are correct, and figure out why the types are broken type CliArgs = { - define: string[]; - baseDir: string; + define?: (string | number)[]; + baseDir?: string; separately: boolean; details: boolean; diff: boolean; @@ -166,7 +166,7 @@ function printTypeRefs(hasTypeRefs: { typeRefs: TypeRefElem[] }): void { console.log(` typeRefs: ${typeRefs}`); } -function rmBaseDirPrefix(baseDir: string, path: string): string { +function rmBaseDirPrefix(baseDir: string | undefined, path: string): string { if (baseDir) { const found = path.indexOf(baseDir); if (found !== -1) { From b9268cd78f4997ea8f530686ea3d0109633af019 Mon Sep 17 00:00:00 2001 From: stefnotch Date: Wed, 13 Nov 2024 11:37:24 +0100 Subject: [PATCH 10/17] Use .ts file extension everywhere --- package.json | 3 ++- packages/bench/tsconfig.json | 1 + packages/bulk-test/bin/pickBoatShaders.ts | 2 +- packages/bulk-test/bin/writeParallelTests.ts | 4 +-- .../bulk-test/src/test/parallel-0.test.ts | 4 +-- .../bulk-test/src/test/parallel-1.test.ts | 4 +-- .../bulk-test/src/test/parallel-10.test.ts | 4 +-- .../bulk-test/src/test/parallel-11.test.ts | 4 +-- .../bulk-test/src/test/parallel-12.test.ts | 4 +-- .../bulk-test/src/test/parallel-13.test.ts | 4 +-- .../bulk-test/src/test/parallel-14.test.ts | 4 +-- .../bulk-test/src/test/parallel-15.test.ts | 4 +-- .../bulk-test/src/test/parallel-2.test.ts | 4 +-- .../bulk-test/src/test/parallel-3.test.ts | 4 +-- .../bulk-test/src/test/parallel-4.test.ts | 4 +-- .../bulk-test/src/test/parallel-5.test.ts | 4 +-- .../bulk-test/src/test/parallel-6.test.ts | 4 +-- .../bulk-test/src/test/parallel-7.test.ts | 4 +-- .../bulk-test/src/test/parallel-8.test.ts | 4 +-- .../bulk-test/src/test/parallel-9.test.ts | 4 +-- packages/cli/src/cli.ts | 2 +- packages/cli/src/main.ts | 2 +- packages/cli/src/test/wgsl-link.test.ts | 2 +- packages/cli/tsconfig.json | 1 + packages/linker/package.json | 4 +-- packages/linker/src/AbstractElems.ts | 4 +-- packages/linker/src/GleamImport.ts | 8 +++--- packages/linker/src/ImportResolutionMap.ts | 12 ++++----- packages/linker/src/LinkedElems.ts | 4 +-- packages/linker/src/Linker.ts | 12 ++++----- packages/linker/src/LinkerLogging.ts | 6 ++--- packages/linker/src/LogResolveMap.ts | 4 +-- packages/linker/src/ModuleRegistry.ts | 8 +++--- packages/linker/src/ParseDirective.ts | 26 ++++++++----------- packages/linker/src/ParseModule.ts | 4 +-- packages/linker/src/ParseSupport.ts | 6 ++--- packages/linker/src/ParseWgslD.ts | 8 +++--- packages/linker/src/ParsedRegistry.ts | 12 ++++----- packages/linker/src/RefDebug.ts | 4 +-- packages/linker/src/ResolveImport.ts | 8 +++--- packages/linker/src/Slicer.ts | 2 +- packages/linker/src/TraverseRefs.ts | 14 +++++----- packages/linker/src/index.ts | 12 ++++----- packages/linker/src/test/GleamImport.test.ts | 2 +- packages/linker/src/test/ImportCases.test.ts | 4 +-- .../src/test/ImportResolutionMap.test.ts | 8 +++--- .../linker/src/test/ImportSyntaxCases.test.ts | 2 +- packages/linker/src/test/LinkGlob.test.ts | 2 +- packages/linker/src/test/LinkPackage.test.ts | 2 +- packages/linker/src/test/Linker.test.ts | 4 +-- packages/linker/src/test/MatchWgslD.test.ts | 2 +- .../linker/src/test/ModuleRegistry.test.ts | 2 +- .../linker/src/test/ParseComments.test.ts | 8 +++--- .../linker/src/test/ParseDirectives.test.ts | 10 +++---- packages/linker/src/test/ParseModule.test.ts | 2 +- packages/linker/src/test/ParseWgslD.test.ts | 10 +++---- packages/linker/src/test/PathUtil.test.ts | 2 +- .../linker/src/test/ResolveImport.test.ts | 8 +++--- packages/linker/src/test/Slicer.test.ts | 2 +- packages/linker/src/test/TestUtil.ts | 6 ++--- packages/linker/src/test/TraverseRefs.test.ts | 6 ++--- packages/linker/src/test/Util.test.ts | 2 +- .../src/test/shared/test/StringUtil.test.ts | 2 +- packages/mini-parse/src/CombinatorTypes.ts | 2 +- packages/mini-parse/src/MatchingLexer.ts | 8 +++--- packages/mini-parse/src/Parser.ts | 14 +++++----- packages/mini-parse/src/ParserCombinator.ts | 12 ++++----- packages/mini-parse/src/ParserLogging.ts | 6 ++--- packages/mini-parse/src/ParserTracing.ts | 2 +- packages/mini-parse/src/TokenMatcher.ts | 2 +- .../mini-parse/src/examples/BlogExample.ts | 6 ++--- .../src/examples/CalculatorExample.ts | 8 +++--- .../src/examples/CalculatorResultsExample.ts | 8 +++--- .../mini-parse/src/examples/DocExamples.ts | 4 +-- packages/mini-parse/src/index.ts | 14 +++++----- .../mini-parse/src/test-util/TestParse.ts | 2 +- packages/mini-parse/src/test-util/index.ts | 4 +-- .../mini-parse/src/test/BlogExample.test.ts | 6 ++--- .../src/test/CalculatorExample.test.ts | 6 ++--- .../src/test/CalculatorResultsExample.test.ts | 6 ++--- .../src/test/ParserCombinator.test.ts | 6 ++--- .../mini-parse/src/test/ParserLogging.test.ts | 6 ++--- .../mini-parse/src/test/ParserUtil.test.ts | 2 +- packages/mini-parse/src/test/SrcMap.test.ts | 2 +- packages/mini-parse/src/test/TestSetup.ts | 2 +- .../mini-parse/src/test/TokenMatcher.test.ts | 2 +- packages/mini-parse/tsconfig.json | 1 + packages/packager/src/main.ts | 2 +- packages/packager/src/packageWgsl.ts | 4 +-- packages/packager/src/packagerCli.ts | 2 +- packages/packager/src/test/packager.test.ts | 2 +- packages/packager/tsconfig.json | 1 + 92 files changed, 234 insertions(+), 233 deletions(-) diff --git a/package.json b/package.json index 87dbef623..7838b2a46 100644 --- a/package.json +++ b/package.json @@ -37,5 +37,6 @@ "vitest": "^2.1.4", "wesl-testsuite": "file:../wesl-testsuite", "yargs": "^17.7.2" - } + }, + "packageManager": "pnpm@9.12.3+sha512.cce0f9de9c5a7c95bef944169cc5dfe8741abfb145078c0d508b868056848a87c81e626246cb60967cbd7fd29a6c062ef73ff840d96b3c86c40ac92cf4a813ee" } diff --git a/packages/bench/tsconfig.json b/packages/bench/tsconfig.json index bab509e03..c35eeff34 100644 --- a/packages/bench/tsconfig.json +++ b/packages/bench/tsconfig.json @@ -14,6 +14,7 @@ "importsNotUsedAsValues": "remove", "resolveJsonModule": true, "isolatedModules": true, + "allowImportingTsExtensions": true, "noEmit": true, "paths": { "wgsl-linker": ["../linker/src"], diff --git a/packages/bulk-test/bin/pickBoatShaders.ts b/packages/bulk-test/bin/pickBoatShaders.ts index dedffe20d..234be70ac 100644 --- a/packages/bulk-test/bin/pickBoatShaders.ts +++ b/packages/bulk-test/bin/pickBoatShaders.ts @@ -1,5 +1,5 @@ import { dlogOpt } from "berry-pretty"; -import { uniquishFiles } from "../src/util/uniqueDocs.js"; +import { uniquishFiles } from "../src/util/uniqueDocs.ts"; /* The boat_attack sample shaders have significantly internal duplication * This script tries to find the relatively unique shaders for testing. diff --git a/packages/bulk-test/bin/writeParallelTests.ts b/packages/bulk-test/bin/writeParallelTests.ts index a7846c37e..906fca1aa 100644 --- a/packages/bulk-test/bin/writeParallelTests.ts +++ b/packages/bulk-test/bin/writeParallelTests.ts @@ -18,8 +18,8 @@ async function writeFiles(): Promise { function testText(i: number) { return ` -import { pathSets } from "../parallelDriver.js"; -import { testWgslFiles } from "../parallelTest.js"; +import { pathSets } from "../parallelDriver.ts"; +import { testWgslFiles } from "../parallelTest.ts"; testWgslFiles(pathSets[${i}]); `; diff --git a/packages/bulk-test/src/test/parallel-0.test.ts b/packages/bulk-test/src/test/parallel-0.test.ts index bc493f8fc..9ae7646bd 100644 --- a/packages/bulk-test/src/test/parallel-0.test.ts +++ b/packages/bulk-test/src/test/parallel-0.test.ts @@ -1,4 +1,4 @@ -import { pathSets } from "../parallelDriver.js"; -import { testWgslFiles } from "../parallelTest.js"; +import { pathSets } from "../parallelDriver.ts"; +import { testWgslFiles } from "../parallelTest.ts"; testWgslFiles(pathSets[0]); diff --git a/packages/bulk-test/src/test/parallel-1.test.ts b/packages/bulk-test/src/test/parallel-1.test.ts index 67a696d9b..e4480fc94 100644 --- a/packages/bulk-test/src/test/parallel-1.test.ts +++ b/packages/bulk-test/src/test/parallel-1.test.ts @@ -1,4 +1,4 @@ -import { pathSets } from "../parallelDriver.js"; -import { testWgslFiles } from "../parallelTest.js"; +import { pathSets } from "../parallelDriver.ts"; +import { testWgslFiles } from "../parallelTest.ts"; testWgslFiles(pathSets[1]); diff --git a/packages/bulk-test/src/test/parallel-10.test.ts b/packages/bulk-test/src/test/parallel-10.test.ts index 0812a4e06..8bdb1f5ce 100644 --- a/packages/bulk-test/src/test/parallel-10.test.ts +++ b/packages/bulk-test/src/test/parallel-10.test.ts @@ -1,4 +1,4 @@ -import { pathSets } from "../parallelDriver.js"; -import { testWgslFiles } from "../parallelTest.js"; +import { pathSets } from "../parallelDriver.ts"; +import { testWgslFiles } from "../parallelTest.ts"; testWgslFiles(pathSets[10]); diff --git a/packages/bulk-test/src/test/parallel-11.test.ts b/packages/bulk-test/src/test/parallel-11.test.ts index ca9df5bbb..36819fd94 100644 --- a/packages/bulk-test/src/test/parallel-11.test.ts +++ b/packages/bulk-test/src/test/parallel-11.test.ts @@ -1,4 +1,4 @@ -import { pathSets } from "../parallelDriver.js"; -import { testWgslFiles } from "../parallelTest.js"; +import { pathSets } from "../parallelDriver.ts"; +import { testWgslFiles } from "../parallelTest.ts"; testWgslFiles(pathSets[11]); diff --git a/packages/bulk-test/src/test/parallel-12.test.ts b/packages/bulk-test/src/test/parallel-12.test.ts index 817dc7496..27b35160e 100644 --- a/packages/bulk-test/src/test/parallel-12.test.ts +++ b/packages/bulk-test/src/test/parallel-12.test.ts @@ -1,4 +1,4 @@ -import { pathSets } from "../parallelDriver.js"; -import { testWgslFiles } from "../parallelTest.js"; +import { pathSets } from "../parallelDriver.ts"; +import { testWgslFiles } from "../parallelTest.ts"; testWgslFiles(pathSets[12]); diff --git a/packages/bulk-test/src/test/parallel-13.test.ts b/packages/bulk-test/src/test/parallel-13.test.ts index 452fbd247..75e53d0e3 100644 --- a/packages/bulk-test/src/test/parallel-13.test.ts +++ b/packages/bulk-test/src/test/parallel-13.test.ts @@ -1,4 +1,4 @@ -import { pathSets } from "../parallelDriver.js"; -import { testWgslFiles } from "../parallelTest.js"; +import { pathSets } from "../parallelDriver.ts"; +import { testWgslFiles } from "../parallelTest.ts"; testWgslFiles(pathSets[13]); diff --git a/packages/bulk-test/src/test/parallel-14.test.ts b/packages/bulk-test/src/test/parallel-14.test.ts index 45f0506dc..5f09f0f76 100644 --- a/packages/bulk-test/src/test/parallel-14.test.ts +++ b/packages/bulk-test/src/test/parallel-14.test.ts @@ -1,4 +1,4 @@ -import { pathSets } from "../parallelDriver.js"; -import { testWgslFiles } from "../parallelTest.js"; +import { pathSets } from "../parallelDriver.ts"; +import { testWgslFiles } from "../parallelTest.ts"; testWgslFiles(pathSets[14]); diff --git a/packages/bulk-test/src/test/parallel-15.test.ts b/packages/bulk-test/src/test/parallel-15.test.ts index 5d0c910c2..9d89c1d91 100644 --- a/packages/bulk-test/src/test/parallel-15.test.ts +++ b/packages/bulk-test/src/test/parallel-15.test.ts @@ -1,4 +1,4 @@ -import { pathSets } from "../parallelDriver.js"; -import { testWgslFiles } from "../parallelTest.js"; +import { pathSets } from "../parallelDriver.ts"; +import { testWgslFiles } from "../parallelTest.ts"; testWgslFiles(pathSets[15]); diff --git a/packages/bulk-test/src/test/parallel-2.test.ts b/packages/bulk-test/src/test/parallel-2.test.ts index ba8bf4b61..35c28f2f6 100644 --- a/packages/bulk-test/src/test/parallel-2.test.ts +++ b/packages/bulk-test/src/test/parallel-2.test.ts @@ -1,4 +1,4 @@ -import { pathSets } from "../parallelDriver.js"; -import { testWgslFiles } from "../parallelTest.js"; +import { pathSets } from "../parallelDriver.ts"; +import { testWgslFiles } from "../parallelTest.ts"; testWgslFiles(pathSets[2]); diff --git a/packages/bulk-test/src/test/parallel-3.test.ts b/packages/bulk-test/src/test/parallel-3.test.ts index 0774310ff..2db2b4d06 100644 --- a/packages/bulk-test/src/test/parallel-3.test.ts +++ b/packages/bulk-test/src/test/parallel-3.test.ts @@ -1,4 +1,4 @@ -import { pathSets } from "../parallelDriver.js"; -import { testWgslFiles } from "../parallelTest.js"; +import { pathSets } from "../parallelDriver.ts"; +import { testWgslFiles } from "../parallelTest.ts"; testWgslFiles(pathSets[3]); diff --git a/packages/bulk-test/src/test/parallel-4.test.ts b/packages/bulk-test/src/test/parallel-4.test.ts index b09f9a289..476ea840a 100644 --- a/packages/bulk-test/src/test/parallel-4.test.ts +++ b/packages/bulk-test/src/test/parallel-4.test.ts @@ -1,4 +1,4 @@ -import { pathSets } from "../parallelDriver.js"; -import { testWgslFiles } from "../parallelTest.js"; +import { pathSets } from "../parallelDriver.ts"; +import { testWgslFiles } from "../parallelTest.ts"; testWgslFiles(pathSets[4]); diff --git a/packages/bulk-test/src/test/parallel-5.test.ts b/packages/bulk-test/src/test/parallel-5.test.ts index b728b2572..cb7d1624d 100644 --- a/packages/bulk-test/src/test/parallel-5.test.ts +++ b/packages/bulk-test/src/test/parallel-5.test.ts @@ -1,4 +1,4 @@ -import { pathSets } from "../parallelDriver.js"; -import { testWgslFiles } from "../parallelTest.js"; +import { pathSets } from "../parallelDriver.ts"; +import { testWgslFiles } from "../parallelTest.ts"; testWgslFiles(pathSets[5]); diff --git a/packages/bulk-test/src/test/parallel-6.test.ts b/packages/bulk-test/src/test/parallel-6.test.ts index ae5e0ee8c..1e8c291d6 100644 --- a/packages/bulk-test/src/test/parallel-6.test.ts +++ b/packages/bulk-test/src/test/parallel-6.test.ts @@ -1,4 +1,4 @@ -import { pathSets } from "../parallelDriver.js"; -import { testWgslFiles } from "../parallelTest.js"; +import { pathSets } from "../parallelDriver.ts"; +import { testWgslFiles } from "../parallelTest.ts"; testWgslFiles(pathSets[6]); diff --git a/packages/bulk-test/src/test/parallel-7.test.ts b/packages/bulk-test/src/test/parallel-7.test.ts index b3c58d9cb..e2c052710 100644 --- a/packages/bulk-test/src/test/parallel-7.test.ts +++ b/packages/bulk-test/src/test/parallel-7.test.ts @@ -1,4 +1,4 @@ -import { pathSets } from "../parallelDriver.js"; -import { testWgslFiles } from "../parallelTest.js"; +import { pathSets } from "../parallelDriver.ts"; +import { testWgslFiles } from "../parallelTest.ts"; testWgslFiles(pathSets[7]); diff --git a/packages/bulk-test/src/test/parallel-8.test.ts b/packages/bulk-test/src/test/parallel-8.test.ts index 7954582dd..5ab3c23d5 100644 --- a/packages/bulk-test/src/test/parallel-8.test.ts +++ b/packages/bulk-test/src/test/parallel-8.test.ts @@ -1,4 +1,4 @@ -import { pathSets } from "../parallelDriver.js"; -import { testWgslFiles } from "../parallelTest.js"; +import { pathSets } from "../parallelDriver.ts"; +import { testWgslFiles } from "../parallelTest.ts"; testWgslFiles(pathSets[8]); diff --git a/packages/bulk-test/src/test/parallel-9.test.ts b/packages/bulk-test/src/test/parallel-9.test.ts index 3b6c6aa2f..5b840c665 100644 --- a/packages/bulk-test/src/test/parallel-9.test.ts +++ b/packages/bulk-test/src/test/parallel-9.test.ts @@ -1,4 +1,4 @@ -import { pathSets } from "../parallelDriver.js"; -import { testWgslFiles } from "../parallelTest.js"; +import { pathSets } from "../parallelDriver.ts"; +import { testWgslFiles } from "../parallelTest.ts"; testWgslFiles(pathSets[9]); diff --git a/packages/cli/src/cli.ts b/packages/cli/src/cli.ts index 8903b1d21..69b93a892 100644 --- a/packages/cli/src/cli.ts +++ b/packages/cli/src/cli.ts @@ -2,7 +2,7 @@ import { createTwoFilesPatch } from "diff"; import fs from "fs"; import { ModuleRegistry, normalize } from "wgsl-linker"; import yargs from "yargs"; -import { TypeRefElem } from "../../linker/src/AbstractElems.js"; +import { TypeRefElem } from "../../linker/src/AbstractElems.ts"; type CliArgs = ReturnType; let argv: CliArgs; diff --git a/packages/cli/src/main.ts b/packages/cli/src/main.ts index bf6e922cb..c9aa79836 100644 --- a/packages/cli/src/main.ts +++ b/packages/cli/src/main.ts @@ -1,6 +1,6 @@ #!/usr/bin/env node import { hideBin } from "yargs/helpers"; -import { cli } from "./cli.js"; +import { cli } from "./cli.ts"; const rawArgs = hideBin(process.argv); diff --git a/packages/cli/src/test/wgsl-link.test.ts b/packages/cli/src/test/wgsl-link.test.ts index 3c01ea7c1..1fc305667 100644 --- a/packages/cli/src/test/wgsl-link.test.ts +++ b/packages/cli/src/test/wgsl-link.test.ts @@ -1,5 +1,5 @@ import { expect, test, vi } from "vitest"; -import { cli } from "../cli.js"; +import { cli } from "../cli.ts"; /** so vitest triggers when these files change */ import("./src/test/wgsl/main.wgsl?raw"); diff --git a/packages/cli/tsconfig.json b/packages/cli/tsconfig.json index e65418e9b..815781387 100644 --- a/packages/cli/tsconfig.json +++ b/packages/cli/tsconfig.json @@ -14,6 +14,7 @@ "importsNotUsedAsValues": "remove", "resolveJsonModule": true, "isolatedModules": true, + "allowImportingTsExtensions": true, "noEmit": true, "paths": { "wgsl-linker": ["../linker/src"], diff --git a/packages/linker/package.json b/packages/linker/package.json index 525797ae4..19185e11b 100644 --- a/packages/linker/package.json +++ b/packages/linker/package.json @@ -9,7 +9,7 @@ "build:readme": "ncp ../../README.md README.md", "build": "run-s build:main build:minified", "build:main": "vite build", - "build:minified": "vite build -c minified.vite.config.js", + "build:minified": "vite build -c minified.vite.config.ts", "build:brotli": "brotli -f dist/minified.cjs && ls -l dist/minified.cjs.br", "build:size": "run-s build:minified build:brotli", "format": "prettier . --write", @@ -44,4 +44,4 @@ "vitest": "^2.1.4", "wgsl-rand": "workspace:*" } -} +} \ No newline at end of file diff --git a/packages/linker/src/AbstractElems.ts b/packages/linker/src/AbstractElems.ts index 364064569..f916658d2 100644 --- a/packages/linker/src/AbstractElems.ts +++ b/packages/linker/src/AbstractElems.ts @@ -1,7 +1,7 @@ /** Structures for the abstract syntax tree constructed by the parser. */ -import { ImportTree } from "./ImportTree.js"; -import { FoundRef } from "./TraverseRefs.js"; +import { ImportTree } from "./ImportTree.ts"; +import { FoundRef } from "./TraverseRefs.ts"; export type AbstractElem = | AliasElem diff --git a/packages/linker/src/GleamImport.ts b/packages/linker/src/GleamImport.ts index 42a548b43..5b130271b 100644 --- a/packages/linker/src/GleamImport.ts +++ b/packages/linker/src/GleamImport.ts @@ -18,16 +18,16 @@ import { withSepPlus, withTags, } from "mini-parse"; -import { TreeImportElem } from "./AbstractElems.js"; +import { TreeImportElem } from "./AbstractElems.ts"; import { ImportTree, PathSegment, SegmentList, SimpleSegment, Wildcard, -} from "./ImportTree.js"; -import { digits, eol, word } from "./MatchWgslD.js"; -import { makeElem } from "./ParseSupport.js"; +} from "./ImportTree.ts"; +import { digits, eol, word } from "./MatchWgslD.ts"; +import { makeElem } from "./ParseSupport.ts"; const gleamImportSymbolSet = "/ { } , ( ) .. . * ;"; const gleamImportSymbol = matchOneOf(gleamImportSymbolSet); diff --git a/packages/linker/src/ImportResolutionMap.ts b/packages/linker/src/ImportResolutionMap.ts index c0e236308..b369da62d 100644 --- a/packages/linker/src/ImportResolutionMap.ts +++ b/packages/linker/src/ImportResolutionMap.ts @@ -1,15 +1,15 @@ -import { TreeImportElem } from "./AbstractElems.js"; +import { TreeImportElem } from "./AbstractElems.ts"; import { ImportTree, PathSegment, SegmentList, SimpleSegment, Wildcard, -} from "./ImportTree.js"; -import { ModuleExport } from "./ModuleRegistry.js"; -import { ParsedRegistry } from "./ParsedRegistry.js"; -import { TextModule } from "./ParseModule.js"; -import { dirname, normalize } from "./PathUtil.js"; +} from "./ImportTree.ts"; +import { ModuleExport } from "./ModuleRegistry.ts"; +import { ParsedRegistry } from "./ParsedRegistry.ts"; +import { TextModule } from "./ParseModule.ts"; +import { dirname, normalize } from "./PathUtil.ts"; /** * Maps to resolve imports to exports. diff --git a/packages/linker/src/LinkedElems.ts b/packages/linker/src/LinkedElems.ts index 324e2550d..c2182ce59 100644 --- a/packages/linker/src/LinkedElems.ts +++ b/packages/linker/src/LinkedElems.ts @@ -1,5 +1,5 @@ -import { CallElem, FnElem } from "./AbstractElems.js"; -import { TextModule } from "./ParseModule.js"; +import { CallElem, FnElem } from "./AbstractElems.ts"; +import { TextModule } from "./ParseModule.ts"; /** this is starting to look a lot like a FoundRef */ export interface LinkedCall { diff --git a/packages/linker/src/Linker.ts b/packages/linker/src/Linker.ts index c7056025d..55205b333 100644 --- a/packages/linker/src/Linker.ts +++ b/packages/linker/src/Linker.ts @@ -6,12 +6,12 @@ import { StructMemberElem, TypeRefElem, VarElem, -} from "./AbstractElems.js"; -import { RegistryParams } from "./ModuleRegistry.js"; -import { ParsedRegistry } from "./ParsedRegistry.js"; -import { TextModule } from "./ParseModule.js"; -import { SliceReplace, sliceReplace } from "./Slicer.js"; -import { FoundRef, TextRef, traverseRefs } from "./TraverseRefs.js"; +} from "./AbstractElems.ts"; +import { RegistryParams } from "./ModuleRegistry.ts"; +import { ParsedRegistry } from "./ParsedRegistry.ts"; +import { TextModule } from "./ParseModule.ts"; +import { SliceReplace, sliceReplace } from "./Slicer.ts"; +import { FoundRef, TextRef, traverseRefs } from "./TraverseRefs.ts"; type DirectiveRef = { kind: "dir"; diff --git a/packages/linker/src/LinkerLogging.ts b/packages/linker/src/LinkerLogging.ts index 9ee880ea2..c54451d38 100644 --- a/packages/linker/src/LinkerLogging.ts +++ b/packages/linker/src/LinkerLogging.ts @@ -1,7 +1,7 @@ import { srcLog } from "mini-parse"; -import { AbstractElem } from "./AbstractElems.js"; -import { TextModule } from "./ParseModule.js"; -import { FoundRef } from "./TraverseRefs.js"; +import { AbstractElem } from "./AbstractElems.ts"; +import { TextModule } from "./ParseModule.ts"; +import { FoundRef } from "./TraverseRefs.ts"; export function refLog(ref: FoundRef, ...msgs: any[]): void { moduleLog(ref.expMod, [ref.elem.start, ref.elem.end], ...msgs); diff --git a/packages/linker/src/LogResolveMap.ts b/packages/linker/src/LogResolveMap.ts index e35f1c426..0edc31055 100644 --- a/packages/linker/src/LogResolveMap.ts +++ b/packages/linker/src/LogResolveMap.ts @@ -1,4 +1,4 @@ -import { ResolveMap } from "./ImportResolutionMap.js"; +import { ResolveMap } from "./ImportResolutionMap.ts"; export function logResolveMap(resolveMap: ResolveMap): void { const pathEntries = pathsToStrings(resolveMap); @@ -19,4 +19,4 @@ export function exportsToStrings(resolveMap: ResolveMap): string[] { const expPath = `${modulePath}/${exp.modExp.exp.ref.name}`; return `${imp} -> ${expPath}`; }); -} \ No newline at end of file +} diff --git a/packages/linker/src/ModuleRegistry.ts b/packages/linker/src/ModuleRegistry.ts index 751a38038..ebc8aca4a 100644 --- a/packages/linker/src/ModuleRegistry.ts +++ b/packages/linker/src/ModuleRegistry.ts @@ -1,7 +1,7 @@ -import { ParsedRegistry } from "./ParsedRegistry.js"; -import { TextExport, TextModule } from "./ParseModule.js"; -import { normalize } from "./PathUtil.js"; -import { WgslBundle } from "./WgslBundle.js"; +import { ParsedRegistry } from "./ParsedRegistry.ts"; +import { TextExport, TextModule } from "./ParseModule.ts"; +import { normalize } from "./PathUtil.ts"; +import { WgslBundle } from "./WgslBundle.ts"; /** a single export from a module */ export type ModuleExport = TextModuleExport; diff --git a/packages/linker/src/ParseDirective.ts b/packages/linker/src/ParseDirective.ts index cc4b4ab71..6177a31d3 100644 --- a/packages/linker/src/ParseDirective.ts +++ b/packages/linker/src/ParseDirective.ts @@ -8,16 +8,16 @@ import { seq, setTraceNames, tokens, - tracing + tracing, } from "mini-parse"; -import { gleamImport } from "./GleamImport.js"; +import { gleamImport } from "./GleamImport.ts"; import { argsTokens, lineCommentTokens, mainTokens, moduleTokens, -} from "./MatchWgslD.js"; -import { eolf, makeElem } from "./ParseSupport.js"; +} from "./MatchWgslD.ts"; +import { eolf, makeElem } from "./ParseSupport.ts"; /* parse #directive enhancements to wgsl: #export, etc. */ @@ -30,13 +30,12 @@ const fromClause = seq( ); /** #export <(a,b)> EOL */ -export const exportDirective = seq( - or("#export", "export"), - opt(eolf) -).map(r => { - const e = makeElem("export", r, ["args"]); - r.app.state.push(e); -}); +export const exportDirective = seq(or("#export", "export"), opt(eolf)).map( + r => { + const e = makeElem("export", r, ["args"]); + r.app.state.push(e); + }, +); const moduleDirective = seq( or("module", "#module"), @@ -58,10 +57,7 @@ function normalizeModulePath(name: string): string { export const directive = tokens( argsTokens, - seq( - repeat("\n"), - or(exportDirective, gleamImport, moduleDirective), - ), + seq(repeat("\n"), or(exportDirective, gleamImport, moduleDirective)), ); const skipToEol = tokens(lineCommentTokens, anyThrough(eolf)); diff --git a/packages/linker/src/ParseModule.ts b/packages/linker/src/ParseModule.ts index d2cd81a4f..01bea4d79 100644 --- a/packages/linker/src/ParseModule.ts +++ b/packages/linker/src/ParseModule.ts @@ -9,8 +9,8 @@ import { StructElem, TreeImportElem, VarElem, -} from "./AbstractElems.js"; -import { parseWgslD } from "./ParseWgslD.js"; +} from "./AbstractElems.ts"; +import { parseWgslD } from "./ParseWgslD.ts"; /** module with exportable text fragments that are optionally transformed by a templating engine */ export interface TextModule { diff --git a/packages/linker/src/ParseSupport.ts b/packages/linker/src/ParseSupport.ts index d34812da2..72ce053e2 100644 --- a/packages/linker/src/ParseSupport.ts +++ b/packages/linker/src/ParseSupport.ts @@ -15,9 +15,9 @@ import { tracing, withSep, } from "mini-parse"; -import { AbstractElem, AbstractElemBase } from "./AbstractElems.js"; -import { argsTokens, mainTokens } from "./MatchWgslD.js"; -import { lineComment } from "./ParseDirective.js"; +import { AbstractElem, AbstractElemBase } from "./AbstractElems.ts"; +import { argsTokens, mainTokens } from "./MatchWgslD.ts"; +import { lineComment } from "./ParseDirective.ts"; /* Basic parsing functions for comment handling, eol, etc. */ diff --git a/packages/linker/src/ParseWgslD.ts b/packages/linker/src/ParseWgslD.ts index 1f4bfee88..fb6b34a6c 100644 --- a/packages/linker/src/ParseWgslD.ts +++ b/packages/linker/src/ParseWgslD.ts @@ -22,9 +22,9 @@ import { tracing, withSep, } from "mini-parse"; -import { AbstractElem, TypeNameElem, TypeRefElem } from "./AbstractElems.js"; -import { identTokens, mainTokens } from "./MatchWgslD.js"; -import { directive } from "./ParseDirective.js"; +import { AbstractElem, TypeNameElem, TypeRefElem } from "./AbstractElems.ts"; +import { identTokens, mainTokens } from "./MatchWgslD.ts"; +import { directive } from "./ParseDirective.ts"; import { comment, literal, @@ -32,7 +32,7 @@ import { unknown, word, wordNumArgs, -} from "./ParseSupport.js"; +} from "./ParseSupport.ts"; /** parser that recognizes key parts of WGSL and also directives like #import */ diff --git a/packages/linker/src/ParsedRegistry.ts b/packages/linker/src/ParsedRegistry.ts index 5cf2fe319..0671b8102 100644 --- a/packages/linker/src/ParsedRegistry.ts +++ b/packages/linker/src/ParsedRegistry.ts @@ -1,14 +1,14 @@ -import { TreeImportElem } from "./AbstractElems.js"; -import { importResolutionMap, ResolveMap } from "./ImportResolutionMap.js"; -import { linkWgslModule } from "./Linker.js"; +import { TreeImportElem } from "./AbstractElems.ts"; +import { importResolutionMap, ResolveMap } from "./ImportResolutionMap.ts"; +import { linkWgslModule } from "./Linker.ts"; import { ModuleExport, ModuleRegistry, relativeToAbsolute, TextModuleExport, -} from "./ModuleRegistry.js"; -import { parseModule, TextExport, TextModule } from "./ParseModule.js"; -import { dirname, normalize, noSuffix } from "./PathUtil.js"; +} from "./ModuleRegistry.ts"; +import { parseModule, TextExport, TextModule } from "./ParseModule.ts"; +import { dirname, normalize, noSuffix } from "./PathUtil.ts"; /** parse wgsl files and provided indexed access to modules and exports */ export class ParsedRegistry { diff --git a/packages/linker/src/RefDebug.ts b/packages/linker/src/RefDebug.ts index fa9c7d4f0..57c2d63e0 100644 --- a/packages/linker/src/RefDebug.ts +++ b/packages/linker/src/RefDebug.ts @@ -1,6 +1,6 @@ import { dlog } from "berry-pretty"; -import { AbstractElem, CallElem, FnElem } from "./AbstractElems.js"; -import { FoundRef, TextRef } from "./TraverseRefs.js"; +import { AbstractElem, CallElem, FnElem } from "./AbstractElems.ts"; +import { FoundRef, TextRef } from "./TraverseRefs.ts"; export function printRef(r: FoundRef, msg = ""): void { const { kind, elem, rename } = r as TextRef; diff --git a/packages/linker/src/ResolveImport.ts b/packages/linker/src/ResolveImport.ts index 9f8d02903..e2679e2a9 100644 --- a/packages/linker/src/ResolveImport.ts +++ b/packages/linker/src/ResolveImport.ts @@ -1,7 +1,7 @@ -import { ResolveMap } from "./ImportResolutionMap.js"; -import { ModuleExport } from "./ModuleRegistry.js"; -import { StringPairs } from "./TraverseRefs.js"; -import { overlapTail } from "./Util.js"; +import { ResolveMap } from "./ImportResolutionMap.ts"; +import { ModuleExport } from "./ModuleRegistry.ts"; +import { StringPairs } from "./TraverseRefs.ts"; +import { overlapTail } from "./Util.ts"; export interface ResolvedImport { modExp: ModuleExport; diff --git a/packages/linker/src/Slicer.ts b/packages/linker/src/Slicer.ts index a38373dbf..9396d7acd 100644 --- a/packages/linker/src/Slicer.ts +++ b/packages/linker/src/Slicer.ts @@ -1,5 +1,5 @@ import { SrcMap, SrcMapEntry } from "mini-parse"; -import { last, scan } from "./Util.js"; +import { last, scan } from "./Util.ts"; /** specify a start,end portion of a string to be replaced */ export interface SliceReplace { diff --git a/packages/linker/src/TraverseRefs.ts b/packages/linker/src/TraverseRefs.ts index 98beeba3f..fdf597c12 100644 --- a/packages/linker/src/TraverseRefs.ts +++ b/packages/linker/src/TraverseRefs.ts @@ -7,13 +7,13 @@ import { TreeImportElem, TypeRefElem, VarElem, -} from "./AbstractElems.js"; -import { refFullName } from "./Linker.js"; -import { moduleLog } from "./LinkerLogging.js"; -import { ParsedRegistry } from "./ParsedRegistry.js"; -import { TextExport, TextModule } from "./ParseModule.js"; -import { resolveImport } from "./ResolveImport.js"; -import { groupBy, last } from "./Util.js"; +} from "./AbstractElems.ts"; +import { refFullName } from "./Linker.ts"; +import { moduleLog } from "./LinkerLogging.ts"; +import { ParsedRegistry } from "./ParsedRegistry.ts"; +import { TextExport, TextModule } from "./ParseModule.ts"; +import { resolveImport } from "./ResolveImport.ts"; +import { groupBy, last } from "./Util.ts"; /** * A wrapper around a wgsl element targeted for inclusion in the link diff --git a/packages/linker/src/index.ts b/packages/linker/src/index.ts index f26e8a8a0..275abb167 100644 --- a/packages/linker/src/index.ts +++ b/packages/linker/src/index.ts @@ -1,6 +1,6 @@ -export * from "./Linker.js"; -export * from "./ModuleRegistry.js"; -export * from "./ParseWgslD.js"; -export * from "./PathUtil.js"; -export * from "./Util.js"; -export * from "./WgslBundle.js"; +export * from "./Linker.ts"; +export * from "./ModuleRegistry.ts"; +export * from "./ParseWgslD.ts"; +export * from "./PathUtil.ts"; +export * from "./Util.ts"; +export * from "./WgslBundle.ts"; diff --git a/packages/linker/src/test/GleamImport.test.ts b/packages/linker/src/test/GleamImport.test.ts index ffda5b1db..927e2d634 100644 --- a/packages/linker/src/test/GleamImport.test.ts +++ b/packages/linker/src/test/GleamImport.test.ts @@ -1,6 +1,6 @@ import { testParse, TestParseResult } from "mini-parse/test-util"; import { expect, TaskContext, test } from "vitest"; -import { gleamImport } from "../GleamImport.js"; +import { gleamImport } from "../GleamImport.ts"; function expectParses(ctx: TaskContext): TestParseResult { const result = testParse(gleamImport, ctx.task.name); diff --git a/packages/linker/src/test/ImportCases.test.ts b/packages/linker/src/test/ImportCases.test.ts index aefda5ac7..c92f341aa 100644 --- a/packages/linker/src/test/ImportCases.test.ts +++ b/packages/linker/src/test/ImportCases.test.ts @@ -1,8 +1,8 @@ import { afterAll, expect, test } from "vitest"; import { importCases } from "wesl-testsuite"; -import { ModuleRegistry } from "../ModuleRegistry.js"; -import { trimSrc } from "./shared/StringUtil.js"; +import { ModuleRegistry } from "../ModuleRegistry.ts"; +import { trimSrc } from "./shared/StringUtil.ts"; interface LinkExpectation { includes?: string[]; diff --git a/packages/linker/src/test/ImportResolutionMap.test.ts b/packages/linker/src/test/ImportResolutionMap.test.ts index 92df16023..86c4792b6 100644 --- a/packages/linker/src/test/ImportResolutionMap.test.ts +++ b/packages/linker/src/test/ImportResolutionMap.test.ts @@ -1,12 +1,12 @@ import { expect, test } from "vitest"; -import { importResolutionMap } from "../ImportResolutionMap.js"; +import { importResolutionMap } from "../ImportResolutionMap.ts"; import { exportsToStrings, logResolveMap, pathsToStrings, -} from "../LogResolveMap.js"; -import { ModuleRegistry } from "../ModuleRegistry.js"; -import { TextExport } from "../ParseModule.js"; +} from "../LogResolveMap.ts"; +import { ModuleRegistry } from "../ModuleRegistry.ts"; +import { TextExport } from "../ParseModule.ts"; test("simple tree", () => { const registry = new ModuleRegistry({ diff --git a/packages/linker/src/test/ImportSyntaxCases.test.ts b/packages/linker/src/test/ImportSyntaxCases.test.ts index 711744f62..d06062575 100644 --- a/packages/linker/src/test/ImportSyntaxCases.test.ts +++ b/packages/linker/src/test/ImportSyntaxCases.test.ts @@ -1,7 +1,7 @@ import { testParse, TestParseResult } from "mini-parse/test-util"; import { expect, test } from "vitest"; import { importSyntaxCases } from "wesl-testsuite"; -import { gleamImport } from "../GleamImport.js"; +import { gleamImport } from "../GleamImport.ts"; function expectParseFail(src: string): void { const result = testParse(gleamImport, src); diff --git a/packages/linker/src/test/LinkGlob.test.ts b/packages/linker/src/test/LinkGlob.test.ts index 3a3eed653..3bbc3c424 100644 --- a/packages/linker/src/test/LinkGlob.test.ts +++ b/packages/linker/src/test/LinkGlob.test.ts @@ -1,6 +1,6 @@ /// import { expect, test } from "vitest"; -import { ModuleRegistry } from "../ModuleRegistry.js"; +import { ModuleRegistry } from "../ModuleRegistry.ts"; const wgsl1: Record = import.meta.glob("./wgsl_1/*.wgsl", { query: "?raw", diff --git a/packages/linker/src/test/LinkPackage.test.ts b/packages/linker/src/test/LinkPackage.test.ts index 32964aace..8d5c30893 100644 --- a/packages/linker/src/test/LinkPackage.test.ts +++ b/packages/linker/src/test/LinkPackage.test.ts @@ -1,6 +1,6 @@ import { expect, test } from "vitest"; import lib from "wgsl-rand"; -import { ModuleRegistry } from "../ModuleRegistry.js"; +import { ModuleRegistry } from "../ModuleRegistry.ts"; test("import rand() from a package", () => { const src = ` diff --git a/packages/linker/src/test/Linker.test.ts b/packages/linker/src/test/Linker.test.ts index 3e1aa79c8..6ac78dac6 100644 --- a/packages/linker/src/test/Linker.test.ts +++ b/packages/linker/src/test/Linker.test.ts @@ -1,6 +1,6 @@ import { expect, test } from "vitest"; -import { ModuleRegistry } from "../ModuleRegistry.js"; -import { expectNoLog, linkTest, linkTestOpts } from "./TestUtil.js"; +import { ModuleRegistry } from "../ModuleRegistry.ts"; +import { expectNoLog, linkTest, linkTestOpts } from "./TestUtil.ts"; /* --- these tests rely on features not yet portable in wesl --- */ diff --git a/packages/linker/src/test/MatchWgslD.test.ts b/packages/linker/src/test/MatchWgslD.test.ts index f868d2705..d99926a6b 100644 --- a/packages/linker/src/test/MatchWgslD.test.ts +++ b/packages/linker/src/test/MatchWgslD.test.ts @@ -1,6 +1,6 @@ import { matchingLexer } from "mini-parse"; import { expect, test } from "vitest"; -import { mainTokens } from "../MatchWgslD.js"; +import { mainTokens } from "../MatchWgslD.ts"; test("lex #import foo", () => { const lexer = matchingLexer(`#import foo`, mainTokens); diff --git a/packages/linker/src/test/ModuleRegistry.test.ts b/packages/linker/src/test/ModuleRegistry.test.ts index 7ff831cc6..81db46c73 100644 --- a/packages/linker/src/test/ModuleRegistry.test.ts +++ b/packages/linker/src/test/ModuleRegistry.test.ts @@ -1,5 +1,5 @@ import { expect, test } from "vitest"; -import { ModuleRegistry } from "../ModuleRegistry.js"; +import { ModuleRegistry } from "../ModuleRegistry.ts"; test("findTextModule", () => { const registry = new ModuleRegistry({ diff --git a/packages/linker/src/test/ParseComments.test.ts b/packages/linker/src/test/ParseComments.test.ts index fe24db8f6..4cc87c961 100644 --- a/packages/linker/src/test/ParseComments.test.ts +++ b/packages/linker/src/test/ParseComments.test.ts @@ -2,10 +2,10 @@ import { preParse } from "mini-parse"; import { expectNoLogErr } from "mini-parse/test-util"; import { expect, test } from "vitest"; -import { lineComment } from "../ParseDirective.js"; -import { blockComment, comment, wordNumArgs } from "../ParseSupport.js"; -import { parseWgslD } from "../ParseWgslD.js"; -import { testAppParse } from "./TestUtil.js"; +import { lineComment } from "../ParseDirective.ts"; +import { blockComment, comment, wordNumArgs } from "../ParseSupport.ts"; +import { parseWgslD } from "../ParseWgslD.ts"; +import { testAppParse } from "./TestUtil.ts"; test("lineComment parse // foo bar", () => { const src = "// foo bar"; diff --git a/packages/linker/src/test/ParseDirectives.test.ts b/packages/linker/src/test/ParseDirectives.test.ts index e0a86bd18..116ac62e1 100644 --- a/packages/linker/src/test/ParseDirectives.test.ts +++ b/packages/linker/src/test/ParseDirectives.test.ts @@ -1,9 +1,9 @@ import { expect, test } from "vitest"; -import { ModuleElem, TreeImportElem } from "../AbstractElems.js"; -import { treeToString } from "../ImportTree.js"; -import { directive } from "../ParseDirective.js"; -import { parseWgslD } from "../ParseWgslD.js"; -import { testAppParse } from "./TestUtil.js"; +import { ModuleElem, TreeImportElem } from "../AbstractElems.ts"; +import { treeToString } from "../ImportTree.ts"; +import { directive } from "../ParseDirective.ts"; +import { parseWgslD } from "../ParseWgslD.ts"; +import { testAppParse } from "./TestUtil.ts"; test("directive parses #export", () => { const { appState } = testAppParse(directive, "#export"); diff --git a/packages/linker/src/test/ParseModule.test.ts b/packages/linker/src/test/ParseModule.test.ts index d8940a67e..1c4b39200 100644 --- a/packages/linker/src/test/ParseModule.test.ts +++ b/packages/linker/src/test/ParseModule.test.ts @@ -1,5 +1,5 @@ import { expect, test } from "vitest"; -import { parseModule, TextModule } from "../ParseModule.js"; +import { parseModule, TextModule } from "../ParseModule.ts"; test("simple fn export", () => { const src = ` diff --git a/packages/linker/src/test/ParseWgslD.test.ts b/packages/linker/src/test/ParseWgslD.test.ts index 6ce7f27b4..6fd9ec37c 100644 --- a/packages/linker/src/test/ParseWgslD.test.ts +++ b/packages/linker/src/test/ParseWgslD.test.ts @@ -3,17 +3,17 @@ import { expectNoLogErr, logCatch } from "mini-parse/test-util"; import { dlog } from "berry-pretty"; import { expect, test } from "vitest"; -import { AbstractElem, FnElem, StructElem, VarElem } from "../AbstractElems.js"; -import { filterElems } from "../ParseModule.js"; -import { unknown, wordNumArgs } from "../ParseSupport.js"; +import { AbstractElem, FnElem, StructElem, VarElem } from "../AbstractElems.ts"; +import { filterElems } from "../ParseModule.ts"; +import { unknown, wordNumArgs } from "../ParseSupport.ts"; import { fnDecl, globalVar, parseWgslD, structDecl, typeSpecifier, -} from "../ParseWgslD.js"; -import { testAppParse } from "./TestUtil.js"; +} from "../ParseWgslD.ts"; +import { testAppParse } from "./TestUtil.ts"; function testParseWgsl(src: string): AbstractElem[] { return parseWgslD(src, undefined, {}, 500); diff --git a/packages/linker/src/test/PathUtil.test.ts b/packages/linker/src/test/PathUtil.test.ts index 7f9946b7a..52a81a99c 100644 --- a/packages/linker/src/test/PathUtil.test.ts +++ b/packages/linker/src/test/PathUtil.test.ts @@ -1,5 +1,5 @@ import { expect, test } from "vitest"; -import { normalize } from "../PathUtil.js"; +import { normalize } from "../PathUtil.ts"; // ../../../lib/webgpu-samples/src/anim/anim.wgsl diff --git a/packages/linker/src/test/ResolveImport.test.ts b/packages/linker/src/test/ResolveImport.test.ts index 1aea95bd9..3894b0b42 100644 --- a/packages/linker/src/test/ResolveImport.test.ts +++ b/packages/linker/src/test/ResolveImport.test.ts @@ -1,8 +1,8 @@ import { expect, test } from "vitest"; -import { importResolutionMap } from "../ImportResolutionMap.js"; -import { ModuleRegistry } from "../ModuleRegistry.js"; -import { TextExport } from "../ParseModule.js"; -import { resolveImport } from "../ResolveImport.js"; +import { importResolutionMap } from "../ImportResolutionMap.ts"; +import { ModuleRegistry } from "../ModuleRegistry.ts"; +import { TextExport } from "../ParseModule.ts"; +import { resolveImport } from "../ResolveImport.ts"; test("resolveImport foo() from import bar/foo", () => { const registry = new ModuleRegistry({ diff --git a/packages/linker/src/test/Slicer.test.ts b/packages/linker/src/test/Slicer.test.ts index 53bec9696..0ae5696b2 100644 --- a/packages/linker/src/test/Slicer.test.ts +++ b/packages/linker/src/test/Slicer.test.ts @@ -1,6 +1,6 @@ import { SrcMap } from "mini-parse"; import { expect, test } from "vitest"; -import { sliceReplace } from "../Slicer.js"; +import { sliceReplace } from "../Slicer.ts"; test("slice middle", () => { const src = "aaabbbc"; diff --git a/packages/linker/src/test/TestUtil.ts b/packages/linker/src/test/TestUtil.ts index eeba057f9..02fe54b4b 100644 --- a/packages/linker/src/test/TestUtil.ts +++ b/packages/linker/src/test/TestUtil.ts @@ -1,9 +1,9 @@ import { _withBaseLogger, NoTags, Parser, TagRecord } from "mini-parse"; import { logCatch, testParse, TestParseResult } from "mini-parse/test-util"; import { expect } from "vitest"; -import { AbstractElem } from "../AbstractElems.js"; -import { mainTokens } from "../MatchWgslD.js"; -import { ModuleRegistry } from "../ModuleRegistry.js"; +import { AbstractElem } from "../AbstractElems.ts"; +import { mainTokens } from "../MatchWgslD.ts"; +import { ModuleRegistry } from "../ModuleRegistry.ts"; export function testAppParse( parser: Parser, diff --git a/packages/linker/src/test/TraverseRefs.test.ts b/packages/linker/src/test/TraverseRefs.test.ts index d891d021a..1e22d3415 100644 --- a/packages/linker/src/test/TraverseRefs.test.ts +++ b/packages/linker/src/test/TraverseRefs.test.ts @@ -1,9 +1,9 @@ import { _withBaseLogger } from "mini-parse"; import { logCatch } from "mini-parse/test-util"; import { expect, test } from "vitest"; -import { refFullName } from "../Linker.js"; -import { ModuleRegistry } from "../ModuleRegistry.js"; -import { FoundRef, TextRef, traverseRefs } from "../TraverseRefs.js"; +import { refFullName } from "../Linker.ts"; +import { ModuleRegistry } from "../ModuleRegistry.ts"; +import { FoundRef, TextRef, traverseRefs } from "../TraverseRefs.ts"; test("traverse a fn to struct ref", () => { const src = ` diff --git a/packages/linker/src/test/Util.test.ts b/packages/linker/src/test/Util.test.ts index 9f84593a7..4a2c52ced 100644 --- a/packages/linker/src/test/Util.test.ts +++ b/packages/linker/src/test/Util.test.ts @@ -1,5 +1,5 @@ import { expect, test } from "vitest"; -import { overlapTail, scan } from "../Util.js"; +import { overlapTail, scan } from "../Util.ts"; test("scan", () => { const result = scan([1, 2, 1], (a, b: string) => b.slice(a), "foobar"); diff --git a/packages/linker/src/test/shared/test/StringUtil.test.ts b/packages/linker/src/test/shared/test/StringUtil.test.ts index 89358130f..ce9fab94e 100644 --- a/packages/linker/src/test/shared/test/StringUtil.test.ts +++ b/packages/linker/src/test/shared/test/StringUtil.test.ts @@ -1,5 +1,5 @@ import { expect, test } from "vitest"; -import { trimSrc } from "../StringUtil.js"; +import { trimSrc } from "../StringUtil.ts"; test("trimSrc on blank", () => { const trimmed = trimSrc(``); diff --git a/packages/mini-parse/src/CombinatorTypes.ts b/packages/mini-parse/src/CombinatorTypes.ts index 02e135e9a..4a0c1bf73 100644 --- a/packages/mini-parse/src/CombinatorTypes.ts +++ b/packages/mini-parse/src/CombinatorTypes.ts @@ -1,4 +1,4 @@ -import { NoTags, Parser, TagRecord } from "./Parser.js"; +import { NoTags, Parser, TagRecord } from "./Parser.ts"; /** Typescript types for parser combinators */ diff --git a/packages/mini-parse/src/MatchingLexer.ts b/packages/mini-parse/src/MatchingLexer.ts index 4ebc54068..411f32800 100644 --- a/packages/mini-parse/src/MatchingLexer.ts +++ b/packages/mini-parse/src/MatchingLexer.ts @@ -1,7 +1,7 @@ -import { srcTrace } from "./ParserLogging.js"; -import { tracing } from "./ParserTracing.js"; -import { SrcMap } from "./SrcMap.js"; -import { Token, TokenMatcher } from "./TokenMatcher.js"; +import { srcTrace } from "./ParserLogging.ts"; +import { tracing } from "./ParserTracing.ts"; +import { SrcMap } from "./SrcMap.ts"; +import { Token, TokenMatcher } from "./TokenMatcher.ts"; export interface Lexer { /** return the next token, advancing the the current position */ diff --git a/packages/mini-parse/src/Parser.ts b/packages/mini-parse/src/Parser.ts index 0241e7919..d8278b4eb 100644 --- a/packages/mini-parse/src/Parser.ts +++ b/packages/mini-parse/src/Parser.ts @@ -1,7 +1,7 @@ -import { CombinatorArg, ParserFromArg } from "./CombinatorTypes.js"; -import { Lexer } from "./MatchingLexer.js"; -import { ParseError, parserArg } from "./ParserCombinator.js"; -import { srcLog } from "./ParserLogging.js"; +import { CombinatorArg, ParserFromArg } from "./CombinatorTypes.ts"; +import { Lexer } from "./MatchingLexer.ts"; +import { ParseError, parserArg } from "./ParserCombinator.ts"; +import { srcLog } from "./ParserLogging.ts"; import { debugNames, parserLog, @@ -9,9 +9,9 @@ import { TraceOptions, tracing, withTraceLogging, -} from "./ParserTracing.js"; -import { mergeTags } from "./ParserUtil.js"; -import { SrcMap } from "./SrcMap.js"; +} from "./ParserTracing.ts"; +import { mergeTags } from "./ParserUtil.ts"; +import { SrcMap } from "./SrcMap.ts"; export interface AppState { /** diff --git a/packages/mini-parse/src/ParserCombinator.ts b/packages/mini-parse/src/ParserCombinator.ts index 054dadf5b..39a166812 100644 --- a/packages/mini-parse/src/ParserCombinator.ts +++ b/packages/mini-parse/src/ParserCombinator.ts @@ -7,8 +7,8 @@ import { SeqParser, SeqValues, TagsFromArg, -} from "./CombinatorTypes.js"; -import { quotedText } from "./MatchingLexer.js"; +} from "./CombinatorTypes.ts"; +import { quotedText } from "./MatchingLexer.ts"; import { ExtendedResult, NoTags, @@ -21,10 +21,10 @@ import { simpleParser, TagRecord, tokenSkipSet, -} from "./Parser.js"; -import { ctxLog } from "./ParserLogging.js"; -import { mergeTags } from "./ParserUtil.js"; -import { Token, TokenMatcher } from "./TokenMatcher.js"; +} from "./Parser.ts"; +import { ctxLog } from "./ParserLogging.ts"; +import { mergeTags } from "./ParserUtil.ts"; +import { Token, TokenMatcher } from "./TokenMatcher.ts"; /** Parsing Combinators * diff --git a/packages/mini-parse/src/ParserLogging.ts b/packages/mini-parse/src/ParserLogging.ts index cc8014f53..286046606 100644 --- a/packages/mini-parse/src/ParserLogging.ts +++ b/packages/mini-parse/src/ParserLogging.ts @@ -1,6 +1,6 @@ -import { ExtendedResult, ParserContext } from "./Parser.js"; -import { logger, parserLog } from "./ParserTracing.js"; -import { SrcMap } from "./SrcMap.js"; +import { ExtendedResult, ParserContext } from "./Parser.ts"; +import { logger, parserLog } from "./ParserTracing.ts"; +import { SrcMap } from "./SrcMap.ts"; /** log an message along with the source line and a caret indicating the error position in the line * @param pos is the position the source string, or if src is a SrcMap, then diff --git a/packages/mini-parse/src/ParserTracing.ts b/packages/mini-parse/src/ParserTracing.ts index 6be8a1ab8..8b0a511a7 100644 --- a/packages/mini-parse/src/ParserTracing.ts +++ b/packages/mini-parse/src/ParserTracing.ts @@ -1,4 +1,4 @@ -import { Parser, ParserContext, setTraceName } from "./Parser.js"; +import { Parser, ParserContext, setTraceName } from "./Parser.ts"; /** true if parser tracing is enabled */ export let tracing = false; diff --git a/packages/mini-parse/src/TokenMatcher.ts b/packages/mini-parse/src/TokenMatcher.ts index a1827db80..fa7f0b153 100644 --- a/packages/mini-parse/src/TokenMatcher.ts +++ b/packages/mini-parse/src/TokenMatcher.ts @@ -1,4 +1,4 @@ -import { srcLog } from "./ParserLogging.js"; +import { srcLog } from "./ParserLogging.ts"; export interface Token { kind: string; diff --git a/packages/mini-parse/src/examples/BlogExample.ts b/packages/mini-parse/src/examples/BlogExample.ts index bedd7be7e..5f0a3b268 100644 --- a/packages/mini-parse/src/examples/BlogExample.ts +++ b/packages/mini-parse/src/examples/BlogExample.ts @@ -1,6 +1,6 @@ -import { matchingLexer } from "../MatchingLexer.js"; -import { kind, seq } from "../ParserCombinator.js"; -import { matchOneOf, tokenMatcher } from "../TokenMatcher.js"; +import { matchingLexer } from "../MatchingLexer.ts"; +import { kind, seq } from "../ParserCombinator.ts"; +import { matchOneOf, tokenMatcher } from "../TokenMatcher.ts"; const src = "fn foo()"; diff --git a/packages/mini-parse/src/examples/CalculatorExample.ts b/packages/mini-parse/src/examples/CalculatorExample.ts index 05b1f0cc2..f3fc00c4d 100644 --- a/packages/mini-parse/src/examples/CalculatorExample.ts +++ b/packages/mini-parse/src/examples/CalculatorExample.ts @@ -1,7 +1,7 @@ -import { Parser, setTraceName } from "../Parser.js"; -import { kind, opt, or, repeat, seq } from "../ParserCombinator.js"; -import { tracing } from "../ParserTracing.js"; -import { matchOneOf, tokenMatcher } from "../TokenMatcher.js"; +import { Parser, setTraceName } from "../Parser.ts"; +import { kind, opt, or, repeat, seq } from "../ParserCombinator.ts"; +import { tracing } from "../ParserTracing.ts"; +import { matchOneOf, tokenMatcher } from "../TokenMatcher.ts"; export const calcTokens = tokenMatcher({ number: /\d+/, diff --git a/packages/mini-parse/src/examples/CalculatorResultsExample.ts b/packages/mini-parse/src/examples/CalculatorResultsExample.ts index 6b24027b6..7f75aa998 100644 --- a/packages/mini-parse/src/examples/CalculatorResultsExample.ts +++ b/packages/mini-parse/src/examples/CalculatorResultsExample.ts @@ -1,7 +1,7 @@ -import { Parser, setTraceName } from "../Parser.js"; -import { fn, opt, or, repeat, seq } from "../ParserCombinator.js"; -import { tracing } from "../ParserTracing.js"; -import { mulDiv, num, plusMinus } from "./CalculatorExample.js"; +import { Parser, setTraceName } from "../Parser.ts"; +import { fn, opt, or, repeat, seq } from "../ParserCombinator.ts"; +import { tracing } from "../ParserTracing.ts"; +import { mulDiv, num, plusMinus } from "./CalculatorExample.ts"; let expr: Parser = null as any; // help TS with forward reference diff --git a/packages/mini-parse/src/examples/DocExamples.ts b/packages/mini-parse/src/examples/DocExamples.ts index e1a63fda2..8b88d988b 100644 --- a/packages/mini-parse/src/examples/DocExamples.ts +++ b/packages/mini-parse/src/examples/DocExamples.ts @@ -1,5 +1,5 @@ -import { kind, or, repeat, seq, tokens } from "../ParserCombinator.js"; -import { matchOneOf, tokenMatcher } from "../TokenMatcher.js"; +import { kind, or, repeat, seq, tokens } from "../ParserCombinator.ts"; +import { matchOneOf, tokenMatcher } from "../TokenMatcher.ts"; export const simpleTokens = tokenMatcher({ number: /\d+/, diff --git a/packages/mini-parse/src/index.ts b/packages/mini-parse/src/index.ts index bc1ee3092..832671515 100644 --- a/packages/mini-parse/src/index.ts +++ b/packages/mini-parse/src/index.ts @@ -1,7 +1,7 @@ -export * from "./MatchingLexer.js"; -export * from "./Parser.js"; -export * from "./ParserCombinator.js"; -export * from "./ParserLogging.js"; -export * from "./ParserTracing.js"; -export * from "./SrcMap.js"; -export * from "./TokenMatcher.js"; +export * from "./MatchingLexer.ts"; +export * from "./Parser.ts"; +export * from "./ParserCombinator.ts"; +export * from "./ParserLogging.ts"; +export * from "./ParserTracing.ts"; +export * from "./SrcMap.ts"; +export * from "./TokenMatcher.ts"; diff --git a/packages/mini-parse/src/test-util/TestParse.ts b/packages/mini-parse/src/test-util/TestParse.ts index 8352cffd2..30294c205 100644 --- a/packages/mini-parse/src/test-util/TestParse.ts +++ b/packages/mini-parse/src/test-util/TestParse.ts @@ -12,7 +12,7 @@ import { _withBaseLogger, } from "mini-parse"; import { expect } from "vitest"; -import { logCatch } from "./LogCatcher.js"; +import { logCatch } from "./LogCatcher.ts"; const symbolSet = "& && -> @ / ! [ ] { } : , = == != > >= < << <= % - -- ' \"" + diff --git a/packages/mini-parse/src/test-util/index.ts b/packages/mini-parse/src/test-util/index.ts index fbb4548a2..5b76481ce 100644 --- a/packages/mini-parse/src/test-util/index.ts +++ b/packages/mini-parse/src/test-util/index.ts @@ -1,2 +1,2 @@ -export * from "./LogCatcher.js"; -export * from "./TestParse.js"; +export * from "./LogCatcher.ts"; +export * from "./TestParse.ts"; diff --git a/packages/mini-parse/src/test/BlogExample.test.ts b/packages/mini-parse/src/test/BlogExample.test.ts index 25a6f07cb..88b24cd5d 100644 --- a/packages/mini-parse/src/test/BlogExample.test.ts +++ b/packages/mini-parse/src/test/BlogExample.test.ts @@ -1,7 +1,7 @@ import { expect, test } from "vitest"; -import { matchingLexer } from "../MatchingLexer.js"; -import { kind, opt, repeat, seq } from "../ParserCombinator.js"; -import { matchOneOf, tokenMatcher } from "../TokenMatcher.js"; +import { matchingLexer } from "../MatchingLexer.ts"; +import { kind, opt, repeat, seq } from "../ParserCombinator.ts"; +import { matchOneOf, tokenMatcher } from "../TokenMatcher.ts"; test("parse fn foo()", () => { const src = "fn foo()"; diff --git a/packages/mini-parse/src/test/CalculatorExample.test.ts b/packages/mini-parse/src/test/CalculatorExample.test.ts index 25591d449..fd171ceb8 100644 --- a/packages/mini-parse/src/test/CalculatorExample.test.ts +++ b/packages/mini-parse/src/test/CalculatorExample.test.ts @@ -1,13 +1,13 @@ import { testParse } from "mini-parse/test-util"; import { expect, test } from "vitest"; -import { calcTokens, statement } from "../examples/CalculatorExample.js"; +import { calcTokens, statement } from "../examples/CalculatorExample.ts"; import { simpleSum, simpleTokens, sumResults, taggedSum, -} from "../examples/DocExamples.js"; -import { matchingLexer } from "../MatchingLexer.js"; +} from "../examples/DocExamples.ts"; +import { matchingLexer } from "../MatchingLexer.ts"; test("parse 3 + 4", () => { const src = "3 + 4"; diff --git a/packages/mini-parse/src/test/CalculatorResultsExample.test.ts b/packages/mini-parse/src/test/CalculatorResultsExample.test.ts index db80f3265..c0d9b1912 100644 --- a/packages/mini-parse/src/test/CalculatorResultsExample.test.ts +++ b/packages/mini-parse/src/test/CalculatorResultsExample.test.ts @@ -1,13 +1,13 @@ import { testParse } from "mini-parse/test-util"; import { expect, test } from "vitest"; -import { calcTokens } from "../examples/CalculatorExample.js"; +import { calcTokens } from "../examples/CalculatorExample.ts"; import { power, product, resultsStatement, sum, -} from "../examples/CalculatorResultsExample.js"; -import { Parser } from "../Parser.js"; +} from "../examples/CalculatorResultsExample.ts"; +import { Parser } from "../Parser.ts"; test("power 2 ^ 4", () => { const { parsed } = testParse(power, "2 ^ 3", calcTokens); diff --git a/packages/mini-parse/src/test/ParserCombinator.test.ts b/packages/mini-parse/src/test/ParserCombinator.test.ts index a51c4dc2e..32fa3cef6 100644 --- a/packages/mini-parse/src/test/ParserCombinator.test.ts +++ b/packages/mini-parse/src/test/ParserCombinator.test.ts @@ -12,7 +12,7 @@ import { preParse, setTraceName, tokenSkipSet, -} from "../Parser.js"; +} from "../Parser.ts"; import { any, anyNot, @@ -28,8 +28,8 @@ import { text, withSep, withTags, -} from "../ParserCombinator.js"; -import { enableTracing, _withBaseLogger } from "../ParserTracing.js"; +} from "../ParserCombinator.ts"; +import { enableTracing, _withBaseLogger } from "../ParserTracing.ts"; const m = testTokens; diff --git a/packages/mini-parse/src/test/ParserLogging.test.ts b/packages/mini-parse/src/test/ParserLogging.test.ts index e4df48f35..db328ebf2 100644 --- a/packages/mini-parse/src/test/ParserLogging.test.ts +++ b/packages/mini-parse/src/test/ParserLogging.test.ts @@ -1,7 +1,7 @@ import { expect, test } from "vitest"; -import { srcLine, srcLog } from "../ParserLogging.js"; -import { _withBaseLogger } from "../ParserTracing.js"; -import { logCatch } from "../test-util/LogCatcher.js"; +import { srcLine, srcLog } from "../ParserLogging.ts"; +import { _withBaseLogger } from "../ParserTracing.ts"; +import { logCatch } from "../test-util/LogCatcher.ts"; test("srcLine", () => { const src1 = "1"; diff --git a/packages/mini-parse/src/test/ParserUtil.test.ts b/packages/mini-parse/src/test/ParserUtil.test.ts index 1f97223e6..81ba72d52 100644 --- a/packages/mini-parse/src/test/ParserUtil.test.ts +++ b/packages/mini-parse/src/test/ParserUtil.test.ts @@ -1,5 +1,5 @@ import { expect, test } from "vitest"; -import { mergeTags } from "../ParserUtil.js"; +import { mergeTags } from "../ParserUtil.ts"; test("mergeNamed with symbols", () => { const s = Symbol("s"); diff --git a/packages/mini-parse/src/test/SrcMap.test.ts b/packages/mini-parse/src/test/SrcMap.test.ts index d1eec24fb..206d84da4 100644 --- a/packages/mini-parse/src/test/SrcMap.test.ts +++ b/packages/mini-parse/src/test/SrcMap.test.ts @@ -1,5 +1,5 @@ import { expect, test } from "vitest"; -import { SrcMap } from "../SrcMap.js"; +import { SrcMap } from "../SrcMap.ts"; test("compact", () => { const src = "a b"; diff --git a/packages/mini-parse/src/test/TestSetup.ts b/packages/mini-parse/src/test/TestSetup.ts index a2686b9c6..791bbdad0 100644 --- a/packages/mini-parse/src/test/TestSetup.ts +++ b/packages/mini-parse/src/test/TestSetup.ts @@ -1,4 +1,4 @@ -import { enableTracing } from "../ParserTracing.js"; +import { enableTracing } from "../ParserTracing.ts"; // enable parser tracing features enableTracing(); diff --git a/packages/mini-parse/src/test/TokenMatcher.test.ts b/packages/mini-parse/src/test/TokenMatcher.test.ts index ced3317d5..5a5ae971b 100644 --- a/packages/mini-parse/src/test/TokenMatcher.test.ts +++ b/packages/mini-parse/src/test/TokenMatcher.test.ts @@ -1,5 +1,5 @@ import { expect, test } from "vitest"; -import { tokenMatcher } from "../TokenMatcher.js"; +import { tokenMatcher } from "../TokenMatcher.ts"; test("token matcher", () => { const m = tokenMatcher({ diff --git a/packages/mini-parse/tsconfig.json b/packages/mini-parse/tsconfig.json index 53316e2c3..3dace7827 100644 --- a/packages/mini-parse/tsconfig.json +++ b/packages/mini-parse/tsconfig.json @@ -16,6 +16,7 @@ "moduleResolution": "Node", "resolveJsonModule": true, "isolatedModules": true, + "allowImportingTsExtensions": true, "noEmit": true, "paths": { "mini-parse": ["./src"], diff --git a/packages/packager/src/main.ts b/packages/packager/src/main.ts index 8c28f1be8..5667a3ae2 100644 --- a/packages/packager/src/main.ts +++ b/packages/packager/src/main.ts @@ -1,6 +1,6 @@ #!/usr/bin/env node import { hideBin } from "yargs/helpers"; -import { packagerCli } from "./packagerCli.js"; +import { packagerCli } from "./packagerCli.ts"; const rawArgs = hideBin(process.argv); diff --git a/packages/packager/src/packageWgsl.ts b/packages/packager/src/packageWgsl.ts index 0d431fd3d..33dc93da0 100644 --- a/packages/packager/src/packageWgsl.ts +++ b/packages/packager/src/packageWgsl.ts @@ -3,7 +3,7 @@ import fs, { mkdir } from "node:fs/promises"; import path from "node:path"; import { WgslBundle } from "wgsl-linker"; import wgslBundleDecl from "../../linker/src/WgslBundle.ts?raw"; -import { CliArgs } from "./packagerCli.js"; +import { CliArgs } from "./packagerCli.ts"; export async function packageWgsl(args: CliArgs): Promise { const { projectDir, outDir } = args; @@ -38,7 +38,7 @@ export const wgslBundle = ${bundleString} export default wgslBundle; `; - const outPath = path.join(outDir, "wgslBundle.js"); + const outPath = path.join(outDir, "wgslBundle.ts"); await fs.writeFile(outPath, outString); } diff --git a/packages/packager/src/packagerCli.ts b/packages/packager/src/packagerCli.ts index 68bfd369b..1805c2db7 100644 --- a/packages/packager/src/packagerCli.ts +++ b/packages/packager/src/packagerCli.ts @@ -1,5 +1,5 @@ import yargs from "yargs"; -import { packageWgsl } from "./packageWgsl.js"; +import { packageWgsl } from "./packageWgsl.ts"; export type CliArgs = ReturnType; let cliArgs: CliArgs; diff --git a/packages/packager/src/test/packager.test.ts b/packages/packager/src/test/packager.test.ts index 5cdd7c858..13ca529d5 100644 --- a/packages/packager/src/test/packager.test.ts +++ b/packages/packager/src/test/packager.test.ts @@ -2,7 +2,7 @@ import { mkdir } from "node:fs/promises"; import path from "path"; import { rimraf } from "rimraf"; import { test } from "vitest"; -import { packagerCli } from "../packagerCli.js"; +import { packagerCli } from "../packagerCli.ts"; test("package two wgsl files", async () => { const projectDir = path.join(".", "src", "test", "wgsl-package"); diff --git a/packages/packager/tsconfig.json b/packages/packager/tsconfig.json index e65418e9b..815781387 100644 --- a/packages/packager/tsconfig.json +++ b/packages/packager/tsconfig.json @@ -14,6 +14,7 @@ "importsNotUsedAsValues": "remove", "resolveJsonModule": true, "isolatedModules": true, + "allowImportingTsExtensions": true, "noEmit": true, "paths": { "wgsl-linker": ["../linker/src"], From d52f8b6511520ede38973a8cfccfc78574f27d79 Mon Sep 17 00:00:00 2001 From: stefnotch Date: Wed, 13 Nov 2024 12:48:57 +0100 Subject: [PATCH 11/17] Post merge fixes --- {packages/bench => bench}/README.md | 0 {packages/bench/bin => bench}/bench.ts | 0 bench/deno.json | 11 + .../src => bench}/examples/reduceBuffer.wgsl | 0 bulk-test/deno.json | 6 +- bulk-test/parallelDriver.ts | 79 +++++ bulk-test/parallelTest.ts | 25 ++ .../bin => bulk-test}/pickBoatShaders.ts | 7 +- bulk-test/test/unitySamples.test.ts | 35 -- bulk-test/test/wgslExamples.test.ts | 34 -- bulk-test/util/uniqueDocs.ts | 37 +- .../bin => bulk-test}/verifyBoatShaders.ts | 13 +- .../bin => bulk-test}/writeParallelTests.ts | 5 +- cli/test/wgsl-link.test.ts | 2 +- deno.json | 5 +- deno.lock | 7 + linker/mod.ts | 1 - packager/packageWgsl.ts | 1 + packages/bench/package.json | 22 -- packages/bench/tsconfig.json | 26 -- packages/bench/vite.config.ts | 9 - packages/bulk-test/package.json | 19 - packages/cli/src/main.ts | 7 - packages/cli/src/test/wgsl-link.test.ts | 36 -- packages/linker/src/index.ts | 6 - packages/linker/src/test/GleamImport.test.ts | 182 ---------- packages/linker/src/test/ImportCases.test.ts | 334 ------------------ packages/mini-parse/src/index.ts | 7 - packages/mini-parse/src/test-util/index.ts | 2 - packages/mini-parse/src/test/TestSetup.ts | 4 - packages/packager/src/main.ts | 7 - packages/packager/src/packagerCli.ts | 39 -- packages/packager/src/test/packager.test.ts | 20 -- 33 files changed, 162 insertions(+), 826 deletions(-) rename {packages/bench => bench}/README.md (100%) rename {packages/bench/bin => bench}/bench.ts (100%) create mode 100644 bench/deno.json rename {packages/bench/src => bench}/examples/reduceBuffer.wgsl (100%) create mode 100644 bulk-test/parallelDriver.ts create mode 100644 bulk-test/parallelTest.ts rename {packages/bulk-test/bin => bulk-test}/pickBoatShaders.ts (78%) delete mode 100644 bulk-test/test/unitySamples.test.ts delete mode 100644 bulk-test/test/wgslExamples.test.ts rename {packages/bulk-test/bin => bulk-test}/verifyBoatShaders.ts (89%) rename {packages/bulk-test/bin => bulk-test}/writeParallelTests.ts (79%) delete mode 100644 packages/bench/package.json delete mode 100644 packages/bench/tsconfig.json delete mode 100644 packages/bench/vite.config.ts delete mode 100644 packages/bulk-test/package.json delete mode 100644 packages/cli/src/main.ts delete mode 100644 packages/cli/src/test/wgsl-link.test.ts delete mode 100644 packages/linker/src/index.ts delete mode 100644 packages/linker/src/test/GleamImport.test.ts delete mode 100644 packages/linker/src/test/ImportCases.test.ts delete mode 100644 packages/mini-parse/src/index.ts delete mode 100644 packages/mini-parse/src/test-util/index.ts delete mode 100644 packages/mini-parse/src/test/TestSetup.ts delete mode 100644 packages/packager/src/main.ts delete mode 100644 packages/packager/src/packagerCli.ts delete mode 100644 packages/packager/src/test/packager.test.ts diff --git a/packages/bench/README.md b/bench/README.md similarity index 100% rename from packages/bench/README.md rename to bench/README.md diff --git a/packages/bench/bin/bench.ts b/bench/bench.ts similarity index 100% rename from packages/bench/bin/bench.ts rename to bench/bench.ts diff --git a/bench/deno.json b/bench/deno.json new file mode 100644 index 000000000..79ce93597 --- /dev/null +++ b/bench/deno.json @@ -0,0 +1,11 @@ +{ + "version": "0.1.0", + "tasks": { + "dev": "deno run --watch main.ts" + }, + "imports": { + "@std/fs": "jsr:@std/fs", + "@std/path": "jsr:@std/path", + "diff": "npm:diff" + } +} \ No newline at end of file diff --git a/packages/bench/src/examples/reduceBuffer.wgsl b/bench/examples/reduceBuffer.wgsl similarity index 100% rename from packages/bench/src/examples/reduceBuffer.wgsl rename to bench/examples/reduceBuffer.wgsl diff --git a/bulk-test/deno.json b/bulk-test/deno.json index fd336a534..79ce93597 100644 --- a/bulk-test/deno.json +++ b/bulk-test/deno.json @@ -3,5 +3,9 @@ "tasks": { "dev": "deno run --watch main.ts" }, - "imports": {} + "imports": { + "@std/fs": "jsr:@std/fs", + "@std/path": "jsr:@std/path", + "diff": "npm:diff" + } } \ No newline at end of file diff --git a/bulk-test/parallelDriver.ts b/bulk-test/parallelDriver.ts new file mode 100644 index 000000000..da3fe9676 --- /dev/null +++ b/bulk-test/parallelDriver.ts @@ -0,0 +1,79 @@ +import { BulkTest, bulkTests } from "wesl-testsuite"; +import { NamedPath } from "./parallelTest.ts"; +import * as path from "@std/path"; +import { expandGlob } from "@std/fs"; + +/* Vitest parallelizes per .test.ts file. + * + * So for testing many wgsl files more quickly we want at least as many + * .test.ts files as there are CPU cores. + * + * Here we partition the load that wgsl file set and split it into + * 16 parts, which we'll later use in 16 .test.ts runners. + */ + +const communityRoot = path.join("..", "..", "..", "community-wgsl"); +const numParts = 16; +const allPaths = await loadTests(); + +/** each parallel-[N].test.ts will use its Nth part of the total test set */ +export const pathSets = nParts(allPaths, numParts); + +async function loadTests(): Promise { + const pathSets: NamedPath[] = []; + for (const bulk of bulkTests) { + const paths = await loadBulkSet(bulk); + pathSets.push(...paths); + } + return pathSets; +} + +async function loadBulkSet(bulk: BulkTest): Promise { + const baseDir = path.join(communityRoot, bulk.baseDir); + const includeFiles = bulk.include ?? []; + const globFiles = await findGlobFiles( + baseDir, + bulk.globInclude, + bulk.exclude, + ); + const relativePaths: string[] = [...includeFiles, ...globFiles]; + const namePaths: NamedPath[] = relativePaths.map((f) => ({ + name: f, + filePath: path.join(baseDir, f), + })); + return namePaths; +} + +async function findGlobFiles( + baseDir: string, + globs: string[] | undefined, + exclude: string[] | undefined, +): Promise { + const fullBaseDir = path.resolve(baseDir); + const cwd = Deno.cwd(); + const skip = exclude ?? []; + try { + // TODO: Don't use chdir (Deno bug) + Deno.chdir(fullBaseDir); + const futurePaths = (globs ?? []).map((g) => + Array.fromAsync(expandGlob(g, { + exclude: ["node_modules/**"], + })) + ); + + const pathSets = await Promise.all(futurePaths); + const filePaths = pathSets.flat().filter((f) => f.isFile).map((f) => + f.path + ); + return filePaths.filter((p) => !skip.some((s) => p.includes(s))); + } finally { + Deno.chdir(cwd); + } +} + +/** split an array into n partitions */ +function nParts(a: T[], n: number): T[][] { + const parts: T[][] = new Array(n).fill(0).map(() => []); + a.forEach((v, i) => parts[i % n].push(v)); + return parts; +} diff --git a/bulk-test/parallelTest.ts b/bulk-test/parallelTest.ts new file mode 100644 index 000000000..76ce3e3bc --- /dev/null +++ b/bulk-test/parallelTest.ts @@ -0,0 +1,25 @@ +import fs from "node:fs/promises"; +import { test } from "vitest"; +import { ModuleRegistry } from "@wesl/linker"; + +export interface NamedPath { + name: string; // test name + filePath: string; // path relative to project root (package.json dir) +} + +// TODO more validation, not just parsing + +/** test files run this to run vite tests for all wgsl files in their partition. + * Each test simple runs the parser to validate that it runs w/o error. + * @param fileNames wgsl file paths to load and parse */ +export function testWgslFiles(namedPaths: NamedPath[]) { + namedPaths.forEach(({ name, filePath }) => { + const shortPath = "./" + name; + test(name, async () => { + const text = await fs.readFile(filePath, { encoding: "utf8" }); + const registry = new ModuleRegistry({ wgsl: { [shortPath]: text } }); + registry.parsed(); + // registry.link(shortPath); + }); + }); +} diff --git a/packages/bulk-test/bin/pickBoatShaders.ts b/bulk-test/pickBoatShaders.ts similarity index 78% rename from packages/bulk-test/bin/pickBoatShaders.ts rename to bulk-test/pickBoatShaders.ts index 234be70ac..b7ac00ccb 100644 --- a/packages/bulk-test/bin/pickBoatShaders.ts +++ b/bulk-test/pickBoatShaders.ts @@ -1,5 +1,4 @@ -import { dlogOpt } from "berry-pretty"; -import { uniquishFiles } from "../src/util/uniqueDocs.ts"; +import { uniquishFiles } from "./util/uniqueDocs.ts"; /* The boat_attack sample shaders have significantly internal duplication * This script tries to find the relatively unique shaders for testing. @@ -21,8 +20,8 @@ const uniqueHlsl = await uniquishFiles({ // limitSearch: 100, // limitCheck: 5 }); -const wgsl = uniqueHlsl.map(p => p.replace(/hlsl$/, "wgsl")); -dlogOpt({ maxArray: 500 }, { wgsl }); +const wgsl = uniqueHlsl.map((p) => p.replace(/hlsl$/, "wgsl")); +console.log({ maxArray: 500 }, { wgsl }); function removeDirectiveLines(text: string): string { return text.replace(/^#.*$/gm, ""); diff --git a/bulk-test/test/unitySamples.test.ts b/bulk-test/test/unitySamples.test.ts deleted file mode 100644 index f4c29e42b..000000000 --- a/bulk-test/test/unitySamples.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { glob } from "glob"; -import fs from "node:fs/promises"; -import { test } from "vitest"; -import { ModuleRegistry } from "wgsl-linker"; - -const wgslRoot = "../../../community-wgsl/unity_web_research"; - -// these require composing some wgsl files together, so just skip em for now -const exclude: string[] = []; - -const texts = await loadFiles(exclude); - -texts.forEach(([path, text]) => { - const testName = path.replace(wgslRoot, ""); - test(testName, () => { - const registry = new ModuleRegistry({ wgsl: { [path]: text } }); - // registry.link(path); // TODO fix issue with alias references - registry.parsed(); - }); -}); - -async function loadFiles(exclude: string[]): Promise<[string, string][]> { - const files = await glob(`${wgslRoot}/**/*.wgsl`, { - ignore: ["node_modules/**"], - }); - const activeFiles = files.filter( - (path) => !exclude.some((e) => path.includes(e)), - ).slice(0, 10); - const futureEntries = activeFiles.map(async (path) => { - const text = await fs.readFile(path, { encoding: "utf8" }); - return [path, text] as [string, string]; - }); - const entries = await Promise.all(futureEntries); - return entries; -} diff --git a/bulk-test/test/wgslExamples.test.ts b/bulk-test/test/wgslExamples.test.ts deleted file mode 100644 index 8bb3bf47f..000000000 --- a/bulk-test/test/wgslExamples.test.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { glob } from "glob"; -import fs from "node:fs/promises"; -import { test } from "vitest"; -import { ModuleRegistry } from "wgsl-linker"; - -const wgslRoot = "../../../community-wgsl/webgpu-samples"; - -// these require composing some wgsl files together, so just skip em for now -const exclude = ["skinnedMesh", "cornell"]; - -const texts = await loadFiles(exclude); - -texts.forEach(([path, text]) => { - const testName = path.replace(wgslRoot, ""); - test(testName, () => { - const registry = new ModuleRegistry({ wgsl: { [path]: text } }); - registry.link(path); - }); -}); - -async function loadFiles(exclude: string[]): Promise<[string, string][]> { - const files = await glob(`${wgslRoot}/**/*.wgsl`, { - ignore: ["node_modules/**"], - }); - const activeFiles = files.filter( - path => !exclude.some(e => path.includes(e)), - ); - const futureEntries = activeFiles.map(async path => { - const futureText = await fs.readFile(path, { encoding: "utf8" }); - return [path, futureText] as [string, string]; - }); - const entries = await Promise.all(futureEntries); - return entries; -} diff --git a/bulk-test/util/uniqueDocs.ts b/bulk-test/util/uniqueDocs.ts index 3bec11087..3ab6ddb88 100644 --- a/bulk-test/util/uniqueDocs.ts +++ b/bulk-test/util/uniqueDocs.ts @@ -1,7 +1,5 @@ -import { dlog } from "berry-pretty"; import { Change, diffLines } from "diff"; -import { glob } from "glob"; -import fs from "node:fs/promises"; +import { expandGlob } from "@std/fs"; /* Search through a set of files to find the uniquest ones. * Uses a diff library to compare files with each other @@ -52,8 +50,11 @@ export async function uniquishFiles( const { preprocessFn = (s: string) => s } = options; const { minAddLines, minAddPercent, limitCheck } = options; - process.chdir(rootDir); - const files = await glob(`./**/*.${suffix}`, { ignore: ["node_modules/**"] }); + // TODO: Don't use chdir ( https://github.com/denoland/deno/issues/25559 ) + Deno.chdir(rootDir); + const files = (await Array.fromAsync( + expandGlob(`./**/*.${suffix}`, { exclude: ["node_modules/**"] }), + )).filter((f) => f.isFile).map((f) => f.path); const sorted = await sortBySize(files); // consider shaders in largest first order const saved: SavedText[] = []; @@ -62,20 +63,20 @@ export async function uniquishFiles( let totalLines = 0; let nth = 0; for (const path of paths) { - const orig = await fs.readFile(path, { encoding: "utf8" }); + const orig = await Deno.readTextFile(path); const text = preprocessFn(orig); - dlog("checking", { nth: ++nth, path }); + console.log("checking", { nth: ++nth, path }); const diffOpts = { minAddLines, minAddPercent, limitCheck }; const percentDiff = differentText(saved, text, diffOpts); if (percentDiff !== undefined) { totalLines += text.split("\n").length; - dlog("saving", { path, percentDiff, totalLines }); + console.log("saving", { path, percentDiff, totalLines }); saved.push({ path, text }); } } - return saved.map(s => s.path); + return saved.map((s) => s.path); } /** return % difference if the the text differs significantly from saved texts, @@ -98,7 +99,7 @@ export function differentText( const addCount = addLines(changes); if (addCount < minAddLines) { const failedNth = saved.length - i; - if (limitCheck > 0 && failedNth > limitCheck) dlog({ failedNth }); + if (limitCheck > 0 && failedNth > limitCheck) console.log({ failedNth }); return undefined; } @@ -112,25 +113,25 @@ export function differentText( /** count the number of lines added in these changes */ function addLines(changes: Change[]): number { - const addChanges = changes.filter(c => c.added); - // dlog({addChanges}) + const addChanges = changes.filter((c) => c.added); + // console.log({addChanges}) // addChanges.forEach(c => { - // dlog({c}); + // console.log({c}); // }); - const addLineCounts = addChanges.map(c => c.value.split("\n").length); + const addLineCounts = addChanges.map((c) => c.value.split("\n").length); const totalLines = addLineCounts.reduce((a, b) => a + b, 0); - // dlog({ totalLines }); + // console.log({ totalLines }); return totalLines; } /** sort a set of files by size, largest first */ export async function sortBySize(paths: string[]): Promise { const sizes = await Promise.all( - paths.map(async path => { - const stats = await fs.stat(path); + paths.map(async (path) => { + const stats = await Deno.stat(path); return { path, size: stats.size }; }), ); sizes.sort((a, b) => b.size - a.size); - return sizes.map(s => s.path); + return sizes.map((s) => s.path); } diff --git a/packages/bulk-test/bin/verifyBoatShaders.ts b/bulk-test/verifyBoatShaders.ts similarity index 89% rename from packages/bulk-test/bin/verifyBoatShaders.ts rename to bulk-test/verifyBoatShaders.ts index 2c02f63dd..e8d138418 100644 --- a/packages/bulk-test/bin/verifyBoatShaders.ts +++ b/bulk-test/verifyBoatShaders.ts @@ -1,11 +1,9 @@ -import fs from "fs/promises"; import { DifferenceOptions, differentText, SavedText, sortBySize, -} from "../src/util/uniqueDocs.ts"; -import { dlog } from "berry-pretty"; +} from "./util/uniqueDocs.ts"; /* * The pickBoatShaders script diff compares hlsl files, incrementally and @@ -47,10 +45,11 @@ const texts = await loadTexts(selected); checkDifferences(texts); async function loadTexts(paths: string[]): Promise { - process.chdir(boatAttackDir); + // TODO: Don't use chdir + Deno.chdir(boatAttackDir); const sorted = await sortBySize(paths); - const futureTexts = sorted.map(async path => { - const text = await fs.readFile(path, { encoding: "utf8" }); + const futureTexts = sorted.map(async (path) => { + const text = await Deno.readTextFile(path); return { path, text }; }); @@ -68,6 +67,6 @@ function checkDifferences(texts: SavedText[]): void { minAddPercent: 0, }; const percent = differentText(otherTexts, t.text, opts); - dlog({ path: t.path, percent }); + console.log({ path: t.path, percent }); }); } diff --git a/packages/bulk-test/bin/writeParallelTests.ts b/bulk-test/writeParallelTests.ts similarity index 79% rename from packages/bulk-test/bin/writeParallelTests.ts rename to bulk-test/writeParallelTests.ts index 906fca1aa..7e793e54c 100644 --- a/packages/bulk-test/bin/writeParallelTests.ts +++ b/bulk-test/writeParallelTests.ts @@ -1,5 +1,4 @@ -import fs from "node:fs/promises"; -import path from "node:path"; +import * as path from "@std/path"; const numParts = 16; @@ -10,7 +9,7 @@ async function writeFiles(): Promise { const fileName = `parallel-${i}.test.ts`; const filePath = path.join("src", "test", fileName); console.log(`Writing ${filePath}`); - return fs.writeFile(filePath, testText(i), { encoding: "utf8" }); + return Deno.writeTextFile(filePath, testText(i)); }); await Promise.all(writes); diff --git a/cli/test/wgsl-link.test.ts b/cli/test/wgsl-link.test.ts index 456a3d3ec..095987819 100644 --- a/cli/test/wgsl-link.test.ts +++ b/cli/test/wgsl-link.test.ts @@ -19,7 +19,7 @@ test("simple link", async (ctx) => { await assertSnapshot(ctx, logged); }); -test("link with definition", async () => { +test.ignore("link with definition", async () => { using consoleStub = stub(console, "log", () => {}); await cli( `./test/wgsl/main.wgsl diff --git a/deno.json b/deno.json index 0c2cf0e9b..1345d05e2 100644 --- a/deno.json +++ b/deno.json @@ -11,10 +11,11 @@ "wesl-testsuite": "../wesl-testsuite/src/index.ts" }, "workspace": [ - "./mini-parse", - "./packager", + "./bulk-test", "./cli", "./linker", + "./mini-parse", + "./packager", "./testlib" ], "compilerOptions": { diff --git a/deno.lock b/deno.lock index 5511061bc..298235669 100644 --- a/deno.lock +++ b/deno.lock @@ -231,6 +231,13 @@ "jsr:@std/testing@1" ], "members": { + "bulk-test": { + "dependencies": [ + "jsr:@std/fs@*", + "jsr:@std/path@*", + "npm:diff@*" + ] + }, "cli": { "dependencies": [ "npm:diff@*" diff --git a/linker/mod.ts b/linker/mod.ts index 7ea0b8ade..275abb167 100644 --- a/linker/mod.ts +++ b/linker/mod.ts @@ -4,4 +4,3 @@ export * from "./ParseWgslD.ts"; export * from "./PathUtil.ts"; export * from "./Util.ts"; export * from "./WgslBundle.ts"; -export { preProcess } from "./ParseModule.ts"; diff --git a/packager/packageWgsl.ts b/packager/packageWgsl.ts index 554525117..6919c0f9d 100644 --- a/packager/packageWgsl.ts +++ b/packager/packageWgsl.ts @@ -60,6 +60,7 @@ export const wgslBundle = ${bundleString} export default wgslBundle; `; + const outPath = path.join(outDir, "wgslBundle.js"); await Deno.writeTextFile(outPath, outString); } diff --git a/packages/bench/package.json b/packages/bench/package.json deleted file mode 100644 index bd8573c91..000000000 --- a/packages/bench/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "benchmark", - "version": "0.5.0-d1", - "type": "module", - "scripts": { - "format": "prettier . --write", - "lint": "eslint src", - "organize": "organize-imports-cli tsconfig.json", - "bench": "tsx bin/bench.ts --bench" - }, - "dependencies": { - "wgsl-linker": "workspace:*" - }, - "devDependencies": { - "0x": "^5.7.0", - "@types/diff": "^5.0.9", - "@use-gpu/shader": "^0.12.0", - "clinic": "^13.0.0", - "diff": "^5.2.0", - "wgsl_reflect": "^1.0.16" - } -} diff --git a/packages/bench/tsconfig.json b/packages/bench/tsconfig.json deleted file mode 100644 index c35eeff34..000000000 --- a/packages/bench/tsconfig.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "compilerOptions": { - "target": "ESNext", - "lib": ["ESNext"], - "types": ["node"], - "module": "ESNext", - "moduleResolution": "Node", - "esModuleInterop": false, - "allowSyntheticDefaultImports": true, - "skipLibCheck": true, - "allowJs": false, - "strict": true, - "forceConsistentCasingInFileNames": true, - "importsNotUsedAsValues": "remove", - "resolveJsonModule": true, - "isolatedModules": true, - "allowImportingTsExtensions": true, - "noEmit": true, - "paths": { - "wgsl-linker": ["../linker/src"], - "mini-parse": ["../mini-parse/src"] - } - }, - "include": ["src/**/*", "bin/**/*", "src/viteTypes.d.ts"], - "exclude": ["node_modules"] -} diff --git a/packages/bench/vite.config.ts b/packages/bench/vite.config.ts deleted file mode 100644 index 73deae856..000000000 --- a/packages/bench/vite.config.ts +++ /dev/null @@ -1,9 +0,0 @@ -/// -import { UserConfig } from "vite"; -import tsconfigPaths from "vite-tsconfig-paths"; - -const config: UserConfig = { - plugins: [tsconfigPaths()], -}; - -export default config; diff --git a/packages/bulk-test/package.json b/packages/bulk-test/package.json deleted file mode 100644 index 7b27ca847..000000000 --- a/packages/bulk-test/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "bulk-test", - "version": "0.5.0-d1", - "type": "module", - "scripts": { - "format": "prettier . --write", - "lint": "eslint src", - "organize": "organize-imports-cli tsconfig.json", - "test": "vitest", - "bulk-test": "vitest run" - }, - "dependencies": { - "wgsl-linker": "workspace:*" - }, - "devDependencies": { - "@types/diff": "^5.0.9", - "diff": "^5.2.0" - } -} diff --git a/packages/cli/src/main.ts b/packages/cli/src/main.ts deleted file mode 100644 index c9aa79836..000000000 --- a/packages/cli/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node -import { hideBin } from "yargs/helpers"; -import { cli } from "./cli.ts"; - -const rawArgs = hideBin(process.argv); - -cli(rawArgs); diff --git a/packages/cli/src/test/wgsl-link.test.ts b/packages/cli/src/test/wgsl-link.test.ts deleted file mode 100644 index 1fc305667..000000000 --- a/packages/cli/src/test/wgsl-link.test.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { expect, test, vi } from "vitest"; -import { cli } from "../cli.ts"; - -/** so vitest triggers when these files change */ -import("./src/test/wgsl/main.wgsl?raw"); -import("./src/test/wgsl/util.wgsl?raw"); - -test("simple link", async () => { - const logged = await cliLine( - `./src/test/wgsl/main.wgsl - ./src/test/wgsl/util.wgsl`, - ); - expect(logged).toMatchSnapshot(); -}); - -test.skip("link with definition", async () => { - const logged = await cliLine( - `./src/test/wgsl/main.wgsl - ./src/test/wgsl/util.wgsl - --define EXTRA=true`, - ); - expect(logged).toContain("fn extra()"); -}); - -async function cliLine(argsLine: string): Promise { - return await withConsoleSpy(() => cli(argsLine.split(/\s+/))); -} - -async function withConsoleSpy(fn: () => Promise): Promise { - const consoleSpy = vi.spyOn(console, "log").mockImplementation(() => {}); - - await fn(); - const result = consoleSpy.mock.calls[0].join(""); - vi.resetAllMocks(); - return result; -} diff --git a/packages/linker/src/index.ts b/packages/linker/src/index.ts deleted file mode 100644 index 275abb167..000000000 --- a/packages/linker/src/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export * from "./Linker.ts"; -export * from "./ModuleRegistry.ts"; -export * from "./ParseWgslD.ts"; -export * from "./PathUtil.ts"; -export * from "./Util.ts"; -export * from "./WgslBundle.ts"; diff --git a/packages/linker/src/test/GleamImport.test.ts b/packages/linker/src/test/GleamImport.test.ts deleted file mode 100644 index 927e2d634..000000000 --- a/packages/linker/src/test/GleamImport.test.ts +++ /dev/null @@ -1,182 +0,0 @@ -import { testParse, TestParseResult } from "mini-parse/test-util"; -import { expect, TaskContext, test } from "vitest"; -import { gleamImport } from "../GleamImport.ts"; - -function expectParses(ctx: TaskContext): TestParseResult { - const result = testParse(gleamImport, ctx.task.name); - expect(result.parsed).not.toBeNull(); - return result; -} -/* ------ success cases ------- */ - -test("import ./foo/bar;", ctx => { - const result = expectParses(ctx); - expect(result.position).toBe(ctx.task.name.length); // consume semicolon (so that linking will remove it) -}); - -test("import foo-bar/boo", ctx => { - expectParses(ctx); -}); - -/** ----- extraction tests ----- */ -test("import foo/bar", ctx => { - const { appState } = expectParses(ctx); - expect(appState).toMatchInlineSnapshot(` - [ - { - "end": 14, - "imports": ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "foo", - }, - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "bar", - }, - ], - }, - "kind": "treeImport", - "start": 0, - }, - ] - `); -}); - -test("import foo/* as b", ctx => { - const { appState } = expectParses(ctx); - expect(appState).toMatchInlineSnapshot(` - [ - { - "end": 17, - "imports": ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "foo", - }, - Wildcard { - "as": "b", - }, - ], - }, - "kind": "treeImport", - "start": 0, - }, - ] - `); -}); - -test(`import a/{ b, c/{d, e}, f/* }`, ctx => { - const { appState } = expectParses(ctx); - expect(appState).toMatchInlineSnapshot(` - [ - { - "end": 29, - "imports": ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "a", - }, - SegmentList { - "list": [ - ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "b", - }, - ], - }, - ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "c", - }, - SegmentList { - "list": [ - ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "d", - }, - ], - }, - ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "e", - }, - ], - }, - ], - }, - ], - }, - ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "f", - }, - Wildcard { - "as": undefined, - }, - ], - }, - ], - }, - ], - }, - "kind": "treeImport", - "start": 0, - }, - ] - `); -}); - -test("import ./foo/bar", ctx => { - const { appState } = expectParses(ctx); - expect(appState).toMatchInlineSnapshot(` - [ - { - "end": 16, - "imports": ImportTree { - "segments": [ - SimpleSegment { - "args": undefined, - "as": undefined, - "name": ".", - }, - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "foo", - }, - SimpleSegment { - "args": undefined, - "as": undefined, - "name": "bar", - }, - ], - }, - "kind": "treeImport", - "start": 0, - }, - ] - `); -}); diff --git a/packages/linker/src/test/ImportCases.test.ts b/packages/linker/src/test/ImportCases.test.ts deleted file mode 100644 index c92f341aa..000000000 --- a/packages/linker/src/test/ImportCases.test.ts +++ /dev/null @@ -1,334 +0,0 @@ -import { afterAll, expect, test } from "vitest"; -import { importCases } from "wesl-testsuite"; - -import { ModuleRegistry } from "../ModuleRegistry.ts"; -import { trimSrc } from "./shared/StringUtil.ts"; - -interface LinkExpectation { - includes?: string[]; - excludes?: string[]; - linked?: string; -} - -// wgsl example src, indexed by name -const examplesByName = new Map(importCases.map(t => [t.name, t.src])); - -test("import ./bar/foo", ctx => { - linkTest(ctx.task.name, { - linked: ` - fn main() { - foo(); - } - - fn foo() { } - `, - }); -}); - -test("main has other root elements", ctx => { - linkTest(ctx.task.name, { - linked: ` - struct Uniforms { - a: u32 - } - - @group(0) @binding(0) var u: Uniforms; - - fn main() { } - `, - }); -}); - -test("import foo as bar", ctx => { - linkTest(ctx.task.name, { - linked: ` - fn main() { - bar(); - } - - fn bar() { /* fooImpl */ } - `, - }); -}); - -test("import twice doesn't get two copies", ctx => { - linkTest(ctx.task.name, { - linked: ` - fn main() { - foo(); - bar(); - } - - fn foo() { /* fooImpl */ } - - fn bar() { foo(); } - `, - }); -}); -test("imported fn calls support fn with root conflict", ctx => { - linkTest(ctx.task.name, { - linked: ` - fn main() { foo(); } - - fn conflicted() { } - - fn foo() { - conflicted0(0); - conflicted0(1); - } - - fn conflicted0(a:i32) {} - `, - }); -}); - -test("import twice with two as names", ctx => { - linkTest(ctx.task.name, { - linked: ` - fn main() { bar(); bar(); } - - fn bar() { } - `, - }); -}); - -test("import transitive conflicts with main", ctx => { - linkTest(ctx.task.name, { - linked: ` - fn main() { - mid(); - } - - fn grand() { - /* main impl */ - } - - fn mid() { grand0(); } - - fn grand0() { /* grandImpl */ } - `, - }); -}); - -test("multiple exports from the same module", ctx => { - linkTest(ctx.task.name, { - linked: ` - fn main() { - foo(); - bar(); - } - - fn foo() { } - - fn bar() { } - `, - }); -}); - -test("import and resolve conflicting support function", ctx => { - linkTest(ctx.task.name, { - linked: ` - fn support() { - bar(); - } - - fn bar() { - support0(); - } - - fn support0() { } - `, - }); -}); - -test("import support fn that references another import", ctx => { - linkTest(ctx.task.name, { - linked: ` - fn support() { - foo(); - } - - fn foo() { - support0(); - bar(); - } - - fn support0() { } - - fn bar() { - support1(); - } - - fn support1() { } - `, - }); -}); - -test("import support fn from two exports", ctx => { - linkTest(ctx.task.name, { - linked: ` - fn main() { - foo(); - bar(); - } - - fn foo() { - support(); - } - - fn bar() { - support(); - } - - fn support() { } - `, - }); -}); - -test("import a struct", ctx => { - linkTest(ctx.task.name, { - linked: ` - fn main() { - let a = AStruct(1u); - } - - struct AStruct { - x: u32 - } - `, - }); -}); - -test("import fn with support struct constructor", ctx => { - linkTest(ctx.task.name, { - linked: ` - fn main() { - let ze = elemOne(); - } - - fn elemOne() -> Elem { - return Elem(1u); - } - - struct Elem { - sum: u32 - } - `, - }); -}); - -test("import a transitive struct", ctx => { - linkTest(ctx.task.name, { - linked: ` - struct SrcStruct { - a: AStruct - } - - struct AStruct { - s: BStruct - } - - struct BStruct { - x: u32 - } - `, - }); -}); - -test("'import as' a struct", ctx => { - linkTest(ctx.task.name, { - linked: ` - fn foo (a: AA) { } - - struct AA { - x: u32 - } - `, - }); -}); - -test("import a struct with name conflicting support struct", ctx => { - linkTest(ctx.task.name, { - linked: ` - struct Base { - b: i32 - } - - fn foo() -> AStruct {let a:AStruct; return a;} - - struct AStruct { - x: Base0 - } - - struct Base0 { - x: u32 - } - `, - }); -}); - -test("copy alias to output", ctx => { - linkTest(ctx.task.name, { - linked: ` - alias MyType = u32; - `, - }); -}); - -test("copy diagnostics to output", ctx => { - linkTest(ctx.task.name, { - linked: ` - diagnostic(off,derivative_uniformity); - `, - }); -}); - -afterAll(c => { - const testNameSet = new Set(c.tasks.map(t => t.name)); - const cases = importCases.map(c => c.name); - const missing = cases.filter(name => !testNameSet.has(name)); - if (missing.length) { - console.error("Missing tests for cases:", missing); - expect("missing test: " + missing.toString()).toBe(""); - } -}); - -function linkTest(name: string, expectation: LinkExpectation): void { - const exampleSrc = examplesByName.get(name); - if (!exampleSrc) { - throw new Error(`Skipping test "${name}"\nNo example found.`); - } - const srcs = Object.entries(exampleSrc).map(([name, wgsl]) => { - const trimmedSrc = trimSrc(wgsl); - return [name, trimmedSrc] as [string, string]; - }); - const main = srcs[0][0]; - const wgsl = Object.fromEntries(srcs); - const registry = new ModuleRegistry({ wgsl }); - const result = registry.link(main); - - const { linked, includes, excludes } = expectation; - - if (linked !== undefined) { - const expectTrimmed = trimSrc(linked); - const resultTrimmed = trimSrc(result); - if (resultTrimmed !== expectTrimmed) { - console.log("result\n", resultTrimmed, "\nexpect\n", expectTrimmed); - const expectLines = expectTrimmed.split("\n"); - const resultLines = result.split("\n"); - expectLines.forEach((line, i) => { - expect(resultLines[i]).toBe(line); - }); - } - } - if (includes !== undefined) { - includes.forEach(inc => { - expect(result).toContain(inc); - }); - } - if (excludes !== undefined) { - excludes.forEach(exc => { - expect(result).not.toContain(exc); - }); - } -} diff --git a/packages/mini-parse/src/index.ts b/packages/mini-parse/src/index.ts deleted file mode 100644 index 832671515..000000000 --- a/packages/mini-parse/src/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -export * from "./MatchingLexer.ts"; -export * from "./Parser.ts"; -export * from "./ParserCombinator.ts"; -export * from "./ParserLogging.ts"; -export * from "./ParserTracing.ts"; -export * from "./SrcMap.ts"; -export * from "./TokenMatcher.ts"; diff --git a/packages/mini-parse/src/test-util/index.ts b/packages/mini-parse/src/test-util/index.ts deleted file mode 100644 index 5b76481ce..000000000 --- a/packages/mini-parse/src/test-util/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "./LogCatcher.ts"; -export * from "./TestParse.ts"; diff --git a/packages/mini-parse/src/test/TestSetup.ts b/packages/mini-parse/src/test/TestSetup.ts deleted file mode 100644 index 791bbdad0..000000000 --- a/packages/mini-parse/src/test/TestSetup.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { enableTracing } from "../ParserTracing.ts"; - -// enable parser tracing features -enableTracing(); diff --git a/packages/packager/src/main.ts b/packages/packager/src/main.ts deleted file mode 100644 index 5667a3ae2..000000000 --- a/packages/packager/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node -import { hideBin } from "yargs/helpers"; -import { packagerCli } from "./packagerCli.ts"; - -const rawArgs = hideBin(process.argv); - -packagerCli(rawArgs); diff --git a/packages/packager/src/packagerCli.ts b/packages/packager/src/packagerCli.ts deleted file mode 100644 index 1805c2db7..000000000 --- a/packages/packager/src/packagerCli.ts +++ /dev/null @@ -1,39 +0,0 @@ -import yargs from "yargs"; -import { packageWgsl } from "./packageWgsl.ts"; - -export type CliArgs = ReturnType; -let cliArgs: CliArgs; - -export async function packagerCli(rawArgs: string[]): Promise { - cliArgs = parseArgs(rawArgs); - await packageWgsl(cliArgs); -} - -function parseArgs(args: string[]) { - return ( - yargs(args) - .command("$0", "create an npm package from WGSL/WESL files") - .option("rootDir", { - type: "string", - default: ".", - describe: "base directory of WGSL/WESL files", - }) - .option("projectDir", { - type: "string", - default: ".", - describe: "directory containing package.json", - }) - // .option("updatePackageJson", { - // type: "boolean", - // default: true, - // describe: "add export entries into package.json", - // }) - .option("outDir", { - type: "string", - default: "dist", - describe: "where to put bundled output files", - }) - .help() - .parseSync() - ); -} diff --git a/packages/packager/src/test/packager.test.ts b/packages/packager/src/test/packager.test.ts deleted file mode 100644 index 13ca529d5..000000000 --- a/packages/packager/src/test/packager.test.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { mkdir } from "node:fs/promises"; -import path from "path"; -import { rimraf } from "rimraf"; -import { test } from "vitest"; -import { packagerCli } from "../packagerCli.ts"; - -test("package two wgsl files", async () => { - const projectDir = path.join(".", "src", "test", "wgsl-package"); - const distDir = path.join(projectDir, "dist"); - const srcDir = path.join(projectDir, "src"); - await rimraf(distDir); - await mkdir(distDir); - packageCli( - `--projectDir ${projectDir} --rootDir ${srcDir} --outDir ${distDir}`, - ); -}); - -function packageCli(argsLine: string): Promise { - return packagerCli(argsLine.split(/\s+/)); -} From 1dc7c205d56d1f4f6042c5cc3662d18d2084f03a Mon Sep 17 00:00:00 2001 From: stefnotch Date: Wed, 13 Nov 2024 13:28:22 +0100 Subject: [PATCH 12/17] Fix bulk test --- .gitattributes | 2 + bench/README.md | 4 +- bench/bench.ts | 21 ++++----- bench/deno.json | 5 +- bulk-test/README.md | 2 +- bulk-test/parallelDriver.ts | 31 +++++------- bulk-test/parallelTest.ts | 3 +- deno.json | 1 + deno.lock | 89 ++++++++++++++++++++++++++++++++++- linker/ImportResolutionMap.ts | 11 ++--- 10 files changed, 126 insertions(+), 43 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..d3c7b99f0 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Use LF everywhere +* text=auto eol=lf diff --git a/bench/README.md b/bench/README.md index 21756a85d..5f10fe1cd 100644 --- a/bench/README.md +++ b/bench/README.md @@ -5,7 +5,7 @@ Launch with: ```sh -pnpm tsx --inspect-brk bin/bench.ts --profile +deno --inspect-brk bench.ts --profile ``` And then launch the chrome debugger and press the green node button, and press play @@ -15,5 +15,5 @@ See instructions [here](https://developer.chrome.com/docs/devtools/performance/n ## Benchmark ```sh -pnpm tsx bin/bench.ts --bench +deno bench.ts --bench ``` diff --git a/bench/bench.ts b/bench/bench.ts index 0bfa4b102..d6f89b27a 100644 --- a/bench/bench.ts +++ b/bench/bench.ts @@ -1,11 +1,9 @@ import { WGSLLinker } from "@use-gpu/shader"; -import fs from "fs/promises"; -import path from "path"; -import { ModuleRegistry } from "wgsl-linker"; +import * as path from "@std/path"; +import { ModuleRegistry } from "@wesl/linker"; import { WgslReflect } from "wgsl_reflect"; import yargs from "yargs"; - -import { hideBin } from "yargs/helpers"; +import { profile, profileEnd } from "node:console"; type ParserVariant = | "wgsl-linker" @@ -16,8 +14,9 @@ type ParserVariant = type CliArgs = ReturnType; -const rawArgs = hideBin(process.argv); -main(rawArgs); +if (import.meta.main) { + await main(Deno.args); +} async function main(args: string[]): Promise { const argv = parseArgs(args); @@ -52,7 +51,7 @@ async function bench(argv: CliArgs): Promise { if (argv.bench) { const ms = runBench(variant, texts); const codeLines = texts - .map(t => t.text.split("\n").length) + .map((t) => t.text.split("\n").length) .reduce((a, b) => a + b, 0); const locSec = codeLines / ms; const locSecStr = new Intl.NumberFormat().format(Math.round(locSec)); @@ -60,9 +59,9 @@ async function bench(argv: CliArgs): Promise { } if (argv.profile) { - console.profile(); + profile(); runOnAllFiles(variant, texts); - console.profileEnd(); + profileEnd(); } } @@ -131,7 +130,7 @@ async function loadAllFiles(): Promise { } async function loadFile(name: string, path: string): Promise { - const text = await fs.readFile(path, { encoding: "utf8" }); + const text = await Deno.readTextFile(path); return { name, text }; } diff --git a/bench/deno.json b/bench/deno.json index 79ce93597..5fbad8c37 100644 --- a/bench/deno.json +++ b/bench/deno.json @@ -6,6 +6,9 @@ "imports": { "@std/fs": "jsr:@std/fs", "@std/path": "jsr:@std/path", - "diff": "npm:diff" + "yargs": "https://deno.land/x/yargs@v17.7.2-deno/deno.ts", + "diff": "npm:diff", + "wgsl_reflect": "npm:wgsl_reflect@1.0.16", + "@use-gpu/shader": "npm:@use-gpu/shader@0.12.0" } } \ No newline at end of file diff --git a/bulk-test/README.md b/bulk-test/README.md index 4803972f3..85b88295b 100644 --- a/bulk-test/README.md +++ b/bulk-test/README.md @@ -3,5 +3,5 @@ Test the parser/linker on community projects. ```sh -pnpm bulk-test +deno test --allow-read ``` diff --git a/bulk-test/parallelDriver.ts b/bulk-test/parallelDriver.ts index da3fe9676..ce54eee37 100644 --- a/bulk-test/parallelDriver.ts +++ b/bulk-test/parallelDriver.ts @@ -12,7 +12,7 @@ import { expandGlob } from "@std/fs"; * 16 parts, which we'll later use in 16 .test.ts runners. */ -const communityRoot = path.join("..", "..", "..", "community-wgsl"); +const communityRoot = path.join("..", "..", "community-wgsl"); const numParts = 16; const allPaths = await loadTests(); @@ -49,26 +49,19 @@ async function findGlobFiles( globs: string[] | undefined, exclude: string[] | undefined, ): Promise { - const fullBaseDir = path.resolve(baseDir); - const cwd = Deno.cwd(); const skip = exclude ?? []; - try { - // TODO: Don't use chdir (Deno bug) - Deno.chdir(fullBaseDir); - const futurePaths = (globs ?? []).map((g) => - Array.fromAsync(expandGlob(g, { - exclude: ["node_modules/**"], - })) - ); + const futurePaths = (globs ?? []).map((g) => + Array.fromAsync(expandGlob(g, { + root: baseDir, + exclude: ["node_modules/**"], + })) + ); - const pathSets = await Promise.all(futurePaths); - const filePaths = pathSets.flat().filter((f) => f.isFile).map((f) => - f.path - ); - return filePaths.filter((p) => !skip.some((s) => p.includes(s))); - } finally { - Deno.chdir(cwd); - } + const pathSets = await Promise.all(futurePaths); + const filePaths = pathSets.flat().filter((f) => f.isFile).map((f) => + path.relative(baseDir, f.path) + ); + return filePaths.filter((p) => !skip.some((s) => p.includes(s))); } /** split an array into n partitions */ diff --git a/bulk-test/parallelTest.ts b/bulk-test/parallelTest.ts index 76ce3e3bc..c7878793c 100644 --- a/bulk-test/parallelTest.ts +++ b/bulk-test/parallelTest.ts @@ -1,4 +1,3 @@ -import fs from "node:fs/promises"; import { test } from "vitest"; import { ModuleRegistry } from "@wesl/linker"; @@ -16,7 +15,7 @@ export function testWgslFiles(namedPaths: NamedPath[]) { namedPaths.forEach(({ name, filePath }) => { const shortPath = "./" + name; test(name, async () => { - const text = await fs.readFile(filePath, { encoding: "utf8" }); + const text = await Deno.readTextFile(filePath); const registry = new ModuleRegistry({ wgsl: { [shortPath]: text } }); registry.parsed(); // registry.link(shortPath); diff --git a/deno.json b/deno.json index 1345d05e2..c834891ee 100644 --- a/deno.json +++ b/deno.json @@ -11,6 +11,7 @@ "wesl-testsuite": "../wesl-testsuite/src/index.ts" }, "workspace": [ + "./bench", "./bulk-test", "./cli", "./linker", diff --git a/deno.lock b/deno.lock index 298235669..a38ce1fb0 100644 --- a/deno.lock +++ b/deno.lock @@ -14,7 +14,9 @@ "jsr:@std/path@^1.0.8": "1.0.8", "jsr:@std/testing@1": "1.0.4", "npm:@types/node@*": "22.5.4", - "npm:diff@*": "7.0.0" + "npm:@use-gpu/shader@0.12.0": "0.12.0", + "npm:diff@*": "7.0.0", + "npm:wgsl_reflect@1.0.16": "1.0.16" }, "jsr": { "@std/assert@1.0.7": { @@ -61,17 +63,93 @@ } }, "npm": { + "@jridgewell/sourcemap-codec@1.5.0": { + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==" + }, + "@lezer/common@1.2.3": { + "integrity": "sha512-w7ojc8ejBqr2REPsWxJjrMFsA/ysDCFICn8zEOR9mrqzOu2amhITYuLD8ag6XZf0CFXDrhKqw7+tW8cX66NaDA==" + }, + "@lezer/generator@1.7.1": { + "integrity": "sha512-MgPJN9Si+ccxzXl3OAmCeZuUKw4XiPl4y664FX/hnnyG9CTqUPq65N3/VGPA2jD23D7QgMTtNqflta+cPN+5mQ==", + "dependencies": [ + "@lezer/common", + "@lezer/lr" + ] + }, + "@lezer/lr@1.4.2": { + "integrity": "sha512-pu0K1jCIdnQ12aWNaAVU5bzi7Bd1w54J3ECgANPmYLtQKP0HBj2cE/5coBD66MT10xbtIuUr7tg0Shbsvk0mDA==", + "dependencies": [ + "@lezer/common" + ] + }, + "@types/command-line-args@5.2.3": { + "integrity": "sha512-uv0aG6R0Y8WHZLTamZwtfsDLVRnOa+n+n5rEvFWL5Na5gZ8V2Teab/duDPFzIIIhs9qizDpcavCusCLJZu62Kw==" + }, "@types/node@22.5.4": { "integrity": "sha512-FDuKUJQm/ju9fT/SeX/6+gBzoPzlVCzfzmGkwKvRHQVxi4BntVbyIwf6a4Xn62mrvndLiml6z/UBXIdEVjQLXg==", "dependencies": [ "undici-types" ] }, + "@use-gpu/shader@0.12.0": { + "integrity": "sha512-fVMXsKSuhvknOJecLX8j80nu8Jg5C/ALAWkDEjodooGzIFQeUXI0QfGw03GK7Adqsd8GfjbDUqRERE6vtvE5JQ==", + "dependencies": [ + "@lezer/generator", + "@lezer/lr", + "@types/command-line-args", + "command-line-args", + "lodash", + "lru-cache", + "magic-string" + ] + }, + "array-back@6.2.2": { + "integrity": "sha512-gUAZ7HPyb4SJczXAMUXMGAvI976JoK3qEx9v1FTmeYuJj0IBiaKttG1ydtGKdkfqWkIkouke7nG8ufGy77+Cvw==" + }, + "command-line-args@6.0.1": { + "integrity": "sha512-Jr3eByUjqyK0qd8W0SGFW1nZwqCaNCtbXjRo2cRJC1OYxWl3MZ5t1US3jq+cO4sPavqgw4l9BMGX0CBe+trepg==", + "dependencies": [ + "array-back", + "find-replace", + "lodash.camelcase", + "typical" + ] + }, "diff@7.0.0": { "integrity": "sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==" }, + "find-replace@5.0.2": { + "integrity": "sha512-Y45BAiE3mz2QsrN2fb5QEtO4qb44NcS7en/0y9PEVsg351HsLeVclP8QPMH79Le9sH3rs5RSwJu99W0WPZO43Q==" + }, + "lodash.camelcase@4.3.0": { + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==" + }, + "lodash@4.17.21": { + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "lru-cache@6.0.0": { + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dependencies": [ + "yallist" + ] + }, + "magic-string@0.30.12": { + "integrity": "sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==", + "dependencies": [ + "@jridgewell/sourcemap-codec" + ] + }, + "typical@7.3.0": { + "integrity": "sha512-ya4mg/30vm+DOWfBg4YK3j2WD6TWtRkCbasOJr40CseYENzCUby/7rIvXA99JGsQHeNxLbnXdyLLxKSv3tauFw==" + }, "undici-types@6.19.8": { "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==" + }, + "wgsl_reflect@1.0.16": { + "integrity": "sha512-OE3urfXXbHMD5lhKZwxOxC9SFYynEGEkWXQmvi7B1gzzr5jb9+drh9A8MeBvVqKqznCoBuh8WOzVuSGSZs4CkQ==" + }, + "yallist@4.0.0": { + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" } }, "redirects": { @@ -231,6 +309,15 @@ "jsr:@std/testing@1" ], "members": { + "bench": { + "dependencies": [ + "jsr:@std/fs@*", + "jsr:@std/path@*", + "npm:@use-gpu/shader@0.12.0", + "npm:diff@*", + "npm:wgsl_reflect@1.0.16" + ] + }, "bulk-test": { "dependencies": [ "jsr:@std/fs@*", diff --git a/linker/ImportResolutionMap.ts b/linker/ImportResolutionMap.ts index 3d05b145a..80ce9ad40 100644 --- a/linker/ImportResolutionMap.ts +++ b/linker/ImportResolutionMap.ts @@ -6,7 +6,6 @@ import { SimpleSegment, Wildcard, } from "./ImportTree.ts"; -} from "./ImportTree.ts"; import { ModuleExport } from "./ModuleRegistry.ts"; import { ParsedRegistry } from "./ParsedRegistry.ts"; import { TextModule } from "./ParseModule.ts"; @@ -69,14 +68,14 @@ export function importResolutionMap( imports: TreeImportElem[], registry: ParsedRegistry, ): ResolveMap { - const resolveEntries = imports.flatMap(imp => - resolveTreeImport(importingModule, imp, registry), + const resolveEntries = imports.flatMap((imp) => + resolveTreeImport(importingModule, imp, registry) ); const exportEntries: [string, ExportPathToExport][] = []; const pathEntries: [string[], string][] = []; - resolveEntries.forEach(e => { + resolveEntries.forEach((e) => { if (e instanceof ExportPathToExport) { exportEntries.push([e.exportPath, e]); } else { @@ -122,7 +121,7 @@ function resolveTreeImport( } if (segment instanceof SegmentList) { // resolve path with each element in the list - return segment.list.flatMap(elem => { + return segment.list.flatMap((elem) => { const rPath = [elem, ...rest]; return recursiveResolve(resolvedImportPath, resolvedExportPath, rPath); }); @@ -153,7 +152,7 @@ function resolveTreeImport( resolvedImportPath: string[], resolvedExportPath: string[], ): ResolvedEntry[] { - return m.exports.flatMap(exp => { + return m.exports.flatMap((exp) => { const expPath = [...resolvedExportPath, exp.ref.name]; const impPath = [...resolvedImportPath, exp.ref.name]; const modExp = { kind: m.kind, module: m, exp } as ModuleExport; From 1d8c68ea5b701aeec47ff959e90c9740402bd42e Mon Sep 17 00:00:00 2001 From: stefnotch Date: Wed, 13 Nov 2024 13:38:09 +0100 Subject: [PATCH 13/17] Fix bench --- bench/README.md | 4 ++-- bench/bench.ts | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/bench/README.md b/bench/README.md index 5f10fe1cd..488d6732d 100644 --- a/bench/README.md +++ b/bench/README.md @@ -5,7 +5,7 @@ Launch with: ```sh -deno --inspect-brk bench.ts --profile +deno --allow-read --allow-env --inspect-brk bench.ts --profile ``` And then launch the chrome debugger and press the green node button, and press play @@ -15,5 +15,5 @@ See instructions [here](https://developer.chrome.com/docs/devtools/performance/n ## Benchmark ```sh -deno bench.ts --bench +deno --allow-read --allow-env bench.ts --bench ``` diff --git a/bench/bench.ts b/bench/bench.ts index d6f89b27a..7563baf80 100644 --- a/bench/bench.ts +++ b/bench/bench.ts @@ -1,3 +1,5 @@ +#!/usr/bin/env -S deno run --allow-read --allow-env + import { WGSLLinker } from "@use-gpu/shader"; import * as path from "@std/path"; import { ModuleRegistry } from "@wesl/linker"; @@ -120,11 +122,11 @@ async function loadAllFiles(): Promise { // return [...boat]; const reduceBuffer = await loadFile( "reduceBuffer", - "./src/examples/reduceBuffer.wgsl", + "./examples/reduceBuffer.wgsl", ); const particle = await loadFile( "reduceBuffer", - "../../../community-wgsl/webgpu-samples/sample/particles/particle.wgsl", + "../../community-wgsl/webgpu-samples/sample/particles/particle.wgsl", ); return [reduceBuffer, particle]; } @@ -137,7 +139,7 @@ async function loadFile(name: string, path: string): Promise { async function loadBoatFiles(): Promise { const boatAttackDir = - "../../../community-wgsl/unity_web_research/webgpu/wgsl/boat_attack"; + "../../community-wgsl/unity_web_research/webgpu/wgsl/boat_attack"; const boatName = "unity_webgpu_0000026E5689B260.fs.wgsl"; const boatPath = path.join(boatAttackDir, boatName); From b93f8cbcdf485b99c3441d7e98081c590d50016e Mon Sep 17 00:00:00 2001 From: stefnotch Date: Thu, 14 Nov 2024 00:12:06 +0100 Subject: [PATCH 14/17] Fix merge --- linker/ParseWgslD.ts | 38 ++++++------ linker/test/MatchWgslD.test.ts | 6 +- linker/test/ParseDirectives.test.ts | 21 +++---- linker/test/ParseExpression.test.ts | 17 +++--- linker/test/ParseModule.test.ts | 2 +- linker/test/ParseWgslD.test.ts | 13 ++--- linker/test/TestUtil.ts | 8 ++- linker/test/TraverseRefs.test.ts | 10 ++-- .../__snapshots__/Conditionals.test.ts.snap | 57 ------------------ .../ParseDirectives.test.ts.snap | 58 ------------------- .../__snapshots__/ParseModule.test.ts.snap | 54 +---------------- .../__snapshots__/ParseWgslD.test.ts.snap | 11 +++- .../__snapshots__/TraverseRefs.test.ts.snap | 10 ---- mini-parse/TokenMatcher.ts | 2 +- .../test/CalculatorResultsExample.test.ts | 3 +- 15 files changed, 73 insertions(+), 237 deletions(-) delete mode 100644 linker/test/__snapshots__/Conditionals.test.ts.snap delete mode 100644 linker/test/__snapshots__/TraverseRefs.test.ts.snap diff --git a/linker/ParseWgslD.ts b/linker/ParseWgslD.ts index 181f5fb43..40325836b 100644 --- a/linker/ParseWgslD.ts +++ b/linker/ParseWgslD.ts @@ -84,23 +84,23 @@ export const template: Parser = seq( ); /** find possible references to user structs in this type specifier and any templates */ -export const typeSpecifier: Parser = seq( +export const type_specifier: Parser = seq( tokens(identTokens, longIdent.tag(possibleTypeRef)), opt(template), -).map(r => - r.tags[possibleTypeRef].map(name => { +).map((r) => + r.tags[possibleTypeRef].map((name) => { const e = makeElem("typeRef", r as ExtendedResult); e.name = name; return e as Required; - }), + }) ); export const structMember = seq( optAttributes, word.tag("name"), ":", - req(typeSpecifier.tag("typeRefs")), -).map(r => { + req(type_specifier.tag("typeRefs")), +).map((r) => { return makeElem("member", r, ["name", "typeRefs"]); }); @@ -143,17 +143,17 @@ export const fnCall = tokens( const fnParam = seq( optAttributes, word, - opt(seq(":", req(typeSpecifier.tag("typeRefs")))) + opt(seq(":", req(type_specifier.tag("typeRefs")))), ); const fnParamList = seq(lParen, withSep(",", fnParam), rParen); // prettier-ignore const variableDecl = seq( - or("const", "var", "let", "override"), - word, - ":", - req(typeSpecifier).tag("typeRefs") + or("const", "var", "let", "override"), + word, + ":", + req(type_specifier).tag("typeRefs"), ); // TODO: Fix everything else to also use this instead of "template" @@ -170,7 +170,7 @@ const opt_template_args = opt( const primary_expression = or( literal, seq( - word, + word.tag("ident"), opt_template_args, opt( seq( @@ -265,9 +265,9 @@ export const fnDecl = seq( "fn", req(fnNameDecl).tag("nameElem"), req(fnParamList), - opt(seq("->", optAttributes, typeSpecifier.tag("typeRefs"))), + opt(seq("->", optAttributes, type_specifier.tag("typeRefs"))), req(block), -).map(r => { +).map((r) => { const e = makeElem("fn", r); const nameElem = r.tags.nameElem[0]; e.nameElem = nameElem as Required; @@ -282,9 +282,9 @@ export const globalVar = seq( or("const", "override", "var"), opt(template), word.tag("name"), - opt(seq(":", req(typeSpecifier.tag("typeRefs")))), + opt(seq(":", req(type_specifier.tag("typeRefs")))), req(anyThrough(";")), -).map(r => { +).map((r) => { const e = makeElem("var", r, ["name"]); e.typeRefs = r.tags.typeRefs?.flat() || []; r.app.state.push(e); @@ -294,9 +294,9 @@ export const globalAlias = seq( "alias", req(word.tag("name")), req("="), - req(typeSpecifier).tag("typeRefs"), + req(type_specifier).tag("typeRefs"), req(";"), -).map(r => { +).map((r) => { const e = makeElem("alias", r, ["name", "typeRefs"]); r.app.state.push(e); }); @@ -337,7 +337,7 @@ if (tracing) { const names: Record> = { globalDirectiveOrAssert, template, - typeSpecifier, + type_specifier, structMember, structDecl, fnCall, diff --git a/linker/test/MatchWgslD.test.ts b/linker/test/MatchWgslD.test.ts index 74a8fadb4..9fcfba33b 100644 --- a/linker/test/MatchWgslD.test.ts +++ b/linker/test/MatchWgslD.test.ts @@ -2,15 +2,15 @@ import { matchingLexer } from "@wesl/mini-parse"; import { expect, test } from "vitest"; import { mainTokens } from "../MatchWgslD.ts"; -test("lex #import foo", () => { +test.ignore("lex #import foo", () => { const lexer = matchingLexer(`#import foo`, mainTokens); const tokens = [1, 2].map(lexer.next); - expect(tokens.map(t => t?.kind)).toEqual(["directive", "word"]); + expect(tokens.map((t) => t?.kind)).toEqual(["directive", "word"]); }); test("/* foo */", () => { const lexer = matchingLexer(`/* foo */`, mainTokens); const tokens = [1, 2, 3].map(lexer.next); - const tokenKinds = tokens.map(t => t?.kind); + const tokenKinds = tokens.map((t) => t?.kind); expect(tokenKinds).toEqual(["symbol", "word", "symbol"]); }); diff --git a/linker/test/ParseDirectives.test.ts b/linker/test/ParseDirectives.test.ts index 32123edbc..5f4488801 100644 --- a/linker/test/ParseDirectives.test.ts +++ b/linker/test/ParseDirectives.test.ts @@ -4,13 +4,14 @@ import { treeToString } from "../ImportTree.ts"; import { directive } from "../ParseDirective.ts"; import { parseWgslD } from "../ParseWgslD.ts"; import { testAppParse } from "./TestUtil.ts"; +import { assertSnapshot } from "@std/testing/snapshot"; -test("directive parses #export", () => { +test.ignore("directive parses #export", () => { const { appState } = testAppParse(directive, "#export"); expect(appState[0].kind).toBe("export"); }); -test("parse #export", () => { +test.ignore("parse #export", () => { const parsed = parseWgslD("#export"); expect(parsed[0].kind).toBe("export"); }); @@ -45,23 +46,23 @@ test("module foo/bar/ba", (ctx) => { expect((appState[0] as ModuleElem).name).toBe("foo/bar/ba"); }); -test("import ./util/foo;", ctx => { - const appState = parseWgslD(ctx.task.name); +test("import ./util/foo;", (ctx) => { + const appState = parseWgslD(ctx.name); const importElem = appState[0] as TreeImportElem; const segments = treeToString(importElem.imports); expect(segments).toBe("./util/foo"); }); -test("import ./bar/foo;", ctx => { - const appState = parseWgslD(ctx.task.name); +test("import ./bar/foo;", (ctx) => { + const appState = parseWgslD(ctx.name); const importElem = appState[0] as TreeImportElem; const segments = treeToString(importElem.imports); expect(segments).toBe("./bar/foo"); }); -test("import ./bar/{foo,bar};", ctx => { - const appState = parseWgslD(ctx.task.name); - const imports = appState.filter(e => e.kind === "treeImport"); - const segments = imports.map(i => treeToString(i.imports)); +test("import ./bar/{foo,bar};", (ctx) => { + const appState = parseWgslD(ctx.name); + const imports = appState.filter((e) => e.kind === "treeImport"); + const segments = imports.map((i) => treeToString(i.imports)); expect(segments).toContain("./bar/{(foo), (bar)}"); }); diff --git a/linker/test/ParseExpression.test.ts b/linker/test/ParseExpression.test.ts index 9651d41e5..dbf3fcc6a 100644 --- a/linker/test/ParseExpression.test.ts +++ b/linker/test/ParseExpression.test.ts @@ -1,18 +1,17 @@ import { expect, test } from "vitest"; -import { testAppParse } from "./TestUtil"; -import { expression } from "../ParseWgslD"; -import { eof, seq } from "mini-parse"; -test("parse number", () => { - const src = `3`; +import { testAppParse } from "./TestUtil.ts"; +import { expression } from "../ParseWgslD.ts"; +import { eof, seq } from "@wesl/mini-parse"; +Deno.test("parse number", () => { + const src = `3`; const { parsed } = testAppParse(seq(expression, eof), src); expect(parsed).not.toBeNull(); + expect(parsed!.tags.ident).toBeUndefined(); }); -test("parse comparisons with && ||", () => { +Deno.test("parse comparisons with && ||", () => { const src = `array<3 && 4>(5)`; - const { parsed } = testAppParse(seq(expression, eof), src); - expect(parsed).not.toBeNull(); - // TODO: Check that it doesn't have a template generic + expect(parsed!.tags.ident).toEqual(["array"]); }); diff --git a/linker/test/ParseModule.test.ts b/linker/test/ParseModule.test.ts index e3be7044a..61e195d5c 100644 --- a/linker/test/ParseModule.test.ts +++ b/linker/test/ParseModule.test.ts @@ -49,7 +49,7 @@ test("read #module", () => { // test.skip("parse error shows correct line after @if", () => {}); -test("import gleam style", () => { +test("import gleam style", async (ctx) => { const src = ` import my/foo diff --git a/linker/test/ParseWgslD.test.ts b/linker/test/ParseWgslD.test.ts index 67ce9c148..0abcd77db 100644 --- a/linker/test/ParseWgslD.test.ts +++ b/linker/test/ParseWgslD.test.ts @@ -1,7 +1,6 @@ import { _withBaseLogger, or, repeat } from "@wesl/mini-parse"; import { expectNoLogErr, logCatch } from "@wesl/mini-parse/test-util"; -import { dlog } from "berry-pretty"; import { expect, test } from "vitest"; import { assertSnapshot } from "@std/testing/snapshot"; import type { @@ -17,7 +16,7 @@ import { globalVar, parseWgslD, structDecl, - typeSpecifier, + type_specifier, } from "../ParseWgslD.ts"; import { testAppParse } from "./TestUtil.ts"; @@ -203,7 +202,7 @@ test("parse type in