From 2099c28a1065cdaddcd1168f1d20293a15403a18 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Wed, 10 Aug 2022 15:03:40 +0200 Subject: [PATCH] fix(resolve): properly resolve relative to file urls --- package.json | 3 +- pnpm-lock.yaml | 511 ++++++++++++++++++++++++++++++++++++------------- src/resolve.ts | 17 +- 3 files changed, 394 insertions(+), 137 deletions(-) diff --git a/package.json b/package.json index 5365fb9..8441cc0 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,8 @@ "dependencies": { "acorn": "^8.8.0", "pathe": "^0.3.3", - "pkg-types": "^0.3.3" + "pkg-types": "^0.3.3", + "ufo": "^0.8.5" }, "devDependencies": { "@nuxtjs/eslint-config-typescript": "latest", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 47d7375..b91c61a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,6 +10,7 @@ specifiers: pathe: ^0.3.3 pkg-types: ^0.3.3 standard-version: latest + ufo: ^0.8.5 unbuild: latest vitest: latest @@ -17,16 +18,17 @@ dependencies: acorn: 8.8.0 pathe: 0.3.3 pkg-types: 0.3.3 + ufo: 0.8.5 devDependencies: '@nuxtjs/eslint-config-typescript': 10.0.0_eslint@8.21.0 - '@types/node': 18.6.3 + '@types/node': 18.6.5 c8: 7.12.0 eslint: 8.21.0 jiti: 1.14.0 standard-version: 9.5.0 - unbuild: 0.7.6 - vitest: 0.20.3_c8@7.12.0 + unbuild: 0.8.1 + vitest: 0.21.1_c8@7.12.0 packages: @@ -44,25 +46,32 @@ packages: '@babel/highlight': 7.16.10 dev: true - /@babel/compat-data/7.17.7: - resolution: {integrity: sha512-p8pdE6j0a29TNGebNm7NzYZWB3xVZJBZ7XGs42uAKzQo8VQ3F0By/cQCtUEABwIqw5zo6WA4NbmxsfzADzMKnQ==} + /@babel/code-frame/7.18.6: + resolution: {integrity: sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/highlight': 7.18.6 + dev: true + + /@babel/compat-data/7.18.8: + resolution: {integrity: sha512-HSmX4WZPPK3FUxYp7g2T6EyO8j96HlZJlxmKPSh6KAcqwyDrfx7hKjXpAW/0FhFfTJsR0Yt4lAjLI2coMptIHQ==} engines: {node: '>=6.9.0'} dev: true - /@babel/core/7.17.8: - resolution: {integrity: sha512-OdQDV/7cRBtJHLSOBqqbYNkOcydOgnX59TZx4puf41fzcVtN3e/4yqY8lMQsK+5X2lJtAdmA+6OHqsj1hBJ4IQ==} + /@babel/core/7.18.10: + resolution: {integrity: sha512-JQM6k6ENcBFKVtWvLavlvi/mPcpYZ3+R+2EySDEMSMbp7Mn4FexlbbJVrx2R7Ijhr01T8gyqrOaABWIOgxeUyw==} engines: {node: '>=6.9.0'} dependencies: '@ampproject/remapping': 2.1.2 - '@babel/code-frame': 7.16.7 - '@babel/generator': 7.17.7 - '@babel/helper-compilation-targets': 7.17.7_@babel+core@7.17.8 - '@babel/helper-module-transforms': 7.17.7 - '@babel/helpers': 7.17.8 - '@babel/parser': 7.17.8 - '@babel/template': 7.16.7 - '@babel/traverse': 7.17.3 - '@babel/types': 7.17.0 + '@babel/code-frame': 7.18.6 + '@babel/generator': 7.18.12 + '@babel/helper-compilation-targets': 7.18.9_@babel+core@7.18.10 + '@babel/helper-module-transforms': 7.18.9 + '@babel/helpers': 7.18.9 + '@babel/parser': 7.18.11 + '@babel/template': 7.18.10 + '@babel/traverse': 7.18.11 + '@babel/types': 7.18.10 convert-source-map: 1.8.0 debug: 4.3.4 gensync: 1.0.0-beta.2 @@ -72,93 +81,88 @@ packages: - supports-color dev: true - /@babel/generator/7.17.7: - resolution: {integrity: sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==} + /@babel/generator/7.18.12: + resolution: {integrity: sha512-dfQ8ebCN98SvyL7IxNMCUtZQSq5R7kxgN+r8qYTGDmmSion1hX2C0zq2yo1bsCDhXixokv1SAWTZUMYbO/V5zg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.17.0 + '@babel/types': 7.18.10 + '@jridgewell/gen-mapping': 0.3.2 jsesc: 2.5.2 - source-map: 0.5.7 dev: true - /@babel/helper-compilation-targets/7.17.7_@babel+core@7.17.8: - resolution: {integrity: sha512-UFzlz2jjd8kroj0hmCFV5zr+tQPi1dpC2cRsDV/3IEW8bJfCPrPpmcSN6ZS8RqIq4LXcmpipCQFPddyFA5Yc7w==} + /@babel/helper-compilation-targets/7.18.9_@babel+core@7.18.10: + resolution: {integrity: sha512-tzLCyVmqUiFlcFoAPLA/gL9TeYrF61VLNtb+hvkuVaB5SUjW7jcfrglBIX1vUIoT7CLP3bBlIMeyEsIl2eFQNg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/compat-data': 7.17.7 - '@babel/core': 7.17.8 - '@babel/helper-validator-option': 7.16.7 + '@babel/compat-data': 7.18.8 + '@babel/core': 7.18.10 + '@babel/helper-validator-option': 7.18.6 browserslist: 4.20.2 semver: 6.3.0 dev: true - /@babel/helper-environment-visitor/7.16.7: - resolution: {integrity: sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==} + /@babel/helper-environment-visitor/7.18.9: + resolution: {integrity: sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==} engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.17.0 dev: true - /@babel/helper-function-name/7.16.7: - resolution: {integrity: sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA==} + /@babel/helper-function-name/7.18.9: + resolution: {integrity: sha512-fJgWlZt7nxGksJS9a0XdSaI4XvpExnNIgRP+rVefWh5U7BL8pPuir6SJUmFKRfjWQ51OtWSzwOxhaH/EBWWc0A==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-get-function-arity': 7.16.7 - '@babel/template': 7.16.7 - '@babel/types': 7.17.0 + '@babel/template': 7.18.10 + '@babel/types': 7.18.10 dev: true - /@babel/helper-get-function-arity/7.16.7: - resolution: {integrity: sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw==} + /@babel/helper-hoist-variables/7.18.6: + resolution: {integrity: sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.17.0 + '@babel/types': 7.18.10 dev: true - /@babel/helper-hoist-variables/7.16.7: - resolution: {integrity: sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==} + /@babel/helper-module-imports/7.18.6: + resolution: {integrity: sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.17.0 + '@babel/types': 7.18.10 dev: true - /@babel/helper-module-imports/7.16.7: - resolution: {integrity: sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==} + /@babel/helper-module-transforms/7.18.9: + resolution: {integrity: sha512-KYNqY0ICwfv19b31XzvmI/mfcylOzbLtowkw+mfvGPAQ3kfCnMLYbED3YecL5tPd8nAYFQFAd6JHp2LxZk/J1g==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.17.0 + '@babel/helper-environment-visitor': 7.18.9 + '@babel/helper-module-imports': 7.18.6 + '@babel/helper-simple-access': 7.18.6 + '@babel/helper-split-export-declaration': 7.18.6 + '@babel/helper-validator-identifier': 7.18.6 + '@babel/template': 7.18.10 + '@babel/traverse': 7.18.11 + '@babel/types': 7.18.10 + transitivePeerDependencies: + - supports-color dev: true - /@babel/helper-module-transforms/7.17.7: - resolution: {integrity: sha512-VmZD99F3gNTYB7fJRDTi+u6l/zxY0BE6OIxPSU7a50s6ZUQkHwSDmV92FfM+oCG0pZRVojGYhkR8I0OGeCVREw==} + /@babel/helper-simple-access/7.18.6: + resolution: {integrity: sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-environment-visitor': 7.16.7 - '@babel/helper-module-imports': 7.16.7 - '@babel/helper-simple-access': 7.17.7 - '@babel/helper-split-export-declaration': 7.16.7 - '@babel/helper-validator-identifier': 7.16.7 - '@babel/template': 7.16.7 - '@babel/traverse': 7.17.3 - '@babel/types': 7.17.0 - transitivePeerDependencies: - - supports-color + '@babel/types': 7.18.10 dev: true - /@babel/helper-simple-access/7.17.7: - resolution: {integrity: sha512-txyMCGroZ96i+Pxr3Je3lzEJjqwaRC9buMUgtomcrLe5Nd0+fk1h0LLA+ixUF5OW7AhHuQ7Es1WcQJZmZsz2XA==} + /@babel/helper-split-export-declaration/7.18.6: + resolution: {integrity: sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.17.0 + '@babel/types': 7.18.10 dev: true - /@babel/helper-split-export-declaration/7.16.7: - resolution: {integrity: sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==} + /@babel/helper-string-parser/7.18.10: + resolution: {integrity: sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw==} engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.17.0 dev: true /@babel/helper-validator-identifier/7.16.7: @@ -166,18 +170,23 @@ packages: engines: {node: '>=6.9.0'} dev: true - /@babel/helper-validator-option/7.16.7: - resolution: {integrity: sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==} + /@babel/helper-validator-identifier/7.18.6: + resolution: {integrity: sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g==} engines: {node: '>=6.9.0'} dev: true - /@babel/helpers/7.17.8: - resolution: {integrity: sha512-QcL86FGxpfSJwGtAvv4iG93UL6bmqBdmoVY0CMCU2g+oD2ezQse3PT5Pa+jiD6LJndBQi0EDlpzOWNlLuhz5gw==} + /@babel/helper-validator-option/7.18.6: + resolution: {integrity: sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==} + engines: {node: '>=6.9.0'} + dev: true + + /@babel/helpers/7.18.9: + resolution: {integrity: sha512-Jf5a+rbrLoR4eNdUmnFu8cN5eNJT6qdTdOg5IHIzq87WwyRw9PwguLFOWYgktN/60IP4fgDUawJvs7PjQIzELQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/template': 7.16.7 - '@babel/traverse': 7.17.3 - '@babel/types': 7.17.0 + '@babel/template': 7.18.10 + '@babel/traverse': 7.18.11 + '@babel/types': 7.18.10 transitivePeerDependencies: - supports-color dev: true @@ -186,56 +195,66 @@ packages: resolution: {integrity: sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-validator-identifier': 7.16.7 + '@babel/helper-validator-identifier': 7.18.6 + chalk: 2.4.2 + js-tokens: 4.0.0 + dev: true + + /@babel/highlight/7.18.6: + resolution: {integrity: sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-validator-identifier': 7.18.6 chalk: 2.4.2 js-tokens: 4.0.0 dev: true - /@babel/parser/7.17.8: - resolution: {integrity: sha512-BoHhDJrJXqcg+ZL16Xv39H9n+AqJ4pcDrQBGZN+wHxIysrLZ3/ECwCBUch/1zUNhnsXULcONU3Ei5Hmkfk6kiQ==} + /@babel/parser/7.18.11: + resolution: {integrity: sha512-9JKn5vN+hDt0Hdqn1PiJ2guflwP+B6Ga8qbDuoF0PzzVhrzsKIJo8yGqVk6CmMHiMei9w1C1Bp9IMJSIK+HPIQ==} engines: {node: '>=6.0.0'} hasBin: true dependencies: - '@babel/types': 7.17.0 + '@babel/types': 7.18.10 dev: true - /@babel/standalone/7.17.8: - resolution: {integrity: sha512-tr3SDpVnxR/fzrxyG+HZPAyEA9eTHZIAjy4eqrc7m+KBwsdo1YvTbUfJ6teWHQ177mk6GmdmltsIiOYCcvRPWA==} + /@babel/standalone/7.18.12: + resolution: {integrity: sha512-wDh3K5IUJiSMAY0MLYBFoCaj2RCZwvDz5BHn2uHat9KOsGWEVDFgFQFIOO+81Js2phFKNppLC45iOCsZVfJniw==} engines: {node: '>=6.9.0'} dev: true - /@babel/template/7.16.7: - resolution: {integrity: sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==} + /@babel/template/7.18.10: + resolution: {integrity: sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.16.7 - '@babel/parser': 7.17.8 - '@babel/types': 7.17.0 + '@babel/code-frame': 7.18.6 + '@babel/parser': 7.18.11 + '@babel/types': 7.18.10 dev: true - /@babel/traverse/7.17.3: - resolution: {integrity: sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==} + /@babel/traverse/7.18.11: + resolution: {integrity: sha512-TG9PiM2R/cWCAy6BPJKeHzNbu4lPzOSZpeMfeNErskGpTJx6trEvFaVCbDvpcxwy49BKWmEPwiW8mrysNiDvIQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/code-frame': 7.16.7 - '@babel/generator': 7.17.7 - '@babel/helper-environment-visitor': 7.16.7 - '@babel/helper-function-name': 7.16.7 - '@babel/helper-hoist-variables': 7.16.7 - '@babel/helper-split-export-declaration': 7.16.7 - '@babel/parser': 7.17.8 - '@babel/types': 7.17.0 + '@babel/code-frame': 7.18.6 + '@babel/generator': 7.18.12 + '@babel/helper-environment-visitor': 7.18.9 + '@babel/helper-function-name': 7.18.9 + '@babel/helper-hoist-variables': 7.18.6 + '@babel/helper-split-export-declaration': 7.18.6 + '@babel/parser': 7.18.11 + '@babel/types': 7.18.10 debug: 4.3.4 globals: 11.12.0 transitivePeerDependencies: - supports-color dev: true - /@babel/types/7.17.0: - resolution: {integrity: sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==} + /@babel/types/7.18.10: + resolution: {integrity: sha512-MJvnbEiiNkpjo+LknnmRrqbY1GPUUggjv+wQVjetM/AONoupqRALB7I6jGqNUAZsKcRIEu2J6FRFvsczljjsaQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-validator-identifier': 7.16.7 + '@babel/helper-string-parser': 7.18.10 + '@babel/helper-validator-identifier': 7.18.6 to-fast-properties: 2.0.0 dev: true @@ -252,6 +271,15 @@ packages: dev: true optional: true + /@esbuild/linux-loong64/0.15.0: + resolution: {integrity: sha512-7ChD3qsxRPIPp9bfjspZiM/x8B1UZL7IKwp0YdnC1kKsDCB5Q8/TexedeeEbkI9inlunu8Lll2lP2wnkiXTCLA==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@eslint/eslintrc/1.3.0: resolution: {integrity: sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -298,11 +326,25 @@ packages: engines: {node: '>=8'} dev: true + /@jridgewell/gen-mapping/0.3.2: + resolution: {integrity: sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==} + engines: {node: '>=6.0.0'} + dependencies: + '@jridgewell/set-array': 1.1.2 + '@jridgewell/sourcemap-codec': 1.4.11 + '@jridgewell/trace-mapping': 0.3.13 + dev: true + /@jridgewell/resolve-uri/3.0.5: resolution: {integrity: sha512-VPeQ7+wH0itvQxnG+lIzWgkysKIr3L9sslimFW55rHMdGu/qCQ5z5h9zq4gI8uBtqkpHhsF4Z/OwExufUCThew==} engines: {node: '>=6.0.0'} dev: true + /@jridgewell/set-array/1.1.2: + resolution: {integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==} + engines: {node: '>=6.0.0'} + dev: true + /@jridgewell/sourcemap-codec/1.4.11: resolution: {integrity: sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg==} dev: true @@ -382,8 +424,8 @@ packages: slash: 3.0.0 dev: true - /@rollup/plugin-commonjs/22.0.1_rollup@2.77.2: - resolution: {integrity: sha512-dGfEZvdjDHObBiP5IvwTKMVeq/tBZGMBHZFMdIV1ClMM/YoWS34xrHFGfag9SN2ZtMgNZRFruqvxZQEa70O6nQ==} + /@rollup/plugin-commonjs/22.0.2_rollup@2.77.2: + resolution: {integrity: sha512-//NdP6iIwPbMTcazYsiBMbJW7gfmpHom33u1beiIoHDEM0Q9clvtQB1T0efvMqHeKsGohiHo97BCPCkBXdscwg==} engines: {node: '>= 12.0.0'} peerDependencies: rollup: ^2.68.0 @@ -455,11 +497,11 @@ packages: /@types/chai-subset/1.3.3: resolution: {integrity: sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==} dependencies: - '@types/chai': 4.3.1 + '@types/chai': 4.3.3 dev: true - /@types/chai/4.3.1: - resolution: {integrity: sha512-/zPMqDkzSZ8t3VtxOa4KPq7uzzW978M9Tvh+j7GHKuo6k6GTLxPJ4J5gE5cjfJ26pnXst0N5Hax8Sr0T2Mi9zQ==} + /@types/chai/4.3.3: + resolution: {integrity: sha512-hC7OMnszpxhZPduX+m+nrx+uFoLkWOMiR4oa/AZF3MuSETYTZmFfJAHqZEM8MVlvfG7BEUcgvtwoCTxBp6hm3g==} dev: true /@types/estree/0.0.39: @@ -486,8 +528,8 @@ packages: resolution: {integrity: sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==} dev: true - /@types/node/18.6.3: - resolution: {integrity: sha512-6qKpDtoaYLM+5+AFChLhHermMQxc3TOEFIDzrZLPRGHPrLEwqFkkT5Kx3ju05g6X7uDPazz3jHbKPX0KzCjntg==} + /@types/node/18.6.5: + resolution: {integrity: sha512-Xjt5ZGUa5WusGZJ4WJPbOT8QOqp6nDynVFRKcUt32bOgvXEoc6o085WNkYTMO7ifAj2isEfQQ2cseE+wT6jsRw==} dev: true /@types/normalize-package-data/2.4.1: @@ -497,7 +539,7 @@ packages: /@types/resolve/1.17.1: resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} dependencies: - '@types/node': 18.6.3 + '@types/node': 18.6.5 dev: true /@typescript-eslint/eslint-plugin/5.28.0_ohd4aakotxrqdfe2ktnrm3siea: @@ -1304,6 +1346,15 @@ packages: dev: true optional: true + /esbuild-android-64/0.15.0: + resolution: {integrity: sha512-A9wa6quw4nYIhCDH6rudxSTOAIfSOYU3eME8ZkfP21P+WTxz0pFORFDuBjVAcLhkora3bDc23C8UeloKiiQPOg==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + /esbuild-android-arm64/0.14.53: resolution: {integrity: sha512-PC7KaF1v0h/nWpvlU1UMN7dzB54cBH8qSsm7S9mkwFA1BXpaEOufCg8hdoEI1jep0KeO/rjZVWrsH8+q28T77A==} engines: {node: '>=12'} @@ -1313,6 +1364,15 @@ packages: dev: true optional: true + /esbuild-android-arm64/0.15.0: + resolution: {integrity: sha512-ujdverhuFUfW99HdF+L9n1wzG950lVL1AJVc1SEbJRaQC22tVq9xXNXkLLq7v4hSZWrdz/MT3hwhnQF0KTMxNg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + /esbuild-darwin-64/0.14.53: resolution: {integrity: sha512-gE7P5wlnkX4d4PKvLBUgmhZXvL7lzGRLri17/+CmmCzfncIgq8lOBvxGMiQ4xazplhxq+72TEohyFMZLFxuWvg==} engines: {node: '>=12'} @@ -1322,6 +1382,15 @@ packages: dev: true optional: true + /esbuild-darwin-64/0.15.0: + resolution: {integrity: sha512-aA5SVtXCetQ9ChREG8xDdzv43XGbdz+u4AxQgQZrRu0gXD3yJfawfZgquaej3CxVAlrOgBPbu5z+tA5SVhXAxQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + /esbuild-darwin-arm64/0.14.53: resolution: {integrity: sha512-otJwDU3hnI15Q98PX4MJbknSZ/WSR1I45il7gcxcECXzfN4Mrpft5hBDHXNRnCh+5858uPXBXA1Vaz2jVWLaIA==} engines: {node: '>=12'} @@ -1331,6 +1400,15 @@ packages: dev: true optional: true + /esbuild-darwin-arm64/0.15.0: + resolution: {integrity: sha512-CaxPS5JUQpldeIMVqw0K+vlGfyMphvtIWugPMyXPGTDmUAcWXSha1QRgJ5Fxa9d/cC4DKeC8L8/q7ClzinXxfA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + /esbuild-freebsd-64/0.14.53: resolution: {integrity: sha512-WkdJa8iyrGHyKiPF4lk0MiOF87Q2SkE+i+8D4Cazq3/iqmGPJ6u49je300MFi5I2eUsQCkaOWhpCVQMTKGww2w==} engines: {node: '>=12'} @@ -1340,6 +1418,15 @@ packages: dev: true optional: true + /esbuild-freebsd-64/0.15.0: + resolution: {integrity: sha512-O9yvjry2bmX8sxx42JfwW6g/usZ0e3ndfb3+bquu20qkuEfDodqHNzotOjaKSREvxpw+Ub1zNtXvA/FFekSaOA==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + /esbuild-freebsd-arm64/0.14.53: resolution: {integrity: sha512-9T7WwCuV30NAx0SyQpw8edbKvbKELnnm1FHg7gbSYaatH+c8WJW10g/OdM7JYnv7qkimw2ZTtSA+NokOLd2ydQ==} engines: {node: '>=12'} @@ -1349,6 +1436,15 @@ packages: dev: true optional: true + /esbuild-freebsd-arm64/0.15.0: + resolution: {integrity: sha512-Zv8bNAG1lYyCtWi+PVndgys6KRBe5hQgD81tK3zdZ6XEitpCPwF8QShYbV8RacG1YBD7aHKSoWKGkT9+5bMGhw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + /esbuild-linux-32/0.14.53: resolution: {integrity: sha512-VGanLBg5en2LfGDgLEUxQko2lqsOS7MTEWUi8x91YmsHNyzJVT/WApbFFx3MQGhkf+XdimVhpyo5/G0PBY91zg==} engines: {node: '>=12'} @@ -1358,6 +1454,15 @@ packages: dev: true optional: true + /esbuild-linux-32/0.15.0: + resolution: {integrity: sha512-QZqCG55D5Wof1WmBJMuihNroLM9S2oDXGkqB0ZHMA67CQw+3cAwWxOKW36n6VFaKiE4MhvUuW7jI+lr2D7nXQQ==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + /esbuild-linux-64/0.14.53: resolution: {integrity: sha512-pP/FA55j/fzAV7N9DF31meAyjOH6Bjuo3aSKPh26+RW85ZEtbJv9nhoxmGTd9FOqjx59Tc1ZbrJabuiXlMwuZQ==} engines: {node: '>=12'} @@ -1367,6 +1472,15 @@ packages: dev: true optional: true + /esbuild-linux-64/0.15.0: + resolution: {integrity: sha512-cmB2vAUWf9W8768H0DuOi6VUrQPCinx/oYhRbuR1TZj873vg1GTqc55LAh1cYCC0xEMd9MjO4YfI43OX4ewI1w==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /esbuild-linux-arm/0.14.53: resolution: {integrity: sha512-/u81NGAVZMopbmzd21Nu/wvnKQK3pT4CrvQ8BTje1STXcQAGnfyKgQlj3m0j2BzYbvQxSy+TMck4TNV2onvoPA==} engines: {node: '>=12'} @@ -1376,6 +1490,15 @@ packages: dev: true optional: true + /esbuild-linux-arm/0.15.0: + resolution: {integrity: sha512-UyY0Vqd9ngfeWBeJrrqHiXf4ozqXxzNT8ebdNt1ay5hfu/uXes3eVkt1YHP2dcxG/APPE4XDxvKlx0SoSwHP6Q==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + /esbuild-linux-arm64/0.14.53: resolution: {integrity: sha512-GDmWITT+PMsjCA6/lByYk7NyFssW4Q6in32iPkpjZ/ytSyH+xeEx8q7HG3AhWH6heemEYEWpTll/eui3jwlSnw==} engines: {node: '>=12'} @@ -1385,6 +1508,15 @@ packages: dev: true optional: true + /esbuild-linux-arm64/0.15.0: + resolution: {integrity: sha512-bJc8k64Lss+2V8yx9kh4Q48SYPR/k0kxyep2pmvzaGm+AreeMnXI0J33zF4tU/OW9r3pwa74F3/MxF6x275Yhg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /esbuild-linux-mips64le/0.14.53: resolution: {integrity: sha512-d6/XHIQW714gSSp6tOOX2UscedVobELvQlPMkInhx1NPz4ThZI9uNLQ4qQJHGBGKGfu+rtJsxM4NVHLhnNRdWQ==} engines: {node: '>=12'} @@ -1394,6 +1526,15 @@ packages: dev: true optional: true + /esbuild-linux-mips64le/0.15.0: + resolution: {integrity: sha512-NoOxC4a1XfM4/zGBIujIuxhPVWvS6UgqE/ksyjZ6qgHQD9lWVjcEv3iPEKKIuHXPE1s+YHvJrdXVup96aVvflQ==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + /esbuild-linux-ppc64le/0.14.53: resolution: {integrity: sha512-ndnJmniKPCB52m+r6BtHHLAOXw+xBCWIxNnedbIpuREOcbSU/AlyM/2dA3BmUQhsHdb4w3amD5U2s91TJ3MzzA==} engines: {node: '>=12'} @@ -1403,6 +1544,15 @@ packages: dev: true optional: true + /esbuild-linux-ppc64le/0.15.0: + resolution: {integrity: sha512-OUkEhJAYPaYPvHZxjgnJhWB0qD8q8l1q8CnGLngmPAxb9WZrFwPYmykWBTSqGXeG08stScpkIQXy4HTSF8rH+w==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /esbuild-linux-riscv64/0.14.53: resolution: {integrity: sha512-yG2sVH+QSix6ct4lIzJj329iJF3MhloLE6/vKMQAAd26UVPVkhMFqFopY+9kCgYsdeWvXdPgmyOuKa48Y7+/EQ==} engines: {node: '>=12'} @@ -1412,6 +1562,15 @@ packages: dev: true optional: true + /esbuild-linux-riscv64/0.15.0: + resolution: {integrity: sha512-DuSujKNrdCN+kvA0+BBS/ULaINuOeI0iU9XzhIRtTCR5cFJWd6aQTHluKEc3C/a/ib2KTVNjM21cUHi4Tj0NZA==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /esbuild-linux-s390x/0.14.53: resolution: {integrity: sha512-OCJlgdkB+XPYndHmw6uZT7jcYgzmx9K+28PVdOa/eLjdoYkeAFvH5hTwX4AXGLZLH09tpl4bVsEtvuyUldaNCg==} engines: {node: '>=12'} @@ -1421,6 +1580,15 @@ packages: dev: true optional: true + /esbuild-linux-s390x/0.15.0: + resolution: {integrity: sha512-ttGGhgXRpJbsD+XXS2NIBThuEh8EvAJEnVQ9vzXviniPuvpuwKLFNBRPqtX3gE5o2bUQnh5ZugmDVuD9GW2ROg==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + /esbuild-netbsd-64/0.14.53: resolution: {integrity: sha512-gp2SB+Efc7MhMdWV2+pmIs/Ja/Mi5rjw+wlDmmbIn68VGXBleNgiEZG+eV2SRS0kJEUyHNedDtwRIMzaohWedQ==} engines: {node: '>=12'} @@ -1430,6 +1598,15 @@ packages: dev: true optional: true + /esbuild-netbsd-64/0.15.0: + resolution: {integrity: sha512-rb6sIQ/gZeQNrgplSLJ0zLirLwr3vQCzbL1jb0Ypay83Uup2s+OEI+Vw+oJ2SomrhVyOPwk/R4AY713bJKdLsQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + /esbuild-openbsd-64/0.14.53: resolution: {integrity: sha512-eKQ30ZWe+WTZmteDYg8S+YjHV5s4iTxeSGhJKJajFfQx9TLZJvsJX0/paqwP51GicOUruFpSUAs2NCc0a4ivQQ==} engines: {node: '>=12'} @@ -1439,6 +1616,15 @@ packages: dev: true optional: true + /esbuild-openbsd-64/0.15.0: + resolution: {integrity: sha512-CeU7hw291UJQpNg/oJLefmM9Rdeddo2ya9Vw9hdDrUyZAAZckqVRLDh9t4OdqJuXFdlo6BM2qhZCcY22O7wfGg==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + /esbuild-sunos-64/0.14.53: resolution: {integrity: sha512-OWLpS7a2FrIRukQqcgQqR1XKn0jSJoOdT+RlhAxUoEQM/IpytS3FXzCJM6xjUYtpO5GMY0EdZJp+ur2pYdm39g==} engines: {node: '>=12'} @@ -1448,6 +1634,15 @@ packages: dev: true optional: true + /esbuild-sunos-64/0.15.0: + resolution: {integrity: sha512-nE7EcgDw9RT4fR+GJZ5a0spPb2HKT77viCjrGl6GSeb/n3RhxGgVGwPQDI/KRwyVeQMqEOTtHQMNPwNr9TKDDQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + /esbuild-windows-32/0.14.53: resolution: {integrity: sha512-m14XyWQP5rwGW0tbEfp95U6A0wY0DYPInWBB7D69FAXUpBpBObRoGTKRv36lf2RWOdE4YO3TNvj37zhXjVL5xg==} engines: {node: '>=12'} @@ -1457,6 +1652,15 @@ packages: dev: true optional: true + /esbuild-windows-32/0.15.0: + resolution: {integrity: sha512-FUPwJmPwBoqe8ShhOMfHtSElh1Nyc3s+Kru3m7lDJCjNr3ctx9YJKuzRsz4UXow6Wo79LMQGNyjysQ7UuKgvHQ==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + /esbuild-windows-64/0.14.53: resolution: {integrity: sha512-s9skQFF0I7zqnQ2K8S1xdLSfZFsPLuOGmSx57h2btSEswv0N0YodYvqLcJMrNMXh6EynOmWD7rz+0rWWbFpIHQ==} engines: {node: '>=12'} @@ -1466,6 +1670,15 @@ packages: dev: true optional: true + /esbuild-windows-64/0.15.0: + resolution: {integrity: sha512-zNM5bSVOY0SzMFB6k3ZdMwg4JmLVLpEmgVd2fU2STDmEOXdY1APAFPVWkbWMtLF/nfLfaJLfps7+IIJgGyQbGA==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /esbuild-windows-arm64/0.14.53: resolution: {integrity: sha512-E+5Gvb+ZWts+00T9II6wp2L3KG2r3iGxByqd/a1RmLmYWVsSVUjkvIxZuJ3hYTIbhLkH5PRwpldGTKYqVz0nzQ==} engines: {node: '>=12'} @@ -1475,6 +1688,15 @@ packages: dev: true optional: true + /esbuild-windows-arm64/0.15.0: + resolution: {integrity: sha512-sqhmDwUhUULUnViLD7jAqo4FaOhLN/FMW+dFVSvxSTA9pZSr2w6efky91vTWOcTUmspvYyHyOrJmtktp1ffIaw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /esbuild/0.14.53: resolution: {integrity: sha512-ohO33pUBQ64q6mmheX1mZ8mIXj8ivQY/L4oVuAshr+aJI+zLl+amrp3EodrUNDNYVrKJXGPfIHFGhO8slGRjuw==} engines: {node: '>=12'} @@ -1504,6 +1726,35 @@ packages: esbuild-windows-arm64: 0.14.53 dev: true + /esbuild/0.15.0: + resolution: {integrity: sha512-UUDSelGc/EOhzn0zpkdhLA3iB+jq2OS5gnMUMz/BqAKBIsWR2fTHqrddNPt2PNj3OUchqcMcTHSUBr+VpYpcsQ==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/linux-loong64': 0.15.0 + esbuild-android-64: 0.15.0 + esbuild-android-arm64: 0.15.0 + esbuild-darwin-64: 0.15.0 + esbuild-darwin-arm64: 0.15.0 + esbuild-freebsd-64: 0.15.0 + esbuild-freebsd-arm64: 0.15.0 + esbuild-linux-32: 0.15.0 + esbuild-linux-64: 0.15.0 + esbuild-linux-arm: 0.15.0 + esbuild-linux-arm64: 0.15.0 + esbuild-linux-mips64le: 0.15.0 + esbuild-linux-ppc64le: 0.15.0 + esbuild-linux-riscv64: 0.15.0 + esbuild-linux-s390x: 0.15.0 + esbuild-netbsd-64: 0.15.0 + esbuild-openbsd-64: 0.15.0 + esbuild-sunos-64: 0.15.0 + esbuild-windows-32: 0.15.0 + esbuild-windows-64: 0.15.0 + esbuild-windows-arm64: 0.15.0 + dev: true + /escalade/3.1.1: resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} engines: {node: '>=6'} @@ -2686,9 +2937,10 @@ packages: pathe: 0.2.0 pkg-types: 0.3.3 - /mlly/0.5.5: - resolution: {integrity: sha512-2R4JT/SxRDPexomw4rmHYY/gWAGmL9Kkq1OR76Ua6w+P340a1aBDTWzKo2kAlxzrG82OdXs5VB9Lmcmyit0Obg==} + /mlly/0.5.8: + resolution: {integrity: sha512-WRmpgVQ8dQTkmVsG1rvbwNOVUkIYsoFxzzjjPSmeVEci14nNin50bTRw/Ikp0X0cVdsIVjMR/iT6Pp9rVtmDDg==} dependencies: + acorn: 8.8.0 pathe: 0.3.3 pkg-types: 0.3.3 dev: true @@ -3135,7 +3387,7 @@ packages: '@babel/code-frame': 7.16.7 dev: true - /rollup-plugin-esbuild/4.9.1_eqz4txfukrxgk4uaulv43wixku: + /rollup-plugin-esbuild/4.9.1_iqbcpcj4ibf7kfl5wz2zv6tlvq: resolution: {integrity: sha512-qn/x7Wz9p3Xnva99qcb+nopH0d2VJwVnsxJTGEg+Sh2Z3tqQl33MhOwzekVo1YTKgv+yAmosjcBRJygMfGrtLw==} engines: {node: '>=12'} peerDependencies: @@ -3145,7 +3397,7 @@ packages: '@rollup/pluginutils': 4.2.1 debug: 4.3.4 es-module-lexer: 0.9.3 - esbuild: 0.14.53 + esbuild: 0.15.0 joycon: 3.1.1 jsonc-parser: 3.0.0 rollup: 2.77.2 @@ -3181,8 +3433,8 @@ packages: regexp-tree: 0.1.24 dev: true - /scule/0.2.1: - resolution: {integrity: sha512-M9gnWtn3J0W+UhJOHmBxBTwv8mZCan5i1Himp60t6vvZcor0wr+IM0URKmIglsWJ7bRujNAVVN77fp+uZaWoKg==} + /scule/0.3.2: + resolution: {integrity: sha512-zIvPdjOH8fv8CgrPT5eqtxHQXmPNnV/vHJYffZhE43KZkvULvpCTvOt1HPlFaCZx287INL9qaqrZg34e8NgI4g==} dev: true /semver/5.7.1: @@ -3237,11 +3489,6 @@ packages: engines: {node: '>=0.10.0'} dev: true - /source-map/0.5.7: - resolution: {integrity: sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==} - engines: {node: '>=0.10.0'} - dev: true - /source-map/0.6.1: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} @@ -3514,6 +3761,10 @@ packages: hasBin: true dev: true + /ufo/0.8.5: + resolution: {integrity: sha512-e4+UtA5IRO+ha6hYklwj6r7BjiGMxS0O+UaSg9HbaTefg4kMkzj4tXzEBajRR+wkxf+golgAWKzLbytCUDMJAA==} + dev: false + /uglify-js/3.15.3: resolution: {integrity: sha512-6iCVm2omGJbsu3JWac+p6kUiOpg3wFO2f8lIXjfEb8RrmLjzog1wTPMmwKB7swfzzqxj9YM+sGUM++u1qN4qJg==} engines: {node: '>=0.8.0'} @@ -3531,12 +3782,12 @@ packages: which-boxed-primitive: 1.0.2 dev: true - /unbuild/0.7.6: - resolution: {integrity: sha512-W6pFPS6/ewlEV5uWbNgfo0i2LbVBsue5GKlOkCo6ozIrInOBEgq4s3HCUB5eZSw6Ty2iwF8dKM65pZX7QGZJ0g==} + /unbuild/0.8.1: + resolution: {integrity: sha512-paFNdNw4MPhYLcCn8iHEGBttiSdDW6ibPEDBWXypMVUGDjI+ipmU3JvZyaHB2buwRtpjMw0CHZ/BreGgyBHuIA==} hasBin: true dependencies: '@rollup/plugin-alias': 3.1.9_rollup@2.77.2 - '@rollup/plugin-commonjs': 22.0.1_rollup@2.77.2 + '@rollup/plugin-commonjs': 22.0.2_rollup@2.77.2 '@rollup/plugin-json': 4.1.0_rollup@2.77.2 '@rollup/plugin-node-resolve': 13.3.0_rollup@2.77.2 '@rollup/plugin-replace': 4.0.0_rollup@2.77.2 @@ -3544,13 +3795,13 @@ packages: chalk: 5.0.1 consola: 2.15.3 defu: 6.0.0 - esbuild: 0.14.53 + esbuild: 0.15.0 hookable: 5.1.1 jiti: 1.14.0 magic-string: 0.26.2 mkdirp: 1.0.4 mkdist: 0.3.13_typescript@4.7.4 - mlly: 0.5.5 + mlly: 0.5.8 mri: 1.2.0 pathe: 0.3.3 pkg-types: 0.3.3 @@ -3558,10 +3809,10 @@ packages: rimraf: 3.0.2 rollup: 2.77.2 rollup-plugin-dts: 4.2.2_oo3i3f3qmqiztdz5qgxrrjmd5e - rollup-plugin-esbuild: 4.9.1_eqz4txfukrxgk4uaulv43wixku - scule: 0.2.1 + rollup-plugin-esbuild: 4.9.1_iqbcpcj4ibf7kfl5wz2zv6tlvq + scule: 0.3.2 typescript: 4.7.4 - untyped: 0.4.4 + untyped: 0.4.5 transitivePeerDependencies: - supports-color dev: true @@ -3571,13 +3822,13 @@ packages: engines: {node: '>= 10.0.0'} dev: true - /untyped/0.4.4: - resolution: {integrity: sha512-sY6u8RedwfLfBis0copfU/fzROieyAndqPs8Kn2PfyzTjtA88vCk81J1b5z+8/VJc+cwfGy23/AqOCpvAbkNVw==} + /untyped/0.4.5: + resolution: {integrity: sha512-buq9URfOj4xAnVfu6BYNKzHZLHAzsCbHsDc/kHy66ESMqRpj00oD9qWf2M2qm0pC0DigsVxRF3uhOa5HJtrwGA==} dependencies: - '@babel/core': 7.17.8 - '@babel/standalone': 7.17.8 - '@babel/types': 7.17.0 - scule: 0.2.1 + '@babel/core': 7.18.10 + '@babel/standalone': 7.18.12 + '@babel/types': 7.18.10 + scule: 0.3.2 transitivePeerDependencies: - supports-color dev: true @@ -3636,8 +3887,8 @@ packages: fsevents: 2.3.2 dev: true - /vitest/0.20.3_c8@7.12.0: - resolution: {integrity: sha512-cXMjTbZxBBUUuIF3PUzEGPLJWtIMeURBDXVxckSHpk7xss4JxkiiWh5cnIlfGyfJne2Ii3QpbiRuFL5dMJtljw==} + /vitest/0.21.1_c8@7.12.0: + resolution: {integrity: sha512-WBIxuFmIDPuK47GO6Lu9eNeRMqHj/FWL3dk73OHH3eyPPWPiu+UB3QHLkLK2PEggCqJW4FaWoWg8R68S7p9+9Q==} engines: {node: '>=v14.16.0'} hasBin: true peerDependencies: @@ -3661,9 +3912,9 @@ packages: jsdom: optional: true dependencies: - '@types/chai': 4.3.1 + '@types/chai': 4.3.3 '@types/chai-subset': 1.3.3 - '@types/node': 18.6.3 + '@types/node': 18.6.5 c8: 7.12.0 chai: 4.3.6 debug: 4.3.4 diff --git a/src/resolve.ts b/src/resolve.ts index 89fceb6..0cc0cb4 100644 --- a/src/resolve.ts +++ b/src/resolve.ts @@ -1,5 +1,6 @@ import { existsSync, realpathSync } from 'fs' import { pathToFileURL } from 'url' +import { joinURL } from 'ufo' import { isAbsolute } from 'pathe' import { moduleResolve } from '../lib/import-meta-resolve' import { fileURLToPath, normalizeid } from './utils' @@ -56,12 +57,16 @@ function _resolve (id: string, opts: ResolveOptions = {}): string { _urls.push(DEFAULT_URL) } const urls = [..._urls] - // TODO: Consider pnp - for (const url of _urls) { - if (url.protocol === 'file:' && !url.pathname.includes('node_modules')) { - const newURL = new URL(url) - newURL.pathname += '/node_modules' - urls.push(newURL) + for (let url of _urls) { + if (url.protocol === 'file:') { + if (!url.pathname.match(/[^/]+\.[^/.]+$/)) { + // URL does not ends with extension. It is probably a directory. + url = new URL(url) + url.pathname = joinURL(url.pathname, '_index.js') + } + urls.push(new URL('./', url)) + // TODO: Remove in next major version seems not necessary + urls.push(new URL('./node_modules', url)) } }