diff --git a/package.json b/package.json index d5a20c28..6a7f8a8d 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ }, "devDependencies": { "@ampproject/remapping": "^2.3.0", - "@antfu/eslint-config": "^2.25.2", + "@antfu/eslint-config": "^3.0.0", "@antfu/ni": "^0.22.4", "@farmfe/cli": "^1.0.3", "@farmfe/core": "^1.3.12", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8777398f..2352c63a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -25,8 +25,8 @@ importers: specifier: ^2.3.0 version: 2.3.0 '@antfu/eslint-config': - specifier: ^2.25.2 - version: 2.25.2(@vue/compiler-sfc@3.4.38)(eslint@9.9.0)(typescript@5.5.4)(vitest@2.0.5) + specifier: ^3.0.0 + version: 3.0.0(@vue/compiler-sfc@3.4.38)(eslint@9.9.0)(typescript@5.5.4)(vitest@2.0.5) '@antfu/ni': specifier: ^0.22.4 version: 0.22.4 @@ -354,15 +354,15 @@ packages: '@jridgewell/trace-mapping': 0.3.25 dev: true - /@antfu/eslint-config@2.25.2(@vue/compiler-sfc@3.4.38)(eslint@9.9.0)(typescript@5.5.4)(vitest@2.0.5): - resolution: {integrity: sha512-6I2PmkHAmFXiAqkfw50XkxVjSAGZyVEve61uFQWsq/jgz1xylzU1edMAfc7zled4XBBDAoZspUZDpgqshxWpDA==} + /@antfu/eslint-config@3.0.0(@vue/compiler-sfc@3.4.38)(eslint@9.9.0)(typescript@5.5.4)(vitest@2.0.5): + resolution: {integrity: sha512-3HC35LrsW5kvHyVY2U6yat3Uz20/9Re5137LAKqAtl2tKictef2CmdYk5z+qK4UsaY32MMfg98MhuBbvAvZF1w==} 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: ^1.0.2 - eslint: '>=8.40.0' + eslint: ^9.5.0 eslint-plugin-astro: ^1.2.0 eslint-plugin-format: '>=0.1.0' eslint-plugin-react-hooks: ^4.6.0 @@ -400,30 +400,30 @@ packages: svelte-eslint-parser: optional: true dependencies: - '@antfu/install-pkg': 0.3.5 + '@antfu/install-pkg': 0.4.1 '@clack/prompts': 0.7.0 '@eslint-community/eslint-plugin-eslint-comments': 4.4.0(eslint@9.9.0) - '@stylistic/eslint-plugin': 2.6.3(eslint@9.9.0)(typescript@5.5.4) - '@typescript-eslint/eslint-plugin': 8.1.0(@typescript-eslint/parser@8.1.0)(eslint@9.9.0)(typescript@5.5.4) - '@typescript-eslint/parser': 8.1.0(eslint@9.9.0)(typescript@5.5.4) - '@vitest/eslint-plugin': 1.0.3(eslint@9.9.0)(typescript@5.5.4)(vitest@2.0.5) + '@stylistic/eslint-plugin': 2.7.1(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/eslint-plugin': 8.3.0(@typescript-eslint/parser@8.3.0)(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/parser': 8.3.0(eslint@9.9.0)(typescript@5.5.4) + '@vitest/eslint-plugin': 1.1.0(eslint@9.9.0)(typescript@5.5.4)(vitest@2.0.5) eslint: 9.9.0(jiti@1.21.6) - eslint-config-flat-gitignore: 0.1.8 - eslint-flat-config-utils: 0.3.0 + eslint-config-flat-gitignore: 0.3.0(eslint@9.9.0) + eslint-flat-config-utils: 0.3.1 eslint-merge-processors: 0.1.0(eslint@9.9.0) - eslint-plugin-antfu: 2.3.5(eslint@9.9.0) + eslint-plugin-antfu: 2.3.6(eslint@9.9.0) eslint-plugin-command: 0.2.3(eslint@9.9.0) - eslint-plugin-import-x: 3.1.0(eslint@9.9.0)(typescript@5.5.4) + eslint-plugin-import-x: 4.1.1(eslint@9.9.0)(typescript@5.5.4) eslint-plugin-jsdoc: 50.2.2(eslint@9.9.0) eslint-plugin-jsonc: 2.16.0(eslint@9.9.0) eslint-plugin-markdown: 5.1.0(eslint@9.9.0) eslint-plugin-n: 17.10.2(eslint@9.9.0) eslint-plugin-no-only-tests: 3.3.0 - eslint-plugin-perfectionist: 3.2.0(eslint@9.9.0)(typescript@5.5.4)(vue-eslint-parser@9.4.3) + eslint-plugin-perfectionist: 3.3.0(eslint@9.9.0)(typescript@5.5.4)(vue-eslint-parser@9.4.3) eslint-plugin-regexp: 2.6.0(eslint@9.9.0) eslint-plugin-toml: 0.11.1(eslint@9.9.0) eslint-plugin-unicorn: 55.0.0(eslint@9.9.0) - eslint-plugin-unused-imports: 4.1.3(@typescript-eslint/eslint-plugin@8.1.0)(eslint@9.9.0) + eslint-plugin-unused-imports: 4.1.3(@typescript-eslint/eslint-plugin@8.3.0)(eslint@9.9.0) eslint-plugin-vue: 9.27.0(eslint@9.9.0) eslint-plugin-yml: 1.14.0(eslint@9.9.0) eslint-processor-vue-blocks: 0.1.2(@vue/compiler-sfc@3.4.38)(eslint@9.9.0) @@ -458,10 +458,11 @@ packages: '@jsdevtools/ez-spawn': 3.0.4 dev: true - /@antfu/install-pkg@0.3.5: - resolution: {integrity: sha512-HwIACY0IzrM7FGafMbWZOqEDBSfCwPcylu+GacaRcxJm4Yvvuh3Dy2vZwqdJAzXponc6aLO9FaH4l75pq8/ZSA==} + /@antfu/install-pkg@0.4.1: + resolution: {integrity: sha512-T7yB5QNG29afhWVkVq7XeIMBa5U/vs9mX69YqayXypPRmYzUmzwnYltplHmPtZ4HPCn+sQKeXW8I47wCbuBOjw==} dependencies: - '@jsdevtools/ez-spawn': 3.0.4 + package-manager-detector: 0.2.0 + tinyexec: 0.3.0 dev: true /@antfu/ni@0.22.4: @@ -1576,6 +1577,11 @@ packages: engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} dev: true + /@eslint/compat@1.1.1: + resolution: {integrity: sha512-lpHyRyplhGPL5mGEh6M9O5nnKk0Gz4bFI+Zu6tKlPpDUN7XshWvH9C/px4UVm87IAANE0W81CEsNGbS1KlzXpA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + dev: true + /@eslint/config-array@0.17.1: resolution: {integrity: sha512-BlYOpej8AQ8Ev9xVqroV7a02JK3SkBAaN9GfMMH9W6Ch8FlQlkjGw4Ir7+FgYwfirivAf4t+GtzuAxqfukmISA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2623,70 +2629,19 @@ packages: - typescript dev: true - /@stylistic/eslint-plugin-js@2.6.3(eslint@9.9.0): - resolution: {integrity: sha512-VkfqvbP9ro4XlP7wjIe6tWJjh6rzEJYYeIr5oWHTiayHfKgtRgUIRIWTZu1vbJg49aP2CsM0GRFI6iX5xwqTXA==} + /@stylistic/eslint-plugin@2.7.1(eslint@9.9.0)(typescript@5.5.4): + resolution: {integrity: sha512-JqnHom8CP14oOgPhwTPbn0QgsBJwgNySQSe00V9GQQDlY1tEqZUlK4jM2DIOJ5nE+oXoy51vZWHnHkfZ6rEruw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: '>=8.40.0' dependencies: - '@types/eslint': 9.6.0 - acorn: 8.12.1 - eslint: 9.9.0(jiti@1.21.6) - eslint-visitor-keys: 4.0.0 - espree: 10.1.0 - dev: true - - /@stylistic/eslint-plugin-jsx@2.6.3(eslint@9.9.0): - resolution: {integrity: sha512-33GvA4L4uHvD0cdOE6ufy52W2pmpGtjIAQQWlROv5NRFw0mKpe7wK5++mOXmujlY5gbX51k8poPjvludIUK2og==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: '>=8.40.0' - dependencies: - '@stylistic/eslint-plugin-js': 2.6.3(eslint@9.9.0) - '@types/eslint': 9.6.0 + '@types/eslint': 9.6.1 + '@typescript-eslint/utils': 8.3.0(eslint@9.9.0)(typescript@5.5.4) eslint: 9.9.0(jiti@1.21.6) eslint-visitor-keys: 4.0.0 espree: 10.1.0 estraverse: 5.3.0 picomatch: 4.0.2 - dev: true - - /@stylistic/eslint-plugin-plus@2.6.3(eslint@9.9.0): - resolution: {integrity: sha512-lQ/BtROkPAOSTORfEsRcL+3lNt8+H/jS7mFF2j859PSyb487bmoO6npmGCr4dNfFrz5d0h11i3zp1hT/trZ8HA==} - peerDependencies: - eslint: '*' - dependencies: - '@types/eslint': 9.6.0 - eslint: 9.9.0(jiti@1.21.6) - dev: true - - /@stylistic/eslint-plugin-ts@2.6.3(eslint@9.9.0)(typescript@5.5.4): - resolution: {integrity: sha512-eb8v1ad/FgALhPDptANIGP/rpd9b3ESmG/j4q489KK4MmQyeJYiZCks8xN6AHGkJ8QsLziw0xXWNb74KuxbB7g==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: '>=8.40.0' - dependencies: - '@stylistic/eslint-plugin-js': 2.6.3(eslint@9.9.0) - '@types/eslint': 9.6.0 - '@typescript-eslint/utils': 8.1.0(eslint@9.9.0)(typescript@5.5.4) - eslint: 9.9.0(jiti@1.21.6) - transitivePeerDependencies: - - supports-color - - typescript - dev: true - - /@stylistic/eslint-plugin@2.6.3(eslint@9.9.0)(typescript@5.5.4): - resolution: {integrity: sha512-QCt1XviL9qghGN1Jnb6PCRzQTbvkUq11ybFrASi6ypuiLO1i6Oo/j22uKE3wXKG8lnOkvfjLFm0dumyaqaPG+g==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: '>=8.40.0' - dependencies: - '@stylistic/eslint-plugin-js': 2.6.3(eslint@9.9.0) - '@stylistic/eslint-plugin-jsx': 2.6.3(eslint@9.9.0) - '@stylistic/eslint-plugin-plus': 2.6.3(eslint@9.9.0) - '@stylistic/eslint-plugin-ts': 2.6.3(eslint@9.9.0)(typescript@5.5.4) - '@types/eslint': 9.6.0 - eslint: 9.9.0(jiti@1.21.6) transitivePeerDependencies: - supports-color - typescript @@ -2752,6 +2707,13 @@ packages: '@types/json-schema': 7.0.15 dev: true + /@types/eslint@9.6.1: + resolution: {integrity: sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==} + dependencies: + '@types/estree': 1.0.5 + '@types/json-schema': 7.0.15 + dev: true + /@types/estree@1.0.5: resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} dev: true @@ -2943,8 +2905,8 @@ packages: '@types/node': 20.14.15 dev: true - /@typescript-eslint/eslint-plugin@8.1.0(@typescript-eslint/parser@8.1.0)(eslint@9.9.0)(typescript@5.5.4): - resolution: {integrity: sha512-LlNBaHFCEBPHyD4pZXb35mzjGkuGKXU5eeCA1SxvHfiRES0E82dOounfVpL4DCqYvJEKab0bZIA0gCRpdLKkCw==} + /@typescript-eslint/eslint-plugin@8.3.0(@typescript-eslint/parser@8.3.0)(eslint@9.9.0)(typescript@5.5.4): + resolution: {integrity: sha512-FLAIn63G5KH+adZosDYiutqkOkYEx0nvcwNNfJAf+c7Ae/H35qWwTYvPZUKFj5AS+WfHG/WJJfWnDnyNUlp8UA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 @@ -2955,11 +2917,11 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.11.0 - '@typescript-eslint/parser': 8.1.0(eslint@9.9.0)(typescript@5.5.4) - '@typescript-eslint/scope-manager': 8.1.0 - '@typescript-eslint/type-utils': 8.1.0(eslint@9.9.0)(typescript@5.5.4) - '@typescript-eslint/utils': 8.1.0(eslint@9.9.0)(typescript@5.5.4) - '@typescript-eslint/visitor-keys': 8.1.0 + '@typescript-eslint/parser': 8.3.0(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/scope-manager': 8.3.0 + '@typescript-eslint/type-utils': 8.3.0(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/utils': 8.3.0(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/visitor-keys': 8.3.0 eslint: 9.9.0(jiti@1.21.6) graphemer: 1.4.0 ignore: 5.3.1 @@ -2970,8 +2932,8 @@ packages: - supports-color dev: true - /@typescript-eslint/parser@8.1.0(eslint@9.9.0)(typescript@5.5.4): - resolution: {integrity: sha512-U7iTAtGgJk6DPX9wIWPPOlt1gO57097G06gIcl0N0EEnNw8RGD62c+2/DiP/zL7KrkqnnqF7gtFGR7YgzPllTA==} + /@typescript-eslint/parser@8.3.0(eslint@9.9.0)(typescript@5.5.4): + resolution: {integrity: sha512-h53RhVyLu6AtpUzVCYLPhZGL5jzTD9fZL+SYf/+hYOx2bDkyQXztXSc4tbvKYHzfMXExMLiL9CWqJmVz6+78IQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -2980,10 +2942,10 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 8.1.0 - '@typescript-eslint/types': 8.1.0 - '@typescript-eslint/typescript-estree': 8.1.0(typescript@5.5.4) - '@typescript-eslint/visitor-keys': 8.1.0 + '@typescript-eslint/scope-manager': 8.3.0 + '@typescript-eslint/types': 8.3.0 + '@typescript-eslint/typescript-estree': 8.3.0(typescript@5.5.4) + '@typescript-eslint/visitor-keys': 8.3.0 debug: 4.3.6 eslint: 9.9.0(jiti@1.21.6) typescript: 5.5.4 @@ -2991,14 +2953,6 @@ packages: - supports-color dev: true - /@typescript-eslint/scope-manager@7.17.0: - resolution: {integrity: sha512-0P2jTTqyxWp9HiKLu/Vemr2Rg1Xb5B7uHItdVZ6iAenXmPo4SZ86yOPCJwMqpCyaMiEHTNqizHfsbmCFT1x9SA==} - engines: {node: ^18.18.0 || >=20.0.0} - dependencies: - '@typescript-eslint/types': 7.17.0 - '@typescript-eslint/visitor-keys': 7.17.0 - dev: true - /@typescript-eslint/scope-manager@8.1.0: resolution: {integrity: sha512-DsuOZQji687sQUjm4N6c9xABJa7fjvfIdjqpSIIVOgaENf2jFXiM9hIBZOL3hb6DHK9Nvd2d7zZnoMLf9e0OtQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -3007,8 +2961,16 @@ packages: '@typescript-eslint/visitor-keys': 8.1.0 dev: true - /@typescript-eslint/type-utils@8.1.0(eslint@9.9.0)(typescript@5.5.4): - resolution: {integrity: sha512-oLYvTxljVvsMnldfl6jIKxTaU7ok7km0KDrwOt1RHYu6nxlhN3TIx8k5Q52L6wR33nOwDgM7VwW1fT1qMNfFIA==} + /@typescript-eslint/scope-manager@8.3.0: + resolution: {integrity: sha512-mz2X8WcN2nVu5Hodku+IR8GgCOl4C0G/Z1ruaWN4dgec64kDBabuXyPAr+/RgJtumv8EEkqIzf3X2U5DUKB2eg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + dependencies: + '@typescript-eslint/types': 8.3.0 + '@typescript-eslint/visitor-keys': 8.3.0 + dev: true + + /@typescript-eslint/type-utils@8.3.0(eslint@9.9.0)(typescript@5.5.4): + resolution: {integrity: sha512-wrV6qh//nLbfXZQoj32EXKmwHf4b7L+xXLrP3FZ0GOUU72gSvLjeWUl5J5Ue5IwRxIV1TfF73j/eaBapxx99Lg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -3016,8 +2978,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 8.1.0(typescript@5.5.4) - '@typescript-eslint/utils': 8.1.0(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/typescript-estree': 8.3.0(typescript@5.5.4) + '@typescript-eslint/utils': 8.3.0(eslint@9.9.0)(typescript@5.5.4) debug: 4.3.6 ts-api-utils: 1.3.0(typescript@5.5.4) typescript: 5.5.4 @@ -3036,17 +2998,22 @@ packages: engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} dev: true - /@typescript-eslint/typescript-estree@7.17.0(typescript@5.5.4): - resolution: {integrity: sha512-72I3TGq93t2GoSBWI093wmKo0n6/b7O4j9o8U+f65TVD0FS6bI2180X5eGEr8MA8PhKMvYe9myZJquUT2JkCZw==} - engines: {node: ^18.18.0 || >=20.0.0} + /@typescript-eslint/types@8.3.0: + resolution: {integrity: sha512-y6sSEeK+facMaAyixM36dQ5NVXTnKWunfD1Ft4xraYqxP0lC0POJmIaL/mw72CUMqjY9qfyVfXafMeaUj0noWw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + dev: true + + /@typescript-eslint/typescript-estree@8.1.0(typescript@5.5.4): + resolution: {integrity: sha512-NTHhmufocEkMiAord/g++gWKb0Fr34e9AExBRdqgWdVBaKoei2dIyYKD9Q0jBnvfbEA5zaf8plUFMUH6kQ0vGg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@typescript-eslint/types': 7.17.0 - '@typescript-eslint/visitor-keys': 7.17.0 + '@typescript-eslint/types': 8.1.0 + '@typescript-eslint/visitor-keys': 8.1.0 debug: 4.3.6 globby: 11.1.0 is-glob: 4.0.3 @@ -3058,8 +3025,8 @@ packages: - supports-color dev: true - /@typescript-eslint/typescript-estree@8.1.0(typescript@5.5.4): - resolution: {integrity: sha512-NTHhmufocEkMiAord/g++gWKb0Fr34e9AExBRdqgWdVBaKoei2dIyYKD9Q0jBnvfbEA5zaf8plUFMUH6kQ0vGg==} + /@typescript-eslint/typescript-estree@8.3.0(typescript@5.5.4): + resolution: {integrity: sha512-Mq7FTHl0R36EmWlCJWojIC1qn/ZWo2YiWYc1XVtasJ7FIgjo0MVv9rZWXEE7IK2CGrtwe1dVOxWwqXUdNgfRCA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -3067,10 +3034,10 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 8.1.0 - '@typescript-eslint/visitor-keys': 8.1.0 + '@typescript-eslint/types': 8.3.0 + '@typescript-eslint/visitor-keys': 8.3.0 debug: 4.3.6 - globby: 11.1.0 + fast-glob: 3.3.2 is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 @@ -3080,51 +3047,51 @@ packages: - supports-color dev: true - /@typescript-eslint/utils@7.17.0(eslint@9.9.0)(typescript@5.5.4): - resolution: {integrity: sha512-r+JFlm5NdB+JXc7aWWZ3fKSm1gn0pkswEwIYsrGPdsT2GjsRATAKXiNtp3vgAAO1xZhX8alIOEQnNMl3kbTgJw==} - engines: {node: ^18.18.0 || >=20.0.0} + /@typescript-eslint/utils@8.1.0(eslint@9.9.0)(typescript@5.5.4): + resolution: {integrity: sha512-ypRueFNKTIFwqPeJBfeIpxZ895PQhNyH4YID6js0UoBImWYoSjBsahUn9KMiJXh94uOjVBgHD9AmkyPsPnFwJA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^8.56.0 + eslint: ^8.57.0 || ^9.0.0 dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) - '@typescript-eslint/scope-manager': 7.17.0 - '@typescript-eslint/types': 7.17.0 - '@typescript-eslint/typescript-estree': 7.17.0(typescript@5.5.4) + '@typescript-eslint/scope-manager': 8.1.0 + '@typescript-eslint/types': 8.1.0 + '@typescript-eslint/typescript-estree': 8.1.0(typescript@5.5.4) eslint: 9.9.0(jiti@1.21.6) transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/utils@8.1.0(eslint@9.9.0)(typescript@5.5.4): - resolution: {integrity: sha512-ypRueFNKTIFwqPeJBfeIpxZ895PQhNyH4YID6js0UoBImWYoSjBsahUn9KMiJXh94uOjVBgHD9AmkyPsPnFwJA==} + /@typescript-eslint/utils@8.3.0(eslint@9.9.0)(typescript@5.5.4): + resolution: {integrity: sha512-F77WwqxIi/qGkIGOGXNBLV7nykwfjLsdauRB/DOFPdv6LTF3BHHkBpq81/b5iMPSF055oO2BiivDJV4ChvNtXA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.9.0) - '@typescript-eslint/scope-manager': 8.1.0 - '@typescript-eslint/types': 8.1.0 - '@typescript-eslint/typescript-estree': 8.1.0(typescript@5.5.4) + '@typescript-eslint/scope-manager': 8.3.0 + '@typescript-eslint/types': 8.3.0 + '@typescript-eslint/typescript-estree': 8.3.0(typescript@5.5.4) eslint: 9.9.0(jiti@1.21.6) transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/visitor-keys@7.17.0: - resolution: {integrity: sha512-RVGC9UhPOCsfCdI9pU++K4nD7to+jTcMIbXTSOcrLqUEW6gF2pU1UUbYJKc9cvcRSK1UDeMJ7pdMxf4bhMpV/A==} - engines: {node: ^18.18.0 || >=20.0.0} + /@typescript-eslint/visitor-keys@8.1.0: + resolution: {integrity: sha512-ba0lNI19awqZ5ZNKh6wCModMwoZs457StTebQ0q1NP58zSi2F6MOZRXwfKZy+jB78JNJ/WH8GSh2IQNzXX8Nag==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} dependencies: - '@typescript-eslint/types': 7.17.0 + '@typescript-eslint/types': 8.1.0 eslint-visitor-keys: 3.4.3 dev: true - /@typescript-eslint/visitor-keys@8.1.0: - resolution: {integrity: sha512-ba0lNI19awqZ5ZNKh6wCModMwoZs457StTebQ0q1NP58zSi2F6MOZRXwfKZy+jB78JNJ/WH8GSh2IQNzXX8Nag==} + /@typescript-eslint/visitor-keys@8.3.0: + resolution: {integrity: sha512-RmZwrTbQ9QveF15m/Cl28n0LXD6ea2CjkhH5rQ55ewz3H24w+AMCJHPVYaZ8/0HoG8Z3cLLFFycRXxeO2tz9FA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} dependencies: - '@typescript-eslint/types': 8.1.0 + '@typescript-eslint/types': 8.3.0 eslint-visitor-keys: 3.4.3 dev: true @@ -3372,8 +3339,8 @@ packages: vue: 3.4.38(typescript@5.5.4) dev: true - /@vitest/eslint-plugin@1.0.3(eslint@9.9.0)(typescript@5.5.4)(vitest@2.0.5): - resolution: {integrity: sha512-7hTONh+lqN+TEimHy2aWVdHVqYohcxLGD4yYBwSVvhyiti/j9CqBNMQvOa6xLoVcEtaWAoCCDbYgvxwNqA4lsA==} + /@vitest/eslint-plugin@1.1.0(eslint@9.9.0)(typescript@5.5.4)(vitest@2.0.5): + resolution: {integrity: sha512-Ur80Y27Wbw8gFHJ3cv6vypcjXmrx6QHfw+q435h6Q2L+tf+h4Xf5pJTCL4YU/Jps9EVeggQxS85OcUZU7sdXRw==} peerDependencies: '@typescript-eslint/utils': '>= 8.0' eslint: '>= 8.57.0' @@ -5176,15 +5143,18 @@ packages: semver: 7.6.3 dev: true - /eslint-config-flat-gitignore@0.1.8: - resolution: {integrity: sha512-OEUbS2wzzYtUfshjOqzFo4Bl4lHykXUdM08TCnYNl7ki+niW4Q1R0j0FDFDr0vjVsI5ZFOz5LvluxOP+Ew+dYw==} + /eslint-config-flat-gitignore@0.3.0(eslint@9.9.0): + resolution: {integrity: sha512-0Ndxo4qGhcewjTzw52TK06Mc00aDtHNTdeeW2JfONgDcLkRO/n/BteMRzNVpLQYxdCC/dFEilfM9fjjpGIJ9Og==} + peerDependencies: + eslint: ^9.5.0 dependencies: + '@eslint/compat': 1.1.1 + eslint: 9.9.0(jiti@1.21.6) find-up-simple: 1.0.0 - parse-gitignore: 2.0.0 dev: true - /eslint-flat-config-utils@0.3.0: - resolution: {integrity: sha512-FaFQLUunAl6YK7aU/pT23DXYVWg/cEHbSfxwAxpCGT6Su8H9RfkmzKLh1G2bba46p6dTlQeA4VTiV5//0SeToQ==} + /eslint-flat-config-utils@0.3.1: + resolution: {integrity: sha512-eFT3EaoJN1hlN97xw4FIEX//h0TiFUobgl2l5uLkIwhVN9ahGq95Pbs+i1/B5UACA78LO3rco3JzuvxLdTUOPA==} dependencies: '@types/eslint': 9.6.0 pathe: 1.1.2 @@ -5208,8 +5178,8 @@ packages: eslint: 9.9.0(jiti@1.21.6) dev: true - /eslint-plugin-antfu@2.3.5(eslint@9.9.0): - resolution: {integrity: sha512-q3S9q7O176sd5VyPKksN1WGtB0l8W1jeWs61xWAmbM5JdZN8q9e0Vmm+tY/YOygHfn1eK9uE4/MGyZBebdtgLA==} + /eslint-plugin-antfu@2.3.6(eslint@9.9.0): + resolution: {integrity: sha512-31VwbU1Yd4BFNUUPQEazKyP79f3c+ohJtq5iZIuw38JjkRQdQAcF/31Kjr0DOKZXVDkeeNPrttKidrr3xhnhOA==} peerDependencies: eslint: '*' dependencies: @@ -5238,13 +5208,14 @@ packages: eslint-compat-utils: 0.5.1(eslint@9.9.0) dev: true - /eslint-plugin-import-x@3.1.0(eslint@9.9.0)(typescript@5.5.4): - resolution: {integrity: sha512-/UbPA+bYY7nIxcjL3kpcDY3UNdoLHFhyBFzHox2M0ypcUoueTn6woZUUmzzi5et/dXChksasYYFeKE2wshOrhg==} - engines: {node: '>=16'} + /eslint-plugin-import-x@4.1.1(eslint@9.9.0)(typescript@5.5.4): + resolution: {integrity: sha512-dBEM8fACIFNt4H7GoOaRmnH6evJW6JSTJTYYgmRd3vI4geBTjgDM/JyUDKUwIw0HDSyI+u7Vs3vFRXUo/BOAtA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^8.56.0 || ^9.0.0-0 + eslint: ^8.57.0 || ^9.0.0 dependencies: - '@typescript-eslint/utils': 7.17.0(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/typescript-estree': 8.1.0(typescript@5.5.4) + '@typescript-eslint/utils': 8.1.0(eslint@9.9.0)(typescript@5.5.4) debug: 4.3.6 doctrine: 3.0.0 eslint: 9.9.0(jiti@1.21.6) @@ -5332,8 +5303,8 @@ packages: engines: {node: '>=5.0.0'} dev: true - /eslint-plugin-perfectionist@3.2.0(eslint@9.9.0)(typescript@5.5.4)(vue-eslint-parser@9.4.3): - resolution: {integrity: sha512-cX1aztMbSfRWPKJH8CD+gadrbkS+RNH1OGWuNGws8J6rHzYYhawxWTU/yzMYjq2IRJCpBCfhgfa7BHRXQYxLHA==} + /eslint-plugin-perfectionist@3.3.0(eslint@9.9.0)(typescript@5.5.4)(vue-eslint-parser@9.4.3): + resolution: {integrity: sha512-sGgShkEqDBqIZ3WlenGHwLe1cl3vHKTfeh9b1XXAamaxSC7AY4Os0jdNCXnGJW4l0TlpismT5t2r7CXY7sfKlw==} engines: {node: ^18.0.0 || >=20.0.0} peerDependencies: astro-eslint-parser: ^1.0.2 @@ -5351,8 +5322,8 @@ packages: vue-eslint-parser: optional: true dependencies: - '@typescript-eslint/types': 8.1.0 - '@typescript-eslint/utils': 8.1.0(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/types': 8.3.0 + '@typescript-eslint/utils': 8.3.0(eslint@9.9.0)(typescript@5.5.4) eslint: 9.9.0(jiti@1.21.6) minimatch: 10.0.1 natural-compare-lite: 1.4.0 @@ -5372,7 +5343,7 @@ packages: '@eslint-community/regexpp': 4.11.0 comment-parser: 1.4.1 eslint: 9.9.0(jiti@1.21.6) - jsdoc-type-pratt-parser: 4.0.0 + jsdoc-type-pratt-parser: 4.1.0 refa: 0.12.1 regexp-ast-analysis: 0.7.1 scslre: 0.3.0 @@ -5418,7 +5389,7 @@ packages: strip-indent: 3.0.0 dev: true - /eslint-plugin-unused-imports@4.1.3(@typescript-eslint/eslint-plugin@8.1.0)(eslint@9.9.0): + /eslint-plugin-unused-imports@4.1.3(@typescript-eslint/eslint-plugin@8.3.0)(eslint@9.9.0): resolution: {integrity: sha512-lqrNZIZjFMUr7P06eoKtQLwyVRibvG7N+LtfKtObYGizAAGrcqLkc3tDx+iAik2z7q0j/XI3ihjupIqxhFabFA==} peerDependencies: '@typescript-eslint/eslint-plugin': ^8.0.0-0 || ^7.0.0 || ^6.0.0 || ^5.0.0 @@ -5427,7 +5398,7 @@ packages: '@typescript-eslint/eslint-plugin': optional: true dependencies: - '@typescript-eslint/eslint-plugin': 8.1.0(@typescript-eslint/parser@8.1.0)(eslint@9.9.0)(typescript@5.5.4) + '@typescript-eslint/eslint-plugin': 8.3.0(@typescript-eslint/parser@8.3.0)(eslint@9.9.0)(typescript@5.5.4) eslint: 9.9.0(jiti@1.21.6) dev: true @@ -8080,6 +8051,10 @@ packages: resolution: {integrity: sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==} dev: true + /package-manager-detector@0.2.0: + resolution: {integrity: sha512-E385OSk9qDcXhcM9LNSe4sdhx8a9mAPrZ4sMLW+tmxl5ZuGtPUcdFu+MPP2jbgiWAZ6Pfe5soGFMd+0Db5Vrog==} + dev: true + /parent-module@1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} @@ -9353,6 +9328,10 @@ packages: resolution: {integrity: sha512-1/eK7zUnIklz4JUUlL+658n58XO2hHLQfSk1Zf2LKieUjxidN16eKFEoDEfjHc3ohofSSqK3X5yO6VGb6iW8Lw==} dev: true + /tinyexec@0.3.0: + resolution: {integrity: sha512-tVGE0mVJPGb0chKhqmsoosjsS+qUnJVGJpZgsHYQcGoPlG3B51R3PouqTgEGH2Dc9jjFyOqOpix6ZHNMXp1FZg==} + dev: true + /tinyglobby@0.2.2: resolution: {integrity: sha512-mZ2sDMaySvi1PkTp4lTo1In2zjU+cY8OvZsfwrDrx3YGRbXPX1/cbPwCR9zkm3O/Fz9Jo0F1HNgIQ1b8BepqyQ==} engines: {node: '>=12.0.0'} diff --git a/src/esbuild/utils.ts b/src/esbuild/utils.ts index d5a3d6ba..b0d934b4 100644 --- a/src/esbuild/utils.ts +++ b/src/esbuild/utils.ts @@ -151,28 +151,6 @@ export function createPluginContext(context: UnpluginBuildContext) { warn(message) { warnings.push(normalizeMessage(message)) }, } - function normalizeMessage(message: string | UnpluginMessage): Message { - if (typeof message === 'string') - message = { message } - - return { - id: message.id!, - pluginName: message.plugin!, - text: message.message!, - - location: message.loc - ? { - file: message.loc.file, - line: message.loc.line, - column: message.loc.column, - } as Location - : null, - - detail: message.meta, - notes: [], - } - } - const mixedContext: UnpluginContext & UnpluginBuildContext = { ...context, ...pluginContext, @@ -188,6 +166,28 @@ export function createPluginContext(context: UnpluginBuildContext) { } } +function normalizeMessage(message: string | UnpluginMessage): Message { + if (typeof message === 'string') + message = { message } + + return { + id: message.id!, + pluginName: message.plugin!, + text: message.message!, + + location: message.loc + ? { + file: message.loc.file, + line: message.loc.line, + column: message.loc.column, + } as Location + : null, + + detail: message.meta, + notes: [], + } +} + export function processCodeWithSourceMap(map: SourceMap | null | undefined, code: string) { if (map) { if (!map.sourcesContent || map.sourcesContent.length === 0)