diff --git a/jest.config.ts b/jest.config.ts deleted file mode 100644 index 82202f7..0000000 --- a/jest.config.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { Config } from 'jest'; - -const config: Config = { - collectCoverage: false, - collectCoverageFrom: ['src/**/*.{js,jsx,ts,tsx}'], - coverageThreshold: { - global: { - branches: 90, - functions: 90, - lines: 90, - statements: 90, - }, - }, - moduleDirectories: ['node_modules', 'src'], - setupFiles: ['/test/__setup__/setupFiles.ts'], - setupFilesAfterEnv: ['/test/__setup__/setupFilesAfterEnv.ts'], - snapshotSerializers: ['jest-serializer-html'], - testEnvironment: 'jsdom', - testEnvironmentOptions: { - url: 'http://localhost:1337/', - }, - testRegex: '/test/.*?\\.(test|spec)\\.tsx?$', - transform: { - '^.+\\.m?[tj]sx?$': [ - 'ts-jest', - { - tsconfig: 'test/tsconfig.json', - diagnostics: { - ignoreCodes: ['TS151001'], - }, - }, - ], - }, - verbose: false, - watchPlugins: ['jest-watch-typeahead/filename', 'jest-watch-typeahead/testname'], -}; - -export default config; diff --git a/package.json b/package.json index eb904b1..4f88c01 100644 --- a/package.json +++ b/package.json @@ -59,47 +59,43 @@ "@gilbarbara/prettier-config": "^1.0.0", "@gilbarbara/tsconfig": "^0.2.3", "@size-limit/preset-small-lib": "^9.0.0", - "@testing-library/jest-dom": "^6.1.3", + "@testing-library/jest-dom": "^6.1.4", "@testing-library/react": "^14.0.0", "@types/exenv": "^1.2.0", "@types/fetch-mock": "^7.3.6", - "@types/jest": "^29.5.5", "@types/node": "^20.8.2", "@types/node-fetch": "^2.6.6", "@types/react": "^18.2.24", "@types/react-dom": "^18.2.8", + "@vitest/coverage-v8": "^0.34.6", "browser-cache-mock": "^0.1.7", - "cross-fetch": "^4.0.0", "del-cli": "^5.1.0", "fix-tsup-cjs": "^1.2.0", "http-server": "^14.1.1", "husky": "^8.0.3", - "jest": "^29.7.0", - "jest-environment-jsdom": "^29.7.0", - "jest-extended": "^4.0.1", - "jest-fetch-mock": "^3.0.3", - "jest-serializer-html": "^7.1.0", - "jest-watch-typeahead": "^2.2.2", + "jest-extended": "^4.0.2", + "jsdom": "^22.1.0", "react": "^18.2.0", "react-dom": "^18.2.0", "repo-tools": "^0.2.2", "size-limit": "^9.0.0", "start-server-and-test": "^2.0.1", - "ts-jest": "^29.1.1", "ts-node": "^10.9.1", "tsup": "^7.2.0", - "typescript": "^5.2.2" + "typescript": "^5.2.2", + "vitest": "^0.34.6", + "vitest-fetch-mock": "^0.2.2" }, "scripts": { "build": "pnpm run clean && tsup && fix-tsup-cjs", "watch": "tsup --watch", "clean": "del dist/*", - "start": "http-server test/__fixtures__ -p 1337 --cors", "lint": "eslint src test", + "start": "http-server test/__fixtures__ -p 1337 --cors", "test": "start-server-and-test start http://127.0.0.1:1337 test:coverage", - "test:coverage": "jest --coverage --bail", - "test:watch": "jest --watchAll --verbose", - "typecheck": "tsc --noEmit", + "test:coverage": "vitest run --coverage", + "test:watch": "vitest watch", + "typecheck": "tsc -p test/tsconfig.json", "size": "size-limit", "validate": "pnpm run lint && pnpm run typecheck && pnpm run test && pnpm run build && pnpm run size", "format": "prettier \"**/*.{js,jsx,json,yml,yaml,css,less,scss,ts,tsx,md,graphql,mdx}\" --write", @@ -142,12 +138,12 @@ { "name": "commonjs", "path": "./dist/index.js", - "limit": "11 KB" + "limit": "10 KB" }, { "name": "esm", "path": "./dist/index.mjs", - "limit": "9 KB" + "limit": "10 KB" } ] } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f65d7a5..0f217d2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -26,8 +26,8 @@ devDependencies: specifier: ^9.0.0 version: 9.0.0(size-limit@9.0.0) '@testing-library/jest-dom': - specifier: ^6.1.3 - version: 6.1.3(@types/jest@29.5.5)(jest@29.7.0) + specifier: ^6.1.4 + version: 6.1.4(jest@29.7.0)(vitest@0.34.6) '@testing-library/react': specifier: ^14.0.0 version: 14.0.0(react-dom@18.2.0)(react@18.2.0) @@ -37,9 +37,6 @@ devDependencies: '@types/fetch-mock': specifier: ^7.3.6 version: 7.3.6 - '@types/jest': - specifier: ^29.5.5 - version: 29.5.5 '@types/node': specifier: ^20.8.2 version: 20.8.2 @@ -52,12 +49,12 @@ devDependencies: '@types/react-dom': specifier: ^18.2.8 version: 18.2.8 + '@vitest/coverage-v8': + specifier: ^0.34.6 + version: 0.34.6(vitest@0.34.6) browser-cache-mock: specifier: ^0.1.7 version: 0.1.7 - cross-fetch: - specifier: ^4.0.0 - version: 4.0.0 del-cli: specifier: ^5.1.0 version: 5.1.0 @@ -70,24 +67,12 @@ devDependencies: husky: specifier: ^8.0.3 version: 8.0.3 - jest: - specifier: ^29.7.0 - version: 29.7.0(@types/node@20.8.2)(ts-node@10.9.1) - jest-environment-jsdom: - specifier: ^29.7.0 - version: 29.7.0 jest-extended: - specifier: ^4.0.1 - version: 4.0.1(jest@29.7.0) - jest-fetch-mock: - specifier: ^3.0.3 - version: 3.0.3 - jest-serializer-html: - specifier: ^7.1.0 - version: 7.1.0 - jest-watch-typeahead: - specifier: ^2.2.2 - version: 2.2.2(jest@29.7.0) + specifier: ^4.0.2 + version: 4.0.2(jest@29.7.0) + jsdom: + specifier: ^22.1.0 + version: 22.1.0 react: specifier: ^18.2.0 version: 18.2.0 @@ -103,9 +88,6 @@ devDependencies: start-server-and-test: specifier: ^2.0.1 version: 2.0.1 - ts-jest: - specifier: ^29.1.1 - version: 29.1.1(@babel/core@7.22.11)(esbuild@0.18.20)(jest@29.7.0)(typescript@5.2.2) ts-node: specifier: ^10.9.1 version: 10.9.1(@types/node@20.8.2)(typescript@5.2.2) @@ -115,6 +97,12 @@ devDependencies: typescript: specifier: ^5.2.2 version: 5.2.2 + vitest: + specifier: ^0.34.6 + version: 0.34.6(jsdom@22.1.0) + vitest-fetch-mock: + specifier: ^0.2.2 + version: 0.2.2(vitest@0.34.6) packages: @@ -1116,18 +1104,6 @@ packages: engines: {node: '>=8'} dev: true - /@jest/console@29.6.4: - resolution: {integrity: sha512-wNK6gC0Ha9QeEPSkeJedQuTQqxZYnDPuDcDhVuVatRvMkL4D0VTvFVZj+Yuh6caG2aOfzkUZ36KtCmLNtR02hw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/types': 29.6.3 - '@types/node': 20.8.2 - chalk: 4.1.2 - jest-message-util: 29.7.0 - jest-util: 29.7.0 - slash: 3.0.0 - dev: true - /@jest/console@29.7.0: resolution: {integrity: sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -1287,16 +1263,6 @@ packages: graceful-fs: 4.2.11 dev: true - /@jest/test-result@29.6.4: - resolution: {integrity: sha512-uQ1C0AUEN90/dsyEirgMLlouROgSY+Wc/JanVVk0OiUKa5UFh7sJpMEM3aoUBAz2BRNvUJ8j3d294WFuRxSyOQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/console': 29.6.4 - '@jest/types': 29.6.3 - '@types/istanbul-lib-coverage': 2.0.4 - collect-v8-coverage: 1.0.2 - dev: true - /@jest/test-result@29.7.0: resolution: {integrity: sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -1510,8 +1476,8 @@ packages: pretty-format: 27.5.1 dev: true - /@testing-library/jest-dom@6.1.3(@types/jest@29.5.5)(jest@29.7.0): - resolution: {integrity: sha512-YzpjRHoCBWPzpPNtg6gnhasqtE/5O4qz8WCwDEaxtfnPO6gkaLrnuXusrGSPyhIGPezr1HM7ZH0CFaUTY9PJEQ==} + /@testing-library/jest-dom@6.1.4(jest@29.7.0)(vitest@0.34.6): + resolution: {integrity: sha512-wpoYrCYwSZ5/AxcrjLxJmCU6I5QAJXslEeSiMQqaWmP2Kzpd1LvF/qxmAIW2qposULGWq2gw30GgVNFLSc2Jnw==} engines: {node: '>=14', npm: '>=6', yarn: '>=1'} peerDependencies: '@jest/globals': '>= 28' @@ -1530,7 +1496,6 @@ packages: dependencies: '@adobe/css-tools': 4.3.1 '@babel/runtime': 7.22.11 - '@types/jest': 29.5.5 aria-query: 5.3.0 chalk: 3.0.0 css.escape: 1.5.1 @@ -1538,6 +1503,7 @@ packages: jest: 29.7.0(@types/node@20.8.2)(ts-node@10.9.1) lodash: 4.17.21 redent: 3.0.0 + vitest: 0.34.6(jsdom@22.1.0) dev: true /@testing-library/react@14.0.0(react-dom@18.2.0)(react@18.2.0): @@ -1608,6 +1574,16 @@ packages: '@babel/types': 7.22.11 dev: true + /@types/chai-subset@1.3.3: + resolution: {integrity: sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==} + dependencies: + '@types/chai': 4.3.6 + dev: true + + /@types/chai@4.3.6: + resolution: {integrity: sha512-VOVRLM1mBxIRxydiViqPcKn6MIxZytrbMpd6RJLIWKxUNr3zux8no0Oc7kJx0WAPIitgZ0gkrDS+btlqQpubpw==} + dev: true + /@types/eslint-scope@3.7.4: resolution: {integrity: sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==} dependencies: @@ -1656,21 +1632,6 @@ packages: '@types/istanbul-lib-report': 3.0.0 dev: true - /@types/jest@29.5.5: - resolution: {integrity: sha512-ebylz2hnsWR9mYvmBFbXJXr+33UPc4+ZdxyDXh5w0FlPBTfCVN3wPL+kuOiQt3xvrK419v7XWeAs+AeOksafXg==} - dependencies: - expect: 29.7.0 - pretty-format: 29.7.0 - dev: true - - /@types/jsdom@20.0.1: - resolution: {integrity: sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ==} - dependencies: - '@types/node': 20.8.2 - '@types/tough-cookie': 4.0.2 - parse5: 7.1.2 - dev: true - /@types/json-schema@7.0.12: resolution: {integrity: sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==} dev: true @@ -1728,10 +1689,6 @@ packages: resolution: {integrity: sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==} dev: true - /@types/tough-cookie@4.0.2: - resolution: {integrity: sha512-Q5vtl1W5ue16D+nIaW8JWebSSraJVlK+EthKn7e7UcD4KWsaSJ8BqGPXNaPghgtcn/fhvrN17Tv8ksUsQpiplw==} - dev: true - /@types/yargs-parser@21.0.0: resolution: {integrity: sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==} dev: true @@ -1935,6 +1892,65 @@ packages: eslint-visitor-keys: 3.4.3 dev: true + /@vitest/coverage-v8@0.34.6(vitest@0.34.6): + resolution: {integrity: sha512-fivy/OK2d/EsJFoEoxHFEnNGTg+MmdZBAVK9Ka4qhXR2K3J0DS08vcGVwzDtXSuUMabLv4KtPcpSKkcMXFDViw==} + peerDependencies: + vitest: '>=0.32.0 <1' + dependencies: + '@ampproject/remapping': 2.2.1 + '@bcoe/v8-coverage': 0.2.3 + istanbul-lib-coverage: 3.2.0 + istanbul-lib-report: 3.0.1 + istanbul-lib-source-maps: 4.0.1 + istanbul-reports: 3.1.6 + magic-string: 0.30.4 + picocolors: 1.0.0 + std-env: 3.4.3 + test-exclude: 6.0.0 + v8-to-istanbul: 9.1.0 + vitest: 0.34.6(jsdom@22.1.0) + transitivePeerDependencies: + - supports-color + dev: true + + /@vitest/expect@0.34.6: + resolution: {integrity: sha512-QUzKpUQRc1qC7qdGo7rMK3AkETI7w18gTCUrsNnyjjJKYiuUB9+TQK3QnR1unhCnWRC0AbKv2omLGQDF/mIjOw==} + dependencies: + '@vitest/spy': 0.34.6 + '@vitest/utils': 0.34.6 + chai: 4.3.10 + dev: true + + /@vitest/runner@0.34.6: + resolution: {integrity: sha512-1CUQgtJSLF47NnhN+F9X2ycxUP0kLHQ/JWvNHbeBfwW8CzEGgeskzNnHDyv1ieKTltuR6sdIHV+nmR6kPxQqzQ==} + dependencies: + '@vitest/utils': 0.34.6 + p-limit: 4.0.0 + pathe: 1.1.1 + dev: true + + /@vitest/snapshot@0.34.6: + resolution: {integrity: sha512-B3OZqYn6k4VaN011D+ve+AA4whM4QkcwcrwaKwAbyyvS/NB1hCWjFIBQxAQQSQir9/RtyAAGuq+4RJmbn2dH4w==} + dependencies: + magic-string: 0.30.4 + pathe: 1.1.1 + pretty-format: 29.7.0 + dev: true + + /@vitest/spy@0.34.6: + resolution: {integrity: sha512-xaCvneSaeBw/cz8ySmF7ZwGvL0lBjfvqc1LpQ/vcdHEvpLn3Ff1vAvjw+CoGn0802l++5L/pxb7whwcWAw+DUQ==} + dependencies: + tinyspy: 2.2.0 + dev: true + + /@vitest/utils@0.34.6: + resolution: {integrity: sha512-IG5aDD8S6zlvloDsnzHw0Ut5xczlF+kv2BOTo+iXfPr54Yhi5qbVOgGB1hZaVq4iJ4C/MZ2J0y15IlsV/ZcI0A==} + dependencies: + diff-sequences: 29.6.3 + loupe: 2.3.6 + pretty-format: 29.7.0 + dev: true + /@webassemblyjs/ast@1.11.6: resolution: {integrity: sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==} dependencies: @@ -2053,13 +2069,6 @@ packages: resolution: {integrity: sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==} dev: true - /acorn-globals@7.0.1: - resolution: {integrity: sha512-umOSDSDrfHbTNPuNpC2NSnnA3LUrqpevPb4T9jRx4MagXNS0rs+gwiTcAvqCRmsD6utzsrzNt+ebm00SNWiC3Q==} - dependencies: - acorn: 8.10.0 - acorn-walk: 8.2.0 - dev: true - /acorn-import-assertions@1.9.0(acorn@8.10.0): resolution: {integrity: sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==} peerDependencies: @@ -2128,23 +2137,11 @@ packages: type-fest: 0.21.3 dev: true - /ansi-escapes@6.2.0: - resolution: {integrity: sha512-kzRaCqXnpzWs+3z5ABPQiVke+iq0KXkHo8xiWV4RPTi5Yli0l97BEQuhXV1s7+aSU/fu1kUuxgS4MsQ0fRuygw==} - engines: {node: '>=14.16'} - dependencies: - type-fest: 3.13.1 - dev: true - /ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} dev: true - /ansi-regex@6.0.1: - resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==} - engines: {node: '>=12'} - dev: true - /ansi-styles@3.2.1: resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} engines: {node: '>=4'} @@ -2296,6 +2293,10 @@ packages: engines: {node: '>=0.10.0'} dev: true + /assertion-error@1.1.0: + resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} + dev: true + /ast-types-flow@0.0.7: resolution: {integrity: sha512-eBvWn1lvIApYMhzQMsu9ciLfkBY499mFZlNqG+/9WR7PVlroQw0vG30cOQQbaKz3sCEc44TAOu2ykzqXSNnwag==} dev: true @@ -2474,13 +2475,6 @@ packages: update-browserslist-db: 1.0.11(browserslist@4.21.10) dev: true - /bs-logger@0.2.6: - resolution: {integrity: sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==} - engines: {node: '>= 6'} - dependencies: - fast-json-stable-stringify: 2.1.0 - dev: true - /bser@2.1.1: resolution: {integrity: sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==} dependencies: @@ -2559,6 +2553,19 @@ packages: resolution: {integrity: sha512-TKiyTVZxJGhsTszLuzb+6vUZSjVOAhClszBr2Ta2k9IwtNBT/4dzmL6aywt0HCgEZlmwJzXJd8yNiob6HgwTRg==} dev: true + /chai@4.3.10: + resolution: {integrity: sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g==} + engines: {node: '>=4'} + dependencies: + assertion-error: 1.1.0 + check-error: 1.0.3 + deep-eql: 4.1.3 + get-func-name: 2.0.2 + loupe: 2.3.6 + pathval: 1.1.1 + type-detect: 4.0.8 + dev: true + /chalk@2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} engines: {node: '>=4'} @@ -2584,19 +2591,15 @@ packages: supports-color: 7.2.0 dev: true - /chalk@5.3.0: - resolution: {integrity: sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==} - engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} - dev: true - /char-regex@1.0.2: resolution: {integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==} engines: {node: '>=10'} dev: true - /char-regex@2.0.1: - resolution: {integrity: sha512-oSvEeo6ZUD7NepqAat3RqoucZ5SeqLJgOvVIwkafu6IP3V0pO38s/ypdVUmDDK6qIIHNlYHJAKX9E7R7HoKElw==} - engines: {node: '>=12.20'} + /check-error@1.0.3: + resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==} + dependencies: + get-func-name: 2.0.2 dev: true /check-more-types@2.24.0: @@ -2762,14 +2765,6 @@ packages: - encoding dev: true - /cross-fetch@4.0.0: - resolution: {integrity: sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==} - dependencies: - node-fetch: 2.7.0 - transitivePeerDependencies: - - encoding - dev: true - /cross-spawn@7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} @@ -2783,19 +2778,11 @@ packages: resolution: {integrity: sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==} dev: true - /cssom@0.3.8: - resolution: {integrity: sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==} - dev: true - - /cssom@0.5.0: - resolution: {integrity: sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==} - dev: true - - /cssstyle@2.3.0: - resolution: {integrity: sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==} - engines: {node: '>=8'} + /cssstyle@3.0.0: + resolution: {integrity: sha512-N4u2ABATi3Qplzf0hWbVCdjenim8F3ojEXpBDF5hBpjzW182MjNGLqfmQ0SkSPeQ+V86ZXgeH8aXj6kayd4jgg==} + engines: {node: '>=14'} dependencies: - cssom: 0.3.8 + rrweb-cssom: 0.6.0 dev: true /csstype@3.1.2: @@ -2806,13 +2793,13 @@ packages: resolution: {integrity: sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==} dev: true - /data-urls@3.0.2: - resolution: {integrity: sha512-Jy/tj3ldjZJo63sVAvg6LHt2mHvl4V6AgRAmNDtLdm7faqtsx+aJG42rsyCo9JCoRVKwPFzKlIPx3DIibwSIaQ==} - engines: {node: '>=12'} + /data-urls@4.0.0: + resolution: {integrity: sha512-/mMTei/JXPqvFqQtfyTowxmJVwr2PVAeCcDxyFf6LhoOu/09TX2OX3kb2wzi4DMXcfj4OItwDOnhl5oziPnT6g==} + engines: {node: '>=14'} dependencies: abab: 2.0.6 whatwg-mimetype: 3.0.0 - whatwg-url: 11.0.0 + whatwg-url: 12.0.1 dev: true /debug@3.2.7: @@ -2869,6 +2856,13 @@ packages: optional: true dev: true + /deep-eql@4.1.3: + resolution: {integrity: sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==} + engines: {node: '>=6'} + dependencies: + type-detect: 4.0.8 + dev: true + /deep-equal@2.2.2: resolution: {integrity: sha512-xjVyBf0w5vH0I42jdAZzOKVldmPgSulmiyPRywoyq7HXC9qdgo17kxJE+rdnif5Tz6+pIrpJI8dCpMNLIGkUiA==} dependencies: @@ -2980,12 +2974,6 @@ packages: engines: {node: '>=0.3.1'} dev: true - /diffable-html@4.1.0: - resolution: {integrity: sha512-++kyNek+YBLH8cLXS+iTj/Hiy2s5qkRJEJ8kgu/WHbFrVY2vz9xPFUT+fii2zGF0m1CaojDlQJjkfrCt7YWM1g==} - dependencies: - htmlparser2: 3.10.1 - dev: true - /dir-glob@3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} @@ -3011,21 +2999,6 @@ packages: resolution: {integrity: sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==} dev: true - /dom-serializer@0.2.2: - resolution: {integrity: sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==} - dependencies: - domelementtype: 2.3.0 - entities: 2.2.0 - dev: true - - /domelementtype@1.3.1: - resolution: {integrity: sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==} - dev: true - - /domelementtype@2.3.0: - resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==} - dev: true - /domexception@4.0.0: resolution: {integrity: sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==} engines: {node: '>=12'} @@ -3033,19 +3006,6 @@ packages: webidl-conversions: 7.0.0 dev: true - /domhandler@2.4.2: - resolution: {integrity: sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==} - dependencies: - domelementtype: 1.3.1 - dev: true - - /domutils@1.7.0: - resolution: {integrity: sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==} - dependencies: - dom-serializer: 0.2.2 - domelementtype: 1.3.1 - dev: true - /duplexer@0.1.2: resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==} dev: true @@ -3084,14 +3044,6 @@ packages: tapable: 2.2.1 dev: true - /entities@1.1.2: - resolution: {integrity: sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==} - dev: true - - /entities@2.2.0: - resolution: {integrity: sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==} - dev: true - /entities@4.5.0: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} engines: {node: '>=0.12'} @@ -3294,18 +3246,6 @@ packages: engines: {node: '>=12'} dev: true - /escodegen@2.1.0: - resolution: {integrity: sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==} - engines: {node: '>=6.0'} - hasBin: true - dependencies: - esprima: 4.0.1 - estraverse: 5.3.0 - esutils: 2.0.3 - optionalDependencies: - source-map: 0.6.1 - dev: true - /eslint-config-airbnb-base@15.0.0(eslint-plugin-import@2.28.1)(eslint@8.49.0): resolution: {integrity: sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==} engines: {node: ^10.12.0 || >=12.0.0} @@ -4000,6 +3940,10 @@ packages: engines: {node: 6.* || 8.* || >= 10.*} dev: true + /get-func-name@2.0.2: + resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} + dev: true + /get-intrinsic@1.2.1: resolution: {integrity: sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==} dependencies: @@ -4212,17 +4156,6 @@ packages: resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} dev: true - /htmlparser2@3.10.1: - resolution: {integrity: sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==} - dependencies: - domelementtype: 1.3.1 - domhandler: 2.4.2 - domutils: 1.7.0 - entities: 1.1.2 - inherits: 2.0.4 - readable-stream: 3.6.2 - dev: true - /http-proxy-agent@5.0.0: resolution: {integrity: sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==} engines: {node: '>= 6'} @@ -4797,16 +4730,6 @@ packages: - supports-color dev: true - /jest-diff@29.6.4: - resolution: {integrity: sha512-9F48UxR9e4XOEZvoUXEHSWY4qC4zERJaOfrbBg9JpbJOO43R1vN76REt/aMGZoY6GD5g84nnJiBIVlscegefpw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - chalk: 4.1.2 - diff-sequences: 29.6.3 - jest-get-type: 29.6.3 - pretty-format: 29.6.3 - dev: true - /jest-diff@29.7.0: resolution: {integrity: sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -4835,29 +4758,6 @@ packages: pretty-format: 29.7.0 dev: true - /jest-environment-jsdom@29.7.0: - resolution: {integrity: sha512-k9iQbsf9OyOfdzWH8HDmrRT0gSIcX+FLNW7IQq94tFX0gynPwqDTW0Ho6iMVNjGz/nb+l/vW3dWM2bbLLpkbXA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - peerDependencies: - canvas: ^2.5.0 - peerDependenciesMeta: - canvas: - optional: true - dependencies: - '@jest/environment': 29.7.0 - '@jest/fake-timers': 29.7.0 - '@jest/types': 29.6.3 - '@types/jsdom': 20.0.1 - '@types/node': 20.8.2 - jest-mock: 29.7.0 - jest-util: 29.7.0 - jsdom: 20.0.3 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - dev: true - /jest-environment-node@29.7.0: resolution: {integrity: sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -4870,8 +4770,8 @@ packages: jest-util: 29.7.0 dev: true - /jest-extended@4.0.1(jest@29.7.0): - resolution: {integrity: sha512-KM6dwuBUAgy6QONuR19CGubZB9Hkjqvl/d5Yc/FXsdB8+gsGxB2VQ+NEdOrr95J4GMPeLnDoPOKyi6+mKCCnZQ==} + /jest-extended@4.0.2(jest@29.7.0): + resolution: {integrity: sha512-FH7aaPgtGYHc9mRjriS0ZEHYM5/W69tLrFTIdzm+yJgeoCmmrSB/luSfMSqWP9O29QWHPEmJ4qmU6EwsZideog==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: jest: '>=27.2.5' @@ -4880,19 +4780,10 @@ packages: optional: true dependencies: jest: 29.7.0(@types/node@20.8.2)(ts-node@10.9.1) - jest-diff: 29.6.4 + jest-diff: 29.7.0 jest-get-type: 29.6.3 dev: true - /jest-fetch-mock@3.0.3: - resolution: {integrity: sha512-Ux1nWprtLrdrH4XwE7O7InRY6psIi3GOsqNESJgMJ+M5cv4A8Lh7SN9d2V2kKRZ8ebAfcd1LNyZguAOb6JiDqw==} - dependencies: - cross-fetch: 3.1.8 - promise-polyfill: 8.3.0 - transitivePeerDependencies: - - encoding - dev: true - /jest-get-type@29.6.3: resolution: {integrity: sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -5060,12 +4951,6 @@ packages: - supports-color dev: true - /jest-serializer-html@7.1.0: - resolution: {integrity: sha512-xYL2qC7kmoYHJo8MYqJkzrl/Fdlx+fat4U1AqYg+kafqwcKPiMkOcjWHPKhueuNEgr+uemhGc+jqXYiwCyRyLA==} - dependencies: - diffable-html: 4.1.0 - dev: true - /jest-snapshot@29.7.0: resolution: {integrity: sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -5094,18 +4979,6 @@ packages: - supports-color dev: true - /jest-util@29.6.3: - resolution: {integrity: sha512-QUjna/xSy4B32fzcKTSz1w7YYzgiHrjjJjevdRf61HYk998R5vVMMNmrHESYZVDS5DSWs+1srPLPKxXPkeSDOA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/types': 29.6.3 - '@types/node': 20.8.2 - chalk: 4.1.2 - ci-info: 3.8.0 - graceful-fs: 4.2.11 - picomatch: 2.3.1 - dev: true - /jest-util@29.7.0: resolution: {integrity: sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -5130,36 +5003,6 @@ packages: pretty-format: 29.7.0 dev: true - /jest-watch-typeahead@2.2.2(jest@29.7.0): - resolution: {integrity: sha512-+QgOFW4o5Xlgd6jGS5X37i08tuuXNW8X0CV9WNFi+3n8ExCIP+E1melYhvYLjv5fE6D0yyzk74vsSO8I6GqtvQ==} - engines: {node: ^14.17.0 || ^16.10.0 || >=18.0.0} - peerDependencies: - jest: ^27.0.0 || ^28.0.0 || ^29.0.0 - dependencies: - ansi-escapes: 6.2.0 - chalk: 5.3.0 - jest: 29.7.0(@types/node@20.8.2)(ts-node@10.9.1) - jest-regex-util: 29.6.3 - jest-watcher: 29.6.4 - slash: 5.1.0 - string-length: 5.0.1 - strip-ansi: 7.1.0 - dev: true - - /jest-watcher@29.6.4: - resolution: {integrity: sha512-oqUWvx6+On04ShsT00Ir9T4/FvBeEh2M9PTubgITPxDa739p4hoQweWPRGyYeaojgT0xTpZKF0Y/rSY1UgMxvQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/test-result': 29.6.4 - '@jest/types': 29.6.3 - '@types/node': 20.8.2 - ansi-escapes: 4.3.2 - chalk: 4.1.2 - emittery: 0.13.1 - jest-util: 29.6.3 - string-length: 4.0.2 - dev: true - /jest-watcher@29.7.0: resolution: {integrity: sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -5247,9 +5090,9 @@ packages: argparse: 2.0.1 dev: true - /jsdom@20.0.3: - resolution: {integrity: sha512-SYhBvTh89tTfCD/CRdSOm13mOBa42iTaTyfyEWBdKcGdPxPtLFBXuHR8XHb33YNYaP+lLbmSvBTsnoesCNJEsQ==} - engines: {node: '>=14'} + /jsdom@22.1.0: + resolution: {integrity: sha512-/9AVW7xNbsBv6GfWho4TTNjEo9fe6Zhf9O7s0Fhhr3u+awPwAJMKwAMXnkk5vBxflqLW9hTHX/0cs+P3gW+cQw==} + engines: {node: '>=16'} peerDependencies: canvas: ^2.5.0 peerDependenciesMeta: @@ -5257,14 +5100,10 @@ packages: optional: true dependencies: abab: 2.0.6 - acorn: 8.10.0 - acorn-globals: 7.0.1 - cssom: 0.5.0 - cssstyle: 2.3.0 - data-urls: 3.0.2 + cssstyle: 3.0.0 + data-urls: 4.0.0 decimal.js: 10.4.3 domexception: 4.0.0 - escodegen: 2.1.0 form-data: 4.0.0 html-encoding-sniffer: 3.0.0 http-proxy-agent: 5.0.0 @@ -5272,6 +5111,7 @@ packages: is-potential-custom-element-name: 1.0.1 nwsapi: 2.2.7 parse5: 7.1.2 + rrweb-cssom: 0.6.0 saxes: 6.0.0 symbol-tree: 3.2.4 tough-cookie: 4.1.3 @@ -5279,8 +5119,8 @@ packages: webidl-conversions: 7.0.0 whatwg-encoding: 2.0.0 whatwg-mimetype: 3.0.0 - whatwg-url: 11.0.0 - ws: 8.13.0 + whatwg-url: 12.0.1 + ws: 8.14.2 xml-name-validator: 4.0.0 transitivePeerDependencies: - bufferutil @@ -5335,6 +5175,10 @@ packages: hasBin: true dev: true + /jsonc-parser@3.2.0: + resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} + dev: true + /jsx-ast-utils@3.3.5: resolution: {integrity: sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==} engines: {node: '>=4.0'} @@ -5411,6 +5255,11 @@ packages: engines: {node: '>=6.11.5'} dev: true + /local-pkg@0.4.3: + resolution: {integrity: sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==} + engines: {node: '>=14'} + dev: true + /locate-path@5.0.0: resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} engines: {node: '>=8'} @@ -5425,10 +5274,6 @@ packages: p-locate: 5.0.0 dev: true - /lodash.memoize@4.1.2: - resolution: {integrity: sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==} - dev: true - /lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} dev: true @@ -5447,6 +5292,12 @@ packages: dependencies: js-tokens: 4.0.0 + /loupe@2.3.6: + resolution: {integrity: sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==} + dependencies: + get-func-name: 2.0.2 + dev: true + /lru-cache@10.0.1: resolution: {integrity: sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==} engines: {node: 14 || >=16.14} @@ -5470,6 +5321,13 @@ packages: hasBin: true dev: true + /magic-string@0.30.4: + resolution: {integrity: sha512-Q/TKtsC5BPm0kGqgBIF9oXAs/xEf2vRKiIB4wCRQTJOQIByZ1d+NnUOotvJOvNpi5RNIgVOMC3pOuaP1ZTDlVg==} + engines: {node: '>=12'} + dependencies: + '@jridgewell/sourcemap-codec': 1.4.15 + dev: true + /make-dir@4.0.0: resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} engines: {node: '>=10'} @@ -5599,6 +5457,15 @@ packages: minimist: 1.2.8 dev: true + /mlly@1.4.2: + resolution: {integrity: sha512-i/Ykufi2t1EZ6NaPLdfnZk2AX8cs0d+mTzVKuPfqPKPatxLApaBoxJQ9x1/uckXtrS/U5oisPMDkNs0yQTaBRg==} + dependencies: + acorn: 8.10.0 + pathe: 1.1.1 + pkg-types: 1.0.3 + ufo: 1.3.1 + dev: true + /ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} dev: true @@ -5847,6 +5714,13 @@ packages: yocto-queue: 0.1.0 dev: true + /p-limit@4.0.0: + resolution: {integrity: sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dependencies: + yocto-queue: 1.0.0 + dev: true + /p-locate@4.1.0: resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} engines: {node: '>=8'} @@ -5936,6 +5810,14 @@ packages: engines: {node: '>=8'} dev: true + /pathe@1.1.1: + resolution: {integrity: sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q==} + dev: true + + /pathval@1.1.1: + resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} + dev: true + /pause-stream@0.0.11: resolution: {integrity: sha512-e3FBlXLmN/D1S+zHzanP4E/4Z60oFAa3O051qt1pxa7DEJWKAyil6upYVXCWadEnuoqa4Pkc9oUx9zsxYeRv8A==} dependencies: @@ -5963,6 +5845,14 @@ packages: find-up: 4.1.0 dev: true + /pkg-types@1.0.3: + resolution: {integrity: sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==} + dependencies: + jsonc-parser: 3.2.0 + mlly: 1.4.2 + pathe: 1.1.1 + dev: true + /pluralize@8.0.0: resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} engines: {node: '>=4'} @@ -5996,6 +5886,15 @@ packages: yaml: 2.3.1 dev: true + /postcss@8.4.31: + resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==} + engines: {node: ^10 || ^12 || >=14} + dependencies: + nanoid: 3.3.6 + picocolors: 1.0.0 + source-map-js: 1.0.2 + dev: true + /prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} @@ -6023,15 +5922,6 @@ packages: react-is: 17.0.2 dev: true - /pretty-format@29.6.3: - resolution: {integrity: sha512-ZsBgjVhFAj5KeK+nHfF1305/By3lechHQSMWCTl8iHSbfOm2TN5nHEtFc/+W7fAyUeCs2n5iow72gld4gW0xDw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dependencies: - '@jest/schemas': 29.6.3 - ansi-styles: 5.2.0 - react-is: 18.2.0 - dev: true - /pretty-format@29.7.0: resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -6041,10 +5931,6 @@ packages: react-is: 18.2.0 dev: true - /promise-polyfill@8.3.0: - resolution: {integrity: sha512-H5oELycFml5yto/atYqmjyigJoAo3+OXwolYiH7OfQuYlAqhxNvTfiNMbV9hsC6Yp83yE5r2KTVmtrG6R9i6Pg==} - dev: true - /prompts@2.4.2: resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} engines: {node: '>= 6'} @@ -6192,15 +6078,6 @@ packages: type-fest: 4.2.0 dev: true - /readable-stream@3.6.2: - resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} - engines: {node: '>= 6'} - dependencies: - inherits: 2.0.4 - string_decoder: 1.3.0 - util-deprecate: 1.0.2 - dev: true - /readdirp@3.6.0: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} @@ -6347,6 +6224,10 @@ packages: fsevents: 2.3.3 dev: true + /rrweb-cssom@0.6.0: + resolution: {integrity: sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==} + dev: true + /run-applescript@5.0.0: resolution: {integrity: sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==} engines: {node: '>=12'} @@ -6466,6 +6347,10 @@ packages: object-inspect: 1.12.3 dev: true + /siginfo@2.0.0: + resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} + dev: true + /signal-exit@3.0.7: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} dev: true @@ -6497,9 +6382,9 @@ packages: engines: {node: '>=12'} dev: true - /slash@5.1.0: - resolution: {integrity: sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==} - engines: {node: '>=14.16'} + /source-map-js@1.0.2: + resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} + engines: {node: '>=0.10.0'} dev: true /source-map-support@0.5.13: @@ -6567,6 +6452,10 @@ packages: escape-string-regexp: 2.0.0 dev: true + /stackback@0.0.2: + resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} + dev: true + /start-server-and-test@2.0.1: resolution: {integrity: sha512-8PFo4DLLLCDMuS51/BEEtE1m9CAXw1LNVtZSS1PzkYQh6Qf9JUwM4huYeSoUumaaoAyuwYBwCa9OsrcpMqcOdQ==} engines: {node: '>=16'} @@ -6584,6 +6473,10 @@ packages: - supports-color dev: true + /std-env@3.4.3: + resolution: {integrity: sha512-f9aPhy8fYBuMN+sNfakZV18U39PbalgjXG3lLB9WkaYTxijru61wb57V9wxxNthXM5Sd88ETBWi29qLAsHO52Q==} + dev: true + /stop-iteration-iterator@1.0.0: resolution: {integrity: sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==} engines: {node: '>= 0.4'} @@ -6605,14 +6498,6 @@ packages: strip-ansi: 6.0.1 dev: true - /string-length@5.0.1: - resolution: {integrity: sha512-9Ep08KAMUn0OadnVaBuRdE2l615CQ508kr0XMadjClfYpdCyvrbFp6Taebo8yyxokQ4viUd/xPPUA4FGgUa0ow==} - engines: {node: '>=12.20'} - dependencies: - char-regex: 2.0.1 - strip-ansi: 7.1.0 - dev: true - /string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} @@ -6660,12 +6545,6 @@ packages: es-abstract: 1.22.1 dev: true - /string_decoder@1.3.0: - resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} - dependencies: - safe-buffer: 5.2.1 - dev: true - /strip-ansi@6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} @@ -6673,13 +6552,6 @@ packages: ansi-regex: 5.0.1 dev: true - /strip-ansi@7.1.0: - resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} - engines: {node: '>=12'} - dependencies: - ansi-regex: 6.0.1 - dev: true - /strip-bom@3.0.0: resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} engines: {node: '>=4'} @@ -6719,6 +6591,12 @@ packages: engines: {node: '>=8'} dev: true + /strip-literal@1.3.0: + resolution: {integrity: sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg==} + dependencies: + acorn: 8.10.0 + dev: true + /sucrase@3.34.0: resolution: {integrity: sha512-70/LQEZ07TEcxiU2dz51FKaE6hCTWC6vr7FOk3Gr0U60C3shtAN+H+BFr9XlYe5xqf3RA8nrc+VIwzCfnxuXJw==} engines: {node: '>=8'} @@ -6847,6 +6725,20 @@ packages: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} dev: true + /tinybench@2.5.1: + resolution: {integrity: sha512-65NKvSuAVDP/n4CqH+a9w2kTlLReS9vhsAP06MWx+/89nMinJyB2icyl58RIcqCmIggpojIGeuJGhjU1aGMBSg==} + dev: true + + /tinypool@0.7.0: + resolution: {integrity: sha512-zSYNUlYSMhJ6Zdou4cJwo/p7w5nmAH17GRfU/ui3ctvjXFErXXkruT4MWW6poDeXgCaIBlGLrfU6TbTXxyGMww==} + engines: {node: '>=14.0.0'} + dev: true + + /tinyspy@2.2.0: + resolution: {integrity: sha512-d2eda04AN/cPOR89F7Xv5bK/jrQEhmcLFe6HFldoeO9AJtps+fqEnh486vnT/8y4bw38pSyxDcTCAq+Ks2aJTg==} + engines: {node: '>=14.0.0'} + dev: true + /titleize@3.0.0: resolution: {integrity: sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==} engines: {node: '>=12'} @@ -6888,9 +6780,9 @@ packages: punycode: 2.3.0 dev: true - /tr46@3.0.0: - resolution: {integrity: sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==} - engines: {node: '>=12'} + /tr46@4.1.1: + resolution: {integrity: sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==} + engines: {node: '>=14'} dependencies: punycode: 2.3.0 dev: true @@ -6918,41 +6810,6 @@ packages: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} dev: true - /ts-jest@29.1.1(@babel/core@7.22.11)(esbuild@0.18.20)(jest@29.7.0)(typescript@5.2.2): - resolution: {integrity: sha512-D6xjnnbP17cC85nliwGiL+tpoKN0StpgE0TeOjXQTU6MVCfsB4v7aW05CgQ/1OywGb0x/oy9hHFnN+sczTiRaA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - hasBin: true - peerDependencies: - '@babel/core': '>=7.0.0-beta.0 <8' - '@jest/types': ^29.0.0 - babel-jest: ^29.0.0 - esbuild: '*' - jest: ^29.0.0 - typescript: '>=4.3 <6' - peerDependenciesMeta: - '@babel/core': - optional: true - '@jest/types': - optional: true - babel-jest: - optional: true - esbuild: - optional: true - dependencies: - '@babel/core': 7.22.11 - bs-logger: 0.2.6 - esbuild: 0.18.20 - fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@20.8.2)(ts-node@10.9.1) - jest-util: 29.6.3 - json5: 2.2.3 - lodash.memoize: 4.1.2 - make-error: 1.3.6 - semver: 7.5.4 - typescript: 5.2.2 - yargs-parser: 21.1.1 - dev: true - /ts-node@10.9.1(@types/node@20.8.2)(typescript@5.2.2): resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true @@ -7138,6 +6995,10 @@ packages: hasBin: true dev: true + /ufo@1.3.1: + resolution: {integrity: sha512-uY/99gMLIOlJPwATcMVYfqDSxUR9//AUcgZMzwfSTJPDKzA1S8mX4VLqa+fiAtveraQUBCz4FFcwVZBGbwBXIw==} + dev: true + /unbox-primitive@1.0.2: resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} dependencies: @@ -7192,10 +7053,6 @@ packages: requires-port: 1.0.0 dev: true - /util-deprecate@1.0.2: - resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} - dev: true - /v8-compile-cache-lib@3.0.1: resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} dev: true @@ -7216,6 +7073,142 @@ packages: spdx-expression-parse: 3.0.1 dev: true + /vite-node@0.34.6(@types/node@20.8.2): + resolution: {integrity: sha512-nlBMJ9x6n7/Amaz6F3zJ97EBwR2FkzhBRxF5e+jE6LA3yi6Wtc2lyTij1OnDMIr34v5g/tVQtsVAzhT0jc5ygA==} + engines: {node: '>=v14.18.0'} + hasBin: true + dependencies: + cac: 6.7.14 + debug: 4.3.4 + mlly: 1.4.2 + pathe: 1.1.1 + picocolors: 1.0.0 + vite: 4.4.10(@types/node@20.8.2) + transitivePeerDependencies: + - '@types/node' + - less + - lightningcss + - sass + - stylus + - sugarss + - supports-color + - terser + dev: true + + /vite@4.4.10(@types/node@20.8.2): + resolution: {integrity: sha512-TzIjiqx9BEXF8yzYdF2NTf1kFFbjMjUSV0LFZ3HyHoI3SGSPLnnFUKiIQtL3gl2AjHvMrprOvQ3amzaHgQlAxw==} + engines: {node: ^14.18.0 || >=16.0.0} + hasBin: true + peerDependencies: + '@types/node': '>= 14' + less: '*' + lightningcss: ^1.21.0 + sass: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + dependencies: + '@types/node': 20.8.2 + esbuild: 0.18.20 + postcss: 8.4.31 + rollup: 3.28.1 + optionalDependencies: + fsevents: 2.3.3 + dev: true + + /vitest-fetch-mock@0.2.2(vitest@0.34.6): + resolution: {integrity: sha512-XmH6QgTSjCWrqXoPREIdbj40T7i1xnGmAsTAgfckoO75W1IEHKR8hcPCQ7SO16RsdW1t85oUm6pcQRLeBgjVYQ==} + engines: {node: '>=14.14.0'} + peerDependencies: + vitest: '>=0.16.0' + dependencies: + cross-fetch: 3.1.8 + vitest: 0.34.6(jsdom@22.1.0) + transitivePeerDependencies: + - encoding + dev: true + + /vitest@0.34.6(jsdom@22.1.0): + resolution: {integrity: sha512-+5CALsOvbNKnS+ZHMXtuUC7nL8/7F1F2DnHGjSsszX8zCjWSSviphCb/NuS9Nzf4Q03KyyDRBAXhF/8lffME4Q==} + engines: {node: '>=v14.18.0'} + hasBin: true + 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 + dependencies: + '@types/chai': 4.3.6 + '@types/chai-subset': 1.3.3 + '@types/node': 20.8.2 + '@vitest/expect': 0.34.6 + '@vitest/runner': 0.34.6 + '@vitest/snapshot': 0.34.6 + '@vitest/spy': 0.34.6 + '@vitest/utils': 0.34.6 + acorn: 8.10.0 + acorn-walk: 8.2.0 + cac: 6.7.14 + chai: 4.3.10 + debug: 4.3.4 + jsdom: 22.1.0 + local-pkg: 0.4.3 + magic-string: 0.30.4 + pathe: 1.1.1 + picocolors: 1.0.0 + std-env: 3.4.3 + strip-literal: 1.3.0 + tinybench: 2.5.1 + tinypool: 0.7.0 + vite: 4.4.10(@types/node@20.8.2) + vite-node: 0.34.6(@types/node@20.8.2) + why-is-node-running: 2.2.2 + transitivePeerDependencies: + - less + - lightningcss + - sass + - stylus + - sugarss + - supports-color + - terser + dev: true + /w3c-xmlserializer@4.0.0: resolution: {integrity: sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==} engines: {node: '>=14'} @@ -7321,11 +7314,11 @@ packages: engines: {node: '>=12'} dev: true - /whatwg-url@11.0.0: - resolution: {integrity: sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==} - engines: {node: '>=12'} + /whatwg-url@12.0.1: + resolution: {integrity: sha512-Ed/LrqB8EPlGxjS+TrsXcpUond1mhccS3pchLhzSgPCnTimUCKj3IZE75pAs5m6heB2U2TMerKFUXheyHY+VDQ==} + engines: {node: '>=14'} dependencies: - tr46: 3.0.0 + tr46: 4.1.1 webidl-conversions: 7.0.0 dev: true @@ -7400,6 +7393,15 @@ packages: isexe: 2.0.0 dev: true + /why-is-node-running@2.2.2: + resolution: {integrity: sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==} + engines: {node: '>=8'} + hasBin: true + dependencies: + siginfo: 2.0.0 + stackback: 0.0.2 + dev: true + /wrap-ansi@7.0.0: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'} @@ -7421,8 +7423,8 @@ packages: signal-exit: 3.0.7 dev: true - /ws@8.13.0: - resolution: {integrity: sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==} + /ws@8.14.2: + resolution: {integrity: sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==} engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 @@ -7506,3 +7508,8 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} dev: true + + /yocto-queue@1.0.0: + resolution: {integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==} + engines: {node: '>=12.20'} + dev: true diff --git a/sonar-project.properties b/sonar-project.properties index 485baf9..d990187 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -3,4 +3,4 @@ sonar.organization=gilbarbara-github sonar.source=./src sonar.javascript.lcov.reportPaths=./coverage/lcov.info sonar.exclusions=**/demo/**/*.*,**/test/**/*.* -sonar.coverage.exclusions=**/test/**/*.*,**/jest.config.ts +sonar.coverage.exclusions=**/test/**/*.*,**/vitest.config.ts diff --git a/src/cache.ts b/src/cache.ts index 1b88263..6295c1c 100644 --- a/src/cache.ts +++ b/src/cache.ts @@ -16,16 +16,24 @@ export default class CacheStore { if (canUseDOM()) { cacheName = window.REACT_INLINESVG_CACHE_NAME ?? CACHE_NAME; - usePersistentCache = !!window.REACT_INLINESVG_PERSISTENT_CACHE; + usePersistentCache = !!window.REACT_INLINESVG_PERSISTENT_CACHE && 'caches' in window; } if (usePersistentCache) { - caches.open(cacheName).then(cache => { - this.cacheApi = cache; - this.isReady = true; - - this.subscribers.forEach(callback => callback()); - }); + caches + .open(cacheName) + .then(cache => { + this.cacheApi = cache; + this.isReady = true; + + this.subscribers.forEach(callback => callback()); + }) + .catch(error => { + this.isReady = true; + + // eslint-disable-next-line no-console + console.error(`Failed to open cache: ${error.message}`); + }); } else { this.isReady = true; } diff --git a/src/helpers.ts b/src/helpers.ts index 8b273d9..44cebea 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -31,7 +31,7 @@ export function sleep(seconds = 1) { } export function supportsInlineSVG(): boolean { - /* istanbul ignore next */ + /* c8 ignore next 3 */ if (!document) { return false; } @@ -72,7 +72,6 @@ export function omit( const output: any = {}; for (const key in input) { - /* istanbul ignore else */ if ({}.hasOwnProperty.call(input, key)) { if (!filter.includes(key as unknown as K)) { output[key] = input[key]; diff --git a/src/index.tsx b/src/index.tsx index 384e68e..7ae1075 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -43,14 +43,11 @@ class ReactInlineSVG extends React.PureComponent { const { src } = this.props; try { - /* istanbul ignore else */ if (status === STATUS.IDLE) { - /* istanbul ignore else */ if (!isSupportedEnvironment()) { throw new Error('Browser does not support SVG'); } - /* istanbul ignore else */ if (!src) { throw new Error('Missing src'); } @@ -73,7 +70,6 @@ class ReactInlineSVG extends React.PureComponent { const { description, onLoad, src, title } = this.props; if (previousState.status !== STATUS.READY && status === STATUS.READY) { - /* istanbul ignore else */ if (onLoad) { onLoad(src, isCached); } @@ -176,10 +172,8 @@ class ReactInlineSVG extends React.PureComponent { const status = error.message === 'Browser does not support SVG' ? STATUS.UNSUPPORTED : STATUS.FAILED; - /* istanbul ignore else */ if (this.isActive) { this.setState({ status }, () => { - /* istanbul ignore else */ if (typeof onError === 'function') { onError(error); } @@ -188,7 +182,6 @@ class ReactInlineSVG extends React.PureComponent { }; private handleLoad = (content: string, hasCache = false) => { - /* istanbul ignore else */ if (this.isActive) { this.setState( { @@ -202,7 +195,6 @@ class ReactInlineSVG extends React.PureComponent { }; private load() { - /* istanbul ignore else */ if (this.isActive) { this.setState( { diff --git a/test/__setup__/global.d.ts b/test/__setup__/global.d.ts new file mode 100644 index 0000000..deea799 --- /dev/null +++ b/test/__setup__/global.d.ts @@ -0,0 +1,2 @@ +import 'jest-extended'; +import 'vitest/globals'; diff --git a/test/__setup__/setupFiles.ts b/test/__setup__/setupFiles.ts deleted file mode 100644 index fe0196a..0000000 --- a/test/__setup__/setupFiles.ts +++ /dev/null @@ -1 +0,0 @@ -import 'cross-fetch/polyfill'; diff --git a/test/__setup__/setupFilesAfterEnv.ts b/test/__setup__/vitest.setup.ts similarity index 100% rename from test/__setup__/setupFilesAfterEnv.ts rename to test/__setup__/vitest.setup.ts diff --git a/test/__snapshots__/index.spec.tsx.snap b/test/__snapshots__/index.spec.tsx.snap index f88968e..f950149 100644 --- a/test/__snapshots__/index.spec.tsx.snap +++ b/test/__snapshots__/index.spec.tsx.snap @@ -1,6 +1,6 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`react-inlinesvg basic functionality should handle custom props 1`] = ` +exports[`react-inlinesvg > basic functionality > should handle custom props 1`] = ` `; -exports[`react-inlinesvg basic functionality should handle empty src changes 1`] = `null`; +exports[`react-inlinesvg > basic functionality > should handle empty src changes 1`] = `null`; -exports[`react-inlinesvg basic functionality should handle empty src changes 2`] = ` +exports[`react-inlinesvg > basic functionality > should handle empty src changes 2`] = ` `; -exports[`react-inlinesvg basic functionality should handle innerRef 1`] = ` +exports[`react-inlinesvg > basic functionality > should handle innerRef 1`] = ` `; -exports[`react-inlinesvg basic functionality should handle innerRef 2`] = ` +exports[`react-inlinesvg > basic functionality > should handle innerRef 2`] = ` `; -exports[`react-inlinesvg basic functionality should handle src changes to empty 1`] = ` +exports[`react-inlinesvg > basic functionality > should handle src changes to empty 1`] = ` `; -exports[`react-inlinesvg basic functionality should not uniquify non-id hrefs 1`] = ` +exports[`react-inlinesvg > basic functionality > should not uniquify non-id hrefs 1`] = ` `; -exports[`react-inlinesvg basic functionality should prefix the ids with the baseURL 1`] = ` +exports[`react-inlinesvg > basic functionality > should prefix the ids with the baseURL 1`] = ` `; -exports[`react-inlinesvg basic functionality should remove the title 1`] = ` +exports[`react-inlinesvg > basic functionality > should remove the title 1`] = ` `; -exports[`react-inlinesvg basic functionality should render a base64 src 1`] = ` +exports[`react-inlinesvg > basic functionality > should render a base64 src 1`] = ` `; -exports[`react-inlinesvg basic functionality should render a loader 1`] = ` +exports[`react-inlinesvg > basic functionality > should render a loader 1`] = `
`; -exports[`react-inlinesvg basic functionality should render a loader 2`] = ` +exports[`react-inlinesvg > basic functionality > should render a loader 2`] = ` `; -exports[`react-inlinesvg basic functionality should render a svg string src 1`] = ` +exports[`react-inlinesvg > basic functionality > should render a svg string src 1`] = ` `; -exports[`react-inlinesvg basic functionality should render a svg url with external css, style and script 1`] = ` +exports[`react-inlinesvg > basic functionality > should render a svg url with external css, style and script 1`] = ` `; -exports[`react-inlinesvg basic functionality should render a svg url with inline styles 1`] = ` +exports[`react-inlinesvg > basic functionality > should render a svg url with inline styles 1`] = ` `; -exports[`react-inlinesvg basic functionality should render a svg url with mask, gradient and classes 1`] = ` +exports[`react-inlinesvg > basic functionality > should render a svg url with mask, gradient and classes 1`] = ` `; -exports[`react-inlinesvg basic functionality should render a svg url with symbols 1`] = ` +exports[`react-inlinesvg > basic functionality > should render a svg url with symbols 1`] = ` `; -exports[`react-inlinesvg basic functionality should render a svg url with utf-8 characters 1`] = ` +exports[`react-inlinesvg > basic functionality > should render a svg url with utf-8 characters 1`] = ` `; -exports[`react-inlinesvg basic functionality should render an svg url and add title and description 1`] = ` +exports[`react-inlinesvg > basic functionality > should render an svg url and add title and description 1`] = ` `; -exports[`react-inlinesvg basic functionality should render an svg url and replace existing title and description 1`] = ` +exports[`react-inlinesvg > basic functionality > should render an svg url and replace existing title and description 1`] = ` `; -exports[`react-inlinesvg basic functionality should render an urlEncoded src 1`] = ` +exports[`react-inlinesvg > basic functionality > should render an urlEncoded src 1`] = ` `; -exports[`react-inlinesvg basic functionality should render an urlEncodedWithBase64 src 1`] = ` +exports[`react-inlinesvg > basic functionality > should render an urlEncodedWithBase64 src 1`] = ` `; -exports[`react-inlinesvg basic functionality should transform the SVG text with the preProcessor prop 1`] = ` +exports[`react-inlinesvg > basic functionality > should transform the SVG text with the preProcessor prop 1`] = ` `; -exports[`react-inlinesvg basic functionality should uniquify ids with a custom uniqueHash 1`] = ` +exports[`react-inlinesvg > basic functionality > should uniquify ids with a custom uniqueHash 1`] = ` `; -exports[`react-inlinesvg integration should handle pre-cached entries in the cacheStore 1`] = ` +exports[`react-inlinesvg > integration > should handle pre-cached entries in the cacheStore 1`] = ` `; -exports[`react-inlinesvg integration should handle race condition with fast src changes: cacheStore 1`] = ` +exports[`react-inlinesvg > integration > should handle race condition with fast src changes > cacheStore 1`] = ` [ "http://127.0.0.1:1337/react.svg", "https://cdn.svgporn.com/logos/javascript.svg", ] `; -exports[`react-inlinesvg integration should handle race condition with fast src changes: svg 1`] = ` +exports[`react-inlinesvg > integration > should handle race condition with fast src changes > svg 1`] = ` React @@ -2443,7 +2443,7 @@ exports[`react-inlinesvg integration should handle race condition with fast src `; -exports[`react-inlinesvg integration should render multiple SVGs 1`] = ` +exports[`react-inlinesvg > integration > should render multiple SVGs 1`] = `
`; -exports[`react-inlinesvg with errors should trigger an error and render the fallback children if src is not found 1`] = ` +exports[`react-inlinesvg > with errors > should trigger an error and render the fallback children if src is not found 1`] = `
@@ -2601,7 +2601,7 @@ exports[`react-inlinesvg with errors should trigger an error and render the fall
`; -exports[`react-inlinesvg with errors should trigger an error on empty \`src\` prop changes 1`] = ` +exports[`react-inlinesvg > with errors > should trigger an error on empty \`src\` prop changes 1`] = ` should warn the user if fetch is missing 1`] = `null`; -exports[`unsupported environments shouldn't break without DOM 1`] = ` +exports[`unsupported environments > shouldn't break without DOM 1`] = `
`; -exports[`unsupported environments shouldn't not render anything if is an unsupported browser 1`] = `null`; +exports[`unsupported environments > shouldn't not render anything if is an unsupported browser 1`] = `null`; diff --git a/test/cache.spec.ts b/test/cache.spec.ts index 504c14a..0bf7441 100644 --- a/test/cache.spec.ts +++ b/test/cache.spec.ts @@ -1,27 +1,30 @@ import { waitFor } from '@testing-library/react'; import CacheMock from 'browser-cache-mock'; -import fetchMock from 'jest-fetch-mock'; +import createFetchMock from 'vitest-fetch-mock'; import CacheStore from '../src/cache'; import { STATUS } from '../src/config'; +const fetchMock = createFetchMock(vi); + +fetchMock.enableMocks(); + const cacheMock = new CacheMock(); +let cachesOpenPromise = new Promise(resolve => { + setTimeout(() => { + resolve(cacheMock); + }, 500); +}); + Object.defineProperty(window, 'caches', { value: { ...window.caches, - open: async () => - new Promise(resolve => { - setTimeout(() => { - resolve(cacheMock); - }, 500); - }), + open: async () => cachesOpenPromise, ...cacheMock, }, }); -fetchMock.enableMocks(); - const reactUrl = 'https://cdn.svgporn.com/logos/react.svg'; const reactContent = 'React'; const jsUrl = 'https://cdn.svgporn.com/logos/javascript.svg'; @@ -136,7 +139,7 @@ describe('CacheStore (external)', () => { Object.defineProperty(window, 'REACT_INLINESVG_PERSISTENT_CACHE', { value: true, }); - const mockReady = jest.fn(); + const mockReady = vi.fn(); const cacheStore = new CacheStore(); // wait for the cache to be ready @@ -232,4 +235,22 @@ describe('CacheStore (external)', () => { expect(cacheStore.isCached(jsUrl)).toBeFalse(); expect(fetchMock).toHaveBeenCalledTimes(1); }); + + it('should handle caches.open errors', async () => { + const consoleError = vi.spyOn(console, 'error').mockImplementation(() => {}); + + mockReady.mockClear(); + cachesOpenPromise = Promise.reject(new Error('The operation is insecure.')); + + const cacheStoreWithError = new CacheStore(); + + cacheStoreWithError.onReady(mockReady); + + await waitFor(() => { + expect(consoleError).toHaveBeenCalledWith('Failed to open cache: The operation is insecure.'); + }); + expect(mockReady).not.toHaveBeenCalled(); + + consoleError.mockRestore(); + }); }); diff --git a/test/index.spec.tsx b/test/index.spec.tsx index 130b445..f5e4feb 100644 --- a/test/index.spec.tsx +++ b/test/index.spec.tsx @@ -1,10 +1,12 @@ import * as React from 'react'; -import { act, render, waitFor as waitForBase } from '@testing-library/react'; -import fetchMock from 'jest-fetch-mock'; +import { act, render } from '@testing-library/react'; +import createFetchMock from 'vitest-fetch-mock'; import ReactInlineSVG, { cacheStore, Props } from '../src/index'; -jest.useFakeTimers(); +const fetchMock = createFetchMock(vi); + +vi.useFakeTimers(); const fixtures = { circles: 'http://127.0.0.1:1337/circles.svg', @@ -30,19 +32,21 @@ const fixtures = { ' ', } as const; -const mockOnError = jest.fn(); -const mockOnLoad = jest.fn(); +const mockOnError = vi.fn(); +const mockOnLoad = vi.fn(); -async function waitFor(callback: () => void) { - await waitForBase(callback, { - onTimeout: error => { - console.log('waitFor timeout', error); +// async function waitFor(callback: () => void) { +// await waitForBase(callback, { +// onTimeout: error => { +// console.log('waitFor timeout', error); +// +// return error; +// }, +// timeout: 2000, +// }); +// } - return error; - }, - timeout: 2000, - }); -} +const { waitFor } = vi; function Loader() { return
; @@ -56,11 +60,11 @@ function setup({ onLoad, ...rest }: Props) { describe('react-inlinesvg', () => { beforeAll(() => { - jest.spyOn(console, 'error').mockImplementation(); + vi.spyOn(console, 'error').mockImplementation(() => {}); }); afterEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); cacheStore.clear(); }); @@ -73,7 +77,7 @@ describe('react-inlinesvg', () => { }); await waitFor(() => { - expect(mockOnLoad).toHaveBeenCalledTimes(1); + expect(mockOnLoad).toHaveBeenCalled(); }); expect(container.querySelector('svg')).toMatchSnapshot(); @@ -524,7 +528,7 @@ describe('react-inlinesvg', () => { setup({ src: fixtures.react }); await act(async () => { - jest.runAllTimers(); + vi.runAllTimers(); }); await waitFor(() => { @@ -549,7 +553,7 @@ describe('react-inlinesvg', () => { setup({ src: fixtures.react }); await act(async () => { - jest.runAllTimers(); + vi.runAllTimers(); }); await waitFor(() => { @@ -677,9 +681,12 @@ describe('react-inlinesvg', () => {
, ); - await waitFor(() => { - expect(mockOnLoad).toHaveBeenCalledTimes(4); - }); + await waitFor( + () => { + expect(mockOnLoad).toHaveBeenCalledTimes(4); + }, + { timeout: 2000 }, + ); expect(container.querySelectorAll('svg')).toHaveLength(4); expect(container.firstChild).toMatchSnapshot(); diff --git a/test/indexWithPersistentCache.spec.tsx b/test/indexWithPersistentCache.spec.tsx index 4292425..efb111a 100644 --- a/test/indexWithPersistentCache.spec.tsx +++ b/test/indexWithPersistentCache.spec.tsx @@ -2,7 +2,9 @@ import * as React from 'react'; import { render, waitFor } from '@testing-library/react'; import CacheMock from 'browser-cache-mock'; -import fetchMock from 'jest-fetch-mock'; +import createFetchMock from 'vitest-fetch-mock'; + +const fetchMock = createFetchMock(vi); const cacheMock = new CacheMock(); @@ -26,8 +28,8 @@ function Loader() { return
; } -const mockOnError = jest.fn(); -const mockOnLoad = jest.fn(); +const mockOnError = vi.fn(); +const mockOnLoad = vi.fn(); const url = 'https://cdn.svgporn.com/logos/react.svg'; diff --git a/test/unsupported.spec.tsx b/test/unsupported.spec.tsx index 1ecade9..065291d 100644 --- a/test/unsupported.spec.tsx +++ b/test/unsupported.spec.tsx @@ -5,14 +5,14 @@ import InlineSVG, { Props } from '../src'; declare let window: any; -const mockOnError = jest.fn(); -const mockOnLoad = jest.fn(); +const mockOnError = vi.fn(); +const mockOnLoad = vi.fn(); let mockCanUseDOM = false; let mockIsSupportedEnvironment = true; -jest.mock('../src/helpers', () => { - const utils = jest.requireActual('../src/helpers'); +vi.mock('../src/helpers', async () => { + const utils = await vi.importActual any>>('../src/helpers'); return { ...utils, diff --git a/vitest.config.ts b/vitest.config.ts new file mode 100644 index 0000000..280e486 --- /dev/null +++ b/vitest.config.ts @@ -0,0 +1,18 @@ +import { defineConfig } from 'vitest/config'; + +export default defineConfig({ + test: { + coverage: { + all: true, + include: ['src/**/*.ts?(x)'], + statements: 90, + branches: 90, + functions: 90, + lines: 90, + reporter: ['text', 'lcov'], + }, + environment: 'jsdom', + globals: true, + setupFiles: ['./test/__setup__/vitest.setup.ts'], + }, +});