[READ-ONLY] Mirror of https://github.com/danielroe/nuxt-vitest. An vitest environment with support for testing code that needs a Nuxt runtime environment
nuxt nuxt-module testing unit-testing vitest
0

Configure Feed

Select the types of activity you want to include in your feed.

feat!: option to replace `happy-dom` with `jsdom` (#121)

BREAKING CHANGE: you now need to explicitly add `happy-dom` or `jsdom` as a dev dependency based on which `domEnvironment` you want to be in. (`happy-dom` is set by default.)

authored by

Enkot and committed by
GitHub
(Jul 5, 2023, 1:09 PM +0200) f14361fb c1bdb1f7

+359 -103
+3 -3
README.md
··· 18 18 1. First install `nuxt-vitest`: 19 19 20 20 ```bash 21 - pnpm add -D nuxt-vitest vitest 21 + pnpm add -D nuxt-vitest vitest happy-dom 22 22 23 23 # or 24 - yarn add --dev nuxt-vitest vitest 25 - npm i -D nuxt-vitest vitest 24 + yarn add --dev nuxt-vitest vitest happy-dom 25 + npm i -D nuxt-vitest vitest happy-dom 26 26 ``` 27 27 28 28 2. Add `nuxt-vitest` to your `nuxt.config.js`:
+234 -79
pnpm-lock.yaml
··· 64 64 version: 1.2.1 65 65 vitest: 66 66 specifier: 0.30.1 67 - version: 0.30.1(happy-dom@9.10.9) 67 + version: 0.30.1(happy-dom@9.10.9)(jsdom@22.0.0) 68 68 vue: 69 69 specifier: 3.3.4 70 70 version: 3.3.4 ··· 107 107 devDependencies: 108 108 '@nuxt/module-builder': 109 109 specifier: 0.4.0 110 - version: 0.4.0(@nuxt/kit@3.6.1)(nuxi@3.6.1) 110 + version: 0.4.0(@nuxt/kit@3.6.1)(nuxi@3.5.3) 111 111 '@nuxt/schema': 112 112 specifier: latest 113 113 version: 3.6.1(rollup@3.21.8) ··· 135 135 h3: 136 136 specifier: ^1.6.5 137 137 version: 1.6.6 138 - happy-dom: 139 - specifier: ^9.10.9 140 - version: 9.10.9 141 138 magic-string: 142 139 specifier: ^0.30.0 143 140 version: 0.30.0 ··· 149 146 version: 1.5.1 150 147 vitest: 151 148 specifier: ^0.24.5 || ^0.26.0 || ^0.27.0 || ^0.28.0 || ^0.29.0 || ^0.30.0 152 - version: 0.30.1(happy-dom@9.10.9) 149 + version: 0.30.1(happy-dom@9.10.9)(jsdom@22.0.0) 153 150 vue-router: 154 151 specifier: ^4.0.0 155 152 version: 4.2.2(vue@3.3.4) 156 153 devDependencies: 154 + '@types/jsdom': 155 + specifier: ^21.1.1 156 + version: 21.1.1 157 + happy-dom: 158 + specifier: ^9.10.9 159 + version: 9.10.9 160 + jsdom: 161 + specifier: ^22.0.0 162 + version: 22.0.0 157 163 vue: 158 164 specifier: 3.3.4 159 165 version: 3.3.4 ··· 163 169 '@nuxt/devtools': 164 170 specifier: 0.6.6 165 171 version: 0.6.6(nuxt@3.6.1)(rollup@3.21.8)(vite@4.3.9) 172 + happy-dom: 173 + specifier: ^9.10.9 174 + version: 9.10.9 175 + jsdom: 176 + specifier: ^22.0.0 177 + version: 22.0.0 166 178 nuxt: 167 179 specifier: 3.6.1 168 180 version: 3.6.1(@types/node@18.16.3)(eslint@8.44.0)(rollup@3.21.8)(typescript@5.1.6)(vue-tsc@1.8.3) ··· 174 186 version: 5.1.6 175 187 vitest: 176 188 specifier: 0.30.1 177 - version: 0.30.1(happy-dom@9.10.9) 189 + version: 0.30.1(happy-dom@9.10.9)(jsdom@22.0.0) 178 190 vitest-environment-nuxt: 179 191 specifier: workspace:* 180 192 version: link:../packages/vitest-environment-nuxt ··· 220 232 '@babel/helper-compilation-targets': 7.21.4(@babel/core@7.21.4) 221 233 '@babel/helper-module-transforms': 7.21.2 222 234 '@babel/helpers': 7.21.0 223 - '@babel/parser': 7.21.9 235 + '@babel/parser': 7.22.5 224 236 '@babel/template': 7.20.7 225 237 '@babel/traverse': 7.21.4 226 - '@babel/types': 7.21.5 238 + '@babel/types': 7.22.5 227 239 convert-source-map: 1.9.0 228 240 debug: 4.3.4 229 241 gensync: 1.0.0-beta.2 ··· 393 405 chalk: 2.4.2 394 406 js-tokens: 4.0.0 395 407 396 - /@babel/parser@7.21.9: 397 - resolution: {integrity: sha512-q5PNg/Bi1OpGgx5jYlvWZwAorZepEudDMCLtj967aeS7WMont7dUZI46M2XwcIQqvUlMxWfdLFu4S/qSxeUu5g==} 398 - engines: {node: '>=6.0.0'} 399 - hasBin: true 400 - dependencies: 401 - '@babel/types': 7.22.5 402 - 403 408 /@babel/parser@7.22.5: 404 409 resolution: {integrity: sha512-DFZMC9LJUG9PLOclRC32G63UXwzqS2koQC8dkx+PLdmt1xSePYpbT/NbsrJy8Q/muXz7o/h/d4A7Fuyixm559Q==} 405 410 engines: {node: '>=6.0.0'} ··· 476 481 globals: 11.12.0 477 482 transitivePeerDependencies: 478 483 - supports-color 479 - 480 - /@babel/types@7.21.5: 481 - resolution: {integrity: sha512-m4AfNvVF2mVC/F7fDEdH2El3HzUg9It/XsCxZiOTTA3m3qYfcSVSbTfM6Q9xG+hYDniZssYhlXKKUMD5m8tF4Q==} 482 - engines: {node: '>=6.9.0'} 483 - dependencies: 484 - '@babel/helper-string-parser': 7.22.5 485 - '@babel/helper-validator-identifier': 7.22.5 486 - to-fast-properties: 2.0.0 487 484 488 485 /@babel/types@7.22.5: 489 486 resolution: {integrity: sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==} ··· 1253 1250 dependencies: 1254 1251 '@nuxt/schema': 3.6.1(rollup@3.21.8) 1255 1252 c12: 1.4.2 1256 - consola: 3.2.2 1253 + consola: 3.1.0 1257 1254 defu: 6.1.2 1258 1255 globby: 13.2.0 1259 1256 hash-sum: 2.0.0 ··· 1272 1269 - rollup 1273 1270 - supports-color 1274 1271 1275 - /@nuxt/module-builder@0.4.0(@nuxt/kit@3.6.1)(nuxi@3.6.1): 1272 + /@nuxt/module-builder@0.4.0(@nuxt/kit@3.6.1)(nuxi@3.5.3): 1276 1273 resolution: {integrity: sha512-B+UAYgFV1Hkc2ZcD7GaiKZ3SNHhyxFlXzZoBWTc9ulE0Z/+rq6RTa9fNm13BZyGhVhDCl5FN/wF/yYa1O/D2iw==} 1277 1274 hasBin: true 1278 1275 peerDependencies: ··· 1283 1280 consola: 3.1.0 1284 1281 mlly: 1.3.0 1285 1282 mri: 1.2.0 1286 - nuxi: 3.6.1 1283 + nuxi: 3.5.3 1287 1284 pathe: 1.1.0 1288 1285 unbuild: 1.2.1 1289 1286 transitivePeerDependencies: ··· 1315 1312 '@nuxt/kit': 3.6.1(rollup@3.21.8) 1316 1313 chalk: 5.2.0 1317 1314 ci-info: 3.8.0 1318 - consola: 3.2.2 1315 + consola: 3.1.0 1319 1316 create-require: 1.1.1 1320 1317 defu: 6.1.2 1321 1318 destr: 1.2.2 ··· 1353 1350 '@vitejs/plugin-vue-jsx': 3.0.1(vite@4.3.9)(vue@3.3.4) 1354 1351 autoprefixer: 10.4.14(postcss@8.4.24) 1355 1352 clear: 0.1.0 1356 - consola: 3.2.2 1353 + consola: 3.1.0 1357 1354 cssnano: 6.0.1(postcss@8.4.24) 1358 1355 defu: 6.1.2 1359 1356 esbuild: 0.18.11 ··· 1362 1359 externality: 1.0.2 1363 1360 fs-extra: 11.1.1 1364 1361 get-port-please: 3.0.1 1365 - h3: 1.7.1 1362 + h3: 1.7.0 1366 1363 knitwork: 1.0.0 1367 1364 magic-string: 0.30.0 1368 1365 mlly: 1.4.0 ··· 1379 1376 ufo: 1.1.2 1380 1377 unplugin: 1.3.1 1381 1378 vite: 4.3.9(@types/node@18.16.3) 1382 - vite-node: 0.32.2(@types/node@18.16.3) 1379 + vite-node: 0.32.4(@types/node@18.16.3) 1383 1380 vite-plugin-checker: 0.6.1(eslint@8.44.0)(typescript@5.1.6)(vite@4.3.9)(vue-tsc@1.8.3) 1384 1381 vue: 3.3.4 1385 1382 vue-bundle-renderer: 1.0.3 ··· 1839 1836 /@tootallnate/once@2.0.0: 1840 1837 resolution: {integrity: sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==} 1841 1838 engines: {node: '>= 10'} 1842 - dev: true 1843 1839 1844 1840 /@trysound/sax@0.2.0: 1845 1841 resolution: {integrity: sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==} ··· 1884 1880 resolution: {integrity: sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==} 1885 1881 dev: true 1886 1882 1883 + /@types/jsdom@21.1.1: 1884 + resolution: {integrity: sha512-cZFuoVLtzKP3gmq9eNosUL1R50U+USkbLtUQ1bYVgl/lKp0FZM7Cq4aIHAL8oIvQ17uSHi7jXPtfDOdjPwBE7A==} 1885 + dependencies: 1886 + '@types/node': 18.16.3 1887 + '@types/tough-cookie': 4.0.2 1888 + parse5: 7.1.2 1889 + dev: true 1890 + 1887 1891 /@types/json-schema@7.0.11: 1888 1892 resolution: {integrity: sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==} 1889 1893 dev: true ··· 1909 1913 1910 1914 /@types/semver@7.3.13: 1911 1915 resolution: {integrity: sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==} 1916 + dev: true 1917 + 1918 + /@types/tough-cookie@4.0.2: 1919 + resolution: {integrity: sha512-Q5vtl1W5ue16D+nIaW8JWebSSraJVlK+EthKn7e7UcD4KWsaSJ8BqGPXNaPghgtcn/fhvrN17Tv8ksUsQpiplw==} 1912 1920 dev: true 1913 1921 1914 1922 /@typescript-eslint/eslint-plugin@5.51.0(@typescript-eslint/parser@5.51.0)(eslint@8.44.0)(typescript@4.9.5): ··· 2062 2070 eslint-visitor-keys: 3.4.1 2063 2071 dev: true 2064 2072 2065 - /@unhead/dom@1.1.28: 2066 - resolution: {integrity: sha512-o5w3GUo1en9OWNHpUkrkZxmlx2Xf7q++VLb5Lm0MtbHYM578lWmB1zLfmJMN13kvaNKN8RUhTYG5WMtKMzDfGw==} 2073 + /@unhead/dom@1.1.30: 2074 + resolution: {integrity: sha512-EvASOkk36lW5sRfIe+StCojpkPEExsQNt+cqcpdVr9iiRH54jziCDFxcLfjawc+jp4NO86KvmfHo86GIly3/SQ==} 2067 2075 dependencies: 2068 - '@unhead/schema': 1.1.28 2069 - '@unhead/shared': 1.1.28 2076 + '@unhead/schema': 1.1.30 2077 + '@unhead/shared': 1.1.30 2070 2078 dev: true 2071 2079 2072 - /@unhead/schema@1.1.28: 2073 - resolution: {integrity: sha512-KDAPSYcYZHC3ni3Hd3Ye/piBasaHa/uQWCLICOVADwKi1Pm6hhMxCCwpsPSJtfekN31kOvIA09vZv8roPwTthQ==} 2080 + /@unhead/schema@1.1.30: 2081 + resolution: {integrity: sha512-lgz0aw+OP1PlKHBhNWAVabV2iAHBhSXCt3Ynswu0m++MwJxOVXizYJRZOVKK7Zx3u7vwPRV/nweYc6rmNHv5gA==} 2074 2082 dependencies: 2075 2083 hookable: 5.5.3 2076 - zhead: 2.0.7 2084 + zhead: 2.0.9 2077 2085 dev: true 2078 2086 2079 - /@unhead/shared@1.1.28: 2080 - resolution: {integrity: sha512-mC0k7a4Cb4vKsASjD/Ws5hrRdZfTf5uapRF+1ekVqeyo1VVISoXNB6CdxTjHgqi8vKQr5wmvoSvEt1fOoU1PQQ==} 2087 + /@unhead/shared@1.1.30: 2088 + resolution: {integrity: sha512-OPS+d4SZuYSWquQZVLfbyFYggdqKz8DtcdHXObRoKWnosrgVPyGJoOaFnjfkYYuvU6BFYnUtnZNMRQVUjmER1g==} 2081 2089 dependencies: 2082 - '@unhead/schema': 1.1.28 2090 + '@unhead/schema': 1.1.30 2083 2091 dev: true 2084 2092 2085 - /@unhead/ssr@1.1.28: 2086 - resolution: {integrity: sha512-gnSVyvpx/R1byQ8mArh2QRI1PdQ9mlRvtnt1Qiy7JUrtkJeqf/Hfn85fwZ+RhHRSDBPhMl7qD24FSlz5EwA9Zw==} 2093 + /@unhead/ssr@1.1.30: 2094 + resolution: {integrity: sha512-0XBgoPZoPjLCEQpGc/PhTYPvXEcWufcpcHWo6jxRham3VCoQN5RoSzFNGPEtd4ZhMMVRMQLJ7yPDGfFXtu78Pg==} 2087 2095 dependencies: 2088 - '@unhead/schema': 1.1.28 2089 - '@unhead/shared': 1.1.28 2096 + '@unhead/schema': 1.1.30 2097 + '@unhead/shared': 1.1.30 2090 2098 dev: true 2091 2099 2092 - /@unhead/vue@1.1.28(vue@3.3.4): 2093 - resolution: {integrity: sha512-n/4UusPccA0eyLxeinEagfm7hswzg4Uud+dYNlPByHHThCBobYcHjhnOOeS9YvkMGbdZpG1l7k/kywQIcwYqgg==} 2100 + /@unhead/vue@1.1.30(vue@3.3.4): 2101 + resolution: {integrity: sha512-jWDfYDjiNj8a8GTQoYeJrpKisI7YKIWwuMP1IREKa4cx41oCsbCKUDjomjnpmdBcpqvb/Kw32Tm+EMcuE/CYkA==} 2094 2102 peerDependencies: 2095 2103 vue: '>=2.7 || >=3' 2096 2104 dependencies: 2097 - '@unhead/schema': 1.1.28 2098 - '@unhead/shared': 1.1.28 2105 + '@unhead/schema': 1.1.30 2106 + '@unhead/shared': 1.1.30 2099 2107 hookable: 5.5.3 2100 - unhead: 1.1.28 2108 + unhead: 1.1.30 2101 2109 vue: 3.3.4 2102 2110 dev: true 2103 2111 ··· 2257 2265 '@babel/plugin-syntax-jsx': 7.18.6(@babel/core@7.21.4) 2258 2266 '@babel/template': 7.20.7 2259 2267 '@babel/traverse': 7.21.4 2260 - '@babel/types': 7.21.5 2268 + '@babel/types': 7.22.5 2261 2269 '@vue/babel-helper-vue-transform-on': 1.0.2 2262 2270 camelcase: 6.3.0 2263 2271 html-tags: 3.2.0 ··· 2389 2397 jsonparse: 1.3.1 2390 2398 through: 2.3.8 2391 2399 dev: true 2400 + 2401 + /abab@2.0.6: 2402 + resolution: {integrity: sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==} 2392 2403 2393 2404 /abbrev@1.1.1: 2394 2405 resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==} ··· 2657 2668 2658 2669 /asynckit@0.4.0: 2659 2670 resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} 2660 - dev: true 2661 2671 2662 2672 /autoprefixer@10.4.14(postcss@8.4.24): 2663 2673 resolution: {integrity: sha512-FQzyfOsTlwVzjHxKEqRIAdJx9niO6VCBCoEwax/VLSoQF29ggECcPuBqUMZ+u8jCZOPSy8b8/8KnuFbp0SaFZQ==} ··· 3210 3220 engines: {node: '>= 0.8'} 3211 3221 dependencies: 3212 3222 delayed-stream: 1.0.0 3213 - dev: true 3214 3223 3215 3224 /commander@10.0.0: 3216 3225 resolution: {integrity: sha512-zS5PnTI22FIRM6ylNW8G4Ap0IEOyk62fhLSD0+uHRT9McRCLGpkVNvao4bjimpK/GShynyQkFFxHhwMcETmduA==} ··· 3301 3310 /consola@3.2.2: 3302 3311 resolution: {integrity: sha512-r921u0vbF4lQsoIqYvSSER+yZLPQGijOHrYcWoCNVNBZmn/bRR+xT/DgerTze/nLD9TTGzdDa378TVhx7RDOYg==} 3303 3312 engines: {node: ^14.18.0 || >=16.10.0} 3313 + dev: true 3304 3314 3305 3315 /console-control-strings@1.1.0: 3306 3316 resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==} ··· 3641 3651 css-tree: 2.2.1 3642 3652 dev: true 3643 3653 3654 + /cssstyle@3.0.0: 3655 + resolution: {integrity: sha512-N4u2ABATi3Qplzf0hWbVCdjenim8F3ojEXpBDF5hBpjzW182MjNGLqfmQ0SkSPeQ+V86ZXgeH8aXj6kayd4jgg==} 3656 + engines: {node: '>=14'} 3657 + dependencies: 3658 + rrweb-cssom: 0.6.0 3659 + 3644 3660 /csstype@3.1.2: 3645 3661 resolution: {integrity: sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==} 3646 3662 ··· 3662 3678 resolution: {integrity: sha512-a9l6T1qqDogvvnw0nKlfZzqsyikEBZBClF39V3TFoKhDtGBqHu2HkuomJc02j5zft8zrUaXEuoicLeW54RkzPg==} 3663 3679 engines: {node: '>= 14'} 3664 3680 dev: true 3681 + 3682 + /data-urls@4.0.0: 3683 + resolution: {integrity: sha512-/mMTei/JXPqvFqQtfyTowxmJVwr2PVAeCcDxyFf6LhoOu/09TX2OX3kb2wzi4DMXcfj4OItwDOnhl5oziPnT6g==} 3684 + engines: {node: '>=14'} 3685 + dependencies: 3686 + abab: 2.0.6 3687 + whatwg-mimetype: 3.0.0 3688 + whatwg-url: 12.0.1 3665 3689 3666 3690 /date-time@3.1.0: 3667 3691 resolution: {integrity: sha512-uqCUKXE5q1PNBXjPqvwhwJf9SwMoAHBgWJ6DcrnS5o+W2JOiIILl0JEdVD8SGujrNS02GGxgwAg2PN2zONgtjg==} ··· 3711 3735 resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} 3712 3736 engines: {node: '>=0.10.0'} 3713 3737 dev: true 3738 + 3739 + /decimal.js@10.4.3: 3740 + resolution: {integrity: sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==} 3714 3741 3715 3742 /decompress-response@6.0.0: 3716 3743 resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} ··· 3855 3882 /delayed-stream@1.0.0: 3856 3883 resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} 3857 3884 engines: {node: '>=0.4.0'} 3858 - dev: true 3859 3885 3860 3886 /delegates@1.0.0: 3861 3887 resolution: {integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==} ··· 3934 3960 /domelementtype@2.3.0: 3935 3961 resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==} 3936 3962 dev: true 3963 + 3964 + /domexception@4.0.0: 3965 + resolution: {integrity: sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==} 3966 + engines: {node: '>=12'} 3967 + dependencies: 3968 + webidl-conversions: 7.0.0 3937 3969 3938 3970 /domhandler@5.0.3: 3939 3971 resolution: {integrity: sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==} ··· 4050 4082 /entities@4.5.0: 4051 4083 resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} 4052 4084 engines: {node: '>=0.12'} 4053 - dev: true 4054 4085 4055 4086 /env-paths@2.2.1: 4056 4087 resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} ··· 4385 4416 tsx: 3.12.6 4386 4417 dev: true 4387 4418 4419 + /espree@9.5.2: 4420 + resolution: {integrity: sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==} 4421 + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} 4422 + dependencies: 4423 + acorn: 8.9.0 4424 + acorn-jsx: 5.3.2(acorn@8.9.0) 4425 + eslint-visitor-keys: 3.4.1 4426 + dev: true 4427 + 4388 4428 /espree@9.6.0: 4389 4429 resolution: {integrity: sha512-1FH/IiruXZ84tpUlm0aCUEwMl2Ho5ilqVh0VvQXw+byAz/4SAciyHLlfmL5WYqsvD38oymdUwBss0LtK8m4s/A==} 4390 4430 engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} ··· 4665 4705 asynckit: 0.4.0 4666 4706 combined-stream: 1.0.8 4667 4707 mime-types: 2.1.35 4668 - dev: true 4669 4708 4670 4709 /formdata-polyfill@4.0.10: 4671 4710 resolution: {integrity: sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==} ··· 4863 4902 defu: 6.1.2 4864 4903 https-proxy-agent: 5.0.1 4865 4904 mri: 1.2.0 4866 - node-fetch-native: 1.2.0 4905 + node-fetch-native: 1.1.1 4867 4906 pathe: 1.1.1 4868 4907 tar: 6.1.13 4869 4908 transitivePeerDependencies: ··· 5213 5252 lru-cache: 7.18.3 5214 5253 dev: true 5215 5254 5255 + /html-encoding-sniffer@3.0.0: 5256 + resolution: {integrity: sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==} 5257 + engines: {node: '>=12'} 5258 + dependencies: 5259 + whatwg-encoding: 2.0.0 5260 + 5216 5261 /html-escaper@2.0.2: 5217 5262 resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} 5218 5263 dev: true ··· 5254 5299 debug: 4.3.4 5255 5300 transitivePeerDependencies: 5256 5301 - supports-color 5257 - dev: true 5258 5302 5259 5303 /http-proxy-agent@7.0.0: 5260 5304 resolution: {integrity: sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==} ··· 5678 5722 engines: {node: '>=0.10.0'} 5679 5723 dev: true 5680 5724 5725 + /is-potential-custom-element-name@1.0.1: 5726 + resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} 5727 + 5681 5728 /is-primitive@3.0.1: 5682 5729 resolution: {integrity: sha512-GljRxhWvlCNRfZyORiH77FwdFwGcMO620o37EOYC0ORWdq+WYNVqW0w2Juzew4M+L81l6/QS3t5gkkihyRqv9w==} 5683 5730 engines: {node: '>=0.10.0'} ··· 5889 5936 dependencies: 5890 5937 argparse: 2.0.1 5891 5938 dev: true 5939 + 5940 + /jsdom@22.0.0: 5941 + resolution: {integrity: sha512-p5ZTEb5h+O+iU02t0GfEjAnkdYPrQSkfuTSMkMYyIoMvUNEHsbG0bHHbfXIcfTqD2UfvjQX7mmgiFsyRwGscVw==} 5942 + engines: {node: '>=16'} 5943 + peerDependencies: 5944 + canvas: ^2.5.0 5945 + peerDependenciesMeta: 5946 + canvas: 5947 + optional: true 5948 + dependencies: 5949 + abab: 2.0.6 5950 + cssstyle: 3.0.0 5951 + data-urls: 4.0.0 5952 + decimal.js: 10.4.3 5953 + domexception: 4.0.0 5954 + form-data: 4.0.0 5955 + html-encoding-sniffer: 3.0.0 5956 + http-proxy-agent: 5.0.0 5957 + https-proxy-agent: 5.0.1 5958 + is-potential-custom-element-name: 1.0.1 5959 + nwsapi: 2.2.4 5960 + parse5: 7.1.2 5961 + rrweb-cssom: 0.6.0 5962 + saxes: 6.0.0 5963 + symbol-tree: 3.2.4 5964 + tough-cookie: 4.1.2 5965 + w3c-xmlserializer: 4.0.0 5966 + webidl-conversions: 7.0.0 5967 + whatwg-encoding: 2.0.0 5968 + whatwg-mimetype: 3.0.0 5969 + whatwg-url: 12.0.1 5970 + ws: 8.13.0 5971 + xml-name-validator: 4.0.0 5972 + transitivePeerDependencies: 5973 + - bufferutil 5974 + - supports-color 5975 + - utf-8-validate 5892 5976 5893 5977 /jsesc@2.5.2: 5894 5978 resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} ··· 6422 6506 /mime-db@1.52.0: 6423 6507 resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} 6424 6508 engines: {node: '>= 0.6'} 6425 - dev: true 6426 6509 6427 6510 /mime-types@2.1.35: 6428 6511 resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} 6429 6512 engines: {node: '>= 0.6'} 6430 6513 dependencies: 6431 6514 mime-db: 1.52.0 6432 - dev: true 6433 6515 6434 6516 /mime@1.6.0: 6435 6517 resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==} ··· 6635 6717 /mlly@1.3.0: 6636 6718 resolution: {integrity: sha512-HT5mcgIQKkOrZecOjOX3DJorTikWXwsBfpcr/MGBkhfWcjiqvnaL/9ppxvIUXfjT6xt4DVIAsN9fMUz1ev4bIw==} 6637 6719 dependencies: 6638 - acorn: 8.8.2 6720 + acorn: 8.9.0 6639 6721 pathe: 1.1.1 6640 6722 pkg-types: 1.0.3 6641 6723 ufo: 1.1.2 ··· 6816 6898 6817 6899 /node-fetch-native@1.2.0: 6818 6900 resolution: {integrity: sha512-5IAMBTl9p6PaAjYCnMv5FmqIF6GcZnawAVnzaCG0rX2aYZJ4CxEkZNtVPuTRug7fL7wyM5BQYTlAzcyMPi6oTQ==} 6901 + dev: true 6819 6902 6820 6903 /node-fetch@2.6.9: 6821 6904 resolution: {integrity: sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg==} ··· 7030 7113 boolbase: 1.0.0 7031 7114 dev: true 7032 7115 7116 + /nuxi@3.5.3: 7117 + resolution: {integrity: sha512-H0/Nj0ulUN8PrSvr6H433Awt4hNT5uaN57041QfknYVXlUce7yEbl/NcpNtnneAHYn2hMUZL9/nJCVkZ1xTvHA==} 7118 + engines: {node: ^14.18.0 || >=16.10.0} 7119 + hasBin: true 7120 + optionalDependencies: 7121 + fsevents: 2.3.2 7122 + dev: true 7123 + 7033 7124 /nuxi@3.6.1: 7034 7125 resolution: {integrity: sha512-8kyDHfyiq0oLywon8UlucQWyYj3toE5AU96COjbuQy8ZzyRT6KJlAmMXmFkO/VuIhaMC8qdlcZPYg/NnHTVjaQ==} 7035 7126 engines: {node: ^14.18.0 || >=16.10.0} ··· 7056 7147 '@nuxt/ui-templates': 1.2.0 7057 7148 '@nuxt/vite-builder': 3.6.1(@types/node@18.16.3)(eslint@8.44.0)(rollup@3.21.8)(typescript@5.1.6)(vue-tsc@1.8.3)(vue@3.3.4) 7058 7149 '@types/node': 18.16.3 7059 - '@unhead/ssr': 1.1.28 7060 - '@unhead/vue': 1.1.28(vue@3.3.4) 7150 + '@unhead/ssr': 1.1.30 7151 + '@unhead/vue': 1.1.30(vue@3.3.4) 7061 7152 '@vue/shared': 3.3.4 7062 7153 acorn: 8.9.0 7063 7154 c12: 1.4.2 ··· 7130 7221 - vti 7131 7222 - vue-tsc 7132 7223 dev: true 7224 + 7225 + /nwsapi@2.2.4: 7226 + resolution: {integrity: sha512-NHj4rzRo0tQdijE9ZqAx6kYDcoRwYwSYzCA8MY3JzfxlrvEU0jhnhJT9BhqhJs7I/dKcrDm6TyulaRqZPIhN5g==} 7133 7227 7134 7228 /nypm@0.2.1: 7135 7229 resolution: {integrity: sha512-5XKv4OKlnL+qkeWU4ywu35iyT1p8TmFJ5vD9BfVn8tHU3g/X0lDLV8TqZ4dNHwkoo9mtHUpQ8W8ert0XPqwbow==} ··· 7496 7590 dependencies: 7497 7591 parse-path: 7.0.0 7498 7592 dev: true 7593 + 7594 + /parse5@7.1.2: 7595 + resolution: {integrity: sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==} 7596 + dependencies: 7597 + entities: 4.5.0 7499 7598 7500 7599 /parseurl@1.3.3: 7501 7600 resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} ··· 8067 8166 resolution: {integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==} 8068 8167 dev: false 8069 8168 8169 + /psl@1.9.0: 8170 + resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==} 8171 + 8070 8172 /punycode@2.3.0: 8071 8173 resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==} 8072 8174 engines: {node: '>=6'} 8073 - dev: true 8074 8175 8075 8176 /pupa@3.1.0: 8076 8177 resolution: {integrity: sha512-FLpr4flz5xZTSJxSeaheeMKN/EDzMdK7b8PTOC6a5PYFKTucWbdqjgqaEyH0shFiSJrVB1+Qqi4Tk19ccU6Aug==} ··· 8083 8184 resolution: {integrity: sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==} 8084 8185 engines: {node: '>=0.6.0', teleport: '>=0.2.0'} 8085 8186 dev: true 8187 + 8188 + /querystringify@2.2.0: 8189 + resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==} 8086 8190 8087 8191 /queue-microtask@1.2.3: 8088 8192 resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} ··· 8333 8437 8334 8438 /requires-port@1.0.0: 8335 8439 resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} 8336 - dev: true 8337 8440 8338 8441 /resolve-alpn@1.2.1: 8339 8442 resolution: {integrity: sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==} ··· 8477 8580 fsevents: 2.3.2 8478 8581 dev: true 8479 8582 8583 + /rrweb-cssom@0.6.0: 8584 + resolution: {integrity: sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==} 8585 + 8480 8586 /run-applescript@5.0.0: 8481 8587 resolution: {integrity: sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==} 8482 8588 engines: {node: '>=12'} ··· 8517 8623 8518 8624 /safer-buffer@2.1.2: 8519 8625 resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} 8626 + 8627 + /saxes@6.0.0: 8628 + resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} 8629 + engines: {node: '>=v12.22.7'} 8630 + dependencies: 8631 + xmlchars: 2.2.0 8520 8632 8521 8633 /scule@1.0.0: 8522 8634 resolution: {integrity: sha512-4AsO/FrViE/iDNEPaAQlb77tf0csuq27EsVpy6ett584EcRTp6pTDLoGWVxCD77y5iU5FauOvhsI4o1APwPoSQ==} ··· 9022 9134 picocolors: 1.0.0 9023 9135 dev: true 9024 9136 9137 + /symbol-tree@3.2.4: 9138 + resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} 9139 + 9025 9140 /tapable@1.1.3: 9026 9141 resolution: {integrity: sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==} 9027 9142 engines: {node: '>=6'} ··· 9166 9281 resolution: {integrity: sha512-eM+pCBxXO/njtF7vdFsHuqb+ElbxqtI4r5EAvk6grfAFyJ6IvWlSkfZ5T9ozC6xWw3Fj1fGoSmrl0gUs46JVIw==} 9167 9282 engines: {node: '>=6'} 9168 9283 9284 + /tough-cookie@4.1.2: 9285 + resolution: {integrity: sha512-G9fqXWoYFZgTc2z8Q5zaHy/vJMjm+WV0AkAeHxVCQiEB1b+dGvWzFW6QV07cY5jQ5gRkeid2qIkzkxUnmoQZUQ==} 9286 + engines: {node: '>=6'} 9287 + dependencies: 9288 + psl: 1.9.0 9289 + punycode: 2.3.0 9290 + universalify: 0.2.0 9291 + url-parse: 1.5.10 9292 + 9169 9293 /tr46@0.0.3: 9170 9294 resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} 9171 9295 dev: true 9296 + 9297 + /tr46@4.1.1: 9298 + resolution: {integrity: sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==} 9299 + engines: {node: '>=14'} 9300 + dependencies: 9301 + punycode: 2.3.0 9172 9302 9173 9303 /trim-newlines@3.0.1: 9174 9304 resolution: {integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==} ··· 9405 9535 node-fetch-native: 1.1.1 9406 9536 pathe: 1.1.0 9407 9537 9408 - /unhead@1.1.28: 9409 - resolution: {integrity: sha512-lJqXq5YMAD3p+Nhnvb7fNJwkU91kJNhrnZNcEuAlaTB+0L4es69UvMzekT/wvoE7pde4Yxs0upcTyL4BBz4vQw==} 9538 + /unhead@1.1.30: 9539 + resolution: {integrity: sha512-25N/P1GnnC8EYCDerzE0hl2nOdRqS1NOFh1STEyKWRo/Bi5dXn8Z2NTaqzkbr5ExJTZEAiDfZ+eALvMTmvlXlA==} 9410 9540 dependencies: 9411 - '@unhead/dom': 1.1.28 9412 - '@unhead/schema': 1.1.28 9413 - '@unhead/shared': 1.1.28 9541 + '@unhead/dom': 1.1.30 9542 + '@unhead/schema': 1.1.30 9543 + '@unhead/shared': 1.1.30 9414 9544 hookable: 5.5.3 9415 9545 dev: true 9416 9546 ··· 9492 9622 resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} 9493 9623 engines: {node: '>= 4.0.0'} 9494 9624 dev: true 9625 + 9626 + /universalify@0.2.0: 9627 + resolution: {integrity: sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==} 9628 + engines: {node: '>= 4.0.0'} 9495 9629 9496 9630 /universalify@2.0.0: 9497 9631 resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==} ··· 9644 9778 engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} 9645 9779 dev: true 9646 9780 9781 + /url-parse@1.5.10: 9782 + resolution: {integrity: sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==} 9783 + dependencies: 9784 + querystringify: 2.2.0 9785 + requires-port: 1.0.0 9786 + 9647 9787 /util-deprecate@1.0.2: 9648 9788 resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} 9649 9789 ··· 9707 9847 - supports-color 9708 9848 - terser 9709 9849 9710 - /vite-node@0.32.2(@types/node@18.16.3): 9711 - resolution: {integrity: sha512-dTQ1DCLwl2aEseov7cfQ+kDMNJpM1ebpyMMMwWzBvLbis8Nla/6c9WQcqpPssTwS6Rp/+U6KwlIj8Eapw4bLdA==} 9850 + /vite-node@0.32.4(@types/node@18.16.3): 9851 + resolution: {integrity: sha512-L2gIw+dCxO0LK14QnUMoqSYpa9XRGnTTTDjW2h19Mr+GR0EFj4vx52W41gFXfMLqpA00eK4ZjOVYo1Xk//LFEw==} 9712 9852 engines: {node: '>=v14.18.0'} 9713 9853 hasBin: true 9714 9854 dependencies: ··· 9985 10125 - terser 9986 10126 dev: true 9987 10127 9988 - /vitest@0.30.1(happy-dom@9.10.9): 10128 + /vitest@0.30.1(happy-dom@9.10.9)(jsdom@22.0.0): 9989 10129 resolution: {integrity: sha512-y35WTrSTlTxfMLttgQk4rHcaDkbHQwDP++SNwPb+7H8yb13Q3cu2EixrtHzF27iZ8v0XCciSsLg00RkPAzB/aA==} 9990 10130 engines: {node: '>=v14.18.0'} 9991 10131 hasBin: true ··· 10031 10171 concordance: 5.0.4 10032 10172 debug: 4.3.4 10033 10173 happy-dom: 9.10.9 10174 + jsdom: 22.0.0 10034 10175 local-pkg: 0.4.3 10035 10176 magic-string: 0.30.0 10036 10177 pathe: 1.1.0 ··· 10120 10261 eslint: 8.44.0 10121 10262 eslint-scope: 7.2.0 10122 10263 eslint-visitor-keys: 3.4.1 10123 - espree: 9.6.0 10264 + espree: 9.5.2 10124 10265 esquery: 1.4.2 10125 10266 lodash: 4.17.21 10126 10267 semver: 7.5.3 ··· 10163 10304 '@vue/runtime-dom': 3.3.4 10164 10305 '@vue/server-renderer': 3.3.4(vue@3.3.4) 10165 10306 '@vue/shared': 3.3.4 10307 + 10308 + /w3c-xmlserializer@4.0.0: 10309 + resolution: {integrity: sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==} 10310 + engines: {node: '>=14'} 10311 + dependencies: 10312 + xml-name-validator: 4.0.0 10166 10313 10167 10314 /wait-on@7.0.1: 10168 10315 resolution: {integrity: sha512-9AnJE9qTjRQOlTZIldAaf/da2eW0eSRSgcqq85mXQja/DW3MriHxkpODDSUEg+Gri/rKEcXUZHe+cevvYItaog==} ··· 10227 10374 /whatwg-mimetype@3.0.0: 10228 10375 resolution: {integrity: sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==} 10229 10376 engines: {node: '>=12'} 10377 + 10378 + /whatwg-url@12.0.1: 10379 + resolution: {integrity: sha512-Ed/LrqB8EPlGxjS+TrsXcpUond1mhccS3pchLhzSgPCnTimUCKj3IZE75pAs5m6heB2U2TMerKFUXheyHY+VDQ==} 10380 + engines: {node: '>=14'} 10381 + dependencies: 10382 + tr46: 4.1.1 10383 + webidl-conversions: 7.0.0 10230 10384 10231 10385 /whatwg-url@5.0.0: 10232 10386 resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} ··· 10364 10518 optional: true 10365 10519 utf-8-validate: 10366 10520 optional: true 10367 - dev: true 10368 10521 10369 10522 /xdg-basedir@5.1.0: 10370 10523 resolution: {integrity: sha512-GCPAHLvrIH13+c0SuacwvRYj2SxJXQ4kaVTT5xgL3kPrz56XxkF21IGhjSE1+W0aw7gpBWRGXLCPnPby6lSpmQ==} ··· 10374 10527 /xml-name-validator@4.0.0: 10375 10528 resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==} 10376 10529 engines: {node: '>=12'} 10377 - dev: true 10530 + 10531 + /xmlchars@2.2.0: 10532 + resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} 10378 10533 10379 10534 /xtend@4.0.2: 10380 10535 resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} ··· 10459 10614 resolution: {integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==} 10460 10615 engines: {node: '>=12.20'} 10461 10616 10462 - /zhead@2.0.7: 10463 - resolution: {integrity: sha512-q9iCCXBWndfYNMGCN7S970+e3ILAPzmX78Skblx7+SGlo6x6SXW0GJ5mJzigYsq2mkHCGqEUhe0QGDEDZauw8g==} 10617 + /zhead@2.0.9: 10618 + resolution: {integrity: sha512-Y3g6EegQc6PVrYXPq2OS7/s27UGVS5Y6NY6SY3XGH4Hg+yQWbQTtWsjCgmpR8kZnYrv8auB54sz+x5FEDrvqzQ==} 10464 10619 dev: true 10465 10620 10466 10621 /zip-stream@4.1.0:
+5 -1
playground/package.json
··· 9 9 "test:dev": "NUXT_VITEST_DEV_TEST=true nuxt dev", 10 10 "test:unit": "vitest", 11 11 "test:types": "nuxi prepare && vue-tsc --noEmit", 12 - "test": "pnpm test:unit --run && pnpm test:dev && pnpm test:types" 12 + "test:jsdom": "VITEST_DOM_ENV=jsdom pnpm test:unit --run", 13 + "test:happy-dom": "VITEST_DOM_ENV=happy-dom pnpm test:unit --run", 14 + "test": "pnpm test:happy-dom && pnpm test:jsdom && pnpm test:dev && pnpm test:types" 13 15 }, 14 16 "devDependencies": { 15 17 "@nuxt/devtools": "0.6.6", 16 18 "nuxt": "3.6.1", 17 19 "nuxt-vitest": "0.8.7", 20 + "happy-dom": "^9.10.9", 21 + "jsdom": "^22.0.0", 18 22 "typescript": "5.1.6", 19 23 "vitest": "0.30.1", 20 24 "vitest-environment-nuxt": "0.8.7",
+1
playground/vitest.config.ts
··· 10 10 environmentOptions: { 11 11 nuxt: { 12 12 rootDir: fileURLToPath(new URL('./', import.meta.url)), 13 + domEnvironment: process.env.VITEST_DOM_ENV as 'happy-dom' | 'jsdom' 13 14 }, 14 15 }, 15 16 },
+13 -1
packages/vitest-environment-nuxt/package.json
··· 49 49 "defu": "^6.1.2", 50 50 "estree-walker": "^3.0.3", 51 51 "h3": "^1.6.5", 52 - "happy-dom": "^9.10.9", 53 52 "magic-string": "^0.30.0", 54 53 "ofetch": "^1.0.0", 55 54 "unenv": "^1.0.2" 56 55 }, 57 56 "devDependencies": { 57 + "@types/jsdom": "^21.1.1", 58 + "happy-dom": "^9.10.9", 59 + "jsdom": "^22.0.0", 58 60 "vue": "3.3.4" 59 61 }, 60 62 "peerDependencies": { 63 + "happy-dom": "^9.10.9", 64 + "jsdom": "^22.0.0", 61 65 "vitest": "^0.24.5 || ^0.26.0 || ^0.27.0 || ^0.28.0 || ^0.29.0 || ^0.30.0", 62 66 "vue": "^3.2.45", 63 67 "vue-router": "^4.0.0" 68 + }, 69 + "peerDependenciesMeta": { 70 + "happy-dom": { 71 + "optional": true 72 + }, 73 + "jsdom": { 74 + "optional": true 75 + } 64 76 } 65 77 }
+8
packages/nuxt-vitest/src/config.ts
··· 174 174 * @default {nuxt-test} 175 175 */ 176 176 rootId?: string 177 + /** 178 + * The name of the DOM environment to use. 179 + * 180 + * It also needs to be installed as a dev dependency in your project. 181 + * 182 + * @default {happy-dom} 183 + */ 184 + domEnvironment?: 'happy-dom' | 'jsdom' 177 185 } 178 186 } 179 187 }
+21 -19
packages/vitest-environment-nuxt/src/index.ts
··· 1 1 import type { Environment } from 'vitest' 2 - import { Window, GlobalWindow } from 'happy-dom' 3 2 import { createFetch } from 'ofetch' 4 3 import { joinURL } from 'ufo' 5 4 import { createApp, toNodeListener } from 'h3' 6 - import type { App } from 'h3' 7 5 import { populateGlobal } from 'vitest/environments' 8 6 import { 9 7 createCall, 10 8 createFetch as createLocalFetch, 11 9 } from 'unenv/runtime/fetch/index' 10 + import type { NuxtBuiltinEnvironment } from './types' 11 + import happyDom from './env/happy-dom' 12 + import jsdom from './env/jsdom' 12 13 13 14 export default <Environment>{ 14 15 name: 'nuxt', 15 - async setup(_, environmentOptions) { 16 - const startingURL = environmentOptions.url || joinURL('http://localhost:3000', environmentOptions?.nuxtRuntimeConfig.app?.baseURL || '/') 17 - 18 - const win: NuxtWindow = new (GlobalWindow || Window)({ url: startingURL }) as any 16 + async setup(global, environmentOptions) { 17 + const url = joinURL('http://localhost:3000', environmentOptions?.nuxtRuntimeConfig.app?.baseURL || '/') 18 + const { window: win, teardown } = await { 19 + 'happy-dom': happyDom, 20 + jsdom 21 + }[environmentOptions.nuxt.domEnvironment as NuxtBuiltinEnvironment || 'happy-dom'](global, { 22 + ...environmentOptions, 23 + happyDom: { 24 + url, 25 + ...environmentOptions?.happyDom, 26 + }, 27 + jsdom: { 28 + url, 29 + ...environmentOptions?.jsdom, 30 + } 31 + }) 19 32 20 33 win.__NUXT__ = { 21 34 serverRendered: false, ··· 56 69 return localFetch(init, options) 57 70 } 58 71 59 - win.$fetch = createFetch({ fetch: win.fetch, Headers: win.Headers as any }) 72 + win.$fetch = createFetch({ fetch: win.fetch, Headers: win.Headers }) 60 73 61 74 win.__registry = registry 62 75 win.__app = h3App ··· 71 84 return { 72 85 // called after all tests with this env have been run 73 86 teardown() { 74 - win.happyDOM.cancelAsync() 75 - // @ts-expect-error 87 + teardown() 76 88 keys.forEach(key => delete global[key]) 77 - // @ts-expect-error 78 89 originals.forEach((v, k) => (global[k] = v)) 79 90 }, 80 91 } 81 92 }, 82 - } 83 - 84 - interface NuxtWindow extends Window { 85 - __app: App 86 - __registry: Set<string> 87 - __NUXT__: any 88 - $fetch: any 89 - fetch: any 90 - IntersectionObserver: any 91 93 }
+16
packages/vitest-environment-nuxt/src/types.ts
··· 1 + import { App } from "h3" 2 + 3 + export type NuxtBuiltinEnvironment = 'happy-dom' | 'jsdom' 4 + export interface NuxtWindow extends Window { 5 + __app: App 6 + __registry: Set<string> 7 + __NUXT__: any 8 + $fetch: any 9 + fetch: any 10 + IntersectionObserver: any 11 + Headers: any 12 + } 13 + export type EnvironmentNuxt = (global: any, options: Record<string, any>) => Promise<{ 14 + window: NuxtWindow, 15 + teardown(): void 16 + }>
+14
packages/vitest-environment-nuxt/src/env/happy-dom.ts
··· 1 + import { importModule } from 'local-pkg' 2 + import { EnvironmentNuxt } from '../types' 3 + 4 + export default <EnvironmentNuxt> async function (_, { happyDom = {} }) { 5 + const { Window, GlobalWindow } = await importModule('happy-dom') as typeof import('happy-dom') 6 + const window = new (GlobalWindow || Window)(happyDom) as any 7 + 8 + return { 9 + window, 10 + teardown() { 11 + window.happyDOM.cancelAsync() 12 + } 13 + } 14 + }
+44
packages/vitest-environment-nuxt/src/env/jsdom.ts
··· 1 + import { importModule } from 'local-pkg' 2 + import { EnvironmentNuxt } from '../types' 3 + 4 + export default <EnvironmentNuxt> async function (global, { jsdom = {} }) { 5 + const { 6 + CookieJar, 7 + JSDOM, 8 + ResourceLoader, 9 + VirtualConsole, 10 + } = await importModule('jsdom') as typeof import('jsdom') 11 + const { 12 + html = '<!DOCTYPE html>', 13 + userAgent, 14 + url = 'http://localhost:3000', 15 + contentType = 'text/html', 16 + pretendToBeVisual = true, 17 + includeNodeLocations = false, 18 + runScripts = 'dangerously', 19 + resources, 20 + console = false, 21 + cookieJar = false, 22 + ...restOptions 23 + } = jsdom as any 24 + const window = new JSDOM( 25 + html, 26 + { 27 + pretendToBeVisual, 28 + resources: resources ?? (userAgent ? new ResourceLoader({ userAgent }) : undefined), 29 + runScripts, 30 + url, 31 + virtualConsole: console && global.console ? new VirtualConsole().sendTo(global.console) : undefined, 32 + cookieJar: cookieJar ? new CookieJar() : undefined, 33 + includeNodeLocations, 34 + contentType, 35 + userAgent, 36 + ...restOptions, 37 + }, 38 + ).window as any 39 + 40 + return { 41 + window, 42 + teardown() {} 43 + } 44 + }