diff --git a/.eslintrc.js b/.eslintrc.cjs similarity index 72% rename from .eslintrc.js rename to .eslintrc.cjs index fff483ac0a..fe93fe6d36 100644 --- a/.eslintrc.js +++ b/.eslintrc.cjs @@ -1,6 +1,6 @@ module.exports = { root: true, - extends: ['@sveltejs', 'prettier'], + extends: ['@sveltejs'], settings: { 'import/core-modules': [ 'svelte', @@ -8,8 +8,7 @@ module.exports = { 'svelte/store', 'svelte/easing', 'estree' - ], - 'svelte3/compiler': require('./compiler') + ] }, rules: { '@typescript-eslint/no-non-null-assertion': 'off' diff --git a/package.json b/package.json index c1b79cc10e..837918e8a4 100644 --- a/package.json +++ b/package.json @@ -120,23 +120,23 @@ "@rollup/plugin-sucrase": "^5.0.1", "@rollup/plugin-typescript": "^11.1.0", "@rollup/plugin-virtual": "^3.0.1", - "@sveltejs/eslint-config": "github:sveltejs/eslint-config#v5.8.0", + "@sveltejs/eslint-config": "github:sveltejs/eslint-config", "@types/aria-query": "^5.0.1", "@types/estree": "^1.0.0", "@types/mocha": "^10.0.1", "@types/node": "^14.14.31", "@typescript-eslint/eslint-plugin": "^5.58.0", - "@typescript-eslint/parser": "^5.58.0", "acorn": "^8.8.2", "agadoo": "^3.0.0", "aria-query": "^5.1.3", "axobject-query": "^3.1.1", "code-red": "^1.0.0", "css-tree": "^2.3.1", - "eslint": "^8.35.0", + "eslint": "^8.40.0", "eslint-config-prettier": "^8.8.0", "eslint-plugin-import": "^2.27.5", - "eslint-plugin-svelte3": "^4.0.0", + "eslint-plugin-svelte": "^2.28.0", + "eslint-plugin-unicorn": "^47.0.0", "estree-walker": "^3.0.3", "happy-dom": "^9.18.3", "is-reference": "^3.0.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 027adb4980..1867cf8f74 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -32,8 +32,8 @@ devDependencies: specifier: ^3.0.1 version: 3.0.1(rollup@3.20.2) '@sveltejs/eslint-config': - specifier: github:sveltejs/eslint-config#v5.8.0 - version: github.com/sveltejs/eslint-config/9a7d728e03ac433e5856a6e06775c17ee986d641(@typescript-eslint/eslint-plugin@5.58.0)(@typescript-eslint/parser@5.58.0)(eslint-plugin-import@2.27.5)(eslint-plugin-node@11.1.0)(eslint-plugin-svelte3@4.0.0)(eslint@8.35.0)(typescript@5.0.4) + specifier: github:sveltejs/eslint-config + version: github.com/sveltejs/eslint-config/a651fa341603aa39ac2a56535ec3282257299207(@typescript-eslint/eslint-plugin@5.58.0)(@typescript-eslint/parser@5.58.0)(eslint-config-prettier@8.8.0)(eslint-plugin-import@2.27.5)(eslint-plugin-node@11.1.0)(eslint-plugin-svelte@2.28.0)(eslint-plugin-unicorn@47.0.0)(eslint@8.40.0)(typescript@5.0.4) '@types/aria-query': specifier: ^5.0.1 version: 5.0.1 @@ -48,10 +48,7 @@ devDependencies: version: 14.14.31 '@typescript-eslint/eslint-plugin': specifier: ^5.58.0 - version: 5.58.0(@typescript-eslint/parser@5.58.0)(eslint@8.35.0)(typescript@5.0.4) - '@typescript-eslint/parser': - specifier: ^5.58.0 - version: 5.58.0(eslint@8.35.0)(typescript@5.0.4) + version: 5.58.0(@typescript-eslint/parser@5.58.0)(eslint@8.40.0)(typescript@5.0.4) acorn: specifier: ^8.8.2 version: 8.8.2 @@ -71,17 +68,20 @@ devDependencies: specifier: ^2.3.1 version: 2.3.1 eslint: - specifier: ^8.35.0 - version: 8.35.0 + specifier: ^8.40.0 + version: 8.40.0 eslint-config-prettier: specifier: ^8.8.0 - version: 8.8.0(eslint@8.35.0) + version: 8.8.0(eslint@8.40.0) eslint-plugin-import: specifier: ^2.27.5 - version: 2.27.5(@typescript-eslint/parser@5.58.0)(eslint@8.35.0) - eslint-plugin-svelte3: - specifier: ^4.0.0 - version: 4.0.0(eslint@8.35.0)(svelte@3.59.1) + version: 2.27.5(@typescript-eslint/parser@5.58.0)(eslint@8.40.0) + eslint-plugin-svelte: + specifier: ^2.28.0 + version: 2.28.0(eslint@8.40.0)(svelte@3.59.1) + eslint-plugin-unicorn: + specifier: ^47.0.0 + version: 47.0.0(eslint@8.40.0) estree-walker: specifier: ^3.0.3 version: 3.0.3 @@ -157,13 +157,11 @@ packages: dependencies: '@babel/highlight': 7.18.6 dev: true - optional: true /@babel/helper-validator-identifier@7.19.1: resolution: {integrity: sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==} engines: {node: '>=6.9.0'} dev: true - optional: true /@babel/highlight@7.18.6: resolution: {integrity: sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==} @@ -173,7 +171,6 @@ packages: chalk: 2.4.2 js-tokens: 4.0.0 dev: true - optional: true /@esbuild/android-arm64@0.17.19: resolution: {integrity: sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==} @@ -373,14 +370,14 @@ packages: dev: true optional: true - /@eslint-community/eslint-utils@4.4.0(eslint@8.35.0): + /@eslint-community/eslint-utils@4.4.0(eslint@8.40.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: - eslint: 8.35.0 - eslint-visitor-keys: 3.4.0 + eslint: 8.40.0 + eslint-visitor-keys: 3.4.1 dev: true /@eslint-community/regexpp@4.5.0: @@ -388,13 +385,13 @@ packages: engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} dev: true - /@eslint/eslintrc@2.0.2: - resolution: {integrity: sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ==} + /@eslint/eslintrc@2.0.3: + resolution: {integrity: sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 debug: 4.3.4 - espree: 9.5.1 + espree: 9.5.2 globals: 13.20.0 ignore: 5.2.4 import-fresh: 3.3.0 @@ -405,8 +402,8 @@ packages: - supports-color dev: true - /@eslint/js@8.35.0: - resolution: {integrity: sha512-JXdzbRiWclLVoD8sNUjR443VVlYqiYmDVT6rGUEIEHU5YJW0gaVZwV2xgM7D4arkvASqD0IlLUVjHiFuxaftRw==} + /@eslint/js@8.40.0: + resolution: {integrity: sha512-ElyB54bJIhXQYVKjDSvCkPO1iU1tSAeVQJbllWJq1XQSmmA4dgFk8CbiBGpiOPxleE48vDogxCtmMYku4HSVLA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true @@ -659,6 +656,10 @@ packages: resolution: {integrity: sha512-vFHy/ezP5qI0rFgJ7aQnjDXwAMrG0KqqIH7tQG5PPv3BWBayOPIQNBjVc/P6hhdZfMx51REc6tfDNXHUio893g==} dev: true + /@types/normalize-package-data@2.4.1: + resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} + dev: true + /@types/resolve@1.20.2: resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} dev: true @@ -667,7 +668,7 @@ packages: resolution: {integrity: sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==} dev: true - /@typescript-eslint/eslint-plugin@5.58.0(@typescript-eslint/parser@5.58.0)(eslint@8.35.0)(typescript@5.0.4): + /@typescript-eslint/eslint-plugin@5.58.0(@typescript-eslint/parser@5.58.0)(eslint@8.40.0)(typescript@5.0.4): resolution: {integrity: sha512-vxHvLhH0qgBd3/tW6/VccptSfc8FxPQIkmNTVLWcCOVqSBvqpnKkBTYrhcGlXfSnd78azwe+PsjYFj0X34/njA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -679,12 +680,12 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.5.0 - '@typescript-eslint/parser': 5.58.0(eslint@8.35.0)(typescript@5.0.4) + '@typescript-eslint/parser': 5.58.0(eslint@8.40.0)(typescript@5.0.4) '@typescript-eslint/scope-manager': 5.58.0 - '@typescript-eslint/type-utils': 5.58.0(eslint@8.35.0)(typescript@5.0.4) - '@typescript-eslint/utils': 5.58.0(eslint@8.35.0)(typescript@5.0.4) + '@typescript-eslint/type-utils': 5.58.0(eslint@8.40.0)(typescript@5.0.4) + '@typescript-eslint/utils': 5.58.0(eslint@8.40.0)(typescript@5.0.4) debug: 4.3.4 - eslint: 8.35.0 + eslint: 8.40.0 grapheme-splitter: 1.0.4 ignore: 5.2.4 natural-compare-lite: 1.4.0 @@ -695,7 +696,7 @@ packages: - supports-color dev: true - /@typescript-eslint/parser@5.58.0(eslint@8.35.0)(typescript@5.0.4): + /@typescript-eslint/parser@5.58.0(eslint@8.40.0)(typescript@5.0.4): resolution: {integrity: sha512-ixaM3gRtlfrKzP8N6lRhBbjTow1t6ztfBvQNGuRM8qH1bjFFXIJ35XY+FC0RRBKn3C6cT+7VW1y8tNm7DwPHDQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -709,7 +710,7 @@ packages: '@typescript-eslint/types': 5.58.0 '@typescript-eslint/typescript-estree': 5.58.0(typescript@5.0.4) debug: 4.3.4 - eslint: 8.35.0 + eslint: 8.40.0 typescript: 5.0.4 transitivePeerDependencies: - supports-color @@ -723,7 +724,7 @@ packages: '@typescript-eslint/visitor-keys': 5.58.0 dev: true - /@typescript-eslint/type-utils@5.58.0(eslint@8.35.0)(typescript@5.0.4): + /@typescript-eslint/type-utils@5.58.0(eslint@8.40.0)(typescript@5.0.4): resolution: {integrity: sha512-FF5vP/SKAFJ+LmR9PENql7fQVVgGDOS+dq3j+cKl9iW/9VuZC/8CFmzIP0DLKXfWKpRHawJiG70rVH+xZZbp8w==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -734,9 +735,9 @@ packages: optional: true dependencies: '@typescript-eslint/typescript-estree': 5.58.0(typescript@5.0.4) - '@typescript-eslint/utils': 5.58.0(eslint@8.35.0)(typescript@5.0.4) + '@typescript-eslint/utils': 5.58.0(eslint@8.40.0)(typescript@5.0.4) debug: 4.3.4 - eslint: 8.35.0 + eslint: 8.40.0 tsutils: 3.21.0(typescript@5.0.4) typescript: 5.0.4 transitivePeerDependencies: @@ -769,19 +770,19 @@ packages: - supports-color dev: true - /@typescript-eslint/utils@5.58.0(eslint@8.35.0)(typescript@5.0.4): + /@typescript-eslint/utils@5.58.0(eslint@8.40.0)(typescript@5.0.4): resolution: {integrity: sha512-gAmLOTFXMXOC+zP1fsqm3VceKSBQJNzV385Ok3+yzlavNHZoedajjS4UyS21gabJYcobuigQPs/z71A9MdJFqQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.35.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.40.0) '@types/json-schema': 7.0.11 '@types/semver': 7.3.13 '@typescript-eslint/scope-manager': 5.58.0 '@typescript-eslint/types': 5.58.0 '@typescript-eslint/typescript-estree': 5.58.0(typescript@5.0.4) - eslint: 8.35.0 + eslint: 8.40.0 eslint-scope: 5.1.1 semver: 7.4.0 transitivePeerDependencies: @@ -794,7 +795,7 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: '@typescript-eslint/types': 5.58.0 - eslint-visitor-keys: 3.4.0 + eslint-visitor-keys: 3.4.1 dev: true /@vitest/expect@0.31.1: @@ -904,7 +905,6 @@ packages: dependencies: color-convert: 1.9.3 dev: true - optional: true /ansi-styles@4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} @@ -1069,7 +1069,6 @@ packages: escape-string-regexp: 1.0.5 supports-color: 5.5.0 dev: true - optional: true /chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} @@ -1083,6 +1082,18 @@ packages: resolution: {integrity: sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==} dev: true + /ci-info@3.8.0: + resolution: {integrity: sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==} + engines: {node: '>=8'} + dev: true + + /clean-regexp@1.0.0: + resolution: {integrity: sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==} + engines: {node: '>=4'} + dependencies: + escape-string-regexp: 1.0.5 + dev: true + /code-red@1.0.0: resolution: {integrity: sha512-x5fNWOBu7Ii38br3iVPuwQcDQM0f2h8ipvqw4qTLlOzYlrFQRz954qR0hPZ8asV5KG/igXNY8CRG6xtDUoKOJQ==} dependencies: @@ -1098,7 +1109,6 @@ packages: dependencies: color-name: 1.1.3 dev: true - optional: true /color-convert@2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} @@ -1110,7 +1120,6 @@ packages: /color-name@1.1.3: resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} dev: true - optional: true /color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} @@ -1305,6 +1314,12 @@ packages: engines: {node: '>=0.12'} dev: true + /error-ex@1.3.2: + resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} + dependencies: + is-arrayish: 0.2.1 + dev: true + /es-abstract@1.21.2: resolution: {integrity: sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg==} engines: {node: '>= 0.4'} @@ -1417,7 +1432,6 @@ packages: resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} engines: {node: '>=0.8.0'} dev: true - optional: true /escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} @@ -1437,13 +1451,13 @@ packages: source-map: 0.6.1 dev: true - /eslint-config-prettier@8.8.0(eslint@8.35.0): + /eslint-config-prettier@8.8.0(eslint@8.40.0): resolution: {integrity: sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==} hasBin: true peerDependencies: eslint: '>=7.0.0' dependencies: - eslint: 8.35.0 + eslint: 8.40.0 dev: true /eslint-import-resolver-node@0.3.7: @@ -1456,7 +1470,7 @@ packages: - supports-color dev: true - /eslint-module-utils@2.7.4(@typescript-eslint/parser@5.58.0)(eslint-import-resolver-node@0.3.7)(eslint@8.35.0): + /eslint-module-utils@2.7.4(@typescript-eslint/parser@5.58.0)(eslint-import-resolver-node@0.3.7)(eslint@8.40.0): resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==} engines: {node: '>=4'} peerDependencies: @@ -1477,26 +1491,26 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.58.0(eslint@8.35.0)(typescript@5.0.4) + '@typescript-eslint/parser': 5.58.0(eslint@8.40.0)(typescript@5.0.4) debug: 3.2.7 - eslint: 8.35.0 + eslint: 8.40.0 eslint-import-resolver-node: 0.3.7 transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-es@3.0.1(eslint@8.35.0): + /eslint-plugin-es@3.0.1(eslint@8.40.0): resolution: {integrity: sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==} engines: {node: '>=8.10.0'} peerDependencies: eslint: '>=4.19.1' dependencies: - eslint: 8.35.0 + eslint: 8.40.0 eslint-utils: 2.1.0 regexpp: 3.2.0 dev: true - /eslint-plugin-import@2.27.5(@typescript-eslint/parser@5.58.0)(eslint@8.35.0): + /eslint-plugin-import@2.27.5(@typescript-eslint/parser@5.58.0)(eslint@8.40.0): resolution: {integrity: sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==} engines: {node: '>=4'} peerDependencies: @@ -1506,15 +1520,15 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.58.0(eslint@8.35.0)(typescript@5.0.4) + '@typescript-eslint/parser': 5.58.0(eslint@8.40.0)(typescript@5.0.4) array-includes: 3.1.6 array.prototype.flat: 1.3.1 array.prototype.flatmap: 1.3.1 debug: 3.2.7 doctrine: 2.1.0 - eslint: 8.35.0 + eslint: 8.40.0 eslint-import-resolver-node: 0.3.7 - eslint-module-utils: 2.7.4(@typescript-eslint/parser@5.58.0)(eslint-import-resolver-node@0.3.7)(eslint@8.35.0) + eslint-module-utils: 2.7.4(@typescript-eslint/parser@5.58.0)(eslint-import-resolver-node@0.3.7)(eslint@8.40.0) has: 1.0.3 is-core-module: 2.12.0 is-glob: 4.0.3 @@ -1529,14 +1543,14 @@ packages: - supports-color dev: true - /eslint-plugin-node@11.1.0(eslint@8.35.0): + /eslint-plugin-node@11.1.0(eslint@8.40.0): resolution: {integrity: sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==} engines: {node: '>=8.10.0'} peerDependencies: eslint: '>=5.16.0' dependencies: - eslint: 8.35.0 - eslint-plugin-es: 3.0.1(eslint@8.35.0) + eslint: 8.40.0 + eslint-plugin-es: 3.0.1(eslint@8.40.0) eslint-utils: 2.1.0 ignore: 5.2.4 minimatch: 3.1.2 @@ -1544,14 +1558,55 @@ packages: semver: 6.3.0 dev: true - /eslint-plugin-svelte3@4.0.0(eslint@8.35.0)(svelte@3.59.1): - resolution: {integrity: sha512-OIx9lgaNzD02+MDFNLw0GEUbuovNcglg+wnd/UY0fbZmlQSz7GlQiQ1f+yX0XvC07XPcDOnFcichqI3xCwp71g==} + /eslint-plugin-svelte@2.28.0(eslint@8.40.0)(svelte@3.59.1): + resolution: {integrity: sha512-bXPXKnjq5uKoVAQtC2E0L1Vp+mmJ3nlC9jyz8zwfZ99pQROL2h7Hes01QdYil1vxgh6tLXl5YVpZ2wwyAbBz5g==} + engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: - eslint: '>=8.0.0' - svelte: ^3.2.0 + eslint: ^7.0.0 || ^8.0.0-0 + svelte: ^3.37.0 + peerDependenciesMeta: + svelte: + optional: true dependencies: - eslint: 8.35.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@8.40.0) + '@jridgewell/sourcemap-codec': 1.4.15 + debug: 4.3.4 + eslint: 8.40.0 + esutils: 2.0.3 + known-css-properties: 0.27.0 + postcss: 8.4.23 + postcss-load-config: 3.1.4(postcss@8.4.23) + postcss-safe-parser: 6.0.0(postcss@8.4.23) svelte: 3.59.1 + svelte-eslint-parser: 0.28.0(svelte@3.59.1) + transitivePeerDependencies: + - supports-color + - ts-node + dev: true + + /eslint-plugin-unicorn@47.0.0(eslint@8.40.0): + resolution: {integrity: sha512-ivB3bKk7fDIeWOUmmMm9o3Ax9zbMz1Bsza/R2qm46ufw4T6VBFBaJIR1uN3pCKSmSXm8/9Nri8V+iUut1NhQGA==} + engines: {node: '>=16'} + peerDependencies: + eslint: '>=8.38.0' + dependencies: + '@babel/helper-validator-identifier': 7.19.1 + '@eslint-community/eslint-utils': 4.4.0(eslint@8.40.0) + ci-info: 3.8.0 + clean-regexp: 1.0.0 + eslint: 8.40.0 + esquery: 1.5.0 + indent-string: 4.0.0 + is-builtin-module: 3.2.1 + jsesc: 3.0.2 + lodash: 4.17.21 + pluralize: 8.0.0 + read-pkg-up: 7.0.1 + regexp-tree: 0.1.27 + regjsparser: 0.10.0 + safe-regex: 2.1.1 + semver: 7.4.0 + strip-indent: 3.0.0 dev: true /eslint-scope@5.1.1: @@ -1562,8 +1617,8 @@ packages: estraverse: 4.3.0 dev: true - /eslint-scope@7.1.1: - resolution: {integrity: sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==} + /eslint-scope@7.2.0: + resolution: {integrity: sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: esrecurse: 4.3.0 @@ -1577,38 +1632,25 @@ packages: eslint-visitor-keys: 1.3.0 dev: true - /eslint-utils@3.0.0(eslint@8.35.0): - resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} - engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} - peerDependencies: - eslint: '>=5' - dependencies: - eslint: 8.35.0 - eslint-visitor-keys: 2.1.0 - dev: true - /eslint-visitor-keys@1.3.0: resolution: {integrity: sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==} engines: {node: '>=4'} dev: true - /eslint-visitor-keys@2.1.0: - resolution: {integrity: sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==} - engines: {node: '>=10'} - dev: true - - /eslint-visitor-keys@3.4.0: - resolution: {integrity: sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==} + /eslint-visitor-keys@3.4.1: + resolution: {integrity: sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint@8.35.0: - resolution: {integrity: sha512-BxAf1fVL7w+JLRQhWl2pzGeSiGqbWumV4WNvc9Rhp6tiCtm4oHnyPBSEtMGZwrQgudFQ+otqzWoPB7x+hxoWsw==} + /eslint@8.40.0: + resolution: {integrity: sha512-bvR+TsP9EHL3TqNtj9sCNJVAFK3fBN8Q7g5waghxyRsPLIMwL73XSKnZFK0hk/O2ANC+iAoq6PWMQ+IfBAJIiQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint/eslintrc': 2.0.2 - '@eslint/js': 8.35.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@8.40.0) + '@eslint-community/regexpp': 4.5.0 + '@eslint/eslintrc': 2.0.3 + '@eslint/js': 8.40.0 '@humanwhocodes/config-array': 0.11.8 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 @@ -1618,10 +1660,9 @@ packages: debug: 4.3.4 doctrine: 3.0.0 escape-string-regexp: 4.0.0 - eslint-scope: 7.1.1 - eslint-utils: 3.0.0(eslint@8.35.0) - eslint-visitor-keys: 3.4.0 - espree: 9.5.1 + eslint-scope: 7.2.0 + eslint-visitor-keys: 3.4.1 + espree: 9.5.2 esquery: 1.5.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 @@ -1643,7 +1684,6 @@ packages: minimatch: 3.1.2 natural-compare: 1.4.0 optionator: 0.9.1 - regexpp: 3.2.0 strip-ansi: 6.0.1 strip-json-comments: 3.1.1 text-table: 0.2.0 @@ -1651,13 +1691,13 @@ packages: - supports-color dev: true - /espree@9.5.1: - resolution: {integrity: sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg==} + /espree@9.5.2: + resolution: {integrity: sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: acorn: 8.8.2 acorn-jsx: 5.3.2(acorn@8.8.2) - eslint-visitor-keys: 3.4.0 + eslint-visitor-keys: 3.4.1 dev: true /esprima@4.0.1: @@ -1752,6 +1792,14 @@ packages: to-regex-range: 5.0.1 dev: true + /find-up@4.1.0: + resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} + engines: {node: '>=8'} + dependencies: + locate-path: 5.0.0 + path-exists: 4.0.0 + dev: true + /find-up@5.0.0: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} @@ -1947,7 +1995,6 @@ packages: resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} engines: {node: '>=4'} dev: true - optional: true /has-flag@4.0.0: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} @@ -1984,6 +2031,10 @@ packages: function-bind: 1.1.1 dev: true + /hosted-git-info@2.8.9: + resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} + dev: true + /html-encoding-sniffer@3.0.0: resolution: {integrity: sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==} engines: {node: '>=12'} @@ -2037,6 +2088,11 @@ packages: engines: {node: '>=0.8.19'} dev: true + /indent-string@4.0.0: + resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} + engines: {node: '>=8'} + dev: true + /inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} dependencies: @@ -2073,6 +2129,10 @@ packages: is-typed-array: 1.1.10 dev: true + /is-arrayish@0.2.1: + resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} + dev: true + /is-bigint@1.0.4: resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} dependencies: @@ -2257,7 +2317,6 @@ packages: /js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} dev: true - optional: true /js-yaml@4.1.0: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} @@ -2307,6 +2366,21 @@ packages: - utf-8-validate dev: true + /jsesc@0.5.0: + resolution: {integrity: sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==} + hasBin: true + dev: true + + /jsesc@3.0.2: + resolution: {integrity: sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==} + engines: {node: '>=6'} + hasBin: true + dev: true + + /json-parse-even-better-errors@2.3.1: + resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} + dev: true + /json-schema-traverse@0.4.1: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} dev: true @@ -2331,6 +2405,10 @@ packages: engines: {node: '>=6'} dev: true + /known-css-properties@0.27.0: + resolution: {integrity: sha512-uMCj6+hZYDoffuvAJjFAPz56E9uoowFHmTkqRtRq5WyC5Q6Cu/fTZKNQpX/RbzChBYLLl3lo8CjFZBAZXq9qFg==} + dev: true + /levn@0.3.0: resolution: {integrity: sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==} engines: {node: '>= 0.8.0'} @@ -2347,6 +2425,11 @@ packages: type-check: 0.4.0 dev: true + /lilconfig@2.1.0: + resolution: {integrity: sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==} + engines: {node: '>=10'} + dev: true + /lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} dev: true @@ -2360,6 +2443,13 @@ packages: resolution: {integrity: sha512-n2GmejDXtOPBAZdIiEFy5dJ5N38xBCXLNOtw2WpB9kGh6pnrEuKlwYI+Tkpofc4wDtVXHtoAOJaMRlYG/oYaxg==} dev: true + /locate-path@5.0.0: + resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} + engines: {node: '>=8'} + dependencies: + p-locate: 4.1.0 + dev: true + /locate-path@6.0.0: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} @@ -2438,6 +2528,11 @@ packages: mime-db: 1.52.0 dev: true + /min-indent@1.0.1: + resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} + engines: {node: '>=4'} + dev: true + /minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} dependencies: @@ -2494,6 +2589,15 @@ packages: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} dev: true + /normalize-package-data@2.5.0: + resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} + dependencies: + hosted-git-info: 2.8.9 + resolve: 1.22.2 + semver: 5.7.1 + validate-npm-package-license: 3.0.4 + dev: true + /nwsapi@2.2.3: resolution: {integrity: sha512-jscxIO4/VKScHlbmFBdV1Z6LXnLO+ZR4VMtypudUdfwtKxUN3TQcNFIHLwKtrUbDyHN4/GycY9+oRGZ2XMXYPw==} dev: true @@ -2569,6 +2673,13 @@ packages: word-wrap: 1.2.3 dev: true + /p-limit@2.3.0: + resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} + engines: {node: '>=6'} + dependencies: + p-try: 2.2.0 + dev: true + /p-limit@3.1.0: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} engines: {node: '>=10'} @@ -2583,6 +2694,13 @@ packages: yocto-queue: 1.0.0 dev: true + /p-locate@4.1.0: + resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} + engines: {node: '>=8'} + dependencies: + p-limit: 2.3.0 + dev: true + /p-locate@5.0.0: resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} engines: {node: '>=10'} @@ -2590,6 +2708,11 @@ packages: p-limit: 3.1.0 dev: true + /p-try@2.2.0: + resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} + engines: {node: '>=6'} + dev: true + /parent-module@1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} @@ -2597,6 +2720,16 @@ packages: callsites: 3.1.0 dev: true + /parse-json@5.2.0: + resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} + engines: {node: '>=8'} + dependencies: + '@babel/code-frame': 7.21.4 + error-ex: 1.3.2 + json-parse-even-better-errors: 2.3.1 + lines-and-columns: 1.2.4 + dev: true + /parse5@7.1.2: resolution: {integrity: sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==} dependencies: @@ -2671,6 +2804,37 @@ packages: hasBin: true dev: true + /pluralize@8.0.0: + resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} + engines: {node: '>=4'} + dev: true + + /postcss-load-config@3.1.4(postcss@8.4.23): + resolution: {integrity: sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==} + engines: {node: '>= 10'} + peerDependencies: + postcss: '>=8.0.9' + ts-node: '>=9.0.0' + peerDependenciesMeta: + postcss: + optional: true + ts-node: + optional: true + dependencies: + lilconfig: 2.1.0 + postcss: 8.4.23 + yaml: 1.10.2 + dev: true + + /postcss-safe-parser@6.0.0(postcss@8.4.23): + resolution: {integrity: sha512-FARHN8pwH+WiS2OPCxJI8FuRJpTVnn6ZNFiqAM2aeW2LwTHWWmWgIyKC6cUo0L8aeKiF/14MNvnpls6R2PBeMQ==} + engines: {node: '>=12.0'} + peerDependencies: + postcss: ^8.3.3 + dependencies: + postcss: 8.4.23 + dev: true + /postcss@8.4.23: resolution: {integrity: sha512-bQ3qMcpF6A/YjR55xtoTr0jGOlnPOKAIMdOWiv0EIT6HVPEaJiJB4NLljSbiHoC2RX7DN5Uvjtpbg1NPdwv1oA==} engines: {node: ^10 || ^12 || >=14} @@ -2736,6 +2900,30 @@ packages: resolution: {integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==} dev: true + /read-pkg-up@7.0.1: + resolution: {integrity: sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==} + engines: {node: '>=8'} + dependencies: + find-up: 4.1.0 + read-pkg: 5.2.0 + type-fest: 0.8.1 + dev: true + + /read-pkg@5.2.0: + resolution: {integrity: sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==} + engines: {node: '>=8'} + dependencies: + '@types/normalize-package-data': 2.4.1 + normalize-package-data: 2.5.0 + parse-json: 5.2.0 + type-fest: 0.6.0 + dev: true + + /regexp-tree@0.1.27: + resolution: {integrity: sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==} + hasBin: true + dev: true + /regexp.prototype.flags@1.4.3: resolution: {integrity: sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==} engines: {node: '>= 0.4'} @@ -2750,6 +2938,13 @@ packages: engines: {node: '>=8'} dev: true + /regjsparser@0.10.0: + resolution: {integrity: sha512-qx+xQGZVsy55CH0a1hiVwHmqjLryfh7wQyF5HO07XJ9f7dQMY/gPQHhlyDkIzJKC+x2fUCpCcUODUUUFrm7SHA==} + hasBin: true + dependencies: + jsesc: 0.5.0 + dev: true + /requires-port@1.0.0: resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} dev: true @@ -2828,6 +3023,12 @@ packages: is-regex: 1.1.4 dev: true + /safe-regex@2.1.1: + resolution: {integrity: sha512-rx+x8AMzKb5Q5lQ95Zoi6ZbJqwCLkqi3XuJXp5P3rT8OEc6sZCJG5AE5dU3lsgRr/F4Bs31jSlVN+j5KrsGu9A==} + dependencies: + regexp-tree: 0.1.27 + dev: true + /safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} dev: true @@ -2839,6 +3040,11 @@ packages: xmlchars: 2.2.0 dev: true + /semver@5.7.1: + resolution: {integrity: sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==} + hasBin: true + dev: true + /semver@6.3.0: resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} hasBin: true @@ -2903,6 +3109,28 @@ packages: engines: {node: '>= 8'} dev: true + /spdx-correct@3.2.0: + resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==} + dependencies: + spdx-expression-parse: 3.0.1 + spdx-license-ids: 3.0.13 + dev: true + + /spdx-exceptions@2.3.0: + resolution: {integrity: sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==} + dev: true + + /spdx-expression-parse@3.0.1: + resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} + dependencies: + spdx-exceptions: 2.3.0 + spdx-license-ids: 3.0.13 + dev: true + + /spdx-license-ids@3.0.13: + resolution: {integrity: sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w==} + dev: true + /stackback@0.0.2: resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} dev: true @@ -2955,6 +3183,13 @@ packages: engines: {node: '>=4'} dev: true + /strip-indent@3.0.0: + resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} + engines: {node: '>=8'} + dependencies: + min-indent: 1.0.1 + dev: true + /strip-json-comments@3.1.1: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} @@ -2986,7 +3221,6 @@ packages: dependencies: has-flag: 3.0.0 dev: true - optional: true /supports-color@7.2.0: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} @@ -3000,6 +3234,21 @@ packages: engines: {node: '>= 0.4'} dev: true + /svelte-eslint-parser@0.28.0(svelte@3.59.1): + resolution: {integrity: sha512-qWg5M3CIp7LkcdG5bpn44QEd48UxvgxG5L+Sbl701EG8Wujht7EqJuJhqgzvO3bbI9ENbWCXK49eCcwiNnpMzw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + svelte: ^3.37.0 + peerDependenciesMeta: + svelte: + optional: true + dependencies: + eslint-scope: 7.2.0 + eslint-visitor-keys: 3.4.1 + espree: 9.5.2 + svelte: 3.59.1 + dev: true + /svelte@3.59.1: resolution: {integrity: sha512-pKj8fEBmqf6mq3/NfrB9SLtcJcUvjYSWyePlfCqN9gujLB25RitWK8PvFzlwim6hD/We35KbPlRteuA6rnPGcQ==} engines: {node: '>= 8'} @@ -3131,6 +3380,16 @@ packages: engines: {node: '>=10'} dev: true + /type-fest@0.6.0: + resolution: {integrity: sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==} + engines: {node: '>=8'} + dev: true + + /type-fest@0.8.1: + resolution: {integrity: sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==} + engines: {node: '>=8'} + dev: true + /typed-array-length@1.0.4: resolution: {integrity: sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==} dependencies: @@ -3186,6 +3445,13 @@ packages: which-typed-array: 1.1.9 dev: true + /validate-npm-package-license@3.0.4: + resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} + dependencies: + spdx-correct: 3.2.0 + spdx-expression-parse: 3.0.1 + dev: true + /vite-node@0.31.1(@types/node@14.14.31): resolution: {integrity: sha512-BajE/IsNQ6JyizPzu9zRgHrBwczkAs0erQf/JRpgTIESpKvNj9/Gd0vxX905klLkb0I0SJVCKbdrl5c6FnqYKA==} engines: {node: '>=v14.18.0'} @@ -3427,6 +3693,11 @@ packages: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} dev: true + /yaml@1.10.2: + resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==} + engines: {node: '>= 6'} + dev: true + /yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} @@ -3437,25 +3708,29 @@ packages: engines: {node: '>=12.20'} dev: true - github.com/sveltejs/eslint-config/9a7d728e03ac433e5856a6e06775c17ee986d641(@typescript-eslint/eslint-plugin@5.58.0)(@typescript-eslint/parser@5.58.0)(eslint-plugin-import@2.27.5)(eslint-plugin-node@11.1.0)(eslint-plugin-svelte3@4.0.0)(eslint@8.35.0)(typescript@5.0.4): - resolution: {tarball: https://codeload.github.com/sveltejs/eslint-config/tar.gz/9a7d728e03ac433e5856a6e06775c17ee986d641} - id: github.com/sveltejs/eslint-config/9a7d728e03ac433e5856a6e06775c17ee986d641 + github.com/sveltejs/eslint-config/a651fa341603aa39ac2a56535ec3282257299207(@typescript-eslint/eslint-plugin@5.58.0)(@typescript-eslint/parser@5.58.0)(eslint-config-prettier@8.8.0)(eslint-plugin-import@2.27.5)(eslint-plugin-node@11.1.0)(eslint-plugin-svelte@2.28.0)(eslint-plugin-unicorn@47.0.0)(eslint@8.40.0)(typescript@5.0.4): + resolution: {tarball: https://codeload.github.com/sveltejs/eslint-config/tar.gz/a651fa341603aa39ac2a56535ec3282257299207} + id: github.com/sveltejs/eslint-config/a651fa341603aa39ac2a56535ec3282257299207 name: '@sveltejs/eslint-config' version: 5.8.0 peerDependencies: - '@typescript-eslint/eslint-plugin': '>= 3' - '@typescript-eslint/parser': '>= 3' - eslint: '>= 7' + '@typescript-eslint/eslint-plugin': '>= 5' + '@typescript-eslint/parser': '>= 5' + eslint: '>= 8' + eslint-config-prettier: '>= 8' eslint-plugin-import: '>= 2' eslint-plugin-node: '>= 11' - eslint-plugin-svelte3: '>= 2' - typescript: '>= 3' - dependencies: - '@typescript-eslint/eslint-plugin': 5.58.0(@typescript-eslint/parser@5.58.0)(eslint@8.35.0)(typescript@5.0.4) - '@typescript-eslint/parser': 5.58.0(eslint@8.35.0)(typescript@5.0.4) - eslint: 8.35.0 - eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.58.0)(eslint@8.35.0) - eslint-plugin-node: 11.1.0(eslint@8.35.0) - eslint-plugin-svelte3: 4.0.0(eslint@8.35.0)(svelte@3.59.1) + eslint-plugin-svelte: '>= 2' + eslint-plugin-unicorn: '>= 47' + typescript: '>= 5' + dependencies: + '@typescript-eslint/eslint-plugin': 5.58.0(@typescript-eslint/parser@5.58.0)(eslint@8.40.0)(typescript@5.0.4) + '@typescript-eslint/parser': 5.58.0(eslint@8.40.0)(typescript@5.0.4) + eslint: 8.40.0 + eslint-config-prettier: 8.8.0(eslint@8.40.0) + eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.58.0)(eslint@8.40.0) + eslint-plugin-node: 11.1.0(eslint@8.40.0) + eslint-plugin-svelte: 2.28.0(eslint@8.40.0)(svelte@3.59.1) + eslint-plugin-unicorn: 47.0.0(eslint@8.40.0) typescript: 5.0.4 dev: true diff --git a/src/compiler/compile/utils/contenteditable.js b/src/compiler/compile/utils/contenteditable.js index bb49b9ee80..8c8c61f0f7 100644 --- a/src/compiler/compile/utils/contenteditable.js +++ b/src/compiler/compile/utils/contenteditable.js @@ -1,6 +1,7 @@ // Utilities for managing contenteditable nodes -import Attribute from '../nodes/Attribute.js'; -import Element from '../nodes/Element.js'; + +/** @typedef {import('../nodes/Attribute.js').default} Attribute */ +/** @typedef {import('../nodes/Element.js').default} Element */ export const CONTENTEDITABLE_BINDINGS = ['textContent', 'innerHTML', 'innerText']; diff --git a/test/css/css.test.js b/test/css/css.test.js index 0888d39608..54f3600f5a 100644 --- a/test/css/css.test.js +++ b/test/css/css.test.js @@ -1,6 +1,6 @@ // @vitest-environment happy-dom -import * as fs from 'fs'; +import * as fs from 'node:fs'; import { assert, describe, it } from 'vitest'; import * as svelte from '../../src/compiler/index.js'; import { create_loader, should_update_expected, try_load_config } from '../helpers.js'; diff --git a/test/custom-elements/custom-elements.test.js b/test/custom-elements/custom-elements.test.js index d0789b0fb2..2083a39951 100644 --- a/test/custom-elements/custom-elements.test.js +++ b/test/custom-elements/custom-elements.test.js @@ -1,6 +1,6 @@ import { chromium } from '@playwright/test'; -import * as fs from 'fs'; -import * as path from 'path'; +import * as fs from 'node:fs'; +import * as path from 'node:path'; import { rollup } from 'rollup'; import { try_load_config } from '../helpers.js'; import * as svelte from '../../src/compiler/index.js'; @@ -55,13 +55,13 @@ describe( return index; } - if (importee === 'assert') { - return 'assert'; + if (importee === 'assert.js') { + return '\0virtual:assert'; } }, load(id) { - if (id === 'assert') return browser_assert; + if (id === '\0virtual:assert') return browser_assert; }, transform(code, id) { @@ -103,7 +103,7 @@ describe( }); await page.setContent('
'); await page.evaluate(generated_bundle.output[0].code); - const test_result = await page.evaluate(`test(document.querySelector('main'))`); + const test_result = await page.evaluate("test(document.querySelector('main'))"); if (test_result) console.log(test_result); diff --git a/test/custom-elements/samples/$$props/test.js b/test/custom-elements/samples/$$props/test.js index d1026b962b..e42e90bcde 100644 --- a/test/custom-elements/samples/$$props/test.js +++ b/test/custom-elements/samples/$$props/test.js @@ -1,4 +1,4 @@ -import * as assert from 'assert'; +import * as assert from 'assert.js'; import { tick } from 'svelte'; import './main.svelte'; diff --git a/test/custom-elements/samples/$$slot-dynamic-content/test.js b/test/custom-elements/samples/$$slot-dynamic-content/test.js index 00ed5ce87f..bccf95e5b0 100644 --- a/test/custom-elements/samples/$$slot-dynamic-content/test.js +++ b/test/custom-elements/samples/$$slot-dynamic-content/test.js @@ -1,4 +1,4 @@ -import * as assert from 'assert'; +import * as assert from 'assert.js'; import { tick } from 'svelte'; import Component from './main.svelte'; diff --git a/test/custom-elements/samples/$$slot/test.js b/test/custom-elements/samples/$$slot/test.js index 08b95593b2..46585dd496 100644 --- a/test/custom-elements/samples/$$slot/test.js +++ b/test/custom-elements/samples/$$slot/test.js @@ -1,4 +1,4 @@ -import * as assert from 'assert'; +import * as assert from 'assert.js'; import { tick } from 'svelte'; import './main.svelte'; diff --git a/test/custom-elements/samples/action/test.js b/test/custom-elements/samples/action/test.js index 4619ae8568..c55c14e210 100644 --- a/test/custom-elements/samples/action/test.js +++ b/test/custom-elements/samples/action/test.js @@ -1,4 +1,4 @@ -import * as assert from 'assert'; +import * as assert from 'assert.js'; import { tick } from 'svelte'; import './main.svelte'; diff --git a/test/custom-elements/samples/camel-case-attribute/test.js b/test/custom-elements/samples/camel-case-attribute/test.js index c446bef6bc..dff09b3a24 100644 --- a/test/custom-elements/samples/camel-case-attribute/test.js +++ b/test/custom-elements/samples/camel-case-attribute/test.js @@ -1,4 +1,4 @@ -import * as assert from 'assert'; +import * as assert from 'assert.js'; import { tick } from 'svelte'; import './main.svelte'; diff --git a/test/custom-elements/samples/ce-options-valid/test.js b/test/custom-elements/samples/ce-options-valid/test.js index 9fa19e53a2..3d6fea99fa 100644 --- a/test/custom-elements/samples/ce-options-valid/test.js +++ b/test/custom-elements/samples/ce-options-valid/test.js @@ -1,4 +1,4 @@ -import * as assert from 'assert'; +import * as assert from 'assert.js'; import { tick } from 'svelte'; import './main.svelte'; diff --git a/test/custom-elements/samples/custom-method/test.js b/test/custom-elements/samples/custom-method/test.js index ba1ca25176..6b3a1d3544 100644 --- a/test/custom-elements/samples/custom-method/test.js +++ b/test/custom-elements/samples/custom-method/test.js @@ -1,4 +1,4 @@ -import * as assert from 'assert'; +import * as assert from 'assert.js'; import { tick } from 'svelte'; import './main.svelte'; diff --git a/test/custom-elements/samples/escaped-css/test.js b/test/custom-elements/samples/escaped-css/test.js index 1b7e2ea7ce..9dc1a2ca02 100644 --- a/test/custom-elements/samples/escaped-css/test.js +++ b/test/custom-elements/samples/escaped-css/test.js @@ -1,4 +1,4 @@ -import * as assert from 'assert'; +import * as assert from 'assert.js'; import { tick } from 'svelte'; import './main.svelte'; diff --git a/test/custom-elements/samples/events/test.js b/test/custom-elements/samples/events/test.js index bdd9c0f9cc..8ffa134367 100644 --- a/test/custom-elements/samples/events/test.js +++ b/test/custom-elements/samples/events/test.js @@ -1,4 +1,4 @@ -import * as assert from 'assert'; +import * as assert from 'assert.js'; import { tick } from 'svelte'; import './main.svelte'; diff --git a/test/custom-elements/samples/extended-builtin/test.js b/test/custom-elements/samples/extended-builtin/test.js index ba5d27ea6d..cdc6d4b94d 100644 --- a/test/custom-elements/samples/extended-builtin/test.js +++ b/test/custom-elements/samples/extended-builtin/test.js @@ -1,4 +1,4 @@ -import * as assert from 'assert'; +import * as assert from 'assert.js'; import { tick } from 'svelte'; import './main.svelte'; diff --git a/test/custom-elements/samples/html-slots/test.js b/test/custom-elements/samples/html-slots/test.js index 1282ac431d..3303a6898e 100644 --- a/test/custom-elements/samples/html-slots/test.js +++ b/test/custom-elements/samples/html-slots/test.js @@ -1,4 +1,4 @@ -import * as assert from 'assert'; +import * as assert from 'assert.js'; import { tick } from 'svelte'; import './main.svelte'; diff --git a/test/custom-elements/samples/html/test.js b/test/custom-elements/samples/html/test.js index d7764af397..ea42f14215 100644 --- a/test/custom-elements/samples/html/test.js +++ b/test/custom-elements/samples/html/test.js @@ -1,4 +1,4 @@ -import * as assert from 'assert'; +import * as assert from 'assert.js'; import { tick } from 'svelte'; import './main.svelte'; diff --git a/test/custom-elements/samples/nested/test.js b/test/custom-elements/samples/nested/test.js index 1dab15ba19..7503028be8 100644 --- a/test/custom-elements/samples/nested/test.js +++ b/test/custom-elements/samples/nested/test.js @@ -1,4 +1,4 @@ -import * as assert from 'assert'; +import * as assert from 'assert.js'; import { tick } from 'svelte'; import './main.svelte'; diff --git a/test/custom-elements/samples/new-styled/test.js b/test/custom-elements/samples/new-styled/test.js index bf7abb449e..cdb580a0b3 100644 --- a/test/custom-elements/samples/new-styled/test.js +++ b/test/custom-elements/samples/new-styled/test.js @@ -1,4 +1,4 @@ -import * as assert from 'assert'; +import * as assert from 'assert.js'; import { tick } from 'svelte'; import './main.svelte'; diff --git a/test/custom-elements/samples/no-missing-prop-warnings/test.js b/test/custom-elements/samples/no-missing-prop-warnings/test.js index f03d1787b8..d162a092be 100644 --- a/test/custom-elements/samples/no-missing-prop-warnings/test.js +++ b/test/custom-elements/samples/no-missing-prop-warnings/test.js @@ -1,4 +1,4 @@ -import * as assert from 'assert'; +import * as assert from 'assert.js'; import { tick } from 'svelte'; import './main.svelte'; diff --git a/test/custom-elements/samples/no-shadow-dom/test.js b/test/custom-elements/samples/no-shadow-dom/test.js index 744726fc79..97bd659a53 100644 --- a/test/custom-elements/samples/no-shadow-dom/test.js +++ b/test/custom-elements/samples/no-shadow-dom/test.js @@ -1,4 +1,4 @@ -import * as assert from 'assert'; +import * as assert from 'assert.js'; import { tick } from 'svelte'; import './main.svelte'; diff --git a/test/custom-elements/samples/no-tag/test.js b/test/custom-elements/samples/no-tag/test.js index b933d24c39..d019c55479 100644 --- a/test/custom-elements/samples/no-tag/test.js +++ b/test/custom-elements/samples/no-tag/test.js @@ -1,4 +1,4 @@ -import * as assert from 'assert'; +import * as assert from 'assert.js'; import { tick } from 'svelte'; import CustomElement from './main.svelte'; diff --git a/test/custom-elements/samples/oncreate/test.js b/test/custom-elements/samples/oncreate/test.js index d377efe156..00ddef7287 100644 --- a/test/custom-elements/samples/oncreate/test.js +++ b/test/custom-elements/samples/oncreate/test.js @@ -1,4 +1,4 @@ -import * as assert from 'assert'; +import * as assert from 'assert.js'; import { tick } from 'svelte'; import './main.svelte'; diff --git a/test/custom-elements/samples/ondestroy/test.js b/test/custom-elements/samples/ondestroy/test.js index 62ec07a419..10e98e115f 100644 --- a/test/custom-elements/samples/ondestroy/test.js +++ b/test/custom-elements/samples/ondestroy/test.js @@ -1,4 +1,4 @@ -import * as assert from 'assert'; +import * as assert from 'assert.js'; import { tick } from 'svelte'; import './main.svelte'; diff --git a/test/custom-elements/samples/props/test.js b/test/custom-elements/samples/props/test.js index 1f50c9be88..3be2fef856 100644 --- a/test/custom-elements/samples/props/test.js +++ b/test/custom-elements/samples/props/test.js @@ -1,4 +1,4 @@ -import * as assert from 'assert'; +import * as assert from 'assert.js'; import { tick } from 'svelte'; import './main.svelte'; diff --git a/test/custom-elements/samples/reflect-attributes/test.js b/test/custom-elements/samples/reflect-attributes/test.js index dfa925403d..53616bfdea 100644 --- a/test/custom-elements/samples/reflect-attributes/test.js +++ b/test/custom-elements/samples/reflect-attributes/test.js @@ -1,4 +1,4 @@ -import * as assert from 'assert'; +import * as assert from 'assert.js'; import { tick } from 'svelte'; import './main.svelte'; diff --git a/test/helpers.js b/test/helpers.js index beb0ddd4ba..33cf1ac198 100644 --- a/test/helpers.js +++ b/test/helpers.js @@ -1,10 +1,10 @@ -import * as fs from 'fs'; -import * as path from 'path'; +import * as fs from 'node:fs'; +import * as path from 'node:path'; import glob from 'tiny-glob/sync'; import colors from 'kleur'; import { assert } from 'vitest'; import { compile } from '../compiler.js'; -import { fileURLToPath } from 'url'; +import { fileURLToPath } from 'node:url'; export function try_load_json(file) { try { diff --git a/test/hydration/hydration.test.js b/test/hydration/hydration.test.js index 26b65910ea..4ba43d1a7a 100644 --- a/test/hydration/hydration.test.js +++ b/test/hydration/hydration.test.js @@ -1,8 +1,8 @@ // @vitest-environment jsdom // TODO: https://github.com/capricorn86/happy-dom/issues/916 -import * as fs from 'fs'; -import * as path from 'path'; +import * as fs from 'node:fs'; +import * as path from 'node:path'; import { assert, describe, it } from 'vitest'; import { create_loader, should_update_expected, try_load_config } from '../helpers.js'; import { assert_html_equal } from '../html_equal.js'; diff --git a/test/js/js-output.test.js b/test/js/js-output.test.js index 6aebea8178..3fd2b106cb 100644 --- a/test/js/js-output.test.js +++ b/test/js/js-output.test.js @@ -1,5 +1,5 @@ -import * as fs from 'fs'; -import * as path from 'path'; +import * as fs from 'node:fs'; +import * as path from 'node:path'; import { describe, it, assert } from 'vitest'; import { try_load_config, should_update_expected } from '../helpers.js'; import * as svelte from '../../src/compiler/index.js'; diff --git a/test/parser/parser.test.js b/test/parser/parser.test.js index b847c8d90b..0ac62ab070 100644 --- a/test/parser/parser.test.js +++ b/test/parser/parser.test.js @@ -1,4 +1,4 @@ -import * as fs from 'fs'; +import * as fs from 'node:fs'; import { assert, describe, it } from 'vitest'; import * as svelte from '../../src/compiler/index.js'; import { try_load_json } from '../helpers.js'; diff --git a/test/preprocess/preprocess.test.js b/test/preprocess/preprocess.test.js index a35667f4f9..8f7e368bb7 100644 --- a/test/preprocess/preprocess.test.js +++ b/test/preprocess/preprocess.test.js @@ -1,4 +1,4 @@ -import * as fs from 'fs'; +import * as fs from 'node:fs'; import * as svelte from '../../src/compiler/index.js'; import { try_load_config } from '../helpers.js'; import { describe, it } from 'vitest'; diff --git a/test/preprocess/samples/script-self-closing/_config.js b/test/preprocess/samples/script-self-closing/_config.js index ab87c7be1e..cde588fd58 100644 --- a/test/preprocess/samples/script-self-closing/_config.js +++ b/test/preprocess/samples/script-self-closing/_config.js @@ -1,4 +1,4 @@ -import * as assert from 'assert'; +import * as assert from 'node:assert'; export default { preprocess: { diff --git a/test/preprocess/samples/style-attributes/_config.js b/test/preprocess/samples/style-attributes/_config.js index ac2955397b..4fba7a5c36 100644 --- a/test/preprocess/samples/style-attributes/_config.js +++ b/test/preprocess/samples/style-attributes/_config.js @@ -1,4 +1,4 @@ -import * as assert from 'assert'; +import * as assert from 'node:assert'; export default { preprocess: { diff --git a/test/preprocess/samples/style-self-closing/_config.js b/test/preprocess/samples/style-self-closing/_config.js index af762e8da8..7e46878475 100644 --- a/test/preprocess/samples/style-self-closing/_config.js +++ b/test/preprocess/samples/style-self-closing/_config.js @@ -1,4 +1,4 @@ -import * as assert from 'assert'; +import * as assert from 'node:assert'; export default { preprocess: { diff --git a/test/runtime-browser/browser.test.js b/test/runtime-browser/browser.test.js index 2c8bc2d47a..a84ec67244 100644 --- a/test/runtime-browser/browser.test.js +++ b/test/runtime-browser/browser.test.js @@ -1,6 +1,6 @@ import { chromium } from '@playwright/test'; -import * as fs from 'fs'; -import * as path from 'path'; +import * as fs from 'node:fs'; +import * as path from 'node:path'; import { rollup } from 'rollup'; import { pretty_print_browser_assertion, try_load_config } from '../helpers.js'; import * as svelte from '../../src/compiler/index.js'; @@ -64,11 +64,11 @@ describe( } if (importee === 'main') { - return 'main'; + return '\0virtual:main'; } - if (importee === 'assert') { - return 'assert'; + if (importee === 'assert.js') { + return '\0virtual:assert'; } if (importee === '__MAIN_DOT_SVELTE__') { @@ -80,9 +80,9 @@ describe( } }, load(id) { - if (id === 'assert') return browser_assert; + if (id === '\0virtual:assert') return browser_assert; - if (id === 'main') { + if (id === '\0virtual:main') { return main.replace('__HYDRATE__', hydrate ? 'true' : 'false'); } return null; @@ -147,7 +147,7 @@ describe( }); await page.setContent('
'); await page.evaluate(generated_bundle.output[0].code); - const test_result = await page.evaluate(`test(document.querySelector('main'))`); + const test_result = await page.evaluate("test(document.querySelector('main'))"); if (test_result) console.log(test_result); assertWarnings(); diff --git a/test/runtime-browser/driver.js b/test/runtime-browser/driver.js index db7bad3958..286ddbe62d 100644 --- a/test/runtime-browser/driver.js +++ b/test/runtime-browser/driver.js @@ -2,7 +2,8 @@ import SvelteComponent from '__MAIN_DOT_SVELTE__'; // @ts-expect-error import config from '__CONFIG__'; -import * as assert from 'assert'; +// @ts-expect-error +import * as assert from 'assert.js'; export default async function (target) { let unhandled_rejection = false; diff --git a/test/runtime/runtime.test.js b/test/runtime/runtime.test.js index ff1fe0de9b..004045db3f 100644 --- a/test/runtime/runtime.test.js +++ b/test/runtime/runtime.test.js @@ -1,13 +1,13 @@ // @vitest-environment jsdom -import * as fs from 'fs'; -import * as path from 'path'; +import * as fs from 'node:fs'; +import * as path from 'node:path'; import glob from 'tiny-glob/sync.js'; import { beforeAll, afterAll, describe, it, assert } from 'vitest'; import { compile } from '../../src/compiler/index.js'; import { clear_loops, flush, set_now, set_raf } from 'svelte/internal'; import { show_output, try_load_config, mkdirp, create_loader } from '../helpers.js'; -import { setTimeout } from 'timers/promises'; +import { setTimeout } from 'node:timers/promises'; import { setup_html_equal } from '../html_equal.js'; let unhandled_rejection = false; @@ -125,7 +125,7 @@ describe('runtime', async () => { }); try { - mod = await load(`./main.svelte`); + mod = await load('./main.svelte'); SvelteComponent = mod.default; } catch (err) { show_output(cwd, compileOptions); // eslint-disable-line no-console @@ -148,7 +148,7 @@ describe('runtime', async () => { // ssr into target if (config.before_test) config.before_test(); - const SsrSvelteComponent = (await load_ssr(`./main.svelte`)).default; + const SsrSvelteComponent = (await load_ssr('./main.svelte')).default; const { html } = SsrSvelteComponent.render(config.props); target.innerHTML = html; diff --git a/test/runtime/samples/await-catch-no-expression/_config.js b/test/runtime/samples/await-catch-no-expression/_config.js index 6f6f60a06a..65580f926e 100644 --- a/test/runtime/samples/await-catch-no-expression/_config.js +++ b/test/runtime/samples/await-catch-no-expression/_config.js @@ -26,7 +26,7 @@ export default { deferred = create_deferred(); component.thePromise = deferred.promise; - assert.htmlEqual(target.innerHTML, `

the promise is pending

`); + assert.htmlEqual(target.innerHTML, '

the promise is pending

'); const rejection = deferred.promise .catch(() => {}) diff --git a/test/runtime/samples/await-catch-shorthand/_config.js b/test/runtime/samples/await-catch-shorthand/_config.js index 75b150463a..ccf1533f0e 100644 --- a/test/runtime/samples/await-catch-shorthand/_config.js +++ b/test/runtime/samples/await-catch-shorthand/_config.js @@ -31,7 +31,7 @@ export default { return deferred.promise.catch(() => {}); }) .then(() => { - assert.htmlEqual(target.innerHTML, `

oh no! something broke

`); + assert.htmlEqual(target.innerHTML, '

oh no! something broke

'); }); } }; diff --git a/test/runtime/samples/await-then-catch-anchor/_config.js b/test/runtime/samples/await-then-catch-anchor/_config.js index 249fdde755..1f41e87f35 100644 --- a/test/runtime/samples/await-then-catch-anchor/_config.js +++ b/test/runtime/samples/await-then-catch-anchor/_config.js @@ -31,14 +31,14 @@ export default { component.thePromise = deferred.promise; - assert.htmlEqual(target.innerHTML, `

loading...

`); + assert.htmlEqual(target.innerHTML, '

loading...

'); deferred.reject(new Error('something broke')); return deferred.promise.catch(() => {}); }) .then(() => { - assert.htmlEqual(target.innerHTML, `

oh no! something broke

`); + assert.htmlEqual(target.innerHTML, '

oh no! something broke

'); }); } }; diff --git a/test/runtime/samples/await-then-catch-event/_config.js b/test/runtime/samples/await-then-catch-event/_config.js index 8a6012cdc2..2705eb7e17 100644 --- a/test/runtime/samples/await-then-catch-event/_config.js +++ b/test/runtime/samples/await-then-catch-event/_config.js @@ -19,7 +19,7 @@ export default { return deferred.promise .then(async () => { - assert.htmlEqual(target.innerHTML, ``); + assert.htmlEqual(target.innerHTML, ''); const { button } = component; diff --git a/test/runtime/samples/await-then-catch-in-slot/_config.js b/test/runtime/samples/await-then-catch-in-slot/_config.js index 497c69a7d4..781095a0ba 100644 --- a/test/runtime/samples/await-then-catch-in-slot/_config.js +++ b/test/runtime/samples/await-then-catch-in-slot/_config.js @@ -19,11 +19,11 @@ export default { deferred.resolve(42); await deferred.promise; - assert.htmlEqual(target.innerHTML, `

the value is 42

`); + assert.htmlEqual(target.innerHTML, '

the value is 42

'); deferred = create_deferred(); component.thePromise = deferred.promise; - assert.htmlEqual(target.innerHTML, `

loading...

`); + assert.htmlEqual(target.innerHTML, '

loading...

'); deferred.reject(new Error('something broke')); @@ -31,6 +31,6 @@ export default { await deferred.promise; } catch {} - assert.htmlEqual(target.innerHTML, `

oh no! something broke

`); + assert.htmlEqual(target.innerHTML, '

oh no! something broke

'); } }; diff --git a/test/runtime/samples/await-then-catch/_config.js b/test/runtime/samples/await-then-catch/_config.js index ba2379a5d8..e6f0d1767a 100644 --- a/test/runtime/samples/await-then-catch/_config.js +++ b/test/runtime/samples/await-then-catch/_config.js @@ -30,14 +30,14 @@ export default { component.thePromise = deferred.promise; - assert.htmlEqual(target.innerHTML, `

loading...

`); + assert.htmlEqual(target.innerHTML, '

loading...

'); deferred.reject(new Error('something broke')); return deferred.promise.catch(() => {}); }) .then(() => { - assert.htmlEqual(target.innerHTML, `

oh no! something broke

`); + assert.htmlEqual(target.innerHTML, '

oh no! something broke

'); }); } }; diff --git a/test/runtime/samples/await-without-catch/_config.js b/test/runtime/samples/await-without-catch/_config.js index 2f14d581bd..be11e92f0c 100644 --- a/test/runtime/samples/await-without-catch/_config.js +++ b/test/runtime/samples/await-without-catch/_config.js @@ -21,13 +21,13 @@ export default { return deferred.promise .then(() => { - assert.htmlEqual(target.innerHTML, `

loaded

`); + assert.htmlEqual(target.innerHTML, '

loaded

'); deferred = create_deferred(); component.promise = deferred.promise; - assert.htmlEqual(target.innerHTML, `

loading...

`); + assert.htmlEqual(target.innerHTML, '

loading...

'); deferred.reject(new Error('this error should be thrown')); diff --git a/test/runtime/samples/element-source-location/_config.js b/test/runtime/samples/element-source-location/_config.js index be528d15eb..a5ba9a79da 100644 --- a/test/runtime/samples/element-source-location/_config.js +++ b/test/runtime/samples/element-source-location/_config.js @@ -1,4 +1,4 @@ -import * as path from 'path'; +import * as path from 'node:path'; export default { compileOptions: { diff --git a/test/runtime/samples/observable-auto-subscribe/_config.js b/test/runtime/samples/observable-auto-subscribe/_config.js index e18fcc9aa0..4a8c2f05ff 100644 --- a/test/runtime/samples/observable-auto-subscribe/_config.js +++ b/test/runtime/samples/observable-auto-subscribe/_config.js @@ -36,13 +36,13 @@ export default { component.visible = true; assert.equal(subscribers.length, 1); - assert.htmlEqual(target.innerHTML, `

value: initial

`); + assert.htmlEqual(target.innerHTML, '

value: initial

'); value = 42; subscribers.forEach((fn) => { fn(value); }); await tick(); - assert.htmlEqual(target.innerHTML, `

value: 42

`); + assert.htmlEqual(target.innerHTML, '

value: 42

'); component.visible = false; diff --git a/test/server-side-rendering/ssr-1.test.js b/test/server-side-rendering/ssr-1.test.js index 1912eff852..9eb19aae41 100644 --- a/test/server-side-rendering/ssr-1.test.js +++ b/test/server-side-rendering/ssr-1.test.js @@ -4,8 +4,8 @@ // TODO: Isolate the html comparison // TODO: happy-dom might be faster but currently replaces quotes which fails assertions -import * as fs from 'fs'; -import * as path from 'path'; +import * as fs from 'node:fs'; +import * as path from 'node:path'; import { assert, describe, it } from 'vitest'; import { create_loader, diff --git a/test/server-side-rendering/ssr-2.test.js b/test/server-side-rendering/ssr-2.test.js index 9f4deeb0a3..9a55cee639 100644 --- a/test/server-side-rendering/ssr-2.test.js +++ b/test/server-side-rendering/ssr-2.test.js @@ -1,8 +1,8 @@ // @vitest-environment jsdom -import * as fs from 'fs'; -import * as path from 'path'; -import { setTimeout } from 'timers/promises'; +import * as fs from 'node:fs'; +import * as path from 'node:path'; +import { setTimeout } from 'node:timers/promises'; import glob from 'tiny-glob/sync'; import { assert, describe, it } from 'vitest'; import { compile } from '../../compiler.mjs'; diff --git a/test/sourcemaps/helpers.js b/test/sourcemaps/helpers.js index db9d34fc8b..8552d52fdc 100644 --- a/test/sourcemaps/helpers.js +++ b/test/sourcemaps/helpers.js @@ -1,4 +1,4 @@ -import * as assert from 'assert'; +import * as assert from 'node:assert'; import { getLocator } from 'locate-character'; import MagicString, { Bundle } from 'magic-string'; diff --git a/test/sourcemaps/samples/attached-sourcemap/test.js b/test/sourcemaps/samples/attached-sourcemap/test.js index 04869394d2..1dfb3caeea 100644 --- a/test/sourcemaps/samples/attached-sourcemap/test.js +++ b/test/sourcemaps/samples/attached-sourcemap/test.js @@ -1,4 +1,4 @@ -import * as assert from 'assert'; +import * as assert from 'node:assert'; const get_line_column = (obj) => ({ line: obj.line, column: obj.column }); diff --git a/test/sourcemaps/samples/static-no-script/test.js b/test/sourcemaps/samples/static-no-script/test.js index c683c94d6b..f153c38ece 100644 --- a/test/sourcemaps/samples/static-no-script/test.js +++ b/test/sourcemaps/samples/static-no-script/test.js @@ -1,5 +1,5 @@ -const fs = require('fs'); -const path = require('path'); +import * as fs from 'node:fs'; +import * as path from 'node:path'; export function test({ assert, js }) { assert.deepEqual(js.map.sources, ['input.svelte']); diff --git a/test/sourcemaps/sourcemaps.test.js b/test/sourcemaps/sourcemaps.test.js index 5e08cbbe89..7ae7c1336e 100644 --- a/test/sourcemaps/sourcemaps.test.js +++ b/test/sourcemaps/sourcemaps.test.js @@ -1,5 +1,5 @@ -import * as fs from 'fs'; -import * as path from 'path'; +import * as fs from 'node:fs'; +import * as path from 'node:path'; import * as svelte from '../../src/compiler/index.js'; import { try_load_config } from '../helpers.js'; import { describe, assert, it } from 'vitest'; diff --git a/test/stats/stats.test.js b/test/stats/stats.test.js index f615323613..b5875a89ff 100644 --- a/test/stats/stats.test.js +++ b/test/stats/stats.test.js @@ -1,4 +1,4 @@ -import * as fs from 'fs'; +import * as fs from 'node:fs'; import { describe, it, assert } from 'vitest'; import * as svelte from '../../src/compiler/index.js'; import { try_load_config, try_load_json } from '../helpers.js'; diff --git a/test/validator/validator.test.js b/test/validator/validator.test.js index a8c7c855b8..ca15ca23ce 100644 --- a/test/validator/validator.test.js +++ b/test/validator/validator.test.js @@ -1,4 +1,4 @@ -import * as fs from 'fs'; +import * as fs from 'node:fs'; import { describe, it, assert } from 'vitest'; import * as svelte from '../../src/compiler/index.js'; import { try_load_json, try_load_config } from '../helpers.js'; diff --git a/test/vars/vars.test.js b/test/vars/vars.test.js index 679604e814..eaee475b03 100644 --- a/test/vars/vars.test.js +++ b/test/vars/vars.test.js @@ -1,4 +1,4 @@ -import * as fs from 'fs'; +import * as fs from 'node:fs'; import { assert, describe, it } from 'vitest'; import { compile } from '../../src/compiler/index.js'; import { try_load_json } from '../helpers.js';