From ba3fa16d172d0af1a97f89a020eeed0953d44adf Mon Sep 17 00:00:00 2001 From: RodrigoTomeES Date: Sun, 5 Nov 2023 18:20:06 +0100 Subject: [PATCH] feat(test): added to utilities --- README.md | 2 +- package.json | 6 +- test/utils..test.ts | 201 +++++++++++++++ tsconfig.json | 5 +- yarn.lock | 591 +++++++++++++++++++++++++++++++++++++++++++- 5 files changed, 796 insertions(+), 9 deletions(-) create mode 100644 test/utils..test.ts diff --git a/README.md b/README.md index ba65e09..d25eadc 100644 --- a/README.md +++ b/README.md @@ -205,7 +205,7 @@ Here's an example of the plugin in action in my [awa-db](https://github.com/Rodr Here's a list of tasks I plan to work on: - [ ] Fix error types -- [ ] Add test coverage +- [x] Add test coverage - [ ] Add support for IDs - [ ] Enable handling of multiple CSS files - [ ] Implement support for CSS variables diff --git a/package.json b/package.json index d9e51a1..e29578f 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,8 @@ "build": "yarn lint && yarn tsc && lightrix build 'src/**/*.ts'", "prepare": "husky install", "tsc": "tsc --project ./", - "lint": "eslint --fix \"**/*.{ts,tsx,js,cjs,mjs,jsx}\"" + "lint": "eslint --fix \"**/*.{ts,tsx,js,cjs,mjs,jsx}\"", + "test": "vitest" }, "dependencies": { "console-table-printer": "2.11.2", @@ -58,7 +59,8 @@ "husky": "8.0.3", "lint-staged": "15.0.2", "prettier": "3.0.3", - "typescript": "5.2.2" + "typescript": "5.2.2", + "vitest": "^0.34.6" }, "config": { "commitizen": { diff --git a/test/utils..test.ts b/test/utils..test.ts new file mode 100644 index 0000000..d31e05e --- /dev/null +++ b/test/utils..test.ts @@ -0,0 +1,201 @@ +import { expect, test } from 'vitest'; +import { calculatePercent, escapeRegExp, matchClasses } from '../src/utils.js'; + +const generateRegex = (key: string) => + new RegExp(matchClasses(escapeRegExp(key)), 'g'); + +test('calculatePercent - after: 20, before: 10', () => + expect(calculatePercent(20, 10)).toBe(50)); + +test('escapeRegExp - escape hyphen', () => { + expect(escapeRegExp('h-[40px]')).toBe('h-\\[40px\\]'); +}); + +test('escapeRegExp - escape dot', () => { + expect(escapeRegExp('h.')).toBe('h\\.'); +}); + +test('escapeRegExp - escape asterisk', () => { + expect(escapeRegExp('h*')).toBe('h\\*'); +}); + +test('escapeRegExp - escape plus', () => { + expect(escapeRegExp('h+')).toBe('h\\+'); +}); + +test('escapeRegExp - escape question mark', () => { + expect(escapeRegExp('h?')).toBe('h\\?'); +}); + +test('escapeRegExp - escape dollar sign', () => { + expect(escapeRegExp('h$')).toBe('h\\$'); +}); + +test('escapeRegExp - escape curly braces', () => { + expect(escapeRegExp('h{40px}')).toBe('h\\{40px\\}'); +}); + +test('escapeRegExp - escape parentheses', () => { + expect(escapeRegExp('h(40px)')).toBe('h\\(40px\\)'); +}); + +test('escapeRegExp - escape pipe', () => { + expect(escapeRegExp('h|')).toBe('h\\|'); +}); + +test('escapeRegExp - escape backslash', () => { + expect(escapeRegExp('h\\')).toBe('h\\\\'); +}); + +test('matchClasses - h-4 not match h-40', () => { + expect('class="h-4 h-40"'.replaceAll(generateRegex('h-4'), `$1test`)).toBe( + 'class="test h-40"', + ); +}); + +test('matchClasses - h-4 not match hh-4', () => { + expect('class="h-4 hh-4"'.replaceAll(generateRegex('h-4'), `$1test`)).toBe( + 'class="test hh-4"', + ); +}); + +test('matchClasses - h-4 match multiple times not consecutive', () => { + expect( + 'class="h-4 h-40 h-4"'.replaceAll(generateRegex('h-4'), `$1test`), + ).toBe('class="test h-40 test"'); +}); + +test('matchClasses - h-4 match multiple times consecutive', () => { + expect('class="h-4 h-4"'.replaceAll(generateRegex('h-4'), `$1test`)).toBe( + 'class="test test"', + ); +}); + +test('matchClasses - h-4 not match hover:h-4', () => { + expect( + 'class="h-4 hover:h-4"'.replaceAll(generateRegex('h-4'), `$1test`), + ).toBe('class="test hover:h-4"'); +}); + +test('matchClasses - h-4 not match h-4:hover', () => { + expect( + 'class="h-4 h-4:hover"'.replaceAll(generateRegex('h-4'), `$1test`), + ).toBe('class="test h-4:hover"'); +}); + +test('matchClasses - h-4 not match [h-4]', () => { + expect('class="h-4 [h-4]"'.replaceAll(generateRegex('h-4'), `$1test`)).toBe( + 'class="test [h-4]"', + ); +}); + +test('matchClasses - h-4 not match h-4[h-4]', () => { + expect( + 'class="h-4 h-4[h-4]"'.replaceAll(generateRegex('h-4'), `$1test`), + ).toBe('class="test h-4[h-4]"'); +}); + +test('matchClasses - h-4 not match [h-4]h-4', () => { + expect( + 'class="h-4 [h-4]h-4"'.replaceAll(generateRegex('h-4'), `$1test`), + ).toBe('class="test [h-4]h-4"'); +}); + +test('matchClasses - h-4 not match [h-4]h-4[h-4]', () => { + expect( + 'class="h-4 [h-4]h-4[h-4]"'.replaceAll(generateRegex('h-4'), `$1test`), + ).toBe('class="test [h-4]h-4[h-4]"'); +}); + +test("matchClasses - before:content-['']", () => { + expect( + 'class="before:content-[\'\']"'.replaceAll( + generateRegex("before:content-['']"), + `$1test`, + ), + ).toBe('class="test"'); +}); + +test('matchClasses - text-[18px]', () => { + expect( + 'class="text-[18px]"'.replaceAll(generateRegex('text-[18px]'), `$1test`), + ).toBe('class="test"'); +}); + +test('matchClasses - bg-white not match bg-white-smoke', () => { + expect( + 'class="bg-white-smoke"'.replaceAll(generateRegex('bg-white'), `$1test`), + ).toBe('class="bg-white-smoke"'); +}); + +test('matchClasses - py-1 not match py-1.5', () => { + expect('class="py-1.5"'.replaceAll(generateRegex('py-1'), `$1test`)).toBe( + 'class="py-1.5"', + ); +}); + +test('matchClasses - [-webkit-text-fill-color:_transparent]', () => { + expect( + 'class="[-webkit-text-fill-color:_transparent]"'.replaceAll( + generateRegex('[-webkit-text-fill-color:_transparent]'), + `$1test`, + ), + ).toBe('class="test"'); +}); + +test('matchClasses - !bg-dark-accent/90', () => { + expect( + 'class="!bg-dark-accent/90"'.replaceAll( + generateRegex('!bg-dark-accent/90'), + `$1test`, + ), + ).toBe('class="test"'); +}); + +test('matchClasses - md:text-5xl/relaxed', () => { + expect( + 'class="md:text-5xl/relaxed"'.replaceAll( + generateRegex('md:text-5xl/relaxed'), + `$1test`, + ), + ).toBe('class="test"'); +}); + +test('matchClasses - dark:[&_path]:!fill-very-dark', () => { + expect( + 'class="dark:[&_path]:!fill-very-dark"'.replaceAll( + generateRegex('dark:[&_path]:!fill-very-dark'), + `$1test`, + ), + ).toBe('class="test"'); +}); + +test('matchClasses - h-4 not match when is not in class', () => { + expect('h-4 h-4[h-4]'.replaceAll(generateRegex('h-4'), `$1test`)).toBe( + 'h-4 h-4[h-4]', + ); +}); + +test('matchClasses - h-4 match when is declaring a var', () => { + expect( + 'const test = "h-4 h-4[h-4]"'.replaceAll(generateRegex('h-4'), `$1test`), + ).toBe('const test = "test h-4[h-4]"'); +}); + +test('matchClasses - h-4 match when is declaring a var without space', () => { + expect( + 'const test ="h-4 h-4[h-4]"'.replaceAll(generateRegex('h-4'), `$1test`), + ).toBe('const test ="test h-4[h-4]"'); +}); + +test('matchClasses - h-4 match when use simple quote', () => { + expect( + "const test = 'h-4 h-4[h-4]'".replaceAll(generateRegex('h-4'), `$1test`), + ).toBe("const test = 'test h-4[h-4]'"); +}); + +test('matchClasses - h-4 match when use template quote', () => { + expect( + 'const test = `h-4 h-4[h-4]`'.replaceAll(generateRegex('h-4'), `$1test`), + ).toBe('const test = `test h-4[h-4]`'); +}); diff --git a/tsconfig.json b/tsconfig.json index ed66104..f61ad16 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,13 +1,12 @@ { "$schema": "https://json.schemastore.org/tsconfig", "compilerOptions": { - "allowJs": true, + "allowJs": false, "allowSyntheticDefaultImports": false, "allowUmdGlobalAccess": false, "allowUnreachableCode": false, "allowUnusedLabels": false, "alwaysStrict": true, - "checkJs": true, "declaration": true, "emitDeclarationOnly": true, "esModuleInterop": true, @@ -38,6 +37,6 @@ "ts-node": { "esm": true }, - "include": ["src/**/*.ts"], + "include": ["src/**/*.ts", "test/**/*.ts"], "exclude": ["node_modules", "dist", ".vscode", ".husky"] } diff --git a/yarn.lock b/yarn.lock index c07881c..e927d9d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1407,6 +1407,15 @@ __metadata: languageName: node linkType: hard +"@jest/schemas@npm:^29.6.3": + version: 29.6.3 + resolution: "@jest/schemas@npm:29.6.3" + dependencies: + "@sinclair/typebox": "npm:^0.27.8" + checksum: 910040425f0fc93cd13e68c750b7885590b8839066dfa0cd78e7def07bbb708ad869381f725945d66f2284de5663bbecf63e8fdd856e2ae6e261ba30b1687e93 + languageName: node + linkType: hard + "@jridgewell/gen-mapping@npm:^0.3.0, @jridgewell/gen-mapping@npm:^0.3.2": version: 0.3.3 resolution: "@jridgewell/gen-mapping@npm:0.3.3" @@ -1557,6 +1566,97 @@ __metadata: languageName: node linkType: hard +"@rollup/rollup-android-arm-eabi@npm:4.3.0": + version: 4.3.0 + resolution: "@rollup/rollup-android-arm-eabi@npm:4.3.0" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + +"@rollup/rollup-android-arm64@npm:4.3.0": + version: 4.3.0 + resolution: "@rollup/rollup-android-arm64@npm:4.3.0" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + +"@rollup/rollup-darwin-arm64@npm:4.3.0": + version: 4.3.0 + resolution: "@rollup/rollup-darwin-arm64@npm:4.3.0" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@rollup/rollup-darwin-x64@npm:4.3.0": + version: 4.3.0 + resolution: "@rollup/rollup-darwin-x64@npm:4.3.0" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@rollup/rollup-linux-arm-gnueabihf@npm:4.3.0": + version: 4.3.0 + resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.3.0" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@rollup/rollup-linux-arm64-gnu@npm:4.3.0": + version: 4.3.0 + resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.3.0" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@rollup/rollup-linux-arm64-musl@npm:4.3.0": + version: 4.3.0 + resolution: "@rollup/rollup-linux-arm64-musl@npm:4.3.0" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@rollup/rollup-linux-x64-gnu@npm:4.3.0": + version: 4.3.0 + resolution: "@rollup/rollup-linux-x64-gnu@npm:4.3.0" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@rollup/rollup-linux-x64-musl@npm:4.3.0": + version: 4.3.0 + resolution: "@rollup/rollup-linux-x64-musl@npm:4.3.0" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@rollup/rollup-win32-arm64-msvc@npm:4.3.0": + version: 4.3.0 + resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.3.0" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@rollup/rollup-win32-ia32-msvc@npm:4.3.0": + version: 4.3.0 + resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.3.0" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@rollup/rollup-win32-x64-msvc@npm:4.3.0": + version: 4.3.0 + resolution: "@rollup/rollup-win32-x64-msvc@npm:4.3.0" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"@sinclair/typebox@npm:^0.27.8": + version: 0.27.8 + resolution: "@sinclair/typebox@npm:0.27.8" + checksum: 297f95ff77c82c54de8c9907f186076e715ff2621c5222ba50b8d40a170661c0c5242c763cba2a4791f0f91cb1d8ffa53ea1d7294570cf8cd4694c0e383e484d + languageName: node + linkType: hard + "@tootallnate/once@npm:2": version: 2.0.0 resolution: "@tootallnate/once@npm:2.0.0" @@ -1633,6 +1733,22 @@ __metadata: languageName: node linkType: hard +"@types/chai-subset@npm:^1.3.3": + version: 1.3.4 + resolution: "@types/chai-subset@npm:1.3.4" + dependencies: + "@types/chai": "npm:*" + checksum: c40035d29599bc72994dc52a6c1807b9240135811ad2b615c29d1378abf38990ec4d1189044c42de5b714106531401e8220fa35e4afe69b8cc26a5d7379bee6e + languageName: node + linkType: hard + +"@types/chai@npm:*, @types/chai@npm:^4.3.5": + version: 4.3.9 + resolution: "@types/chai@npm:4.3.9" + checksum: 8f48986c3b6e0b3b2be392bc2736fbb43044b18fa18272b277433d445d87b76398012f4c05dd0e501c4ef0f26bc3934139d0ebcd362f8289bb5bc7158de4c81e + languageName: node + linkType: hard + "@types/debug@npm:^4.0.0": version: 4.1.8 resolution: "@types/debug@npm:4.1.8" @@ -1943,6 +2059,59 @@ __metadata: languageName: node linkType: hard +"@vitest/expect@npm:0.34.6": + version: 0.34.6 + resolution: "@vitest/expect@npm:0.34.6" + dependencies: + "@vitest/spy": "npm:0.34.6" + "@vitest/utils": "npm:0.34.6" + chai: "npm:^4.3.10" + checksum: c5dbd3db4d914857287dcff5dd7084070a2f73ed616197c80acaa54c27e5563cecf7a11e86d6aeef002e38f2ca52626f4b9c765db9b56add736f4e94a7fb0954 + languageName: node + linkType: hard + +"@vitest/runner@npm:0.34.6": + version: 0.34.6 + resolution: "@vitest/runner@npm:0.34.6" + dependencies: + "@vitest/utils": "npm:0.34.6" + p-limit: "npm:^4.0.0" + pathe: "npm:^1.1.1" + checksum: 3525d8e4f8cd8a8b3f8f43a7b2604cda891fe31cfa1604e179628ced89d21114a55d6bb3bf192c02b4419e760eb15188d490e861cb46ddab2786193f8a999b0e + languageName: node + linkType: hard + +"@vitest/snapshot@npm:0.34.6": + version: 0.34.6 + resolution: "@vitest/snapshot@npm:0.34.6" + dependencies: + magic-string: "npm:^0.30.1" + pathe: "npm:^1.1.1" + pretty-format: "npm:^29.5.0" + checksum: a9a321a089b22a383253b8cf3092c3af9b35453bb1c0ba0762760644a6ab0f727a4083872c7fd5a7d18c9a4fc4a798c4392872e337858a7c8ccc25ada6bf4d96 + languageName: node + linkType: hard + +"@vitest/spy@npm:0.34.6": + version: 0.34.6 + resolution: "@vitest/spy@npm:0.34.6" + dependencies: + tinyspy: "npm:^2.1.1" + checksum: 9de152ac928c31e21bb4d8e1262b70db50dd11479efe8babce6bd993cc89957b974a584414a99d66ca188775b50baea1b934fdfb8d0d53c66fc2feb6dc2e348d + languageName: node + linkType: hard + +"@vitest/utils@npm:0.34.6": + version: 0.34.6 + resolution: "@vitest/utils@npm:0.34.6" + dependencies: + diff-sequences: "npm:^29.4.3" + loupe: "npm:^2.3.6" + pretty-format: "npm:^29.5.0" + checksum: 09a1b2122ceb5541b4f3d64410088e363a36d6e4addf208b6458615ac856adf36c1c9b5431a45ea13a78c30e6a7dcb0696854abe69a710089ffa229356a5202b + languageName: node + linkType: hard + "JSONStream@npm:^1.3.5": version: 1.3.5 resolution: "JSONStream@npm:1.3.5" @@ -1978,6 +2147,13 @@ __metadata: languageName: node linkType: hard +"acorn-walk@npm:^8.2.0": + version: 8.3.0 + resolution: "acorn-walk@npm:8.3.0" + checksum: 7673f342db939adc16ac3596c374a56be33e6ef84e01dfb3a0b50cc87cf9b8e46d84c337dcd7d5644f75bf219ad5a36bf33795e9f1af15298e6bceacf46c5f1f + languageName: node + linkType: hard + "acorn@npm:^8.10.0": version: 8.11.2 resolution: "acorn@npm:8.11.2" @@ -2118,6 +2294,13 @@ __metadata: languageName: node linkType: hard +"ansi-styles@npm:^5.0.0": + version: 5.2.0 + resolution: "ansi-styles@npm:5.2.0" + checksum: d7f4e97ce0623aea6bc0d90dcd28881ee04cba06c570b97fd3391bd7a268eedfd9d5e2dd4fdcbdd82b8105df5faf6f24aaedc08eaf3da898e702db5948f63469 + languageName: node + linkType: hard + "ansi-styles@npm:^6.0.0, ansi-styles@npm:^6.1.0": version: 6.2.1 resolution: "ansi-styles@npm:6.2.1" @@ -2203,6 +2386,13 @@ __metadata: languageName: node linkType: hard +"assertion-error@npm:^1.1.0": + version: 1.1.0 + resolution: "assertion-error@npm:1.1.0" + checksum: fd9429d3a3d4fd61782eb3962ae76b6d08aa7383123fca0596020013b3ebd6647891a85b05ce821c47d1471ed1271f00b0545cf6a4326cf2fc91efcc3b0fbecf + languageName: node + linkType: hard + "astro-eslint-parser@npm:^0.16.0": version: 0.16.0 resolution: "astro-eslint-parser@npm:0.16.0" @@ -2247,6 +2437,7 @@ __metadata: prettier: "npm:3.0.3" pretty-bytes: "npm:6.1.1" typescript: "npm:5.2.2" + vitest: "npm:^0.34.6" languageName: unknown linkType: soft @@ -2514,6 +2705,13 @@ __metadata: languageName: node linkType: hard +"cac@npm:^6.7.14": + version: 6.7.14 + resolution: "cac@npm:6.7.14" + checksum: 002769a0fbfc51c062acd2a59df465a2a947916b02ac50b56c69ec6c018ee99ac3e7f4dd7366334ea847f1ecacf4defaa61bcd2ac283db50156ce1f1d8c8ad42 + languageName: node + linkType: hard + "cacache@npm:^16.1.0": version: 16.1.3 resolution: "cacache@npm:16.1.3" @@ -2600,6 +2798,21 @@ __metadata: languageName: node linkType: hard +"chai@npm:^4.3.10": + version: 4.3.10 + resolution: "chai@npm:4.3.10" + dependencies: + assertion-error: "npm:^1.1.0" + check-error: "npm:^1.0.3" + deep-eql: "npm:^4.1.3" + get-func-name: "npm:^2.0.2" + loupe: "npm:^2.3.6" + pathval: "npm:^1.1.1" + type-detect: "npm:^4.0.8" + checksum: 9e545fd60f5efee4f06f7ad62f7b1b142932b08fbb3454db69defd511e7c58771ce51843764212da1e129b2c9d1b029fbf5f98da030fe67a95a0853e8679524f + languageName: node + linkType: hard + "chalk@npm:5.3.0, chalk@npm:^5.2.0, chalk@npm:^5.3.0": version: 5.3.0 resolution: "chalk@npm:5.3.0" @@ -2670,6 +2883,15 @@ __metadata: languageName: node linkType: hard +"check-error@npm:^1.0.3": + version: 1.0.3 + resolution: "check-error@npm:1.0.3" + dependencies: + get-func-name: "npm:^2.0.2" + checksum: e2131025cf059b21080f4813e55b3c480419256914601750b0fee3bd9b2b8315b531e551ef12560419b8b6d92a3636511322752b1ce905703239e7cc451b6399 + languageName: node + linkType: hard + "chokidar@npm:^3.5.3": version: 3.5.3 resolution: "chokidar@npm:3.5.3" @@ -3181,6 +3403,15 @@ __metadata: languageName: node linkType: hard +"deep-eql@npm:^4.1.3": + version: 4.1.3 + resolution: "deep-eql@npm:4.1.3" + dependencies: + type-detect: "npm:^4.0.0" + checksum: 12ce93ae63de187e77b076d3d51bfc28b11f98910a22c18714cce112791195e86a94f97788180994614b14562a86c9763f67c69f785e4586f806b5df39bf9301 + languageName: node + linkType: hard + "deep-extend@npm:^0.6.0": version: 0.6.0 resolution: "deep-extend@npm:0.6.0" @@ -3305,6 +3536,13 @@ __metadata: languageName: node linkType: hard +"diff-sequences@npm:^29.4.3": + version: 29.6.3 + resolution: "diff-sequences@npm:29.6.3" + checksum: 179daf9d2f9af5c57ad66d97cb902a538bcf8ed64963fa7aa0c329b3de3665ce2eb6ffdc2f69f29d445fa4af2517e5e55e5b6e00c00a9ae4f43645f97f7078cb + languageName: node + linkType: hard + "diff@npm:^4.0.1": version: 4.0.2 resolution: "diff@npm:4.0.2" @@ -3611,7 +3849,7 @@ __metadata: languageName: node linkType: hard -"esbuild@npm:^0.19.2": +"esbuild@npm:^0.19.2, esbuild@npm:^0.19.3": version: 0.19.5 resolution: "esbuild@npm:0.19.5" dependencies: @@ -4237,6 +4475,16 @@ __metadata: languageName: node linkType: hard +"fsevents@npm:~2.3.3": + version: 2.3.3 + resolution: "fsevents@npm:2.3.3" + dependencies: + node-gyp: "npm:latest" + checksum: 4c1ade961ded57cdbfbb5cac5106ec17bc8bccd62e16343c569a0ceeca83b9dfef87550b4dc5cbb89642da412b20c5071f304c8c464b80415446e8e155a038c0 + conditions: os=darwin + languageName: node + linkType: hard + "fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin": version: 2.3.2 resolution: "fsevents@patch:fsevents@npm%3A2.3.2#optional!builtin::version=2.3.2&hash=df0bf1" @@ -4246,6 +4494,15 @@ __metadata: languageName: node linkType: hard +"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": version: 1.1.1 resolution: "function-bind@npm:1.1.1" @@ -4290,6 +4547,13 @@ __metadata: languageName: node linkType: hard +"get-func-name@npm:^2.0.1, get-func-name@npm:^2.0.2": + version: 2.0.2 + resolution: "get-func-name@npm:2.0.2" + checksum: 3f62f4c23647de9d46e6f76d2b3eafe58933a9b3830c60669e4180d6c601ce1b4aa310ba8366143f55e52b139f992087a9f0647274e8745621fa2af7e0acf13b + languageName: node + linkType: hard + "get-stream@npm:^6.0.0, get-stream@npm:^6.0.1": version: 6.0.1 resolution: "get-stream@npm:6.0.1" @@ -5287,6 +5551,13 @@ __metadata: languageName: node linkType: hard +"jsonc-parser@npm:^3.2.0": + version: 3.2.0 + resolution: "jsonc-parser@npm:3.2.0" + checksum: bd68b902e5f9394f01da97921f49c5084b2dc03a0c5b4fdb2a429f8d6f292686c1bf87badaeb0a8148d024192a88f5ad2e57b2918ba43fe25cf15f3371db64d4 + languageName: node + linkType: hard + "jsonfile@npm:^6.0.1": version: 6.1.0 resolution: "jsonfile@npm:6.1.0" @@ -5398,6 +5669,13 @@ __metadata: languageName: node linkType: hard +"local-pkg@npm:^0.4.3": + version: 0.4.3 + resolution: "local-pkg@npm:0.4.3" + checksum: 48f38c12721881370bca50ed3b5e3cc6fef741cfb4de7e48666f6ded07c1aaea53cf770cfef84a89bed286c17631111bf99a86241ddf6f679408c79c56f29560 + languageName: node + linkType: hard + "locate-path@npm:^5.0.0": version: 5.0.0 resolution: "locate-path@npm:5.0.0" @@ -5547,6 +5825,15 @@ __metadata: languageName: node linkType: hard +"loupe@npm:^2.3.6": + version: 2.3.7 + resolution: "loupe@npm:2.3.7" + dependencies: + get-func-name: "npm:^2.0.1" + checksum: 635c8f0914c2ce7ecfe4e239fbaf0ce1d2c00e4246fafcc4ed000bfdb1b8f89d05db1a220054175cca631ebf3894872a26fffba0124477fcb562f78762848fb1 + languageName: node + linkType: hard + "lru-cache@npm:^5.1.1": version: 5.1.1 resolution: "lru-cache@npm:5.1.1" @@ -5572,7 +5859,7 @@ __metadata: languageName: node linkType: hard -"magic-string@npm:^0.30.3": +"magic-string@npm:^0.30.1, magic-string@npm:^0.30.3": version: 0.30.5 resolution: "magic-string@npm:0.30.5" dependencies: @@ -6437,6 +6724,18 @@ __metadata: languageName: node linkType: hard +"mlly@npm:^1.2.0, mlly@npm:^1.4.0": + version: 1.4.2 + resolution: "mlly@npm:1.4.2" + dependencies: + acorn: "npm:^8.10.0" + pathe: "npm:^1.1.1" + pkg-types: "npm:^1.0.3" + ufo: "npm:^1.3.0" + checksum: ea5dc1a6cb2795cd15c6cdc84bbf431e0649917e673ef4de5d5ace6f74f74f02d22cd3c3faf7f868c3857115d33cccaaf5a070123b9a6c997af06ebeb8ab3bb5 + languageName: node + linkType: hard + "mri@npm:^1.1.0": version: 1.2.0 resolution: "mri@npm:1.2.0" @@ -6924,6 +7223,20 @@ __metadata: languageName: node linkType: hard +"pathe@npm:^1.1.0, pathe@npm:^1.1.1": + version: 1.1.1 + resolution: "pathe@npm:1.1.1" + checksum: 603decdf751d511f0df10acb8807eab8cc25c1af529e6149e27166916f19db57235a7d374b125452ba6da4dd0f697656fdaf5a9236b3594929bb371726d31602 + languageName: node + linkType: hard + +"pathval@npm:^1.1.1": + version: 1.1.1 + resolution: "pathval@npm:1.1.1" + checksum: b50a4751068aa3a5428f5a0b480deecedc6f537666a3630a0c2ae2d5e7c0f4bf0ee77b48404441ec1220bef0c91625e6030b3d3cf5a32ab0d9764018d1d9dbb6 + languageName: node + linkType: hard + "picocolors@npm:^1.0.0": version: 1.0.0 resolution: "picocolors@npm:1.0.0" @@ -6963,6 +7276,17 @@ __metadata: languageName: node linkType: hard +"pkg-types@npm:^1.0.3": + version: 1.0.3 + resolution: "pkg-types@npm:1.0.3" + dependencies: + jsonc-parser: "npm:^3.2.0" + mlly: "npm:^1.2.0" + pathe: "npm:^1.1.0" + checksum: e17e1819ce579c9ea390e4c41a9ed9701d8cff14b463f9577cc4f94688da8917c66dabc40feacd47a21eb3de9b532756a78becd882b76add97053af307c1240a + languageName: node + linkType: hard + "postcss-load-config@npm:4.0.1": version: 4.0.1 resolution: "postcss-load-config@npm:4.0.1" @@ -7002,7 +7326,7 @@ __metadata: languageName: node linkType: hard -"postcss@npm:8.4.31, postcss@npm:^8.4.27": +"postcss@npm:8.4.31, postcss@npm:^8.4.27, postcss@npm:^8.4.31": version: 8.4.31 resolution: "postcss@npm:8.4.31" dependencies: @@ -7090,6 +7414,17 @@ __metadata: languageName: node linkType: hard +"pretty-format@npm:^29.5.0": + version: 29.7.0 + resolution: "pretty-format@npm:29.7.0" + dependencies: + "@jest/schemas": "npm:^29.6.3" + ansi-styles: "npm:^5.0.0" + react-is: "npm:^18.0.0" + checksum: dea96bc83c83cd91b2bfc55757b6b2747edcaac45b568e46de29deee80742f17bc76fe8898135a70d904f4928eafd8bb693cd1da4896e8bdd3c5e82cadf1d2bb + languageName: node + linkType: hard + "prismjs@npm:^1.29.0": version: 1.29.0 resolution: "prismjs@npm:1.29.0" @@ -7194,6 +7529,13 @@ __metadata: languageName: node linkType: hard +"react-is@npm:^18.0.0": + version: 18.2.0 + resolution: "react-is@npm:18.2.0" + checksum: 200cd65bf2e0be7ba6055f647091b725a45dd2a6abef03bf2380ce701fd5edccee40b49b9d15edab7ac08a762bf83cb4081e31ec2673a5bfb549a36ba21570df + languageName: node + linkType: hard + "read-pkg-up@npm:^7.0.1": version: 7.0.1 resolution: "read-pkg-up@npm:7.0.1" @@ -7562,6 +7904,56 @@ __metadata: languageName: node linkType: hard +"rollup@npm:^4.2.0": + version: 4.3.0 + resolution: "rollup@npm:4.3.0" + dependencies: + "@rollup/rollup-android-arm-eabi": "npm:4.3.0" + "@rollup/rollup-android-arm64": "npm:4.3.0" + "@rollup/rollup-darwin-arm64": "npm:4.3.0" + "@rollup/rollup-darwin-x64": "npm:4.3.0" + "@rollup/rollup-linux-arm-gnueabihf": "npm:4.3.0" + "@rollup/rollup-linux-arm64-gnu": "npm:4.3.0" + "@rollup/rollup-linux-arm64-musl": "npm:4.3.0" + "@rollup/rollup-linux-x64-gnu": "npm:4.3.0" + "@rollup/rollup-linux-x64-musl": "npm:4.3.0" + "@rollup/rollup-win32-arm64-msvc": "npm:4.3.0" + "@rollup/rollup-win32-ia32-msvc": "npm:4.3.0" + "@rollup/rollup-win32-x64-msvc": "npm:4.3.0" + 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-linux-arm-gnueabihf": + optional: true + "@rollup/rollup-linux-arm64-gnu": + optional: true + "@rollup/rollup-linux-arm64-musl": + 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: b0d8ab6686053260747b6a05ca66b898271ce8dea69e5e3c3570b7ba4f56150798ca3bc3a0159a33fd914e3df2d10502b3b8c89337a4883e85438ab2eee9dac8 + languageName: node + linkType: hard + "run-applescript@npm:^5.0.0": version: 5.0.0 resolution: "run-applescript@npm:5.0.0" @@ -7741,6 +8133,13 @@ __metadata: languageName: node linkType: hard +"siginfo@npm:^2.0.0": + version: 2.0.0 + resolution: "siginfo@npm:2.0.0" + checksum: e93ff66c6531a079af8fb217240df01f980155b5dc408d2d7bebc398dd284e383eb318153bf8acd4db3c4fe799aa5b9a641e38b0ba3b1975700b1c89547ea4e7 + languageName: node + linkType: hard + "signal-exit@npm:^3.0.2, signal-exit@npm:^3.0.3, signal-exit@npm:^3.0.7": version: 3.0.7 resolution: "signal-exit@npm:3.0.7" @@ -7921,6 +8320,20 @@ __metadata: languageName: node linkType: hard +"stackback@npm:0.0.2": + version: 0.0.2 + resolution: "stackback@npm:0.0.2" + checksum: 2d4dc4e64e2db796de4a3c856d5943daccdfa3dd092e452a1ce059c81e9a9c29e0b9badba91b43ef0d5ff5c04ee62feb3bcc559a804e16faf447bac2d883aa99 + languageName: node + linkType: hard + +"std-env@npm:^3.3.3": + version: 3.4.3 + resolution: "std-env@npm:3.4.3" + checksum: 3087e9b2f6f9f40f1562b765c2d0768ad12f04a4d039fa5848e9e951263266b533590464e5d90e412680ec37e4febabf0c8fb3d15c4c7b8c5eb21ebcb09bf393 + languageName: node + linkType: hard + "stdin-discarder@npm:^0.1.0": version: 0.1.0 resolution: "stdin-discarder@npm:0.1.0" @@ -8093,6 +8506,15 @@ __metadata: languageName: node linkType: hard +"strip-literal@npm:^1.0.1": + version: 1.3.0 + resolution: "strip-literal@npm:1.3.0" + dependencies: + acorn: "npm:^8.10.0" + checksum: f5fa7e289df8ebe82e90091fd393974faf8871be087ca50114327506519323cf15f2f8fee6ebe68b5e58bfc795269cae8bdc7cb5a83e27b02b3fe953f37b0a89 + languageName: node + linkType: hard + "supports-color@npm:^5.3.0": version: 5.5.0 resolution: "supports-color@npm:5.5.0" @@ -8219,6 +8641,27 @@ __metadata: languageName: node linkType: hard +"tinybench@npm:^2.5.0": + version: 2.5.1 + resolution: "tinybench@npm:2.5.1" + checksum: f64ea142e048edc5010027eca36aff5aef74cd849ab9c6ba6e39475f911309694cb5a7ff894d47216ab4a3abcf4291e4bdc7a57796e96bf5b06e67452b5ac54d + languageName: node + linkType: hard + +"tinypool@npm:^0.7.0": + version: 0.7.0 + resolution: "tinypool@npm:0.7.0" + checksum: e1fb1f430647525c6bb0bac71acc4c1594c7687fe8e4f08c8f389d9a672fb69746869e9d9818b55f1ab85ea6308d42f92cbc32a9847088abf6bc55a8700be390 + languageName: node + linkType: hard + +"tinyspy@npm:^2.1.1": + version: 2.2.0 + resolution: "tinyspy@npm:2.2.0" + checksum: bcc5a08c2dc7574d32e6dcc2e760ad95a3cf30249c22799815b6389179427c95573d27d2d965ebc5fca2b6d338c46678cd7337ea2a9cebacee3dc662176b07cb + languageName: node + linkType: hard + "titleize@npm:^3.0.0": version: 3.0.0 resolution: "titleize@npm:3.0.0" @@ -8358,6 +8801,13 @@ __metadata: languageName: node linkType: hard +"type-detect@npm:^4.0.0, type-detect@npm:^4.0.8": + version: 4.0.8 + resolution: "type-detect@npm:4.0.8" + checksum: 5179e3b8ebc51fce1b13efb75fdea4595484433f9683bbc2dca6d99789dba4e602ab7922d2656f2ce8383987467f7770131d4a7f06a26287db0615d2f4c4ce7d + languageName: node + linkType: hard + "type-fest@npm:^0.18.0": version: 0.18.1 resolution: "type-fest@npm:0.18.1" @@ -8467,6 +8917,13 @@ __metadata: languageName: node linkType: hard +"ufo@npm:^1.3.0": + version: 1.3.1 + resolution: "ufo@npm:1.3.1" + checksum: cc10314a5065c50995167a2c4bbe04c3929f6a750f09e5a805cc647e2a16ea5556360b3c22a4cb03fe32cb18877d37c5f833a44930633916a916fac41be25d14 + languageName: node + linkType: hard + "undici-types@npm:~5.26.4": version: 5.26.5 resolution: "undici-types@npm:5.26.5" @@ -8788,6 +9245,62 @@ __metadata: languageName: node linkType: hard +"vite-node@npm:0.34.6": + version: 0.34.6 + resolution: "vite-node@npm:0.34.6" + dependencies: + cac: "npm:^6.7.14" + debug: "npm:^4.3.4" + mlly: "npm:^1.4.0" + pathe: "npm:^1.1.1" + picocolors: "npm:^1.0.0" + vite: "npm:^3.0.0 || ^4.0.0 || ^5.0.0-0" + bin: + vite-node: vite-node.mjs + checksum: ae49fd24874162196dd41477afe51dd8dc0bd1e8cb4ae885455d1d5569e14f628941f9867044bff263620536446e17d7e2c0828c9ea84b6308b9eb5711e80991 + languageName: node + linkType: hard + +"vite@npm:^3.0.0 || ^4.0.0 || ^5.0.0-0, vite@npm:^3.1.0 || ^4.0.0 || ^5.0.0-0": + version: 5.0.0-beta.16 + resolution: "vite@npm:5.0.0-beta.16" + dependencies: + esbuild: "npm:^0.19.3" + fsevents: "npm:~2.3.3" + postcss: "npm:^8.4.31" + rollup: "npm:^4.2.0" + peerDependencies: + "@types/node": ^18.0.0 || >=20.0.0 + less: "*" + lightningcss: ^1.21.0 + sass: "*" + stylus: "*" + sugarss: "*" + terser: ^5.4.0 + dependenciesMeta: + fsevents: + optional: true + peerDependenciesMeta: + "@types/node": + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + bin: + vite: bin/vite.js + checksum: 6da1f2b5b7269d2ae983bc52971939b9767fcbb1ab088a56d8a8395bfbfcea705503b73abd4de83dfa4dafa4b04b985d1fe22a889af7c29f396536f650ec56ab + languageName: node + linkType: hard + "vite@npm:^4.4.9": version: 4.5.0 resolution: "vite@npm:4.5.0" @@ -8840,6 +9353,66 @@ __metadata: languageName: node linkType: hard +"vitest@npm:^0.34.6": + version: 0.34.6 + resolution: "vitest@npm:0.34.6" + dependencies: + "@types/chai": "npm:^4.3.5" + "@types/chai-subset": "npm:^1.3.3" + "@types/node": "npm:*" + "@vitest/expect": "npm:0.34.6" + "@vitest/runner": "npm:0.34.6" + "@vitest/snapshot": "npm:0.34.6" + "@vitest/spy": "npm:0.34.6" + "@vitest/utils": "npm:0.34.6" + acorn: "npm:^8.9.0" + acorn-walk: "npm:^8.2.0" + cac: "npm:^6.7.14" + chai: "npm:^4.3.10" + debug: "npm:^4.3.4" + local-pkg: "npm:^0.4.3" + magic-string: "npm:^0.30.1" + pathe: "npm:^1.1.1" + picocolors: "npm:^1.0.0" + std-env: "npm:^3.3.3" + strip-literal: "npm:^1.0.1" + tinybench: "npm:^2.5.0" + tinypool: "npm:^0.7.0" + vite: "npm:^3.1.0 || ^4.0.0 || ^5.0.0-0" + vite-node: "npm:0.34.6" + why-is-node-running: "npm:^2.2.2" + peerDependencies: + "@edge-runtime/vm": "*" + "@vitest/browser": "*" + "@vitest/ui": "*" + happy-dom: "*" + jsdom: "*" + playwright: "*" + safaridriver: "*" + webdriverio: "*" + peerDependenciesMeta: + "@edge-runtime/vm": + optional: true + "@vitest/browser": + optional: true + "@vitest/ui": + optional: true + happy-dom: + optional: true + jsdom: + optional: true + playwright: + optional: true + safaridriver: + optional: true + webdriverio: + optional: true + bin: + vitest: vitest.mjs + checksum: 0191422ab979823803aac64e657e288f1b84bb518a2b653fe9928b4f1c931b04efde14990d263ff76a18dc6c35ab34652db3ae7cbecea771cfa36abe547dd705 + languageName: node + linkType: hard + "wcwidth@npm:^1.0.1": version: 1.0.1 resolution: "wcwidth@npm:1.0.1" @@ -8905,6 +9478,18 @@ __metadata: languageName: node linkType: hard +"why-is-node-running@npm:^2.2.2": + version: 2.2.2 + resolution: "why-is-node-running@npm:2.2.2" + dependencies: + siginfo: "npm:^2.0.0" + stackback: "npm:0.0.2" + bin: + why-is-node-running: cli.js + checksum: f3582e0337f4b25537d492b1d40f00b978ce04b1d1eeea8f310bfa8aae8a7d11d118d672e2f0760c164ce3753a620a70aa29ff3620e340197624940cf9c08615 + languageName: node + linkType: hard + "wide-align@npm:^1.1.5": version: 1.1.5 resolution: "wide-align@npm:1.1.5"