diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index aea6f96..01af39b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,7 @@ jobs: - name: Set node uses: actions/setup-node@v4 with: - node-version-file: '.nvmrc' + node-version-file: .nvmrc cache: pnpm registry-url: 'https://registry.npmjs.org' diff --git a/.vscode/settings.json b/.vscode/settings.json index 812ddeb..cc76f46 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -43,6 +43,11 @@ "xml", "gql", "graphql", - "astro" + "astro", + "css", + "less", + "scss", + "pcss", + "postcss" ] } diff --git a/README.md b/README.md index 50793a7..aff907b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # @uni-helper/uni-env -在 uni-app 中优雅的判断当前环境 +在 uni-app 中优雅地判断当前环境。 [![npm version][npm-version-src]][npm-version-href] [![npm downloads][npm-downloads-src]][npm-downloads-href] diff --git a/eslint.config.js b/eslint.config.js index 43ada6a..6a1a5cb 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,5 +1,3 @@ import antfu from '@antfu/eslint-config' -export default antfu({ - vue: false, -}) +export default antfu() diff --git a/package.json b/package.json index 2e2685a..79c259c 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@uni-helper/uni-env", "type": "module", "version": "0.1.2", - "packageManager": "pnpm@9.1.2", + "packageManager": "pnpm@9.4.0", "description": "", "author": "KeJun", "license": "MIT", @@ -49,10 +49,10 @@ "std-env": "^3.7.0" }, "devDependencies": { - "@antfu/eslint-config": "^2.18.1", - "@types/node": "^20.12.12", + "@antfu/eslint-config": "^2.21.1", + "@types/node": "^20.14.5", "bumpp": "^9.4.1", - "eslint": "^8.57.0", + "eslint": "^9.0.0", "esno": "^4.7.0", "typescript": "^5.4.5", "unbuild": "^2.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6611185..8c4f6d2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,17 +13,17 @@ importers: version: 3.7.0 devDependencies: '@antfu/eslint-config': - specifier: ^2.18.1 - version: 2.18.1(@vue/compiler-sfc@3.4.27)(eslint@8.57.0)(typescript@5.4.5)(vitest@1.6.0(@types/node@20.12.12)) + specifier: ^2.21.1 + version: 2.21.1(@vue/compiler-sfc@3.4.27)(eslint@9.5.0)(typescript@5.4.5)(vitest@1.6.0(@types/node@20.14.5)) '@types/node': - specifier: ^20.12.12 - version: 20.12.12 + specifier: ^20.14.5 + version: 20.14.5 bumpp: specifier: ^9.4.1 version: 9.4.1 eslint: - specifier: ^8.57.0 - version: 8.57.0 + specifier: ^9.0.0 + version: 9.5.0 esno: specifier: ^4.7.0 version: 4.7.0 @@ -35,7 +35,7 @@ importers: version: 2.0.0(typescript@5.4.5) vitest: specifier: ^1.6.0 - version: 1.6.0(@types/node@20.12.12) + version: 1.6.0(@types/node@20.14.5) packages: @@ -47,16 +47,16 @@ packages: resolution: {integrity: sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==} engines: {node: '>=6.0.0'} - '@antfu/eslint-config@2.18.1': - resolution: {integrity: sha512-6LkzQa96SHt47ZCvAcLJbQLUXmcpl9wI+eo5OeyB2YhHbsUBX7ufT0r4x6fx6Ci2694HRNLl8wY42LUvwidduw==} + '@antfu/eslint-config@2.21.1': + resolution: {integrity: sha512-CG7U7nihU73zufrxe5Rr4pxsHrW60GXl9yzRpRY+ImGQ2CVhd0eb3fqJYdNwDJBgKgqHGWX4p1ovYvno/jfWHA==} hasBin: true peerDependencies: '@eslint-react/eslint-plugin': ^1.5.8 '@prettier/plugin-xml': ^3.4.1 '@unocss/eslint-plugin': '>=0.50.0' - astro-eslint-parser: ^0.16.3 + astro-eslint-parser: ^1.0.2 eslint: '>=8.40.0' - eslint-plugin-astro: ^0.31.4 + eslint-plugin-astro: ^1.2.0 eslint-plugin-format: '>=0.1.0' eslint-plugin-react-hooks: ^4.6.0 eslint-plugin-react-refresh: ^0.4.4 @@ -207,8 +207,8 @@ packages: bundledDependencies: - is-unicode-supported - '@es-joy/jsdoccomment@0.43.0': - resolution: {integrity: sha512-Q1CnsQrytI3TlCB1IVWXWeqUIPGVEKGaE7IbVdt13Nq/3i0JESAkQQERrfiQkmlpijl+++qyqPgaS31Bvc1jRQ==} + '@es-joy/jsdoccomment@0.43.1': + resolution: {integrity: sha512-I238eDtOolvCuvtxrnqtlBaw0BwdQuYqK7eA6XIonicMdOOOb75mqdIzkGDUbS04+1Di007rgm9snFRNeVrOog==} engines: {node: '>=16'} '@esbuild/aix-ppc64@0.20.2': @@ -623,32 +623,29 @@ packages: resolution: {integrity: sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint-community/regexpp@4.9.1': - resolution: {integrity: sha512-Y27x+MBLjXa+0JWDhykM3+JE+il3kHKAEqabfEWq3SDhZjLYb6/BHL/JKFnH3fe207JaXkyDo685Oc2Glt6ifA==} - 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.16.0': + resolution: {integrity: sha512-/jmuSd74i4Czf1XXn7wGRWZCuyaUZ330NH1Bek0Pplatt4Sy1S5haN21SCLLdbeKslQ+S0wEJ+++v5YibSi+Lg==} + 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.5.0': + resolution: {integrity: sha512-A7+AOT2ICkodvtsWnxZP4Xxk3NbZ3VMHd8oihydLRGrJgqqdEz1qSeEgXYyT/Cu8h1TWWsQRejIx48mtjZ5y1w==} + 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'} + '@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==} + '@humanwhocodes/retry@0.3.0': + resolution: {integrity: sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==} + engines: {node: '>=18.18'} '@jest/schemas@29.6.3': resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==} @@ -876,8 +873,8 @@ packages: '@types/mdast@3.0.13': resolution: {integrity: sha512-HjiGiWedR0DVFkeNljpa6Lv4/IZU1+30VY5d747K7lBudFc3R0Ibr6yJ9lN3BE28VnZyDfLF/VB1Ql1ZIbKrmg==} - '@types/node@20.12.12': - resolution: {integrity: sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw==} + '@types/node@20.14.5': + resolution: {integrity: sha512-aoRR+fJkZT2l0aGOJhuA8frnCSoNX6W7U2mpNq63+BxBIj5BQFt8rHy627kijCmm63ijdSdwvGgpUsU6MBsZZA==} '@types/normalize-package-data@2.4.2': resolution: {integrity: sha512-lqa4UEhhv/2sjjIQgjX8B+RBjj47eo0mzGasklVJ78UKGQY1r0VpB9XHDaZZO9qzEFDdy4MrXLuEaSmPrPSe/A==} @@ -888,8 +885,8 @@ packages: '@types/unist@2.0.8': resolution: {integrity: sha512-d0XxK3YTObnWVp6rZuev3c49+j4Lo8g4L1ZRm9z5L0xpoZycUPshHgczK5gsUMaZOstjVYYi09p5gYvUtfChYw==} - '@typescript-eslint/eslint-plugin@7.10.0': - resolution: {integrity: sha512-PzCr+a/KAef5ZawX7nbyNwBDtM1HdLIT53aSA2DDlxmxMngZ43O8SIePOeX8H5S+FHXeI6t97mTt/dDdzY4Fyw==} + '@typescript-eslint/eslint-plugin@7.13.1': + resolution: {integrity: sha512-kZqi+WZQaZfPKnsflLJQCz6Ze9FFSMfXrrIOcyargekQxG37ES7DJNpJUE9Q/X5n3yTIP/WPutVNzgknQ7biLg==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: '@typescript-eslint/parser': ^7.0.0 @@ -899,8 +896,8 @@ packages: typescript: optional: true - '@typescript-eslint/parser@7.10.0': - resolution: {integrity: sha512-2EjZMA0LUW5V5tGQiaa2Gys+nKdfrn2xiTIBLR4fxmPmVSvgPcKNW+AE/ln9k0A4zDUti0J/GZXMDupQoI+e1w==} + '@typescript-eslint/parser@7.13.1': + resolution: {integrity: sha512-1ELDPlnLvDQ5ybTSrMhRTFDfOQEOXNM+eP+3HT/Yq7ruWpciQw+Avi73pdEbA4SooCawEWo3dtYbF68gN7Ed1A==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -909,12 +906,12 @@ packages: typescript: optional: true - '@typescript-eslint/scope-manager@7.10.0': - resolution: {integrity: sha512-7L01/K8W/VGl7noe2mgH0K7BE29Sq6KAbVmxurj8GGaPDZXPr8EEQ2seOeAS+mEV9DnzxBQB6ax6qQQ5C6P4xg==} + '@typescript-eslint/scope-manager@7.13.1': + resolution: {integrity: sha512-adbXNVEs6GmbzaCpymHQ0MB6E4TqoiVbC0iqG3uijR8ZYfpAXMGttouQzF4Oat3P2GxDVIrg7bMI/P65LiQZdg==} engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/type-utils@7.10.0': - resolution: {integrity: sha512-D7tS4WDkJWrVkuzgm90qYw9RdgBcrWmbbRkrLA4d7Pg3w0ttVGDsvYGV19SH8gPR5L7OtcN5J1hTtyenO9xE9g==} + '@typescript-eslint/type-utils@7.13.1': + resolution: {integrity: sha512-aWDbLu1s9bmgPGXSzNCxELu+0+HQOapV/y+60gPXafR8e2g1Bifxzevaa+4L2ytCWm+CHqpELq4CSoN9ELiwCg==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -923,12 +920,12 @@ packages: typescript: optional: true - '@typescript-eslint/types@7.10.0': - resolution: {integrity: sha512-7fNj+Ya35aNyhuqrA1E/VayQX9Elwr8NKZ4WueClR3KwJ7Xx9jcCdOrLW04h51de/+gNbyFMs+IDxh5xIwfbNg==} + '@typescript-eslint/types@7.13.1': + resolution: {integrity: sha512-7K7HMcSQIAND6RBL4kDl24sG/xKM13cA85dc7JnmQXw2cBDngg7c19B++JzvJHRG3zG36n9j1i451GBzRuHchw==} engines: {node: ^18.18.0 || >=20.0.0} - '@typescript-eslint/typescript-estree@7.10.0': - resolution: {integrity: sha512-LXFnQJjL9XIcxeVfqmNj60YhatpRLt6UhdlFwAkjNc6jSUlK8zQOl1oktAP8PlWFzPQC1jny/8Bai3/HPuvN5g==} + '@typescript-eslint/typescript-estree@7.13.1': + resolution: {integrity: sha512-uxNr51CMV7npU1BxZzYjoVz9iyjckBduFBP0S5sLlh1tXYzHzgZ3BR9SVsNed+LmwKrmnqN3Kdl5t7eZ5TS1Yw==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: typescript: '*' @@ -936,19 +933,16 @@ packages: typescript: optional: true - '@typescript-eslint/utils@7.10.0': - resolution: {integrity: sha512-olzif1Fuo8R8m/qKkzJqT7qwy16CzPRWBvERS0uvyc+DHd8AKbO4Jb7kpAvVzMmZm8TrHnI7hvjN4I05zow+tg==} + '@typescript-eslint/utils@7.13.1': + resolution: {integrity: sha512-h5MzFBD5a/Gh/fvNdp9pTfqJAbuQC4sCN2WzuXme71lqFJsZtLbjxfSk4r3p02WIArOF9N94pdsLiGutpDbrXQ==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 - '@typescript-eslint/visitor-keys@7.10.0': - resolution: {integrity: sha512-9ntIVgsi6gg6FIq9xjEO4VQJvwOqA3jaBFQJ/6TK5AvEup2+cECI6Fh7QiBxmfMHXU0V0J4RyPeOU1VDNzl9cg==} + '@typescript-eslint/visitor-keys@7.13.1': + resolution: {integrity: sha512-k/Bfne7lrP7hcb7m9zSsgcBmo+8eicqqfNAJ7uUY+jkTFpKeH2FSkWpFRtimBxgkyvqfu9jTPRbYOvud6isdXA==} 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==} @@ -988,11 +982,6 @@ packages: resolution: {integrity: sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==} engines: {node: '>=0.4.0'} - acorn@8.10.0: - resolution: {integrity: sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==} - engines: {node: '>=0.4.0'} - hasBin: true - acorn@8.11.3: resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} engines: {node: '>=0.4.0'} @@ -1161,10 +1150,6 @@ packages: color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - comment-parser@1.4.0: - resolution: {integrity: sha512-QLyTNiZ2KDOibvFPlZ6ZngVsZ/0gYnE6uTXi5aoDg8ed3AkJAz4sEje3Y8a29hQ1s6A99MZXe47fLAXQ1rTqaw==} - engines: {node: '>= 12.0.0'} - comment-parser@1.4.1: resolution: {integrity: sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==} engines: {node: '>= 12.0.0'} @@ -1259,8 +1244,8 @@ packages: emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} - enhanced-resolve@5.16.1: - resolution: {integrity: sha512-4U5pNsuDl0EhuZpq46M5xPslstkviJuhrdobaRDBk2Jy2KO37FDAJl4lb2KlNabxT0m4MTK2UHNrsAcphE8nyw==} + enhanced-resolve@5.17.0: + resolution: {integrity: sha512-dwDPwZL0dmye8Txp2gzFmA6sxALaSvdRDjPH0viLcKrtlOL3tw62nWWweVD1SdILDTJrbrL6tdWVN58Wo6U3eA==} engines: {node: '>=10.13.0'} entities@4.5.0: @@ -1285,10 +1270,6 @@ packages: engines: {node: '>=12'} hasBin: true - escalade@3.1.1: - resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} - engines: {node: '>=6'} - escalade@3.1.2: resolution: {integrity: sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==} engines: {node: '>=6'} @@ -1321,8 +1302,8 @@ packages: peerDependencies: eslint: '*' - eslint-plugin-antfu@2.2.0: - resolution: {integrity: sha512-QHzHYP+fyfhSkIdcuT9JZ4rCPuJOoHRE27gglPYHlJ6lxB7pO9i45yAy4aurx/rleBuEC27U4c//1Nwtbasj4Q==} + eslint-plugin-antfu@2.3.3: + resolution: {integrity: sha512-TAgYNuc20QyKw8NXtpzR3LeMTTv1qAJVKkjCVzjRSGiSR1EetEY7LRgQVhcgP/C1FnI87isQERAIkKvkYyLq0Q==} peerDependencies: eslint: '*' @@ -1343,20 +1324,20 @@ packages: peerDependencies: eslint: '>=4.19.1' - eslint-plugin-import-x@0.5.0: - resolution: {integrity: sha512-C7R8Z4IzxmsoOPMtSzwuOBW5FH6iRlxHR6iTks+MzVlrk3r3TUxokkWTx3ypdj9nGOEP+CG/5e6ebZzHbxgbbQ==} + eslint-plugin-import-x@0.5.1: + resolution: {integrity: sha512-2JK8bbFOLes+gG6tgdnM8safCxMAj4u2wjX8X1BRFPfnY7Ct2hFYESoIcVwABX/DDcdpQFLGtKmzbNEWJZD9iQ==} engines: {node: '>=16'} peerDependencies: eslint: ^8.56.0 || ^9.0.0-0 - eslint-plugin-jsdoc@48.2.6: - resolution: {integrity: sha512-GNk9jtpYmoEVeD/U6yYYmd6T8vSOoPs7CL8ZeX85iD8P3qifDdLQGze6+cw9boobDthmYnnxvIoHrhuSffj09g==} + eslint-plugin-jsdoc@48.2.12: + resolution: {integrity: sha512-sO9sKkJx5ovWoRk9hV0YiNzXQ4Z6j27CqE/po2E3wddZVuy9wvKPSTiIhpxMTrP/qURvKayJIDB2+o9kyCW1Fw==} engines: {node: '>=18'} peerDependencies: eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 - eslint-plugin-jsonc@2.15.1: - resolution: {integrity: sha512-PVFrqIJa8BbM/e828RSn0SwB/Z5ye+2LDuy2XqG6AymNgPsfApRRcznsbxP7VrjdLEU4Nb+g9n/d6opyp0jp9A==} + eslint-plugin-jsonc@2.16.0: + resolution: {integrity: sha512-Af/ZL5mgfb8FFNleH6KlO4/VdmDuTqmM+SPnWcdoWywTetv7kq+vQe99UyQb9XO3b0OWLVuTH7H0d/PXYCMdSg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '>=6.0.0' @@ -1367,8 +1348,8 @@ packages: peerDependencies: eslint: '>=8' - eslint-plugin-n@17.7.0: - resolution: {integrity: sha512-4Jg4ZKVE4VjHig2caBqPHYNW5na84RVufUuipFLJbgM/G57O6FdpUKJbHakCDJb/yjQuyqVzYWRtU3HNYaZUwg==} + eslint-plugin-n@17.9.0: + resolution: {integrity: sha512-CPSaXDXdrT4nsrOrO4mT4VB6FMUkoySRkHWuuJJHVqsIEjIeZgMY1H7AzSwPbDScikBmLN82KeM1u7ixV7PzGg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: '>=8.23.0' @@ -1462,6 +1443,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} @@ -1470,9 +1455,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.5.0: + resolution: {integrity: sha512-+NAOZFrW/jFTS3dASCGBxX1pkFD0/fsO+hfAkJ4TyYKwgsXZbqzrw+seCYFCcPCYXvnD67tAnglU7GQTz6kcVw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true esno@4.7.0: @@ -1533,9 +1518,9 @@ packages: fastq@1.13.0: resolution: {integrity: sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==} - 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.0.1: resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} @@ -1553,9 +1538,9 @@ packages: resolution: {integrity: sha512-YyZM99iHrqLKjmt4LJDj58KI+fYyufRLBSYcqycxf//KpBk9FoewoGX0450m9nB44qrZnovzC2oeP5hUibxc/g==} engines: {node: '>=18'} - flat-cache@3.1.1: - resolution: {integrity: sha512-/qM2b3LUIaIgviBQovTLvijfyOQXPtSRnRK26ksj2J7rzPIecePUIpJsZ4T02Qg+xiAEKIs5K8dsHEd+VaKa/Q==} - engines: {node: '>=12.0.0'} + flat-cache@4.0.1: + resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} + engines: {node: '>=16'} flat@5.0.2: resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} @@ -1598,9 +1583,6 @@ packages: resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} engines: {node: '>=16'} - get-tsconfig@4.7.2: - resolution: {integrity: sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==} - get-tsconfig@4.7.5: resolution: {integrity: sha512-ZCuZCnlqNzjb4QprAzXKdpp/gh6KTxSJuw3IBsPnV/7fV4NxC9ckB+vPTt8w7fJA0TaSD7c55BR47JD6MEDyDw==} @@ -1616,21 +1598,15 @@ packages: resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} engines: {node: '>=10.13.0'} - glob@7.2.3: - resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} - glob@8.0.3: resolution: {integrity: sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==} engines: {node: '>=12'} + deprecated: Glob versions prior to v9 are no longer supported globals@11.12.0: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} engines: {node: '>=4'} - globals@13.23.0: - resolution: {integrity: sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==} - engines: {node: '>=8'} - globals@13.24.0: resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} engines: {node: '>=8'} @@ -1639,8 +1615,8 @@ packages: resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} engines: {node: '>=18'} - globals@15.3.0: - resolution: {integrity: sha512-cCdyVjIUVTtX8ZsPkq1oCsOsLmGIswqnjZYMJJTGaNApj1yHtLSymKhwH51ttirREn75z3p4k051clwg7rvNKA==} + globals@15.6.0: + resolution: {integrity: sha512-UzcJi88Hw//CurUIRa9Jxb0vgOCcuD/MNjwmXp633cyaRKkCWACkoqHCtfZv43b1kqXGg/fpOa8bwgacCeXsVg==} engines: {node: '>=18'} globby@11.1.0: @@ -1679,10 +1655,6 @@ packages: resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} engines: {node: '>=16.17.0'} - ignore@5.2.4: - resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==} - engines: {node: '>= 4'} - ignore@5.3.1: resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} engines: {node: '>= 4'} @@ -1701,6 +1673,7 @@ packages: 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==} @@ -1873,10 +1846,6 @@ packages: lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} - lru-cache@6.0.0: - resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} - engines: {node: '>=10'} - magic-string@0.27.0: resolution: {integrity: sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA==} engines: {node: '>=12'} @@ -2077,10 +2046,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'} @@ -2216,10 +2181,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==} - hasBin: true - rollup-plugin-dts@6.1.0: resolution: {integrity: sha512-ijSCPICkRMDKDLBK9torss07+8dl9UpY9z1N/zTeA1cIqdzMlpkV3MOOC7zukyvQfDyxa1s3Dl2+DeiP/G6DOw==} engines: {node: '>=16'} @@ -2255,11 +2216,6 @@ packages: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true - semver@7.5.4: - resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} - engines: {node: '>=10'} - hasBin: true - semver@7.6.2: resolution: {integrity: sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==} engines: {node: '>=10'} @@ -2538,8 +2494,8 @@ packages: jsdom: optional: true - vue-eslint-parser@9.4.2: - resolution: {integrity: sha512-Ry9oiGmCAK91HrKMtCrKFWmSFWvYkpGglCeFAIqDdr9zdXmMMpJOmUJS7WWsW7fX81h6mwHmUZCQQ1E0PkSwYQ==} + vue-eslint-parser@9.4.3: + resolution: {integrity: sha512-2rYRLWlIpaiN8xbPiDyXZXRgLGOtWxERV7ND5fFAv5qo1D2N9Fu9MNajBNc6o13lZ+24DAWCkQCvj4klgmcITg==} engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: eslint: '>=6.0.0' @@ -2575,8 +2531,8 @@ packages: yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} - yaml-eslint-parser@1.2.2: - resolution: {integrity: sha512-pEwzfsKbTrB8G3xc/sN7aw1v6A6c/pKxLAkjclnAyo5g5qOh6eL9WGu0o3cSDQZKrTNk4KL4lQSwZW+nBkANEg==} + yaml-eslint-parser@1.2.3: + resolution: {integrity: sha512-4wZWvE398hCP7O8n3nXKu/vdq1HcH01ixYlCREaJL5NUMwQ0g3MaGFUBNSlmBtKmhbtVG/Cm6lyYmSVTEVil8A==} engines: {node: ^14.17.0 || >=16.0.0} yaml@2.3.3: @@ -2608,43 +2564,43 @@ snapshots: '@jridgewell/gen-mapping': 0.1.1 '@jridgewell/trace-mapping': 0.3.17 - '@antfu/eslint-config@2.18.1(@vue/compiler-sfc@3.4.27)(eslint@8.57.0)(typescript@5.4.5)(vitest@1.6.0(@types/node@20.12.12))': + '@antfu/eslint-config@2.21.1(@vue/compiler-sfc@3.4.27)(eslint@9.5.0)(typescript@5.4.5)(vitest@1.6.0(@types/node@20.14.5))': dependencies: '@antfu/install-pkg': 0.3.3 '@clack/prompts': 0.7.0 - '@stylistic/eslint-plugin': 2.1.0(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/eslint-plugin': 7.10.0(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/parser': 7.10.0(eslint@8.57.0)(typescript@5.4.5) - eslint: 8.57.0 + '@stylistic/eslint-plugin': 2.1.0(eslint@9.5.0)(typescript@5.4.5) + '@typescript-eslint/eslint-plugin': 7.13.1(@typescript-eslint/parser@7.13.1(eslint@9.5.0)(typescript@5.4.5))(eslint@9.5.0)(typescript@5.4.5) + '@typescript-eslint/parser': 7.13.1(eslint@9.5.0)(typescript@5.4.5) + eslint: 9.5.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.2.0(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.0(eslint@8.57.0)(typescript@5.4.5) - eslint-plugin-jsdoc: 48.2.6(eslint@8.57.0) - eslint-plugin-jsonc: 2.15.1(eslint@8.57.0) - eslint-plugin-markdown: 5.0.0(eslint@8.57.0) - eslint-plugin-n: 17.7.0(eslint@8.57.0) + eslint-merge-processors: 0.1.0(eslint@9.5.0) + eslint-plugin-antfu: 2.3.3(eslint@9.5.0) + eslint-plugin-command: 0.2.3(eslint@9.5.0) + eslint-plugin-eslint-comments: 3.2.0(eslint@9.5.0) + eslint-plugin-import-x: 0.5.1(eslint@9.5.0)(typescript@5.4.5) + eslint-plugin-jsdoc: 48.2.12(eslint@9.5.0) + eslint-plugin-jsonc: 2.16.0(eslint@9.5.0) + eslint-plugin-markdown: 5.0.0(eslint@9.5.0) + eslint-plugin-n: 17.9.0(eslint@9.5.0) eslint-plugin-no-only-tests: 3.1.0 - eslint-plugin-perfectionist: 2.10.0(eslint@8.57.0)(typescript@5.4.5)(vue-eslint-parser@9.4.2(eslint@8.57.0)) - eslint-plugin-regexp: 2.6.0(eslint@8.57.0) - eslint-plugin-toml: 0.11.0(eslint@8.57.0) - eslint-plugin-unicorn: 53.0.0(eslint@8.57.0) - eslint-plugin-unused-imports: 3.2.0(@typescript-eslint/eslint-plugin@7.10.0(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0) - eslint-plugin-vitest: 0.5.4(@typescript-eslint/eslint-plugin@7.10.0(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5)(vitest@1.6.0(@types/node@20.12.12)) - 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.27)(eslint@8.57.0) - globals: 15.3.0 + eslint-plugin-perfectionist: 2.10.0(eslint@9.5.0)(typescript@5.4.5)(vue-eslint-parser@9.4.3(eslint@9.5.0)) + eslint-plugin-regexp: 2.6.0(eslint@9.5.0) + eslint-plugin-toml: 0.11.0(eslint@9.5.0) + eslint-plugin-unicorn: 53.0.0(eslint@9.5.0) + eslint-plugin-unused-imports: 3.2.0(@typescript-eslint/eslint-plugin@7.13.1(@typescript-eslint/parser@7.13.1(eslint@9.5.0)(typescript@5.4.5))(eslint@9.5.0)(typescript@5.4.5))(eslint@9.5.0) + eslint-plugin-vitest: 0.5.4(@typescript-eslint/eslint-plugin@7.13.1(@typescript-eslint/parser@7.13.1(eslint@9.5.0)(typescript@5.4.5))(eslint@9.5.0)(typescript@5.4.5))(eslint@9.5.0)(typescript@5.4.5)(vitest@1.6.0(@types/node@20.14.5)) + eslint-plugin-vue: 9.26.0(eslint@9.5.0) + eslint-plugin-yml: 1.14.0(eslint@9.5.0) + eslint-processor-vue-blocks: 0.1.2(@vue/compiler-sfc@3.4.27)(eslint@9.5.0) + globals: 15.6.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.9.3 - vue-eslint-parser: 9.4.2(eslint@8.57.0) - yaml-eslint-parser: 1.2.2 + vue-eslint-parser: 9.4.3(eslint@9.5.0) + yaml-eslint-parser: 1.2.3 yargs: 17.7.2 transitivePeerDependencies: - '@vue/compiler-sfc' @@ -2723,7 +2679,7 @@ snapshots: '@babel/helper-module-imports': 7.22.15 '@babel/helper-simple-access': 7.22.5 '@babel/helper-split-export-declaration': 7.22.6 - '@babel/helper-validator-identifier': 7.22.20 + '@babel/helper-validator-identifier': 7.24.5 '@babel/helper-simple-access@7.22.5': dependencies: @@ -2751,7 +2707,7 @@ snapshots: '@babel/highlight@7.22.20': dependencies: - '@babel/helper-validator-identifier': 7.22.20 + '@babel/helper-validator-identifier': 7.24.5 chalk: 2.4.2 js-tokens: 4.0.0 @@ -2803,11 +2759,11 @@ snapshots: picocolors: 1.0.1 sisteransi: 1.0.5 - '@es-joy/jsdoccomment@0.43.0': + '@es-joy/jsdoccomment@0.43.1': dependencies: '@types/eslint': 8.56.10 '@types/estree': 1.0.5 - '@typescript-eslint/types': 7.10.0 + '@typescript-eslint/types': 7.13.1 comment-parser: 1.4.1 esquery: 1.5.0 jsdoc-type-pratt-parser: 4.0.0 @@ -3013,26 +2969,18 @@ snapshots: '@esbuild/win32-x64@0.20.2': optional: true - '@eslint-community/eslint-utils@4.4.0(eslint@8.57.0)': + '@eslint-community/eslint-utils@4.4.0(eslint@9.5.0)': dependencies: - eslint: 8.57.0 + eslint: 9.5.0 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.10.0': {} - '@eslint-community/regexpp@4.9.1': {} - - '@eslint/eslintrc@2.1.4': + '@eslint/config-array@0.16.0': dependencies: - ajv: 6.12.6 + '@eslint/object-schema': 2.1.4 debug: 4.3.4 - espree: 9.6.1 - globals: 13.23.0 - ignore: 5.2.4 - import-fresh: 3.3.0 - js-yaml: 4.1.0 minimatch: 3.1.2 - strip-json-comments: 3.1.1 transitivePeerDependencies: - supports-color @@ -3042,7 +2990,7 @@ snapshots: debug: 4.3.4 espree: 10.0.1 globals: 14.0.0 - ignore: 5.2.4 + ignore: 5.3.1 import-fresh: 3.3.0 js-yaml: 4.1.0 minimatch: 3.1.2 @@ -3050,19 +2998,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@8.57.0': {} + '@eslint/js@9.5.0': {} - '@humanwhocodes/config-array@0.11.14': - dependencies: - '@humanwhocodes/object-schema': 2.0.3 - debug: 4.3.4 - 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': {} '@jest/schemas@29.6.3': dependencies: @@ -3210,56 +3152,56 @@ snapshots: '@sinclair/typebox@0.27.8': {} - '@stylistic/eslint-plugin-js@2.1.0(eslint@8.57.0)': + '@stylistic/eslint-plugin-js@2.1.0(eslint@9.5.0)': dependencies: '@types/eslint': 8.56.10 acorn: 8.11.3 - eslint: 8.57.0 + eslint: 9.5.0 eslint-visitor-keys: 4.0.0 espree: 10.0.1 - '@stylistic/eslint-plugin-jsx@2.1.0(eslint@8.57.0)': + '@stylistic/eslint-plugin-jsx@2.1.0(eslint@9.5.0)': dependencies: - '@stylistic/eslint-plugin-js': 2.1.0(eslint@8.57.0) + '@stylistic/eslint-plugin-js': 2.1.0(eslint@9.5.0) '@types/eslint': 8.56.10 - eslint: 8.57.0 + eslint: 9.5.0 estraverse: 5.3.0 picomatch: 4.0.2 - '@stylistic/eslint-plugin-plus@2.1.0(eslint@8.57.0)(typescript@5.4.5)': + '@stylistic/eslint-plugin-plus@2.1.0(eslint@9.5.0)(typescript@5.4.5)': dependencies: '@types/eslint': 8.56.10 - '@typescript-eslint/utils': 7.10.0(eslint@8.57.0)(typescript@5.4.5) - eslint: 8.57.0 + '@typescript-eslint/utils': 7.13.1(eslint@9.5.0)(typescript@5.4.5) + eslint: 9.5.0 transitivePeerDependencies: - supports-color - typescript - '@stylistic/eslint-plugin-ts@2.1.0(eslint@8.57.0)(typescript@5.4.5)': + '@stylistic/eslint-plugin-ts@2.1.0(eslint@9.5.0)(typescript@5.4.5)': dependencies: - '@stylistic/eslint-plugin-js': 2.1.0(eslint@8.57.0) + '@stylistic/eslint-plugin-js': 2.1.0(eslint@9.5.0) '@types/eslint': 8.56.10 - '@typescript-eslint/utils': 7.10.0(eslint@8.57.0)(typescript@5.4.5) - eslint: 8.57.0 + '@typescript-eslint/utils': 7.13.1(eslint@9.5.0)(typescript@5.4.5) + eslint: 9.5.0 transitivePeerDependencies: - supports-color - typescript - '@stylistic/eslint-plugin@2.1.0(eslint@8.57.0)(typescript@5.4.5)': + '@stylistic/eslint-plugin@2.1.0(eslint@9.5.0)(typescript@5.4.5)': dependencies: - '@stylistic/eslint-plugin-js': 2.1.0(eslint@8.57.0) - '@stylistic/eslint-plugin-jsx': 2.1.0(eslint@8.57.0) - '@stylistic/eslint-plugin-plus': 2.1.0(eslint@8.57.0)(typescript@5.4.5) - '@stylistic/eslint-plugin-ts': 2.1.0(eslint@8.57.0)(typescript@5.4.5) + '@stylistic/eslint-plugin-js': 2.1.0(eslint@9.5.0) + '@stylistic/eslint-plugin-jsx': 2.1.0(eslint@9.5.0) + '@stylistic/eslint-plugin-plus': 2.1.0(eslint@9.5.0)(typescript@5.4.5) + '@stylistic/eslint-plugin-ts': 2.1.0(eslint@9.5.0)(typescript@5.4.5) '@types/eslint': 8.56.10 - eslint: 8.57.0 + eslint: 9.5.0 transitivePeerDependencies: - supports-color - typescript '@types/eslint@8.56.10': dependencies: - '@types/estree': 1.0.0 + '@types/estree': 1.0.5 '@types/json-schema': 7.0.13 '@types/estree@1.0.0': {} @@ -3272,7 +3214,7 @@ snapshots: dependencies: '@types/unist': 2.0.8 - '@types/node@20.12.12': + '@types/node@20.14.5': dependencies: undici-types: 5.26.5 @@ -3282,15 +3224,15 @@ snapshots: '@types/unist@2.0.8': {} - '@typescript-eslint/eslint-plugin@7.10.0(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/eslint-plugin@7.13.1(@typescript-eslint/parser@7.13.1(eslint@9.5.0)(typescript@5.4.5))(eslint@9.5.0)(typescript@5.4.5)': dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 7.10.0(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/scope-manager': 7.10.0 - '@typescript-eslint/type-utils': 7.10.0(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/utils': 7.10.0(eslint@8.57.0)(typescript@5.4.5) - '@typescript-eslint/visitor-keys': 7.10.0 - eslint: 8.57.0 + '@typescript-eslint/parser': 7.13.1(eslint@9.5.0)(typescript@5.4.5) + '@typescript-eslint/scope-manager': 7.13.1 + '@typescript-eslint/type-utils': 7.13.1(eslint@9.5.0)(typescript@5.4.5) + '@typescript-eslint/utils': 7.13.1(eslint@9.5.0)(typescript@5.4.5) + '@typescript-eslint/visitor-keys': 7.13.1 + eslint: 9.5.0 graphemer: 1.4.0 ignore: 5.3.1 natural-compare: 1.4.0 @@ -3300,42 +3242,42 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/parser@7.13.1(eslint@9.5.0)(typescript@5.4.5)': dependencies: - '@typescript-eslint/scope-manager': 7.10.0 - '@typescript-eslint/types': 7.10.0 - '@typescript-eslint/typescript-estree': 7.10.0(typescript@5.4.5) - '@typescript-eslint/visitor-keys': 7.10.0 + '@typescript-eslint/scope-manager': 7.13.1 + '@typescript-eslint/types': 7.13.1 + '@typescript-eslint/typescript-estree': 7.13.1(typescript@5.4.5) + '@typescript-eslint/visitor-keys': 7.13.1 debug: 4.3.4 - eslint: 8.57.0 + eslint: 9.5.0 optionalDependencies: typescript: 5.4.5 transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@7.10.0': + '@typescript-eslint/scope-manager@7.13.1': dependencies: - '@typescript-eslint/types': 7.10.0 - '@typescript-eslint/visitor-keys': 7.10.0 + '@typescript-eslint/types': 7.13.1 + '@typescript-eslint/visitor-keys': 7.13.1 - '@typescript-eslint/type-utils@7.10.0(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/type-utils@7.13.1(eslint@9.5.0)(typescript@5.4.5)': dependencies: - '@typescript-eslint/typescript-estree': 7.10.0(typescript@5.4.5) - '@typescript-eslint/utils': 7.10.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/typescript-estree': 7.13.1(typescript@5.4.5) + '@typescript-eslint/utils': 7.13.1(eslint@9.5.0)(typescript@5.4.5) debug: 4.3.4 - eslint: 8.57.0 + eslint: 9.5.0 ts-api-utils: 1.3.0(typescript@5.4.5) optionalDependencies: typescript: 5.4.5 transitivePeerDependencies: - supports-color - '@typescript-eslint/types@7.10.0': {} + '@typescript-eslint/types@7.13.1': {} - '@typescript-eslint/typescript-estree@7.10.0(typescript@5.4.5)': + '@typescript-eslint/typescript-estree@7.13.1(typescript@5.4.5)': dependencies: - '@typescript-eslint/types': 7.10.0 - '@typescript-eslint/visitor-keys': 7.10.0 + '@typescript-eslint/types': 7.13.1 + '@typescript-eslint/visitor-keys': 7.13.1 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 @@ -3347,24 +3289,22 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@7.10.0(eslint@8.57.0)(typescript@5.4.5)': + '@typescript-eslint/utils@7.13.1(eslint@9.5.0)(typescript@5.4.5)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - '@typescript-eslint/scope-manager': 7.10.0 - '@typescript-eslint/types': 7.10.0 - '@typescript-eslint/typescript-estree': 7.10.0(typescript@5.4.5) - eslint: 8.57.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@9.5.0) + '@typescript-eslint/scope-manager': 7.13.1 + '@typescript-eslint/types': 7.13.1 + '@typescript-eslint/typescript-estree': 7.13.1(typescript@5.4.5) + eslint: 9.5.0 transitivePeerDependencies: - supports-color - typescript - '@typescript-eslint/visitor-keys@7.10.0': + '@typescript-eslint/visitor-keys@7.13.1': dependencies: - '@typescript-eslint/types': 7.10.0 + '@typescript-eslint/types': 7.13.1 eslint-visitor-keys: 3.4.3 - '@ungap/structured-clone@1.2.0': {} - '@vitest/expect@1.6.0': dependencies: '@vitest/spy': 1.6.0 @@ -3375,12 +3315,12 @@ snapshots: dependencies: '@vitest/utils': 1.6.0 p-limit: 5.0.0 - pathe: 1.1.1 + pathe: 1.1.2 '@vitest/snapshot@1.6.0': dependencies: magic-string: 0.30.5 - pathe: 1.1.1 + pathe: 1.1.2 pretty-format: 29.7.0 '@vitest/spy@1.6.0': @@ -3426,18 +3366,12 @@ snapshots: '@vue/shared@3.4.27': {} - acorn-jsx@5.3.2(acorn@8.10.0): - dependencies: - acorn: 8.10.0 - acorn-jsx@5.3.2(acorn@8.11.3): dependencies: acorn: 8.11.3 acorn-walk@8.3.2: {} - acorn@8.10.0: {} - acorn@8.11.3: {} ajv@6.12.6: @@ -3622,8 +3556,6 @@ snapshots: color-name@1.1.4: {} - comment-parser@1.4.0: {} - comment-parser@1.4.1: {} commondir@1.0.1: {} @@ -3688,7 +3620,7 @@ snapshots: emoji-regex@8.0.0: {} - enhanced-resolve@5.16.1: + enhanced-resolve@5.17.0: dependencies: graceful-fs: 4.2.10 tapable: 2.2.1 @@ -3775,18 +3707,16 @@ snapshots: '@esbuild/win32-ia32': 0.20.2 '@esbuild/win32-x64': 0.20.2 - escalade@3.1.1: {} - escalade@3.1.2: {} escape-string-regexp@1.0.5: {} escape-string-regexp@4.0.0: {} - eslint-compat-utils@0.5.0(eslint@8.57.0): + eslint-compat-utils@0.5.0(eslint@9.5.0): dependencies: - eslint: 8.57.0 - semver: 7.5.4 + eslint: 9.5.0 + semver: 7.6.2 eslint-config-flat-gitignore@0.1.5: dependencies: @@ -3806,136 +3736,137 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-merge-processors@0.1.0(eslint@8.57.0): + eslint-merge-processors@0.1.0(eslint@9.5.0): dependencies: - eslint: 8.57.0 + eslint: 9.5.0 - eslint-plugin-antfu@2.2.0(eslint@8.57.0): + eslint-plugin-antfu@2.3.3(eslint@9.5.0): dependencies: '@antfu/utils': 0.7.8 - eslint: 8.57.0 + eslint: 9.5.0 - eslint-plugin-command@0.2.3(eslint@8.57.0): + eslint-plugin-command@0.2.3(eslint@9.5.0): dependencies: - '@es-joy/jsdoccomment': 0.43.0 - eslint: 8.57.0 + '@es-joy/jsdoccomment': 0.43.1 + eslint: 9.5.0 - eslint-plugin-es-x@7.6.0(eslint@8.57.0): + eslint-plugin-es-x@7.6.0(eslint@9.5.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - '@eslint-community/regexpp': 4.9.1 - eslint: 8.57.0 - eslint-compat-utils: 0.5.0(eslint@8.57.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.5.0) + '@eslint-community/regexpp': 4.10.0 + eslint: 9.5.0 + eslint-compat-utils: 0.5.0(eslint@9.5.0) - eslint-plugin-eslint-comments@3.2.0(eslint@8.57.0): + eslint-plugin-eslint-comments@3.2.0(eslint@9.5.0): dependencies: escape-string-regexp: 1.0.5 - eslint: 8.57.0 - ignore: 5.2.4 + eslint: 9.5.0 + ignore: 5.3.1 - eslint-plugin-import-x@0.5.0(eslint@8.57.0)(typescript@5.4.5): + eslint-plugin-import-x@0.5.1(eslint@9.5.0)(typescript@5.4.5): dependencies: - '@typescript-eslint/utils': 7.10.0(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/utils': 7.13.1(eslint@9.5.0)(typescript@5.4.5) debug: 4.3.4 doctrine: 3.0.0 - eslint: 8.57.0 + eslint: 9.5.0 eslint-import-resolver-node: 0.3.9 get-tsconfig: 4.7.5 is-glob: 4.0.3 minimatch: 9.0.4 semver: 7.6.2 + tslib: 2.6.2 transitivePeerDependencies: - supports-color - typescript - eslint-plugin-jsdoc@48.2.6(eslint@8.57.0): + eslint-plugin-jsdoc@48.2.12(eslint@9.5.0): dependencies: - '@es-joy/jsdoccomment': 0.43.0 + '@es-joy/jsdoccomment': 0.43.1 are-docs-informative: 0.0.2 comment-parser: 1.4.1 debug: 4.3.4 escape-string-regexp: 4.0.0 - eslint: 8.57.0 + eslint: 9.5.0 esquery: 1.5.0 semver: 7.6.2 spdx-expression-parse: 4.0.0 transitivePeerDependencies: - supports-color - eslint-plugin-jsonc@2.15.1(eslint@8.57.0): + eslint-plugin-jsonc@2.16.0(eslint@9.5.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - eslint: 8.57.0 - eslint-compat-utils: 0.5.0(eslint@8.57.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.5.0) + eslint: 9.5.0 + eslint-compat-utils: 0.5.0(eslint@9.5.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.5.0): dependencies: - eslint: 8.57.0 + eslint: 9.5.0 mdast-util-from-markdown: 0.8.5 transitivePeerDependencies: - supports-color - eslint-plugin-n@17.7.0(eslint@8.57.0): + eslint-plugin-n@17.9.0(eslint@9.5.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - enhanced-resolve: 5.16.1 - eslint: 8.57.0 - eslint-plugin-es-x: 7.6.0(eslint@8.57.0) - get-tsconfig: 4.7.2 - globals: 15.3.0 - ignore: 5.2.4 + '@eslint-community/eslint-utils': 4.4.0(eslint@9.5.0) + enhanced-resolve: 5.17.0 + eslint: 9.5.0 + eslint-plugin-es-x: 7.6.0(eslint@9.5.0) + get-tsconfig: 4.7.5 + globals: 15.6.0 + ignore: 5.3.1 minimatch: 9.0.4 - semver: 7.5.4 + semver: 7.6.2 eslint-plugin-no-only-tests@3.1.0: {} - eslint-plugin-perfectionist@2.10.0(eslint@8.57.0)(typescript@5.4.5)(vue-eslint-parser@9.4.2(eslint@8.57.0)): + eslint-plugin-perfectionist@2.10.0(eslint@9.5.0)(typescript@5.4.5)(vue-eslint-parser@9.4.3(eslint@9.5.0)): dependencies: - '@typescript-eslint/utils': 7.10.0(eslint@8.57.0)(typescript@5.4.5) - eslint: 8.57.0 + '@typescript-eslint/utils': 7.13.1(eslint@9.5.0)(typescript@5.4.5) + eslint: 9.5.0 minimatch: 9.0.4 natural-compare-lite: 1.4.0 optionalDependencies: - vue-eslint-parser: 9.4.2(eslint@8.57.0) + vue-eslint-parser: 9.4.3(eslint@9.5.0) transitivePeerDependencies: - supports-color - typescript - eslint-plugin-regexp@2.6.0(eslint@8.57.0): + eslint-plugin-regexp@2.6.0(eslint@9.5.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - '@eslint-community/regexpp': 4.9.1 - comment-parser: 1.4.0 - eslint: 8.57.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@9.5.0) + '@eslint-community/regexpp': 4.10.0 + comment-parser: 1.4.1 + eslint: 9.5.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.0(eslint@8.57.0): + eslint-plugin-toml@0.11.0(eslint@9.5.0): dependencies: debug: 4.3.4 - eslint: 8.57.0 - eslint-compat-utils: 0.5.0(eslint@8.57.0) + eslint: 9.5.0 + eslint-compat-utils: 0.5.0(eslint@9.5.0) lodash: 4.17.21 toml-eslint-parser: 0.9.3 transitivePeerDependencies: - supports-color - eslint-plugin-unicorn@53.0.0(eslint@8.57.0): + eslint-plugin-unicorn@53.0.0(eslint@9.5.0): dependencies: '@babel/helper-validator-identifier': 7.24.5 - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.5.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.5.0 esquery: 1.5.0 indent-string: 4.0.0 is-builtin-module: 3.2.1 @@ -3949,53 +3880,53 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-unused-imports@3.2.0(@typescript-eslint/eslint-plugin@7.10.0(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0): + eslint-plugin-unused-imports@3.2.0(@typescript-eslint/eslint-plugin@7.13.1(@typescript-eslint/parser@7.13.1(eslint@9.5.0)(typescript@5.4.5))(eslint@9.5.0)(typescript@5.4.5))(eslint@9.5.0): dependencies: - eslint: 8.57.0 + eslint: 9.5.0 eslint-rule-composer: 0.3.0 optionalDependencies: - '@typescript-eslint/eslint-plugin': 7.10.0(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5) + '@typescript-eslint/eslint-plugin': 7.13.1(@typescript-eslint/parser@7.13.1(eslint@9.5.0)(typescript@5.4.5))(eslint@9.5.0)(typescript@5.4.5) - eslint-plugin-vitest@0.5.4(@typescript-eslint/eslint-plugin@7.10.0(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5)(vitest@1.6.0(@types/node@20.12.12)): + eslint-plugin-vitest@0.5.4(@typescript-eslint/eslint-plugin@7.13.1(@typescript-eslint/parser@7.13.1(eslint@9.5.0)(typescript@5.4.5))(eslint@9.5.0)(typescript@5.4.5))(eslint@9.5.0)(typescript@5.4.5)(vitest@1.6.0(@types/node@20.14.5)): dependencies: - '@typescript-eslint/utils': 7.10.0(eslint@8.57.0)(typescript@5.4.5) - eslint: 8.57.0 + '@typescript-eslint/utils': 7.13.1(eslint@9.5.0)(typescript@5.4.5) + eslint: 9.5.0 optionalDependencies: - '@typescript-eslint/eslint-plugin': 7.10.0(@typescript-eslint/parser@7.10.0(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5) - vitest: 1.6.0(@types/node@20.12.12) + '@typescript-eslint/eslint-plugin': 7.13.1(@typescript-eslint/parser@7.13.1(eslint@9.5.0)(typescript@5.4.5))(eslint@9.5.0)(typescript@5.4.5) + vitest: 1.6.0(@types/node@20.14.5) transitivePeerDependencies: - supports-color - typescript - eslint-plugin-vue@9.26.0(eslint@8.57.0): + eslint-plugin-vue@9.26.0(eslint@9.5.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.5.0) + eslint: 9.5.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.2(eslint@8.57.0) + vue-eslint-parser: 9.4.3(eslint@9.5.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.5.0): dependencies: debug: 4.3.4 - eslint: 8.57.0 - eslint-compat-utils: 0.5.0(eslint@8.57.0) + eslint: 9.5.0 + eslint-compat-utils: 0.5.0(eslint@9.5.0) lodash: 4.17.21 natural-compare: 1.4.0 - yaml-eslint-parser: 1.2.2 + yaml-eslint-parser: 1.2.3 transitivePeerDependencies: - supports-color - eslint-processor-vue-blocks@0.1.2(@vue/compiler-sfc@3.4.27)(eslint@8.57.0): + eslint-processor-vue-blocks@0.1.2(@vue/compiler-sfc@3.4.27)(eslint@9.5.0): dependencies: '@vue/compiler-sfc': 3.4.27 - eslint: 8.57.0 + eslint: 9.5.0 eslint-rule-composer@0.3.0: {} @@ -4004,42 +3935,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.5.0: dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - '@eslint-community/regexpp': 4.9.1 - '@eslint/eslintrc': 2.1.4 - '@eslint/js': 8.57.0 - '@humanwhocodes/config-array': 0.11.14 + '@eslint-community/eslint-utils': 4.4.0(eslint@9.5.0) + '@eslint-community/regexpp': 4.10.0 + '@eslint/config-array': 0.16.0 + '@eslint/eslintrc': 3.1.0 + '@eslint/js': 9.5.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.4 - 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.0.1 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.23.0 - graphemer: 1.4.0 - ignore: 5.2.4 + 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 @@ -4063,8 +3995,8 @@ snapshots: espree@9.6.1: dependencies: - acorn: 8.10.0 - acorn-jsx: 5.3.2(acorn@8.10.0) + acorn: 8.11.3 + acorn-jsx: 5.3.2(acorn@8.11.3) eslint-visitor-keys: 3.4.3 esquery@1.5.0: @@ -4081,7 +4013,7 @@ snapshots: estree-walker@3.0.3: dependencies: - '@types/estree': 1.0.0 + '@types/estree': 1.0.5 esutils@2.0.3: {} @@ -4123,9 +4055,9 @@ snapshots: dependencies: reusify: 1.0.4 - file-entry-cache@6.0.1: + file-entry-cache@8.0.0: dependencies: - flat-cache: 3.1.1 + flat-cache: 4.0.1 fill-range@7.0.1: dependencies: @@ -4147,11 +4079,10 @@ snapshots: path-exists: 5.0.0 unicorn-magic: 0.1.0 - flat-cache@3.1.1: + flat-cache@4.0.1: dependencies: flatted: 3.2.9 keyv: 4.5.4 - rimraf: 3.0.2 flat@5.0.2: {} @@ -4182,10 +4113,6 @@ snapshots: get-stream@8.0.1: {} - get-tsconfig@4.7.2: - dependencies: - resolve-pkg-maps: 1.0.0 - get-tsconfig@4.7.5: dependencies: resolve-pkg-maps: 1.0.0 @@ -4209,15 +4136,6 @@ snapshots: dependencies: is-glob: 4.0.3 - 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 - glob@8.0.3: dependencies: fs.realpath: 1.0.0 @@ -4228,24 +4146,20 @@ snapshots: globals@11.12.0: {} - globals@13.23.0: - dependencies: - type-fest: 0.20.2 - globals@13.24.0: dependencies: type-fest: 0.20.2 globals@14.0.0: {} - globals@15.3.0: {} + globals@15.6.0: {} globby@11.1.0: dependencies: array-union: 2.1.0 dir-glob: 3.0.1 - fast-glob: 3.3.1 - ignore: 5.2.4 + fast-glob: 3.3.2 + ignore: 5.3.1 merge2: 1.4.1 slash: 3.0.0 @@ -4253,7 +4167,7 @@ snapshots: dependencies: dir-glob: 3.0.1 fast-glob: 3.3.1 - ignore: 5.2.4 + ignore: 5.3.1 merge2: 1.4.1 slash: 4.0.0 @@ -4275,8 +4189,6 @@ snapshots: human-signals@5.0.0: {} - ignore@5.2.4: {} - ignore@5.3.1: {} import-fresh@3.3.0: @@ -4374,10 +4286,10 @@ snapshots: jsonc-eslint-parser@2.4.0: dependencies: - acorn: 8.10.0 + acorn: 8.11.3 eslint-visitor-keys: 3.4.3 espree: 9.6.1 - semver: 7.5.4 + semver: 7.6.2 jsonc-parser@3.2.0: {} @@ -4433,10 +4345,6 @@ snapshots: dependencies: yallist: 3.1.1 - lru-cache@6.0.0: - dependencies: - yallist: 4.0.0 - magic-string@0.27.0: dependencies: '@jridgewell/sourcemap-codec': 1.4.15 @@ -4522,7 +4430,7 @@ snapshots: mlly@1.4.2: dependencies: - acorn: 8.10.0 + acorn: 8.11.3 pathe: 1.1.1 pkg-types: 1.0.3 ufo: 1.3.1 @@ -4650,8 +4558,6 @@ snapshots: path-exists@5.0.0: {} - path-is-absolute@1.0.1: {} - path-key@3.1.1: {} path-key@4.0.0: {} @@ -4698,7 +4604,7 @@ snapshots: postcss@8.4.38: dependencies: nanoid: 3.3.7 - picocolors: 1.0.0 + picocolors: 1.0.1 source-map-js: 1.2.0 prelude-ls@1.2.1: {} @@ -4747,11 +4653,11 @@ snapshots: refa@0.12.1: dependencies: - '@eslint-community/regexpp': 4.9.1 + '@eslint-community/regexpp': 4.10.0 regexp-ast-analysis@0.7.1: dependencies: - '@eslint-community/regexpp': 4.9.1 + '@eslint-community/regexpp': 4.10.0 refa: 0.12.1 regexp-tree@0.1.27: {} @@ -4774,10 +4680,6 @@ snapshots: reusify@1.0.4: {} - rimraf@3.0.2: - dependencies: - glob: 7.2.3 - rollup-plugin-dts@6.1.0(rollup@3.29.4)(typescript@5.4.5): dependencies: magic-string: 0.30.5 @@ -4818,7 +4720,7 @@ snapshots: scslre@0.3.0: dependencies: - '@eslint-community/regexpp': 4.9.1 + '@eslint-community/regexpp': 4.10.0 refa: 0.12.1 regexp-ast-analysis: 0.7.1 @@ -4828,10 +4730,6 @@ snapshots: semver@6.3.1: {} - semver@7.5.4: - dependencies: - lru-cache: 6.0.0 - semver@7.6.2: {} shebang-command@2.0.0: @@ -5030,14 +4928,14 @@ snapshots: update-browserslist-db@1.0.13(browserslist@4.22.1): dependencies: browserslist: 4.22.1 - escalade: 3.1.1 - picocolors: 1.0.0 + escalade: 3.1.2 + picocolors: 1.0.1 update-browserslist-db@1.0.13(browserslist@4.23.0): dependencies: browserslist: 4.23.0 - escalade: 3.1.1 - picocolors: 1.0.0 + escalade: 3.1.2 + picocolors: 1.0.1 uri-js@4.4.1: dependencies: @@ -5050,13 +4948,13 @@ snapshots: spdx-correct: 3.2.0 spdx-expression-parse: 3.0.1 - vite-node@1.6.0(@types/node@20.12.12): + vite-node@1.6.0(@types/node@20.14.5): dependencies: cac: 6.7.14 debug: 4.3.4 - pathe: 1.1.1 - picocolors: 1.0.0 - vite: 5.2.11(@types/node@20.12.12) + pathe: 1.1.2 + picocolors: 1.0.1 + vite: 5.2.11(@types/node@20.14.5) transitivePeerDependencies: - '@types/node' - less @@ -5067,16 +4965,16 @@ snapshots: - supports-color - terser - vite@5.2.11(@types/node@20.12.12): + vite@5.2.11(@types/node@20.14.5): dependencies: esbuild: 0.20.2 postcss: 8.4.38 rollup: 4.18.0 optionalDependencies: - '@types/node': 20.12.12 + '@types/node': 20.14.5 fsevents: 2.3.3 - vitest@1.6.0(@types/node@20.12.12): + vitest@1.6.0(@types/node@20.14.5): dependencies: '@vitest/expect': 1.6.0 '@vitest/runner': 1.6.0 @@ -5095,11 +4993,11 @@ snapshots: strip-literal: 2.1.0 tinybench: 2.8.0 tinypool: 0.8.4 - vite: 5.2.11(@types/node@20.12.12) - vite-node: 1.6.0(@types/node@20.12.12) + vite: 5.2.11(@types/node@20.14.5) + vite-node: 1.6.0(@types/node@20.14.5) why-is-node-running: 2.2.2 optionalDependencies: - '@types/node': 20.12.12 + '@types/node': 20.14.5 transitivePeerDependencies: - less - lightningcss @@ -5109,16 +5007,16 @@ snapshots: - supports-color - terser - vue-eslint-parser@9.4.2(eslint@8.57.0): + vue-eslint-parser@9.4.3(eslint@9.5.0): dependencies: debug: 4.3.4 - eslint: 8.57.0 + eslint: 9.5.0 eslint-scope: 7.2.2 eslint-visitor-keys: 3.4.3 espree: 9.6.1 esquery: 1.5.0 lodash: 4.17.21 - semver: 7.5.4 + semver: 7.6.2 transitivePeerDependencies: - supports-color @@ -5147,7 +5045,7 @@ snapshots: yallist@4.0.0: {} - yaml-eslint-parser@1.2.2: + yaml-eslint-parser@1.2.3: dependencies: eslint-visitor-keys: 3.4.3 lodash: 4.17.21 @@ -5160,7 +5058,7 @@ snapshots: yargs@17.7.2: dependencies: cliui: 8.0.1 - escalade: 3.1.1 + escalade: 3.1.2 get-caller-file: 2.0.5 require-directory: 2.1.1 string-width: 4.2.3 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml deleted file mode 100644 index b6e39cd..0000000 --- a/pnpm-workspace.yaml +++ /dev/null @@ -1,3 +0,0 @@ -packages: - - playground - - examples/* diff --git a/src/_constant.ts b/src/_constant.ts deleted file mode 100644 index dfa867f..0000000 --- a/src/_constant.ts +++ /dev/null @@ -1,17 +0,0 @@ -export const builtInPlatforms = [ - 'app', - 'app-plus', - 'h5', - 'mp-360', - 'mp-alipay', - 'mp-baidu', - 'mp-jd', - 'mp-kuaishou', - 'mp-lark', - 'mp-qq', - 'mp-toutiao', - 'mp-weixin', - 'quickapp-webview', - 'quickapp-webview-huawei', - 'quickapp-webview-union', -] as const diff --git a/src/compiler.ts b/src/compiler.ts deleted file mode 100644 index a0d9673..0000000 --- a/src/compiler.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { env } from 'std-env' - -/** Value of `process.env.UNI_COMPILER` */ -export const compiler = env.UNI_COMPILER as 'vue' | 'nvue' - -/** Value of `process.env.UNI_NVUE_COMPILER` */ -export const nvueCompiler = env.UNI_NVUE_COMPILER as - | 'uni-app' - | 'vue' - | undefined - -/** Value of `process.env.UNI_NVUE_STYLE_COMPILER` */ -export const nvueStyleCompiler = env.UNI_NVUE_STYLE_COMPILER as - | 'uni-app' - | undefined - -/** Value of `process.env.UNI_COMPILER_VERSION` */ -export const compilerVersion = env.UNI_COMPILER_VERSION as string - -/** Value of `process.env.UNI_COMPILER_VERSION_TYPE` */ -export const compilerVersionType = env.UNI_COMPILER_VERSION_TYPE as - | 'a' - | 'r' diff --git a/src/const.ts b/src/const.ts deleted file mode 100644 index 9914e0f..0000000 --- a/src/const.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { env } from 'std-env' -import { parseJSON } from './_utils' - -/** Value of `process.env.UNI_CLI_CONTEXT` */ -export const cliContext = env.UNI_CLI_CONTEXT as string - -/** Value of `process.env.UNI_INPUT_DIR` */ -export const inputDir = env.UNI_INPUT_DIR as string - -/** Value of `process.env.UNI_OUTPUT_DIR` */ -export const outputDir = env.UNI_OUTPUT_DIR as string - -/** Value of `process.env.STAT_TITLE_JSON` */ -export const statTitleJson = parseJSON>( - env.STAT_TITLE_JSON, -) - -/** Value of `process.env.UNI_CUSTOM_CONTEXT` */ -export const customContext = env.UNI_CUSTOM_CONTEXT - -/** Value of `process.env.UNI_CUSTOM_SCRIPT` */ -export const customScript = env.UNI_CUSTOM_SCRIPT - -/** Value of `process.env.UNI_CUSTOM_DEFINE` */ -export const customDefine = env.UNI_CUSTOM_DEFINE - -/** Value of `process.env.UNI_SUBPACKAGE` */ -export const subpackage = env.UNI_SUBPACKAGE -/** Value of `process.env.UNI_RENDERER` */ -export const renderer = env.UNI_RENDERER as 'native' | undefined - -/** Value of `process.env.UNI_RENDERER_NATIVE` */ -export const rendererNative = env.UNI_RENDERER_NATIVE as - | 'appService' - | 'pages' - | undefined diff --git a/src/flags.ts b/src/flags.ts deleted file mode 100644 index 54b9af7..0000000 --- a/src/flags.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { env } from 'std-env' -import { toBoolean } from './_utils' - -/** Detect if `VUE_APP_DARK_MODE` environment variable is set */ -export const hasDarkMode = toBoolean(env.VUE_APP_DARK_MODE) - -/** Detect if `SOURCEMAP` environment variable is set */ -export const hasSourcemap = toBoolean(env.SOURCEMAP) - -/** Detect if `UNI_MP_PLUGIN` environment variable is set */ -export const isMpPlugin = toBoolean(env.UNI_MP_PLUGIN) -/** Detect if `UNI_MINIMIZE` environment variable is set */ -export const isMinimize = toBoolean(env.UNI_MINIMIZE) - -/** Detect if `UNI_SSR_CLIENT` environment variable is set */ -export const isSSRClient = toBoolean(env.UNI_SSR_CLIENT) - -/** Detect if `UNI_SSR_SERVER` environment variable is set */ -export const isSSRServer = toBoolean(env.UNI_SSR_SERVER) diff --git a/src/index.ts b/src/index.ts index ed10b2d..b766294 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,544 @@ -export * from './platform' -export * from './flags' -export * from './compiler' -export * from './const' -export * from './types' +import { env } from 'std-env' +import { parseJSON, toBoolean } from './utils' + +export type OptionalBooleanString = 'true' | 'false' | undefined +export type OptionalString = string | undefined + +/** + * `process.env.UNI_PLATFORM` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L9} + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-uni-app.d.ts#L24} + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-uni-app.d.ts#L192-L209} + */ +export type BuiltInPlatform = 'h5' | 'web' | 'app' | 'app-plus' | 'mp-360' | 'mp-alipay' | 'mp-baidu' | 'mp-qq' | 'mp-toutiao' | 'mp-weixin' | 'mp-kuaishou' | 'mp-lark' | 'mp-jd' | 'mp-xhs' | 'quickapp-webview' | 'quickapp-webview-huawei' | 'quickapp-webview-union' + +export const builtInPlatforms = ['h5', 'web', 'app', 'app-plus', 'mp-360', 'mp-alipay', 'mp-baidu', 'mp-qq', 'mp-toutiao', 'mp-weixin', 'mp-kuaishou', 'mp-lark', 'mp-jd', 'mp-xhs', 'quickapp-webview', 'quickapp-webview-huawei', 'quickapp-webview-union'] as BuiltInPlatform[] + +/** + * `process.env.UNI_PLATFORM` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L9} + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-uni-app.d.ts#L24} + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-uni-app.d.ts#L192-L209} + */ +export const platform = env.UNI_PLATFORM as BuiltInPlatform + +/** + * `process.env.UNI_APP_PLATFORM` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L10} + */ +export type AppPlatform = 'android' | 'ios' | undefined + +/** + * `process.env.UNI_APP_PLATFORM` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L10} + */ +export const appPlatform = env.UNI_APP_PLATFORM as AppPlatform + +/** + * `process.env.UNI_SUB_PLATFORM` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L11} + */ +export type SubPlatform = 'quickapp-webview-huawei' | 'quickapp-webview-union' | undefined + +/** + * `process.env.UNI_SUB_PLATFORM` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L11} + */ +export const subPlatform = env.UNI_SUB_PLATFORM as SubPlatform + +/** + * `process.env.UNI_UTS_PLATFORM` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L12} + */ +export type UtsPlatform = BuiltInPlatform | 'app-android' | 'app-ios' | 'web' + +/** + * `process.env.UNI_UTS_PLATFORM` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L12} + */ +export const utsPlatform = env.UNI_UTS_PLATFORM as UtsPlatform + +/** Detect if `process.env.UNI_PLATFORM` is `h5` */ +export const isH5 = platform === 'h5' + +/** Detect if `process.env.UNI_PLATFORM` is `web` */ +export const isWeb = platform === 'web' + +/** Detect if `process.env.UNI_PLATFORM` is `app` */ +export const isApp = platform === 'app' + +/** Detect if `process.env.UNI_PLATFORM` is `app-plus` */ +export const isAppPlus = platform === 'app-plus' + +/** Detect if `process.env.UNI_APP_PLATFORM` is `android` or if `process.env.UNI_UTS_PLATFORM` is `app-android` */ +export const isAppAndroid = appPlatform === 'android' || utsPlatform === 'app-android' + +/** Detect if `process.env.UNI_APP_PLATFORM` is `ios` or if `process.env.UNI_UTS_PLATFORM` is `app-ios` */ +export const isAppIOS = appPlatform === 'ios' || utsPlatform === 'app-ios' + +/** Detect if `process.env.UNI_PLATFORM` is `mp-*` */ +export const isMp = /^mp-/i.test(platform) + +/** Detect if `process.env.UNI_PLATFORM` is `mp-weixin` */ +export const isMpWeixin = platform === 'mp-weixin' + +/** Detect if `process.env.UNI_PLATFORM` is `mp-alipay` */ +export const isMpAlipay = platform === 'mp-alipay' + +/** Detect if `process.env.UNI_PLATFORM` is `mp-baidu` */ +export const isMpBaidu = platform === 'mp-baidu' + +/** Detect if `process.env.UNI_PLATFORM` is `mp-kuaishou` */ +export const isMpKuaishou = platform === 'mp-kuaishou' + +/** Detect if `process.env.UNI_PLATFORM` is `mp-qq` */ +export const isMpQQ = platform === 'mp-qq' + +/** Detect if `process.env.UNI_PLATFORM` is `mp-toutiao` */ +export const isMpToutiao = platform === 'mp-toutiao' + +/** Detect if `process.env.UNI_PLATFORM` is `quickapp-webview*` */ +export const isQuickapp = /^quickapp-webview/i.test(platform) + +/** Detect if `process.env.UNI_PLATFORM` is `quickapp-webview-union` */ +export const isQuickappUnion = platform === 'quickapp-webview-union' + +/** Detect if `process.env.UNI_PLATFORM` is `quickapp-webview-huawei` */ +export const isQuickappHuawei = platform === 'quickapp-webview-huawei' + +/** + * `process.env.UNI_UTS_JS_CODE_FORMAT` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L14} + */ +export type UtsJsCodeFormat = 'cjs' | 'es' | undefined + +/** + * `process.env.UNI_UTS_JS_CODE_FORMAT` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L14} + */ +export const utsJsCodeFormat = env.UNI_UTS_JS_CODE_FORMAT as UtsJsCodeFormat + +/** + * `process.env.UNI_UTS_MODULE_TYPE` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L15} + */ +export type UtsModuleType = 'built-in' | '' | undefined + +/** + * `process.env.UNI_UTS_MODULE_TYPE` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L15} + */ +export const utsModuleType = env.UNI_UTS_MODULE_TYPE as UtsModuleType + +/** + * `process.env.UNI_UTS_MODULE_PREFIX` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L16} + */ +export const utsModulePrefix = env.UNI_UTS_MODULE_PREFIX as OptionalString + +/** + * `process.env.UNI_UTS_TARGET_LANGUAGE` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L17} + */ +export type UtsTargetLanguage = 'javascript' | 'kotlin' | 'swift' | undefined + +/** + * `process.env.UNI_UTS_TARGET_LANGUAGE` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L17} + */ +export const utsTargetLanguage = env.UNI_UTS_TARGET_LANGUAGE as UtsTargetLanguage + +/** + * `process.env.UNI_INPUT_DIR` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L19} + */ +export const inputDir = env.UNI_INPUT_DIR as OptionalString + +/** + * `process.env.UNI_OUTPUT_DIR` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L20} + */ +export const outputDir = env.UNI_OUTPUT_DIR as OptionalString + +/** + * `process.env.UNI_CLI_CONTEXT` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L21} + */ +export const cliContext = env.UNI_CLI_CONTEXT as OptionalString + +/** + * `process.env.UNI_SUBPACKAGE` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L22} + */ +export const subpackage = env.UNI_SUBPACKAGE as OptionalString + +/** + * `process.env.UNI_MP_PLUGIN` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L23} + */ +export const mpPlugin = env.UNI_MP_PLUGIN as OptionalBooleanString + +/** Detect if `process.env.UNI_MP_PLUGIN` is set */ +export const isMpPlugin = toBoolean(env.UNI_MP_PLUGIN) + +/** + * `process.env.UNI_COMPILER_VERSION` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L24} + */ +export const compilerVersion = env.UNI_COMPILER_VERSION as OptionalString + +/** + * `process.env.UNI_COMPILER_VERSION` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L25} + */ +export type CompilerVersionType = 'a' | 'r' | undefined + +/** + * `process.env.UNI_COMPILER_VERSION` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L25} + */ +export const compilerVersionType = env.UNI_COMPILER_VERSION_TYPE as CompilerVersionType + +/** + * `process.env.UNI_HBUILDERX_PLUGINS` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L26} + */ +export const hbuilderxPlugins = env.UNI_HBUILDERX_PLUGINS as OptionalString + +/** + * `process.env.UNI_RENDERER` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L27} + */ +export type Renderer = 'native' | undefined + +/** + * `process.env.UNI_RENDERER` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L27} + */ +export const renderer = env.UNI_RENDERER as Renderer + +/** + * `process.env.UNI_NVUE_COMPILER` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L28} + */ +export type NVueCompiler = 'uni-app' | 'weex' | 'vue' | 'vite' | undefined + +/** + * `process.env.UNI_NVUE_COMPILER` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L28} + */ +export const nvueCompiler = env.UNI_NVUE_COMPILER as NVueCompiler + +/** + * `process.env.UNI_NVUE_STYLE_COMPILER` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L29} + */ +export type NVueStyleCompiler = 'uni-app' | 'weex' | undefined + +/** + * `process.env.UNI_NVUE_STYLE_COMPILER` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L29} + */ +export const nvueStyleCompiler = env.UNI_NVUE_STYLE_COMPILER as NVueStyleCompiler + +/** + * `process.env.UNI_APP_CODE_SPLITING` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L30} + */ +export const appCodeSpliting = env.UNI_APP_CODE_SPLITING as OptionalBooleanString + +/** + * `process.env.UNI_AUTOMATOR_WS_ENDPOINT` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L31} + */ +export const automatorWsEndpoint = env.UNI_AUTOMATOR_WS_ENDPOINT as OptionalString + +/** + * `process.env.UNI_AUTOMATOR_APP_WEBVIEW` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L32} + */ +export const automatorAppWebview = env.UNI_AUTOMATOR_APP_WEBVIEW as OptionalString + +/** + * `process.env.UNI_AUTOMATOR_APP_WEBVIEW_SRC` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L33} + */ +export const automatorAppWebviewSrc = env.UNI_AUTOMATOR_APP_WEBVIEW_SRC as OptionalString + +/** + * `process.env.UNI_H5_BASE` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L34} + */ +export const h5Base = env.UNI_H5_BASE as OptionalString + +/** + * `process.env.UNI_H5_BROWSER` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L35} + */ +export type H5Browser = 'builtin' | undefined + +/** + * `process.env.UNI_H5_BROWSER` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L35} + */ +export const h5Browser = env.UNI_H5_BROWSER as H5Browser + +/** + * `process.env.UNI_CUSTOM_SCRIPT` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L36} + */ +export const customScript = env.UNI_CUSTOM_SCRIPT as OptionalString + +/** + * `process.env.UNI_CUSTOM_DEFINE` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L37} + */ +export const customDefine = env.UNI_CUSTOM_DEFINE as OptionalString + +/** + * `process.env.UNI_CUSTOM_CONTEXT` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L38} + */ +export const customContext = env.UNI_CUSTOM_CONTEXT as OptionalString + +/** + * `process.env.UNI_MINIMIZE` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L39} + */ +export const minimize = env.UNI_MINIMIZE as OptionalBooleanString + +/** Detect if `process.env.UNI_MINIMIZE` is set */ +export const isMinimize = toBoolean(env.UNI_MINIMIZE) + +/** + * `process.env.UNI_UVUE` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L40} + */ +export const uvue = env.UNI_UVUE as OptionalBooleanString + +/** Detect if `process.env.UNI_UVUE` is set */ +export const isUVue = toBoolean(env.UNI_MINIMIZE) + +/** + * `process.env.UNI_UVUE_TARGET_LANGUAGE` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L41} + */ +export type UVueTargetLanguage = 'kotlin' | 'swift' | 'javascript' | undefined + +/** + * `process.env.UNI_UVUE_TARGET_LANGUAGE` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L41} + */ +export const uvueTargetLanguage = env.UNI_UVUE_TARGET_LANGUAGE as UVueTargetLanguage + +/** + * `process.env.UNI_COMPILER` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L42} + */ +export type Compiler = 'vue' | 'nvue' | undefined + +/** + * `process.env.UNI_COMPILER` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L42} + */ +export const compiler = env.UNI_COMPILER as Compiler + +/** + * `process.env.UNI_RENDERER_NATIVE` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L43} + */ +export type RendererNative = 'appService' | 'pages' | undefined + +/** + * `process.env.UNI_RENDERER_NATIVE` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L43} + */ +export const rendererNative = env.UNI_RENDERER_NATIVE as RendererNative + +/** + * `process.env.UNI_NVUE_APP_STYLES` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L44} + */ +export const nvueAppStyles = env.UNI_NVUE_APP_STYLES as OptionalString + +/** + * `process.env.UNI_APP_CHANGED_FILES` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L45} + */ +export const appChangedFiles = env.UNI_APP_CHANGED_FILES as OptionalString + +/** + * `process.env.UNI_APP_CHANGED_PAGES` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L46} + */ +export const appChangedPages = env.UNI_APP_CHANGED_PAGES as OptionalString + +/** + * `process.env.VUE_APP_DARK_MODE` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L47} + */ +export const darkMode = env.VUE_APP_DARK_MODE as OptionalBooleanString + +/** Detect if `process.env.VUE_APP_DARK_MODE` is set */ +export const hasDarkMode = toBoolean(env.VUE_APP_DARK_MODE) + +/** + * `process.env.HX_USE_BASE_TYPE` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L48} + */ +export type HxUseBaseType = 'standard' | 'custom' | undefined + +/** + * `process.env.HX_USE_BASE_TYPE` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L48} + */ +export const hxUseBaseType = env.HX_USE_BASE_TYPE as HxUseBaseType + +/** + * `process.env.HX_DEPENDENCIES_DIR` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L49} + */ +export const hxDependenciesDir = env.HX_DEPENDENCIES_DIR as OptionalString + +/** + * `process.env.UNI_APP_X` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L55} + */ +export const appX = env.UNI_APP_X as OptionalBooleanString + +/** Detect if `process.env.UNI_APP_X` is set */ +export const isAppX = toBoolean(env.UNI_APP_X) + +/** + * `process.env.UNI_APP_X_CACHE_DIR` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L56} + */ +export const appXCacheDir = env.UNI_APP_X_CACHE_DIR as OptionalString + +/** + * `process.env.HX_VERSION` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L58} + */ +export const hxVersion = env.HX_VERSION as OptionalString + +/** + * `process.env.UNI_APP_X_PAGE_COUNT` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L60} + */ +export const appXPageCount = env.UNI_APP_X_PAGE_COUNT as OptionalString + +/** + * `process.env.UNI_APP_X_TSC` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L61} + */ +export const appXTsc = env.UNI_APP_X_TSC as OptionalString + +/** + * `process.env.UNI_APP_X_SINGLE_THREAD` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L62} + */ +export const appXSingleThread = env.UNI_APP_X_SINGLE_THREAD as OptionalString + +/** + * `process.env.UNI_APP_X_SETUP` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L63} + */ +export const appXSetup = env.UNI_APP_X_SETUP as OptionalString + +/** + * `process.env.UNI_APP_X_UVUE_SCRIPT_ENGINE` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L64} + */ +export type AppXUVueScriptEngine = 'native' | 'js' | undefined + +/** + * `process.env.UNI_APP_X_UVUE_SCRIPT_ENGINE` + * + * @link {https://github.com/dcloudio/uni-app/blob/v3.0.0-4010520240507001/packages/shims-node.d.ts#L64} + */ +export const appXUVueScriptEngine = env.UNI_APP_X_UVUE_SCRIPT_ENGINE as AppXUVueScriptEngine + +// Extra +/** `process.env.STAT_TITLE_JSON` */ +export const statTitleJson = parseJSON>(env.STAT_TITLE_JSON) + +/** `process.env.SOURCEMAP` */ +export const sourcemap = env.SOURCEMAP as OptionalBooleanString + +/** Detect if `process.env.SOURCEMAP` is set */ +export const hasSourcemap = toBoolean(env.SOURCEMAP) + +/** `process.env.UNI_SSR_CLIENT` */ +export const ssrClient = env.UNI_SSR_CLIENT as OptionalBooleanString + +/** Detect if `process.env.UNI_SSR_CLIENT` is set */ +export const isSSRClient = toBoolean(env.UNI_SSR_CLIENT) + +/** `process.env.UNI_SSR_SERVER` */ +export const ssrServer = env.UNI_SSR_SERVER as OptionalBooleanString + +/** Detect if `process.env.UNI_SSR_SERVER` is set */ +export const isSSRServer = toBoolean(env.UNI_SSR_SERVER) diff --git a/src/platform.ts b/src/platform.ts deleted file mode 100644 index 88a3bdf..0000000 --- a/src/platform.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { env } from 'std-env' -import type { AppPlatform, BuiltInPlatForm, SubPlatform, UtsPlatform } from './types' - -export { builtInPlatforms } from './_constant' - -/** Value of `process.env.UNI_PLATFORM` */ -export const platform = env.UNI_PLATFORM as BuiltInPlatForm - -/** Value of `process.env.UNI_UTS_PLATFORM` */ -export const utsPlatform = env.UNI_UTS_PLATFORM as UtsPlatform - -/** Value of `process.env.UNI_APP_PLATFORM` */ -export const appPlatform = env.UNI_APP_PLATFORM as AppPlatform - -/** Value of `process.env.UNI_SUB_PLATFORM` */ -export const subPlatform = env.UNI_SUB_PLATFORM as SubPlatform - -/** Detect if `process.env.UNI_PLATFORM` is `H5` */ -export const isH5 = platform === 'h5' - -/** Detect if `process.env.UNI_PLATFORM` is `APP` */ -export const isApp = platform === 'app' - -/** Detect if `process.env.UNI_APP_PLATFORM` is `android` or if `process.env.UNI_UTS_PLATFORM` is "app-android" */ -export const isAppAndroid = appPlatform === 'android' || utsPlatform === 'app-android' - -/** Detect if `process.env.UNI_APP_PLATFORM` is `ios` or if `process.env.UNI_UTS_PLATFORM` is "app-ios" */ -export const isAppIOS = appPlatform === 'ios' || utsPlatform === 'app-ios' - -/** Detect if `process.env.UNI_PLATFORM` is `小程序` */ -export const isMp = /^mp-/i.test(platform) - -/** Detect if `process.env.UNI_PLATFORM` is `微信小程序` */ -export const isMpWeixin = platform === 'mp-weixin' - -/** Detect if `process.env.UNI_PLATFORM` is `支付宝小程序` */ -export const isMpAlipay = platform === 'mp-alipay' - -/** Detect if `process.env.UNI_PLATFORM` is `百度小程序` */ -export const isMpBaidu = platform === 'mp-baidu' - -/** Detect if `process.env.UNI_PLATFORM` is `快手小程序` */ -export const isMpKuaishou = platform === 'mp-kuaishou' - -/** Detect if `process.env.UNI_PLATFORM` is `QQ小程序` */ -export const isMpQQ = platform === 'mp-qq' - -/** Detect if `process.env.UNI_PLATFORM` is `头条小程序` */ -export const isMpToutiao = platform === 'mp-toutiao' - -/** Detect if `process.env.UNI_PLATFORM` is `快应用` */ -export const isQuickapp = /^quickapp-webview/i.test(platform) - -/** Detect if `process.env.UNI_PLATFORM` is `快应用联盟` */ -export const isQuickappUnion = platform === 'quickapp-webview-union' - -/** Detect if `process.env.UNI_PLATFORM` is `快应用华为` */ -export const isQuickappHuawei = platform === 'quickapp-webview-huawei' diff --git a/src/types.ts b/src/types.ts deleted file mode 100644 index 568e3ea..0000000 --- a/src/types.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { builtInPlatforms } from './_constant' - -export type BuiltInPlatForm = typeof builtInPlatforms[number] - -export type UtsPlatform = BuiltInPlatForm - | 'app-android' - | 'app-ios' - | 'web' -export type AppPlatform = 'android' - | 'ios' - | undefined -export type SubPlatform = - 'quickapp-webview-huawei' - | 'quickapp-webview-union' - | undefined diff --git a/src/_utils.ts b/src/utils.ts similarity index 100% rename from src/_utils.ts rename to src/utils.ts diff --git a/test/index.test.ts b/test/index.test.ts index 1dcd4a1..c0c4a0a 100644 --- a/test/index.test.ts +++ b/test/index.test.ts @@ -7,11 +7,13 @@ describe('uni-env', () => { [ "builtInPlatforms", "platform", - "utsPlatform", "appPlatform", "subPlatform", + "utsPlatform", "isH5", + "isWeb", "isApp", + "isAppPlus", "isAppAndroid", "isAppIOS", "isMp", @@ -24,27 +26,61 @@ describe('uni-env', () => { "isQuickapp", "isQuickappUnion", "isQuickappHuawei", - "hasDarkMode", - "hasSourcemap", + "utsJsCodeFormat", + "utsModuleType", + "utsModulePrefix", + "utsTargetLanguage", + "inputDir", + "outputDir", + "cliContext", + "subpackage", + "mpPlugin", "isMpPlugin", - "isMinimize", - "isSSRClient", - "isSSRServer", - "compiler", - "nvueCompiler", - "nvueStyleCompiler", "compilerVersion", "compilerVersionType", - "cliContext", - "inputDir", - "outputDir", - "statTitleJson", - "customContext", + "hbuilderxPlugins", + "renderer", + "nvueCompiler", + "nvueStyleCompiler", + "appCodeSpliting", + "automatorWsEndpoint", + "automatorAppWebview", + "automatorAppWebviewSrc", + "h5Base", + "h5Browser", "customScript", "customDefine", - "subpackage", - "renderer", + "customContext", + "minimize", + "isMinimize", + "uvue", + "isUVue", + "uvueTargetLanguage", + "compiler", "rendererNative", + "nvueAppStyles", + "appChangedFiles", + "appChangedPages", + "darkMode", + "hasDarkMode", + "hxUseBaseType", + "hxDependenciesDir", + "appX", + "isAppX", + "appXCacheDir", + "hxVersion", + "appXPageCount", + "appXTsc", + "appXSingleThread", + "appXSetup", + "appXUVueScriptEngine", + "statTitleJson", + "sourcemap", + "hasSourcemap", + "ssrClient", + "isSSRClient", + "ssrServer", + "isSSRServer", ] `) }) diff --git a/tsconfig.json b/tsconfig.json index 98b3818..3f5fd5e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,9 +1,9 @@ { "compilerOptions": { - "target": "es2018", + "target": "esnext", "lib": ["esnext"], "module": "esnext", - "moduleResolution": "node", + "moduleResolution": "Bundler", "resolveJsonModule": true, "strict": true, "strictNullChecks": true,