From 17a415b76a9551b96faca68a7d1d6a45b36ec12d Mon Sep 17 00:00:00 2001 From: ice breaker <1324318532@qq.com> Date: Sun, 19 May 2024 18:23:46 +0800 Subject: [PATCH 1/2] chore: deps change --- .eslintignore | 4 - .eslintrc.js | 8 - .prettierrc | 9 - eslint.config.mjs | 7 + package.json | 9 +- pnpm-lock.yaml | 1369 +++++++++++++++++++++++++++++++++------------ 6 files changed, 1018 insertions(+), 388 deletions(-) delete mode 100644 .eslintignore delete mode 100644 .eslintrc.js delete mode 100644 .prettierrc create mode 100644 eslint.config.mjs diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 77741f15..00000000 --- a/.eslintignore +++ /dev/null @@ -1,4 +0,0 @@ -packages/unplugin-tailwindcss-mangle/test/fixtures/**/* -packages/tailwindcss-patch/test/fixtures/**/* -packages/*/dist -packages/**/fixtures \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 61eb8409..00000000 --- a/.eslintrc.js +++ /dev/null @@ -1,8 +0,0 @@ -/** @type {import('eslint').Linter.Config} */ -module.exports = { - root: true, - extends: ['icebreaker', 'plugin:prettier/recommended'], - rules: { - 'unicorn/prefer-at': 0 - } -} diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index bd874ae1..00000000 --- a/.prettierrc +++ /dev/null @@ -1,9 +0,0 @@ -{ - "tabWidth": 2, - "useTabs": false, - "semi": false, - "singleQuote": true, - "endOfLine": "lf", - "trailingComma": "none", - "printWidth": 180 -} \ No newline at end of file diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 00000000..b6ca5e29 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,7 @@ +import { icebreaker } from '@icebreakers/eslint-config' + +export default icebreaker({}, { + ignores: [ + '**/fixtures/**', + ], +}) diff --git a/package.json b/package.json index d6a48e86..2fa92116 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "test": "vitest run --coverage.enabled", "test:dev": "vitest --coverage.enabled", "lint": "pnpm run -r lint", - "format": "prettier --write \"**/*.{ts,tsx,md}\"", + "format": "eslint packages --fix", "preinstall": "npx only-allow pnpm", "sync": "cnpm sync @tailwindcss-mangle/shared @tailwindcss-mangle/config tailwindcss-patch unplugin-tailwindcss-mangle @tailwindcss-mangle/core", "publish-packages": "pnpm run test && changeset version && changeset publish", @@ -21,6 +21,7 @@ "devDependencies": { "@changesets/changelog-github": "^0.5.0", "@changesets/cli": "^2.27.2", + "@icebreakers/eslint-config": "^0.2.0", "@tailwindcss-mangle/core": "workspace:*", "@tailwindcss-mangle/shared": "workspace:*", "@tsconfig/recommended": "^1.0.6", @@ -33,12 +34,8 @@ "defu": "^6.1.4", "del": "^7.1.0", "eslint": "^9.3.0", - "eslint-config-icebreaker": "^1.2.3", - "eslint-config-prettier": "^9.1.0", - "eslint-plugin-prettier": "^5.1.3", "lodash-es": "^4.17.21", "only-allow": "^1.2.1", - "prettier": "^3.2.5", "rollup": "^4.17.2", "tailwindcss-patch": "workspace:*", "ts-node": "^10.9.2", @@ -52,5 +49,5 @@ "engines": { "node": ">=18.0.0" }, - "packageManager": "pnpm@9.1.0" + "packageManager": "pnpm@9.1.1" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 835689b7..c5a9aea9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,6 +14,9 @@ importers: '@changesets/cli': specifier: ^2.27.2 version: 2.27.2 + '@icebreakers/eslint-config': + specifier: ^0.2.0 + version: 0.2.0(@types/eslint@8.56.10)(@vue/compiler-sfc@3.4.27)(eslint@9.3.0)(prettier@2.8.8)(tailwindcss@3.4.3(ts-node@10.9.2(@types/node@20.12.12)(typescript@5.4.5)))(typescript@5.4.5)(vitest@1.6.0(@types/node@20.12.12)(terser@5.30.3)) '@tailwindcss-mangle/core': specifier: workspace:* version: link:packages/core @@ -31,7 +34,7 @@ importers: version: 20.12.12 '@vitest/coverage-v8': specifier: ^1.6.0 - version: 1.6.0(vitest@1.6.0(@types/node@20.12.12)(terser@5.31.0)) + version: 1.6.0(vitest@1.6.0(@types/node@20.12.12)(terser@5.30.3)) bumpp: specifier: ^9.4.1 version: 9.4.1 @@ -50,24 +53,12 @@ importers: eslint: specifier: ^9.3.0 version: 9.3.0 - eslint-config-icebreaker: - specifier: ^1.2.3 - version: 1.2.3(eslint@9.3.0)(typescript@5.4.5) - eslint-config-prettier: - specifier: ^9.1.0 - version: 9.1.0(eslint@9.3.0) - eslint-plugin-prettier: - specifier: ^5.1.3 - version: 5.1.3(@types/eslint@8.56.10)(eslint-config-prettier@9.1.0(eslint@9.3.0))(eslint@9.3.0)(prettier@3.2.5) lodash-es: specifier: ^4.17.21 version: 4.17.21 only-allow: specifier: ^1.2.1 version: 1.2.1 - prettier: - specifier: ^3.2.5 - version: 3.2.5 rollup: specifier: ^4.17.2 version: 4.17.2 @@ -94,7 +85,7 @@ importers: version: link:packages/unplugin-tailwindcss-mangle vitest: specifier: ^1.6.0 - version: 1.6.0(@types/node@20.12.12)(terser@5.31.0) + version: 1.6.0(@types/node@20.12.12)(terser@5.30.3) packages/config: dependencies: @@ -255,7 +246,7 @@ importers: version: 7.10.3 astro: specifier: ^4.8.6 - version: 4.8.6(@types/node@20.12.12)(terser@5.31.0)(typescript@5.4.5) + version: 4.8.6(@types/node@20.12.12)(terser@5.30.3)(typescript@5.4.5) css-loader: specifier: ^7.1.1 version: 7.1.1(webpack@5.91.0) @@ -282,7 +273,7 @@ importers: version: link:../tailwindcss-patch vite: specifier: ^5.2.11 - version: 5.2.11(@types/node@20.12.12)(terser@5.31.0) + version: 5.2.11(@types/node@20.12.12)(terser@5.30.3) webpack: specifier: ^5.91.0 version: 5.91.0 @@ -300,6 +291,58 @@ packages: resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} engines: {node: '>=6.0.0'} + '@antfu/eslint-config@2.18.0': + resolution: {integrity: sha512-aK9xjU8jnOfEO449A34wypCUiAz9S4/d0Tvup6FS7IsR3Y1xtF3KQI4OYYM2OqFLHEsRLrGAcE9FbUb+oC6EiA==} + 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 + eslint: '>=8.40.0' + eslint-plugin-astro: ^0.31.4 + eslint-plugin-format: '>=0.1.0' + eslint-plugin-react-hooks: ^4.6.0 + eslint-plugin-react-refresh: ^0.4.4 + eslint-plugin-solid: ^0.13.2 + eslint-plugin-svelte: '>=2.35.1' + prettier-plugin-astro: ^0.13.0 + prettier-plugin-slidev: ^1.0.5 + svelte-eslint-parser: ^0.33.1 + peerDependenciesMeta: + '@eslint-react/eslint-plugin': + optional: true + '@prettier/plugin-xml': + optional: true + '@unocss/eslint-plugin': + optional: true + astro-eslint-parser: + optional: true + eslint-plugin-astro: + optional: true + eslint-plugin-format: + optional: true + eslint-plugin-react-hooks: + optional: true + eslint-plugin-react-refresh: + optional: true + eslint-plugin-solid: + optional: true + eslint-plugin-svelte: + optional: true + prettier-plugin-astro: + optional: true + prettier-plugin-slidev: + optional: true + svelte-eslint-parser: + optional: true + + '@antfu/install-pkg@0.3.3': + resolution: {integrity: sha512-nHHsk3NXQ6xkCfiRRC8Nfrg8pU5kkr3P3Y9s9dKqiuRmBD0Yap7fymNDjGFKeWhZQHqqbCS5CfeMy9wtExM24w==} + + '@antfu/utils@0.7.8': + resolution: {integrity: sha512-rWQkqXRESdjXtc+7NRfK9lASQjpXJu1ayp7qi1d23zZorY+wBHVLHHoVcMsEnkqEBWTFqbztO7/QdJFzyEcLTg==} + '@ast-core/escape@1.0.1': resolution: {integrity: sha512-/kVjBkDzYrSW1S+gTBCuOfhnNkge9qZFJgLT+MOZdmPN4Vts36S60uU5br3ozoxpJ1eRGe6pGy7/EfcOpFFHlA==} @@ -563,6 +606,14 @@ packages: '@changesets/write@0.3.1': resolution: {integrity: sha512-SyGtMXzH3qFqlHKcvFY2eX+6b0NGiFcNav8AFsYwy5l8hejOeoeTDemu5Yjmke2V5jpzY+pBvM0vCCQ3gdZpfw==} + '@clack/core@0.3.4': + resolution: {integrity: sha512-H4hxZDXgHtWTwV3RAVenqcC4VbJZNegbBjlPvzOzCouXtS2y3sDvlO3IsbrPNWuLWPPlYVYPghQdSF64683Ldw==} + + '@clack/prompts@0.7.0': + resolution: {integrity: sha512-0MhX9/B4iL6Re04jPrttDm+BsP8y6mS7byuv0BvXgdXhbV5PdlsHt55dvNsuBCPZ7xq1oTAOOuotR9NFbQyMSA==} + bundledDependencies: + - is-unicode-supported + '@cspotcode/source-map-support@0.8.1': resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} engines: {node: '>=12'} @@ -570,6 +621,10 @@ packages: '@emnapi/runtime@1.1.1': resolution: {integrity: sha512-3bfqkzuR1KLx57nZfjr2NLnFOobvyS0aTszaEGCGqmYMVDRaGvgIZbjGSV/MHSSmLgQ/b9JFHQ5xm5WRZYd+XQ==} + '@es-joy/jsdoccomment@0.43.0': + resolution: {integrity: sha512-Q1CnsQrytI3TlCB1IVWXWeqUIPGVEKGaE7IbVdt13Nq/3i0JESAkQQERrfiQkmlpijl+++qyqPgaS31Bvc1jRQ==} + engines: {node: '>=16'} + '@esbuild/aix-ppc64@0.19.12': resolution: {integrity: sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==} engines: {node: '>=12'} @@ -1258,6 +1313,10 @@ packages: resolution: {integrity: sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==} 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/eslintrc@3.1.0': resolution: {integrity: sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1281,6 +1340,9 @@ packages: resolution: {integrity: sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==} engines: {node: '>=18.18'} + '@icebreakers/eslint-config@0.2.0': + resolution: {integrity: sha512-fu61P5gIJ1J+azrEDItiUARmIUQl3nINBvyxoApUBDHEqH2yg81oUleq9EOPk/MomE2xVY+I9cVodKVXKHc53w==} + '@img/sharp-darwin-arm64@0.33.4': resolution: {integrity: sha512-p0suNqXufJs9t3RqLBO6vvrgr5OhgbWp76s5gTRvdmxmuv9E1rcaqGUsl3l4mKVmXPkTkTErXediAui4x+8PSA==} engines: {glibc: '>=2.26', node: ^18.17.0 || ^20.3.0 || >=21.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0', yarn: '>=3.2.0'} @@ -1627,6 +1689,35 @@ packages: '@sinclair/typebox@0.27.8': resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} + '@stylistic/eslint-plugin-js@2.1.0': + resolution: {integrity: sha512-gdXUjGNSsnY6nPyqxu6lmDTtVrwCOjun4x8PUn0x04d5ucLI74N3MT1Q0UhdcOR9No3bo5PGDyBgXK+KmD787A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: '>=8.40.0' + + '@stylistic/eslint-plugin-jsx@2.1.0': + resolution: {integrity: sha512-mMD7S+IndZo2vxmwpHVTCwx2O1VdtE5tmpeNwgaEcXODzWV1WTWpnsc/PECQKIr/mkLPFWiSIqcuYNhQ/3l6AQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: '>=8.40.0' + + '@stylistic/eslint-plugin-plus@2.1.0': + resolution: {integrity: sha512-S5QAlgYXESJaSBFhBSBLZy9o36gXrXQwWSt6QkO+F0SrT9vpV5JF/VKoh+ojO7tHzd8Ckmyouq02TT9Sv2B0zQ==} + peerDependencies: + eslint: '*' + + '@stylistic/eslint-plugin-ts@2.1.0': + resolution: {integrity: sha512-2ioFibufHYBALx2TBrU4KXovCkN8qCqcb9yIHc0fyOfTaO5jw4d56WW7YRcF3Zgde6qFyXwAN6z/+w4pnmos1g==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: '>=8.40.0' + + '@stylistic/eslint-plugin@2.1.0': + resolution: {integrity: sha512-cBBowKP2u/+uE5CzgH5w8pE9VKqcM7BXdIDPIbGt2rmLJGnA6MJPr9vYGaqgMoJFs7R/FzsMQerMvvEP40g2uw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: '>=8.40.0' + '@tsconfig/node10@1.0.9': resolution: {integrity: sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==} @@ -1693,9 +1784,6 @@ packages: '@types/json-schema@7.0.15': resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} - '@types/json5@0.0.29': - resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} - '@types/loader-runner@2.2.8': resolution: {integrity: sha512-5xcLak5lyLlhMXQD9lUG5n63n6IGIMJSkq9g2tqUCs6agnoIZd0H8nyKuDpzP0DxzMF3Rs2+zOVm2DCh3JLuRg==} @@ -1708,6 +1796,9 @@ packages: '@types/lodash@4.14.202': resolution: {integrity: sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ==} + '@types/mdast@3.0.15': + resolution: {integrity: sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==} + '@types/mdast@4.0.4': resolution: {integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==} @@ -1762,22 +1853,22 @@ packages: '@types/webpack@4.41.38': resolution: {integrity: sha512-oOW7E931XJU1mVfCnxCVgv8GLFL768pDO5u2Gzk82i8yTIgX6i7cntyZOkZYb/JtYM8252SN9bQp9tgkVDSsRw==} - '@typescript-eslint/eslint-plugin@6.15.0': - resolution: {integrity: sha512-j5qoikQqPccq9QoBAupOP+CBu8BaJ8BLjaXSioDISeTZkVO3ig7oSIKh3H+rEpee7xCXtWwSB4KIL5l6hWZzpg==} - engines: {node: ^16.0.0 || >=18.0.0} + '@typescript-eslint/eslint-plugin@7.9.0': + resolution: {integrity: sha512-6e+X0X3sFe/G/54aC3jt0txuMTURqLyekmEHViqyA2VnxhLMpvA6nqmcjIy+Cr9tLDHPssA74BP5Mx9HQIxBEA==} + engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: - '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha - eslint: ^7.0.0 || ^8.0.0 + '@typescript-eslint/parser': ^7.0.0 + eslint: ^8.56.0 typescript: '*' peerDependenciesMeta: typescript: optional: true - '@typescript-eslint/parser@6.15.0': - resolution: {integrity: sha512-MkgKNnsjC6QwcMdlNAel24jjkEO/0hQaMDLqP4S9zq5HBAUJNQB6y+3DwLjX7b3l2b37eNAxMPLwb3/kh8VKdA==} - engines: {node: ^16.0.0 || >=18.0.0} + '@typescript-eslint/parser@7.9.0': + resolution: {integrity: sha512-qHMJfkL5qvgQB2aLvhUSXxbK7OLnDkwPzFalg458pxQgfxKDfT1ZDbHQM/I6mDIf/svlMkj21kzKuQ2ixJlatQ==} + engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: - eslint: ^7.0.0 || ^8.0.0 + eslint: ^8.56.0 typescript: '*' peerDependenciesMeta: typescript: @@ -1787,11 +1878,15 @@ packages: resolution: {integrity: sha512-+BdvxYBltqrmgCNu4Li+fGDIkW9n//NrruzG9X1vBzaNK+ExVXPoGB71kneaVw/Jp+4rH/vaMAGC6JfMbHstVg==} engines: {node: ^16.0.0 || >=18.0.0} - '@typescript-eslint/type-utils@6.15.0': - resolution: {integrity: sha512-CnmHKTfX6450Bo49hPg2OkIm/D/TVYV7jO1MCfPYGwf6x3GO0VU8YMO5AYMn+u3X05lRRxA4fWCz87GFQV6yVQ==} - engines: {node: ^16.0.0 || >=18.0.0} + '@typescript-eslint/scope-manager@7.9.0': + resolution: {integrity: sha512-ZwPK4DeCDxr3GJltRz5iZejPFAAr4Wk3+2WIBaj1L5PYK5RgxExu/Y68FFVclN0y6GGwH8q+KgKRCvaTmFBbgQ==} + engines: {node: ^18.18.0 || >=20.0.0} + + '@typescript-eslint/type-utils@7.9.0': + resolution: {integrity: sha512-6Qy8dfut0PFrFRAZsGzuLoM4hre4gjzWJB6sUvdunCYZsYemTkzZNwF1rnGea326PHPT3zn5Lmg32M/xfJfByA==} + engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: - eslint: ^7.0.0 || ^8.0.0 + eslint: ^8.56.0 typescript: '*' peerDependenciesMeta: typescript: @@ -1801,6 +1896,10 @@ packages: resolution: {integrity: sha512-yXjbt//E4T/ee8Ia1b5mGlbNj9fB9lJP4jqLbZualwpP2BCQ5is6BcWwxpIsY4XKAhmdv3hrW92GdtJbatC6dQ==} engines: {node: ^16.0.0 || >=18.0.0} + '@typescript-eslint/types@7.9.0': + resolution: {integrity: sha512-oZQD9HEWQanl9UfsbGVcZ2cGaR0YT5476xfWE0oE5kQa2sNK2frxOlkeacLOTh9po4AlUT5rtkGyYM5kew0z5w==} + engines: {node: ^18.18.0 || >=20.0.0} + '@typescript-eslint/typescript-estree@6.15.0': resolution: {integrity: sha512-7mVZJN7Hd15OmGuWrp2T9UvqR2Ecg+1j/Bp1jXUEY2GZKV6FXlOIoqVDmLpBiEiq3katvj/2n2mR0SDwtloCew==} engines: {node: ^16.0.0 || >=18.0.0} @@ -1810,16 +1909,35 @@ packages: typescript: optional: true + '@typescript-eslint/typescript-estree@7.9.0': + resolution: {integrity: sha512-zBCMCkrb2YjpKV3LA0ZJubtKCDxLttxfdGmwZvTqqWevUPN0FZvSI26FalGFFUZU/9YQK/A4xcQF9o/VVaCKAg==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/utils@6.15.0': resolution: {integrity: sha512-eF82p0Wrrlt8fQSRL0bGXzK5nWPRV2dYQZdajcfzOD9+cQz9O7ugifrJxclB+xVOvWvagXfqS4Es7vpLP4augw==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 + '@typescript-eslint/utils@7.9.0': + resolution: {integrity: sha512-5KVRQCzZajmT4Ep+NEgjXCvjuypVvYHUW7RHlXzNPuak2oWpVoD1jf5xCP0dPAuNIchjC7uQyvbdaSTFaLqSdA==} + engines: {node: ^18.18.0 || >=20.0.0} + peerDependencies: + eslint: ^8.56.0 + '@typescript-eslint/visitor-keys@6.15.0': resolution: {integrity: sha512-1zvtdC1a9h5Tb5jU9x3ADNXO9yjP8rXlaoChu0DQX40vf5ACVpYIVIZhIMZ6d5sDXH7vq4dsZBT1fEGj8D2n2w==} engines: {node: ^16.0.0 || >=18.0.0} + '@typescript-eslint/visitor-keys@7.9.0': + resolution: {integrity: sha512-iESPx2TNLDNGQLyjKhUvIKprlP49XNEK+MvIf9nIO7ZZaZdbnfWKHnXAgufpxqfA0YryH8XToi4+CjBgVnFTSQ==} + engines: {node: ^18.18.0 || >=20.0.0} + '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} @@ -2003,6 +2121,10 @@ packages: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} engines: {node: '>= 8'} + are-docs-informative@0.0.2: + resolution: {integrity: sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==} + engines: {node: '>=14'} + arg@4.1.3: resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} @@ -2021,10 +2143,6 @@ packages: array-buffer-byte-length@1.0.0: resolution: {integrity: sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==} - array-includes@3.1.7: - resolution: {integrity: sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==} - engines: {node: '>= 0.4'} - array-iterate@2.0.1: resolution: {integrity: sha512-I1jXZMjAgCMmxT4qxXfPXa6SthSoE8h6gkSI9BGGNv8mP8G/v0blc+qFnZu6K42vTOiuME596QaLO0TP3Lk0xg==} @@ -2032,18 +2150,10 @@ packages: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} engines: {node: '>=8'} - array.prototype.findlastindex@1.2.3: - resolution: {integrity: sha512-LzLoiOMAxvy+Gd3BAq3B7VeIgPdo+Q8hthvKtXybMvRV0jrXfJM/t8mw7nNlpEcVlVUnCnM2KSX4XU5HmpodOA==} - engines: {node: '>= 0.4'} - array.prototype.flat@1.3.2: resolution: {integrity: sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==} engines: {node: '>= 0.4'} - array.prototype.flatmap@1.3.2: - resolution: {integrity: sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==} - engines: {node: '>= 0.4'} - arraybuffer.prototype.slice@1.0.2: resolution: {integrity: sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==} engines: {node: '>= 0.4'} @@ -2119,9 +2229,6 @@ packages: resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} engines: {node: '>=6'} - builtins@5.0.1: - resolution: {integrity: sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==} - bumpp@9.4.1: resolution: {integrity: sha512-kzhp/LpNX0HkUpEyLd7sU2LTN/mbAVgcxJ1Zi2cAJTE/tul6rypSKGpH8UywDpzKWItL8LVdKsIFnwmylw0+7g==} engines: {node: '>=10'} @@ -2197,12 +2304,21 @@ packages: character-entities-html4@2.1.0: resolution: {integrity: sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==} + character-entities-legacy@1.1.4: + resolution: {integrity: sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==} + character-entities-legacy@3.0.0: resolution: {integrity: sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==} + character-entities@1.2.4: + resolution: {integrity: sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==} + character-entities@2.0.2: resolution: {integrity: sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==} + character-reference-invalid@1.1.4: + resolution: {integrity: sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==} + chardet@0.7.0: resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} @@ -2308,6 +2424,10 @@ packages: resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==} engines: {node: '>= 12'} + comment-parser@1.4.1: + resolution: {integrity: sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==} + engines: {node: '>= 12.0.0'} + common-ancestor-path@1.0.1: resolution: {integrity: sha512-L3sHRo1pXXEqX8VU28kfgUY+YGsk09hPqZiZmLacNib6XNTCM8ubYeT7ryXQw8asB1sKgcU5lkB7ONug08aB8w==} @@ -2334,6 +2454,9 @@ packages: resolution: {integrity: sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==} engines: {node: '>= 0.6'} + core-js-compat@3.37.1: + resolution: {integrity: sha512-9TNiImhKvQqSUkOvk/mMRZzOANTiEVC7WaBNhHcKM7x+/5E1l5NvsysR19zuDQScE8k+kfQXWRN3AtS/eOSHpg==} + cosmiconfig@9.0.0: resolution: {integrity: sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==} engines: {node: '>=14'} @@ -2517,9 +2640,9 @@ packages: dlv@1.1.3: resolution: {integrity: sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==} - doctrine@2.1.0: - resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} - engines: {node: '>=0.10.0'} + doctrine@3.0.0: + resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} + engines: {node: '>=6.0.0'} dom-converter@0.2.0: resolution: {integrity: sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA==} @@ -2571,10 +2694,6 @@ packages: resolution: {integrity: sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==} engines: {node: '>= 4'} - enhanced-resolve@5.15.0: - resolution: {integrity: sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==} - engines: {node: '>=10.13.0'} - enhanced-resolve@5.16.0: resolution: {integrity: sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA==} engines: {node: '>=10.13.0'} @@ -2665,11 +2784,14 @@ packages: peerDependencies: eslint: '>=6.0.0' - eslint-config-icebreaker@1.2.3: - resolution: {integrity: sha512-M88L9uE+Fz0IrGW7xlR250TQiVRV6CFxwz06VDQJmyoEoTZFqR1lOS4mdchfevGxyPAWV8p2621xekpebwieQA==} + eslint-compat-utils@0.5.0: + resolution: {integrity: sha512-dc6Y8tzEcSYZMHa+CMPLi/hyo1FzNeonbhJL7Ol0ccuKQkwopJcJBA9YL/xmMTLU1eKigXo9vj9nALElWYSowg==} + engines: {node: '>=12'} peerDependencies: - eslint: '*' - typescript: '*' + eslint: '>=6.0.0' + + eslint-config-flat-gitignore@0.1.5: + resolution: {integrity: sha512-hEZLwuZjDBGDERA49c2q7vxc8sCGv8EdBp6PQYzGOMcHIgrfG9YOM6s/4jx24zhD+wnK9AI8mgN5RxSss5nClQ==} eslint-config-prettier@9.1.0: resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} @@ -2677,45 +2799,26 @@ packages: peerDependencies: eslint: '>=7.0.0' - eslint-config-standard@17.1.0: - resolution: {integrity: sha512-IwHwmaBNtDK4zDHQukFDW5u/aTb8+meQWZvNFWkiGmbWjD6bqyuSSBxxXKkCftCUzc1zwCH2m/baCNDLGmuO5Q==} - engines: {node: '>=12.0.0'} - peerDependencies: - eslint: ^8.0.1 - eslint-plugin-import: ^2.25.2 - eslint-plugin-n: '^15.0.0 || ^16.0.0 ' - eslint-plugin-promise: ^6.0.0 + eslint-flat-config-utils@0.2.5: + resolution: {integrity: sha512-iO+yLZtC/LKgACerkpvsZ6NoRVB2sxT04mOpnNcEM1aTwKy+6TsT46PUvrML4y2uVBS6I67hRCd2JiKAPaL/Uw==} eslint-import-resolver-node@0.3.9: resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} - eslint-import-resolver-typescript@3.6.1: - resolution: {integrity: sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==} - engines: {node: ^14.18.0 || >=16.0.0} + eslint-merge-processors@0.1.0: + resolution: {integrity: sha512-IvRXXtEajLeyssvW4wJcZ2etxkR9mUf4zpNwgI+m/Uac9RfXHskuJefkHUcawVzePnd6xp24enp5jfgdHzjRdQ==} peerDependencies: eslint: '*' - eslint-plugin-import: '*' - eslint-module-utils@2.8.0: - resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} - engines: {node: '>=4'} + eslint-plugin-antfu@2.2.0: + resolution: {integrity: sha512-QHzHYP+fyfhSkIdcuT9JZ4rCPuJOoHRE27gglPYHlJ6lxB7pO9i45yAy4aurx/rleBuEC27U4c//1Nwtbasj4Q==} + peerDependencies: + eslint: '*' + + eslint-plugin-command@0.2.3: + resolution: {integrity: sha512-1bBYNfjZg60N2ZpLV5ATYSYyueIJ+zl5yKrTs0UFDdnyu07dNSZ7Xplnc+Wb6SXTdc1sIaoIrnuyhvztcltX6A==} peerDependencies: - '@typescript-eslint/parser': '*' eslint: '*' - eslint-import-resolver-node: '*' - eslint-import-resolver-typescript: '*' - eslint-import-resolver-webpack: '*' - peerDependenciesMeta: - '@typescript-eslint/parser': - optional: true - eslint: - optional: true - eslint-import-resolver-node: - optional: true - eslint-import-resolver-typescript: - optional: true - eslint-import-resolver-webpack: - optional: true eslint-plugin-es-x@7.5.0: resolution: {integrity: sha512-ODswlDSO0HJDzXU0XvgZ3lF3lS3XAZEossh15Q2UHjwrJggWeBoKqqEsLTZLXl+dh5eOAozG0zRcYtuE35oTuQ==} @@ -2723,33 +2826,63 @@ packages: peerDependencies: eslint: '>=8' - eslint-plugin-es@3.0.1: - resolution: {integrity: sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==} - engines: {node: '>=8.10.0'} + eslint-plugin-eslint-comments@3.2.0: + resolution: {integrity: sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ==} + engines: {node: '>=6.5.0'} peerDependencies: eslint: '>=4.19.1' - eslint-plugin-import@2.29.1: - resolution: {integrity: sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==} - engines: {node: '>=4'} + eslint-plugin-import-x@0.5.0: + resolution: {integrity: sha512-C7R8Z4IzxmsoOPMtSzwuOBW5FH6iRlxHR6iTks+MzVlrk3r3TUxokkWTx3ypdj9nGOEP+CG/5e6ebZzHbxgbbQ==} + engines: {node: '>=16'} peerDependencies: - '@typescript-eslint/parser': '*' - eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 - peerDependenciesMeta: - '@typescript-eslint/parser': - optional: true + eslint: ^8.56.0 || ^9.0.0-0 - eslint-plugin-n@16.4.0: - resolution: {integrity: sha512-IkqJjGoWYGskVaJA7WQuN8PINIxc0N/Pk/jLeYT4ees6Fo5lAhpwGsYek6gS9tCUxgDC4zJ+OwY2bY/6/9OMKQ==} - engines: {node: '>=16.0.0'} + eslint-plugin-jsdoc@48.2.5: + resolution: {integrity: sha512-ZeTfKV474W1N9niWfawpwsXGu+ZoMXu4417eBROX31d7ZuOk8zyG66SO77DpJ2+A9Wa2scw/jRqBPnnQo7VbcQ==} + engines: {node: '>=18'} peerDependencies: - eslint: '>=7.0.0' + eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 - eslint-plugin-node@11.1.0: - resolution: {integrity: sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==} - engines: {node: '>=8.10.0'} + eslint-plugin-jsonc@2.15.1: + resolution: {integrity: sha512-PVFrqIJa8BbM/e828RSn0SwB/Z5ye+2LDuy2XqG6AymNgPsfApRRcznsbxP7VrjdLEU4Nb+g9n/d6opyp0jp9A==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: '>=6.0.0' + + eslint-plugin-markdown@5.0.0: + resolution: {integrity: sha512-kY2u9yDhzvfZ0kmRTsvgm3mTnvZgTSGIIPeHg3yesSx4R5CTCnITUjCPhzCD1MUhNcqHU5Tr6lzx+02EclVPbw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: '>=5.16.0' + eslint: '>=8' + + eslint-plugin-n@17.7.0: + resolution: {integrity: sha512-4Jg4ZKVE4VjHig2caBqPHYNW5na84RVufUuipFLJbgM/G57O6FdpUKJbHakCDJb/yjQuyqVzYWRtU3HNYaZUwg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: '>=8.23.0' + + eslint-plugin-no-only-tests@3.1.0: + resolution: {integrity: sha512-Lf4YW/bL6Un1R6A76pRZyE1dl1vr31G/ev8UzIc/geCgFWyrKil8hVjYqWVKGB/UIGmb6Slzs9T0wNezdSVegw==} + engines: {node: '>=5.0.0'} + + eslint-plugin-perfectionist@2.10.0: + resolution: {integrity: sha512-P+tdrkHeMWBc55+DZsoDOAftV1WCsEoHaKm6JC7zajFus/syfT4vUPBFb3atGFSuyaVnGQGHlcKpP9X3Q0gH/w==} + peerDependencies: + astro-eslint-parser: ^0.16.0 + eslint: '>=8.0.0' + svelte: '>=3.0.0' + svelte-eslint-parser: ^0.33.0 + vue-eslint-parser: '>=9.0.0' + peerDependenciesMeta: + astro-eslint-parser: + optional: true + svelte: + optional: true + svelte-eslint-parser: + optional: true + vue-eslint-parser: + optional: true eslint-plugin-prettier@5.1.3: resolution: {integrity: sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw==} @@ -2765,34 +2898,87 @@ packages: eslint-config-prettier: optional: true - eslint-plugin-promise@6.1.1: - resolution: {integrity: sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==} + eslint-plugin-regexp@2.5.0: + resolution: {integrity: sha512-I7vKcP0o75WS5SHiVNXN+Eshq49sbrweMQIuqSL3AId9AwDe9Dhbfug65vw64LxmOd4v+yf5l5Xt41y9puiq0g==} + engines: {node: ^18 || >=20} + peerDependencies: + eslint: '>=8.44.0' + + eslint-plugin-tailwindcss@3.15.2: + resolution: {integrity: sha512-+HJfWcyP5B/e8r8qVSaTbf2i4+HsESJJsue66qFHRstV11CNTfdaDD9zkCVA1pm2EplBZ/BSJ3Htfzvb4YTVKw==} + engines: {node: '>=12.13.0'} + peerDependencies: + tailwindcss: ^3.4.0 + + eslint-plugin-toml@0.11.0: + resolution: {integrity: sha512-sau+YvPU4fWTjB+qtBt3n8WS87aoDCs+BVbSUAemGaIsRNbvR9uEk+Tt892iLHTGvp/DPWYoCX4/8DoyAbB+sQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: - eslint: ^7.0.0 || ^8.0.0 + eslint: '>=6.0.0' - eslint-plugin-unicorn@49.0.0: - resolution: {integrity: sha512-0fHEa/8Pih5cmzFW5L7xMEfUTvI9WKeQtjmKpTUmY+BiFCDxkxrTdnURJOHKykhtwIeyYsxnecbGvDCml++z4Q==} + eslint-plugin-unicorn@52.0.0: + resolution: {integrity: sha512-1Yzm7/m+0R4djH0tjDjfVei/ju2w3AzUGjG6q8JnuNIL5xIwsflyCooW5sfBvQp2pMYQFSWWCFONsjCax1EHng==} engines: {node: '>=16'} peerDependencies: - eslint: '>=8.52.0' + eslint: '>=8.56.0' + + eslint-plugin-unused-imports@3.2.0: + resolution: {integrity: sha512-6uXyn6xdINEpxE1MtDjxQsyXB37lfyO2yKGVVgtD7WEWQGORSOZjgrD6hBhvGv4/SO+TOlS+UnC6JppRqbuwGQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + '@typescript-eslint/eslint-plugin': 6 - 7 + eslint: '8' + peerDependenciesMeta: + '@typescript-eslint/eslint-plugin': + optional: true + + eslint-plugin-vitest@0.5.4: + resolution: {integrity: sha512-um+odCkccAHU53WdKAw39MY61+1x990uXjSPguUCq3VcEHdqJrOb8OTMrbYlY6f9jAKx7x98kLVlIe3RJeJqoQ==} + engines: {node: ^18.0.0 || >= 20.0.0} + peerDependencies: + '@typescript-eslint/eslint-plugin': '*' + eslint: ^8.57.0 || ^9.0.0 + vitest: '*' + peerDependenciesMeta: + '@typescript-eslint/eslint-plugin': + optional: true + vitest: + optional: true + + eslint-plugin-vue@9.26.0: + resolution: {integrity: sha512-eTvlxXgd4ijE1cdur850G6KalZqk65k1JKoOI2d1kT3hr8sPD07j1q98FRFdNnpxBELGPWxZmInxeHGF/GxtqQ==} + engines: {node: ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.2.0 || ^7.0.0 || ^8.0.0 || ^9.0.0 + + eslint-plugin-yml@1.14.0: + resolution: {integrity: sha512-ESUpgYPOcAYQO9czugcX5OqRvn/ydDVwGCPXY4YjPqc09rHaUVUA6IE6HLQys4rXk/S+qx3EwTd1wHCwam/OWQ==} + engines: {node: ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: '>=6.0.0' + + eslint-processor-vue-blocks@0.1.2: + resolution: {integrity: sha512-PfpJ4uKHnqeL/fXUnzYkOax3aIenlwewXRX8jFinA1a2yCFnLgMuiH3xvCgvHHUlV2xJWQHbCTdiJWGwb3NqpQ==} + peerDependencies: + '@vue/compiler-sfc': ^3.3.0 + eslint: ^8.50.0 || ^9.0.0 + + eslint-rule-composer@0.3.0: + resolution: {integrity: sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg==} + engines: {node: '>=4.0.0'} eslint-scope@5.1.1: resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} engines: {node: '>=8.0.0'} + eslint-scope@7.2.2: + 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-utils@2.1.0: - resolution: {integrity: sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==} - engines: {node: '>=6'} - - eslint-visitor-keys@1.3.0: - resolution: {integrity: sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==} - engines: {node: '>=4'} - 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} @@ -2810,6 +2996,10 @@ packages: resolution: {integrity: sha512-MWkrWZbJsL2UwnjxTX3gG8FneachS/Mwg7tdGXce011sJd5b0JG54vat5KHnfSBODZ3Wvzd2WnjxyzsRoVv+ww==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + espree@9.6.1: + resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + esprima@4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} engines: {node: '>=4'} @@ -2912,6 +3102,10 @@ packages: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} + find-up@7.0.0: + resolution: {integrity: sha512-YyZM99iHrqLKjmt4LJDj58KI+fYyufRLBSYcqycxf//KpBk9FoewoGX0450m9nB44qrZnovzC2oeP5hUibxc/g==} + engines: {node: '>=18'} + find-yarn-workspace-root2@1.2.16: resolution: {integrity: sha512-hr6hb1w8ePMpPVUK39S4RlwJzi+xPLuVuG8XlwXU3KD5Yn3qgBWVfy3AzNlDhWvE1EORCE65/Qm26rFQt3VLVA==} @@ -3006,6 +3200,9 @@ packages: get-tsconfig@4.7.2: resolution: {integrity: sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==} + get-tsconfig@4.7.5: + resolution: {integrity: sha512-ZCuZCnlqNzjb4QprAzXKdpp/gh6KTxSJuw3IBsPnV/7fV4NxC9ckB+vPTt8w7fJA0TaSD7c55BR47JD6MEDyDw==} + giget@1.2.3: resolution: {integrity: sha512-8EHPljDvs7qKykr6uw8b+lqLiUc/vUg+KVTI0uND4s63TdsZM2Xus3mflvF0DDG9SiM4RlCkFGL+7aAjRmV7KA==} hasBin: true @@ -3040,10 +3237,18 @@ packages: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} engines: {node: '>=4'} + globals@13.24.0: + resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} + engines: {node: '>=8'} + globals@14.0.0: resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} engines: {node: '>=18'} + globals@15.2.0: + resolution: {integrity: sha512-FQ5YwCHZM3nCmtb5FzEWwdUc9K5d3V/w9mzcz8iGD1gC/aOTHc6PouYu0kkKipNJqHAT7m51sqzQjEjIP+cK0A==} + engines: {node: '>=18'} + globalthis@1.0.3: resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} engines: {node: '>= 0.4'} @@ -3251,6 +3456,12 @@ packages: resolution: {integrity: sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==} engines: {node: '>= 0.4'} + is-alphabetical@1.0.4: + resolution: {integrity: sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==} + + is-alphanumerical@1.0.4: + resolution: {integrity: sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==} + is-array-buffer@3.0.2: resolution: {integrity: sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==} @@ -3293,6 +3504,9 @@ packages: resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} engines: {node: '>= 0.4'} + is-decimal@1.0.4: + resolution: {integrity: sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==} + is-docker@3.0.0: resolution: {integrity: sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -3314,6 +3528,9 @@ packages: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} + is-hexadecimal@1.0.4: + resolution: {integrity: sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==} + is-inside-container@1.0.0: resolution: {integrity: sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==} engines: {node: '>=14.16'} @@ -3463,6 +3680,10 @@ packages: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true + jsdoc-type-pratt-parser@4.0.0: + resolution: {integrity: sha512-YtOli5Cmzy3q4dP26GraSOeAhqecewG04hoO8DY56CH4KJ9Fvv5qKWUCCo3HZob7esJQHCv6/+bnTy72xZZaVQ==} + engines: {node: '>=12.0.0'} + jsesc@0.5.0: resolution: {integrity: sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==} hasBin: true @@ -3501,15 +3722,15 @@ packages: json-stable-stringify-without-jsonify@1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} - json5@1.0.2: - resolution: {integrity: sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==} - hasBin: true - json5@2.2.3: resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} engines: {node: '>=6'} hasBin: true + jsonc-eslint-parser@2.4.0: + resolution: {integrity: sha512-WYDyuc/uFcGp6YtM2H0uKmUwieOuzeE/5YocFJLnLfclZ4inf3mRn8ZVy1s7Hxji7Jxm6Ss8gqpexD/GlKoGgg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + jsonfile@4.0.0: resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} @@ -3574,6 +3795,10 @@ packages: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} + locate-path@7.2.0: + resolution: {integrity: sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + lodash-es@4.17.21: resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==} @@ -3646,6 +3871,9 @@ packages: mdast-util-find-and-replace@3.0.1: resolution: {integrity: sha512-SG21kZHGC3XRTSUhtofZkBzZTJNM5ecCi0SK2IMKmSXR8vO3peL+kb1O0z7Zl83jKtutG4k5Wv/W7V3/YHvzPA==} + mdast-util-from-markdown@0.8.5: + resolution: {integrity: sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==} + mdast-util-from-markdown@2.0.0: resolution: {integrity: sha512-n7MTOr/z+8NAX/wmhhDji8O3bRvPTV/U0oTCaZJkjhPSKTPhS3xufVhKGF8s1pJ7Ox4QgoIU7KHseh09S+9rTA==} @@ -3676,6 +3904,9 @@ packages: mdast-util-to-markdown@2.1.0: resolution: {integrity: sha512-SR2VnIEdVNCJbP6y7kVTJgPLifdr8WEU440fQec7qHoHOUz/oJ2jmNRqdDQ3rbiStOXb2mCDGTuwsK5OPUgYlQ==} + mdast-util-to-string@2.0.0: + resolution: {integrity: sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==} + mdast-util-to-string@4.0.0: resolution: {integrity: sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==} @@ -3777,6 +4008,9 @@ packages: micromark-util-types@2.0.0: resolution: {integrity: sha512-oNh6S2WMHWRZrmutsRmDDfkzKtxF+bc2VxLC9dvtrDIRFln627VsFP6fLMgTryGDljgLPjkrzQSDcPrjPyDJ5w==} + micromark@2.11.4: + resolution: {integrity: sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==} + micromark@4.0.0: resolution: {integrity: sha512-o/sd0nMof8kYff+TqcDx3VSrgBTcZpSvYcAHIfHhv5VAuNmisCxjhx6YmxS8PFEpb9z5WKWKPdzf0jM23ro3RQ==} @@ -3825,9 +4059,6 @@ packages: resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==} engines: {node: '>= 6'} - minimist@1.2.8: - resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} - minipass@3.3.6: resolution: {integrity: sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==} engines: {node: '>=8'} @@ -3896,6 +4127,9 @@ packages: engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true + natural-compare-lite@1.4.0: + resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==} + natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} @@ -3972,17 +4206,6 @@ packages: resolution: {integrity: sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==} engines: {node: '>= 0.4'} - object.fromentries@2.0.7: - resolution: {integrity: sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==} - engines: {node: '>= 0.4'} - - object.groupby@1.0.1: - resolution: {integrity: sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ==} - - object.values@1.1.7: - resolution: {integrity: sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==} - engines: {node: '>= 0.4'} - ohash@1.1.3: resolution: {integrity: sha512-zuHHiGTYTA1sYJ/wZN+t5HKZaH23i4yI1HMwbuXm24Nid7Dv0KcuRlKoNKS9UNfAVSBlnGLcuQrnOKWOZoEGaw==} @@ -4028,6 +4251,10 @@ packages: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} engines: {node: '>=10'} + p-limit@4.0.0: + resolution: {integrity: sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + p-limit@5.0.0: resolution: {integrity: sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ==} engines: {node: '>=18'} @@ -4040,6 +4267,10 @@ packages: resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} engines: {node: '>=10'} + p-locate@6.0.0: + resolution: {integrity: sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + p-map@2.1.0: resolution: {integrity: sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==} engines: {node: '>=6'} @@ -4067,6 +4298,13 @@ packages: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} + parse-entities@2.0.0: + resolution: {integrity: sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==} + + parse-gitignore@2.0.0: + resolution: {integrity: sha512-RmVuCHWsfu0QPNW+mraxh/xjQVw/lhUCUru8Zni3Ctq3AoMhpDTq0OVdKS6iesd6Kqb7viCV3isAL43dciOSog==} + engines: {node: '>=14'} + parse-json@5.2.0: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} @@ -4084,6 +4322,10 @@ packages: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} + path-exists@5.0.0: + 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'} @@ -4129,6 +4371,10 @@ packages: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} + picomatch@4.0.2: + resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} + engines: {node: '>=12'} + pify@2.3.0: resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==} engines: {node: '>=0.10.0'} @@ -4247,11 +4493,6 @@ packages: engines: {node: '>=10.13.0'} hasBin: true - prettier@3.2.5: - resolution: {integrity: sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==} - engines: {node: '>=14'} - hasBin: true - pretty-bytes@6.1.1: resolution: {integrity: sha512-mQUvGU6aUFQ+rNvTIAcZuWGRT9a6f6Yrg9bHs4ImKF+HZCEK+plBvnAZYSIQztknZF2qnzNtr6F8s0+IuptdlQ==} engines: {node: ^14.13.1 || >=16.0.0} @@ -4327,9 +4568,17 @@ packages: resolution: {integrity: sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==} engines: {node: '>=8'} + refa@0.12.1: + resolution: {integrity: sha512-J8rn6v4DBb2nnFqkqwy6/NnTYMcgLA+sLr0iIO41qpv0n+ngb7ksag2tMRl0inb1bbO/esUwzW1vbJi7K0sI0g==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + regenerator-runtime@0.14.1: resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} + regexp-ast-analysis@0.7.1: + resolution: {integrity: sha512-sZuz1dYW/ZsfG17WSAG7eS85r5a0dDsvg+7BiiYR5o6lKCAtUrEwdmRmaGF6rwVj3LcmAeYkOWKEPlbPzN3Y3A==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + regexp-tree@0.1.27: resolution: {integrity: sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==} hasBin: true @@ -4338,10 +4587,6 @@ packages: resolution: {integrity: sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==} engines: {node: '>= 0.4'} - regexpp@3.2.0: - resolution: {integrity: sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==} - engines: {node: '>=8'} - regjsparser@0.10.0: resolution: {integrity: sha512-qx+xQGZVsy55CH0a1hiVwHmqjLryfh7wQyF5HO07XJ9f7dQMY/gPQHhlyDkIzJKC+x2fUCpCcUODUUUFrm7SHA==} hasBin: true @@ -4476,6 +4721,10 @@ packages: resolution: {integrity: sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw==} engines: {node: '>= 12.13.0'} + scslre@0.3.0: + resolution: {integrity: sha512-3A6sD0WYP7+QrjbfNA2FN3FsOaGGFoekCVgTyypy53gPxhbkCIjtO6YWgdrfM+n/8sI8JeXZOIxsHjMTNxQ4nQ==} + engines: {node: ^14.0.0 || >=16.0.0} + scule@1.0.0: resolution: {integrity: sha512-4AsO/FrViE/iDNEPaAQlb77tf0csuq27EsVpy6ett584EcRTp6pTDLoGWVxCD77y5iU5FauOvhsI4o1APwPoSQ==} @@ -4599,6 +4848,9 @@ packages: spdx-expression-parse@3.0.1: resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} + spdx-expression-parse@4.0.0: + resolution: {integrity: sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ==} + spdx-license-ids@3.0.16: resolution: {integrity: sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==} @@ -4703,6 +4955,10 @@ packages: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} + synckit@0.6.2: + resolution: {integrity: sha512-Vhf+bUa//YSTYKseDiiEuQmhGCoIF3CVBhunm3r/DQnYiGT4JssmnKQc44BIyOZRK2pKjXXAgbhfmbeoC9CJpA==} + engines: {node: '>=12.20'} + synckit@0.8.8: resolution: {integrity: sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==} engines: {node: ^14.18.0 || >=16.0.0} @@ -4753,11 +5009,6 @@ packages: engines: {node: '>=10'} hasBin: true - terser@5.31.0: - resolution: {integrity: sha512-Q1JFAoUKE5IMfI4Z/lkE/E6+SwgzO+x4tq4v1AyBLRj8VSYvRO6A/rQrPg1yud4g0En9EKI1TvFRF2tQFcoUkg==} - engines: {node: '>=10'} - hasBin: true - test-exclude@6.0.0: resolution: {integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==} engines: {node: '>=8'} @@ -4801,6 +5052,10 @@ packages: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} + toml-eslint-parser@0.9.3: + resolution: {integrity: sha512-moYoCvkNUAPCxSW9jmHmRElhm4tVJpHL8ItC/+uYD0EpPSFXbck7yREz9tNdJVTSpHVod8+HoipcpbQ0oE6gsw==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + tr46@0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} @@ -4827,6 +5082,12 @@ packages: peerDependencies: typescript: '>=4.2.0' + ts-api-utils@1.3.0: + resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} + engines: {node: '>=16'} + peerDependencies: + typescript: '>=4.2.0' + ts-interface-checker@0.1.13: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} @@ -4854,9 +5115,6 @@ packages: typescript: optional: true - tsconfig-paths@3.15.0: - resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==} - tslib@2.6.2: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} @@ -4896,6 +5154,10 @@ packages: resolution: {integrity: sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==} engines: {node: '>=10'} + type-fest@0.20.2: + resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} + engines: {node: '>=10'} + type-fest@0.6.0: resolution: {integrity: sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==} engines: {node: '>=8'} @@ -4952,6 +5214,10 @@ packages: unherit@3.0.1: resolution: {integrity: sha512-akOOQ/Yln8a2sgcLj4U0Jmx0R5jpIg2IUyRrWOzmEbjBtGzBdHtSeFKgoEcoH4KYIG/Pb8GQ/BwtYm0GCq1Sqg==} + unicorn-magic@0.1.0: + resolution: {integrity: sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==} + engines: {node: '>=18'} + unified@10.1.2: resolution: {integrity: sha512-pUSWAi/RAnVy1Pif2kAoeWNBa3JVrx0MId2LASj8G+7AiHWoKZNTomq6LG326T68U7/e263X6fTdcXIy7XnF7Q==} @@ -4976,6 +5242,9 @@ packages: unist-util-remove-position@5.0.0: resolution: {integrity: sha512-Hp5Kh3wLxv0PHj9m2yZhhLt58KzPtEYKQQ4yxfYFEO7EvHwzyDYnduhHnY1mDxoqr7VUwVuHXk9RXKIiYS1N8Q==} + unist-util-stringify-position@2.0.3: + resolution: {integrity: sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==} + unist-util-stringify-position@3.0.3: resolution: {integrity: sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg==} @@ -5115,6 +5384,12 @@ packages: jsdom: optional: true + vue-eslint-parser@9.4.2: + resolution: {integrity: sha512-Ry9oiGmCAK91HrKMtCrKFWmSFWvYkpGglCeFAIqDdr9zdXmMMpJOmUJS7WWsW7fX81h6mwHmUZCQQ1E0PkSwYQ==} + engines: {node: ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: '>=6.0.0' + watchpack@2.4.1: resolution: {integrity: sha512-8wrBCMtVhqcXP2Sup1ctSkga6uc2Bx0IIvKyT7yTFier5AXHooSI+QyQQAtTb7+E0IUCCKyTFmXqdqgum2XWGg==} engines: {node: '>=10.13.0'} @@ -5220,6 +5495,10 @@ packages: 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'} + y18n@4.0.3: resolution: {integrity: sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==} @@ -5236,6 +5515,10 @@ packages: yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + yaml-eslint-parser@1.2.2: + resolution: {integrity: sha512-pEwzfsKbTrB8G3xc/sN7aw1v6A6c/pKxLAkjclnAyo5g5qOh6eL9WGu0o3cSDQZKrTNk4KL4lQSwZW+nBkANEg==} + engines: {node: ^14.17.0 || >=16.0.0} + yaml@2.4.1: resolution: {integrity: sha512-pIXzoImaqmfOrL7teGUBt/T7ZDnyeGBWyXQBvOVhLkWLN37GXv8NMLK406UY6dS51JfcQHsmcW5cJ441bHg6Lg==} engines: {node: '>= 14'} @@ -5289,6 +5572,57 @@ snapshots: '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 + '@antfu/eslint-config@2.18.0(@vue/compiler-sfc@3.4.27)(eslint@9.3.0)(typescript@5.4.5)(vitest@1.6.0(@types/node@20.12.12)(terser@5.30.3))': + dependencies: + '@antfu/install-pkg': 0.3.3 + '@clack/prompts': 0.7.0 + '@stylistic/eslint-plugin': 2.1.0(eslint@9.3.0)(typescript@5.4.5) + '@typescript-eslint/eslint-plugin': 7.9.0(@typescript-eslint/parser@7.9.0(eslint@9.3.0)(typescript@5.4.5))(eslint@9.3.0)(typescript@5.4.5) + '@typescript-eslint/parser': 7.9.0(eslint@9.3.0)(typescript@5.4.5) + eslint: 9.3.0 + eslint-config-flat-gitignore: 0.1.5 + eslint-flat-config-utils: 0.2.5 + eslint-merge-processors: 0.1.0(eslint@9.3.0) + eslint-plugin-antfu: 2.2.0(eslint@9.3.0) + eslint-plugin-command: 0.2.3(eslint@9.3.0) + eslint-plugin-eslint-comments: 3.2.0(eslint@9.3.0) + eslint-plugin-import-x: 0.5.0(eslint@9.3.0)(typescript@5.4.5) + eslint-plugin-jsdoc: 48.2.5(eslint@9.3.0) + eslint-plugin-jsonc: 2.15.1(eslint@9.3.0) + eslint-plugin-markdown: 5.0.0(eslint@9.3.0) + eslint-plugin-n: 17.7.0(eslint@9.3.0) + eslint-plugin-no-only-tests: 3.1.0 + eslint-plugin-perfectionist: 2.10.0(eslint@9.3.0)(typescript@5.4.5)(vue-eslint-parser@9.4.2(eslint@9.3.0)) + eslint-plugin-regexp: 2.5.0(eslint@9.3.0) + eslint-plugin-toml: 0.11.0(eslint@9.3.0) + eslint-plugin-unicorn: 52.0.0(eslint@9.3.0) + eslint-plugin-unused-imports: 3.2.0(@typescript-eslint/eslint-plugin@7.9.0(@typescript-eslint/parser@7.9.0(eslint@9.3.0)(typescript@5.4.5))(eslint@9.3.0)(typescript@5.4.5))(eslint@9.3.0) + eslint-plugin-vitest: 0.5.4(@typescript-eslint/eslint-plugin@7.9.0(@typescript-eslint/parser@7.9.0(eslint@9.3.0)(typescript@5.4.5))(eslint@9.3.0)(typescript@5.4.5))(eslint@9.3.0)(typescript@5.4.5)(vitest@1.6.0(@types/node@20.12.12)(terser@5.30.3)) + eslint-plugin-vue: 9.26.0(eslint@9.3.0) + eslint-plugin-yml: 1.14.0(eslint@9.3.0) + eslint-processor-vue-blocks: 0.1.2(@vue/compiler-sfc@3.4.27)(eslint@9.3.0) + globals: 15.2.0 + jsonc-eslint-parser: 2.4.0 + local-pkg: 0.5.0 + parse-gitignore: 2.0.0 + picocolors: 1.0.0 + toml-eslint-parser: 0.9.3 + vue-eslint-parser: 9.4.2(eslint@9.3.0) + yaml-eslint-parser: 1.2.2 + yargs: 17.7.2 + transitivePeerDependencies: + - '@vue/compiler-sfc' + - supports-color + - svelte + - typescript + - vitest + + '@antfu/install-pkg@0.3.3': + dependencies: + '@jsdevtools/ez-spawn': 3.0.4 + + '@antfu/utils@0.7.8': {} + '@ast-core/escape@1.0.1': {} '@astrojs/compiler@2.8.0': {} @@ -5733,6 +6067,17 @@ snapshots: human-id: 1.0.2 prettier: 2.8.8 + '@clack/core@0.3.4': + dependencies: + picocolors: 1.0.0 + sisteransi: 1.0.5 + + '@clack/prompts@0.7.0': + dependencies: + '@clack/core': 0.3.4 + picocolors: 1.0.0 + sisteransi: 1.0.5 + '@cspotcode/source-map-support@0.8.1': dependencies: '@jridgewell/trace-mapping': 0.3.9 @@ -5742,8 +6087,17 @@ snapshots: tslib: 2.6.2 optional: true - '@esbuild/aix-ppc64@0.19.12': - optional: true + '@es-joy/jsdoccomment@0.43.0': + dependencies: + '@types/eslint': 8.56.10 + '@types/estree': 1.0.5 + '@typescript-eslint/types': 7.9.0 + comment-parser: 1.4.1 + esquery: 1.5.0 + jsdoc-type-pratt-parser: 4.0.0 + + '@esbuild/aix-ppc64@0.19.12': + optional: true '@esbuild/aix-ppc64@0.20.2': optional: true @@ -6088,6 +6442,20 @@ snapshots: '@eslint-community/regexpp@4.10.0': {} + '@eslint/eslintrc@2.1.4': + dependencies: + ajv: 6.12.6 + debug: 4.3.4 + 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 + '@eslint/eslintrc@3.1.0': dependencies: ajv: 6.12.6 @@ -6118,6 +6486,38 @@ snapshots: '@humanwhocodes/retry@0.3.0': {} + '@icebreakers/eslint-config@0.2.0(@types/eslint@8.56.10)(@vue/compiler-sfc@3.4.27)(eslint@9.3.0)(prettier@2.8.8)(tailwindcss@3.4.3(ts-node@10.9.2(@types/node@20.12.12)(typescript@5.4.5)))(typescript@5.4.5)(vitest@1.6.0(@types/node@20.12.12)(terser@5.30.3))': + dependencies: + '@antfu/eslint-config': 2.18.0(@vue/compiler-sfc@3.4.27)(eslint@9.3.0)(typescript@5.4.5)(vitest@1.6.0(@types/node@20.12.12)(terser@5.30.3)) + '@eslint/eslintrc': 3.1.0 + eslint-config-prettier: 9.1.0(eslint@9.3.0) + eslint-plugin-prettier: 5.1.3(@types/eslint@8.56.10)(eslint-config-prettier@9.1.0(eslint@9.3.0))(eslint@9.3.0)(prettier@2.8.8) + eslint-plugin-tailwindcss: 3.15.2(tailwindcss@3.4.3(ts-node@10.9.2(@types/node@20.12.12)(typescript@5.4.5))) + local-pkg: 0.5.0 + transitivePeerDependencies: + - '@eslint-react/eslint-plugin' + - '@prettier/plugin-xml' + - '@types/eslint' + - '@unocss/eslint-plugin' + - '@vue/compiler-sfc' + - astro-eslint-parser + - eslint + - eslint-plugin-astro + - eslint-plugin-format + - eslint-plugin-react-hooks + - eslint-plugin-react-refresh + - eslint-plugin-solid + - eslint-plugin-svelte + - prettier + - prettier-plugin-astro + - prettier-plugin-slidev + - supports-color + - svelte + - svelte-eslint-parser + - tailwindcss + - typescript + - vitest + '@img/sharp-darwin-arm64@0.33.4': optionalDependencies: '@img/sharp-libvips-darwin-arm64': 1.0.2 @@ -6385,6 +6785,53 @@ snapshots: '@sinclair/typebox@0.27.8': {} + '@stylistic/eslint-plugin-js@2.1.0(eslint@9.3.0)': + dependencies: + '@types/eslint': 8.56.10 + acorn: 8.11.3 + eslint: 9.3.0 + eslint-visitor-keys: 4.0.0 + espree: 10.0.1 + + '@stylistic/eslint-plugin-jsx@2.1.0(eslint@9.3.0)': + dependencies: + '@stylistic/eslint-plugin-js': 2.1.0(eslint@9.3.0) + '@types/eslint': 8.56.10 + eslint: 9.3.0 + estraverse: 5.3.0 + picomatch: 4.0.2 + + '@stylistic/eslint-plugin-plus@2.1.0(eslint@9.3.0)(typescript@5.4.5)': + dependencies: + '@types/eslint': 8.56.10 + '@typescript-eslint/utils': 7.9.0(eslint@9.3.0)(typescript@5.4.5) + eslint: 9.3.0 + transitivePeerDependencies: + - supports-color + - typescript + + '@stylistic/eslint-plugin-ts@2.1.0(eslint@9.3.0)(typescript@5.4.5)': + dependencies: + '@stylistic/eslint-plugin-js': 2.1.0(eslint@9.3.0) + '@types/eslint': 8.56.10 + '@typescript-eslint/utils': 7.9.0(eslint@9.3.0)(typescript@5.4.5) + eslint: 9.3.0 + transitivePeerDependencies: + - supports-color + - typescript + + '@stylistic/eslint-plugin@2.1.0(eslint@9.3.0)(typescript@5.4.5)': + dependencies: + '@stylistic/eslint-plugin-js': 2.1.0(eslint@9.3.0) + '@stylistic/eslint-plugin-jsx': 2.1.0(eslint@9.3.0) + '@stylistic/eslint-plugin-plus': 2.1.0(eslint@9.3.0)(typescript@5.4.5) + '@stylistic/eslint-plugin-ts': 2.1.0(eslint@9.3.0)(typescript@5.4.5) + '@types/eslint': 8.56.10 + eslint: 9.3.0 + transitivePeerDependencies: + - supports-color + - typescript + '@tsconfig/node10@1.0.9': {} '@tsconfig/node12@1.0.11': {} @@ -6445,7 +6892,6 @@ snapshots: dependencies: '@types/estree': 1.0.5 '@types/json-schema': 7.0.15 - optional: true '@types/eslint@8.56.8': dependencies: @@ -6462,8 +6908,6 @@ snapshots: '@types/json-schema@7.0.15': {} - '@types/json5@0.0.29': {} - '@types/loader-runner@2.2.8': dependencies: '@types/node': 20.12.12 @@ -6479,6 +6923,10 @@ snapshots: '@types/lodash@4.14.202': {} + '@types/mdast@3.0.15': + dependencies: + '@types/unist': 2.0.10 + '@types/mdast@4.0.4': dependencies: '@types/unist': 3.0.2 @@ -6536,32 +6984,30 @@ snapshots: anymatch: 3.1.3 source-map: 0.6.1 - '@typescript-eslint/eslint-plugin@6.15.0(@typescript-eslint/parser@6.15.0(eslint@9.3.0)(typescript@5.4.5))(eslint@9.3.0)(typescript@5.4.5)': + '@typescript-eslint/eslint-plugin@7.9.0(@typescript-eslint/parser@7.9.0(eslint@9.3.0)(typescript@5.4.5))(eslint@9.3.0)(typescript@5.4.5)': dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 6.15.0(eslint@9.3.0)(typescript@5.4.5) - '@typescript-eslint/scope-manager': 6.15.0 - '@typescript-eslint/type-utils': 6.15.0(eslint@9.3.0)(typescript@5.4.5) - '@typescript-eslint/utils': 6.15.0(eslint@9.3.0)(typescript@5.4.5) - '@typescript-eslint/visitor-keys': 6.15.0 - debug: 4.3.4 + '@typescript-eslint/parser': 7.9.0(eslint@9.3.0)(typescript@5.4.5) + '@typescript-eslint/scope-manager': 7.9.0 + '@typescript-eslint/type-utils': 7.9.0(eslint@9.3.0)(typescript@5.4.5) + '@typescript-eslint/utils': 7.9.0(eslint@9.3.0)(typescript@5.4.5) + '@typescript-eslint/visitor-keys': 7.9.0 eslint: 9.3.0 graphemer: 1.4.0 - ignore: 5.3.0 + ignore: 5.3.1 natural-compare: 1.4.0 - semver: 7.6.2 - ts-api-utils: 1.0.3(typescript@5.4.5) + ts-api-utils: 1.3.0(typescript@5.4.5) optionalDependencies: typescript: 5.4.5 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@6.15.0(eslint@9.3.0)(typescript@5.4.5)': + '@typescript-eslint/parser@7.9.0(eslint@9.3.0)(typescript@5.4.5)': dependencies: - '@typescript-eslint/scope-manager': 6.15.0 - '@typescript-eslint/types': 6.15.0 - '@typescript-eslint/typescript-estree': 6.15.0(typescript@5.4.5) - '@typescript-eslint/visitor-keys': 6.15.0 + '@typescript-eslint/scope-manager': 7.9.0 + '@typescript-eslint/types': 7.9.0 + '@typescript-eslint/typescript-estree': 7.9.0(typescript@5.4.5) + '@typescript-eslint/visitor-keys': 7.9.0 debug: 4.3.4 eslint: 9.3.0 optionalDependencies: @@ -6574,13 +7020,18 @@ snapshots: '@typescript-eslint/types': 6.15.0 '@typescript-eslint/visitor-keys': 6.15.0 - '@typescript-eslint/type-utils@6.15.0(eslint@9.3.0)(typescript@5.4.5)': + '@typescript-eslint/scope-manager@7.9.0': dependencies: - '@typescript-eslint/typescript-estree': 6.15.0(typescript@5.4.5) - '@typescript-eslint/utils': 6.15.0(eslint@9.3.0)(typescript@5.4.5) + '@typescript-eslint/types': 7.9.0 + '@typescript-eslint/visitor-keys': 7.9.0 + + '@typescript-eslint/type-utils@7.9.0(eslint@9.3.0)(typescript@5.4.5)': + dependencies: + '@typescript-eslint/typescript-estree': 7.9.0(typescript@5.4.5) + '@typescript-eslint/utils': 7.9.0(eslint@9.3.0)(typescript@5.4.5) debug: 4.3.4 eslint: 9.3.0 - ts-api-utils: 1.0.3(typescript@5.4.5) + ts-api-utils: 1.3.0(typescript@5.4.5) optionalDependencies: typescript: 5.4.5 transitivePeerDependencies: @@ -6588,6 +7039,8 @@ snapshots: '@typescript-eslint/types@6.15.0': {} + '@typescript-eslint/types@7.9.0': {} + '@typescript-eslint/typescript-estree@6.15.0(typescript@5.4.5)': dependencies: '@typescript-eslint/types': 6.15.0 @@ -6602,6 +7055,21 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/typescript-estree@7.9.0(typescript@5.4.5)': + dependencies: + '@typescript-eslint/types': 7.9.0 + '@typescript-eslint/visitor-keys': 7.9.0 + debug: 4.3.4 + globby: 11.1.0 + is-glob: 4.0.3 + minimatch: 9.0.4 + semver: 7.6.2 + ts-api-utils: 1.3.0(typescript@5.4.5) + optionalDependencies: + typescript: 5.4.5 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/utils@6.15.0(eslint@9.3.0)(typescript@5.4.5)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.3.0) @@ -6616,14 +7084,30 @@ snapshots: - supports-color - typescript + '@typescript-eslint/utils@7.9.0(eslint@9.3.0)(typescript@5.4.5)': + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@9.3.0) + '@typescript-eslint/scope-manager': 7.9.0 + '@typescript-eslint/types': 7.9.0 + '@typescript-eslint/typescript-estree': 7.9.0(typescript@5.4.5) + eslint: 9.3.0 + transitivePeerDependencies: + - supports-color + - typescript + '@typescript-eslint/visitor-keys@6.15.0': dependencies: '@typescript-eslint/types': 6.15.0 eslint-visitor-keys: 3.4.3 + '@typescript-eslint/visitor-keys@7.9.0': + dependencies: + '@typescript-eslint/types': 7.9.0 + eslint-visitor-keys: 3.4.3 + '@ungap/structured-clone@1.2.0': {} - '@vitest/coverage-v8@1.6.0(vitest@1.6.0(@types/node@20.12.12)(terser@5.31.0))': + '@vitest/coverage-v8@1.6.0(vitest@1.6.0(@types/node@20.12.12)(terser@5.30.3))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -6638,7 +7122,7 @@ snapshots: std-env: 3.7.0 strip-literal: 2.1.0 test-exclude: 6.0.0 - vitest: 1.6.0(@types/node@20.12.12)(terser@5.31.0) + vitest: 1.6.0(@types/node@20.12.12)(terser@5.30.3) transitivePeerDependencies: - supports-color @@ -6862,6 +7346,8 @@ snapshots: normalize-path: 3.0.0 picomatch: 2.3.1 + are-docs-informative@0.0.2: {} + arg@4.1.3: {} arg@5.0.2: {} @@ -6881,26 +7367,10 @@ snapshots: call-bind: 1.0.2 is-array-buffer: 3.0.2 - array-includes@3.1.7: - dependencies: - call-bind: 1.0.5 - define-properties: 1.2.1 - es-abstract: 1.22.3 - get-intrinsic: 1.2.2 - is-string: 1.0.7 - array-iterate@2.0.1: {} array-union@2.1.0: {} - array.prototype.findlastindex@1.2.3: - dependencies: - call-bind: 1.0.5 - define-properties: 1.2.1 - es-abstract: 1.22.3 - es-shim-unscopables: 1.0.2 - get-intrinsic: 1.2.2 - array.prototype.flat@1.3.2: dependencies: call-bind: 1.0.5 @@ -6908,13 +7378,6 @@ snapshots: es-abstract: 1.22.3 es-shim-unscopables: 1.0.2 - array.prototype.flatmap@1.3.2: - dependencies: - call-bind: 1.0.5 - define-properties: 1.2.1 - es-abstract: 1.22.3 - es-shim-unscopables: 1.0.2 - arraybuffer.prototype.slice@1.0.2: dependencies: array-buffer-byte-length: 1.0.0 @@ -6929,7 +7392,7 @@ snapshots: assertion-error@1.1.0: {} - astro@4.8.6(@types/node@20.12.12)(terser@5.31.0)(typescript@5.4.5): + astro@4.8.6(@types/node@20.12.12)(terser@5.30.3)(typescript@5.4.5): dependencies: '@astrojs/compiler': 2.8.0 '@astrojs/internal-helpers': 0.4.0 @@ -6988,8 +7451,8 @@ snapshots: tsconfck: 3.0.3(typescript@5.4.5) unist-util-visit: 5.0.0 vfile: 6.0.1 - vite: 5.2.11(@types/node@20.12.12)(terser@5.31.0) - vitefu: 0.2.5(vite@5.2.11(@types/node@20.12.12)(terser@5.31.0)) + vite: 5.2.11(@types/node@20.12.12)(terser@5.30.3) + vitefu: 0.2.5(vite@5.2.11(@types/node@20.12.12)(terser@5.30.3)) which-pm: 2.2.0 yargs-parser: 21.1.1 zod: 3.23.8 @@ -7068,10 +7531,6 @@ snapshots: builtin-modules@3.3.0: {} - builtins@5.0.1: - dependencies: - semver: 7.6.2 - bumpp@9.4.1: dependencies: '@jsdevtools/ez-spawn': 3.0.4 @@ -7166,10 +7625,16 @@ snapshots: character-entities-html4@2.1.0: {} + character-entities-legacy@1.1.4: {} + character-entities-legacy@3.0.0: {} + character-entities@1.2.4: {} + character-entities@2.0.2: {} + character-reference-invalid@1.1.4: {} + chardet@0.7.0: {} check-error@1.0.3: @@ -7272,6 +7737,8 @@ snapshots: commander@8.3.0: {} + comment-parser@1.4.1: {} + common-ancestor-path@1.0.1: {} commondir@1.0.1: {} @@ -7288,6 +7755,10 @@ snapshots: cookie@0.6.0: {} + core-js-compat@3.37.1: + dependencies: + browserslist: 4.23.0 + cosmiconfig@9.0.0(typescript@5.4.5): dependencies: env-paths: 2.2.1 @@ -7456,7 +7927,7 @@ snapshots: dlv@1.1.3: {} - doctrine@2.1.0: + doctrine@3.0.0: dependencies: esutils: 2.0.3 @@ -7505,11 +7976,6 @@ snapshots: emojis-list@3.0.0: {} - enhanced-resolve@5.15.0: - dependencies: - graceful-fs: 4.2.11 - tapable: 2.2.1 - enhanced-resolve@5.16.0: dependencies: graceful-fs: 4.2.11 @@ -7732,35 +8198,24 @@ snapshots: dependencies: eslint: 9.3.0 - eslint-config-icebreaker@1.2.3(eslint@9.3.0)(typescript@5.4.5): + eslint-compat-utils@0.5.0(eslint@9.3.0): dependencies: - '@typescript-eslint/eslint-plugin': 6.15.0(@typescript-eslint/parser@6.15.0(eslint@9.3.0)(typescript@5.4.5))(eslint@9.3.0)(typescript@5.4.5) - '@typescript-eslint/parser': 6.15.0(eslint@9.3.0)(typescript@5.4.5) eslint: 9.3.0 - eslint-config-prettier: 9.1.0(eslint@9.3.0) - eslint-config-standard: 17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.15.0(eslint@9.3.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@9.3.0))(eslint-plugin-n@16.4.0(eslint@9.3.0))(eslint-plugin-promise@6.1.1(eslint@9.3.0))(eslint@9.3.0) - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.15.0(eslint@9.3.0)(typescript@5.4.5))(eslint-plugin-import@2.29.1)(eslint@9.3.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.15.0(eslint@9.3.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@9.3.0) - eslint-plugin-n: 16.4.0(eslint@9.3.0) - eslint-plugin-node: 11.1.0(eslint@9.3.0) - eslint-plugin-promise: 6.1.1(eslint@9.3.0) - eslint-plugin-unicorn: 49.0.0(eslint@9.3.0) - typescript: 5.4.5 - transitivePeerDependencies: - - eslint-import-resolver-node - - eslint-import-resolver-webpack - - supports-color + semver: 7.6.2 + + eslint-config-flat-gitignore@0.1.5: + dependencies: + find-up: 7.0.0 + parse-gitignore: 2.0.0 eslint-config-prettier@9.1.0(eslint@9.3.0): dependencies: eslint: 9.3.0 - eslint-config-standard@17.1.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.15.0(eslint@9.3.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@9.3.0))(eslint-plugin-n@16.4.0(eslint@9.3.0))(eslint-plugin-promise@6.1.1(eslint@9.3.0))(eslint@9.3.0): + eslint-flat-config-utils@0.2.5: dependencies: - eslint: 9.3.0 - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.15.0(eslint@9.3.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@9.3.0) - eslint-plugin-n: 16.4.0(eslint@9.3.0) - eslint-plugin-promise: 6.1.1(eslint@9.3.0) + '@types/eslint': 8.56.10 + pathe: 1.1.2 eslint-import-resolver-node@0.3.9: dependencies: @@ -7770,33 +8225,19 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.15.0(eslint@9.3.0)(typescript@5.4.5))(eslint-plugin-import@2.29.1)(eslint@9.3.0): + eslint-merge-processors@0.1.0(eslint@9.3.0): dependencies: - debug: 4.3.4 - enhanced-resolve: 5.15.0 eslint: 9.3.0 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.15.0(eslint@9.3.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.15.0(eslint@9.3.0)(typescript@5.4.5))(eslint-plugin-import@2.29.1)(eslint@9.3.0))(eslint@9.3.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.15.0(eslint@9.3.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@9.3.0) - fast-glob: 3.3.2 - get-tsconfig: 4.7.2 - is-core-module: 2.13.1 - is-glob: 4.0.3 - transitivePeerDependencies: - - '@typescript-eslint/parser' - - eslint-import-resolver-node - - eslint-import-resolver-webpack - - supports-color - eslint-module-utils@2.8.0(@typescript-eslint/parser@6.15.0(eslint@9.3.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.15.0(eslint@9.3.0)(typescript@5.4.5))(eslint-plugin-import@2.29.1)(eslint@9.3.0))(eslint@9.3.0): + eslint-plugin-antfu@2.2.0(eslint@9.3.0): dependencies: - debug: 3.2.7 - optionalDependencies: - '@typescript-eslint/parser': 6.15.0(eslint@9.3.0)(typescript@5.4.5) + '@antfu/utils': 0.7.8 + eslint: 9.3.0 + + eslint-plugin-command@0.2.3(eslint@9.3.0): + dependencies: + '@es-joy/jsdoccomment': 0.43.0 eslint: 9.3.0 - eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.15.0(eslint@9.3.0)(typescript@5.4.5))(eslint-plugin-import@2.29.1)(eslint@9.3.0) - transitivePeerDependencies: - - supports-color eslint-plugin-es-x@7.5.0(eslint@9.3.0): dependencies: @@ -7805,83 +8246,131 @@ snapshots: eslint: 9.3.0 eslint-compat-utils: 0.1.2(eslint@9.3.0) - eslint-plugin-es@3.0.1(eslint@9.3.0): + eslint-plugin-eslint-comments@3.2.0(eslint@9.3.0): dependencies: + escape-string-regexp: 1.0.5 eslint: 9.3.0 - eslint-utils: 2.1.0 - regexpp: 3.2.0 + ignore: 5.3.1 - eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.15.0(eslint@9.3.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@9.3.0): + eslint-plugin-import-x@0.5.0(eslint@9.3.0)(typescript@5.4.5): dependencies: - array-includes: 3.1.7 - array.prototype.findlastindex: 1.2.3 - array.prototype.flat: 1.3.2 - array.prototype.flatmap: 1.3.2 - debug: 3.2.7 - doctrine: 2.1.0 + '@typescript-eslint/utils': 7.9.0(eslint@9.3.0)(typescript@5.4.5) + debug: 4.3.4 + doctrine: 3.0.0 eslint: 9.3.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.15.0(eslint@9.3.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.15.0(eslint@9.3.0)(typescript@5.4.5))(eslint-plugin-import@2.29.1)(eslint@9.3.0))(eslint@9.3.0) - hasown: 2.0.0 - is-core-module: 2.13.1 + get-tsconfig: 4.7.5 is-glob: 4.0.3 - minimatch: 3.1.2 - object.fromentries: 2.0.7 - object.groupby: 1.0.1 - object.values: 1.1.7 - semver: 6.3.1 - tsconfig-paths: 3.15.0 - optionalDependencies: - '@typescript-eslint/parser': 6.15.0(eslint@9.3.0)(typescript@5.4.5) + minimatch: 9.0.4 + semver: 7.6.2 + transitivePeerDependencies: + - supports-color + - typescript + + eslint-plugin-jsdoc@48.2.5(eslint@9.3.0): + dependencies: + '@es-joy/jsdoccomment': 0.43.0 + are-docs-informative: 0.0.2 + comment-parser: 1.4.1 + debug: 4.3.4 + escape-string-regexp: 4.0.0 + eslint: 9.3.0 + esquery: 1.5.0 + is-builtin-module: 3.2.1 + semver: 7.6.2 + spdx-expression-parse: 4.0.0 + transitivePeerDependencies: + - supports-color + + eslint-plugin-jsonc@2.15.1(eslint@9.3.0): + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@9.3.0) + eslint: 9.3.0 + eslint-compat-utils: 0.5.0(eslint@9.3.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@9.3.0): + dependencies: + eslint: 9.3.0 + mdast-util-from-markdown: 0.8.5 transitivePeerDependencies: - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - supports-color - eslint-plugin-n@16.4.0(eslint@9.3.0): + eslint-plugin-n@17.7.0(eslint@9.3.0): dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.3.0) - builtins: 5.0.1 + enhanced-resolve: 5.16.0 eslint: 9.3.0 eslint-plugin-es-x: 7.5.0(eslint@9.3.0) get-tsconfig: 4.7.2 - ignore: 5.3.0 - is-builtin-module: 3.2.1 - is-core-module: 2.13.1 - minimatch: 3.1.2 - resolve: 1.22.8 + globals: 15.2.0 + ignore: 5.3.1 + minimatch: 9.0.4 semver: 7.6.2 - eslint-plugin-node@11.1.0(eslint@9.3.0): + eslint-plugin-no-only-tests@3.1.0: {} + + eslint-plugin-perfectionist@2.10.0(eslint@9.3.0)(typescript@5.4.5)(vue-eslint-parser@9.4.2(eslint@9.3.0)): dependencies: + '@typescript-eslint/utils': 6.15.0(eslint@9.3.0)(typescript@5.4.5) eslint: 9.3.0 - eslint-plugin-es: 3.0.1(eslint@9.3.0) - eslint-utils: 2.1.0 - ignore: 5.3.0 - minimatch: 3.1.2 - resolve: 1.22.8 - semver: 6.3.1 + minimatch: 9.0.4 + natural-compare-lite: 1.4.0 + optionalDependencies: + vue-eslint-parser: 9.4.2(eslint@9.3.0) + transitivePeerDependencies: + - supports-color + - typescript - eslint-plugin-prettier@5.1.3(@types/eslint@8.56.10)(eslint-config-prettier@9.1.0(eslint@9.3.0))(eslint@9.3.0)(prettier@3.2.5): + eslint-plugin-prettier@5.1.3(@types/eslint@8.56.10)(eslint-config-prettier@9.1.0(eslint@9.3.0))(eslint@9.3.0)(prettier@2.8.8): dependencies: eslint: 9.3.0 - prettier: 3.2.5 + prettier: 2.8.8 prettier-linter-helpers: 1.0.0 synckit: 0.8.8 optionalDependencies: '@types/eslint': 8.56.10 eslint-config-prettier: 9.1.0(eslint@9.3.0) - eslint-plugin-promise@6.1.1(eslint@9.3.0): + eslint-plugin-regexp@2.5.0(eslint@9.3.0): + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@9.3.0) + '@eslint-community/regexpp': 4.10.0 + comment-parser: 1.4.1 + eslint: 9.3.0 + jsdoc-type-pratt-parser: 4.0.0 + refa: 0.12.1 + regexp-ast-analysis: 0.7.1 + scslre: 0.3.0 + + eslint-plugin-tailwindcss@3.15.2(tailwindcss@3.4.3(ts-node@10.9.2(@types/node@20.12.12)(typescript@5.4.5))): dependencies: + fast-glob: 3.3.2 + postcss: 8.4.38 + tailwindcss: 3.4.3(ts-node@10.9.2(@types/node@20.12.12)(typescript@5.4.5)) + + eslint-plugin-toml@0.11.0(eslint@9.3.0): + dependencies: + debug: 4.3.4 eslint: 9.3.0 + eslint-compat-utils: 0.5.0(eslint@9.3.0) + lodash: 4.17.21 + toml-eslint-parser: 0.9.3 + transitivePeerDependencies: + - supports-color - eslint-plugin-unicorn@49.0.0(eslint@9.3.0): + eslint-plugin-unicorn@52.0.0(eslint@9.3.0): dependencies: '@babel/helper-validator-identifier': 7.24.5 '@eslint-community/eslint-utils': 4.4.0(eslint@9.3.0) - ci-info: 3.9.0 + '@eslint/eslintrc': 2.1.4 + ci-info: 4.0.0 clean-regexp: 1.0.0 + core-js-compat: 3.37.1 eslint: 9.3.0 esquery: 1.5.0 indent-string: 4.0.0 @@ -7893,22 +8382,73 @@ snapshots: regjsparser: 0.10.0 semver: 7.6.2 strip-indent: 3.0.0 + transitivePeerDependencies: + - supports-color + + eslint-plugin-unused-imports@3.2.0(@typescript-eslint/eslint-plugin@7.9.0(@typescript-eslint/parser@7.9.0(eslint@9.3.0)(typescript@5.4.5))(eslint@9.3.0)(typescript@5.4.5))(eslint@9.3.0): + dependencies: + eslint: 9.3.0 + eslint-rule-composer: 0.3.0 + optionalDependencies: + '@typescript-eslint/eslint-plugin': 7.9.0(@typescript-eslint/parser@7.9.0(eslint@9.3.0)(typescript@5.4.5))(eslint@9.3.0)(typescript@5.4.5) + + eslint-plugin-vitest@0.5.4(@typescript-eslint/eslint-plugin@7.9.0(@typescript-eslint/parser@7.9.0(eslint@9.3.0)(typescript@5.4.5))(eslint@9.3.0)(typescript@5.4.5))(eslint@9.3.0)(typescript@5.4.5)(vitest@1.6.0(@types/node@20.12.12)(terser@5.30.3)): + dependencies: + '@typescript-eslint/utils': 7.9.0(eslint@9.3.0)(typescript@5.4.5) + eslint: 9.3.0 + optionalDependencies: + '@typescript-eslint/eslint-plugin': 7.9.0(@typescript-eslint/parser@7.9.0(eslint@9.3.0)(typescript@5.4.5))(eslint@9.3.0)(typescript@5.4.5) + vitest: 1.6.0(@types/node@20.12.12)(terser@5.30.3) + transitivePeerDependencies: + - supports-color + - typescript + + eslint-plugin-vue@9.26.0(eslint@9.3.0): + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@9.3.0) + eslint: 9.3.0 + globals: 13.24.0 + natural-compare: 1.4.0 + nth-check: 2.1.1 + postcss-selector-parser: 6.0.16 + semver: 7.6.2 + vue-eslint-parser: 9.4.2(eslint@9.3.0) + xml-name-validator: 4.0.0 + transitivePeerDependencies: + - supports-color + + eslint-plugin-yml@1.14.0(eslint@9.3.0): + dependencies: + debug: 4.3.4 + eslint: 9.3.0 + eslint-compat-utils: 0.5.0(eslint@9.3.0) + lodash: 4.17.21 + natural-compare: 1.4.0 + yaml-eslint-parser: 1.2.2 + transitivePeerDependencies: + - supports-color + + eslint-processor-vue-blocks@0.1.2(@vue/compiler-sfc@3.4.27)(eslint@9.3.0): + dependencies: + '@vue/compiler-sfc': 3.4.27 + eslint: 9.3.0 + + eslint-rule-composer@0.3.0: {} eslint-scope@5.1.1: dependencies: esrecurse: 4.3.0 estraverse: 4.3.0 - eslint-scope@8.0.1: + eslint-scope@7.2.2: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 - eslint-utils@2.1.0: + eslint-scope@8.0.1: dependencies: - eslint-visitor-keys: 1.3.0 - - eslint-visitor-keys@1.3.0: {} + esrecurse: 4.3.0 + estraverse: 5.3.0 eslint-visitor-keys@3.4.3: {} @@ -7959,6 +8499,12 @@ snapshots: acorn-jsx: 5.3.2(acorn@8.11.3) eslint-visitor-keys: 4.0.0 + espree@9.6.1: + dependencies: + acorn: 8.11.3 + acorn-jsx: 5.3.2(acorn@8.11.3) + eslint-visitor-keys: 3.4.3 + esprima@4.0.1: {} esquery@1.5.0: @@ -8071,6 +8617,12 @@ snapshots: locate-path: 6.0.0 path-exists: 4.0.0 + find-up@7.0.0: + dependencies: + locate-path: 7.2.0 + path-exists: 5.0.0 + unicorn-magic: 0.1.0 + find-yarn-workspace-root2@1.2.16: dependencies: micromatch: 4.0.5 @@ -8169,6 +8721,10 @@ snapshots: dependencies: resolve-pkg-maps: 1.0.0 + get-tsconfig@4.7.5: + dependencies: + resolve-pkg-maps: 1.0.0 + giget@1.2.3: dependencies: citty: 0.1.6 @@ -8219,8 +8775,14 @@ snapshots: globals@11.12.0: {} + globals@13.24.0: + dependencies: + type-fest: 0.20.2 + globals@14.0.0: {} + globals@15.2.0: {} + globalthis@1.0.3: dependencies: define-properties: 1.2.0 @@ -8468,6 +9030,13 @@ snapshots: hasown: 2.0.0 side-channel: 1.0.4 + is-alphabetical@1.0.4: {} + + is-alphanumerical@1.0.4: + dependencies: + is-alphabetical: 1.0.4 + is-decimal: 1.0.4 + is-array-buffer@3.0.2: dependencies: call-bind: 1.0.2 @@ -8512,6 +9081,8 @@ snapshots: dependencies: has-tostringtag: 1.0.0 + is-decimal@1.0.4: {} + is-docker@3.0.0: {} is-extendable@0.1.1: {} @@ -8524,6 +9095,8 @@ snapshots: dependencies: is-extglob: 2.1.1 + is-hexadecimal@1.0.4: {} + is-inside-container@1.0.0: dependencies: is-docker: 3.0.0 @@ -8651,6 +9224,8 @@ snapshots: dependencies: argparse: 2.0.1 + jsdoc-type-pratt-parser@4.0.0: {} + jsesc@0.5.0: {} jsesc@2.5.2: {} @@ -8673,12 +9248,15 @@ snapshots: json-stable-stringify-without-jsonify@1.0.1: {} - json5@1.0.2: - dependencies: - minimist: 1.2.8 - json5@2.2.3: {} + jsonc-eslint-parser@2.4.0: + dependencies: + acorn: 8.11.3 + eslint-visitor-keys: 3.4.3 + espree: 9.6.1 + semver: 7.6.2 + jsonfile@4.0.0: optionalDependencies: graceful-fs: 4.2.11 @@ -8740,6 +9318,10 @@ snapshots: dependencies: p-locate: 5.0.0 + locate-path@7.2.0: + dependencies: + p-locate: 6.0.0 + lodash-es@4.17.21: {} lodash.merge@4.6.2: {} @@ -8815,6 +9397,16 @@ snapshots: unist-util-is: 6.0.0 unist-util-visit-parents: 6.0.1 + mdast-util-from-markdown@0.8.5: + dependencies: + '@types/mdast': 3.0.15 + mdast-util-to-string: 2.0.0 + micromark: 2.11.4 + parse-entities: 2.0.0 + unist-util-stringify-position: 2.0.3 + transitivePeerDependencies: + - supports-color + mdast-util-from-markdown@2.0.0: dependencies: '@types/mdast': 4.0.4 @@ -8917,6 +9509,8 @@ snapshots: unist-util-visit: 5.0.0 zwitch: 2.0.4 + mdast-util-to-string@2.0.0: {} + mdast-util-to-string@4.0.0: dependencies: '@types/mdast': 4.0.4 @@ -9117,6 +9711,13 @@ snapshots: micromark-util-types@2.0.0: {} + micromark@2.11.4: + dependencies: + debug: 4.3.4 + parse-entities: 2.0.0 + transitivePeerDependencies: + - supports-color + micromark@4.0.0: dependencies: '@types/debug': 4.1.12 @@ -9180,8 +9781,6 @@ snapshots: is-plain-obj: 1.1.0 kind-of: 6.0.3 - minimist@1.2.8: {} - minipass@3.3.6: dependencies: yallist: 4.0.0 @@ -9250,6 +9849,8 @@ snapshots: nanoid@3.3.7: {} + natural-compare-lite@1.4.0: {} + natural-compare@1.4.0: {} neo-async@2.6.2: {} @@ -9321,25 +9922,6 @@ snapshots: has-symbols: 1.0.3 object-keys: 1.1.1 - object.fromentries@2.0.7: - dependencies: - call-bind: 1.0.5 - define-properties: 1.2.1 - es-abstract: 1.22.3 - - object.groupby@1.0.1: - dependencies: - call-bind: 1.0.5 - define-properties: 1.2.1 - es-abstract: 1.22.3 - get-intrinsic: 1.2.2 - - object.values@1.1.7: - dependencies: - call-bind: 1.0.5 - define-properties: 1.2.1 - es-abstract: 1.22.3 - ohash@1.1.3: {} once@1.4.0: @@ -9395,6 +9977,10 @@ snapshots: dependencies: yocto-queue: 0.1.0 + p-limit@4.0.0: + dependencies: + yocto-queue: 1.0.0 + p-limit@5.0.0: dependencies: yocto-queue: 1.0.0 @@ -9407,6 +9993,10 @@ snapshots: dependencies: p-limit: 3.1.0 + p-locate@6.0.0: + dependencies: + p-limit: 4.0.0 + p-map@2.1.0: {} p-map@5.5.0: @@ -9431,6 +10021,17 @@ snapshots: dependencies: callsites: 3.1.0 + parse-entities@2.0.0: + dependencies: + character-entities: 1.2.4 + character-entities-legacy: 1.1.4 + character-reference-invalid: 1.1.4 + is-alphanumerical: 1.0.4 + is-decimal: 1.0.4 + is-hexadecimal: 1.0.4 + + parse-gitignore@2.0.0: {} + parse-json@5.2.0: dependencies: '@babel/code-frame': 7.24.2 @@ -9455,6 +10056,8 @@ snapshots: path-exists@4.0.0: {} + path-exists@5.0.0: {} + path-is-absolute@1.0.1: {} path-key@3.1.1: {} @@ -9484,6 +10087,8 @@ snapshots: picomatch@2.3.1: {} + picomatch@4.0.2: {} + pify@2.3.0: {} pify@4.0.1: {} @@ -9587,8 +10192,6 @@ snapshots: prettier@2.8.8: {} - prettier@3.2.5: {} - pretty-bytes@6.1.1: {} pretty-error@4.0.0: @@ -9670,8 +10273,17 @@ snapshots: indent-string: 4.0.0 strip-indent: 3.0.0 + refa@0.12.1: + dependencies: + '@eslint-community/regexpp': 4.10.0 + regenerator-runtime@0.14.1: {} + regexp-ast-analysis@0.7.1: + dependencies: + '@eslint-community/regexpp': 4.10.0 + refa: 0.12.1 + regexp-tree@0.1.27: {} regexp.prototype.flags@1.5.1: @@ -9680,8 +10292,6 @@ snapshots: define-properties: 1.2.1 set-function-name: 2.0.1 - regexpp@3.2.0: {} - regjsparser@0.10.0: dependencies: jsesc: 0.5.0 @@ -9887,6 +10497,12 @@ snapshots: ajv-formats: 2.1.1 ajv-keywords: 5.1.0(ajv@8.12.0) + scslre@0.3.0: + dependencies: + '@eslint-community/regexpp': 4.10.0 + refa: 0.12.1 + regexp-ast-analysis: 0.7.1 + scule@1.0.0: {} section-matter@1.0.0: @@ -10028,6 +10644,11 @@ snapshots: spdx-exceptions: 2.3.0 spdx-license-ids: 3.0.16 + spdx-expression-parse@4.0.0: + dependencies: + spdx-exceptions: 2.3.0 + spdx-license-ids: 3.0.16 + spdx-license-ids@3.0.16: {} sprintf-js@1.0.3: {} @@ -10135,6 +10756,10 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} + synckit@0.6.2: + dependencies: + tslib: 2.6.2 + synckit@0.8.8: dependencies: '@pkgr/core': 0.1.1 @@ -10207,14 +10832,6 @@ snapshots: commander: 2.20.3 source-map-support: 0.5.21 - terser@5.31.0: - dependencies: - '@jridgewell/source-map': 0.3.6 - acorn: 8.11.3 - commander: 2.20.3 - source-map-support: 0.5.21 - optional: true - test-exclude@6.0.0: dependencies: '@istanbuljs/schema': 0.1.3 @@ -10251,6 +10868,10 @@ snapshots: dependencies: is-number: 7.0.0 + toml-eslint-parser@0.9.3: + dependencies: + eslint-visitor-keys: 3.4.3 + tr46@0.0.3: {} tr46@1.0.1: @@ -10269,6 +10890,10 @@ snapshots: dependencies: typescript: 5.4.5 + ts-api-utils@1.3.0(typescript@5.4.5): + dependencies: + typescript: 5.4.5 + ts-interface-checker@0.1.13: {} ts-node@10.9.2(@types/node@20.12.12)(typescript@5.4.5): @@ -10293,13 +10918,6 @@ snapshots: optionalDependencies: typescript: 5.4.5 - tsconfig-paths@3.15.0: - dependencies: - '@types/json5': 0.0.29 - json5: 1.0.2 - minimist: 1.2.8 - strip-bom: 3.0.0 - tslib@2.6.2: {} tsup@8.0.2(postcss@8.4.38)(ts-node@10.9.2(@types/node@20.12.12)(typescript@5.4.5))(typescript@5.4.5): @@ -10343,6 +10961,8 @@ snapshots: type-fest@0.13.1: {} + type-fest@0.20.2: {} + type-fest@0.6.0: {} type-fest@0.8.1: {} @@ -10425,6 +11045,8 @@ snapshots: unherit@3.0.1: {} + unicorn-magic@0.1.0: {} + unified@10.1.2: dependencies: '@types/unist': 2.0.10 @@ -10472,6 +11094,10 @@ snapshots: '@types/unist': 3.0.2 unist-util-visit: 5.0.0 + unist-util-stringify-position@2.0.3: + dependencies: + '@types/unist': 2.0.10 + unist-util-stringify-position@3.0.3: dependencies: '@types/unist': 2.0.10 @@ -10578,13 +11204,13 @@ snapshots: unist-util-stringify-position: 4.0.0 vfile-message: 4.0.2 - vite-node@1.6.0(@types/node@20.12.12)(terser@5.31.0): + vite-node@1.6.0(@types/node@20.12.12)(terser@5.30.3): dependencies: cac: 6.7.14 debug: 4.3.4 pathe: 1.1.2 picocolors: 1.0.0 - vite: 5.2.11(@types/node@20.12.12)(terser@5.31.0) + vite: 5.2.11(@types/node@20.12.12)(terser@5.30.3) transitivePeerDependencies: - '@types/node' - less @@ -10595,7 +11221,7 @@ snapshots: - supports-color - terser - vite@5.2.11(@types/node@20.12.12)(terser@5.31.0): + vite@5.2.11(@types/node@20.12.12)(terser@5.30.3): dependencies: esbuild: 0.20.2 postcss: 8.4.38 @@ -10603,13 +11229,13 @@ snapshots: optionalDependencies: '@types/node': 20.12.12 fsevents: 2.3.3 - terser: 5.31.0 + terser: 5.30.3 - vitefu@0.2.5(vite@5.2.11(@types/node@20.12.12)(terser@5.31.0)): + vitefu@0.2.5(vite@5.2.11(@types/node@20.12.12)(terser@5.30.3)): optionalDependencies: - vite: 5.2.11(@types/node@20.12.12)(terser@5.31.0) + vite: 5.2.11(@types/node@20.12.12)(terser@5.30.3) - vitest@1.6.0(@types/node@20.12.12)(terser@5.31.0): + vitest@1.6.0(@types/node@20.12.12)(terser@5.30.3): dependencies: '@vitest/expect': 1.6.0 '@vitest/runner': 1.6.0 @@ -10628,8 +11254,8 @@ snapshots: strip-literal: 2.1.0 tinybench: 2.8.0 tinypool: 0.8.4 - vite: 5.2.11(@types/node@20.12.12)(terser@5.31.0) - vite-node: 1.6.0(@types/node@20.12.12)(terser@5.31.0) + vite: 5.2.11(@types/node@20.12.12)(terser@5.30.3) + vite-node: 1.6.0(@types/node@20.12.12)(terser@5.30.3) why-is-node-running: 2.2.2 optionalDependencies: '@types/node': 20.12.12 @@ -10642,6 +11268,19 @@ snapshots: - supports-color - terser + vue-eslint-parser@9.4.2(eslint@9.3.0): + dependencies: + debug: 4.3.4 + eslint: 9.3.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.6.2 + transitivePeerDependencies: + - supports-color + watchpack@2.4.1: dependencies: glob-to-regexp: 0.4.1 @@ -10790,6 +11429,8 @@ snapshots: wrappy@1.0.2: {} + xml-name-validator@4.0.0: {} + y18n@4.0.3: {} y18n@5.0.8: {} @@ -10800,6 +11441,12 @@ snapshots: yallist@4.0.0: {} + yaml-eslint-parser@1.2.2: + dependencies: + eslint-visitor-keys: 3.4.3 + lodash: 4.17.21 + yaml: 2.4.1 + yaml@2.4.1: {} yargs-parser@18.1.3: From 3ae870a19ba421303a2cef4d5060e04d02940d47 Mon Sep 17 00:00:00 2001 From: ice breaker <1324318532@qq.com> Date: Sun, 19 May 2024 18:33:52 +0800 Subject: [PATCH 2/2] chore: format source code --- eslint.config.mjs | 4 + package.json | 6 +- packages/config/build.config.ts | 8 +- packages/config/package.json | 38 +++---- packages/config/src/config.ts | 8 +- packages/config/src/defaults.ts | 13 +-- packages/config/test/index.test.ts | 12 +-- packages/config/tsconfig.json | 2 +- packages/config/vitest.config.ts | 8 +- packages/core/build.config.ts | 8 +- packages/core/package.json | 38 +++---- packages/core/src/css/index.ts | 4 +- packages/core/src/css/plugins.ts | 9 +- packages/core/src/ctx/index.ts | 10 +- packages/core/src/env.ts | 2 + packages/core/src/html/index.ts | 8 +- packages/core/src/js/index.ts | 27 ++--- packages/core/src/js/pre.ts | 93 ++++++++-------- packages/core/src/js/utils.ts | 2 +- packages/core/src/types.ts | 1 + packages/core/test/css.test.ts | 17 +-- packages/core/test/html.test.ts | 6 +- packages/core/test/js.test.ts | 100 +++++++++--------- packages/core/test/utils/index.ts | 6 +- packages/core/test/utils/svelte-to-tsx.ts | 11 +- packages/core/test/utils/vue-to-tsx.ts | 14 +-- packages/core/test/vue.test.ts | 39 +++---- packages/core/tsconfig.json | 2 +- packages/core/vitest.config.ts | 8 +- packages/shared/build.config.ts | 8 +- packages/shared/package.json | 38 +++---- packages/shared/src/classGenerator.ts | 10 +- packages/shared/src/regex.ts | 6 +- packages/shared/src/split.ts | 13 +-- packages/shared/src/utils.ts | 13 +-- packages/shared/test/reg.test.ts | 2 +- packages/shared/test/split.test.ts | 16 +-- packages/shared/tsconfig.json | 2 +- packages/shared/vitest.config.ts | 8 +- packages/tailwindcss-patch/bin/tw-patch.js | 1 + packages/tailwindcss-patch/build.config.ts | 8 +- packages/tailwindcss-patch/how-it-works.md | 12 +-- packages/tailwindcss-patch/package.json | 50 ++++----- packages/tailwindcss-patch/src/cli.ts | 6 +- packages/tailwindcss-patch/src/core/cache.ts | 21 ++-- .../src/core/exposeContext.ts | 4 +- .../tailwindcss-patch/src/core/inspector.ts | 76 ++++++------- .../tailwindcss-patch/src/core/postcss.ts | 16 +-- .../src/core/runtime-patcher.ts | 24 +++-- .../tailwindcss-patch/src/core/tw-patcher.ts | 14 +-- packages/tailwindcss-patch/src/defaults.ts | 4 +- packages/tailwindcss-patch/src/logger.ts | 2 +- packages/tailwindcss-patch/src/types.ts | 15 +-- packages/tailwindcss-patch/src/utils.ts | 8 +- packages/tailwindcss-patch/test/cache.test.ts | 20 ++-- .../tailwindcss-patch/test/config.test.ts | 10 +- .../tailwindcss-patch/test/context.test.ts | 7 +- .../test/exposeContext.test.ts | 1 + packages/tailwindcss-patch/test/index.test.ts | 9 +- .../tailwindcss-patch/test/inspector.test.ts | 1 + .../tailwindcss-patch/test/postcss.test.ts | 18 ++-- .../test/runtime-patcher.test.ts | 2 +- .../tailwindcss-patch/test/tw-patcher.test.ts | 13 +-- packages/tailwindcss-patch/test/utils.ts | 8 +- packages/tailwindcss-patch/tsconfig.json | 2 +- packages/tailwindcss-patch/tsup.config.ts | 4 +- packages/tailwindcss-patch/vitest.config.ts | 8 +- packages/unplugin-tailwind-merge/package.json | 8 +- .../unplugin-tailwindcss-mangle/README.md | 10 +- .../build.config.ts | 8 +- .../unplugin-tailwindcss-mangle/package.json | 70 ++++++------ .../src/core/plugin.ts | 46 ++++---- .../unplugin-tailwindcss-mangle/src/utils.ts | 19 ++-- .../unplugin-tailwindcss-mangle/src/vite.ts | 1 + .../test/context.test.ts | 2 +- .../test/vite.test.ts | 26 ++--- .../test/webpack.test.ts | 25 ++--- .../unplugin-tailwindcss-mangle/tsconfig.json | 2 +- .../vitest.config.ts | 8 +- 79 files changed, 624 insertions(+), 585 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index b6ca5e29..6f39e845 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -4,4 +4,8 @@ export default icebreaker({}, { ignores: [ '**/fixtures/**', ], +}, { + rules: { + 'no-console': 'off', + }, }) diff --git a/package.json b/package.json index 2fa92116..a6d4eb3c 100644 --- a/package.json +++ b/package.json @@ -11,8 +11,8 @@ "dev": "pnpm -r run dev", "test": "vitest run --coverage.enabled", "test:dev": "vitest --coverage.enabled", - "lint": "pnpm run -r lint", - "format": "eslint packages --fix", + "lint": "eslint packages", + "lint:fix": "eslint packages --fix", "preinstall": "npx only-allow pnpm", "sync": "cnpm sync @tailwindcss-mangle/shared @tailwindcss-mangle/config tailwindcss-patch unplugin-tailwindcss-mangle @tailwindcss-mangle/core", "publish-packages": "pnpm run test && changeset version && changeset publish", @@ -50,4 +50,4 @@ "node": ">=18.0.0" }, "packageManager": "pnpm@9.1.1" -} +} \ No newline at end of file diff --git a/packages/config/build.config.ts b/packages/config/build.config.ts index 45c5d795..1e185024 100644 --- a/packages/config/build.config.ts +++ b/packages/config/build.config.ts @@ -9,11 +9,11 @@ export default defineBuildConfig({ cjsBridge: true, dts: { // https://github.com/unjs/unbuild/issues/135 - respectExternal: false - } + respectExternal: false, + }, }, alias: { - '@': path.resolve(__dirname, './src') + '@': path.resolve(__dirname, './src'), }, - declaration: true + declaration: true, }) diff --git a/packages/config/package.json b/packages/config/package.json index 030d6e38..86819952 100644 --- a/packages/config/package.json +++ b/packages/config/package.json @@ -2,6 +2,22 @@ "name": "@tailwindcss-mangle/config", "version": "2.2.2", "description": "The config and load function of tailwindcss-mangle", + "author": "SonOfMagic ", + "license": "MIT", + "homepage": "https://github.com/sonofmagic/tailwindcss-mangle", + "repository": { + "type": "git", + "url": "git+https://github.com/sonofmagic/tailwindcss-mangle.git" + }, + "keywords": [ + "tailwindcss", + "mangle", + "patch", + "core", + "mangle", + "shared", + "utils" + ], "exports": { ".": { "types": "./dist/index.d.ts", @@ -9,6 +25,9 @@ "require": "./dist/index.cjs" } }, + "main": "./dist/index.cjs", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", "typesVersions": { "*": { "*": [ @@ -17,9 +36,6 @@ ] } }, - "main": "./dist/index.cjs", - "module": "./dist/index.mjs", - "types": "./dist/index.d.ts", "files": [ "dist" ], @@ -29,17 +45,6 @@ "test": "vitest run --coverage.enabled", "test:dev": "vitest" }, - "keywords": [ - "tailwindcss", - "mangle", - "patch", - "core", - "mangle", - "shared", - "utils" - ], - "author": "SonOfMagic ", - "license": "MIT", "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org/" @@ -48,10 +53,5 @@ "@tailwindcss-mangle/shared": "workspace:^", "c12": "^1.10.0", "dedent": "^1.5.3" - }, - "homepage": "https://github.com/sonofmagic/tailwindcss-mangle", - "repository": { - "type": "git", - "url": "git+https://github.com/sonofmagic/tailwindcss-mangle.git" } } diff --git a/packages/config/src/config.ts b/packages/config/src/config.ts index 2a546712..bfcfe0e9 100644 --- a/packages/config/src/config.ts +++ b/packages/config/src/config.ts @@ -1,6 +1,6 @@ import path from 'node:path' import fs from 'node:fs/promises' -import { loadConfig, createDefineConfig } from 'c12' +import { createDefineConfig, loadConfig } from 'c12' import dedent from 'dedent' import type { UserConfig } from './types' import { getDefaultUserConfig } from './defaults' @@ -10,9 +10,9 @@ export function getConfig(cwd?: string) { return loadConfig({ name: configName, defaults: { - ...getDefaultUserConfig() + ...getDefaultUserConfig(), }, - cwd + cwd, }) } @@ -26,6 +26,6 @@ export function initConfig(cwd: string) { export default defineConfig({}) `, - 'utf8' + 'utf8', ) } diff --git a/packages/config/src/defaults.ts b/packages/config/src/defaults.ts index ad575111..4c574e8a 100644 --- a/packages/config/src/defaults.ts +++ b/packages/config/src/defaults.ts @@ -1,14 +1,15 @@ +import process from 'node:process' import { defaultMangleClassFilter } from '@tailwindcss-mangle/shared' -import type { PatchUserConfig, UserConfig, MangleUserConfig } from './types' +import type { MangleUserConfig, PatchUserConfig, UserConfig } from './types' export function getDefaultPatchConfig(): PatchUserConfig { return { output: { filename: '.tw-patch/tw-class-list.json', removeUniversalSelector: true, - loose: true + loose: true, }, - tailwindcss: {} + tailwindcss: {}, } } @@ -22,15 +23,15 @@ export function getDefaultMangleUserConfig(): MangleUserConfig { classMapOutput: { enable: false, filename: '.tw-patch/tw-map-list.json', - loose: true + loose: true, }, - preserveFunction: [] + preserveFunction: [], } } export function getDefaultUserConfig(): UserConfig { return { patch: getDefaultPatchConfig(), - mangle: getDefaultMangleUserConfig() + mangle: getDefaultMangleUserConfig(), } } diff --git a/packages/config/test/index.test.ts b/packages/config/test/index.test.ts index f07db23f..c5fe511c 100644 --- a/packages/config/test/index.test.ts +++ b/packages/config/test/index.test.ts @@ -2,8 +2,8 @@ import { resolve } from 'node:path' import { existsSync } from 'node:fs' import { deleteAsync } from 'del' import { fixturesRoot } from './utils' -import { initConfig, getConfig } from '@/index' -import { getDefaultUserConfig, getDefaultMangleUserConfig } from '@/defaults' +import { getConfig, initConfig } from '@/index' +import { getDefaultMangleUserConfig, getDefaultUserConfig } from '@/defaults' import { configName } from '@/constants' describe('config', () => { @@ -29,13 +29,13 @@ describe('config', () => { output: { filename: 'xxx/yyy/zzz.json', loose: false, - removeUniversalSelector: false + removeUniversalSelector: false, }, tailwindcss: { - cwd: 'aaa/bbb/cc' - } + cwd: 'aaa/bbb/cc', + }, }, - mangle: getDefaultMangleUserConfig() + mangle: getDefaultMangleUserConfig(), }) }) diff --git a/packages/config/tsconfig.json b/packages/config/tsconfig.json index d6c27bee..65483f39 100644 --- a/packages/config/tsconfig.json +++ b/packages/config/tsconfig.json @@ -12,4 +12,4 @@ "src", "test" ] -} \ No newline at end of file +} diff --git a/packages/config/vitest.config.ts b/packages/config/vitest.config.ts index a688df69..925b0dbf 100644 --- a/packages/config/vitest.config.ts +++ b/packages/config/vitest.config.ts @@ -6,10 +6,10 @@ export default defineProject({ alias: [ { find: '@', - replacement: path.resolve(__dirname, './src') - } + replacement: path.resolve(__dirname, './src'), + }, ], globals: true, - testTimeout: 60_000 - } + testTimeout: 60_000, + }, }) diff --git a/packages/core/build.config.ts b/packages/core/build.config.ts index 45c5d795..1e185024 100644 --- a/packages/core/build.config.ts +++ b/packages/core/build.config.ts @@ -9,11 +9,11 @@ export default defineBuildConfig({ cjsBridge: true, dts: { // https://github.com/unjs/unbuild/issues/135 - respectExternal: false - } + respectExternal: false, + }, }, alias: { - '@': path.resolve(__dirname, './src') + '@': path.resolve(__dirname, './src'), }, - declaration: true + declaration: true, }) diff --git a/packages/core/package.json b/packages/core/package.json index ca3ac925..618e6957 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -2,6 +2,22 @@ "name": "@tailwindcss-mangle/core", "version": "2.2.2", "description": "The core of tailwindcss-mangle", + "author": "SonOfMagic ", + "license": "MIT", + "homepage": "https://github.com/sonofmagic/tailwindcss-mangle", + "repository": { + "type": "git", + "url": "git+https://github.com/sonofmagic/tailwindcss-mangle.git" + }, + "bugs": { + "url": "https://github.com/sonofmagic/tailwindcss-mangle/issues" + }, + "keywords": [ + "tailwindcss", + "patch", + "core", + "mangle" + ], "exports": { ".": { "types": "./dist/index.d.ts", @@ -9,6 +25,9 @@ "require": "./dist/index.cjs" } }, + "main": "./dist/index.cjs", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", "typesVersions": { "*": { "*": [ @@ -17,9 +36,6 @@ ] } }, - "main": "./dist/index.cjs", - "module": "./dist/index.mjs", - "types": "./dist/index.d.ts", "files": [ "dist" ], @@ -30,14 +46,6 @@ "test:dev": "vitest", "coverage": "vitest run --coverage" }, - "keywords": [ - "tailwindcss", - "patch", - "core", - "mangle" - ], - "author": "SonOfMagic ", - "license": "MIT", "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org/" @@ -64,14 +72,6 @@ "@vue/compiler-core": "^3.4.27", "@vue/compiler-sfc": "^3.4.27" }, - "homepage": "https://github.com/sonofmagic/tailwindcss-mangle", - "repository": { - "type": "git", - "url": "git+https://github.com/sonofmagic/tailwindcss-mangle.git" - }, - "bugs": { - "url": "https://github.com/sonofmagic/tailwindcss-mangle/issues" - }, "directories": { "test": "test" } diff --git a/packages/core/src/css/index.ts b/packages/core/src/css/index.ts index 6093f96a..c4c3158e 100644 --- a/packages/core/src/css/index.ts +++ b/packages/core/src/css/index.ts @@ -1,5 +1,5 @@ import postcss from 'postcss' -import { ICssHandlerOptions } from '../types' +import type { ICssHandlerOptions } from '../types' import { transformSelectorPostcssPlugin } from './plugins' export function cssHandler(rawSource: string, options: ICssHandlerOptions) { @@ -7,6 +7,6 @@ export function cssHandler(rawSource: string, options: ICssHandlerOptions) { const { file } = options return postcss(acceptedPlugins).process(rawSource, { from: file, - to: file + to: file, }) } diff --git a/packages/core/src/css/plugins.ts b/packages/core/src/css/plugins.ts index d823a2db..6c9e86ac 100644 --- a/packages/core/src/css/plugins.ts +++ b/packages/core/src/css/plugins.ts @@ -1,7 +1,8 @@ import type { PluginCreator } from 'postcss' import defu from 'defu' import parser from 'postcss-selector-parser' -import { ICssHandlerOptions } from '@/types' +import type { ICssHandlerOptions } from '@/types' + export type PostcssMangleTailwindcssPlugin = PluginCreator const postcssPlugin = 'postcss-mangle-tailwindcss-plugin' @@ -23,7 +24,7 @@ export function isVueScoped(s: parser.ClassName): boolean { export const transformSelectorPostcssPlugin: PluginCreator = function (options) { const { ignoreVueScoped, replaceMap, ctx } = defu(options, { - ignoreVueScoped: true + ignoreVueScoped: true, }) return { @@ -52,9 +53,9 @@ export const transformSelectorPostcssPlugin: PluginCreator = }) }).transform(rule, { lossless: false, - updateSelector: true + updateSelector: true, }) - } + }, } } transformSelectorPostcssPlugin.postcss = true diff --git a/packages/core/src/ctx/index.ts b/packages/core/src/ctx/index.ts index 0ab21333..1c0de915 100644 --- a/packages/core/src/ctx/index.ts +++ b/packages/core/src/ctx/index.ts @@ -1,5 +1,6 @@ import fs from 'node:fs' -import { resolve, isAbsolute } from 'node:path' +import { isAbsolute, resolve } from 'node:path' +import process from 'node:process' import { ClassGenerator } from '@tailwindcss-mangle/shared' import { getConfig } from '@tailwindcss-mangle/config' import type { MangleUserConfig } from '@tailwindcss-mangle/config' @@ -60,7 +61,7 @@ export class Context { this.classGenerator = new ClassGenerator(this.options.classGenerator) this.preserveFunctionSet = new Set(this.options?.preserveFunction ?? []) this.preserveFunctionRegexs = [...this.preserveFunctionSet.values()].map((x) => { - return new RegExp(escapeStringRegexp(x) + '\\(([^)]*)\\)', 'g') + return new RegExp(`${escapeStringRegexp(x)}\\(([^)]*)\\)`, 'g') }) } @@ -94,7 +95,7 @@ export class Context { } loadClassSet(classList: string[]) { - const list = sort(classList).desc((c) => c.length) + const list = sort(classList).desc(c => c.length) for (const className of list) { if (this.currentMangleClassFilter(className)) { this.classSet.add(className) @@ -109,7 +110,8 @@ export class Context { this.mergeOptions(mangleOptions, config?.mangle) if (_classList) { this.loadClassSet(_classList) - } else { + } + else { let jsonPath = this.options.classListPath ?? resolve(process.cwd(), config?.patch?.output?.filename as string) if (!isAbsolute(jsonPath)) { jsonPath = resolve(configCwd ?? process.cwd(), jsonPath) diff --git a/packages/core/src/env.ts b/packages/core/src/env.ts index 5c12fbda..b6180436 100644 --- a/packages/core/src/env.ts +++ b/packages/core/src/env.ts @@ -1,2 +1,4 @@ +import process from 'node:process' + export const isProd = () => process.env.NODE_ENV === 'production' export const isDev = () => process.env.NODE_ENV === 'development' diff --git a/packages/core/src/html/index.ts b/packages/core/src/html/index.ts index e9489de1..e768e4c3 100644 --- a/packages/core/src/html/index.ts +++ b/packages/core/src/html/index.ts @@ -1,6 +1,6 @@ import { parse, serialize } from 'parse5' import { traverse } from '@parse5/tools' -import { IHtmlHandlerOptions } from '../types' +import type { IHtmlHandlerOptions } from '../types' import { makeRegex, splitCode } from '../shared' // const { traverse } = await import('@parse5/tools') export function htmlHandler(rawSource: string, options: IHtmlHandlerOptions) { @@ -8,10 +8,10 @@ export function htmlHandler(rawSource: string, options: IHtmlHandlerOptions) { const fragment = parse(rawSource) traverse(fragment, { element(node) { - const attribute = node.attrs.find((x) => x.name === 'class') + const attribute = node.attrs.find(x => x.name === 'class') if (attribute) { const array = splitCode(attribute.value, { - splitQuote: false + splitQuote: false, }) for (const v of array) { if (replaceMap.has(v)) { @@ -19,7 +19,7 @@ export function htmlHandler(rawSource: string, options: IHtmlHandlerOptions) { } } } - } + }, }) return serialize(fragment) } diff --git a/packages/core/src/js/index.ts b/packages/core/src/js/index.ts index c22c3bc7..58dd77b0 100644 --- a/packages/core/src/js/index.ts +++ b/packages/core/src/js/index.ts @@ -1,22 +1,23 @@ -import type { StringLiteral, TemplateElement, CallExpression } from '@babel/types' -import { transformSync, type BabelFileResult, type NodePath } from '@babel/core' +import type { CallExpression, StringLiteral, TemplateElement } from '@babel/types' +import { type BabelFileResult, type NodePath, transformSync } from '@babel/core' import type { IJsHandlerOptions } from '../types' import { makeRegex, splitCode } from '../shared' import { isProd as isProduction } from '../env' + export { preProcessJs, preProcessRawCode } from './pre' export function handleValue(raw: string, node: StringLiteral | TemplateElement, options: IJsHandlerOptions) { const { replaceMap, ctx, splitQuote = true } = options const clsGen = ctx.classGenerator const array = splitCode(raw, { - splitQuote + splitQuote, }) let rawString = raw for (const v of array) { if (replaceMap.has(v)) { let ignoreFlag = false if (Array.isArray(node.leadingComments)) { - ignoreFlag = node.leadingComments.findIndex((x) => x.value.includes('tw-mangle') && x.value.includes('ignore')) > -1 + ignoreFlag = node.leadingComments.findIndex(x => x.value.includes('tw-mangle') && x.value.includes('ignore')) > -1 } if (!ignoreFlag) { @@ -39,13 +40,13 @@ export function jsHandler(rawSource: string, options: IJsHandlerOptions) { enter(p: NodePath) { const n = p.node n.value = handleValue(n.value, n, options) - } + }, }, TemplateElement: { enter(p: NodePath) { const n = p.node n.value.raw = handleValue(n.value.raw, n, options) - } + }, }, CallExpression: { enter(p: NodePath) { @@ -59,20 +60,20 @@ export function jsHandler(rawSource: string, options: IJsHandlerOptions) { if (res.code) { s.node.value = res.code } - } - } + }, + }, }) } - } - } + }, + }, // noScope: true - } + }, } - } + }, ], minified: options.minified ?? isProduction(), sourceMaps: false, - configFile: false + configFile: false, }) return result as BabelFileResult diff --git a/packages/core/src/js/pre.ts b/packages/core/src/js/pre.ts index f9310b25..b51811a2 100644 --- a/packages/core/src/js/pre.ts +++ b/packages/core/src/js/pre.ts @@ -35,7 +35,7 @@ export function handleValue(options: HandleValueOptions) { } } - const arr = sort(splitCode(value)).desc((x) => x.length) + const arr = sort(splitCode(value)).desc(x => x.length) for (const str of arr) { if (replaceMap.has(str)) { @@ -74,11 +74,11 @@ export const JsPlugin = declare((api, options: Options) => { replaceMap, offset: 1, escape: true, - markedArray + markedArray, } handleValue(opts) - } + }, }, TemplateElement: { exit(p) { @@ -91,13 +91,13 @@ export const JsPlugin = declare((api, options: Options) => { replaceMap, offset: 0, escape: false, - markedArray + markedArray, } handleValue(opts) - } - } - } + }, + }, + }, } }) @@ -112,7 +112,7 @@ function transformSync(ast: babel.types.Node, code: string, plugins: babel.Plugi babel.transformFromAstSync(ast, code, { presets: loadPresets(), plugins, - filename + filename, }) } @@ -122,9 +122,9 @@ export function loadPresets() { require('@babel/preset-typescript'), { allExtensions: true, - isTSX: true - } - ] + isTSX: true, + }, + ], ] } @@ -135,14 +135,16 @@ export function preProcessJs(options: IPreProcessJsOptions): string { try { const file = babel.parseSync(magicString.original, { sourceType: 'unambiguous', - presets: loadPresets() + presets: loadPresets(), }) if (file) { ast = file - } else { + } + else { return code.toString() } - } catch { + } + catch { return code.toString() } const markedArray: [number, number][] = [] @@ -160,32 +162,32 @@ export function preProcessJs(options: IPreProcessJsOptions): string { enter(path) { const node = path.node const value = node.value - const arr = sort(splitCode(value)).desc((x) => x.length) + const arr = sort(splitCode(value)).desc(x => x.length) for (const str of arr) { if (replaceMap.has(str)) { ctx.addPreserveClass(str) } } - } + }, }, TemplateElement: { enter(path) { const node = path.node const value = node.value.raw - const arr = sort(splitCode(value)).desc((x) => x.length) + const arr = sort(splitCode(value)).desc(x => x.length) for (const str of arr) { if (replaceMap.has(str)) { ctx.addPreserveClass(str) } } - } - } + }, + }, }) } - } - } + }, + }, }) transformSync( @@ -199,11 +201,11 @@ export function preProcessJs(options: IPreProcessJsOptions): string { replaceMap, id, ctx, - markedArray - } - ] + markedArray, + }, + ], ], - id + id, ) return magicString.toString() @@ -232,34 +234,35 @@ export function preProcessRawCode(options: IPreProcessRawCodeOptions): string { let ast: ParseResult | null try { ast = babel.parseSync(regExpMatch[0], { - sourceType: 'unambiguous' + sourceType: 'unambiguous', }) - ast && - babel.traverse(ast, { - StringLiteral: { - enter(p) { - const arr = sort(splitCode(p.node.value)).desc((x) => x.length) + ast + && babel.traverse(ast, { + StringLiteral: { + enter(p) { + const arr = sort(splitCode(p.node.value)).desc(x => x.length) - for (const v of arr) { - if (replaceMap.has(v)) { - ctx.addPreserveClass(v) - } + for (const v of arr) { + if (replaceMap.has(v)) { + ctx.addPreserveClass(v) } } }, - TemplateElement: { - enter(p) { - const arr = sort(splitCode(p.node.value.raw)).desc((x) => x.length) - for (const v of arr) { - if (replaceMap.has(v)) { - ctx.addPreserveClass(v) - } + }, + TemplateElement: { + enter(p) { + const arr = sort(splitCode(p.node.value.raw)).desc(x => x.length) + for (const v of arr) { + if (replaceMap.has(v)) { + ctx.addPreserveClass(v) } } - } - }) - } catch { + }, + }, + }) + } + catch { continue } } diff --git a/packages/core/src/js/utils.ts b/packages/core/src/js/utils.ts index 9c2870f8..e2347756 100644 --- a/packages/core/src/js/utils.ts +++ b/packages/core/src/js/utils.ts @@ -1,4 +1,4 @@ -import babel from '@babel/core' +import type babel from '@babel/core' // const t = babel.types export function getStringLiteralCalleeName(path: babel.NodePath) { if (path.parentPath.isCallExpression()) { diff --git a/packages/core/src/types.ts b/packages/core/src/types.ts index 4ec4ccbe..624a51a9 100644 --- a/packages/core/src/types.ts +++ b/packages/core/src/types.ts @@ -1,4 +1,5 @@ import type { Context } from './ctx' + export interface IClassGeneratorContextItem { name: string usedBy: string[] diff --git a/packages/core/test/css.test.ts b/packages/core/test/css.test.ts index 62774c3e..a28b0bb8 100644 --- a/packages/core/test/css.test.ts +++ b/packages/core/test/css.test.ts @@ -1,6 +1,7 @@ import { getTestCase } from './utils' import { cssHandler } from '@/css' import { Context } from '@/ctx' + describe('css', () => { let ctx: Context beforeEach(() => { @@ -16,20 +17,20 @@ describe('css', () => { ctx.addPreserveClass('gap-y-4') const { css } = await cssHandler(testCase, { ctx, - replaceMap + replaceMap, }) expect(css).toMatchSnapshot() }) it('preserveClassNamesSet case 1', async () => { await ctx.initConfig({ - classList: ['gap-y-4'] + classList: ['gap-y-4'], }) const testCase = `.gap-y-4 {color:red;}` ctx.addPreserveClass('gap-y-4') const { css } = await cssHandler(testCase, { ctx, - replaceMap: ctx.getReplaceMap() + replaceMap: ctx.getReplaceMap(), }) expect(css).toMatchSnapshot() }) @@ -45,7 +46,7 @@ describe('css', () => { const { css } = await cssHandler(testCase, { ctx, - replaceMap + replaceMap, }) expect(css).toMatchSnapshot() }) @@ -61,7 +62,7 @@ describe('css', () => { const { css } = await cssHandler(testCase, { ctx, - replaceMap + replaceMap, }) expect(css).toMatchSnapshot() }) @@ -78,7 +79,7 @@ describe('css', () => { const { css } = await cssHandler(testCase, { ctx, replaceMap, - ignoreVueScoped: false + ignoreVueScoped: false, }) expect(css).toMatchSnapshot() }) @@ -95,7 +96,7 @@ describe('css', () => { const { css } = await cssHandler(testCase, { ctx, - replaceMap + replaceMap, }) expect(css).toMatchSnapshot() }) @@ -109,7 +110,7 @@ describe('css', () => { const testCase = getTestCase('vue.scoped.css') const { css } = await cssHandler(testCase, { ctx, - replaceMap + replaceMap, }) expect(css).toMatchSnapshot() }) diff --git a/packages/core/test/html.test.ts b/packages/core/test/html.test.ts index ee47e05e..8972597f 100644 --- a/packages/core/test/html.test.ts +++ b/packages/core/test/html.test.ts @@ -18,7 +18,7 @@ describe('html handler', () => { } const res = htmlHandler(getTestCase('hello-world.html'), { ctx, - replaceMap + replaceMap, }) expect(res).toMatchSnapshot() }) @@ -31,7 +31,7 @@ describe('html handler', () => { } const res = htmlHandler(getTestCase('trailing-slash.html'), { ctx, - replaceMap + replaceMap, }) expect(res).toMatchSnapshot() }) @@ -44,7 +44,7 @@ describe('html handler', () => { } const res = htmlHandler(getTestCase('trailing-slash-0.html'), { ctx, - replaceMap + replaceMap, }) expect(res).toMatchSnapshot() }) diff --git a/packages/core/test/js.test.ts b/packages/core/test/js.test.ts index 7bd2c370..f963265e 100644 --- a/packages/core/test/js.test.ts +++ b/packages/core/test/js.test.ts @@ -21,11 +21,11 @@ describe('js handler', async () => { const replaceMap = new Map() replaceMap.set('dark:bg-zinc-800/30', true) replaceMap.set('lg:dark:bg-zinc-800/30', true) - // eslint-disable-next-line no-template-curly-in-string + const testCase = 'element.innerHTML = \'
count is counter
\'' const code = jsHandler(testCase, { ctx, - replaceMap + replaceMap, }).code expect(code).toMatchSnapshot() }) @@ -34,12 +34,12 @@ describe('js handler', async () => { const replaceMap = new Map() replaceMap.set('dark:bg-zinc-800/30', true) replaceMap.set('lg:dark:bg-zinc-800/30', true) - // eslint-disable-next-line no-template-curly-in-string + const testCase = 'element.innerHTML = \'
count is counter
\'' const code = jsHandler(testCase, { ctx, replaceMap, - splitQuote: false + splitQuote: false, }).code expect(code).toMatchSnapshot() }) @@ -48,11 +48,11 @@ describe('js handler', async () => { const replaceMap = new Map() replaceMap.set('dark:bg-zinc-800/30', true) replaceMap.set('lg:dark:bg-zinc-800/30', true) - // eslint-disable-next-line no-template-curly-in-string + const testCase = 'const counter = 0;element.innerHTML = `
count is ${counter}
`' const code = jsHandler(testCase, { ctx, - replaceMap + replaceMap, }).code expect(code).toMatchSnapshot() }) @@ -81,7 +81,7 @@ describe('js handler', async () => { const testCase = `{ className: "z-10 w-full max-w-5xl items-center justify-between font-mono text-sm lg:flex" }` const code = jsHandler(testCase, { ctx, - replaceMap + replaceMap, }).code expect(code).toMatchSnapshot() }) @@ -96,7 +96,7 @@ describe('js handler', async () => { const code = jsHandler(testCase, { ctx, replaceMap, - splitQuote: false + splitQuote: false, }).code expect(code).toMatchSnapshot() }) @@ -113,7 +113,7 @@ describe('js handler', async () => { const code = jsHandler(testCase, { ctx, - replaceMap + replaceMap, }).code expect(code).toMatchSnapshot() }) @@ -127,7 +127,7 @@ describe('js handler', async () => { } const code = jsHandler(testCase, { ctx, - replaceMap + replaceMap, }).code expect(code).toMatchSnapshot() }) @@ -138,7 +138,7 @@ describe('js handler', async () => { replaceMap.set('ease-out', true) const code = jsHandler(testCase, { ctx, - replaceMap + replaceMap, }).code expect(code).toMatchSnapshot() }) @@ -150,7 +150,7 @@ describe('js handler', async () => { const code = jsHandler(testCase, { ctx, replaceMap, - minified: true + minified: true, }).code expect(code).toMatchSnapshot() }) @@ -162,7 +162,7 @@ describe('js handler', async () => { replaceMap.set('ease-out', true) const code = jsHandler(testCase, { ctx, - replaceMap + replaceMap, }).code expect(code).toMatchSnapshot() }) @@ -174,7 +174,7 @@ describe('js handler', async () => { replaceMap.set('bg-red-500/50', true) const code = jsHandler(testCase, { ctx, - replaceMap + replaceMap, }).code expect(code).toMatchSnapshot() }) @@ -187,7 +187,7 @@ describe('js handler', async () => { const code = jsHandler(testCase, { ctx, - replaceMap + replaceMap, }).code expect(code).toMatchSnapshot() }) @@ -200,19 +200,19 @@ describe('js handler', async () => { const code = jsHandler(testCase, { ctx, - replaceMap + replaceMap, }).code expect(code).toMatchSnapshot() }) - it('LINEFEED case', () => { + it('lINEFEED case', () => { const testCase = 'const LINEFEED = "\\n";' const replaceMap = new Map() // replaceMap.set('bg-red-500/50', true) // replaceMap.set('bg-red-500', true) const code = jsHandler(testCase, { ctx, - replaceMap + replaceMap, }).code expect(code).toBe('const LINEFEED="\\n";') }) @@ -226,10 +226,10 @@ describe('js handler', async () => { code: testCase, // @ts-ignore ctx: { - addToUsedBy: () => {} + addToUsedBy: () => {}, }, id: 'xxx', - replaceMap + replaceMap, }) expect(code).toBe(testCase) }) @@ -243,10 +243,10 @@ describe('js handler', async () => { code: testCase, // @ts-ignore ctx: { - addToUsedBy: () => {} + addToUsedBy: () => {}, }, id: 'xxx', - replaceMap + replaceMap, }) expect(code).toBe('const LINEFEED = `a${n}a`;') }) @@ -260,10 +260,10 @@ describe('js handler', async () => { code: testCase, // @ts-ignore ctx: { - addToUsedBy: () => {} + addToUsedBy: () => {}, }, id: 'xxx', - replaceMap + replaceMap, }) expect(code).toBe('const LINEFEED = `a${n}a`;') }) @@ -279,7 +279,7 @@ describe('js handler', async () => { code: testCase, ctx, id: 'xxx', - replaceMap + replaceMap, }) expect(code).toMatchSnapshot() }) @@ -290,8 +290,8 @@ describe('js handler', async () => { await ctx.initConfig({ classList: 'bg-red-500/50 bg-red-500 w-2 h-2 w-1 h-1 bg-red-400 bg-red-400/50'.split(' '), mangleOptions: { - preserveFunction: ['cn'] - } + preserveFunction: ['cn'], + }, }) // cn('w-10 h-10 bg-red-500 and bg-red-500/50') @@ -304,7 +304,7 @@ describe('js handler', async () => { code: testCase, ctx, id: 'xxx', - replaceMap + replaceMap, }) expect(code).toMatchSnapshot() expect(ctx.preserveClassNamesSet.size).toBe(4) @@ -323,8 +323,8 @@ describe('js handler', async () => { await ctx.initConfig({ classList: 'bg-red-500/50 bg-red-500 w-2 h-2 w-1 h-1 bg-red-400 bg-red-400/50'.split(' '), mangleOptions: { - preserveFunction: ['twMerge'] - } + preserveFunction: ['twMerge'], + }, }) const replaceMap = ctx.getReplaceMap() @@ -333,7 +333,7 @@ describe('js handler', async () => { code: testCase, ctx, id: 'xxx', - replaceMap + replaceMap, }) expect(code).toMatchSnapshot() expect(ctx.preserveClassNamesSet.size).toBe(4) @@ -346,8 +346,8 @@ describe('js handler', async () => { await ctx.initConfig({ classList: 'bg-red-500/50 bg-red-500 w-2 h-2 w-1 h-1 bg-red-400 bg-red-400/50'.split(' '), mangleOptions: { - preserveFunction: ['twMerge', 'cn'] - } + preserveFunction: ['twMerge', 'cn'], + }, }) const replaceMap = ctx.getReplaceMap() @@ -361,7 +361,7 @@ describe('js handler', async () => { code: testCase, ctx, id: 'xxx', - replaceMap + replaceMap, }) expect(code).toMatchSnapshot() expect(ctx.preserveClassNamesSet.size).toBe(8) @@ -373,8 +373,8 @@ describe('js handler', async () => { await ctx.initConfig({ classList: 'px-2 py-1 bg-red hover:bg-dark-red p-3 bg-[#B91C1C] flex min-h-screen flex-col items-center justify-between p-24'.split(' '), mangleOptions: { - preserveFunction: ['twMerge'] - } + preserveFunction: ['twMerge'], + }, }) const replaceMap = ctx.getReplaceMap() @@ -383,7 +383,7 @@ describe('js handler', async () => { code: testCase, ctx, replaceMap, - id: 'xxx' + id: 'xxx', }) expect(code).toMatchSnapshot() expect(ctx.preserveClassNamesSet.size).toBe(6) @@ -396,15 +396,15 @@ describe('js handler', async () => { await ctx.initConfig({ classList: require('./fixtures/preserve-fn-case1.json') as string[], mangleOptions: { - preserveFunction: ['twMerge'] - } + preserveFunction: ['twMerge'], + }, }) const replaceMap = ctx.getReplaceMap() const code = preProcessRawCode({ code: testCase, ctx, replaceMap, - id: 'xxx' + id: 'xxx', }) expect(code).toMatchSnapshot() expect(ctx.preserveClassNamesSet.size).toBe(6) @@ -417,8 +417,8 @@ describe('js handler', async () => { await ctx.initConfig({ classList: require('./fixtures/preserve-fn-case2.json') as string[], mangleOptions: { - preserveFunction: ['twMerge'] - } + preserveFunction: ['twMerge'], + }, }) const replaceMap = ctx.getReplaceMap() @@ -426,7 +426,7 @@ describe('js handler', async () => { code: testCase, ctx, replaceMap, - id: 'xxx' + id: 'xxx', }) expect(code).toMatchSnapshot() expect(ctx.preserveClassNamesSet.size).toBe(8) @@ -435,7 +435,7 @@ describe('js handler', async () => { it('tsx app0', async () => { await ctx.initConfig({ - classList: require('./fixtures/app0.json') as string[] + classList: require('./fixtures/app0.json') as string[], }) const replaceMap = ctx.getReplaceMap() const code = getTestCase('app0.tsx') @@ -444,14 +444,14 @@ describe('js handler', async () => { code, replaceMap, ctx, - id: 'xxx' + id: 'xxx', }) expect(res).toMatchSnapshot() }) it('ts vanilla-0', async () => { await ctx.initConfig({ - classList: require('./fixtures/vanilla-0.json') as string[] + classList: require('./fixtures/vanilla-0.json') as string[], }) const replaceMap = ctx.getReplaceMap() const code = getTestCase('vanilla-0.ts') @@ -460,7 +460,7 @@ describe('js handler', async () => { code, replaceMap, ctx, - id: 'xxx' + id: 'xxx', }) expect(res).toMatchSnapshot() }) @@ -476,15 +476,15 @@ describe('js handler', async () => { await ctx.initConfig({ classList: 'p-1 p-2 p-3 p-4'.split(' '), mangleOptions: { - preserveFunction: ['cn'] - } + preserveFunction: ['cn'], + }, }) const replaceMap = ctx.getReplaceMap() const res = preProcessJs({ code, replaceMap, ctx, - id: 'xxx' + id: 'xxx', }) expect(res).toMatchSnapshot() }) diff --git a/packages/core/test/utils/index.ts b/packages/core/test/utils/index.ts index f002ec45..386372ce 100644 --- a/packages/core/test/utils/index.ts +++ b/packages/core/test/utils/index.ts @@ -16,10 +16,10 @@ export async function getCss(raw: string | string[]) { tailwindcss({ content: raw.map((x) => { return { - raw: x + raw: x, } - }) - }) + }), + }), ]).process('@tailwind utilities;') return res.css } diff --git a/packages/core/test/utils/svelte-to-tsx.ts b/packages/core/test/utils/svelte-to-tsx.ts index 612e386b..27afe485 100644 --- a/packages/core/test/utils/svelte-to-tsx.ts +++ b/packages/core/test/utils/svelte-to-tsx.ts @@ -1,14 +1,14 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -/* eslint-disable camelcase */ + import MagicString from 'magic-string' /** @see https://github.com/sveltejs/svelte/blob/d3297e2a2595db08c85356d65fd5f953b04a681f/packages/svelte/src/compiler/preprocess/index.js#L255C1-L255C85 */ -const regex_style_tags = /|([^]*?)<\/style>|\/>)/gi +const regex_style_tags = /|([\s\S]*?)<\/style>|\/>)/gi /** @see https://github.com/sveltejs/svelte/blob/d3297e2a2595db08c85356d65fd5f953b04a681f/packages/svelte/src/compiler/preprocess/index.js#L256C1-L256C88 */ -const regex_script_tags = /|([^]*?)<\/script>|\/>)/gi +const regex_script_tags = /|([\s\S]*?)<\/script>|\/>)/gi -export const svelteToTsx = (code: string) => { +export function svelteToTsx(code: string) { try { const scripts = [] const original = new MagicString(code) @@ -27,7 +27,8 @@ export const svelteToTsx = (code: string) => { const transformed = `${scripts.join('')}\nconst render =
${templateContent}
` return transformed.toString().trim() - } catch { + } + catch { return '' } } diff --git a/packages/core/test/utils/vue-to-tsx.ts b/packages/core/test/utils/vue-to-tsx.ts index 0ffc0b29..c5305fbd 100644 --- a/packages/core/test/utils/vue-to-tsx.ts +++ b/packages/core/test/utils/vue-to-tsx.ts @@ -1,4 +1,3 @@ -/* eslint-disable unicorn/no-array-for-each */ import { parse } from '@vue/compiler-sfc' import MagicString from 'magic-string' import type { BaseElementNode } from '@vue/compiler-core' @@ -35,10 +34,10 @@ const NodeTypes = { JS_IF_STATEMENT: 23, JS_ASSIGNMENT_EXPRESSION: 24, JS_SEQUENCE_EXPRESSION: 25, - JS_RETURN_STATEMENT: 26 + JS_RETURN_STATEMENT: 26, } as const -export const vueToTsx = (code: string) => { +export function vueToTsx(code: string) { try { const parsed = parse(code) const fileStr = new MagicString(`` ?? '') @@ -53,22 +52,23 @@ export const vueToTsx = (code: string) => { // recursion-free traversal while (stack.length > 0) { const node = stack.pop() - if (!node) continue + if (!node) { continue } if (node.type === NodeTypes.ELEMENT) { node.props.forEach((element) => { rewriteProp(element) }) - for (const child of node.children) stack.push(child) + for (const child of node.children) { stack.push(child) } } } - const scriptContent = (parsed.descriptor.scriptSetup ?? parsed.descriptor.script)?.content + '\n' + const scriptContent = `${(parsed.descriptor.scriptSetup ?? parsed.descriptor.script)?.content}\n` const transformed = new MagicString(`${scriptContent}\nconst render = ${fileStr.toString()}`) return transformed.toString() - } catch { + } + catch { return '' } } diff --git a/packages/core/test/vue.test.ts b/packages/core/test/vue.test.ts index 78248b82..2c3908a6 100644 --- a/packages/core/test/vue.test.ts +++ b/packages/core/test/vue.test.ts @@ -1,16 +1,17 @@ -import { parse, walk } from '@vue/compiler-sfc' -import { - generate, - baseParse, - transform, - TransformOptions, +import { parse } from '@vue/compiler-sfc' +import type { + NodeTransform, RootNode, - locStub, - createSimpleExpression, +} from '@vue/compiler-core' +import { CREATE_VNODE, RESOLVE_DIRECTIVE, + baseParse, + createSimpleExpression, + generate, helperNameMap, - NodeTransform + locStub, + transform, } from '@vue/compiler-core' import { getTestCase } from './utils' @@ -41,7 +42,7 @@ const NodeTypes = { JS_IF_STATEMENT: 23, JS_ASSIGNMENT_EXPRESSION: 24, JS_SEQUENCE_EXPRESSION: 25, - JS_RETURN_STATEMENT: 26 + JS_RETURN_STATEMENT: 26, } as const function createRoot(options: Partial = {}): RootNode { @@ -57,18 +58,18 @@ function createRoot(options: Partial = {}): RootNode { temps: 0, codegenNode: createSimpleExpression(`null`, false), loc: locStub, - ...options + ...options, } } // https://github.com/vuejs/core/blob/main/packages/compiler-sfc/__tests__/templateTransformAssetUrl.spec.ts describe('vue', () => { - test('module mode preamble', () => { + it('module mode preamble', () => { const root = createRoot({ - helpers: new Set([CREATE_VNODE, RESOLVE_DIRECTIVE]) + helpers: new Set([CREATE_VNODE, RESOLVE_DIRECTIVE]), }) const { code } = generate(root, { mode: 'module' }) expect(code).toMatch( - `import { ${helperNameMap[CREATE_VNODE]} as _${helperNameMap[CREATE_VNODE]}, ${helperNameMap[RESOLVE_DIRECTIVE]} as _${helperNameMap[RESOLVE_DIRECTIVE]} } from "vue"` + `import { ${helperNameMap[CREATE_VNODE]} as _${helperNameMap[CREATE_VNODE]}, ${helperNameMap[RESOLVE_DIRECTIVE]} as _${helperNameMap[RESOLVE_DIRECTIVE]} } from "vue"`, ) expect(code).toMatchSnapshot() }) @@ -89,15 +90,15 @@ describe('vue', () => { { type: NodeTypes.TEXT, content: 'hello', - isEmpty: false - } - ] - }) + isEmpty: false, + }, + ], + }), ) } } transform(ast, { - nodeTransforms: [plugin] + nodeTransforms: [plugin], }) const t = generate(ast, { mode: 'module' }) expect(t.code).toBe(content) diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json index d6c27bee..65483f39 100644 --- a/packages/core/tsconfig.json +++ b/packages/core/tsconfig.json @@ -12,4 +12,4 @@ "src", "test" ] -} \ No newline at end of file +} diff --git a/packages/core/vitest.config.ts b/packages/core/vitest.config.ts index a688df69..925b0dbf 100644 --- a/packages/core/vitest.config.ts +++ b/packages/core/vitest.config.ts @@ -6,10 +6,10 @@ export default defineProject({ alias: [ { find: '@', - replacement: path.resolve(__dirname, './src') - } + replacement: path.resolve(__dirname, './src'), + }, ], globals: true, - testTimeout: 60_000 - } + testTimeout: 60_000, + }, }) diff --git a/packages/shared/build.config.ts b/packages/shared/build.config.ts index 45c5d795..1e185024 100644 --- a/packages/shared/build.config.ts +++ b/packages/shared/build.config.ts @@ -9,11 +9,11 @@ export default defineBuildConfig({ cjsBridge: true, dts: { // https://github.com/unjs/unbuild/issues/135 - respectExternal: false - } + respectExternal: false, + }, }, alias: { - '@': path.resolve(__dirname, './src') + '@': path.resolve(__dirname, './src'), }, - declaration: true + declaration: true, }) diff --git a/packages/shared/package.json b/packages/shared/package.json index 83df97f5..a232b3f4 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -2,6 +2,21 @@ "name": "@tailwindcss-mangle/shared", "version": "2.2.2", "description": "The shared utils of tailwindcss-mangle", + "author": "SonOfMagic ", + "license": "MIT", + "homepage": "https://github.com/sonofmagic/tailwindcss-mangle", + "repository": { + "type": "git", + "url": "git+https://github.com/sonofmagic/tailwindcss-mangle.git" + }, + "keywords": [ + "tailwindcss", + "patch", + "core", + "mangle", + "shared", + "utils" + ], "exports": { ".": { "types": "./dist/index.d.ts", @@ -9,6 +24,9 @@ "require": "./dist/index.cjs" } }, + "main": "./dist/index.cjs", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", "typesVersions": { "*": { "*": [ @@ -17,9 +35,6 @@ ] } }, - "main": "./dist/index.cjs", - "module": "./dist/index.mjs", - "types": "./dist/index.d.ts", "files": [ "dist" ], @@ -29,25 +44,10 @@ "test": "vitest run --coverage.enabled", "test:dev": "vitest" }, - "keywords": [ - "tailwindcss", - "patch", - "core", - "mangle", - "shared", - "utils" - ], - "author": "SonOfMagic ", - "license": "MIT", "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org/" }, "dependencies": {}, - "devDependencies": {}, - "homepage": "https://github.com/sonofmagic/tailwindcss-mangle", - "repository": { - "type": "git", - "url": "git+https://github.com/sonofmagic/tailwindcss-mangle.git" - } + "devDependencies": {} } diff --git a/packages/shared/src/classGenerator.ts b/packages/shared/src/classGenerator.ts index 539cd333..187e5fb8 100644 --- a/packages/shared/src/classGenerator.ts +++ b/packages/shared/src/classGenerator.ts @@ -1,6 +1,6 @@ -import type { IClassGeneratorOptions, IClassGeneratorContextItem, IClassGenerator } from './types' +import type { IClassGenerator, IClassGeneratorContextItem, IClassGeneratorOptions } from './types' -import { acceptChars, stripEscapeSequence, regExpTest } from './utils' +import { acceptChars, regExpTest, stripEscapeSequence } from './utils' class ClassGenerator implements IClassGenerator { public newClassMap: Record @@ -59,7 +59,7 @@ class ClassGenerator implements IClassGenerator { transformCssClass(className: string): string { const key = stripEscapeSequence(className) const cn = this.newClassMap[key] - if (cn) return cn.name + if (cn) { return cn.name } return className } @@ -68,7 +68,7 @@ class ClassGenerator implements IClassGenerator { original = stripEscapeSequence(original) const cn = this.newClassMap[original] - if (cn) return cn + if (cn) { return cn } let newClassName if (opts.customGenerate && typeof opts.customGenerate === 'function') { @@ -90,7 +90,7 @@ class ClassGenerator implements IClassGenerator { } const newClass: IClassGeneratorContextItem = { name: newClassName, - usedBy: new Set() + usedBy: new Set(), } this.newClassMap[original] = newClass this.newClassSize++ diff --git a/packages/shared/src/regex.ts b/packages/shared/src/regex.ts index b69f9991..ecc749b3 100644 --- a/packages/shared/src/regex.ts +++ b/packages/shared/src/regex.ts @@ -10,8 +10,8 @@ export function makeRegex( options: { exact: boolean } = { - exact: true - } + exact: true, + }, ) { - return new RegExp('(?<=^|[\\s"])' + escapeStringRegexp(str) + (options.exact ? '(?=$|[\\s"])' : ''), 'g') + return new RegExp(`(?<=^|[\\s"])${escapeStringRegexp(str)}${options.exact ? '(?=$|[\\s"])' : ''}`, 'g') } diff --git a/packages/shared/src/split.ts b/packages/shared/src/split.ts index 7f6669c7..7ae75bdb 100644 --- a/packages/shared/src/split.ts +++ b/packages/shared/src/split.ts @@ -1,15 +1,12 @@ -export const validateFilterRE = /[\w%-?\u00A0-\uFFFF-]/ +export const validateFilterRE = /[\w%-?\u00A0-\uFFFF]/ export function isValidSelector(selector = ''): selector is string { return validateFilterRE.test(selector) } -export const splitCode = ( - code: string, - options: { - splitQuote?: boolean - } = { splitQuote: true } -) => { +export function splitCode(code: string, options: { + splitQuote?: boolean +} = { splitQuote: true }) { const regex = options.splitQuote ? /[\s"]+/ : /\s+/ - return code.split(regex).filter((x) => isValidSelector(x)) + return code.split(regex).filter(x => isValidSelector(x)) } diff --git a/packages/shared/src/utils.ts b/packages/shared/src/utils.ts index 286f82d6..6fe904a4 100644 --- a/packages/shared/src/utils.ts +++ b/packages/shared/src/utils.ts @@ -4,17 +4,16 @@ export const preserveClassNames = [ 'ease-out', 'ease-linear', 'ease-in', - 'ease-in-out' + 'ease-in-out', // https://tailwindcss.com/docs/transition-timing-function end ] -// eslint-disable-next-line unicorn/no-array-reduce const preserveClassNamesMap = preserveClassNames.reduce<(typeof preserveClassNames)[number], true>>((acc, cur) => { acc[cur] = true return acc }, {}) -export const defaultMangleClassFilter = (className: string) => { +export function defaultMangleClassFilter(className: string) { if (preserveClassNamesMap[className]) { return false } @@ -40,7 +39,8 @@ export function groupBy(arr: T[], cb: (arg: T) => string): Record { it('trailing slash should exact match case 0', () => { const testCase = 'bg-red-500 bg-red-500/50' const regex = makeRegex('bg-red-500', { - exact: false + exact: false, }) const arr = [...testCase.matchAll(regex)] expect(arr.length).toBe(2) diff --git a/packages/shared/test/split.test.ts b/packages/shared/test/split.test.ts index 93c0f07b..46f16789 100644 --- a/packages/shared/test/split.test.ts +++ b/packages/shared/test/split.test.ts @@ -2,28 +2,28 @@ import { splitCode } from '@/split' describe('split code', () => { it('split vue static str', () => { - const testCase = - 'tl = ai("", 1),' + const testCase + = 'tl = ai("", 1),' const arr = splitCode(testCase) expect(arr).toMatchSnapshot() }) it('split vue static str with splitQuote false', () => { - const testCase = - 'tl = ai("", 1),' + const testCase + = 'tl = ai("", 1),' const arr = splitCode(testCase, { - splitQuote: false + splitQuote: false, }) expect(arr).toMatchSnapshot() }) it('split long class string', () => { - const testCase = - 'fixed left-0 top-0 flex w-full justify-center border-b border-gray-300 bg-gradient-to-b from-zinc-200 pb-6 pt-8 backdrop-blur-2xl dark:border-neutral-800 dark:bg-zinc-800/30 dark:from-inherit lg:static lg:w-auto lg:rounded-xl lg:border lg:bg-gray-200 lg:p-4 lg:dark:bg-zinc-800/30' + const testCase + = 'fixed left-0 top-0 flex w-full justify-center border-b border-gray-300 bg-gradient-to-b from-zinc-200 pb-6 pt-8 backdrop-blur-2xl dark:border-neutral-800 dark:bg-zinc-800/30 dark:from-inherit lg:static lg:w-auto lg:rounded-xl lg:border lg:bg-gray-200 lg:p-4 lg:dark:bg-zinc-800/30' const arr = splitCode(testCase, { - splitQuote: false + splitQuote: false, }) expect(arr).toMatchSnapshot() }) diff --git a/packages/shared/tsconfig.json b/packages/shared/tsconfig.json index d6c27bee..65483f39 100644 --- a/packages/shared/tsconfig.json +++ b/packages/shared/tsconfig.json @@ -12,4 +12,4 @@ "src", "test" ] -} \ No newline at end of file +} diff --git a/packages/shared/vitest.config.ts b/packages/shared/vitest.config.ts index a688df69..925b0dbf 100644 --- a/packages/shared/vitest.config.ts +++ b/packages/shared/vitest.config.ts @@ -6,10 +6,10 @@ export default defineProject({ alias: [ { find: '@', - replacement: path.resolve(__dirname, './src') - } + replacement: path.resolve(__dirname, './src'), + }, ], globals: true, - testTimeout: 60_000 - } + testTimeout: 60_000, + }, }) diff --git a/packages/tailwindcss-patch/bin/tw-patch.js b/packages/tailwindcss-patch/bin/tw-patch.js index 9e6db27c..f82195e2 100755 --- a/packages/tailwindcss-patch/bin/tw-patch.js +++ b/packages/tailwindcss-patch/bin/tw-patch.js @@ -1,6 +1,7 @@ #!/usr/bin/env node const fs = require('node:fs') const path = require('node:path') + const cliPath = path.resolve(__dirname, '../dist/cli.cjs') if (fs.existsSync(cliPath)) { require(cliPath) diff --git a/packages/tailwindcss-patch/build.config.ts b/packages/tailwindcss-patch/build.config.ts index 736e2525..a8c0dcfb 100644 --- a/packages/tailwindcss-patch/build.config.ts +++ b/packages/tailwindcss-patch/build.config.ts @@ -9,11 +9,11 @@ export default defineBuildConfig({ cjsBridge: true, dts: { // https://github.com/unjs/unbuild/issues/135 - respectExternal: false - } + respectExternal: false, + }, }, alias: { - '@': path.resolve(__dirname, './src') + '@': path.resolve(__dirname, './src'), }, - declaration: true + declaration: true, }) diff --git a/packages/tailwindcss-patch/how-it-works.md b/packages/tailwindcss-patch/how-it-works.md index 82838aa1..21df3de5 100644 --- a/packages/tailwindcss-patch/how-it-works.md +++ b/packages/tailwindcss-patch/how-it-works.md @@ -2,10 +2,10 @@ id: 20230630 title: 'How to get the context of tailwindcss at runtime?' date: 2023-06-30 -description: 'The core principle of `tailwindcss-patch`' -authors: +description: 'The core principle of `tailwindcss-patch`' +authors: - icebreaker -tags: +tags: - 'tailwindcss' - 'context' - 'runtime' @@ -79,7 +79,7 @@ We install version `3.3.2` of `tailwindcss` (the latest version as of 20230630) "description": "A utility-first CSS framework for rapidly building custom user interfaces", "license": "MIT", "main": "lib/index.js", - "types": "types/index.d.ts", + "types": "types/index.d.ts" // ... } ``` @@ -172,7 +172,7 @@ module.exports = function tailwindcss (configOrPath) { console.time('JIT TOTAL') return root }, function (root, result) { -+ // clear context each time ++ // clear context each time + contextRef.value.length = 0 let _findAtConfigPath1 // Use the path for the `@config` directive if it exists, otherwise use the @@ -257,7 +257,7 @@ function getContexts() { const distPath = path.dirname(twPath) - let injectFilePath = path.join(distPath, 'plugin.js') + const injectFilePath = path.join(distPath, 'plugin.js') const mo = require(injectFilePath) if (mo.contextRef) { diff --git a/packages/tailwindcss-patch/package.json b/packages/tailwindcss-patch/package.json index 7e5d2513..7a09cd3e 100644 --- a/packages/tailwindcss-patch/package.json +++ b/packages/tailwindcss-patch/package.json @@ -2,6 +2,22 @@ "name": "tailwindcss-patch", "version": "2.2.4", "description": "patch tailwindcss for exposing context and extract classes", + "author": "SonOfMagic ", + "license": "MIT", + "homepage": "https://github.com/sonofmagic/tailwindcss-mangle", + "repository": { + "type": "git", + "url": "git+https://github.com/sonofmagic/tailwindcss-mangle.git" + }, + "bugs": { + "url": "https://github.com/sonofmagic/tailwindcss-mangle/issues" + }, + "keywords": [ + "tailwindcss", + "patch", + "extract", + "class" + ], "main": "./dist/index.cjs", "types": "./dist/index.d.ts", "bin": { @@ -9,8 +25,8 @@ "tailwindcss-patch": "bin/tw-patch.js" }, "files": [ - "dist", - "bin" + "bin", + "dist" ], "scripts": { "dev": "unbuild --sourcemap", @@ -19,14 +35,6 @@ "test:dev": "vitest", "patch": "node bin/tw-patch.js install" }, - "keywords": [ - "tailwindcss", - "patch", - "extract", - "class" - ], - "author": "SonOfMagic ", - "license": "MIT", "publishConfig": { "access": "public", "registry": "https://registry.npmjs.org/" @@ -39,14 +47,6 @@ "optional": true } }, - "devDependencies": { - "@types/babel__generator": "^7.6.8", - "@types/babel__traverse": "^7.20.5", - "@types/resolve": "^1.20.6", - "@types/semver": "^7.5.8", - "pkg-types": "^1.1.1", - "tailwindcss": "^3.4.3" - }, "dependencies": { "@babel/generator": "^7.24.5", "@babel/parser": "^7.24.5", @@ -60,13 +60,13 @@ "resolve": "^1.22.8", "semver": "^7.6.2" }, - "homepage": "https://github.com/sonofmagic/tailwindcss-mangle", - "repository": { - "type": "git", - "url": "git+https://github.com/sonofmagic/tailwindcss-mangle.git" - }, - "bugs": { - "url": "https://github.com/sonofmagic/tailwindcss-mangle/issues" + "devDependencies": { + "@types/babel__generator": "^7.6.8", + "@types/babel__traverse": "^7.20.5", + "@types/resolve": "^1.20.6", + "@types/semver": "^7.5.8", + "pkg-types": "^1.1.1", + "tailwindcss": "^3.4.3" }, "directories": { "test": "test" diff --git a/packages/tailwindcss-patch/src/cli.ts b/packages/tailwindcss-patch/src/cli.ts index 4e589386..b9dc697d 100644 --- a/packages/tailwindcss-patch/src/cli.ts +++ b/packages/tailwindcss-patch/src/cli.ts @@ -1,6 +1,6 @@ import cac from 'cac' -import { getConfig, initConfig, configName } from './config' -import { createPatch, getPatchOptions, TailwindcssPatcher } from './core' +import { configName, getConfig, initConfig } from './config' +import { TailwindcssPatcher, createPatch, getPatchOptions } from './core' function init() { const cwd = process.cwd() @@ -25,7 +25,7 @@ cli.command('extract').action(async () => { if (config) { const twPatcher = new TailwindcssPatcher() const p = await twPatcher.extract(config.patch) - console.log('✨ tailwindcss-patch extract success! file path: ' + p) + console.log(`✨ tailwindcss-patch extract success! file path: ${p}`) } }) diff --git a/packages/tailwindcss-patch/src/core/cache.ts b/packages/tailwindcss-patch/src/core/cache.ts index a0e783bb..aa4f110e 100644 --- a/packages/tailwindcss-patch/src/core/cache.ts +++ b/packages/tailwindcss-patch/src/core/cache.ts @@ -9,13 +9,13 @@ export function getCacheOptions(options?: CacheOptions | boolean) { switch (typeof options) { case 'undefined': { cache = { - enable: false + enable: false, } break } case 'boolean': { cache = { - enable: options + enable: options, } break } @@ -38,7 +38,7 @@ export class CacheManager { const exists = fs.existsSync(cacheDirectory) if (!exists) { fs.mkdirSync(cacheDirectory, { - recursive: true + recursive: true, }) } return cacheDirectory @@ -54,7 +54,7 @@ export class CacheManager { dir, file, filename, - strategy: 'merge' + strategy: 'merge', } } @@ -64,7 +64,8 @@ export class CacheManager { this.mkdir(dir) fs.writeFileSync(filename, JSON.stringify([...data], undefined, 2), 'utf8') return filename - } catch { + } + catch { log('write cache file fail!') } } @@ -76,12 +77,14 @@ export class CacheManager { const data = fs.readFileSync(filename, 'utf8') return new Set(JSON.parse(data)) } - } catch { - log('parse cache content fail! path:' + filename) + } + catch { + log(`parse cache content fail! path:${filename}`) try { fs.unlinkSync(filename) - } catch { - log('delete cache file fail! path:' + filename) + } + catch { + log(`delete cache file fail! path:${filename}`) } } } diff --git a/packages/tailwindcss-patch/src/core/exposeContext.ts b/packages/tailwindcss-patch/src/core/exposeContext.ts index 88f1954f..d92d3f22 100644 --- a/packages/tailwindcss-patch/src/core/exposeContext.ts +++ b/packages/tailwindcss-patch/src/core/exposeContext.ts @@ -5,7 +5,7 @@ import { requireResolve } from '@/utils' export function getTailwindcssEntry(basedir?: string) { return requireResolve('tailwindcss', { - basedir + basedir, }) } @@ -28,7 +28,7 @@ export function getContexts(basedir?: string): TailwindcssRuntimeContext[] { export function getClassCaches(basedir?: string): TailwindcssClassCache[] { const contexts = getContexts(basedir) - return contexts.map((x) => x.classCache) + return contexts.map(x => x.classCache) } export function getClassCacheSet(basedir?: string, options?: { removeUniversalSelector?: boolean }): Set { diff --git a/packages/tailwindcss-patch/src/core/inspector.ts b/packages/tailwindcss-patch/src/core/inspector.ts index cde52dbc..4a0b2a8d 100644 --- a/packages/tailwindcss-patch/src/core/inspector.ts +++ b/packages/tailwindcss-patch/src/core/inspector.ts @@ -1,5 +1,5 @@ import * as t from '@babel/types' -import { parse, traverse, generate } from '@/babel' +import { generate, parse, traverse } from '@/babel' // crash code export function inspectProcessTailwindFeaturesReturnContext(content: string) { @@ -21,12 +21,12 @@ export function inspectProcessTailwindFeaturesReturnContext(content: string) { } } } - } + }, }) return { code: hasPatched ? content : generate(ast).code, - hasPatched + hasPatched, } } @@ -42,28 +42,28 @@ export function inspectPostcssPlugin(content: string) { // find module.exports = function tailwindcss(configOrPath) const idx = n.body.findIndex((x) => { return ( - t.isExpressionStatement(x) && - t.isAssignmentExpression(x.expression) && - t.isMemberExpression(x.expression.left) && - t.isFunctionExpression(x.expression.right) && - x.expression.right.id?.name === 'tailwindcss' + t.isExpressionStatement(x) + && t.isAssignmentExpression(x.expression) + && t.isMemberExpression(x.expression.left) + && t.isFunctionExpression(x.expression.right) + && x.expression.right.id?.name === 'tailwindcss' ) }) if (idx > -1) { const prevStatement = n.body[idx - 1] const lastStatement = n.body[n.body.length - 1] - const hasPatchedCondition0 = - prevStatement && - t.isVariableDeclaration(prevStatement) && - prevStatement.declarations.length === 1 && - t.isIdentifier(prevStatement.declarations[0].id) && - prevStatement.declarations[0].id.name === variableName - const hasPatchedCondition1 = - t.isExpressionStatement(lastStatement) && - t.isAssignmentExpression(lastStatement.expression) && - t.isIdentifier(lastStatement.expression.right) && - lastStatement.expression.right.name === variableName + const hasPatchedCondition0 + = prevStatement + && t.isVariableDeclaration(prevStatement) + && prevStatement.declarations.length === 1 + && t.isIdentifier(prevStatement.declarations[0].id) + && prevStatement.declarations[0].id.name === variableName + const hasPatchedCondition1 + = t.isExpressionStatement(lastStatement) + && t.isAssignmentExpression(lastStatement.expression) + && t.isIdentifier(lastStatement.expression.right) + && lastStatement.expression.right.name === variableName hasPatched = hasPatchedCondition0 || hasPatchedCondition1 if (!hasPatched) { @@ -71,7 +71,7 @@ export function inspectPostcssPlugin(content: string) { // value: [] // }; const statement = t.variableDeclaration('const', [ - t.variableDeclarator(t.identifier(variableName), t.objectExpression([t.objectProperty(t.identifier(valueKey), t.arrayExpression())])) + t.variableDeclarator(t.identifier(variableName), t.objectExpression([t.objectProperty(t.identifier(valueKey), t.arrayExpression())])), ]) n.body.splice(idx, 0, statement) // module.exports.contextRef = contextRef; @@ -80,9 +80,9 @@ export function inspectPostcssPlugin(content: string) { t.assignmentExpression( '=', t.memberExpression(t.memberExpression(t.identifier('module'), t.identifier('exports')), t.identifier(exportKey)), - t.identifier(variableName) - ) - ) + t.identifier(variableName), + ), + ), ) } } @@ -100,11 +100,11 @@ export function inspectPostcssPlugin(content: string) { const keyMatched = t.isIdentifier(properties[0].key) && properties[0].key.name === 'postcssPlugin' const pluginsMatched = t.isIdentifier(properties[1].key) && properties[1].key.name === 'plugins' if ( - pluginsMatched && - keyMatched && - t.isCallExpression(properties[1].value) && - t.isMemberExpression(properties[1].value.callee) && - t.isArrayExpression(properties[1].value.callee.object) + pluginsMatched + && keyMatched + && t.isCallExpression(properties[1].value) + && t.isMemberExpression(properties[1].value.callee) + && t.isArrayExpression(properties[1].value.callee.object) ) { const pluginsCode = properties[1].value.callee.object.elements if (pluginsCode[1] && t.isFunctionExpression(pluginsCode[1])) { @@ -118,16 +118,16 @@ export function inspectPostcssPlugin(content: string) { t.memberExpression( t.memberExpression(t.identifier(variableName), t.identifier('value')), - t.identifier('push') + t.identifier('push'), ), - [lastStatement.expression] - ) + [lastStatement.expression], + ), ) targetBlockStatement.body[targetBlockStatement.body.length - 1] = newExpressionStatement } - const ifIdx = targetBlockStatement.body.findIndex((x) => t.isIfStatement(x)) + const ifIdx = targetBlockStatement.body.findIndex(x => t.isIfStatement(x)) if (ifIdx > -1) { const ifRoot = targetBlockStatement.body[ifIdx] if (t.isBlockStatement(ifRoot.consequent) && ifRoot.consequent.body[1] && t.isForOfStatement(ifRoot.consequent.body[1])) { @@ -138,7 +138,7 @@ export function inspectPostcssPlugin(content: string) { const target = if2.consequent.body[0] // contextRef.value.push((0, _processTailwindFeatures.default)(context)(root1, result)); const newExpressionStatement = t.expressionStatement( - t.callExpression(t.memberExpression(t.memberExpression(t.identifier(variableName), t.identifier('value')), t.identifier('push')), [target.expression]) + t.callExpression(t.memberExpression(t.memberExpression(t.identifier(variableName), t.identifier('value')), t.identifier('push')), [target.expression]), ) if2.consequent.body[0] = newExpressionStatement } @@ -155,9 +155,9 @@ export function inspectPostcssPlugin(content: string) { t.assignmentExpression( '=', t.memberExpression(t.memberExpression(t.identifier(variableName), t.identifier(valueKey)), t.identifier('length')), - t.numericLiteral(0) - ) - ) + t.numericLiteral(0), + ), + ), ) } } @@ -165,7 +165,7 @@ export function inspectPostcssPlugin(content: string) { } } // start = true - } + }, // BlockStatement(p) { // const n = p.node // if (start && p.parent.type === 'FunctionExpression' && !p.parent.id) { @@ -175,6 +175,6 @@ export function inspectPostcssPlugin(content: string) { }) return { code: hasPatched ? content : generate(ast).code, - hasPatched + hasPatched, } } diff --git a/packages/tailwindcss-patch/src/core/postcss.ts b/packages/tailwindcss-patch/src/core/postcss.ts index ded13039..47be7941 100644 --- a/packages/tailwindcss-patch/src/core/postcss.ts +++ b/packages/tailwindcss-patch/src/core/postcss.ts @@ -1,5 +1,5 @@ import path from 'node:path' -import url from 'node:url' +import process from 'node:process' import postcss from 'postcss' import { lilconfig } from 'lilconfig' import createJiti from 'jiti' @@ -10,7 +10,7 @@ import createJiti from 'jiti' // } const jiti = createJiti(__filename) -export async function processTailwindcss(options: { cwd?: string; config?: string }) { +export async function processTailwindcss(options: { cwd?: string, config?: string }) { options.cwd = options.cwd ?? process.cwd() let config = options.config // 没有具体指定的话,就走下面的分支 @@ -23,7 +23,7 @@ export async function processTailwindcss(options: { cwd?: string; config?: strin `${moduleName}.config.mjs`, `${moduleName}.config.ts`, `${moduleName}.config.cts`, - `${moduleName}.config.mts` + `${moduleName}.config.mts`, ], loaders: { // 默认支持 js 和 cjs 2种格式 @@ -32,8 +32,8 @@ export async function processTailwindcss(options: { cwd?: string; config?: strin '.mjs': jiti, '.ts': jiti, '.cts': jiti, - '.mts': jiti - } + '.mts': jiti, + }, }).search(options.cwd) if (!result) { throw new Error(`No TailwindCSS Config found in: ${options.cwd}`) @@ -43,9 +43,9 @@ export async function processTailwindcss(options: { cwd?: string; config?: strin return await postcss([ require('tailwindcss')({ - config - }) + config, + }), ]).process('@tailwind base;@tailwind components;@tailwind utilities;', { - from: undefined + from: undefined, }) } diff --git a/packages/tailwindcss-patch/src/core/runtime-patcher.ts b/packages/tailwindcss-patch/src/core/runtime-patcher.ts index 52295f91..7d92b09f 100644 --- a/packages/tailwindcss-patch/src/core/runtime-patcher.ts +++ b/packages/tailwindcss-patch/src/core/runtime-patcher.ts @@ -4,7 +4,7 @@ import { gte } from 'semver' import type { PackageJson } from 'pkg-types' import { defu } from 'defu' import { inspectPostcssPlugin, inspectProcessTailwindFeaturesReturnContext } from './inspector' -import type { PatchOptions, InternalPatchOptions } from '@/types' +import type { InternalPatchOptions, PatchOptions } from '@/types' import { getDefaultPatchOptions } from '@/defaults' import { ensureFileContent, requireResolve } from '@/utils' @@ -12,15 +12,16 @@ export function getInstalledPkgJsonPath(options: PatchOptions = {}) { try { // const cwd = process.cwd() const tmpJsonPath = requireResolve(`tailwindcss/package.json`, { - paths: options.paths + paths: options.paths, }) return tmpJsonPath // https://github.com/sonofmagic/weapp-tailwindcss-webpack-plugin // only tailwindcss version > 3.0.0 - } catch (error) { + } + catch (error) { if ((error).code === 'MODULE_NOT_FOUND') { - console.warn("Can't find npm pkg: `tailwindcss`, Please ensure it has been installed!") + console.warn('Can\'t find npm pkg: `tailwindcss`, Please ensure it has been installed!') } } } @@ -29,9 +30,9 @@ export function getPatchOptions(options: PatchOptions = {}) { return defu( options, { - basedir: process.cwd() + basedir: process.cwd(), }, - getDefaultPatchOptions() + getDefaultPatchOptions(), ) as InternalPatchOptions } @@ -40,8 +41,9 @@ export function createPatch(opt: InternalPatchOptions) { try { const pkgJsonPath = getInstalledPkgJsonPath(opt) return internalPatch(pkgJsonPath, opt) - } catch (error) { - console.warn(`patch tailwindcss failed:` + (error).message) + } + catch (error) { + console.warn(`patch tailwindcss failed:${(error).message}`) } } } @@ -50,12 +52,12 @@ export function monkeyPatchForExposingContext(twDir: string, opt: InternalPatchO const processTailwindFeaturesFilePath = path.resolve(twDir, 'lib/processTailwindFeatures.js') const processTailwindFeaturesContent = ensureFileContent(processTailwindFeaturesFilePath) - const result: { processTailwindFeatures?: string; plugin?: string } & Record = {} + const result: { processTailwindFeatures?: string, plugin?: string } & Record = {} if (processTailwindFeaturesContent) { const { code, hasPatched } = inspectProcessTailwindFeaturesReturnContext(processTailwindFeaturesContent) if (!hasPatched && opt.overwrite) { fs.writeFileSync(processTailwindFeaturesFilePath, code, { - encoding: 'utf8' + encoding: 'utf8', }) console.log('patch tailwindcss processTailwindFeatures for return content successfully!') } @@ -69,7 +71,7 @@ export function monkeyPatchForExposingContext(twDir: string, opt: InternalPatchO const { code, hasPatched } = inspectPostcssPlugin(pluginContent) if (!hasPatched && opt.overwrite) { fs.writeFileSync(pluginFilePath, code, { - encoding: 'utf8' + encoding: 'utf8', }) console.log('patch tailwindcss for expose runtime content successfully!') } diff --git a/packages/tailwindcss-patch/src/core/tw-patcher.ts b/packages/tailwindcss-patch/src/core/tw-patcher.ts index 7e8b8e9a..348b0514 100644 --- a/packages/tailwindcss-patch/src/core/tw-patcher.ts +++ b/packages/tailwindcss-patch/src/core/tw-patcher.ts @@ -4,9 +4,10 @@ import { getClassCacheSet, getContexts, getTailwindcssEntry } from './exposeCont import { CacheManager, getCacheOptions } from './cache' import { createPatch, getPatchOptions } from './runtime-patcher' import { processTailwindcss } from './postcss' -import { UserConfig } from '@/config' +import type { UserConfig } from '@/config' import { ensureDir } from '@/utils' -import type { InternalCacheOptions, InternalPatchOptions, TailwindcssPatcherOptions, CacheStrategy } from '@/types' +import type { CacheStrategy, InternalCacheOptions, InternalPatchOptions, TailwindcssPatcherOptions } from '@/types' + export class TailwindcssPatcher { public rawOptions: TailwindcssPatcherOptions public cacheOptions: InternalCacheOptions @@ -43,14 +44,15 @@ export class TailwindcssPatcher { * @param basedir * @returns */ - getClassSet(options?: { basedir?: string; cacheStrategy?: CacheStrategy; removeUniversalSelector?: boolean }) { + getClassSet(options?: { basedir?: string, cacheStrategy?: CacheStrategy, removeUniversalSelector?: boolean }) { const { basedir, cacheStrategy = this.cacheOptions.strategy ?? 'merge', removeUniversalSelector = true } = options ?? {} const set = getClassCacheSet(basedir, { - removeUniversalSelector + removeUniversalSelector, }) if (cacheStrategy === 'overwrite') { set.size > 0 && this.setCache(set) - } else if (cacheStrategy === 'merge') { + } + else if (cacheStrategy === 'merge') { const cacheSet = this.getCache() if (cacheSet) { for (const x of cacheSet) { @@ -75,7 +77,7 @@ export class TailwindcssPatcher { await processTailwindcss(tailwindcss) const set = this.getClassSet({ - removeUniversalSelector + removeUniversalSelector, }) if (filename) { await ensureDir(dirname(filename)) diff --git a/packages/tailwindcss-patch/src/defaults.ts b/packages/tailwindcss-patch/src/defaults.ts index e1b89274..e683688c 100644 --- a/packages/tailwindcss-patch/src/defaults.ts +++ b/packages/tailwindcss-patch/src/defaults.ts @@ -1,7 +1,7 @@ -import type { PatchOptions, DeepRequired } from './types' +import type { DeepRequired, PatchOptions } from './types' export function getDefaultPatchOptions(): DeepRequired { return { - overwrite: true + overwrite: true, } } diff --git a/packages/tailwindcss-patch/src/logger.ts b/packages/tailwindcss-patch/src/logger.ts index bc09c170..7be2d482 100644 --- a/packages/tailwindcss-patch/src/logger.ts +++ b/packages/tailwindcss-patch/src/logger.ts @@ -1,5 +1,5 @@ import { pkgName } from './constants' export function log(message?: any, ...optionalParams: any[]) { - return console.log(`[${pkgName}]:` + message, ...optionalParams) + return console.log(`[${pkgName}]:${message}`, ...optionalParams) } diff --git a/packages/tailwindcss-patch/src/types.ts b/packages/tailwindcss-patch/src/types.ts index dbef4fb0..223dc386 100644 --- a/packages/tailwindcss-patch/src/types.ts +++ b/packages/tailwindcss-patch/src/types.ts @@ -1,6 +1,7 @@ /* eslint-disable @typescript-eslint/ban-types */ -import type { Rule, Node } from 'postcss' +import type { Node, Rule } from 'postcss' import type { Config } from 'tailwindcss' + export type CacheStrategy = 'merge' | 'overwrite' export interface CacheOptions { @@ -37,15 +38,15 @@ export type TailwindcssClassCache = Map< string, ( | { - layer: string - options: Record - sort: Record - } + layer: string + options: Record + sort: Record + } | Rule )[] > -export type TailwindcssRuntimeContext = { +export interface TailwindcssRuntimeContext { applyClassCache: Map candidateRuleCache: Map< string | string, @@ -60,7 +61,7 @@ export type TailwindcssRuntimeContext = { parentLayer: string variants: any }, - Node + Node, ] > > diff --git a/packages/tailwindcss-patch/src/utils.ts b/packages/tailwindcss-patch/src/utils.ts index b2769388..218638ba 100644 --- a/packages/tailwindcss-patch/src/utils.ts +++ b/packages/tailwindcss-patch/src/utils.ts @@ -2,6 +2,7 @@ import fss from 'node:fs' import fs from 'node:fs/promises' import type { SyncOpts } from 'resolve' import pkg from 'resolve' + const { sync } = pkg export function ensureFileContent(filepaths: string | string[]) { @@ -12,7 +13,7 @@ export function ensureFileContent(filepaths: string | string[]) { for (const filepath of filepaths) { if (fss.existsSync(filepath)) { content = fss.readFileSync(filepath, { - encoding: 'utf8' + encoding: 'utf8', }) break } @@ -27,9 +28,10 @@ export function requireResolve(id: string, opts?: SyncOpts) { export async function ensureDir(p: string) { try { await fs.access(p) - } catch { + } + catch { await fs.mkdir(p, { - recursive: true + recursive: true, }) } } diff --git a/packages/tailwindcss-patch/test/cache.test.ts b/packages/tailwindcss-patch/test/cache.test.ts index 7dcdc78f..c69f685b 100644 --- a/packages/tailwindcss-patch/test/cache.test.ts +++ b/packages/tailwindcss-patch/test/cache.test.ts @@ -2,7 +2,7 @@ import path from 'node:path' import fs from 'node:fs' import { getCss } from './utils' import { pkgName } from '@/constants' -import { TailwindcssPatcher, CacheManager } from '@/core' +import { CacheManager, TailwindcssPatcher } from '@/core' import { getCacheOptions } from '@/core/cache' describe('cache', () => { @@ -14,10 +14,10 @@ describe('cache', () => { expect(cm.getOptions).toBeDefined() expect(cm.getOptions().dir).toBe(path.resolve(process.cwd(), './node_modules/.cache', pkgName)) expect(getCacheOptions(false)).toEqual({ - enable: false + enable: false, }) expect(getCacheOptions(true)).toEqual({ - enable: true + enable: true, }) }) @@ -34,7 +34,7 @@ describe('cache', () => { // const opt = getCacheOptions() const opt = { dir: path.resolve(__dirname, 'fixtures/cache'), - file: 'raw-method.json' + file: 'raw-method.json', } cm = new CacheManager(opt) let cache: Set | undefined @@ -51,7 +51,7 @@ describe('cache', () => { it('read broken cache', () => { // const opt = getCacheOptions() - const dir = path.resolve(__dirname, './fixtures', pkgName + '-broken') + const dir = path.resolve(__dirname, './fixtures', `${pkgName}-broken`) const filepath = path.resolve(dir, 'index.json') cm.mkdir(dir) fs.writeFileSync( @@ -59,10 +59,10 @@ describe('cache', () => { `{ [ '2',"fuck you",{s:'12} }`, - 'utf8' + 'utf8', ) cm = new CacheManager({ - dir + dir, }) expect(fs.existsSync(filepath)).toBe(true) const cache = cm.read() @@ -75,15 +75,15 @@ describe('cache', () => { const twPatcher = new TailwindcssPatcher({ cache: { dir, - file: 'merge-multiple-context.json' - } + file: 'merge-multiple-context.json', + }, }) twPatcher.setCache(new Set()) await getCss(['text-[100px]']) let ctxs = twPatcher.getContexts() expect(ctxs.length).toBe(1) let set = twPatcher.getClassSet({ - removeUniversalSelector: false + removeUniversalSelector: false, }) expect(set.size).toBeGreaterThan(0) expect(set.size).toBe(2) diff --git a/packages/tailwindcss-patch/test/config.test.ts b/packages/tailwindcss-patch/test/config.test.ts index bb18615f..e85662a4 100644 --- a/packages/tailwindcss-patch/test/config.test.ts +++ b/packages/tailwindcss-patch/test/config.test.ts @@ -2,7 +2,7 @@ import { resolve } from 'node:path' import { existsSync } from 'node:fs' import { deleteAsync } from 'del' import { fixturesRoot } from './utils' -import { initConfig, getConfig, getDefaultUserConfig, getDefaultMangleUserConfig } from '@/config' +import { getConfig, getDefaultMangleUserConfig, getDefaultUserConfig, initConfig } from '@/config' describe('config', () => { it('0.default', async () => { @@ -27,13 +27,13 @@ describe('config', () => { output: { filename: 'xxx/yyy/zzz.json', loose: false, - removeUniversalSelector: false + removeUniversalSelector: false, }, tailwindcss: { - cwd: 'aaa/bbb/cc' - } + cwd: 'aaa/bbb/cc', + }, }, - mangle: getDefaultMangleUserConfig() + mangle: getDefaultMangleUserConfig(), }) }) }) diff --git a/packages/tailwindcss-patch/test/context.test.ts b/packages/tailwindcss-patch/test/context.test.ts index a15ea581..23208476 100644 --- a/packages/tailwindcss-patch/test/context.test.ts +++ b/packages/tailwindcss-patch/test/context.test.ts @@ -1,5 +1,6 @@ import { getCss, getTestCase } from './utils' -import { getContexts, getClassCacheSet } from '@/core' +import { getClassCacheSet, getContexts } from '@/core' + describe('common usage', () => { it('hello-world', async () => { const result = await getCss(getTestCase('hello-world.html')) @@ -22,14 +23,14 @@ describe('common usage', () => { }) // https://github.com/sonofmagic/weapp-tailwindcss-webpack-plugin/issues/158 - it("bg-[url('img_src')] lose efficacy", async () => { + it('bg-[url(\'img_src\')] lose efficacy', async () => { await getCss([getTestCase('img-url.jsx')]) const ctxs = getContexts() expect(ctxs).toBeTruthy() const set = getClassCacheSet() expect(set.size).toBeGreaterThan(0) expect(set.size).toBe(2) - expect([...set.values()][1]).toBe("bg-[url('https://xxx.webp')]") + expect([...set.values()][1]).toBe('bg-[url(\'https://xxx.webp\')]') // }) diff --git a/packages/tailwindcss-patch/test/exposeContext.test.ts b/packages/tailwindcss-patch/test/exposeContext.test.ts index 7f0e8803..3e319b77 100644 --- a/packages/tailwindcss-patch/test/exposeContext.test.ts +++ b/packages/tailwindcss-patch/test/exposeContext.test.ts @@ -1,5 +1,6 @@ import path from 'node:path' import { getTailwindcssEntry } from '@/core/exposeContext' + describe('exposeContext', () => { it('getTailwindcssEntry', () => { const dirname = __dirname diff --git a/packages/tailwindcss-patch/test/index.test.ts b/packages/tailwindcss-patch/test/index.test.ts index 4627926c..db09e43a 100644 --- a/packages/tailwindcss-patch/test/index.test.ts +++ b/packages/tailwindcss-patch/test/index.test.ts @@ -5,14 +5,15 @@ const tailwindcssCasePath = path.resolve(__dirname, 'fixtures') const versionsPkgDir = path.resolve(tailwindcssCasePath, 'versions/package.json') function getTailwindcssVersion(str: string) { - // eslint-disable-next-line no-useless-escape const match = /^tailwindcss([\d.]*)$/.exec(str) if (match === null) { // 不是 tailwindcss return false - } else if (match[1] === '') { + } + else if (match[1] === '') { return 'lts' - } else { + } + else { return match[1] } } @@ -25,7 +26,7 @@ describe('versions-patch', () => { const v = getTailwindcssVersion(version) const res = internalPatch(path.resolve(tailwindcssCasePath, `versions/${v}/package.json`), { - overwrite: false + overwrite: false, }) expect(res).toMatchSnapshot() }) diff --git a/packages/tailwindcss-patch/test/inspector.test.ts b/packages/tailwindcss-patch/test/inspector.test.ts index 6f58e015..f1bcef37 100644 --- a/packages/tailwindcss-patch/test/inspector.test.ts +++ b/packages/tailwindcss-patch/test/inspector.test.ts @@ -1,6 +1,7 @@ import path from 'node:path' import fs from 'node:fs' import { inspectPostcssPlugin, inspectProcessTailwindFeaturesReturnContext } from '@/core' + const tailwindcssCasePath = path.resolve(__dirname, 'fixtures') const twltsLibPath = path.resolve(tailwindcssCasePath, 'versions/3.3.1/lib') diff --git a/packages/tailwindcss-patch/test/postcss.test.ts b/packages/tailwindcss-patch/test/postcss.test.ts index 74f68aef..fdefd161 100644 --- a/packages/tailwindcss-patch/test/postcss.test.ts +++ b/packages/tailwindcss-patch/test/postcss.test.ts @@ -10,13 +10,13 @@ describe('postcss', () => { const p = path.resolve(appRoot, '0.common') const twPatcher = new TailwindcssPatcher() const res = await processTailwindcss({ - cwd: p + cwd: p, }) expect(res.css).toMatchSnapshot() const res0 = twPatcher.getContexts() expect(res0.length).toBe(1) const set = twPatcher.getClassSet({ - removeUniversalSelector: false + removeUniversalSelector: false, }) expect(set.size).toBe(4) }) @@ -34,22 +34,22 @@ describe('postcss', () => { 'min-h-[12rpx]', 'max-h-[12rpx]', 'basis-[32rpx]', - 'text-[length:32rpx]' + 'text-[length:32rpx]', ].map((x) => { return { - raw: x + raw: x, } }), corePlugins: { - preflight: false - } + preflight: false, + }, } const { css } = await postcss([ require('tailwindcss')({ - config - }) + config, + }), ]).process('@tailwind base;@tailwind components;@tailwind utilities;', { - from: undefined + from: undefined, }) expect(css).toMatchSnapshot() diff --git a/packages/tailwindcss-patch/test/runtime-patcher.test.ts b/packages/tailwindcss-patch/test/runtime-patcher.test.ts index faadfba6..b0388992 100644 --- a/packages/tailwindcss-patch/test/runtime-patcher.test.ts +++ b/packages/tailwindcss-patch/test/runtime-patcher.test.ts @@ -10,7 +10,7 @@ describe('patcher', () => { it('getInstalledPkgJsonPath baseDir options', () => { const pkgJsonPath = getInstalledPkgJsonPath({ - basedir: path.resolve(__dirname, '../../../') + basedir: path.resolve(__dirname, '../../../'), }) expect(pkgJsonPath).toBeTruthy() }) diff --git a/packages/tailwindcss-patch/test/tw-patcher.test.ts b/packages/tailwindcss-patch/test/tw-patcher.test.ts index 9ca07280..92d6aba0 100644 --- a/packages/tailwindcss-patch/test/tw-patcher.test.ts +++ b/packages/tailwindcss-patch/test/tw-patcher.test.ts @@ -1,6 +1,7 @@ import path from 'node:path' import { getCss, getTestCase } from './utils' import { TailwindcssPatcher } from '@/core' + describe('class', () => { it('default', async () => { // const dir = path.resolve(__dirname, './fixtures/cache') @@ -11,7 +12,7 @@ describe('class', () => { const ctxs = twPatcher.getContexts() expect(ctxs.length).toBe(1) const set = twPatcher.getClassSet({ - removeUniversalSelector: false + removeUniversalSelector: false, }) expect(set.size).toBeGreaterThan(0) expect(set.size).toBe(4) @@ -21,8 +22,8 @@ describe('class', () => { const dir = path.resolve(__dirname, './fixtures/cache') const twPatcher = new TailwindcssPatcher({ cache: { - dir - } + dir, + }, }) const res = twPatcher.getCache() expect(res instanceof Set).toBe(true) @@ -35,7 +36,7 @@ describe('class', () => { expect(ctxs.length).toBe(1) const set = twPatcher.getClassSet({ cacheStrategy: 'overwrite', - removeUniversalSelector: false + removeUniversalSelector: false, }) expect(set.size).toBeGreaterThan(0) expect(set.size).toBe(5) @@ -47,7 +48,7 @@ describe('class', () => { let ctxs = twPatcher.getContexts() expect(ctxs.length).toBe(1) let set = twPatcher.getClassSet({ - removeUniversalSelector: false + removeUniversalSelector: false, }) expect(set.size).toBeGreaterThan(0) expect(set.size).toBe(2) @@ -59,7 +60,7 @@ describe('class', () => { ctxs = twPatcher.getContexts() expect(ctxs.length).toBe(1) set = twPatcher.getClassSet({ - removeUniversalSelector: false + removeUniversalSelector: false, }) expect(set.size).toBeGreaterThan(0) expect(set.size).toBe(2) diff --git a/packages/tailwindcss-patch/test/utils.ts b/packages/tailwindcss-patch/test/utils.ts index 07e45d41..6c428ab7 100644 --- a/packages/tailwindcss-patch/test/utils.ts +++ b/packages/tailwindcss-patch/test/utils.ts @@ -20,12 +20,12 @@ export async function getCss(raw: string | string[]) { tailwindcss({ content: raw.map((x) => { return { - raw: x + raw: x, } - }) - }) + }), + }), ]).process('@tailwind utilities;', { - from: undefined + from: undefined, }) return res.css } diff --git a/packages/tailwindcss-patch/tsconfig.json b/packages/tailwindcss-patch/tsconfig.json index d6c27bee..65483f39 100644 --- a/packages/tailwindcss-patch/tsconfig.json +++ b/packages/tailwindcss-patch/tsconfig.json @@ -12,4 +12,4 @@ "src", "test" ] -} \ No newline at end of file +} diff --git a/packages/tailwindcss-patch/tsup.config.ts b/packages/tailwindcss-patch/tsup.config.ts index 5b9fe667..3128f95b 100644 --- a/packages/tailwindcss-patch/tsup.config.ts +++ b/packages/tailwindcss-patch/tsup.config.ts @@ -5,6 +5,6 @@ export default defineConfig({ shims: true, sourcemap: false, clean: true, - format: ['cjs'], //, 'esm' - dts: true + format: ['cjs'], // , 'esm' + dts: true, }) diff --git a/packages/tailwindcss-patch/vitest.config.ts b/packages/tailwindcss-patch/vitest.config.ts index 80811a89..adcebc48 100644 --- a/packages/tailwindcss-patch/vitest.config.ts +++ b/packages/tailwindcss-patch/vitest.config.ts @@ -6,11 +6,11 @@ export default defineProject({ alias: [ { find: '@', - replacement: path.resolve(__dirname, './src') - } + replacement: path.resolve(__dirname, './src'), + }, ], globals: true, testTimeout: 60_000, - setupFiles: ['./vitest.setup.ts'] - } + setupFiles: ['./vitest.setup.ts'], + }, }) diff --git a/packages/unplugin-tailwind-merge/package.json b/packages/unplugin-tailwind-merge/package.json index e26f7b0e..f315eb3d 100644 --- a/packages/unplugin-tailwind-merge/package.json +++ b/packages/unplugin-tailwind-merge/package.json @@ -3,13 +3,13 @@ "version": "0.0.0", "private": true, "description": "To merge Tailwind CSS classes at compile time!", - "main": "index.js", - "scripts": {}, - "keywords": [], "author": "", "license": "MIT", + "keywords": [], + "main": "index.js", + "scripts": {}, "dependencies": { "tailwind-merge": "^2.3.0", "unplugin": "^1.10.1" } -} \ No newline at end of file +} diff --git a/packages/unplugin-tailwindcss-mangle/README.md b/packages/unplugin-tailwindcss-mangle/README.md index af9123db..3d9a89e6 100644 --- a/packages/unplugin-tailwindcss-mangle/README.md +++ b/packages/unplugin-tailwindcss-mangle/README.md @@ -47,9 +47,11 @@ npx tw-patch install ### 3. add `prepare` script in your `package.json` ```json +{ "scripts": { "prepare": "tw-patch install" - }, + } +} ``` ### 4. Run extract command @@ -109,7 +111,6 @@ module.exports = defineConfig({ } } }) - ``` #### Nuxt 3 @@ -117,7 +118,7 @@ module.exports = defineConfig({ ```ts import nuxtPlugin from 'unplugin-tailwindcss-mangle/nuxt' export default defineNuxtConfig({ - //... + // ... // https://github.com/nuxt/nuxt/issues/20428 // you must set this option to false to enable vite extract css experimental: { @@ -132,7 +133,6 @@ export default defineNuxtConfig({ ] ] }) - ``` ## Options @@ -150,7 +150,7 @@ because plugin will **traverse** all `html class attr` and `js StringLiteral` to it's dangerous to mangle some `js StringLiteral` like: ```js -const innerHTML = "i'm flex and relative and grid" +const innerHTML = 'i\'m flex and relative and grid' document.body.innerHTML = innerHTML ``` diff --git a/packages/unplugin-tailwindcss-mangle/build.config.ts b/packages/unplugin-tailwindcss-mangle/build.config.ts index 45c5d795..1e185024 100644 --- a/packages/unplugin-tailwindcss-mangle/build.config.ts +++ b/packages/unplugin-tailwindcss-mangle/build.config.ts @@ -9,11 +9,11 @@ export default defineBuildConfig({ cjsBridge: true, dts: { // https://github.com/unjs/unbuild/issues/135 - respectExternal: false - } + respectExternal: false, + }, }, alias: { - '@': path.resolve(__dirname, './src') + '@': path.resolve(__dirname, './src'), }, - declaration: true + declaration: true, }) diff --git a/packages/unplugin-tailwindcss-mangle/package.json b/packages/unplugin-tailwindcss-mangle/package.json index 69176a1e..e695dcc3 100644 --- a/packages/unplugin-tailwindcss-mangle/package.json +++ b/packages/unplugin-tailwindcss-mangle/package.json @@ -2,47 +2,62 @@ "name": "unplugin-tailwindcss-mangle", "version": "2.2.2", "description": "mangle tailwindcss utilities class plugin. support vite and webpack!", - "main": "./dist/index.cjs", - "module": "./dist/index.mjs", - "types": "./dist/index.d.ts", + "author": "SonOfMagic ", + "license": "MIT", + "homepage": "https://github.com/sonofmagic/tailwindcss-mangle", + "repository": { + "type": "git", + "url": "git+https://github.com/sonofmagic/tailwindcss-mangle.git" + }, + "keywords": [ + "tailwindcss", + "utilities", + "mangle", + "class", + "obfuscator", + "obfuscation" + ], "exports": { ".": { "types": "./dist/index.d.ts", - "require": "./dist/index.cjs", - "import": "./dist/index.mjs" + "import": "./dist/index.mjs", + "require": "./dist/index.cjs" }, "./vite": { "types": "./dist/vite.d.ts", - "require": "./dist/vite.cjs", - "import": "./dist/vite.mjs" + "import": "./dist/vite.mjs", + "require": "./dist/vite.cjs" }, "./webpack": { "types": "./dist/webpack.d.ts", - "require": "./dist/webpack.cjs", - "import": "./dist/webpack.mjs" + "import": "./dist/webpack.mjs", + "require": "./dist/webpack.cjs" }, "./rollup": { "types": "./dist/rollup.d.ts", - "require": "./dist/rollup.cjs", - "import": "./dist/rollup.mjs" + "import": "./dist/rollup.mjs", + "require": "./dist/rollup.cjs" }, "./esbuild": { "types": "./dist/esbuild.d.ts", - "require": "./dist/esbuild.cjs", - "import": "./dist/esbuild.mjs" + "import": "./dist/esbuild.mjs", + "require": "./dist/esbuild.cjs" }, "./nuxt": { "types": "./dist/nuxt.d.ts", - "require": "./dist/nuxt.cjs", - "import": "./dist/nuxt.mjs" + "import": "./dist/nuxt.mjs", + "require": "./dist/nuxt.cjs" }, "./utils": { "types": "./dist/utils.d.ts", - "require": "./dist/utils.cjs", - "import": "./dist/utils.mjs" + "import": "./dist/utils.mjs", + "require": "./dist/utils.cjs" }, "./*": "./*" }, + "main": "./dist/index.cjs", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", "typesVersions": { "*": { "*": [ @@ -51,25 +66,15 @@ ] } }, + "files": [ + "dist" + ], "scripts": { "dev": "unbuild --sourcemap", "build": "unbuild", "test": "vitest run --coverage.enabled", "test:dev": "vitest" }, - "files": [ - "dist" - ], - "keywords": [ - "tailwindcss", - "utilities", - "mangle", - "class", - "obfuscator", - "obfuscation" - ], - "author": "SonOfMagic ", - "license": "MIT", "dependencies": { "@tailwindcss-mangle/config": "workspace:^", "@tailwindcss-mangle/core": "workspace:^", @@ -95,10 +100,5 @@ "vite": "^5.2.11", "webpack": "^5.91.0", "webpack-build-utils": "^0.0.7" - }, - "homepage": "https://github.com/sonofmagic/tailwindcss-mangle", - "repository": { - "type": "git", - "url": "git+https://github.com/sonofmagic/tailwindcss-mangle.git" } } diff --git a/packages/unplugin-tailwindcss-mangle/src/core/plugin.ts b/packages/unplugin-tailwindcss-mangle/src/core/plugin.ts index 32e78210..c085b87b 100644 --- a/packages/unplugin-tailwindcss-mangle/src/core/plugin.ts +++ b/packages/unplugin-tailwindcss-mangle/src/core/plugin.ts @@ -2,7 +2,7 @@ import { dirname } from 'node:path' import fs from 'node:fs/promises' import { createUnplugin } from 'unplugin' import type { OutputAsset } from 'rollup' -import { htmlHandler, cssHandler, jsHandler, preProcessJs, Context, preProcessRawCode } from '@tailwindcss-mangle/core' +import { Context, cssHandler, htmlHandler, jsHandler, preProcessJs, preProcessRawCode } from '@tailwindcss-mangle/core' import type { ClassMapOutputOptions, MangleUserConfig } from '@tailwindcss-mangle/config' import MagicString from 'magic-string' import { pluginName } from '@/constants' @@ -17,7 +17,7 @@ export const unplugin = createUnplugin((options?: MangleUserConfig) => { async buildStart() { await ctx.initConfig({ - mangleOptions: options + mangleOptions: options, }) }, transformInclude(id) { @@ -29,17 +29,17 @@ export const unplugin = createUnplugin((options?: MangleUserConfig) => { // 直接忽略 css 文件,因为此时 tailwindcss 还没有展开 return /\.[jt]sx?$/.test(id) ? preProcessJs({ - code: s, - replaceMap, - ctx, - id - }) + code: s, + replaceMap, + ctx, + id, + }) : preProcessRawCode({ - code, - ctx, - replaceMap, - id - }) + code, + ctx, + replaceMap, + id, + }) }, vite: { generateBundle: { @@ -54,13 +54,13 @@ export const unplugin = createUnplugin((options?: MangleUserConfig) => { const { css } = await cssHandler(cssSource.source.toString(), { file, replaceMap, - ctx + ctx, }) cssSource.source = css } } - } - } + }, + }, }, webpack(compiler) { const { Compilation, sources } = compiler.webpack @@ -70,7 +70,7 @@ export const unplugin = createUnplugin((options?: MangleUserConfig) => { compilation.hooks.processAssets.tapPromise( { name: pluginName, - stage: Compilation.PROCESS_ASSETS_STAGE_SUMMARIZE + stage: Compilation.PROCESS_ASSETS_STAGE_SUMMARIZE, }, async (assets) => { const replaceMap = ctx.getReplaceMap() @@ -82,7 +82,7 @@ export const unplugin = createUnplugin((options?: MangleUserConfig) => { const code = jsHandler(chunk.source().toString(), { replaceMap, - ctx + ctx, }).code if (code) { const source = new ConcatSource(code) @@ -98,7 +98,7 @@ export const unplugin = createUnplugin((options?: MangleUserConfig) => { const { css } = await cssHandler(cssSource.source().toString(), { replaceMap, file, - ctx + ctx, }) const source = new ConcatSource(css) @@ -113,13 +113,13 @@ export const unplugin = createUnplugin((options?: MangleUserConfig) => { const html = htmlHandler(asset.source().toString(), { ctx, - replaceMap + replaceMap, }) const source = new ConcatSource(html) compilation.updateAsset(file, source) } } - } + }, ) }) }, @@ -134,16 +134,16 @@ export const unplugin = createUnplugin((options?: MangleUserConfig) => { return { origin: x[0], replacement: x[1].name, - usedBy: [...x[1].usedBy] + usedBy: [...x[1].usedBy], } }), null, - opts.loose ? 2 : 0 + opts.loose ? 2 : 0, ) await fs.writeFile(opts.filename, output, 'utf8') console.log(`✨ ${opts.filename} generated!`) } } - } + }, } }) diff --git a/packages/unplugin-tailwindcss-mangle/src/utils.ts b/packages/unplugin-tailwindcss-mangle/src/utils.ts index 1a2362f6..a6514bf2 100644 --- a/packages/unplugin-tailwindcss-mangle/src/utils.ts +++ b/packages/unplugin-tailwindcss-mangle/src/utils.ts @@ -1,5 +1,6 @@ import fs from 'node:fs/promises' import path from 'node:path' +import process from 'node:process' import { groupBy } from '@tailwindcss-mangle/shared' import { pluginName } from './constants' @@ -22,18 +23,21 @@ export function getGroupedEntries( }, jsMatcher(file: string) { return /\.[cm]?js$/.test(file) - } - } + }, + }, ) { const { cssMatcher, htmlMatcher, jsMatcher } = options const groupedEntries = groupBy(entries, ([file]) => { if (cssMatcher(file)) { return 'css' - } else if (htmlMatcher(file)) { + } + else if (htmlMatcher(file)) { return 'html' - } else if (jsMatcher(file)) { + } + else if (jsMatcher(file)) { return 'js' - } else { + } + else { return 'other' } }) @@ -59,9 +63,10 @@ export function getCacheDir(basedir = process.cwd()) { export async function ensureDir(p: string) { try { await fs.access(p) - } catch { + } + catch { await fs.mkdir(p, { - recursive: true + recursive: true, }) } } diff --git a/packages/unplugin-tailwindcss-mangle/src/vite.ts b/packages/unplugin-tailwindcss-mangle/src/vite.ts index 7f48c1dd..565403b1 100644 --- a/packages/unplugin-tailwindcss-mangle/src/vite.ts +++ b/packages/unplugin-tailwindcss-mangle/src/vite.ts @@ -1,3 +1,4 @@ import { unplugin } from './core' import type {} from 'vite' + export default unplugin.vite diff --git a/packages/unplugin-tailwindcss-mangle/test/context.test.ts b/packages/unplugin-tailwindcss-mangle/test/context.test.ts index 6b0f7147..f4d98c79 100644 --- a/packages/unplugin-tailwindcss-mangle/test/context.test.ts +++ b/packages/unplugin-tailwindcss-mangle/test/context.test.ts @@ -5,7 +5,7 @@ function createContext() { } return { a, - inc + inc, } } diff --git a/packages/unplugin-tailwindcss-mangle/test/vite.test.ts b/packages/unplugin-tailwindcss-mangle/test/vite.test.ts index 8cfc3b9f..239694ee 100644 --- a/packages/unplugin-tailwindcss-mangle/test/vite.test.ts +++ b/packages/unplugin-tailwindcss-mangle/test/vite.test.ts @@ -15,15 +15,15 @@ describe('vite build', () => { output: { entryFileNames: `[name].js`, chunkFileNames: `[name].js`, - assetFileNames: `[name].[ext]` - } - } + assetFileNames: `[name].[ext]`, + }, + }, }, plugins: [ utwm({ - classListPath: path.resolve(appRoot, '.tw-patch/tw-class-list.json') - }) - ] + classListPath: path.resolve(appRoot, '.tw-patch/tw-class-list.json'), + }), + ], })) as RollupOutput const output = res.output expect(output.length).toBe(3) @@ -51,18 +51,18 @@ describe('vite build', () => { output: { entryFileNames: `[name].js`, chunkFileNames: `[name].js`, - assetFileNames: `[name].[ext]` - } - } + assetFileNames: `[name].[ext]`, + }, + }, }, plugins: [ utwm({ classListPath: path.resolve(appRoot, '.tw-patch/tw-class-list.json'), classGenerator: { - classPrefix: 'ice-' - } - }) - ] + classPrefix: 'ice-', + }, + }), + ], })) as RollupOutput const output = res.output expect(output.length).toBe(3) diff --git a/packages/unplugin-tailwindcss-mangle/test/webpack.test.ts b/packages/unplugin-tailwindcss-mangle/test/webpack.test.ts index b1ee2105..7cb88b55 100644 --- a/packages/unplugin-tailwindcss-mangle/test/webpack.test.ts +++ b/packages/unplugin-tailwindcss-mangle/test/webpack.test.ts @@ -1,7 +1,8 @@ import path from 'node:path' -import { getMemfsCompiler5, compile, readAssets, getErrors, getWarnings } from 'webpack-build-utils' +import { compile, getErrors, getMemfsCompiler5, getWarnings, readAssets } from 'webpack-build-utils' import MiniCssExtractPlugin from 'mini-css-extract-plugin' import utwm from '@/webpack' + const context = path.resolve(__dirname, 'fixtures/webpack-repo') describe('webpack build', () => { it('common', async () => { @@ -12,16 +13,16 @@ describe('webpack build', () => { plugins: [new MiniCssExtractPlugin()], output: { path: path.resolve(context, './dist'), - filename: 'index.js' + filename: 'index.js', }, module: { rules: [ { test: /\.css$/i, - use: [MiniCssExtractPlugin.loader, 'css-loader', 'postcss-loader'] - } - ] - } + use: [MiniCssExtractPlugin.loader, 'css-loader', 'postcss-loader'], + }, + ], + }, }) const stats = await compile(compiler) @@ -41,20 +42,20 @@ describe('webpack build', () => { plugins: [new MiniCssExtractPlugin()], output: { path: path.resolve(context, './dist'), - filename: 'index.js' + filename: 'index.js', }, module: { rules: [ { test: /\.css$/i, - use: [MiniCssExtractPlugin.loader, 'css-loader', 'postcss-loader'] - } - ] - } + use: [MiniCssExtractPlugin.loader, 'css-loader', 'postcss-loader'], + }, + ], + }, }) utwm({ - classListPath: path.resolve(context, '.tw-patch/tw-class-list.json') + classListPath: path.resolve(context, '.tw-patch/tw-class-list.json'), }).apply(compiler) const stats = await compile(compiler) diff --git a/packages/unplugin-tailwindcss-mangle/tsconfig.json b/packages/unplugin-tailwindcss-mangle/tsconfig.json index d6c27bee..65483f39 100644 --- a/packages/unplugin-tailwindcss-mangle/tsconfig.json +++ b/packages/unplugin-tailwindcss-mangle/tsconfig.json @@ -12,4 +12,4 @@ "src", "test" ] -} \ No newline at end of file +} diff --git a/packages/unplugin-tailwindcss-mangle/vitest.config.ts b/packages/unplugin-tailwindcss-mangle/vitest.config.ts index 432ccf92..b14e3361 100644 --- a/packages/unplugin-tailwindcss-mangle/vitest.config.ts +++ b/packages/unplugin-tailwindcss-mangle/vitest.config.ts @@ -6,13 +6,13 @@ export default defineProject({ alias: [ { find: '@', - replacement: path.resolve(__dirname, './src') - } + replacement: path.resolve(__dirname, './src'), + }, ], globals: true, testTimeout: 60_000, - setupFiles: ['./vitest.setup.ts'] - } + setupFiles: ['./vitest.setup.ts'], + }, // build: { // commonjsOptions: {