diff --git a/eslint.config.js b/eslint.config.js index 60a5a6b5..5c3dd52c 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,5 +1,5 @@ import antfu from '@antfu/eslint-config' export default await antfu({ - ignores: ['test/fixtures'] + ignores: ['test/fixtures'], }) diff --git a/package.json b/package.json index bacabc25..7cb248f4 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,18 @@ { "name": "unplugin-swc", + "type": "module", "version": "0.0.0", "packageManager": "pnpm@9.4.0", "description": "SWC plugin for Vite and Rollup", "publishConfig": { "access": "public" }, - "license": "MIT", "author": "EGOIST (https://github.com/egoist)", "contributors": [ "hannoeru (https://github.com/hannoeru)" ], + "license": "MIT", + "homepage": "https://github.com/unplugin/unplugin-swc/tree/main/#readme", "repository": { "type": "git", "url": "https://github.com/unplugin/unplugin-swc.git" @@ -18,8 +20,6 @@ "bugs": { "url": "https://github.com/unplugin/unplugin-swc/issues" }, - "homepage": "https://github.com/unplugin/unplugin-swc/tree/main/#readme", - "types": "./dist/index.d.ts", "exports": { ".": { "import": { @@ -32,12 +32,13 @@ } } }, + "types": "./dist/index.d.ts", "files": [ "dist" ], "scripts": { "build": "tsup", - "test": "npm run build && vitest", + "test": "vitest", "lint": "eslint .", "lint:fix": "eslint . --fix", "prepublishOnly": "npm run build", @@ -57,6 +58,7 @@ "@types/node": "^20.14.9", "defu": "^6.1.4", "esbuild": "0.20.2", + "eslint": "^9.6.0", "path-exists": "^5.0.0", "prettier": "3.2.5", "rollup": "^4.18.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 167776c8..d870d198 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -20,7 +20,7 @@ importers: devDependencies: '@antfu/eslint-config': specifier: ^2.21.2 - version: 2.21.2(@vue/compiler-sfc@3.4.31)(eslint-plugin-react-hooks@4.6.2(eslint@8.57.0))(eslint@8.57.0)(typescript@5.4.4)(vitest@1.6.0(@types/node@20.14.9)) + version: 2.21.2(@vue/compiler-sfc@3.4.31)(eslint-plugin-react-hooks@4.6.2(eslint@9.6.0))(eslint@9.6.0)(typescript@5.4.4)(vitest@1.6.0(@types/node@20.14.9)) '@swc/core': specifier: ^1.6.6 version: 1.6.6 @@ -33,6 +33,9 @@ importers: esbuild: specifier: 0.20.2 version: 0.20.2 + eslint: + specifier: ^9.6.0 + version: 9.6.0 path-exists: specifier: ^5.0.0 version: 5.0.0 @@ -570,30 +573,29 @@ packages: resolution: {integrity: sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/eslintrc@2.1.4': - resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + '@eslint/config-array@0.17.0': + resolution: {integrity: sha512-A68TBu6/1mHHuc5YJL0U0VVeGNiklLAL6rRmhTCP2B5XjWLMnrX+HkO+IAXyHvks5cyyY1jjK5ITPQ1HGS2EVA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/eslintrc@3.1.0': resolution: {integrity: sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@8.57.0': - resolution: {integrity: sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + '@eslint/js@9.6.0': + resolution: {integrity: sha512-D9B0/3vNg44ZeWbYMpBoXqNP4j6eQD5vNwIlGAuFRRzK/WtT/jvDQW3Bi9kkf3PMDMlM7Yi+73VLUsn5bJcl8A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@humanwhocodes/config-array@0.11.14': - resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} - engines: {node: '>=10.10.0'} - deprecated: Use @eslint/config-array instead + '@eslint/object-schema@2.1.4': + resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} - '@humanwhocodes/object-schema@2.0.3': - resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} - deprecated: Use @eslint/object-schema instead + '@humanwhocodes/retry@0.3.0': + resolution: {integrity: sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==} + engines: {node: '>=18.18'} '@isaacs/cliui@8.0.2': resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} @@ -950,9 +952,6 @@ packages: resolution: {integrity: sha512-Crb+F75U1JAEtBeQGxSKwI60hZmmzaqA3z9sYsVm8X7W5cwLEm5bRe0/uXS6+MR/y8CVpKSR/ontIAIEPFcEkA==} engines: {node: ^18.18.0 || >=20.0.0} - '@ungap/structured-clone@1.2.0': - resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} - '@vitest/expect@1.6.0': resolution: {integrity: sha512-ixEvFVQjycy/oNgHjqsL6AZCDduC+tflRluaHIzKIsdbzkLn2U/iBnVeJwB6HsIjQBdfMR8Z0tRxKUsvFJEeWQ==} @@ -1432,6 +1431,10 @@ packages: resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + eslint-scope@8.0.1: + resolution: {integrity: sha512-pL8XjgP4ZOmmwfFE8mEhSxA7ZY4C+LWyqjQ3o4yWkkmD0qcMT9kkW3zWHOczhWcjTSgqycYAgwSlXvZltv65og==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint-visitor-keys@3.4.3: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1440,9 +1443,9 @@ packages: resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - eslint@8.57.0: - resolution: {integrity: sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + eslint@9.6.0: + resolution: {integrity: sha512-ElQkdLMEEqQNM9Njff+2Y4q2afHk7JpkPvrd7Xh7xefwgQynqPxwf55J7di9+MEibWUGdNjFF9ITG9Pck5M84w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true espree@10.1.0: @@ -1499,9 +1502,9 @@ packages: fastq@1.17.1: resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} - file-entry-cache@6.0.1: - resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} - engines: {node: ^10.12.0 || >=12.0.0} + file-entry-cache@8.0.0: + resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} + engines: {node: '>=16.0.0'} fill-range@7.1.1: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} @@ -1519,9 +1522,9 @@ packages: resolution: {integrity: sha512-YyZM99iHrqLKjmt4LJDj58KI+fYyufRLBSYcqycxf//KpBk9FoewoGX0450m9nB44qrZnovzC2oeP5hUibxc/g==} engines: {node: '>=18'} - flat-cache@3.2.0: - resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} - engines: {node: ^10.12.0 || >=12.0.0} + flat-cache@4.0.1: + resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} + engines: {node: '>=16'} flatted@3.3.1: resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} @@ -1530,9 +1533,6 @@ packages: resolution: {integrity: sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==} engines: {node: '>=14'} - fs.realpath@1.0.0: - resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} - fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -1572,10 +1572,6 @@ packages: engines: {node: '>=16 || 14 >=14.18'} hasBin: true - glob@7.2.3: - resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} - deprecated: Glob versions prior to v9 are no longer supported - globals@13.24.0: resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} engines: {node: '>=8'} @@ -1637,13 +1633,6 @@ packages: resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} engines: {node: '>=8'} - inflight@1.0.6: - resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} - deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. - - inherits@2.0.4: - resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - is-alphabetical@1.0.4: resolution: {integrity: sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==} @@ -1897,9 +1886,6 @@ packages: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} - once@1.4.0: - resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} - onetime@5.1.2: resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} engines: {node: '>=6'} @@ -1974,10 +1960,6 @@ packages: resolution: {integrity: sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - path-is-absolute@1.0.1: - resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} - engines: {node: '>=0.10.0'} - path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} @@ -2119,11 +2101,6 @@ packages: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - rimraf@3.0.2: - resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} - deprecated: Rimraf versions prior to v4 are no longer supported - hasBin: true - rollup@4.18.0: resolution: {integrity: sha512-QmJz14PX3rzbJCN1SG4Xe/bAAX2a6NpCP8ab2vfu2GiUr8AQcr2nCV/oEO3yneFarB67zk8ShlIyWb2LGTb3Sg==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} @@ -2497,9 +2474,6 @@ packages: resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} engines: {node: '>=12'} - wrappy@1.0.2: - resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - xml-name-validator@4.0.0: resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==} engines: {node: '>=12'} @@ -2535,46 +2509,46 @@ packages: snapshots: - '@antfu/eslint-config@2.21.2(@vue/compiler-sfc@3.4.31)(eslint-plugin-react-hooks@4.6.2(eslint@8.57.0))(eslint@8.57.0)(typescript@5.4.4)(vitest@1.6.0(@types/node@20.14.9))': + '@antfu/eslint-config@2.21.2(@vue/compiler-sfc@3.4.31)(eslint-plugin-react-hooks@4.6.2(eslint@9.6.0))(eslint@9.6.0)(typescript@5.4.4)(vitest@1.6.0(@types/node@20.14.9))': dependencies: '@antfu/install-pkg': 0.3.3 '@clack/prompts': 0.7.0 - '@stylistic/eslint-plugin': 2.3.0(eslint@8.57.0)(typescript@5.4.4) - '@typescript-eslint/eslint-plugin': 7.14.1(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.4.4))(eslint@8.57.0)(typescript@5.4.4) - '@typescript-eslint/parser': 7.14.1(eslint@8.57.0)(typescript@5.4.4) - eslint: 8.57.0 + '@stylistic/eslint-plugin': 2.3.0(eslint@9.6.0)(typescript@5.4.4) + '@typescript-eslint/eslint-plugin': 7.14.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.4.4))(eslint@9.6.0)(typescript@5.4.4) + '@typescript-eslint/parser': 7.14.1(eslint@9.6.0)(typescript@5.4.4) + eslint: 9.6.0 eslint-config-flat-gitignore: 0.1.5 eslint-flat-config-utils: 0.2.5 - eslint-merge-processors: 0.1.0(eslint@8.57.0) - eslint-plugin-antfu: 2.3.3(eslint@8.57.0) - eslint-plugin-command: 0.2.3(eslint@8.57.0) - eslint-plugin-eslint-comments: 3.2.0(eslint@8.57.0) - eslint-plugin-import-x: 0.5.2(eslint@8.57.0)(typescript@5.4.4) - eslint-plugin-jsdoc: 48.5.0(eslint@8.57.0) - eslint-plugin-jsonc: 2.16.0(eslint@8.57.0) - eslint-plugin-markdown: 5.0.0(eslint@8.57.0) - eslint-plugin-n: 17.9.0(eslint@8.57.0) + eslint-merge-processors: 0.1.0(eslint@9.6.0) + eslint-plugin-antfu: 2.3.3(eslint@9.6.0) + eslint-plugin-command: 0.2.3(eslint@9.6.0) + eslint-plugin-eslint-comments: 3.2.0(eslint@9.6.0) + eslint-plugin-import-x: 0.5.2(eslint@9.6.0)(typescript@5.4.4) + eslint-plugin-jsdoc: 48.5.0(eslint@9.6.0) + eslint-plugin-jsonc: 2.16.0(eslint@9.6.0) + eslint-plugin-markdown: 5.0.0(eslint@9.6.0) + eslint-plugin-n: 17.9.0(eslint@9.6.0) eslint-plugin-no-only-tests: 3.1.0 - eslint-plugin-perfectionist: 2.11.0(eslint@8.57.0)(typescript@5.4.4)(vue-eslint-parser@9.4.3(eslint@8.57.0)) - eslint-plugin-regexp: 2.6.0(eslint@8.57.0) - eslint-plugin-toml: 0.11.1(eslint@8.57.0) - eslint-plugin-unicorn: 54.0.0(eslint@8.57.0) - eslint-plugin-unused-imports: 3.2.0(@typescript-eslint/eslint-plugin@7.14.1(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.4.4))(eslint@8.57.0)(typescript@5.4.4))(eslint@8.57.0) - eslint-plugin-vitest: 0.5.4(@typescript-eslint/eslint-plugin@7.14.1(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.4.4))(eslint@8.57.0)(typescript@5.4.4))(eslint@8.57.0)(typescript@5.4.4)(vitest@1.6.0(@types/node@20.14.9)) - eslint-plugin-vue: 9.26.0(eslint@8.57.0) - eslint-plugin-yml: 1.14.0(eslint@8.57.0) - eslint-processor-vue-blocks: 0.1.2(@vue/compiler-sfc@3.4.31)(eslint@8.57.0) + eslint-plugin-perfectionist: 2.11.0(eslint@9.6.0)(typescript@5.4.4)(vue-eslint-parser@9.4.3(eslint@9.6.0)) + eslint-plugin-regexp: 2.6.0(eslint@9.6.0) + eslint-plugin-toml: 0.11.1(eslint@9.6.0) + eslint-plugin-unicorn: 54.0.0(eslint@9.6.0) + eslint-plugin-unused-imports: 3.2.0(@typescript-eslint/eslint-plugin@7.14.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.4.4))(eslint@9.6.0)(typescript@5.4.4))(eslint@9.6.0) + eslint-plugin-vitest: 0.5.4(@typescript-eslint/eslint-plugin@7.14.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.4.4))(eslint@9.6.0)(typescript@5.4.4))(eslint@9.6.0)(typescript@5.4.4)(vitest@1.6.0(@types/node@20.14.9)) + eslint-plugin-vue: 9.26.0(eslint@9.6.0) + eslint-plugin-yml: 1.14.0(eslint@9.6.0) + eslint-processor-vue-blocks: 0.1.2(@vue/compiler-sfc@3.4.31)(eslint@9.6.0) globals: 15.7.0 jsonc-eslint-parser: 2.4.0 local-pkg: 0.5.0 parse-gitignore: 2.0.0 picocolors: 1.0.1 toml-eslint-parser: 0.10.0 - vue-eslint-parser: 9.4.3(eslint@8.57.0) + vue-eslint-parser: 9.4.3(eslint@9.6.0) yaml-eslint-parser: 1.2.3 yargs: 17.7.2 optionalDependencies: - eslint-plugin-react-hooks: 4.6.2(eslint@8.57.0) + eslint-plugin-react-hooks: 4.6.2(eslint@9.6.0) transitivePeerDependencies: - '@vue/compiler-sfc' - supports-color @@ -2841,24 +2815,18 @@ snapshots: '@esbuild/win32-x64@0.21.5': optional: true - '@eslint-community/eslint-utils@4.4.0(eslint@8.57.0)': + '@eslint-community/eslint-utils@4.4.0(eslint@9.6.0)': dependencies: - eslint: 8.57.0 + eslint: 9.6.0 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.11.0': {} - '@eslint/eslintrc@2.1.4': + '@eslint/config-array@0.17.0': dependencies: - ajv: 6.12.6 + '@eslint/object-schema': 2.1.4 debug: 4.3.5 - espree: 9.6.1 - globals: 13.24.0 - ignore: 5.3.1 - import-fresh: 3.3.0 - js-yaml: 4.1.0 minimatch: 3.1.2 - strip-json-comments: 3.1.1 transitivePeerDependencies: - supports-color @@ -2876,19 +2844,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@8.57.0': {} + '@eslint/js@9.6.0': {} - '@humanwhocodes/config-array@0.11.14': - dependencies: - '@humanwhocodes/object-schema': 2.0.3 - debug: 4.3.5 - minimatch: 3.1.2 - transitivePeerDependencies: - - supports-color + '@eslint/object-schema@2.1.4': {} '@humanwhocodes/module-importer@1.0.1': {} - '@humanwhocodes/object-schema@2.0.3': {} + '@humanwhocodes/retry@0.3.0': {} '@isaacs/cliui@8.0.2': dependencies: @@ -3002,49 +2964,49 @@ snapshots: '@sinclair/typebox@0.27.8': {} - '@stylistic/eslint-plugin-js@2.3.0(eslint@8.57.0)': + '@stylistic/eslint-plugin-js@2.3.0(eslint@9.6.0)': dependencies: '@types/eslint': 8.56.10 acorn: 8.12.0 - eslint: 8.57.0 + eslint: 9.6.0 eslint-visitor-keys: 4.0.0 espree: 10.1.0 - '@stylistic/eslint-plugin-jsx@2.3.0(eslint@8.57.0)': + '@stylistic/eslint-plugin-jsx@2.3.0(eslint@9.6.0)': dependencies: - '@stylistic/eslint-plugin-js': 2.3.0(eslint@8.57.0) + '@stylistic/eslint-plugin-js': 2.3.0(eslint@9.6.0) '@types/eslint': 8.56.10 - eslint: 8.57.0 + eslint: 9.6.0 estraverse: 5.3.0 picomatch: 4.0.2 - '@stylistic/eslint-plugin-plus@2.3.0(eslint@8.57.0)(typescript@5.4.4)': + '@stylistic/eslint-plugin-plus@2.3.0(eslint@9.6.0)(typescript@5.4.4)': dependencies: '@types/eslint': 8.56.10 - '@typescript-eslint/utils': 7.14.1(eslint@8.57.0)(typescript@5.4.4) - eslint: 8.57.0 + '@typescript-eslint/utils': 7.14.1(eslint@9.6.0)(typescript@5.4.4) + eslint: 9.6.0 transitivePeerDependencies: - supports-color - typescript - '@stylistic/eslint-plugin-ts@2.3.0(eslint@8.57.0)(typescript@5.4.4)': + '@stylistic/eslint-plugin-ts@2.3.0(eslint@9.6.0)(typescript@5.4.4)': dependencies: - '@stylistic/eslint-plugin-js': 2.3.0(eslint@8.57.0) + '@stylistic/eslint-plugin-js': 2.3.0(eslint@9.6.0) '@types/eslint': 8.56.10 - '@typescript-eslint/utils': 7.14.1(eslint@8.57.0)(typescript@5.4.4) - eslint: 8.57.0 + '@typescript-eslint/utils': 7.14.1(eslint@9.6.0)(typescript@5.4.4) + eslint: 9.6.0 transitivePeerDependencies: - supports-color - typescript - '@stylistic/eslint-plugin@2.3.0(eslint@8.57.0)(typescript@5.4.4)': + '@stylistic/eslint-plugin@2.3.0(eslint@9.6.0)(typescript@5.4.4)': dependencies: - '@stylistic/eslint-plugin-js': 2.3.0(eslint@8.57.0) - '@stylistic/eslint-plugin-jsx': 2.3.0(eslint@8.57.0) - '@stylistic/eslint-plugin-plus': 2.3.0(eslint@8.57.0)(typescript@5.4.4) - '@stylistic/eslint-plugin-ts': 2.3.0(eslint@8.57.0)(typescript@5.4.4) + '@stylistic/eslint-plugin-js': 2.3.0(eslint@9.6.0) + '@stylistic/eslint-plugin-jsx': 2.3.0(eslint@9.6.0) + '@stylistic/eslint-plugin-plus': 2.3.0(eslint@9.6.0)(typescript@5.4.4) + '@stylistic/eslint-plugin-ts': 2.3.0(eslint@9.6.0)(typescript@5.4.4) '@types/eslint': 8.56.10 - eslint: 8.57.0 + eslint: 9.6.0 transitivePeerDependencies: - supports-color - typescript @@ -3124,15 +3086,15 @@ snapshots: '@types/unist@2.0.10': {} - '@typescript-eslint/eslint-plugin@7.14.1(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.4.4))(eslint@8.57.0)(typescript@5.4.4)': + '@typescript-eslint/eslint-plugin@7.14.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.4.4))(eslint@9.6.0)(typescript@5.4.4)': dependencies: '@eslint-community/regexpp': 4.11.0 - '@typescript-eslint/parser': 7.14.1(eslint@8.57.0)(typescript@5.4.4) + '@typescript-eslint/parser': 7.14.1(eslint@9.6.0)(typescript@5.4.4) '@typescript-eslint/scope-manager': 7.14.1 - '@typescript-eslint/type-utils': 7.14.1(eslint@8.57.0)(typescript@5.4.4) - '@typescript-eslint/utils': 7.14.1(eslint@8.57.0)(typescript@5.4.4) + '@typescript-eslint/type-utils': 7.14.1(eslint@9.6.0)(typescript@5.4.4) + '@typescript-eslint/utils': 7.14.1(eslint@9.6.0)(typescript@5.4.4) '@typescript-eslint/visitor-keys': 7.14.1 - eslint: 8.57.0 + eslint: 9.6.0 graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 @@ -3142,14 +3104,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.4.4)': + '@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.4.4)': dependencies: '@typescript-eslint/scope-manager': 7.14.1 '@typescript-eslint/types': 7.14.1 '@typescript-eslint/typescript-estree': 7.14.1(typescript@5.4.4) '@typescript-eslint/visitor-keys': 7.14.1 debug: 4.3.5 - eslint: 8.57.0 + eslint: 9.6.0 optionalDependencies: typescript: 5.4.4 transitivePeerDependencies: @@ -3165,12 +3127,12 @@ snapshots: '@typescript-eslint/types': 7.14.1 '@typescript-eslint/visitor-keys': 7.14.1 - '@typescript-eslint/type-utils@7.14.1(eslint@8.57.0)(typescript@5.4.4)': + '@typescript-eslint/type-utils@7.14.1(eslint@9.6.0)(typescript@5.4.4)': dependencies: '@typescript-eslint/typescript-estree': 7.14.1(typescript@5.4.4) - '@typescript-eslint/utils': 7.14.1(eslint@8.57.0)(typescript@5.4.4) + '@typescript-eslint/utils': 7.14.1(eslint@9.6.0)(typescript@5.4.4) debug: 4.3.5 - eslint: 8.57.0 + eslint: 9.6.0 ts-api-utils: 1.3.0(typescript@5.4.4) optionalDependencies: typescript: 5.4.4 @@ -3211,27 +3173,27 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@6.21.0(eslint@8.57.0)(typescript@5.4.4)': + '@typescript-eslint/utils@6.21.0(eslint@9.6.0)(typescript@5.4.4)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.6.0) '@types/json-schema': 7.0.15 '@types/semver': 7.5.8 '@typescript-eslint/scope-manager': 6.21.0 '@typescript-eslint/types': 6.21.0 '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.4.4) - eslint: 8.57.0 + eslint: 9.6.0 semver: 7.6.2 transitivePeerDependencies: - supports-color - typescript - '@typescript-eslint/utils@7.14.1(eslint@8.57.0)(typescript@5.4.4)': + '@typescript-eslint/utils@7.14.1(eslint@9.6.0)(typescript@5.4.4)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.6.0) '@typescript-eslint/scope-manager': 7.14.1 '@typescript-eslint/types': 7.14.1 '@typescript-eslint/typescript-estree': 7.14.1(typescript@5.4.4) - eslint: 8.57.0 + eslint: 9.6.0 transitivePeerDependencies: - supports-color - typescript @@ -3246,8 +3208,6 @@ snapshots: '@typescript-eslint/types': 7.14.1 eslint-visitor-keys: 3.4.3 - '@ungap/structured-clone@1.2.0': {} - '@vitest/expect@1.6.0': dependencies: '@vitest/spy': 1.6.0 @@ -3616,9 +3576,9 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-compat-utils@0.5.1(eslint@8.57.0): + eslint-compat-utils@0.5.1(eslint@9.6.0): dependencies: - eslint: 8.57.0 + eslint: 9.6.0 semver: 7.6.2 eslint-config-flat-gitignore@0.1.5: @@ -3639,39 +3599,39 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-merge-processors@0.1.0(eslint@8.57.0): + eslint-merge-processors@0.1.0(eslint@9.6.0): dependencies: - eslint: 8.57.0 + eslint: 9.6.0 - eslint-plugin-antfu@2.3.3(eslint@8.57.0): + eslint-plugin-antfu@2.3.3(eslint@9.6.0): dependencies: '@antfu/utils': 0.7.10 - eslint: 8.57.0 + eslint: 9.6.0 - eslint-plugin-command@0.2.3(eslint@8.57.0): + eslint-plugin-command@0.2.3(eslint@9.6.0): dependencies: '@es-joy/jsdoccomment': 0.43.1 - eslint: 8.57.0 + eslint: 9.6.0 - eslint-plugin-es-x@7.8.0(eslint@8.57.0): + eslint-plugin-es-x@7.8.0(eslint@9.6.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.6.0) '@eslint-community/regexpp': 4.11.0 - eslint: 8.57.0 - eslint-compat-utils: 0.5.1(eslint@8.57.0) + eslint: 9.6.0 + eslint-compat-utils: 0.5.1(eslint@9.6.0) - eslint-plugin-eslint-comments@3.2.0(eslint@8.57.0): + eslint-plugin-eslint-comments@3.2.0(eslint@9.6.0): dependencies: escape-string-regexp: 1.0.5 - eslint: 8.57.0 + eslint: 9.6.0 ignore: 5.3.1 - eslint-plugin-import-x@0.5.2(eslint@8.57.0)(typescript@5.4.4): + eslint-plugin-import-x@0.5.2(eslint@9.6.0)(typescript@5.4.4): dependencies: - '@typescript-eslint/utils': 7.14.1(eslint@8.57.0)(typescript@5.4.4) + '@typescript-eslint/utils': 7.14.1(eslint@9.6.0)(typescript@5.4.4) debug: 4.3.5 doctrine: 3.0.0 - eslint: 8.57.0 + eslint: 9.6.0 eslint-import-resolver-node: 0.3.9 get-tsconfig: 4.7.5 is-glob: 4.0.3 @@ -3682,14 +3642,14 @@ snapshots: - supports-color - typescript - eslint-plugin-jsdoc@48.5.0(eslint@8.57.0): + eslint-plugin-jsdoc@48.5.0(eslint@9.6.0): dependencies: '@es-joy/jsdoccomment': 0.43.1 are-docs-informative: 0.0.2 comment-parser: 1.4.1 debug: 4.3.5 escape-string-regexp: 4.0.0 - eslint: 8.57.0 + eslint: 9.6.0 esquery: 1.5.0 parse-imports: 2.1.0 semver: 7.6.2 @@ -3698,30 +3658,30 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-jsonc@2.16.0(eslint@8.57.0): + eslint-plugin-jsonc@2.16.0(eslint@9.6.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - eslint: 8.57.0 - eslint-compat-utils: 0.5.1(eslint@8.57.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.6.0) + eslint: 9.6.0 + eslint-compat-utils: 0.5.1(eslint@9.6.0) espree: 9.6.1 graphemer: 1.4.0 jsonc-eslint-parser: 2.4.0 natural-compare: 1.4.0 synckit: 0.6.2 - eslint-plugin-markdown@5.0.0(eslint@8.57.0): + eslint-plugin-markdown@5.0.0(eslint@9.6.0): dependencies: - eslint: 8.57.0 + eslint: 9.6.0 mdast-util-from-markdown: 0.8.5 transitivePeerDependencies: - supports-color - eslint-plugin-n@17.9.0(eslint@8.57.0): + eslint-plugin-n@17.9.0(eslint@9.6.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.6.0) enhanced-resolve: 5.17.0 - eslint: 8.57.0 - eslint-plugin-es-x: 7.8.0(eslint@8.57.0) + eslint: 9.6.0 + eslint-plugin-es-x: 7.8.0(eslint@9.6.0) get-tsconfig: 4.7.5 globals: 15.7.0 ignore: 5.3.1 @@ -3730,53 +3690,53 @@ snapshots: eslint-plugin-no-only-tests@3.1.0: {} - eslint-plugin-perfectionist@2.11.0(eslint@8.57.0)(typescript@5.4.4)(vue-eslint-parser@9.4.3(eslint@8.57.0)): + eslint-plugin-perfectionist@2.11.0(eslint@9.6.0)(typescript@5.4.4)(vue-eslint-parser@9.4.3(eslint@9.6.0)): dependencies: - '@typescript-eslint/utils': 6.21.0(eslint@8.57.0)(typescript@5.4.4) - eslint: 8.57.0 + '@typescript-eslint/utils': 6.21.0(eslint@9.6.0)(typescript@5.4.4) + eslint: 9.6.0 minimatch: 9.0.5 natural-compare-lite: 1.4.0 optionalDependencies: - vue-eslint-parser: 9.4.3(eslint@8.57.0) + vue-eslint-parser: 9.4.3(eslint@9.6.0) transitivePeerDependencies: - supports-color - typescript - eslint-plugin-react-hooks@4.6.2(eslint@8.57.0): + eslint-plugin-react-hooks@4.6.2(eslint@9.6.0): dependencies: - eslint: 8.57.0 + eslint: 9.6.0 optional: true - eslint-plugin-regexp@2.6.0(eslint@8.57.0): + eslint-plugin-regexp@2.6.0(eslint@9.6.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.6.0) '@eslint-community/regexpp': 4.11.0 comment-parser: 1.4.1 - eslint: 8.57.0 + eslint: 9.6.0 jsdoc-type-pratt-parser: 4.0.0 refa: 0.12.1 regexp-ast-analysis: 0.7.1 scslre: 0.3.0 - eslint-plugin-toml@0.11.1(eslint@8.57.0): + eslint-plugin-toml@0.11.1(eslint@9.6.0): dependencies: debug: 4.3.5 - eslint: 8.57.0 - eslint-compat-utils: 0.5.1(eslint@8.57.0) + eslint: 9.6.0 + eslint-compat-utils: 0.5.1(eslint@9.6.0) lodash: 4.17.21 toml-eslint-parser: 0.10.0 transitivePeerDependencies: - supports-color - eslint-plugin-unicorn@54.0.0(eslint@8.57.0): + eslint-plugin-unicorn@54.0.0(eslint@9.6.0): dependencies: '@babel/helper-validator-identifier': 7.24.7 - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.6.0) '@eslint/eslintrc': 3.1.0 ci-info: 4.0.0 clean-regexp: 1.0.0 core-js-compat: 3.37.1 - eslint: 8.57.0 + eslint: 9.6.0 esquery: 1.5.0 indent-string: 4.0.0 is-builtin-module: 3.2.1 @@ -3790,53 +3750,53 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-unused-imports@3.2.0(@typescript-eslint/eslint-plugin@7.14.1(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.4.4))(eslint@8.57.0)(typescript@5.4.4))(eslint@8.57.0): + eslint-plugin-unused-imports@3.2.0(@typescript-eslint/eslint-plugin@7.14.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.4.4))(eslint@9.6.0)(typescript@5.4.4))(eslint@9.6.0): dependencies: - eslint: 8.57.0 + eslint: 9.6.0 eslint-rule-composer: 0.3.0 optionalDependencies: - '@typescript-eslint/eslint-plugin': 7.14.1(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.4.4))(eslint@8.57.0)(typescript@5.4.4) + '@typescript-eslint/eslint-plugin': 7.14.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.4.4))(eslint@9.6.0)(typescript@5.4.4) - eslint-plugin-vitest@0.5.4(@typescript-eslint/eslint-plugin@7.14.1(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.4.4))(eslint@8.57.0)(typescript@5.4.4))(eslint@8.57.0)(typescript@5.4.4)(vitest@1.6.0(@types/node@20.14.9)): + eslint-plugin-vitest@0.5.4(@typescript-eslint/eslint-plugin@7.14.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.4.4))(eslint@9.6.0)(typescript@5.4.4))(eslint@9.6.0)(typescript@5.4.4)(vitest@1.6.0(@types/node@20.14.9)): dependencies: - '@typescript-eslint/utils': 7.14.1(eslint@8.57.0)(typescript@5.4.4) - eslint: 8.57.0 + '@typescript-eslint/utils': 7.14.1(eslint@9.6.0)(typescript@5.4.4) + eslint: 9.6.0 optionalDependencies: - '@typescript-eslint/eslint-plugin': 7.14.1(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.4.4))(eslint@8.57.0)(typescript@5.4.4) + '@typescript-eslint/eslint-plugin': 7.14.1(@typescript-eslint/parser@7.14.1(eslint@9.6.0)(typescript@5.4.4))(eslint@9.6.0)(typescript@5.4.4) vitest: 1.6.0(@types/node@20.14.9) transitivePeerDependencies: - supports-color - typescript - eslint-plugin-vue@9.26.0(eslint@8.57.0): + eslint-plugin-vue@9.26.0(eslint@9.6.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - eslint: 8.57.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@9.6.0) + eslint: 9.6.0 globals: 13.24.0 natural-compare: 1.4.0 nth-check: 2.1.1 postcss-selector-parser: 6.1.0 semver: 7.6.2 - vue-eslint-parser: 9.4.3(eslint@8.57.0) + vue-eslint-parser: 9.4.3(eslint@9.6.0) xml-name-validator: 4.0.0 transitivePeerDependencies: - supports-color - eslint-plugin-yml@1.14.0(eslint@8.57.0): + eslint-plugin-yml@1.14.0(eslint@9.6.0): dependencies: debug: 4.3.5 - eslint: 8.57.0 - eslint-compat-utils: 0.5.1(eslint@8.57.0) + eslint: 9.6.0 + eslint-compat-utils: 0.5.1(eslint@9.6.0) lodash: 4.17.21 natural-compare: 1.4.0 yaml-eslint-parser: 1.2.3 transitivePeerDependencies: - supports-color - eslint-processor-vue-blocks@0.1.2(@vue/compiler-sfc@3.4.31)(eslint@8.57.0): + eslint-processor-vue-blocks@0.1.2(@vue/compiler-sfc@3.4.31)(eslint@9.6.0): dependencies: '@vue/compiler-sfc': 3.4.31 - eslint: 8.57.0 + eslint: 9.6.0 eslint-rule-composer@0.3.0: {} @@ -3845,42 +3805,43 @@ snapshots: esrecurse: 4.3.0 estraverse: 5.3.0 + eslint-scope@8.0.1: + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + eslint-visitor-keys@3.4.3: {} eslint-visitor-keys@4.0.0: {} - eslint@8.57.0: + eslint@9.6.0: dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.6.0) '@eslint-community/regexpp': 4.11.0 - '@eslint/eslintrc': 2.1.4 - '@eslint/js': 8.57.0 - '@humanwhocodes/config-array': 0.11.14 + '@eslint/config-array': 0.17.0 + '@eslint/eslintrc': 3.1.0 + '@eslint/js': 9.6.0 '@humanwhocodes/module-importer': 1.0.1 + '@humanwhocodes/retry': 0.3.0 '@nodelib/fs.walk': 1.2.8 - '@ungap/structured-clone': 1.2.0 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 debug: 4.3.5 - doctrine: 3.0.0 escape-string-regexp: 4.0.0 - eslint-scope: 7.2.2 - eslint-visitor-keys: 3.4.3 - espree: 9.6.1 + eslint-scope: 8.0.1 + eslint-visitor-keys: 4.0.0 + espree: 10.1.0 esquery: 1.5.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 - file-entry-cache: 6.0.1 + file-entry-cache: 8.0.0 find-up: 5.0.0 glob-parent: 6.0.2 - globals: 13.24.0 - graphemer: 1.4.0 ignore: 5.3.1 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 - js-yaml: 4.1.0 json-stable-stringify-without-jsonify: 1.0.1 levn: 0.4.1 lodash.merge: 4.6.2 @@ -3964,9 +3925,9 @@ snapshots: dependencies: reusify: 1.0.4 - file-entry-cache@6.0.1: + file-entry-cache@8.0.0: dependencies: - flat-cache: 3.2.0 + flat-cache: 4.0.1 fill-range@7.1.1: dependencies: @@ -3988,11 +3949,10 @@ snapshots: path-exists: 5.0.0 unicorn-magic: 0.1.0 - flat-cache@3.2.0: + flat-cache@4.0.1: dependencies: flatted: 3.3.1 keyv: 4.5.4 - rimraf: 3.0.2 flatted@3.3.1: {} @@ -4001,8 +3961,6 @@ snapshots: cross-spawn: 7.0.3 signal-exit: 4.1.0 - fs.realpath@1.0.0: {} - fsevents@2.3.3: optional: true @@ -4037,15 +3995,6 @@ snapshots: package-json-from-dist: 1.0.0 path-scurry: 1.11.1 - glob@7.2.3: - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.1.2 - once: 1.4.0 - path-is-absolute: 1.0.1 - globals@13.24.0: dependencies: type-fest: 0.20.2 @@ -4092,13 +4041,6 @@ snapshots: indent-string@4.0.0: {} - inflight@1.0.6: - dependencies: - once: 1.4.0 - wrappy: 1.0.2 - - inherits@2.0.4: {} - is-alphabetical@1.0.4: {} is-alphanumerical@1.0.4: @@ -4323,10 +4265,6 @@ snapshots: object-assign@4.1.1: {} - once@1.4.0: - dependencies: - wrappy: 1.0.2 - onetime@5.1.2: dependencies: mimic-fn: 2.1.0 @@ -4407,8 +4345,6 @@ snapshots: path-exists@5.0.0: {} - path-is-absolute@1.0.1: {} - path-key@3.1.1: {} path-key@4.0.0: {} @@ -4524,10 +4460,6 @@ snapshots: reusify@1.0.4: {} - rimraf@3.0.2: - dependencies: - glob: 7.2.3 - rollup@4.18.0: dependencies: '@types/estree': 1.0.5 @@ -4849,10 +4781,10 @@ snapshots: - supports-color - terser - vue-eslint-parser@9.4.3(eslint@8.57.0): + vue-eslint-parser@9.4.3(eslint@9.6.0): dependencies: debug: 4.3.5 - eslint: 8.57.0 + eslint: 9.6.0 eslint-scope: 7.2.2 eslint-visitor-keys: 3.4.3 espree: 9.6.1 @@ -4897,8 +4829,6 @@ snapshots: string-width: 5.1.2 strip-ansi: 7.1.0 - wrappy@1.0.2: {} - xml-name-validator@4.0.0: {} y18n@5.0.8: {} diff --git a/src/index.ts b/src/index.ts index fc1c89cd..8ffedf84 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,13 +1,13 @@ -import path from 'path' +import path from 'node:path' import { createFilter } from '@rollup/pluginutils' import { transform } from '@swc/core' import { defu } from 'defu' // @ts-expect-error missing types import { loadTsConfig } from 'load-tsconfig' import { createUnplugin } from 'unplugin' -import { resolveId } from './resolve' import type { FilterPattern } from '@rollup/pluginutils' import type { JscConfig, Options as SwcOptions, TransformConfig } from '@swc/core' +import { resolveId } from './resolve' export type Options = SwcOptions & { include?: FilterPattern @@ -34,7 +34,8 @@ export default createUnplugin( resolveId, async transform(code, id) { - if (!filter(id)) return null + if (!filter(id)) + return null const compilerOptions = tsconfigFile === false @@ -56,7 +57,8 @@ export default createUnplugin( if (compilerOptions.jsx) { if (jsc.parser.syntax === 'typescript') { jsc.parser.tsx = true - } else { + } + else { jsc.parser.jsx = true } Object.assign(jsc.transform, { diff --git a/src/resolve.ts b/src/resolve.ts index fef2fe25..623729a2 100644 --- a/src/resolve.ts +++ b/src/resolve.ts @@ -1,21 +1,23 @@ -import fs from 'fs' -import path from 'path' +import fs from 'node:fs' +import path from 'node:path' import { pathExists } from 'path-exists' const RESOLVE_EXTENSIONS = ['.tsx', '.ts', '.mts', '.jsx', '.js', '.mjs', '.cjs'] -const resolveFile = async(resolved: string, index = false) => { +async function resolveFile(resolved: string, index = false) { for (const ext of RESOLVE_EXTENSIONS) { const file = index ? path.join(resolved, `index${ext}`) : `${resolved}${ext}` - if (await pathExists(file)) return file + if (await pathExists(file)) + return file } } -export const resolveId = async(importee: string, importer?: string) => { +export async function resolveId(importee: string, importer?: string) { if (importer && importee[0] === '.') { const absolutePath = path.resolve( + // eslint-disable-next-line node/prefer-global/process importer ? path.dirname(importer) : process.cwd(), importee, ) diff --git a/test/index.test.ts b/test/index.test.ts index 3b18a2d7..dc6239c1 100644 --- a/test/index.test.ts +++ b/test/index.test.ts @@ -1,11 +1,11 @@ -import path from 'path' +import path from 'node:path' import { rollup } from 'rollup' -import { expect, test } from 'vitest' -import swc from '../dist' +import { expect, it } from 'vitest' +import swc from '../src' const fixture = (...args: string[]) => path.join(__dirname, 'fixtures', ...args) -test('rollup', async() => { +it('rollup', async () => { const bundle = await rollup({ input: fixture('rollup/index.ts'), plugins: [ @@ -32,7 +32,7 @@ test('rollup', async() => { `) }) -test('read tsconfig', async() => { +it('read tsconfig', async () => { const bundle = await rollup({ input: fixture('read-tsconfig/index.tsx'), plugins: [swc.rollup()], @@ -53,7 +53,7 @@ test('read tsconfig', async() => { })).rejects.toThrow('Syntax Error') }) -test('custom swcrc', async() => { +it('custom swcrc', async () => { const bundle = await rollup({ input: fixture('custom-swcrc/index.tsx'), plugins: [ @@ -72,7 +72,7 @@ test('custom swcrc', async() => { expect(code).toMatch('customPragma') }) -test('minify', async() => { +it('minify', async () => { const bundle = await rollup({ input: fixture('minify/index.ts'), plugins: [ diff --git a/test/tsconfig.json b/test/tsconfig.json index 983716f0..59c3f261 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -2,14 +2,14 @@ "compilerOptions": { "target": "es2020", "module": "esnext", - "strict": true, - "esModuleInterop": true, "moduleResolution": "node", - "skipLibCheck": true, - "noUnusedLocals": true, - "noImplicitAny": true, + "resolveJsonModule": true, "allowJs": true, - "resolveJsonModule": true + "strict": true, + "noImplicitAny": true, + "noUnusedLocals": true, + "esModuleInterop": true, + "skipLibCheck": true }, "exclude": ["fixtures"] } diff --git a/tsconfig.json b/tsconfig.json index 1daed132..1f704613 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,14 +2,14 @@ "compilerOptions": { "target": "es2020", "module": "esnext", - "strict": true, - "esModuleInterop": true, "moduleResolution": "Bundler", - "skipLibCheck": true, - "noUnusedLocals": true, - "noImplicitAny": true, + "resolveJsonModule": true, "allowJs": true, - "resolveJsonModule": true + "strict": true, + "noImplicitAny": true, + "noUnusedLocals": true, + "esModuleInterop": true, + "skipLibCheck": true }, "include": ["src", "*.ts"] }