From de60ce9c3be6b3b4da3d91bbfc4d7dfbdc09138f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rolf=20Christian=20J=C3=B8rgensen?= <114920418+rcj-siteimprove@users.noreply.github.com> Date: Thu, 28 Nov 2024 14:10:52 +0100 Subject: [PATCH] Vitest (#1692) * Set up Vitest * Run yarn dedupe * Extract API * Remove unused dependencies * Remove script no longer needed * Update yarn.lock * Add vitest workspace and fix lib type checking * Add vitest typings workaround * Add noEmit to all test/tsconfig.js files * Extract API * Add back Assertions type * Remove unused devDependencies found by knip * Add back original alfa-test as alfa-test-deprecated * Delete parts from old alfa-test that are no longer needed * Update yarn.lock * Add vitest as dependency to alfa-test and update valid external dependencies * Add new API report * Add changeset --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> --- .changeset/orange-points-rule.md | 8 + config/validate-structure.json | 3 +- config/vitest.config.ts | 7 + config/vitest.workspace.ts | 1 + docs/review/api/alfa-dom.api.md | 42 +- docs/review/api/alfa-test-deprecated.api.md | 79 ++ package.json | 8 +- packages/alfa-affine/test/tsconfig.json | 2 +- packages/alfa-aria/test/tsconfig.json | 2 +- packages/alfa-branched/test/tsconfig.json | 2 +- packages/alfa-cache/test/tsconfig.json | 2 +- packages/alfa-cascade/test/tsconfig.json | 2 +- packages/alfa-comparable/test/tsconfig.json | 2 +- packages/alfa-css-feature/test/tsconfig.json | 2 +- packages/alfa-css/test/tsconfig.json | 2 +- packages/alfa-dom/package.json | 2 + packages/alfa-dom/src/index.ts | 2 +- packages/alfa-dom/test/tsconfig.json | 2 +- packages/alfa-emitter/test/tsconfig.json | 2 +- packages/alfa-equatable/test/tsconfig.json | 2 +- packages/alfa-flags/test/tsconfig.json | 2 +- packages/alfa-fnv/test/tsconfig.json | 2 +- packages/alfa-future/test/tsconfig.json | 2 +- packages/alfa-generator/test/tsconfig.json | 2 +- packages/alfa-graph/test/tsconfig.json | 2 +- packages/alfa-http/test/tsconfig.json | 2 +- packages/alfa-iana/test/tsconfig.json | 2 +- packages/alfa-lazy/test/tsconfig.json | 2 +- packages/alfa-list/test/tsconfig.json | 2 +- packages/alfa-map/test/tsconfig.json | 2 +- packages/alfa-math/test/tsconfig.json | 2 +- packages/alfa-network/test/tsconfig.json | 2 +- packages/alfa-option/test/tsconfig.json | 2 +- packages/alfa-predicate/test/tsconfig.json | 2 +- packages/alfa-promise/test/tsconfig.json | 2 +- packages/alfa-record/test/tsconfig.json | 2 +- packages/alfa-rectangle/test/tsconfig.json | 2 +- packages/alfa-refinement/test/tsconfig.json | 2 +- packages/alfa-result/test/tsconfig.json | 2 +- packages/alfa-rules/test/tsconfig.json | 2 +- packages/alfa-selective/test/tsconfig.json | 2 +- packages/alfa-selector/test/tsconfig.json | 2 +- packages/alfa-sequence/test/tsconfig.json | 2 +- packages/alfa-slice/test/tsconfig.json | 2 +- packages/alfa-string/test/tsconfig.json | 2 +- ...border-[block,inline]-[end,start].spec.tsx | 14 +- .../property/border-[block,inline].spec.tsx | 14 +- .../border-[top,right,bottom,left].spec.tsx | 14 +- .../alfa-style/test/property/border.spec.tsx | 14 +- packages/alfa-style/test/tsconfig.json | 2 +- packages/alfa-table/test/tsconfig.json | 2 +- packages/alfa-test-deprecated/CHANGELOG.md | 203 ++++ packages/alfa-test-deprecated/README.md | 63 + .../config/api-extractor.json | 5 + .../docs/dependency-graph.dot | 177 +++ .../docs/dependency-graph.svg | 141 +++ packages/alfa-test-deprecated/package.json | 32 + .../src/format.ts | 0 packages/alfa-test-deprecated/src/index.ts | 5 + packages/alfa-test-deprecated/src/rng.ts | 36 + .../src/stack.ts | 0 packages/alfa-test-deprecated/src/test.ts | 103 ++ .../alfa-test-deprecated/src/tsconfig.json | 13 + packages/alfa-test-deprecated/src/types.ts | 52 + .../test/test.spec.ts | 0 .../test/tsconfig.json | 0 packages/alfa-test-deprecated/tsconfig.json | 6 + packages/alfa-test/package.json | 4 +- packages/alfa-test/src/.gitignore | 1 + packages/alfa-test/src/index.ts | 2 - packages/alfa-test/src/test.ts | 70 +- packages/alfa-test/src/tsconfig.json | 5 +- packages/alfa-test/src/types.ts | 9 - packages/alfa-test/src/vitest.d.ts | 7 + packages/alfa-test/tsconfig.json | 2 +- packages/alfa-thenable/test/tsconfig.json | 2 +- packages/alfa-thunk/test/tsconfig.json | 2 +- packages/alfa-time/test/tsconfig.json | 2 +- packages/alfa-toolchain/test/tsconfig.json | 2 +- packages/alfa-trampoline/test/tsconfig.json | 2 +- packages/alfa-trilean/test/tsconfig.json | 2 +- packages/alfa-tuple/test/tsconfig.json | 2 +- packages/alfa-url/test/tsconfig.json | 2 +- packages/alfa-web/test/tsconfig.json | 2 +- packages/alfa-xpath/test/tsconfig.json | 2 +- packages/tsconfig.json | 1 + scripts/test.mjs | 50 - yarn.lock | 1049 ++++++++++++++--- 88 files changed, 1908 insertions(+), 432 deletions(-) create mode 100644 .changeset/orange-points-rule.md create mode 100644 config/vitest.config.ts create mode 100644 config/vitest.workspace.ts create mode 100644 docs/review/api/alfa-test-deprecated.api.md create mode 100644 packages/alfa-test-deprecated/CHANGELOG.md create mode 100644 packages/alfa-test-deprecated/README.md create mode 100644 packages/alfa-test-deprecated/config/api-extractor.json create mode 100644 packages/alfa-test-deprecated/docs/dependency-graph.dot create mode 100644 packages/alfa-test-deprecated/docs/dependency-graph.svg create mode 100644 packages/alfa-test-deprecated/package.json rename packages/{alfa-test => alfa-test-deprecated}/src/format.ts (100%) create mode 100644 packages/alfa-test-deprecated/src/index.ts create mode 100644 packages/alfa-test-deprecated/src/rng.ts rename packages/{alfa-test => alfa-test-deprecated}/src/stack.ts (100%) create mode 100644 packages/alfa-test-deprecated/src/test.ts create mode 100644 packages/alfa-test-deprecated/src/tsconfig.json create mode 100644 packages/alfa-test-deprecated/src/types.ts rename packages/{alfa-test => alfa-test-deprecated}/test/test.spec.ts (100%) rename packages/{alfa-test => alfa-test-deprecated}/test/tsconfig.json (100%) create mode 100644 packages/alfa-test-deprecated/tsconfig.json create mode 100644 packages/alfa-test/src/.gitignore create mode 100644 packages/alfa-test/src/vitest.d.ts delete mode 100644 scripts/test.mjs diff --git a/.changeset/orange-points-rule.md b/.changeset/orange-points-rule.md new file mode 100644 index 0000000000..e6cfdc75e0 --- /dev/null +++ b/.changeset/orange-points-rule.md @@ -0,0 +1,8 @@ +--- +"@siteimprove/alfa-test-deprecated": minor +"@siteimprove/alfa-test": minor +--- + +**Breaking:** The `alfa-test` package is now called `alfa-test-deprecated` and a new `alfa-test` package was added. + +Consumers can either migrate by replacing references to `alfa-test` with `alfa-test-deprecated` or they can attempt to use `alfa-test` which builds on [Vitest](https://vitest.dev). diff --git a/config/validate-structure.json b/config/validate-structure.json index 9169c8369c..45960906cf 100644 --- a/config/validate-structure.json +++ b/config/validate-structure.json @@ -10,7 +10,8 @@ "noExternalDeps": true, "allowedExternalDeps": { "@siteimprove/alfa-compatibility": ["browserslist"], - "@siteimprove/alfa-test": ["chalk"], + "@siteimprove/alfa-test": ["vitest"], + "@siteimprove/alfa-test-deprecated": ["chalk"], "@siteimprove/alfa-toolchain": [ "@changesets/assemble-release-plan", "@changesets/config", diff --git a/config/vitest.config.ts b/config/vitest.config.ts new file mode 100644 index 0000000000..d1468da3bc --- /dev/null +++ b/config/vitest.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + include: ["test/**/*.spec.ts?(x)"], + }, +}); diff --git a/config/vitest.workspace.ts b/config/vitest.workspace.ts new file mode 100644 index 0000000000..e63cdd54cc --- /dev/null +++ b/config/vitest.workspace.ts @@ -0,0 +1 @@ +export default ["packages/alfa-*", "!packages/alfa-test-deprecated"]; diff --git a/docs/review/api/alfa-dom.api.md b/docs/review/api/alfa-dom.api.md index f60513facd..2c1a5a08ab 100644 --- a/docs/review/api/alfa-dom.api.md +++ b/docs/review/api/alfa-dom.api.md @@ -89,10 +89,10 @@ export namespace Attribute { // (undocumented) export interface MinimalJSON extends Node.JSON<"attribute"> { } - const // Warning: (ae-forgotten-export) The symbol "predicate" needs to be exported by the entry point index.d.ts + const // Warning: (ae-forgotten-export) The symbol "predicate_3" needs to be exported by the entry point index.d.ts // // (undocumented) - hasName: typeof predicate.hasName; + hasName: typeof predicate_3.hasName; } // @public (undocumented) @@ -374,28 +374,28 @@ export namespace Element { // (undocumented) style: Block.JSON | string | null; } - const // Warning: (ae-forgotten-export) The symbol "predicate_3" needs to be exported by the entry point index.d.ts + const // Warning: (ae-forgotten-export) The symbol "predicate" needs to be exported by the entry point index.d.ts // // (undocumented) - hasAttribute: typeof predicate_3.hasAttribute, // (undocumented) - hasBox: typeof predicate_3.hasBox, // (undocumented) - hasDisplaySize: typeof predicate_3.hasDisplaySize, // (undocumented) - hasId: typeof predicate_3.hasId, // (undocumented) - hasInputType: typeof predicate_3.hasInputType, // (undocumented) - hasName: typeof predicate_3.hasName, // (undocumented) - hasNamespace: typeof predicate_3.hasNamespace, // (undocumented) - hasTabIndex: typeof predicate_3.hasTabIndex, // (undocumented) + hasAttribute: typeof predicate.hasAttribute, // (undocumented) + hasBox: typeof predicate.hasBox, // (undocumented) + hasDisplaySize: typeof predicate.hasDisplaySize, // (undocumented) + hasId: typeof predicate.hasId, // (undocumented) + hasInputType: typeof predicate.hasInputType, // (undocumented) + hasName: typeof predicate.hasName, // (undocumented) + hasNamespace: typeof predicate.hasNamespace, // (undocumented) + hasTabIndex: typeof predicate.hasTabIndex, // (undocumented) hasUniqueId: Predicate>, // (undocumented) - isBrowsingContextContainer: typeof predicate_3.isBrowsingContextContainer, // (undocumented) - isContent: typeof predicate_3.isContent, // (undocumented) - isActuallyDisabled: typeof predicate_3.isActuallyDisabled, // (undocumented) - isDocumentElement: typeof predicate_3.isDocumentElement, // (undocumented) - isDraggable: typeof predicate_3.isDraggable, // (undocumented) - isEditingHost: typeof predicate_3.isEditingHost, // (undocumented) - isFallback: typeof predicate_3.isFallback, // (undocumented) - isScopedTo: typeof predicate_3.isScopedTo, // (undocumented) - isSuggestedFocusable: typeof predicate_3.isSuggestedFocusable, // (undocumented) - isReplaced: typeof predicate_3.isReplaced; + isBrowsingContextContainer: typeof predicate.isBrowsingContextContainer, // (undocumented) + isContent: typeof predicate.isContent, // (undocumented) + isActuallyDisabled: typeof predicate.isActuallyDisabled, // (undocumented) + isDocumentElement: typeof predicate.isDocumentElement, // (undocumented) + isDraggable: typeof predicate.isDraggable, // (undocumented) + isEditingHost: typeof predicate.isEditingHost, // (undocumented) + isFallback: typeof predicate.isFallback, // (undocumented) + isScopedTo: typeof predicate.isScopedTo, // (undocumented) + isSuggestedFocusable: typeof predicate.isSuggestedFocusable, // (undocumented) + isReplaced: typeof predicate.isReplaced; // (undocumented) export interface MinimalJSON extends Node.JSON<"element"> { } diff --git a/docs/review/api/alfa-test-deprecated.api.md b/docs/review/api/alfa-test-deprecated.api.md new file mode 100644 index 0000000000..0d97879b61 --- /dev/null +++ b/docs/review/api/alfa-test-deprecated.api.md @@ -0,0 +1,79 @@ +## API Report File for "@siteimprove/alfa-test-deprecated" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +// @public (undocumented) +export interface Assertions { + // (undocumented) + (value: T, message?: string): void; + // (undocumented) + deepEqual(actual: T, expected: T, message?: string): void; + // (undocumented) + equal(actual: T, expected: T, message?: string): void; + // (undocumented) + fail(message?: string): never; + // (undocumented) + notDeepEqual(actual: T, expected: T, message?: string): void; + // (undocumented) + notEqual(actual: T, expected: T, message?: string): void; + // (undocumented) + rejects(block: Function | Promise, error?: RegExp | Function | Object | Error, message?: string): void; + // (undocumented) + throws(block: Function, error?: RegExp | Function | Object | Error, message?: string): void; +} + +// @public (undocumented) +export interface Controller { + // (undocumented) + iterations: number; + // (undocumented) + seed?: number; + // (undocumented) + wrapper: (rng: RNG, iteration: number) => RNG; +} + +// Warning: (ae-internal-missing-underscore) The name "defaultController" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal (undocumented) +export const defaultController: Controller; + +// Warning: (ae-internal-missing-underscore) The name "format" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal (undocumented) +export function format(name: string, error: Error): string; + +// Warning: (ae-internal-missing-underscore) The name "Notifier" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal (undocumented) +export interface Notifier { + // (undocumented) + error(message: string): void; +} + +// @public (undocumented) +export type RNG = () => T; + +// Warning: (ae-internal-missing-underscore) The name "seedableRNG" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal +export function seedableRNG(seed: number): RNG; + +// Warning: (ae-forgotten-export) The symbol "Frame" needs to be exported by the entry point index.d.ts +// Warning: (ae-internal-missing-underscore) The name "stack" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal (undocumented) +export function stack(error: Error): Iterable; + +// Warning: (ae-internal-mixed-release-tag) Mixed release tags are not allowed for "test" because one of its declarations is marked as @internal +// +// @public (undocumented) +export function test(name: string, assertion: (assert: Assertions, rng: RNG, seed: number) => void | Promise, controller?: Partial>): Promise; + +// @internal (undocumented) +export function test(name: string, assertion: (assert: Assertions, rng: RNG, seed: number) => void | Promise, notifier: Notifier, controller?: Partial>): Promise; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/package.json b/package.json index fda671a66f..76c5a7c8e6 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "scripts": { "build": "node --max-old-space-size=8192 scripts/build.mjs --pretty", "clean": "node scripts/clean.mjs --pretty", - "test": "node scripts/test.mjs --pretty", + "test": "yarn build && vitest run --config ./config/vitest.config.ts", "watch": "node scripts/watch.mjs --pretty", "extract": "node scripts/api-extractor.mjs --pretty", "document": "api-documenter generate -i docs/data/api -o docs/api", @@ -32,15 +32,13 @@ "@microsoft/api-documenter": "^7.19.9", "@microsoft/api-extractor": "^7.29.5", "@siteimprove/alfa-toolchain": "workspace:^0.94.1", - "@types/async": "^3.2.20", "@types/node": "^22.0.0", - "async": "^3.2.1", - "execa": "^9.0.0", "knip": "^5.23.1", "minimist": "^1.2.6", "package-dependency-graph": "^1.14.4", "prettier": "^3.0.0", - "typescript": "^5.5.2" + "typescript": "^5.5.2", + "vitest": "^2.1.5" }, "packageManager": "yarn@4.5.2" } diff --git a/packages/alfa-affine/test/tsconfig.json b/packages/alfa-affine/test/tsconfig.json index 591d74fa5c..5269fc732c 100644 --- a/packages/alfa-affine/test/tsconfig.json +++ b/packages/alfa-affine/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "." + "noEmit": true }, "files": ["./transformation.spec.ts"], "references": [{ "path": "../src" }, { "path": "../../alfa-test" }] diff --git a/packages/alfa-aria/test/tsconfig.json b/packages/alfa-aria/test/tsconfig.json index 4a22b25648..ada00b9896 100644 --- a/packages/alfa-aria/test/tsconfig.json +++ b/packages/alfa-aria/test/tsconfig.json @@ -4,7 +4,7 @@ "compilerOptions": { "jsx": "react-jsx", "jsxImportSource": "@siteimprove/alfa-dom", - "outDir": "." + "noEmit": true }, "files": [ "./dom/predicate/has-accessible-name.spec.tsx", diff --git a/packages/alfa-branched/test/tsconfig.json b/packages/alfa-branched/test/tsconfig.json index 6bb429f401..04ff2e5839 100644 --- a/packages/alfa-branched/test/tsconfig.json +++ b/packages/alfa-branched/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "." + "noEmit": true }, "files": ["./branched.spec.ts"], "references": [{ "path": "../src" }, { "path": "../../alfa-test" }] diff --git a/packages/alfa-cache/test/tsconfig.json b/packages/alfa-cache/test/tsconfig.json index 04cfb8e903..dfcaa84949 100644 --- a/packages/alfa-cache/test/tsconfig.json +++ b/packages/alfa-cache/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "." + "noEmit": true }, "files": ["./cache.spec.ts"], "references": [{ "path": "../src" }, { "path": "../../alfa-test" }] diff --git a/packages/alfa-cascade/test/tsconfig.json b/packages/alfa-cascade/test/tsconfig.json index 7c64f71a84..98ccfeb5fc 100644 --- a/packages/alfa-cascade/test/tsconfig.json +++ b/packages/alfa-cascade/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": ".", + "noEmit": true, "jsx": "react-jsx", "jsxImportSource": "@siteimprove/alfa-dom" }, diff --git a/packages/alfa-comparable/test/tsconfig.json b/packages/alfa-comparable/test/tsconfig.json index 6ae44b392d..414cd963df 100644 --- a/packages/alfa-comparable/test/tsconfig.json +++ b/packages/alfa-comparable/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "." + "noEmit": true }, "files": ["./comparable.spec.ts"], "references": [{ "path": "../src" }, { "path": "../../alfa-test" }] diff --git a/packages/alfa-css-feature/test/tsconfig.json b/packages/alfa-css-feature/test/tsconfig.json index 5de5735178..9a0ee26910 100644 --- a/packages/alfa-css-feature/test/tsconfig.json +++ b/packages/alfa-css-feature/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "." + "noEmit": true }, "files": [ "./media.spec.ts", diff --git a/packages/alfa-css/test/tsconfig.json b/packages/alfa-css/test/tsconfig.json index 67c42cf59b..11cab94f73 100644 --- a/packages/alfa-css/test/tsconfig.json +++ b/packages/alfa-css/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "." + "noEmit": true }, "files": [ "./common/parse.ts", diff --git a/packages/alfa-dom/package.json b/packages/alfa-dom/package.json index fcbadefadb..df2f0e069a 100644 --- a/packages/alfa-dom/package.json +++ b/packages/alfa-dom/package.json @@ -24,6 +24,8 @@ "./jsx.js": "./dist/jsx.js", "./jsx-runtime": "./dist/jsx-runtime.js", "./jsx-runtime.js": "./dist/jsx-runtime.js", + "./jsx-dev-runtime": "./dist/jsx-runtime.js", + "./jsx-dev-runtime.js": "./dist/jsx-runtime.js", "./native": "./dist/native.js", "./native.js": "./dist/native.js" }, diff --git a/packages/alfa-dom/src/index.ts b/packages/alfa-dom/src/index.ts index 03b228cbc1..dfd495e758 100644 --- a/packages/alfa-dom/src/index.ts +++ b/packages/alfa-dom/src/index.ts @@ -37,5 +37,5 @@ export * from "./node/type.js"; export * from "./node/query/index.js"; -export * from "./h.js"; +export { h } from "./h.js"; export * from "./jsx.js"; diff --git a/packages/alfa-dom/test/tsconfig.json b/packages/alfa-dom/test/tsconfig.json index f96b5cd5d4..e2a073e92e 100644 --- a/packages/alfa-dom/test/tsconfig.json +++ b/packages/alfa-dom/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": ".", + "noEmit": true, "jsx": "react-jsx", "jsxImportSource": "@siteimprove/alfa-dom" }, diff --git a/packages/alfa-emitter/test/tsconfig.json b/packages/alfa-emitter/test/tsconfig.json index fb71d075a5..40358e8e30 100644 --- a/packages/alfa-emitter/test/tsconfig.json +++ b/packages/alfa-emitter/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "." + "noEmit": true }, "files": ["./emitter.spec.ts"], "references": [{ "path": "../src" }, { "path": "../../alfa-test" }] diff --git a/packages/alfa-equatable/test/tsconfig.json b/packages/alfa-equatable/test/tsconfig.json index cf50c4f578..bf0b07d546 100644 --- a/packages/alfa-equatable/test/tsconfig.json +++ b/packages/alfa-equatable/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "." + "noEmit": true }, "files": ["./equatable.spec.ts"], "references": [{ "path": "../src" }, { "path": "../../alfa-test" }] diff --git a/packages/alfa-flags/test/tsconfig.json b/packages/alfa-flags/test/tsconfig.json index 63d46901de..4f42beb005 100644 --- a/packages/alfa-flags/test/tsconfig.json +++ b/packages/alfa-flags/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "." + "noEmit": true }, "files": ["./flags.spec.ts"], "references": [{ "path": "../src" }, { "path": "../../alfa-test" }] diff --git a/packages/alfa-fnv/test/tsconfig.json b/packages/alfa-fnv/test/tsconfig.json index 94b0b7ca07..bc04590b66 100644 --- a/packages/alfa-fnv/test/tsconfig.json +++ b/packages/alfa-fnv/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "." + "noEmit": true }, "files": ["./fnv.spec.ts"], "references": [{ "path": "../src" }, { "path": "../../alfa-test" }] diff --git a/packages/alfa-future/test/tsconfig.json b/packages/alfa-future/test/tsconfig.json index 84c8c95889..b11a8ed5e6 100644 --- a/packages/alfa-future/test/tsconfig.json +++ b/packages/alfa-future/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "." + "noEmit": true }, "files": ["./future.spec.ts"], "references": [{ "path": "../src" }, { "path": "../../alfa-test" }] diff --git a/packages/alfa-generator/test/tsconfig.json b/packages/alfa-generator/test/tsconfig.json index 2eeffaff93..5028250bba 100644 --- a/packages/alfa-generator/test/tsconfig.json +++ b/packages/alfa-generator/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "." + "noEmit": true }, "files": ["./generator.spec.ts"], "references": [{ "path": "../src" }, { "path": "../../alfa-test" }] diff --git a/packages/alfa-graph/test/tsconfig.json b/packages/alfa-graph/test/tsconfig.json index 4689f35cbe..d709da1f86 100644 --- a/packages/alfa-graph/test/tsconfig.json +++ b/packages/alfa-graph/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "." + "noEmit": true }, "files": ["./graph.spec.ts"], "references": [{ "path": "../src" }, { "path": "../../alfa-test" }] diff --git a/packages/alfa-http/test/tsconfig.json b/packages/alfa-http/test/tsconfig.json index bdf9a97807..06116bb04b 100644 --- a/packages/alfa-http/test/tsconfig.json +++ b/packages/alfa-http/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "." + "noEmit": true }, "files": ["./request.spec.ts", "./response.spec.ts"], "references": [{ "path": "../src" }, { "path": "../../alfa-test" }] diff --git a/packages/alfa-iana/test/tsconfig.json b/packages/alfa-iana/test/tsconfig.json index 861d37739b..7f2026b0df 100644 --- a/packages/alfa-iana/test/tsconfig.json +++ b/packages/alfa-iana/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "." + "noEmit": true }, "files": ["./language.spec.ts"], "references": [{ "path": "../src" }, { "path": "../../alfa-test" }] diff --git a/packages/alfa-lazy/test/tsconfig.json b/packages/alfa-lazy/test/tsconfig.json index 8d26378ec2..4301ab95a9 100644 --- a/packages/alfa-lazy/test/tsconfig.json +++ b/packages/alfa-lazy/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "." + "noEmit": true }, "files": ["./lazy.spec.ts"], "references": [{ "path": "../src" }, { "path": "../../alfa-test" }] diff --git a/packages/alfa-list/test/tsconfig.json b/packages/alfa-list/test/tsconfig.json index f92d2d0892..48042ed8c6 100644 --- a/packages/alfa-list/test/tsconfig.json +++ b/packages/alfa-list/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "." + "noEmit": true }, "files": ["./list.spec.ts"], "references": [{ "path": "../src" }, { "path": "../../alfa-test" }] diff --git a/packages/alfa-map/test/tsconfig.json b/packages/alfa-map/test/tsconfig.json index 02746102fb..b105ea9083 100644 --- a/packages/alfa-map/test/tsconfig.json +++ b/packages/alfa-map/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "." + "noEmit": true }, "files": ["./map.spec.ts", "./property.spec.ts"], "references": [{ "path": "../src" }, { "path": "../../alfa-test" }] diff --git a/packages/alfa-math/test/tsconfig.json b/packages/alfa-math/test/tsconfig.json index 362a395dd1..39e9bc00d9 100644 --- a/packages/alfa-math/test/tsconfig.json +++ b/packages/alfa-math/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "." + "noEmit": true }, "files": ["./matrix.spec.ts", "./vector.spec.ts"], "references": [{ "path": "../src" }, { "path": "../../alfa-test" }] diff --git a/packages/alfa-network/test/tsconfig.json b/packages/alfa-network/test/tsconfig.json index e2a076ecef..e482804c62 100644 --- a/packages/alfa-network/test/tsconfig.json +++ b/packages/alfa-network/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "." + "noEmit": true }, "files": ["./network.spec.ts"], "references": [{ "path": "../src" }, { "path": "../../alfa-test" }] diff --git a/packages/alfa-option/test/tsconfig.json b/packages/alfa-option/test/tsconfig.json index b23cd513ec..db8e67a65f 100644 --- a/packages/alfa-option/test/tsconfig.json +++ b/packages/alfa-option/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "." + "noEmit": true }, "files": ["./option.spec.ts", "./maybe.spec.ts"], "references": [{ "path": "../src" }, { "path": "../../alfa-test" }] diff --git a/packages/alfa-predicate/test/tsconfig.json b/packages/alfa-predicate/test/tsconfig.json index 4c38297d79..136a046a44 100644 --- a/packages/alfa-predicate/test/tsconfig.json +++ b/packages/alfa-predicate/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "." + "noEmit": true }, "files": ["./predicate.spec.ts"], "references": [{ "path": "../src" }, { "path": "../../alfa-test" }] diff --git a/packages/alfa-promise/test/tsconfig.json b/packages/alfa-promise/test/tsconfig.json index 9602b0a919..37b9ee6343 100644 --- a/packages/alfa-promise/test/tsconfig.json +++ b/packages/alfa-promise/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "." + "noEmit": true }, "files": ["./promise.spec.ts"], "references": [{ "path": "../src" }, { "path": "../../alfa-test" }] diff --git a/packages/alfa-record/test/tsconfig.json b/packages/alfa-record/test/tsconfig.json index ffa24bcdb1..be375c25ee 100644 --- a/packages/alfa-record/test/tsconfig.json +++ b/packages/alfa-record/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "." + "noEmit": true }, "files": ["./record.spec.ts"], "references": [{ "path": "../src" }, { "path": "../../alfa-test" }] diff --git a/packages/alfa-rectangle/test/tsconfig.json b/packages/alfa-rectangle/test/tsconfig.json index da640e8302..49ab403b57 100644 --- a/packages/alfa-rectangle/test/tsconfig.json +++ b/packages/alfa-rectangle/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "." + "noEmit": true }, "files": ["./rectangle.spec.ts"], "references": [{ "path": "../src" }, { "path": "../../alfa-test" }] diff --git a/packages/alfa-refinement/test/tsconfig.json b/packages/alfa-refinement/test/tsconfig.json index 4df0dd2793..4e1bb65fbc 100644 --- a/packages/alfa-refinement/test/tsconfig.json +++ b/packages/alfa-refinement/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "." + "noEmit": true }, "files": ["./refinement.spec.ts"], "references": [{ "path": "../src" }, { "path": "../../alfa-test" }] diff --git a/packages/alfa-result/test/tsconfig.json b/packages/alfa-result/test/tsconfig.json index 5c9ce67aee..0df3bca1a0 100644 --- a/packages/alfa-result/test/tsconfig.json +++ b/packages/alfa-result/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "." + "noEmit": true }, "files": ["./result.spec.ts"], "references": [{ "path": "../src" }, { "path": "../../alfa-test" }] diff --git a/packages/alfa-rules/test/tsconfig.json b/packages/alfa-rules/test/tsconfig.json index d1dff6ac13..3a99845ba0 100644 --- a/packages/alfa-rules/test/tsconfig.json +++ b/packages/alfa-rules/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": ".", + "noEmit": true, "jsx": "react-jsx", "jsxImportSource": "@siteimprove/alfa-dom" }, diff --git a/packages/alfa-selective/test/tsconfig.json b/packages/alfa-selective/test/tsconfig.json index 25153bc03b..043d07fbe2 100644 --- a/packages/alfa-selective/test/tsconfig.json +++ b/packages/alfa-selective/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "." + "noEmit": true }, "files": ["./selective.spec.ts"], "references": [{ "path": "../src" }, { "path": "../../alfa-test" }] diff --git a/packages/alfa-selector/test/tsconfig.json b/packages/alfa-selector/test/tsconfig.json index f46c20253c..6d938d1b54 100644 --- a/packages/alfa-selector/test/tsconfig.json +++ b/packages/alfa-selector/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": ".", + "noEmit": true, "jsx": "react-jsx", "jsxImportSource": "@siteimprove/alfa-dom" }, diff --git a/packages/alfa-sequence/test/tsconfig.json b/packages/alfa-sequence/test/tsconfig.json index 4b4b8cc8fd..af2866490c 100644 --- a/packages/alfa-sequence/test/tsconfig.json +++ b/packages/alfa-sequence/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "." + "noEmit": true }, "files": ["./sequence.spec.ts"], "references": [{ "path": "../src" }, { "path": "../../alfa-test" }] diff --git a/packages/alfa-slice/test/tsconfig.json b/packages/alfa-slice/test/tsconfig.json index ed0c7b7b50..3635270239 100644 --- a/packages/alfa-slice/test/tsconfig.json +++ b/packages/alfa-slice/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "." + "noEmit": true }, "files": ["./slice.spec.ts"], "references": [{ "path": "../src" }, { "path": "../../alfa-test" }] diff --git a/packages/alfa-string/test/tsconfig.json b/packages/alfa-string/test/tsconfig.json index e4825c5d13..200604dfe6 100644 --- a/packages/alfa-string/test/tsconfig.json +++ b/packages/alfa-string/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "." + "noEmit": true }, "files": ["./string.spec.ts"], "references": [{ "path": "../src" }, { "path": "../../alfa-test" }] diff --git a/packages/alfa-style/test/property/border-[block,inline]-[end,start].spec.tsx b/packages/alfa-style/test/property/border-[block,inline]-[end,start].spec.tsx index c803e83bd7..cb2795dbcc 100644 --- a/packages/alfa-style/test/property/border-[block,inline]-[end,start].spec.tsx +++ b/packages/alfa-style/test/property/border-[block,inline]-[end,start].spec.tsx @@ -39,14 +39,14 @@ function parse( t.deepEqual(cascaded(element, `${shorthand}-width` as const), { value: width ? { - type: "length", - value: width, - unit: "px", - } + type: "length", + value: width, + unit: "px", + } : { - type: "keyword", - value: "initial", - }, + type: "keyword", + value: "initial", + }, source: declaration.toJSON(), }); } diff --git a/packages/alfa-style/test/property/border-[block,inline].spec.tsx b/packages/alfa-style/test/property/border-[block,inline].spec.tsx index c9345d4d10..bec5190cd6 100644 --- a/packages/alfa-style/test/property/border-[block,inline].spec.tsx +++ b/packages/alfa-style/test/property/border-[block,inline].spec.tsx @@ -39,14 +39,14 @@ function parse( t.deepEqual(cascaded(element, `${shorthand}-${side}-width` as const), { value: width ? { - type: "length", - value: width, - unit: "px", - } + type: "length", + value: width, + unit: "px", + } : { - type: "keyword", - value: "initial", - }, + type: "keyword", + value: "initial", + }, source: declaration.toJSON(), }); } diff --git a/packages/alfa-style/test/property/border-[top,right,bottom,left].spec.tsx b/packages/alfa-style/test/property/border-[top,right,bottom,left].spec.tsx index 0987d8afaf..d6f3193aa1 100644 --- a/packages/alfa-style/test/property/border-[top,right,bottom,left].spec.tsx +++ b/packages/alfa-style/test/property/border-[top,right,bottom,left].spec.tsx @@ -39,14 +39,14 @@ function parse( value: width !== undefined ? { - type: "length", - value: width, - unit: "px", - } + type: "length", + value: width, + unit: "px", + } : { - type: "keyword", - value: "initial", - }, + type: "keyword", + value: "initial", + }, source: declaration.toJSON(), }); } diff --git a/packages/alfa-style/test/property/border.spec.tsx b/packages/alfa-style/test/property/border.spec.tsx index 6995d1e6af..5b4f466827 100644 --- a/packages/alfa-style/test/property/border.spec.tsx +++ b/packages/alfa-style/test/property/border.spec.tsx @@ -36,14 +36,14 @@ function parse( t.deepEqual(cascaded(element, `border-${side}-width` as const), { value: width ? { - type: "length", - value: width, - unit: "px", - } + type: "length", + value: width, + unit: "px", + } : { - type: "keyword", - value: "initial", - }, + type: "keyword", + value: "initial", + }, source: declaration.toJSON(), }); } diff --git a/packages/alfa-style/test/tsconfig.json b/packages/alfa-style/test/tsconfig.json index 11ddab4320..118d1b5f56 100644 --- a/packages/alfa-style/test/tsconfig.json +++ b/packages/alfa-style/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": ".", + "noEmit": true, "jsx": "react-jsx", "jsxImportSource": "@siteimprove/alfa-dom" }, diff --git a/packages/alfa-table/test/tsconfig.json b/packages/alfa-table/test/tsconfig.json index 7949b15c45..d7154f0d11 100644 --- a/packages/alfa-table/test/tsconfig.json +++ b/packages/alfa-table/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": ".", + "noEmit": true, "jsx": "react-jsx", "jsxImportSource": "@siteimprove/alfa-dom" }, diff --git a/packages/alfa-test-deprecated/CHANGELOG.md b/packages/alfa-test-deprecated/CHANGELOG.md new file mode 100644 index 0000000000..a4d3b43d2c --- /dev/null +++ b/packages/alfa-test-deprecated/CHANGELOG.md @@ -0,0 +1,203 @@ +# @siteimprove/alfa-test + +## 0.94.1 + +## 0.94.0 + +## 0.93.8 + +## 0.93.7 + +## 0.93.6 + +## 0.93.5 + +## 0.93.4 + +## 0.93.3 + +## 0.93.2 + +## 0.93.1 + +## 0.93.0 + +## 0.92.0 + +### Minor Changes + +- **Changed:** Alfa packages are now (also) published on the npmjs registry. ([`5b924adf304b6f809f4c8b9d5a2f4a8950d5b10b`](https://github.com/Siteimprove/alfa/commit/5b924adf304b6f809f4c8b9d5a2f4a8950d5b10b)) + +## 0.91.2 + +## 0.91.1 + +## 0.91.0 + +### Minor Changes + +- **Changed:** Dummy minor version to experiment with publish flow, use the previous or next minor version instead. ([`2a62d8a43e294ee56c18315c8fad29fbdc18c0df`](https://github.com/Siteimprove/alfa/commit/2a62d8a43e294ee56c18315c8fad29fbdc18c0df)) + +## 0.90.1 + +## 0.90.0 + +## 0.89.3 + +### Patch Changes + +- **Fixed:** Dummy release to test workflow ([`a3090826646a63d07a394a794aed54515fcac95f`](https://github.com/Siteimprove/alfa/commit/a3090826646a63d07a394a794aed54515fcac95f)) + +## 0.89.2 + +### Patch Changes + +- **Changed:** Trying to fix a problem in generating provenance statements ([#1674](https://github.com/Siteimprove/alfa/pull/1674)) + +## 0.89.1 + +### Patch Changes + +- **Added:** Trying to publish Alfa packages on the npm registry ([#1673](https://github.com/Siteimprove/alfa/pull/1673)) + +## 0.89.0 + +## 0.88.0 + +### Minor Changes + +- **Fixed:** The publish flow was updated to a new version. ([`a2f19cf9a6c7c72b8bf085597e4f1a95ac3e4eb2`](https://github.com/Siteimprove/alfa/commit/a2f19cf9a6c7c72b8bf085597e4f1a95ac3e4eb2)) + + Some 0.87.\* versions were generating uninstallable package. This should be fixed now. + +## 0.87.12 + +## 0.87.11 + +## 0.87.10 + +## 0.87.7 + +## 0.87.6 + +## 0.87.5 + +## 0.87.4 + +## 0.87.3 + +## 0.87.2 + +## 0.87.1 + +## 0.87.0 + +## 0.86.2 + +## 0.86.1 + +## 0.86.0 + +### Minor Changes + +- **Breaking:** TS resolution has been changed to `Node16`, target to `es2022`. ([#1636](https://github.com/Siteimprove/alfa/pull/1636)) + +- **Breaking:** Alfa is now distributed as ESM rather than CJS modules; projects using it must be ESM or use dynamic `import()`. ([#1636](https://github.com/Siteimprove/alfa/pull/1636)) + + ⚠️ This is the last of a series of changes on the internal structure and build process of distributed packages that was started with v0.85.0. + +## 0.85.1 + +## 0.85.0 + +### Minor Changes + +- **Breaking:** The .js files are now built in the `dist` folder rather than in `src`. ([#1628](https://github.com/Siteimprove/alfa/pull/1628)) + + ⚠️ This is the first of a series of changes on the internal structure and build process of distributed packages. It is probably better to not use this version and wait until more of these internal changes have been done to jump directly to the final result. We are internally releasing these changes for validation purpose only. + + This should not impact consumers, the `package.json` files should be set correctly to consume these files. + +## 0.84.0 + +## 0.83.1 + +## 0.83.0 + +## 0.82.0 + +### Minor Changes + +- **Breaking:** Node 18 is no longer supported. ([#1618](https://github.com/Siteimprove/alfa/pull/1618)) + +## 0.81.0 + +### Patch Changes + +- **Added:** Each package now contains its internal dependency graph in its `docs` directory. ([#1610](https://github.com/Siteimprove/alfa/pull/1610)) + +## 0.80.0 + +## 0.79.1 + +## 0.79.0 + +## 0.78.2 + +## 0.78.1 + +## 0.78.0 + +## 0.77.0 + +## 0.76.0 + +## 0.75.2 + +## 0.75.1 + +## 0.75.0 + +## 0.74.0 + +## 0.73.0 + +## 0.72.0 + +## 0.71.1 + +## 0.71.0 + +## 0.70.0 + +### Minor Changes + +- **Added:** Test can now accept a `Controller` to generate random tests. ([#1514](https://github.com/Siteimprove/alfa/pull/1514)) + + See the [README](./README.md) for more information. + +## 0.69.0 + +## 0.68.0 + +## 0.67.0 + +## 0.66.0 + +## 0.65.1 + +## 0.65.0 + +## 0.64.0 + +## 0.63.3 + +## 0.63.2 + +## 0.63.1 + +## 0.63.0 + +## 0.62.2 + +## 0.62.1 diff --git a/packages/alfa-test-deprecated/README.md b/packages/alfa-test-deprecated/README.md new file mode 100644 index 0000000000..ec0928f7ce --- /dev/null +++ b/packages/alfa-test-deprecated/README.md @@ -0,0 +1,63 @@ +# Alfa test + +Thanks to the referential transparency ensured by [ADR 6](../../docs/architecture/decisions/adr-006.md), unit test of Alfa code is usually very easy, simply comparing the actual result with the expected one (often as their serialisation), without need for complex setup, mocks, or other test tricks. + +We're therefore implementing a very lightweight wrapper for tests. + +```typescript +import { test } from "@siteimprove/alfa-test"; + +test("My test", (t) => { + const actual = …; + + t.deepEqual(actual.toJSON(), { type: …, …}) +}); +``` + +## Property testing + +Sometimes, it is convenient to generate random tests with random values. The `alfa-test` library is offering test controller to handle that. + +- The `assertion` function that is passed to `test(name, assertion)` receives additional `rng` and `seed` parameters. The `rng` is a function `() => number`. The `seed` was used to initialize the Random Number Generator, can be used for better displaying errors and for re-playability. +- The `test` function itself accepts an optional `Controller` object which can be used to set the `seed` for the RNG, or to change the number of `iterations` to run the test (default to 1 since most tests are not random tests). The `Controller` object also accepts a `wrapper` function of type `(iteration: number, rng: RNG) => RNG` that can be used to turn the random numbers into useful data, or for introspection. + +The provided `rng` function is guaranteed to generate the same sequence of numbers on sequential calls, if the same seed is provided by the controller. If no seed is provided, a random one will be used. + +By default, each test is only run once. Use the `Controller` object to change the number of iterations. + +Tests that make use of the RNG are encouraged to print the seed in their error message in order to allow re-playability and investigation by feeding the failing seed back to the test. + +For re-playability, use the `Controller` parameter to select the seed to use (which guarantees the exact same sequence of numbers is produced), and to introspect on fine details by wrapping the RNG, e.g., + +```typescript +/** + * Return a random string between "0" and "100" (inclusive). + * Print the generated number, as well as the iteration number (use for debugging). + */ +function wrapper(rng: RNG, iteration: number): RNG { + return () => { + const res = rng(); + console.log(`On iteration ${iteration}, I generated ${res}`); + return `${res * 100}`; + }; +} + +test( + "Sum computes the sum of two numbers represented as strings", + (t, rng, seed) => { + // These use the post-wrapper RNG. + const a = rng(); + const b = rng(); + // Print the seed in error message to allow introspection. + const actual = sum(a, b, `Failed with seed ${seed}`); + + t.deepEqual(actual, `${a + b}`); + }, + { + wrapper, + iterations: 100, + // Set the seed for debugging, if you want to replay the same sequence of numbers. + seed: 1234, + }, +); +``` diff --git a/packages/alfa-test-deprecated/config/api-extractor.json b/packages/alfa-test-deprecated/config/api-extractor.json new file mode 100644 index 0000000000..7c547d46a6 --- /dev/null +++ b/packages/alfa-test-deprecated/config/api-extractor.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + "extends": "../../../config/api-extractor.json", + "mainEntryPointFilePath": "/dist/index.d.ts" +} diff --git a/packages/alfa-test-deprecated/docs/dependency-graph.dot b/packages/alfa-test-deprecated/docs/dependency-graph.dot new file mode 100644 index 0000000000..2598ed7313 --- /dev/null +++ b/packages/alfa-test-deprecated/docs/dependency-graph.dot @@ -0,0 +1,177 @@ +digraph "dependency-graph-[object Object]" { + compound = true; + "dependency-graph-[object Object]" [ + style = "invis"; + ]; + "src/stack.ts"; + "src/format.ts"; + "src/rng.ts"; + "src/test.ts"; + "src/types.ts"; + subgraph "cluster_src" { + color = "#000000"; + label = ""; + "name_src" [ + penwidth = 5; + shape = "rectangle"; + color = "#ff0000"; + label = "src"; + ]; + "exit_src" [ + style = "invis"; + ]; + subgraph "cluster_src" { + color = "#000000"; + label = ""; + "name_src" [ + penwidth = 5; + shape = "rectangle"; + color = "#ff0000"; + label = "src"; + ]; + "exit_src" [ + style = "invis"; + ]; + "src/format.ts" [ + label = "format.ts"; + ]; + "src/index.ts" [ + label = "index.ts"; + color = "#ff0000"; + penwidth = 5; + ]; + "src/rng.ts" [ + label = "rng.ts"; + ]; + "src/stack.ts" [ + label = "stack.ts"; + ]; + "src/test.ts" [ + label = "test.ts"; + ]; + "src/types.ts" [ + label = "types.ts"; + ]; + "src/format.ts" -> "exit_src" [ + style = "invis"; + ]; + "src/index.ts" -> "exit_src" [ + style = "invis"; + ]; + "src/rng.ts" -> "exit_src" [ + style = "invis"; + ]; + "src/stack.ts" -> "exit_src" [ + style = "invis"; + ]; + "src/test.ts" -> "exit_src" [ + style = "invis"; + ]; + "src/types.ts" -> "exit_src" [ + style = "invis"; + ]; + } + "exit_src" -> "exit_src" [ + style = "invis"; + ]; + "exit_src" -> "exit_src" [ + style = "invis"; + ]; + "exit_src" -> "exit_src" [ + style = "invis"; + ]; + "exit_src" -> "exit_src" [ + style = "invis"; + ]; + "exit_src" -> "exit_src" [ + style = "invis"; + ]; + "exit_src" -> "exit_src" [ + style = "invis"; + ]; + } + "exit_src" -> "dependency-graph-[object Object]" [ + style = "invis"; + ]; + "src/format.ts" -> "src/stack.ts" [ + style = "invis"; + ]; + "src/format.ts" -> "src/stack.ts" [ + style = "solid"; + ltail = "cluster_src/format.ts"; + lhead = "cluster_src/stack.ts"; + color = "black"; + ]; + "src/index.ts" -> "src/format.ts" [ + style = "invis"; + ]; + "src/index.ts" -> "src/format.ts" [ + style = "solid"; + ltail = "cluster_src/index.ts"; + lhead = "cluster_src/format.ts"; + color = "black"; + ]; + "src/index.ts" -> "src/rng.ts" [ + style = "invis"; + ]; + "src/index.ts" -> "src/rng.ts" [ + style = "solid"; + ltail = "cluster_src/index.ts"; + lhead = "cluster_src/rng.ts"; + color = "black"; + ]; + "src/index.ts" -> "src/stack.ts" [ + style = "invis"; + ]; + "src/index.ts" -> "src/stack.ts" [ + style = "solid"; + ltail = "cluster_src/index.ts"; + lhead = "cluster_src/stack.ts"; + color = "black"; + ]; + "src/index.ts" -> "src/test.ts" [ + style = "invis"; + ]; + "src/index.ts" -> "src/test.ts" [ + style = "solid"; + ltail = "cluster_src/index.ts"; + lhead = "cluster_src/test.ts"; + color = "black"; + ]; + "src/index.ts" -> "src/types.ts" [ + style = "invis"; + ]; + "src/index.ts" -> "src/types.ts" [ + style = "solid"; + ltail = "cluster_src/index.ts"; + lhead = "cluster_src/types.ts"; + color = "black"; + ]; + "src/test.ts" -> "src/format.ts" [ + style = "invis"; + ]; + "src/test.ts" -> "src/format.ts" [ + style = "solid"; + ltail = "cluster_src/test.ts"; + lhead = "cluster_src/format.ts"; + color = "black"; + ]; + "src/test.ts" -> "src/rng.ts" [ + style = "invis"; + ]; + "src/test.ts" -> "src/rng.ts" [ + style = "solid"; + ltail = "cluster_src/test.ts"; + lhead = "cluster_src/rng.ts"; + color = "black"; + ]; + "src/test.ts" -> "src/types.ts" [ + style = "invis"; + ]; + "src/test.ts" -> "src/types.ts" [ + style = "dotted"; + ltail = "cluster_src/test.ts"; + lhead = "cluster_src/types.ts"; + color = "black"; + ]; +} \ No newline at end of file diff --git a/packages/alfa-test-deprecated/docs/dependency-graph.svg b/packages/alfa-test-deprecated/docs/dependency-graph.svg new file mode 100644 index 0000000000..ea2ddee0a8 --- /dev/null +++ b/packages/alfa-test-deprecated/docs/dependency-graph.svg @@ -0,0 +1,141 @@ + + + + + + +dependency-graph-[object Object] + + +cluster_src + + + +cluster_src + + + + + +src/stack.ts + +stack.ts + + + + + +src/format.ts + +format.ts + + + + +src/format.ts->src/stack.ts + + + + + + +src/rng.ts + +rng.ts + + + + +src/test.ts + +test.ts + + + + +src/test.ts->src/format.ts + + + + + + +src/test.ts->src/rng.ts + + + + + +src/types.ts + +types.ts + + + + +src/test.ts->src/types.ts + + + + + + + +name_src + +src + + + + + + + + + + +src/index.ts + +index.ts + + + + +src/index.ts->src/stack.ts + + + + + + +src/index.ts->src/format.ts + + + + + + +src/index.ts->src/rng.ts + + + + + + +src/index.ts->src/test.ts + + + + + + +src/index.ts->src/types.ts + + + + + + diff --git a/packages/alfa-test-deprecated/package.json b/packages/alfa-test-deprecated/package.json new file mode 100644 index 0000000000..1dda473186 --- /dev/null +++ b/packages/alfa-test-deprecated/package.json @@ -0,0 +1,32 @@ +{ + "$schema": "http://json.schemastore.org/package", + "name": "@siteimprove/alfa-test-deprecated", + "homepage": "https://alfa.siteimprove.com", + "version": "0.94.1", + "license": "MIT", + "description": "A simple test library sitting on top of the built-in Node.js assert module", + "repository": { + "type": "git", + "url": "github:Siteimprove/alfa", + "directory": "packages/alfa-test-deprecated" + }, + "bugs": "https://github.com/siteimprove/alfa/issues", + "engines": { + "node": ">=20.0.0" + }, + "type": "module", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "files": [ + "dist/**/*.js", + "dist/**/*.d.ts" + ], + "dependencies": { + "@types/node": "^22.0.0", + "chalk": "^5.3.0" + }, + "publishConfig": { + "access": "public", + "registry": "https://npm.pkg.github.com/" + } +} diff --git a/packages/alfa-test/src/format.ts b/packages/alfa-test-deprecated/src/format.ts similarity index 100% rename from packages/alfa-test/src/format.ts rename to packages/alfa-test-deprecated/src/format.ts diff --git a/packages/alfa-test-deprecated/src/index.ts b/packages/alfa-test-deprecated/src/index.ts new file mode 100644 index 0000000000..d4db0da991 --- /dev/null +++ b/packages/alfa-test-deprecated/src/index.ts @@ -0,0 +1,5 @@ +export * from "./format.js"; +export * from "./rng.js"; +export * from "./stack.js"; +export * from "./test.js"; +export * from "./types.js"; diff --git a/packages/alfa-test-deprecated/src/rng.ts b/packages/alfa-test-deprecated/src/rng.ts new file mode 100644 index 0000000000..1b13fe43f5 --- /dev/null +++ b/packages/alfa-test-deprecated/src/rng.ts @@ -0,0 +1,36 @@ +/** + * @public + */ +export type RNG = () => T; + +/** + * PRNG taken from + * {@link https://stackoverflow.com/questions/521295/seeding-the-random-number-generator-in-javascript} + * + * @internal + */ +export function seedableRNG(seed: number): RNG { + return function () { + let t = (seed += 0x6d2b79f5); + t = Math.imul(t ^ (t >>> 15), t | 1); + t ^= t + Math.imul(t ^ (t >>> 7), t | 61); + return ((t ^ (t >>> 14)) >>> 0) / 4294967296; + }; +} + +/** + * @public + */ +export interface Controller { + iterations: number; + wrapper: (rng: RNG, iteration: number) => RNG; + seed?: number; +} + +/** + * @internal + */ +export const defaultController: Controller = { + iterations: 1, + wrapper: (rng, iteration: number) => rng, +}; diff --git a/packages/alfa-test/src/stack.ts b/packages/alfa-test-deprecated/src/stack.ts similarity index 100% rename from packages/alfa-test/src/stack.ts rename to packages/alfa-test-deprecated/src/stack.ts diff --git a/packages/alfa-test-deprecated/src/test.ts b/packages/alfa-test-deprecated/src/test.ts new file mode 100644 index 0000000000..ce35da3661 --- /dev/null +++ b/packages/alfa-test-deprecated/src/test.ts @@ -0,0 +1,103 @@ +/// + +import * as assert from "assert"; + +import { format } from "./format.js"; +import { + type Controller, + defaultController, + type RNG, + seedableRNG, +} from "./rng.js"; +import type { Assertions } from "./types.js"; + +/** + * @internal + */ +export interface Notifier { + error(message: string): void; +} + +const defaultNotifier: Notifier = { + error: (message) => { + process.stderr.write(`${message}\n`); + process.exit(1); + }, +}; + +// This is not super robust, but sufficient in our use case. +// Take care before using it elsewhere. +function isNotifier(value: unknown): value is Notifier { + return typeof value === "object" && value !== null && "error" in value; +} + +/** + * @public + */ +export async function test( + name: string, + assertion: ( + assert: Assertions, + rng: RNG, + seed: number, + ) => void | Promise, + controller?: Partial>, +): Promise; + +/** + * @internal + */ +export async function test( + name: string, + assertion: ( + assert: Assertions, + rng: RNG, + seed: number, + ) => void | Promise, + notifier: Notifier, + controller?: Partial>, +): Promise; + +export async function test( + name: string, + assertion: ( + assert: Assertions, + rng: RNG, + seed: number, + ) => void | Promise, + notifierOrController?: Notifier | Partial>, + controller?: Partial>, +): Promise { + const notifier: Notifier = isNotifier(notifierOrController) + ? notifierOrController + : defaultNotifier; + // If the controlled is not overwritten, then T should be number. + const fullController = { + ...defaultController, + ...controller, + ...notifierOrController, + } as Controller; + // "error" may have been copied over from the notifier. + if ("error" in fullController) { + delete fullController.error; + } + + const seed = fullController.seed ?? Math.random(); + const rng = seedableRNG(seed); + + try { + for (let i = 0; i < fullController.iterations; i++) { + await assertion( + "strict" in assert ? assert.strict : assert, + // eta-expansion ensures that the wrapper is evaluated on each call of + // the rng, not just once per iteration. + () => fullController.wrapper(rng, i)(), + seed, + ); + } + } catch (err) { + const error = err as Error; + + notifier.error(`${format(name, error)}\n`); + } +} diff --git a/packages/alfa-test-deprecated/src/tsconfig.json b/packages/alfa-test-deprecated/src/tsconfig.json new file mode 100644 index 0000000000..99a20740d6 --- /dev/null +++ b/packages/alfa-test-deprecated/src/tsconfig.json @@ -0,0 +1,13 @@ +{ + "$schema": "http://json.schemastore.org/tsconfig", + "extends": "../tsconfig.json", + "compilerOptions": { "outDir": "../dist" }, + "files": [ + "./format.ts", + "./index.ts", + "./rng.ts", + "./stack.ts", + "./test.ts", + "./types.ts" + ] +} diff --git a/packages/alfa-test-deprecated/src/types.ts b/packages/alfa-test-deprecated/src/types.ts new file mode 100644 index 0000000000..d16b779e98 --- /dev/null +++ b/packages/alfa-test-deprecated/src/types.ts @@ -0,0 +1,52 @@ +/** + * @public + */ +export interface Assertions { + /** + * {@link https://nodejs.org/api/assert.html#assert_assert_value_message} + */ + (value: T, message?: string): void; + + /** + * {@link https://nodejs.org/api/assert.html#assert_assert_equal_actual_expected_message} + */ + equal(actual: T, expected: T, message?: string): void; + + /** + * {@link https://nodejs.org/api/assert.html#assert_assert_notequal_actual_expected_message} + */ + notEqual(actual: T, expected: T, message?: string): void; + + /** + * {@link https://nodejs.org/api/assert.html#assert_assert_deepequal_actual_expected_message} + */ + deepEqual(actual: T, expected: T, message?: string): void; + + /** + * {@link https://nodejs.org/api/assert.html#assert_assert_notdeepequal_actual_expected_message} + */ + notDeepEqual(actual: T, expected: T, message?: string): void; + + /** + * {@link https://nodejs.org/api/assert.html#assert_assert_fail_message} + */ + fail(message?: string): never; + + /** + * {@link https://nodejs.org/api/assert.html#assert_assert_rejects_block_error_message} + */ + rejects( + block: Function | Promise, + error?: RegExp | Function | Object | Error, + message?: string, + ): void; + + /** + * {@link https://nodejs.org/api/assert.html#assert_assert_throws_block_error_message} + */ + throws( + block: Function, + error?: RegExp | Function | Object | Error, + message?: string, + ): void; +} diff --git a/packages/alfa-test/test/test.spec.ts b/packages/alfa-test-deprecated/test/test.spec.ts similarity index 100% rename from packages/alfa-test/test/test.spec.ts rename to packages/alfa-test-deprecated/test/test.spec.ts diff --git a/packages/alfa-test/test/tsconfig.json b/packages/alfa-test-deprecated/test/tsconfig.json similarity index 100% rename from packages/alfa-test/test/tsconfig.json rename to packages/alfa-test-deprecated/test/tsconfig.json diff --git a/packages/alfa-test-deprecated/tsconfig.json b/packages/alfa-test-deprecated/tsconfig.json new file mode 100644 index 0000000000..398e0fba97 --- /dev/null +++ b/packages/alfa-test-deprecated/tsconfig.json @@ -0,0 +1,6 @@ +{ + "$schema": "http://json.schemastore.org/tsconfig", + "extends": "../tsconfig.json", + "files": [], + "references": [{ "path": "./src" }, { "path": "./test" }] +} diff --git a/packages/alfa-test/package.json b/packages/alfa-test/package.json index 569d6e249d..d5f3d6c906 100644 --- a/packages/alfa-test/package.json +++ b/packages/alfa-test/package.json @@ -4,7 +4,7 @@ "homepage": "https://alfa.siteimprove.com", "version": "0.94.1", "license": "MIT", - "description": "A simple test library sitting on top of the built-in Node.js assert module", + "description": "A simple test library sitting on top of vitest", "repository": { "type": "git", "url": "github:Siteimprove/alfa", @@ -23,7 +23,7 @@ ], "dependencies": { "@types/node": "^22.0.0", - "chalk": "^5.3.0" + "vitest": "^2.1.6" }, "publishConfig": { "access": "public", diff --git a/packages/alfa-test/src/.gitignore b/packages/alfa-test/src/.gitignore new file mode 100644 index 0000000000..8538a80f1b --- /dev/null +++ b/packages/alfa-test/src/.gitignore @@ -0,0 +1 @@ +!vitest.d.ts diff --git a/packages/alfa-test/src/index.ts b/packages/alfa-test/src/index.ts index d4db0da991..134e053b4c 100644 --- a/packages/alfa-test/src/index.ts +++ b/packages/alfa-test/src/index.ts @@ -1,5 +1,3 @@ -export * from "./format.js"; export * from "./rng.js"; -export * from "./stack.js"; export * from "./test.js"; export * from "./types.js"; diff --git a/packages/alfa-test/src/test.ts b/packages/alfa-test/src/test.ts index ce35da3661..c91dba031f 100644 --- a/packages/alfa-test/src/test.ts +++ b/packages/alfa-test/src/test.ts @@ -1,35 +1,13 @@ -/// +import { assert, it } from "vitest"; -import * as assert from "assert"; - -import { format } from "./format.js"; import { type Controller, defaultController, type RNG, seedableRNG, } from "./rng.js"; -import type { Assertions } from "./types.js"; - -/** - * @internal - */ -export interface Notifier { - error(message: string): void; -} -const defaultNotifier: Notifier = { - error: (message) => { - process.stderr.write(`${message}\n`); - process.exit(1); - }, -}; - -// This is not super robust, but sufficient in our use case. -// Take care before using it elsewhere. -function isNotifier(value: unknown): value is Notifier { - return typeof value === "object" && value !== null && "error" in value; -} +import type { Assertions } from "./types.js"; /** * @public @@ -42,62 +20,24 @@ export async function test( seed: number, ) => void | Promise, controller?: Partial>, -): Promise; - -/** - * @internal - */ -export async function test( - name: string, - assertion: ( - assert: Assertions, - rng: RNG, - seed: number, - ) => void | Promise, - notifier: Notifier, - controller?: Partial>, -): Promise; - -export async function test( - name: string, - assertion: ( - assert: Assertions, - rng: RNG, - seed: number, - ) => void | Promise, - notifierOrController?: Notifier | Partial>, - controller?: Partial>, ): Promise { - const notifier: Notifier = isNotifier(notifierOrController) - ? notifierOrController - : defaultNotifier; // If the controlled is not overwritten, then T should be number. const fullController = { ...defaultController, ...controller, - ...notifierOrController, } as Controller; - // "error" may have been copied over from the notifier. - if ("error" in fullController) { - delete fullController.error; - } - const seed = fullController.seed ?? Math.random(); const rng = seedableRNG(seed); - try { + return it(name, async () => { for (let i = 0; i < fullController.iterations; i++) { await assertion( - "strict" in assert ? assert.strict : assert, + assert, // eta-expansion ensures that the wrapper is evaluated on each call of // the rng, not just once per iteration. () => fullController.wrapper(rng, i)(), seed, ); } - } catch (err) { - const error = err as Error; - - notifier.error(`${format(name, error)}\n`); - } + }); } diff --git a/packages/alfa-test/src/tsconfig.json b/packages/alfa-test/src/tsconfig.json index 99a20740d6..6222d700b3 100644 --- a/packages/alfa-test/src/tsconfig.json +++ b/packages/alfa-test/src/tsconfig.json @@ -3,11 +3,10 @@ "extends": "../tsconfig.json", "compilerOptions": { "outDir": "../dist" }, "files": [ - "./format.ts", "./index.ts", "./rng.ts", - "./stack.ts", "./test.ts", - "./types.ts" + "./types.ts", + "./vitest.d.ts" ] } diff --git a/packages/alfa-test/src/types.ts b/packages/alfa-test/src/types.ts index d16b779e98..693dea68e4 100644 --- a/packages/alfa-test/src/types.ts +++ b/packages/alfa-test/src/types.ts @@ -32,15 +32,6 @@ export interface Assertions { */ fail(message?: string): never; - /** - * {@link https://nodejs.org/api/assert.html#assert_assert_rejects_block_error_message} - */ - rejects( - block: Function | Promise, - error?: RegExp | Function | Object | Error, - message?: string, - ): void; - /** * {@link https://nodejs.org/api/assert.html#assert_assert_throws_block_error_message} */ diff --git a/packages/alfa-test/src/vitest.d.ts b/packages/alfa-test/src/vitest.d.ts new file mode 100644 index 0000000000..7df6788dea --- /dev/null +++ b/packages/alfa-test/src/vitest.d.ts @@ -0,0 +1,7 @@ +// Workaround due to https://github.com/vitejs/vite/issues/9813 +declare interface Worker {} +declare interface WebSocket {} + +declare namespace WebAssembly { + interface Module {} +} diff --git a/packages/alfa-test/tsconfig.json b/packages/alfa-test/tsconfig.json index 398e0fba97..d043d55d85 100644 --- a/packages/alfa-test/tsconfig.json +++ b/packages/alfa-test/tsconfig.json @@ -2,5 +2,5 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "files": [], - "references": [{ "path": "./src" }, { "path": "./test" }] + "references": [{ "path": "./src" }] } diff --git a/packages/alfa-thenable/test/tsconfig.json b/packages/alfa-thenable/test/tsconfig.json index 30dce41a8f..2d1bd1a741 100644 --- a/packages/alfa-thenable/test/tsconfig.json +++ b/packages/alfa-thenable/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "." + "noEmit": true }, "files": ["./thenable.spec.ts"], "references": [{ "path": "../src" }, { "path": "../../alfa-test" }] diff --git a/packages/alfa-thunk/test/tsconfig.json b/packages/alfa-thunk/test/tsconfig.json index 4a9ff3b66a..a014b3ae20 100644 --- a/packages/alfa-thunk/test/tsconfig.json +++ b/packages/alfa-thunk/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "." + "noEmit": true }, "files": ["./thunk.spec.ts"], "references": [{ "path": "../src" }, { "path": "../../alfa-test" }] diff --git a/packages/alfa-time/test/tsconfig.json b/packages/alfa-time/test/tsconfig.json index ca35727f8d..858f44e7d3 100644 --- a/packages/alfa-time/test/tsconfig.json +++ b/packages/alfa-time/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "." + "noEmit": true }, "files": ["./time.spec.ts"], "references": [{ "path": "../src" }, { "path": "../../alfa-test" }] diff --git a/packages/alfa-toolchain/test/tsconfig.json b/packages/alfa-toolchain/test/tsconfig.json index 7bd858f0b5..54c0bda046 100644 --- a/packages/alfa-toolchain/test/tsconfig.json +++ b/packages/alfa-toolchain/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": ".", + "noEmit": true, "lib": ["dom"], "types": ["node"] }, diff --git a/packages/alfa-trampoline/test/tsconfig.json b/packages/alfa-trampoline/test/tsconfig.json index b81e909f40..27e001fa30 100644 --- a/packages/alfa-trampoline/test/tsconfig.json +++ b/packages/alfa-trampoline/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "." + "noEmit": true }, "files": ["./trampoline.spec.ts"], "references": [{ "path": "../src" }, { "path": "../../alfa-test" }] diff --git a/packages/alfa-trilean/test/tsconfig.json b/packages/alfa-trilean/test/tsconfig.json index 0e93602443..f09048c738 100644 --- a/packages/alfa-trilean/test/tsconfig.json +++ b/packages/alfa-trilean/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "." + "noEmit": true }, "files": ["./trilean.spec.ts"], "references": [{ "path": "../src" }, { "path": "../../alfa-test" }] diff --git a/packages/alfa-tuple/test/tsconfig.json b/packages/alfa-tuple/test/tsconfig.json index 2009f051e1..747286cc96 100644 --- a/packages/alfa-tuple/test/tsconfig.json +++ b/packages/alfa-tuple/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "." + "noEmit": true }, "files": ["./tuple.spec.ts"], "references": [{ "path": "../src" }, { "path": "../../alfa-test" }] diff --git a/packages/alfa-url/test/tsconfig.json b/packages/alfa-url/test/tsconfig.json index 4fb1c14f94..9e8da76dfe 100644 --- a/packages/alfa-url/test/tsconfig.json +++ b/packages/alfa-url/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": "." + "noEmit": true }, "files": ["./url.spec.ts"], "references": [{ "path": "../src" }, { "path": "../../alfa-test" }] diff --git a/packages/alfa-web/test/tsconfig.json b/packages/alfa-web/test/tsconfig.json index 30f4697d9e..57d410eb98 100644 --- a/packages/alfa-web/test/tsconfig.json +++ b/packages/alfa-web/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": ".", + "noEmit": true, "jsx": "react-jsx", "jsxImportSource": "@siteimprove/alfa-dom" }, diff --git a/packages/alfa-xpath/test/tsconfig.json b/packages/alfa-xpath/test/tsconfig.json index c707c06526..96db42dfa7 100644 --- a/packages/alfa-xpath/test/tsconfig.json +++ b/packages/alfa-xpath/test/tsconfig.json @@ -2,7 +2,7 @@ "$schema": "http://json.schemastore.org/tsconfig", "extends": "../tsconfig.json", "compilerOptions": { - "outDir": ".", + "noEmit": true, "jsx": "react-jsx", "jsxImportSource": "@siteimprove/alfa-dom" }, diff --git a/packages/tsconfig.json b/packages/tsconfig.json index 34e5a51770..09c66db54e 100644 --- a/packages/tsconfig.json +++ b/packages/tsconfig.json @@ -68,6 +68,7 @@ { "path": "alfa-style" }, { "path": "alfa-table" }, { "path": "alfa-test" }, + { "path": "alfa-test-deprecated" }, { "path": "alfa-thenable" }, { "path": "alfa-thunk" }, { "path": "alfa-time" }, diff --git a/scripts/test.mjs b/scripts/test.mjs deleted file mode 100644 index 5105638895..0000000000 --- a/scripts/test.mjs +++ /dev/null @@ -1,50 +0,0 @@ -import async from "async"; -import { execaNode } from "execa"; -import os from "node:os"; - -import { builder } from "./common/builder.mjs"; -import { flags } from "./common/flags.mjs"; -import { system } from "./common/system.mjs"; - -const status = builder.build(flags.project); - -if (status !== 0) { - system.exit(status); -} - -test(flags.project); - -function test(root = "packages") { - let first = true; - let frameIndex = 0; - const frames = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"]; - - async.eachLimit( - system.readDirectory(root, [".spec.ts", ".spec.tsx"], ["node_modules"]), - os.cpus().length, - (fileName, done) => { - if (!first) { - // Move cursor up one line and 13 to the left and erase - system.write("\x1B[1A\x1B[13D\x1B[K"); - } - const frame = frames[frameIndex % frames.length]; - system.write(frame + ` testing ${fileName}`); - system.write(system.newLine); - frameIndex++; - first = false; - - execaNode(fileName.replace(/\.tsx?$/, ".js"), [], { - nodeOptions: [...process.execArgv, "--enable-source-maps"], - stdio: "inherit", - }).then( - () => done(), - (err) => done(err), - ); - }, - (err) => { - if (err) { - system.exit(1); - } - }, - ); -} diff --git a/yarn.lock b/yarn.lock index d5fc263f98..2ca6bb38a6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -383,6 +383,174 @@ __metadata: languageName: node linkType: hard +"@esbuild/aix-ppc64@npm:0.24.0": + version: 0.24.0 + resolution: "@esbuild/aix-ppc64@npm:0.24.0" + conditions: os=aix & cpu=ppc64 + languageName: node + linkType: hard + +"@esbuild/android-arm64@npm:0.24.0": + version: 0.24.0 + resolution: "@esbuild/android-arm64@npm:0.24.0" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/android-arm@npm:0.24.0": + version: 0.24.0 + resolution: "@esbuild/android-arm@npm:0.24.0" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + +"@esbuild/android-x64@npm:0.24.0": + version: 0.24.0 + resolution: "@esbuild/android-x64@npm:0.24.0" + conditions: os=android & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/darwin-arm64@npm:0.24.0": + version: 0.24.0 + resolution: "@esbuild/darwin-arm64@npm:0.24.0" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/darwin-x64@npm:0.24.0": + version: 0.24.0 + resolution: "@esbuild/darwin-x64@npm:0.24.0" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/freebsd-arm64@npm:0.24.0": + version: 0.24.0 + resolution: "@esbuild/freebsd-arm64@npm:0.24.0" + conditions: os=freebsd & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/freebsd-x64@npm:0.24.0": + version: 0.24.0 + resolution: "@esbuild/freebsd-x64@npm:0.24.0" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/linux-arm64@npm:0.24.0": + version: 0.24.0 + resolution: "@esbuild/linux-arm64@npm:0.24.0" + conditions: os=linux & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/linux-arm@npm:0.24.0": + version: 0.24.0 + resolution: "@esbuild/linux-arm@npm:0.24.0" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@esbuild/linux-ia32@npm:0.24.0": + version: 0.24.0 + resolution: "@esbuild/linux-ia32@npm:0.24.0" + conditions: os=linux & cpu=ia32 + languageName: node + linkType: hard + +"@esbuild/linux-loong64@npm:0.24.0": + version: 0.24.0 + resolution: "@esbuild/linux-loong64@npm:0.24.0" + conditions: os=linux & cpu=loong64 + languageName: node + linkType: hard + +"@esbuild/linux-mips64el@npm:0.24.0": + version: 0.24.0 + resolution: "@esbuild/linux-mips64el@npm:0.24.0" + conditions: os=linux & cpu=mips64el + languageName: node + linkType: hard + +"@esbuild/linux-ppc64@npm:0.24.0": + version: 0.24.0 + resolution: "@esbuild/linux-ppc64@npm:0.24.0" + conditions: os=linux & cpu=ppc64 + languageName: node + linkType: hard + +"@esbuild/linux-riscv64@npm:0.24.0": + version: 0.24.0 + resolution: "@esbuild/linux-riscv64@npm:0.24.0" + conditions: os=linux & cpu=riscv64 + languageName: node + linkType: hard + +"@esbuild/linux-s390x@npm:0.24.0": + version: 0.24.0 + resolution: "@esbuild/linux-s390x@npm:0.24.0" + conditions: os=linux & cpu=s390x + languageName: node + linkType: hard + +"@esbuild/linux-x64@npm:0.24.0": + version: 0.24.0 + resolution: "@esbuild/linux-x64@npm:0.24.0" + conditions: os=linux & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/netbsd-x64@npm:0.24.0": + version: 0.24.0 + resolution: "@esbuild/netbsd-x64@npm:0.24.0" + conditions: os=netbsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/openbsd-arm64@npm:0.24.0": + version: 0.24.0 + resolution: "@esbuild/openbsd-arm64@npm:0.24.0" + conditions: os=openbsd & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/openbsd-x64@npm:0.24.0": + version: 0.24.0 + resolution: "@esbuild/openbsd-x64@npm:0.24.0" + conditions: os=openbsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/sunos-x64@npm:0.24.0": + version: 0.24.0 + resolution: "@esbuild/sunos-x64@npm:0.24.0" + conditions: os=sunos & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/win32-arm64@npm:0.24.0": + version: 0.24.0 + resolution: "@esbuild/win32-arm64@npm:0.24.0" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/win32-ia32@npm:0.24.0": + version: 0.24.0 + resolution: "@esbuild/win32-ia32@npm:0.24.0" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@esbuild/win32-x64@npm:0.24.0": + version: 0.24.0 + resolution: "@esbuild/win32-x64@npm:0.24.0" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@jridgewell/sourcemap-codec@npm:^1.5.0": version: 1.5.0 resolution: "@jridgewell/sourcemap-codec@npm:1.5.0" @@ -600,6 +768,132 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-android-arm-eabi@npm:4.27.4": + version: 4.27.4 + resolution: "@rollup/rollup-android-arm-eabi@npm:4.27.4" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + +"@rollup/rollup-android-arm64@npm:4.27.4": + version: 4.27.4 + resolution: "@rollup/rollup-android-arm64@npm:4.27.4" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + +"@rollup/rollup-darwin-arm64@npm:4.27.4": + version: 4.27.4 + resolution: "@rollup/rollup-darwin-arm64@npm:4.27.4" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@rollup/rollup-darwin-x64@npm:4.27.4": + version: 4.27.4 + resolution: "@rollup/rollup-darwin-x64@npm:4.27.4" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@rollup/rollup-freebsd-arm64@npm:4.27.4": + version: 4.27.4 + resolution: "@rollup/rollup-freebsd-arm64@npm:4.27.4" + conditions: os=freebsd & cpu=arm64 + languageName: node + linkType: hard + +"@rollup/rollup-freebsd-x64@npm:4.27.4": + version: 4.27.4 + resolution: "@rollup/rollup-freebsd-x64@npm:4.27.4" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@rollup/rollup-linux-arm-gnueabihf@npm:4.27.4": + version: 4.27.4 + resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.27.4" + conditions: os=linux & cpu=arm & libc=glibc + languageName: node + linkType: hard + +"@rollup/rollup-linux-arm-musleabihf@npm:4.27.4": + version: 4.27.4 + resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.27.4" + conditions: os=linux & cpu=arm & libc=musl + languageName: node + linkType: hard + +"@rollup/rollup-linux-arm64-gnu@npm:4.27.4": + version: 4.27.4 + resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.27.4" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@rollup/rollup-linux-arm64-musl@npm:4.27.4": + version: 4.27.4 + resolution: "@rollup/rollup-linux-arm64-musl@npm:4.27.4" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@rollup/rollup-linux-powerpc64le-gnu@npm:4.27.4": + version: 4.27.4 + resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.27.4" + conditions: os=linux & cpu=ppc64 & libc=glibc + languageName: node + linkType: hard + +"@rollup/rollup-linux-riscv64-gnu@npm:4.27.4": + version: 4.27.4 + resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.27.4" + conditions: os=linux & cpu=riscv64 & libc=glibc + languageName: node + linkType: hard + +"@rollup/rollup-linux-s390x-gnu@npm:4.27.4": + version: 4.27.4 + resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.27.4" + conditions: os=linux & cpu=s390x & libc=glibc + languageName: node + linkType: hard + +"@rollup/rollup-linux-x64-gnu@npm:4.27.4": + version: 4.27.4 + resolution: "@rollup/rollup-linux-x64-gnu@npm:4.27.4" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@rollup/rollup-linux-x64-musl@npm:4.27.4": + version: 4.27.4 + resolution: "@rollup/rollup-linux-x64-musl@npm:4.27.4" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@rollup/rollup-win32-arm64-msvc@npm:4.27.4": + version: 4.27.4 + resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.27.4" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@rollup/rollup-win32-ia32-msvc@npm:4.27.4": + version: 4.27.4 + resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.27.4" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@rollup/rollup-win32-x64-msvc@npm:4.27.4": + version: 4.27.4 + resolution: "@rollup/rollup-win32-x64-msvc@npm:4.27.4" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@rushstack/node-core-library@npm:3.66.0": version: 3.66.0 resolution: "@rushstack/node-core-library@npm:3.66.0" @@ -642,20 +936,6 @@ __metadata: languageName: node linkType: hard -"@sec-ant/readable-stream@npm:^0.4.1": - version: 0.4.1 - resolution: "@sec-ant/readable-stream@npm:0.4.1" - checksum: 10c0/64e9e9cf161e848067a5bf60cdc04d18495dc28bb63a8d9f8993e4dd99b91ad34e4b563c85de17d91ffb177ec17a0664991d2e115f6543e73236a906068987af - languageName: node - linkType: hard - -"@sindresorhus/merge-streams@npm:^4.0.0": - version: 4.0.0 - resolution: "@sindresorhus/merge-streams@npm:4.0.0" - checksum: 10c0/482ee543629aa1933b332f811a1ae805a213681ecdd98c042b1c1b89387df63e7812248bb4df3910b02b3cc5589d3d73e4393f30e197c9dde18046ccd471fc6b - languageName: node - linkType: hard - "@siteimprove/alfa-act@workspace:^0.94.1, @siteimprove/alfa-act@workspace:packages/alfa-act": version: 0.0.0-use.local resolution: "@siteimprove/alfa-act@workspace:packages/alfa-act" @@ -1659,12 +1939,21 @@ __metadata: languageName: unknown linkType: soft +"@siteimprove/alfa-test-deprecated@workspace:packages/alfa-test-deprecated": + version: 0.0.0-use.local + resolution: "@siteimprove/alfa-test-deprecated@workspace:packages/alfa-test-deprecated" + dependencies: + "@types/node": "npm:^22.0.0" + chalk: "npm:^5.3.0" + languageName: unknown + linkType: soft + "@siteimprove/alfa-test@workspace:^0.94.1, @siteimprove/alfa-test@workspace:packages/alfa-test": version: 0.0.0-use.local resolution: "@siteimprove/alfa-test@workspace:packages/alfa-test" dependencies: "@types/node": "npm:^22.0.0" - chalk: "npm:^5.3.0" + vitest: "npm:^2.1.6" languageName: unknown linkType: soft @@ -1863,15 +2152,13 @@ __metadata: "@microsoft/api-documenter": "npm:^7.19.9" "@microsoft/api-extractor": "npm:^7.29.5" "@siteimprove/alfa-toolchain": "workspace:^0.94.1" - "@types/async": "npm:^3.2.20" "@types/node": "npm:^22.0.0" - async: "npm:^3.2.1" - execa: "npm:^9.0.0" knip: "npm:^5.23.1" minimist: "npm:^1.2.6" package-dependency-graph: "npm:^1.14.4" prettier: "npm:^3.0.0" typescript: "npm:^5.5.2" + vitest: "npm:^2.1.5" languageName: unknown linkType: soft @@ -1982,10 +2269,10 @@ __metadata: languageName: node linkType: hard -"@types/async@npm:^3.2.20": - version: 3.2.24 - resolution: "@types/async@npm:3.2.24" - checksum: 10c0/4df8e108932fe9907fcb09aa192e57d4b97909803e92dc11ba5765347ca6bfa992ea4392fe6f78f3aef495580a1e9b342440878e1d639d5fc2ab1c44f1ad7862 +"@types/estree@npm:1.0.6, @types/estree@npm:^1.0.0": + version: 1.0.6 + resolution: "@types/estree@npm:1.0.6" + checksum: 10c0/cdfd751f6f9065442cd40957c07fd80361c962869aa853c1c2fd03e101af8b9389d8ff4955a43a6fcfa223dd387a089937f95be0f3eec21ca527039fd2d9859a languageName: node linkType: hard @@ -2105,6 +2392,87 @@ __metadata: languageName: node linkType: hard +"@vitest/expect@npm:2.1.6": + version: 2.1.6 + resolution: "@vitest/expect@npm:2.1.6" + dependencies: + "@vitest/spy": "npm:2.1.6" + "@vitest/utils": "npm:2.1.6" + chai: "npm:^5.1.2" + tinyrainbow: "npm:^1.2.0" + checksum: 10c0/86327692f03b2ec6895486b118f25e1a141749c31ba671d253da4e33cf81db81f40755198ac9b46616155a8b74765d0ab15b8080041dbe139c83a9a0690004a2 + languageName: node + linkType: hard + +"@vitest/mocker@npm:2.1.6": + version: 2.1.6 + resolution: "@vitest/mocker@npm:2.1.6" + dependencies: + "@vitest/spy": "npm:2.1.6" + estree-walker: "npm:^3.0.3" + magic-string: "npm:^0.30.12" + peerDependencies: + msw: ^2.4.9 + vite: ^5.0.0 || ^6.0.0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + checksum: 10c0/f8f4482e196a72cc9f202edb07da6f8d612f0daef272525a4c2447a5ffa435cc1cfe758cb79af0e296a60faa973ee0e2767cbb8bb6769eff2b5b9c6941ceda7c + languageName: node + linkType: hard + +"@vitest/pretty-format@npm:2.1.6, @vitest/pretty-format@npm:^2.1.6": + version: 2.1.6 + resolution: "@vitest/pretty-format@npm:2.1.6" + dependencies: + tinyrainbow: "npm:^1.2.0" + checksum: 10c0/5c82496e5816c0c388bbe18a88ed01b39f5492aaa8e0df90868a65a50ee135105da367e58b4a0bed0dc67201c0518c451a32a5d9b81f56665b76b1c75c550686 + languageName: node + linkType: hard + +"@vitest/runner@npm:2.1.6": + version: 2.1.6 + resolution: "@vitest/runner@npm:2.1.6" + dependencies: + "@vitest/utils": "npm:2.1.6" + pathe: "npm:^1.1.2" + checksum: 10c0/3105aaa875ac58e237626ae3f9734cf003c2e40886a96ba20e78f1c1f721c9013d4f720d4a2fa4cd3a415ccd529bb4c7ff73021871c8ecda423f7e1fb7695cd4 + languageName: node + linkType: hard + +"@vitest/snapshot@npm:2.1.6": + version: 2.1.6 + resolution: "@vitest/snapshot@npm:2.1.6" + dependencies: + "@vitest/pretty-format": "npm:2.1.6" + magic-string: "npm:^0.30.12" + pathe: "npm:^1.1.2" + checksum: 10c0/91708ee9fdf9ccaa637d9fa58141342831aaf2119641f050a45f80cca37f0a4c1f7d65363e609a6353594418d5ecfebacd090c64273cd63de6915d186c948632 + languageName: node + linkType: hard + +"@vitest/spy@npm:2.1.6": + version: 2.1.6 + resolution: "@vitest/spy@npm:2.1.6" + dependencies: + tinyspy: "npm:^3.0.2" + checksum: 10c0/4d3e965f9096968125dd4f53a66a8afd7a105852a41bd36865288bef5b6a79f3ec6f2056cc1c7be5a0afb2cd86b3b83e354451f452bf049ddd4516005a748f6f + languageName: node + linkType: hard + +"@vitest/utils@npm:2.1.6": + version: 2.1.6 + resolution: "@vitest/utils@npm:2.1.6" + dependencies: + "@vitest/pretty-format": "npm:2.1.6" + loupe: "npm:^3.1.2" + tinyrainbow: "npm:^1.2.0" + checksum: 10c0/1ec077b9707ec627075348f1a98687c7bb2fcbf9edf6e73dea6842c328d0d51a33663d22679e2a90a75f45afca9246f8fa3ea452447f474ae9d5f4eca4023b91 + languageName: node + linkType: hard + "@vue/compiler-core@npm:3.4.38": version: 3.4.38 resolution: "@vue/compiler-core@npm:3.4.38" @@ -2398,6 +2766,13 @@ __metadata: languageName: node linkType: hard +"assertion-error@npm:^2.0.1": + version: 2.0.1 + resolution: "assertion-error@npm:2.0.1" + checksum: 10c0/bbbcb117ac6480138f8c93cf7f535614282dea9dc828f540cdece85e3c665e8f78958b96afac52f29ff883c72638e6a87d469ecc9fe5bc902df03ed24a55dba8 + languageName: node + linkType: hard + "ast-module-types@npm:^6.0.0": version: 6.0.0 resolution: "ast-module-types@npm:6.0.0" @@ -2414,13 +2789,6 @@ __metadata: languageName: node linkType: hard -"async@npm:^3.2.1": - version: 3.2.5 - resolution: "async@npm:3.2.5" - checksum: 10c0/1408287b26c6db67d45cb346e34892cee555b8b59e6c68e6f8c3e495cad5ca13b4f218180e871f3c2ca30df4ab52693b66f2f6ff43644760cab0b2198bda79c1 - languageName: node - linkType: hard - "asynckit@npm:^0.4.0": version: 0.4.0 resolution: "asynckit@npm:0.4.0" @@ -2614,6 +2982,13 @@ __metadata: languageName: node linkType: hard +"cac@npm:^6.7.14": + version: 6.7.14 + resolution: "cac@npm:6.7.14" + checksum: 10c0/4ee06aaa7bab8981f0d54e5f5f9d4adcd64058e9697563ce336d8a3878ed018ee18ebe5359b2430eceae87e0758e62ea2019c3f52ae6e211b1bd2e133856cd10 + languageName: node + linkType: hard + "cacache@npm:^15.0.5": version: 15.0.6 resolution: "cacache@npm:15.0.6" @@ -2693,6 +3068,19 @@ __metadata: languageName: node linkType: hard +"chai@npm:^5.1.2": + version: 5.1.2 + resolution: "chai@npm:5.1.2" + dependencies: + assertion-error: "npm:^2.0.1" + check-error: "npm:^2.1.1" + deep-eql: "npm:^5.0.1" + loupe: "npm:^3.1.0" + pathval: "npm:^2.0.0" + checksum: 10c0/6c04ff8495b6e535df9c1b062b6b094828454e9a3c9493393e55b2f4dbff7aa2a29a4645133cad160fb00a16196c4dc03dc9bb37e1f4ba9df3b5f50d7533a736 + languageName: node + linkType: hard + "chalk@npm:^2.0.0, chalk@npm:^2.1.0": version: 2.4.2 resolution: "chalk@npm:2.4.2" @@ -2728,6 +3116,13 @@ __metadata: languageName: node linkType: hard +"check-error@npm:^2.1.1": + version: 2.1.1 + resolution: "check-error@npm:2.1.1" + checksum: 10c0/979f13eccab306cf1785fa10941a590b4e7ea9916ea2a4f8c87f0316fc3eab07eabefb6e587424ef0f88cbcd3805791f172ea739863ca3d7ce2afc54641c7f0e + languageName: node + linkType: hard + "chownr@npm:^2.0.0": version: 2.0.0 resolution: "chownr@npm:2.0.0" @@ -2971,17 +3366,6 @@ __metadata: languageName: node linkType: hard -"cross-spawn@npm:^7.0.3": - version: 7.0.3 - resolution: "cross-spawn@npm:7.0.3" - dependencies: - path-key: "npm:^3.1.0" - shebang-command: "npm:^2.0.0" - which: "npm:^2.0.1" - checksum: 10c0/5738c312387081c98d69c98e105b6327b069197f864a60593245d64c8089c8a0a744e16349281210d56835bb9274130d825a78b2ad6853ca13cfbeffc0c31750 - languageName: node - linkType: hard - "cssstyle@npm:^4.0.1": version: 4.0.1 resolution: "cssstyle@npm:4.0.1" @@ -3088,15 +3472,15 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.4, debug@npm:^4.3.6": - version: 4.3.6 - resolution: "debug@npm:4.3.6" +"debug@npm:4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.4, debug@npm:^4.3.6, debug@npm:^4.3.7": + version: 4.3.7 + resolution: "debug@npm:4.3.7" dependencies: - ms: "npm:2.1.2" + ms: "npm:^2.1.3" peerDependenciesMeta: supports-color: optional: true - checksum: 10c0/3293416bff072389c101697d4611c402a6bacd1900ac20c0492f61a9cdd6b3b29750fc7f5e299f8058469ef60ff8fb79b86395a30374fbd2490113c1c7112285 + checksum: 10c0/1471db19c3b06d485a622d62f65947a19a23fbd0dd73f7fd3eafb697eec5360cde447fb075919987899b1a2096e85d35d4eb5a4de09a57600ac9cf7e6c8e768b languageName: node linkType: hard @@ -3133,6 +3517,13 @@ __metadata: languageName: node linkType: hard +"deep-eql@npm:^5.0.1": + version: 5.0.2 + resolution: "deep-eql@npm:5.0.2" + checksum: 10c0/7102cf3b7bb719c6b9c0db2e19bf0aa9318d141581befe8c7ce8ccd39af9eaa4346e5e05adef7f9bd7015da0f13a3a25dcfe306ef79dc8668aedbecb658dd247 + languageName: node + linkType: hard + "deep-extend@npm:^0.6.0": version: 0.6.0 resolution: "deep-extend@npm:0.6.0" @@ -3488,6 +3879,13 @@ __metadata: languageName: node linkType: hard +"es-module-lexer@npm:^1.5.4": + version: 1.5.4 + resolution: "es-module-lexer@npm:1.5.4" + checksum: 10c0/300a469488c2f22081df1e4c8398c78db92358496e639b0df7f89ac6455462aaf5d8893939087c1a1cbcbf20eed4610c70e0bcb8f3e4b0d80a5d2611c539408c + languageName: node + linkType: hard + "es-set-tostringtag@npm:^2.0.1": version: 2.0.1 resolution: "es-set-tostringtag@npm:2.0.1" @@ -3519,6 +3917,89 @@ __metadata: languageName: node linkType: hard +"esbuild@npm:^0.24.0": + version: 0.24.0 + resolution: "esbuild@npm:0.24.0" + dependencies: + "@esbuild/aix-ppc64": "npm:0.24.0" + "@esbuild/android-arm": "npm:0.24.0" + "@esbuild/android-arm64": "npm:0.24.0" + "@esbuild/android-x64": "npm:0.24.0" + "@esbuild/darwin-arm64": "npm:0.24.0" + "@esbuild/darwin-x64": "npm:0.24.0" + "@esbuild/freebsd-arm64": "npm:0.24.0" + "@esbuild/freebsd-x64": "npm:0.24.0" + "@esbuild/linux-arm": "npm:0.24.0" + "@esbuild/linux-arm64": "npm:0.24.0" + "@esbuild/linux-ia32": "npm:0.24.0" + "@esbuild/linux-loong64": "npm:0.24.0" + "@esbuild/linux-mips64el": "npm:0.24.0" + "@esbuild/linux-ppc64": "npm:0.24.0" + "@esbuild/linux-riscv64": "npm:0.24.0" + "@esbuild/linux-s390x": "npm:0.24.0" + "@esbuild/linux-x64": "npm:0.24.0" + "@esbuild/netbsd-x64": "npm:0.24.0" + "@esbuild/openbsd-arm64": "npm:0.24.0" + "@esbuild/openbsd-x64": "npm:0.24.0" + "@esbuild/sunos-x64": "npm:0.24.0" + "@esbuild/win32-arm64": "npm:0.24.0" + "@esbuild/win32-ia32": "npm:0.24.0" + "@esbuild/win32-x64": "npm:0.24.0" + dependenciesMeta: + "@esbuild/aix-ppc64": + optional: true + "@esbuild/android-arm": + optional: true + "@esbuild/android-arm64": + optional: true + "@esbuild/android-x64": + optional: true + "@esbuild/darwin-arm64": + optional: true + "@esbuild/darwin-x64": + optional: true + "@esbuild/freebsd-arm64": + optional: true + "@esbuild/freebsd-x64": + optional: true + "@esbuild/linux-arm": + optional: true + "@esbuild/linux-arm64": + optional: true + "@esbuild/linux-ia32": + optional: true + "@esbuild/linux-loong64": + optional: true + "@esbuild/linux-mips64el": + optional: true + "@esbuild/linux-ppc64": + optional: true + "@esbuild/linux-riscv64": + optional: true + "@esbuild/linux-s390x": + optional: true + "@esbuild/linux-x64": + optional: true + "@esbuild/netbsd-x64": + optional: true + "@esbuild/openbsd-arm64": + optional: true + "@esbuild/openbsd-x64": + optional: true + "@esbuild/sunos-x64": + optional: true + "@esbuild/win32-arm64": + optional: true + "@esbuild/win32-ia32": + optional: true + "@esbuild/win32-x64": + optional: true + bin: + esbuild: bin/esbuild + checksum: 10c0/9f1aadd8d64f3bff422ae78387e66e51a5e09de6935a6f987b6e4e189ed00fdc2d1bc03d2e33633b094008529c8b6e06c7ad1a9782fb09fec223bf95998c0683 + languageName: node + linkType: hard + "escalade@npm:^3.1.1": version: 3.1.1 resolution: "escalade@npm:3.1.1" @@ -3582,6 +4063,15 @@ __metadata: languageName: node linkType: hard +"estree-walker@npm:^3.0.3": + version: 3.0.3 + resolution: "estree-walker@npm:3.0.3" + dependencies: + "@types/estree": "npm:^1.0.0" + checksum: 10c0/c12e3c2b2642d2bcae7d5aa495c60fa2f299160946535763969a1c83fc74518ffa9c2cd3a8b69ac56aea547df6a8aac25f729a342992ef0bbac5f1c73e78995d + languageName: node + linkType: hard + "esutils@npm:^2.0.2": version: 2.0.3 resolution: "esutils@npm:2.0.3" @@ -3589,23 +4079,10 @@ __metadata: languageName: node linkType: hard -"execa@npm:^9.0.0": - version: 9.1.0 - resolution: "execa@npm:9.1.0" - dependencies: - "@sindresorhus/merge-streams": "npm:^4.0.0" - cross-spawn: "npm:^7.0.3" - figures: "npm:^6.1.0" - get-stream: "npm:^9.0.0" - human-signals: "npm:^7.0.0" - is-plain-obj: "npm:^4.1.0" - is-stream: "npm:^4.0.1" - npm-run-path: "npm:^5.2.0" - pretty-ms: "npm:^9.0.0" - signal-exit: "npm:^4.1.0" - strip-final-newline: "npm:^4.0.0" - yoctocolors: "npm:^2.0.0" - checksum: 10c0/9a4810b93d098eb0bed48793b61c3aa3e5804867c2c5808cd2a597a6e71738151a74dc792909085ce1d38e89f4b0e078d93ffd165aaca2d9a6728f3616f8e5c0 +"expect-type@npm:^1.1.0": + version: 1.1.0 + resolution: "expect-type@npm:1.1.0" + checksum: 10c0/5af0febbe8fe18da05a6d51e3677adafd75213512285408156b368ca471252565d5ca6e59e4bddab25121f3cfcbbebc6a5489f8cc9db131cc29e69dcdcc7ae15 languageName: node linkType: hard @@ -3696,15 +4173,6 @@ __metadata: languageName: node linkType: hard -"figures@npm:^6.1.0": - version: 6.1.0 - resolution: "figures@npm:6.1.0" - dependencies: - is-unicode-supported: "npm:^2.0.0" - checksum: 10c0/9159df4264d62ef447a3931537de92f5012210cf5135c35c010df50a2169377581378149abfe1eb238bd6acbba1c0d547b1f18e0af6eee49e30363cedaffcfe4 - languageName: node - linkType: hard - "filing-cabinet@npm:^5.0.1": version: 5.0.2 resolution: "filing-cabinet@npm:5.0.2" @@ -3840,6 +4308,25 @@ __metadata: languageName: node linkType: hard +"fsevents@npm:~2.3.2, fsevents@npm:~2.3.3": + version: 2.3.3 + resolution: "fsevents@npm:2.3.3" + dependencies: + node-gyp: "npm:latest" + checksum: 10c0/a1f0c44595123ed717febbc478aa952e47adfc28e2092be66b8ab1635147254ca6cfe1df792a8997f22716d4cbafc73309899ff7bfac2ac3ad8cf2e4ecc3ec60 + conditions: os=darwin + languageName: node + linkType: hard + +"fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin, fsevents@patch:fsevents@npm%3A~2.3.3#optional!builtin": + version: 2.3.3 + resolution: "fsevents@patch:fsevents@npm%3A2.3.3#optional!builtin::version=2.3.3&hash=df0bf1" + dependencies: + node-gyp: "npm:latest" + conditions: os=darwin + languageName: node + linkType: hard + "function-bind@npm:^1.1.1, function-bind@npm:^1.1.2": version: 1.1.2 resolution: "function-bind@npm:1.1.2" @@ -3943,16 +4430,6 @@ __metadata: languageName: node linkType: hard -"get-stream@npm:^9.0.0": - version: 9.0.1 - resolution: "get-stream@npm:9.0.1" - dependencies: - "@sec-ant/readable-stream": "npm:^0.4.1" - is-stream: "npm:^4.0.1" - checksum: 10c0/d70e73857f2eea1826ac570c3a912757dcfbe8a718a033fa0c23e12ac8e7d633195b01710e0559af574cbb5af101009b42df7b6f6b29ceec8dbdf7291931b948 - languageName: node - linkType: hard - "get-symbol-description@npm:^1.0.0": version: 1.0.0 resolution: "get-symbol-description@npm:1.0.0" @@ -4253,13 +4730,6 @@ __metadata: languageName: node linkType: hard -"human-signals@npm:^7.0.0": - version: 7.0.0 - resolution: "human-signals@npm:7.0.0" - checksum: 10c0/ce0c6d62d2e9bfe529d48f7c7fdf4b8c70fce950eef7850719b4e3f5bc71795ae7d61a3699ce13262bed7847705822601cc81f1921ea6a2906852e16228a94ab - languageName: node - linkType: hard - "humanize-ms@npm:^1.2.1": version: 1.2.1 resolution: "humanize-ms@npm:1.2.1" @@ -4554,13 +5024,6 @@ __metadata: languageName: node linkType: hard -"is-plain-obj@npm:^4.1.0": - version: 4.1.0 - resolution: "is-plain-obj@npm:4.1.0" - checksum: 10c0/32130d651d71d9564dc88ba7e6fda0e91a1010a3694648e9f4f47bb6080438140696d3e3e15c741411d712e47ac9edc1a8a9de1fe76f3487b0d90be06ac9975e - languageName: node - linkType: hard - "is-potential-custom-element-name@npm:^1.0.1": version: 1.0.1 resolution: "is-potential-custom-element-name@npm:1.0.1" @@ -4594,13 +5057,6 @@ __metadata: languageName: node linkType: hard -"is-stream@npm:^4.0.1": - version: 4.0.1 - resolution: "is-stream@npm:4.0.1" - checksum: 10c0/2706c7f19b851327ba374687bc4a3940805e14ca496dc672b9629e744d143b1ad9c6f1b162dece81c7bfbc0f83b32b61ccc19ad2e05aad2dd7af347408f60c7f - languageName: node - linkType: hard - "is-string@npm:^1.0.5, is-string@npm:^1.0.7": version: 1.0.7 resolution: "is-string@npm:1.0.7" @@ -4648,13 +5104,6 @@ __metadata: languageName: node linkType: hard -"is-unicode-supported@npm:^2.0.0": - version: 2.0.0 - resolution: "is-unicode-supported@npm:2.0.0" - checksum: 10c0/3013dfb8265fe9f9a0d1e9433fc4e766595631a8d85d60876c457b4bedc066768dab1477c553d02e2f626d88a4e019162706e04263c94d74994ef636a33b5f94 - languageName: node - linkType: hard - "is-url-superb@npm:^4.0.0": version: 4.0.0 resolution: "is-url-superb@npm:4.0.0" @@ -4961,6 +5410,13 @@ __metadata: languageName: node linkType: hard +"loupe@npm:^3.1.0, loupe@npm:^3.1.2": + version: 3.1.2 + resolution: "loupe@npm:3.1.2" + checksum: 10c0/b13c02e3ddd6a9d5f8bf84133b3242de556512d824dddeea71cce2dbd6579c8f4d672381c4e742d45cf4423d0701765b4a6e5fbc24701def16bc2b40f8daa96a + languageName: node + linkType: hard + "lru-cache@npm:^4.0.1": version: 4.1.5 resolution: "lru-cache@npm:4.1.5" @@ -5023,12 +5479,12 @@ __metadata: languageName: node linkType: hard -"magic-string@npm:^0.30.10": - version: 0.30.11 - resolution: "magic-string@npm:0.30.11" +"magic-string@npm:^0.30.10, magic-string@npm:^0.30.12": + version: 0.30.14 + resolution: "magic-string@npm:0.30.14" dependencies: "@jridgewell/sourcemap-codec": "npm:^1.5.0" - checksum: 10c0/b9eb370773d0bd90ca11a848753409d8e5309b1ad56d2a1aa49d6649da710a6d2fe7237ad1a643c5a5d3800de2b9946ed9690acdfc00e6cc1aeafff3ab1752c4 + checksum: 10c0/c52c2a6e699dfa8a840e13154da35464a40cd8b07049b695a8b282883b0426c0811af1e36ac26860b4267289340b42772c156a5608e87be97b63d510e617e87a languageName: node linkType: hard @@ -5336,14 +5792,7 @@ __metadata: languageName: node linkType: hard -"ms@npm:2.1.2": - version: 2.1.2 - resolution: "ms@npm:2.1.2" - checksum: 10c0/a437714e2f90dbf881b5191d35a6db792efbca5badf112f87b9e1c712aace4b4b9b742dd6537f3edf90fd6f684de897cec230abde57e87883766712ddda297cc - languageName: node - linkType: hard - -"ms@npm:^2.0.0": +"ms@npm:^2.0.0, ms@npm:^2.1.3": version: 2.1.3 resolution: "ms@npm:2.1.3" checksum: 10c0/d924b57e7312b3b63ad21fc5b3dc0af5e78d61a1fc7cfb5457edaf26326bf62be5307cc87ffb6862ef1c2b33b0233cdb5d4f01c4c958cc0d660948b65a287a48 @@ -5448,15 +5897,6 @@ __metadata: languageName: node linkType: hard -"npm-run-path@npm:^5.2.0": - version: 5.3.0 - resolution: "npm-run-path@npm:5.3.0" - dependencies: - path-key: "npm:^4.0.0" - checksum: 10c0/124df74820c40c2eb9a8612a254ea1d557ddfab1581c3e751f825e3e366d9f00b0d76a3c94ecd8398e7f3eee193018622677e95816e8491f0797b21e30b2deba - languageName: node - linkType: hard - "npmlog@npm:^4.1.2": version: 4.1.2 resolution: "npmlog@npm:4.1.2" @@ -5782,20 +6222,6 @@ __metadata: languageName: node linkType: hard -"path-key@npm:^3.1.0": - version: 3.1.1 - resolution: "path-key@npm:3.1.1" - checksum: 10c0/748c43efd5a569c039d7a00a03b58eecd1d75f3999f5a28303d75f521288df4823bc057d8784eb72358b2895a05f29a070bc9f1f17d28226cc4e62494cc58c4c - languageName: node - linkType: hard - -"path-key@npm:^4.0.0": - version: 4.0.0 - resolution: "path-key@npm:4.0.0" - checksum: 10c0/794efeef32863a65ac312f3c0b0a99f921f3e827ff63afa5cb09a377e202c262b671f7b3832a4e64731003fa94af0263713962d317b9887bd1e0c48a342efba3 - languageName: node - linkType: hard - "path-parse@npm:^1.0.6, path-parse@npm:^1.0.7": version: 1.0.7 resolution: "path-parse@npm:1.0.7" @@ -5810,6 +6236,20 @@ __metadata: languageName: node linkType: hard +"pathe@npm:^1.1.2": + version: 1.1.2 + resolution: "pathe@npm:1.1.2" + checksum: 10c0/64ee0a4e587fb0f208d9777a6c56e4f9050039268faaaaecd50e959ef01bf847b7872785c36483fa5cdcdbdfdb31fef2ff222684d4fc21c330ab60395c681897 + languageName: node + linkType: hard + +"pathval@npm:^2.0.0": + version: 2.0.0 + resolution: "pathval@npm:2.0.0" + checksum: 10c0/602e4ee347fba8a599115af2ccd8179836a63c925c23e04bd056d0674a64b39e3a081b643cc7bc0b84390517df2d800a46fcc5598d42c155fe4977095c2f77c5 + languageName: node + linkType: hard + "pend@npm:~1.2.0": version: 1.2.0 resolution: "pend@npm:1.2.0" @@ -5817,10 +6257,10 @@ __metadata: languageName: node linkType: hard -"picocolors@npm:^1.0.0, picocolors@npm:^1.0.1": - version: 1.0.1 - resolution: "picocolors@npm:1.0.1" - checksum: 10c0/c63cdad2bf812ef0d66c8db29583802355d4ca67b9285d846f390cc15c2f6ccb94e8cb7eb6a6e97fc5990a6d3ad4ae42d86c84d3146e667c739a4234ed50d400 +"picocolors@npm:^1.0.0, picocolors@npm:^1.1.1": + version: 1.1.1 + resolution: "picocolors@npm:1.1.1" + checksum: 10c0/e2e3e8170ab9d7c7421969adaa7e1b31434f789afb9b3f115f6b96d91945041ac3ceb02e9ec6fe6510ff036bcc0bf91e69a1772edc0b707e12b19c0f2d6bcf58 languageName: node linkType: hard @@ -5874,14 +6314,14 @@ __metadata: languageName: node linkType: hard -"postcss@npm:^8.4.40": - version: 8.4.41 - resolution: "postcss@npm:8.4.41" +"postcss@npm:^8.4.40, postcss@npm:^8.4.49": + version: 8.4.49 + resolution: "postcss@npm:8.4.49" dependencies: nanoid: "npm:^3.3.7" - picocolors: "npm:^1.0.1" - source-map-js: "npm:^1.2.0" - checksum: 10c0/c1828fc59e7ec1a3bf52b3a42f615dba53c67960ed82a81df6441b485fe43c20aba7f4e7c55425762fd99c594ecabbaaba8cf5b30fd79dfec5b52a9f63a2d690 + picocolors: "npm:^1.1.1" + source-map-js: "npm:^1.2.1" + checksum: 10c0/f1b3f17aaf36d136f59ec373459f18129908235e65dbdc3aee5eef8eba0756106f52de5ec4682e29a2eab53eb25170e7e871b3e4b52a8f1de3d344a514306be3 languageName: node linkType: hard @@ -6361,6 +6801,75 @@ __metadata: languageName: node linkType: hard +"rollup@npm:^4.23.0": + version: 4.27.4 + resolution: "rollup@npm:4.27.4" + dependencies: + "@rollup/rollup-android-arm-eabi": "npm:4.27.4" + "@rollup/rollup-android-arm64": "npm:4.27.4" + "@rollup/rollup-darwin-arm64": "npm:4.27.4" + "@rollup/rollup-darwin-x64": "npm:4.27.4" + "@rollup/rollup-freebsd-arm64": "npm:4.27.4" + "@rollup/rollup-freebsd-x64": "npm:4.27.4" + "@rollup/rollup-linux-arm-gnueabihf": "npm:4.27.4" + "@rollup/rollup-linux-arm-musleabihf": "npm:4.27.4" + "@rollup/rollup-linux-arm64-gnu": "npm:4.27.4" + "@rollup/rollup-linux-arm64-musl": "npm:4.27.4" + "@rollup/rollup-linux-powerpc64le-gnu": "npm:4.27.4" + "@rollup/rollup-linux-riscv64-gnu": "npm:4.27.4" + "@rollup/rollup-linux-s390x-gnu": "npm:4.27.4" + "@rollup/rollup-linux-x64-gnu": "npm:4.27.4" + "@rollup/rollup-linux-x64-musl": "npm:4.27.4" + "@rollup/rollup-win32-arm64-msvc": "npm:4.27.4" + "@rollup/rollup-win32-ia32-msvc": "npm:4.27.4" + "@rollup/rollup-win32-x64-msvc": "npm:4.27.4" + "@types/estree": "npm:1.0.6" + fsevents: "npm:~2.3.2" + dependenciesMeta: + "@rollup/rollup-android-arm-eabi": + optional: true + "@rollup/rollup-android-arm64": + optional: true + "@rollup/rollup-darwin-arm64": + optional: true + "@rollup/rollup-darwin-x64": + optional: true + "@rollup/rollup-freebsd-arm64": + optional: true + "@rollup/rollup-freebsd-x64": + optional: true + "@rollup/rollup-linux-arm-gnueabihf": + optional: true + "@rollup/rollup-linux-arm-musleabihf": + optional: true + "@rollup/rollup-linux-arm64-gnu": + optional: true + "@rollup/rollup-linux-arm64-musl": + optional: true + "@rollup/rollup-linux-powerpc64le-gnu": + optional: true + "@rollup/rollup-linux-riscv64-gnu": + optional: true + "@rollup/rollup-linux-s390x-gnu": + optional: true + "@rollup/rollup-linux-x64-gnu": + optional: true + "@rollup/rollup-linux-x64-musl": + optional: true + "@rollup/rollup-win32-arm64-msvc": + optional: true + "@rollup/rollup-win32-ia32-msvc": + optional: true + "@rollup/rollup-win32-x64-msvc": + optional: true + fsevents: + optional: true + bin: + rollup: dist/bin/rollup + checksum: 10c0/1442650cfea5e4617ce14743784f6f578817e31db56f9c8aaf96a82daa9bc20b6ccd66c0d677dbf302a4da3e70664dc3bef11a1aec85e6aff3cecccb945b1d35 + languageName: node + linkType: hard + "rrweb-cssom@npm:^0.6.0": version: 0.6.0 resolution: "rrweb-cssom@npm:0.6.0" @@ -6490,15 +6999,6 @@ __metadata: languageName: node linkType: hard -"shebang-command@npm:^2.0.0": - version: 2.0.0 - resolution: "shebang-command@npm:2.0.0" - dependencies: - shebang-regex: "npm:^3.0.0" - checksum: 10c0/a41692e7d89a553ef21d324a5cceb5f686d1f3c040759c50aab69688634688c5c327f26f3ecf7001ebfd78c01f3c7c0a11a7c8bfd0a8bc9f6240d4f40b224e4e - languageName: node - linkType: hard - "shebang-regex@npm:^1.0.0": version: 1.0.0 resolution: "shebang-regex@npm:1.0.0" @@ -6506,13 +7006,6 @@ __metadata: languageName: node linkType: hard -"shebang-regex@npm:^3.0.0": - version: 3.0.0 - resolution: "shebang-regex@npm:3.0.0" - checksum: 10c0/1dbed0726dd0e1152a92696c76c7f06084eb32a90f0528d11acd764043aacf76994b2fb30aa1291a21bd019d6699164d048286309a278855ee7bec06cf6fb690 - languageName: node - linkType: hard - "shell-quote-word@npm:^1.0.1": version: 1.0.1 resolution: "shell-quote-word@npm:1.0.1" @@ -6531,6 +7024,13 @@ __metadata: languageName: node linkType: hard +"siginfo@npm:^2.0.0": + version: 2.0.0 + resolution: "siginfo@npm:2.0.0" + checksum: 10c0/3def8f8e516fbb34cb6ae415b07ccc5d9c018d85b4b8611e3dc6f8be6d1899f693a4382913c9ed51a06babb5201639d76453ab297d1c54a456544acf5c892e34 + languageName: node + linkType: hard + "signal-exit@npm:^3.0.0, signal-exit@npm:^3.0.2": version: 3.0.7 resolution: "signal-exit@npm:3.0.7" @@ -6538,13 +7038,6 @@ __metadata: languageName: node linkType: hard -"signal-exit@npm:^4.1.0": - version: 4.1.0 - resolution: "signal-exit@npm:4.1.0" - checksum: 10c0/41602dce540e46d599edba9d9860193398d135f7ff72cab629db5171516cfae628d21e7bfccde1bbfdf11c48726bc2a6d1a8fb8701125852fbfda7cf19c6aa83 - languageName: node - linkType: hard - "simple-concat@npm:^1.0.0": version: 1.0.1 resolution: "simple-concat@npm:1.0.1" @@ -6632,10 +7125,10 @@ __metadata: languageName: node linkType: hard -"source-map-js@npm:^1.2.0": - version: 1.2.0 - resolution: "source-map-js@npm:1.2.0" - checksum: 10c0/7e5f896ac10a3a50fe2898e5009c58ff0dc102dcb056ed27a354623a0ece8954d4b2649e1a1b2b52ef2e161d26f8859c7710350930751640e71e374fe2d321a4 +"source-map-js@npm:^1.2.0, source-map-js@npm:^1.2.1": + version: 1.2.1 + resolution: "source-map-js@npm:1.2.1" + checksum: 10c0/7bda1fc4c197e3c6ff17de1b8b2c20e60af81b63a52cb32ec5a5d67a20a7d42651e2cb34ebe93833c5a2a084377e17455854fee3e21e7925c64a51b6a52b0faf languageName: node linkType: hard @@ -6706,6 +7199,20 @@ __metadata: languageName: node linkType: hard +"stackback@npm:0.0.2": + version: 0.0.2 + resolution: "stackback@npm:0.0.2" + checksum: 10c0/89a1416668f950236dd5ac9f9a6b2588e1b9b62b1b6ad8dff1bfc5d1a15dbf0aafc9b52d2226d00c28dffff212da464eaeebfc6b7578b9d180cef3e3782c5983 + languageName: node + linkType: hard + +"std-env@npm:^3.8.0": + version: 3.8.0 + resolution: "std-env@npm:3.8.0" + checksum: 10c0/f560a2902fd0fa3d648d7d0acecbd19d664006f7372c1fba197ed4c216b4c9e48db6e2769b5fe1616d42a9333c9f066c5011935035e85c59f45dc4f796272040 + languageName: node + linkType: hard + "stream-to-array@npm:^2.3.0": version: 2.3.0 resolution: "stream-to-array@npm:2.3.0" @@ -6862,13 +7369,6 @@ __metadata: languageName: node linkType: hard -"strip-final-newline@npm:^4.0.0": - version: 4.0.0 - resolution: "strip-final-newline@npm:4.0.0" - checksum: 10c0/b0cf2b62d597a1b0e3ebc42b88767f0a0d45601f89fd379a928a1812c8779440c81abba708082c946445af1d6b62d5f16e2a7cf4f30d9d6587b89425fae801ff - languageName: node - linkType: hard - "strip-indent@npm:^3.0.0": version: 3.0.0 resolution: "strip-indent@npm:3.0.0" @@ -7021,6 +7521,41 @@ __metadata: languageName: node linkType: hard +"tinybench@npm:^2.9.0": + version: 2.9.0 + resolution: "tinybench@npm:2.9.0" + checksum: 10c0/c3500b0f60d2eb8db65250afe750b66d51623057ee88720b7f064894a6cb7eb93360ca824a60a31ab16dab30c7b1f06efe0795b352e37914a9d4bad86386a20c + languageName: node + linkType: hard + +"tinyexec@npm:^0.3.1": + version: 0.3.1 + resolution: "tinyexec@npm:0.3.1" + checksum: 10c0/11e7a7c5d8b3bddf8b5cbe82a9290d70a6fad84d528421d5d18297f165723cb53d2e737d8f58dcce5ca56f2e4aa2d060f02510b1f8971784f97eb3e9aec28f09 + languageName: node + linkType: hard + +"tinypool@npm:^1.0.1": + version: 1.0.2 + resolution: "tinypool@npm:1.0.2" + checksum: 10c0/31ac184c0ff1cf9a074741254fe9ea6de95026749eb2b8ec6fd2b9d8ca94abdccda731f8e102e7f32e72ed3b36d32c6975fd5f5523df3f1b6de6c3d8dfd95e63 + languageName: node + linkType: hard + +"tinyrainbow@npm:^1.2.0": + version: 1.2.0 + resolution: "tinyrainbow@npm:1.2.0" + checksum: 10c0/7f78a4b997e5ba0f5ecb75e7ed786f30bab9063716e7dff24dd84013fb338802e43d176cb21ed12480561f5649a82184cf31efb296601a29d38145b1cdb4c192 + languageName: node + linkType: hard + +"tinyspy@npm:^3.0.2": + version: 3.0.2 + resolution: "tinyspy@npm:3.0.2" + checksum: 10c0/55ffad24e346622b59292e097c2ee30a63919d5acb7ceca87fc0d1c223090089890587b426e20054733f97a58f20af2c349fb7cc193697203868ab7ba00bcea0 + languageName: node + linkType: hard + "tmp@npm:^0.0.33": version: 0.0.33 resolution: "tmp@npm:0.0.33" @@ -7420,6 +7955,123 @@ __metadata: languageName: node linkType: hard +"vite-node@npm:2.1.6": + version: 2.1.6 + resolution: "vite-node@npm:2.1.6" + dependencies: + cac: "npm:^6.7.14" + debug: "npm:^4.3.7" + es-module-lexer: "npm:^1.5.4" + pathe: "npm:^1.1.2" + vite: "npm:^5.0.0 || ^6.0.0" + bin: + vite-node: vite-node.mjs + checksum: 10c0/513c815a6d4ca09a48fc8741bd4bfb1a6cbfe5555b009081b194069863326aede7d66197c2b60927514d22cc6efc2c793d1ca1bb70e13dca120e01a507bcf35b + languageName: node + linkType: hard + +"vite@npm:^5.0.0 || ^6.0.0": + version: 6.0.0 + resolution: "vite@npm:6.0.0" + dependencies: + esbuild: "npm:^0.24.0" + fsevents: "npm:~2.3.3" + postcss: "npm:^8.4.49" + rollup: "npm:^4.23.0" + peerDependencies: + "@types/node": ^18.0.0 || ^20.0.0 || >=22.0.0 + jiti: ">=1.21.0" + less: "*" + lightningcss: ^1.21.0 + sass: "*" + sass-embedded: "*" + stylus: "*" + sugarss: "*" + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + dependenciesMeta: + fsevents: + optional: true + peerDependenciesMeta: + "@types/node": + optional: true + jiti: + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true + bin: + vite: bin/vite.js + checksum: 10c0/2516144161c108452691ec1379aefd8f3201da8f225e628cb1cdb7b35b92d856d990cd31f1c36c0f36517346efe181ea3c096a04bc846c5b0d1416b7b7111af8 + languageName: node + linkType: hard + +"vitest@npm:^2.1.5, vitest@npm:^2.1.6": + version: 2.1.6 + resolution: "vitest@npm:2.1.6" + dependencies: + "@vitest/expect": "npm:2.1.6" + "@vitest/mocker": "npm:2.1.6" + "@vitest/pretty-format": "npm:^2.1.6" + "@vitest/runner": "npm:2.1.6" + "@vitest/snapshot": "npm:2.1.6" + "@vitest/spy": "npm:2.1.6" + "@vitest/utils": "npm:2.1.6" + chai: "npm:^5.1.2" + debug: "npm:^4.3.7" + expect-type: "npm:^1.1.0" + magic-string: "npm:^0.30.12" + pathe: "npm:^1.1.2" + std-env: "npm:^3.8.0" + tinybench: "npm:^2.9.0" + tinyexec: "npm:^0.3.1" + tinypool: "npm:^1.0.1" + tinyrainbow: "npm:^1.2.0" + vite: "npm:^5.0.0 || ^6.0.0" + vite-node: "npm:2.1.6" + why-is-node-running: "npm:^2.3.0" + peerDependencies: + "@edge-runtime/vm": "*" + "@types/node": ^18.0.0 || ^20.0.0 || >=22.0.0 + "@vitest/browser": 2.1.6 + "@vitest/ui": 2.1.6 + 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 + bin: + vitest: vitest.mjs + checksum: 10c0/a183e4f573aacccf14d6466fdee0cee9ecd3f258bf98ebffa2da33c4d5aa1886d156f50d9eeb3d751c634679257e2196d8b3c9988256f2e860b9a1d7070bd4df + languageName: node + linkType: hard + "vlq@npm:^0.2.1": version: 0.2.3 resolution: "vlq@npm:0.2.3" @@ -7557,7 +8209,7 @@ __metadata: languageName: node linkType: hard -"which@npm:^2.0.1, which@npm:^2.0.2": +"which@npm:^2.0.2": version: 2.0.2 resolution: "which@npm:2.0.2" dependencies: @@ -7568,6 +8220,18 @@ __metadata: languageName: node linkType: hard +"why-is-node-running@npm:^2.3.0": + version: 2.3.0 + resolution: "why-is-node-running@npm:2.3.0" + dependencies: + siginfo: "npm:^2.0.0" + stackback: "npm:0.0.2" + bin: + why-is-node-running: cli.js + checksum: 10c0/1cde0b01b827d2cf4cb11db962f3958b9175d5d9e7ac7361d1a7b0e2dc6069a263e69118bd974c4f6d0a890ef4eedfe34cf3d5167ec14203dbc9a18620537054 + languageName: node + linkType: hard + "wide-align@npm:^1.1.0, wide-align@npm:^1.1.2": version: 1.1.5 resolution: "wide-align@npm:1.1.5" @@ -7738,13 +8402,6 @@ __metadata: languageName: node linkType: hard -"yoctocolors@npm:^2.0.0": - version: 2.0.0 - resolution: "yoctocolors@npm:2.0.0" - checksum: 10c0/994f5d99e7647a1b333331ffecbbf7c4463d9c2823e371b44e21146a4496cad0f14fbe2f73f44383312a6f843d93523f830f1360009f0ac93027b167ef5c63be - languageName: node - linkType: hard - "z-schema@npm:~5.0.2": version: 5.0.2 resolution: "z-schema@npm:5.0.2"