diff --git a/build.config.ts b/build.config.ts index 920ca1d..4d8e71b 100644 --- a/build.config.ts +++ b/build.config.ts @@ -5,4 +5,7 @@ export default defineBuildConfig({ 'src/cli.ts', ], clean: false, + rollup: { + inlineDependencies: true, + }, }) diff --git a/package.json b/package.json index ee06c55..b53f7e5 100644 --- a/package.json +++ b/package.json @@ -34,17 +34,16 @@ "eslint": "^8.50.0 || ^9.0.0" }, "dependencies": { - "@eslint/config-array": "catalog:", - "@voxpelli/config-array-find-files": "catalog:", + "@nodelib/fs.walk": "catalog:", "bundle-require": "catalog:", "cac": "catalog:", "chokidar": "catalog:", + "debug": "catalog:", "esbuild": "catalog:", "fast-glob": "catalog:", "find-up": "catalog:", "get-port-please": "catalog:", "h3": "catalog:", - "minimatch": "catalog:", "mlly": "catalog:", "mrmime": "catalog:", "open": "catalog:", @@ -53,6 +52,7 @@ }, "devDependencies": { "@antfu/eslint-config": "catalog:", + "@eslint/config-array": "catalog:", "@iconify-json/carbon": "catalog:", "@iconify-json/file-icons": "catalog:", "@iconify-json/logos": "catalog:", @@ -68,11 +68,13 @@ "@typescript-eslint/utils": "catalog:", "@unocss/eslint-config": "catalog:", "@unocss/nuxt": "catalog:", + "@voxpelli/config-array-find-files": "catalog:", "@vueuse/nuxt": "catalog:", "eslint": "catalog:", "floating-vue": "catalog:", "fuse.js": "catalog:", "lint-staged": "catalog:", + "minimatch": "catalog:", "nuxt": "catalog:", "nuxt-eslint-auto-explicit-import": "catalog:", "shiki": "catalog:", @@ -80,7 +82,7 @@ "textmate-grammar-glob": "catalog:", "typescript": "catalog:", "unbuild": "catalog:", - "vitest": "^2.1.8", + "vitest": "catalog:", "vue-tsc": "catalog:" }, "pnpm": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 39d3387..a053d45 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -36,6 +36,9 @@ catalogs: '@iconify-json/vscode-icons': specifier: ^1.2.7 version: 1.2.7 + '@nodelib/fs.walk': + specifier: ^3.0.1 + version: 3.0.1 '@nuxt/eslint': specifier: ^0.7.4 version: 0.7.4 @@ -72,6 +75,9 @@ catalogs: chokidar: specifier: ^4.0.3 version: 4.0.3 + debug: + specifier: ^4.4.0 + version: 4.4.0 esbuild: specifier: ^0.24.2 version: 0.24.2 @@ -135,6 +141,9 @@ catalogs: unbuild: specifier: ^3.2.0 version: 3.2.0 + vitest: + specifier: ^2.1.8 + version: 2.1.8 vue-tsc: specifier: ^2.2.0 version: 2.2.0 @@ -154,12 +163,9 @@ importers: .: dependencies: - '@eslint/config-array': - specifier: 'catalog:' - version: 0.19.1(patch_hash=x7vaku5tfstwhfkemiablef5bi) - '@voxpelli/config-array-find-files': + '@nodelib/fs.walk': specifier: 'catalog:' - version: 1.2.1(@eslint/config-array@0.19.1(patch_hash=x7vaku5tfstwhfkemiablef5bi)) + version: 3.0.1 bundle-require: specifier: 'catalog:' version: 5.1.0(esbuild@0.24.2) @@ -169,6 +175,9 @@ importers: chokidar: specifier: 'catalog:' version: 4.0.3 + debug: + specifier: 'catalog:' + version: 4.4.0 esbuild: specifier: 'catalog:' version: 0.24.2 @@ -184,9 +193,6 @@ importers: h3: specifier: 'catalog:' version: 1.13.0 - minimatch: - specifier: 'catalog:' - version: 9.0.5 mlly: specifier: 'catalog:' version: 1.7.3 @@ -206,6 +212,9 @@ importers: '@antfu/eslint-config': specifier: 'catalog:' version: 3.12.1(@typescript-eslint/utils@8.19.0(eslint@9.17.0(jiti@2.4.2))(typescript@5.7.2))(@unocss/eslint-plugin@0.65.3(eslint@9.17.0(jiti@2.4.2))(typescript@5.7.2))(@vue/compiler-sfc@3.5.13)(eslint@9.17.0(jiti@2.4.2))(typescript@5.7.2)(vitest@2.1.8(@types/node@20.12.11)(terser@5.31.0)) + '@eslint/config-array': + specifier: 'catalog:' + version: 0.19.1(patch_hash=x7vaku5tfstwhfkemiablef5bi) '@iconify-json/carbon': specifier: 'catalog:' version: 1.2.5 @@ -251,6 +260,9 @@ importers: '@unocss/nuxt': specifier: 'catalog:' version: 0.65.3(magicast@0.3.5)(postcss@8.4.49)(rollup@4.29.1)(vite@5.4.11(@types/node@20.12.11)(terser@5.31.0))(vue@3.5.13(typescript@5.7.2))(webpack@5.88.2(esbuild@0.24.2)) + '@voxpelli/config-array-find-files': + specifier: 'catalog:' + version: 1.2.1(@eslint/config-array@0.19.1(patch_hash=x7vaku5tfstwhfkemiablef5bi)) '@vueuse/nuxt': specifier: 'catalog:' version: 12.3.0(magicast@0.3.5)(nuxt@3.15.0(@opentelemetry/api@1.8.0)(@parcel/watcher@2.4.1)(@types/node@20.12.11)(encoding@0.1.13)(eslint@9.17.0(jiti@2.4.2))(magicast@0.3.5)(optionator@0.9.4)(rollup@4.29.1)(terser@5.31.0)(tsx@4.19.2)(typescript@5.7.2)(vite@5.4.11(@types/node@20.12.11)(terser@5.31.0))(vue-tsc@2.2.0(typescript@5.7.2))(yaml@2.6.1))(rollup@4.29.1)(typescript@5.7.2) @@ -266,6 +278,9 @@ importers: lint-staged: specifier: 'catalog:' version: 15.3.0 + minimatch: + specifier: 'catalog:' + version: 9.0.5 nuxt: specifier: 'catalog:' version: 3.15.0(@opentelemetry/api@1.8.0)(@parcel/watcher@2.4.1)(@types/node@20.12.11)(encoding@0.1.13)(eslint@9.17.0(jiti@2.4.2))(magicast@0.3.5)(optionator@0.9.4)(rollup@4.29.1)(terser@5.31.0)(tsx@4.19.2)(typescript@5.7.2)(vite@5.4.11(@types/node@20.12.11)(terser@5.31.0))(vue-tsc@2.2.0(typescript@5.7.2))(yaml@2.6.1) @@ -288,7 +303,7 @@ importers: specifier: 'catalog:' version: 3.2.0(typescript@5.7.2)(vue-tsc@2.2.0(typescript@5.7.2))(vue@3.5.13(typescript@5.7.2)) vitest: - specifier: ^2.1.8 + specifier: 'catalog:' version: 2.1.8(@types/node@20.12.11)(terser@5.31.0) vue-tsc: specifier: 'catalog:' @@ -1258,6 +1273,10 @@ packages: resolution: {integrity: sha512-ktI9+PxfHYtKjF3cLTUAh2N+b8MijCRPNwKJNqTVdL0gB0QxLU2rIRaZ1t71oEa3YBDE6bukH1sR0+CDnpp/Mg==} engines: {node: '>=16.14.0'} + '@nodelib/fs.scandir@4.0.1': + resolution: {integrity: sha512-vAkI715yhnmiPupY+dq+xenu5Tdf2TBQ66jLvBIcCddtz+5Q8LbMKaf9CIJJreez8fQ8fgaY+RaywQx8RJIWpw==} + engines: {node: '>=18.18.0'} + '@nodelib/fs.stat@2.0.5': resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} engines: {node: '>= 8'} @@ -1266,6 +1285,10 @@ packages: resolution: {integrity: sha512-2tQOI38s19P9i7X/Drt0v8iMA+KMsgdhB/dyPER+e+2Y8L1Z7QvnuRdW/uLuf5YRFUYmnj4bMA6qCuZHFI1GDQ==} engines: {node: '>=16.14.0'} + '@nodelib/fs.stat@4.0.0': + resolution: {integrity: sha512-ctr6bByzksKRCV0bavi8WoQevU6plSp2IkllIsEqaiKe2mwNNnaluhnRhcsgGZHrrHk57B3lf95MkLMO3STYcg==} + engines: {node: '>=18.18.0'} + '@nodelib/fs.walk@1.2.8': resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} @@ -1274,6 +1297,10 @@ packages: resolution: {integrity: sha512-54voNDBobGdMl3BUXSu7UaDh1P85PGHWlJ5e0XhPugo1JulOyCtp2I+5ri4wplGDJ8QGwPEQW7/x3yTLU7yF1A==} engines: {node: '>=16.14.0'} + '@nodelib/fs.walk@3.0.1': + resolution: {integrity: sha512-nIh/M6Kh3ZtOmlY00DaUYB4xeeV6F3/ts1l29iwl3/cfyY/OuCfUx+v08zgx8TKPTifXRcjjqVQ4KB2zOYSbyw==} + engines: {node: '>=18.18.0'} + '@nuxt/devalue@2.0.2': resolution: {integrity: sha512-GBzP8zOc7CGWyFQS6dv1lQz8VVpz5C2yRszbXufwG/9zhStTIH50EtD87NmWbTMwXDvZLNg8GIpb1UFdH93JCA==} @@ -1582,7 +1609,7 @@ packages: resolution: {integrity: sha512-7QaYCf8bqF04dOy7w/eHmJeNExxTYwvKAmlSAH/EaWWUzbT0h5sbF6bktFoX/0F/0qwng5/dWFMyf3gzaM8DsQ==} engines: {node: '>=14.0.0'} peerDependencies: - rollup: 4.28.1 + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 peerDependenciesMeta: rollup: optional: true @@ -4952,9 +4979,6 @@ packages: resolution: {integrity: sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==} engines: {node: '>=18'} - unimport@3.13.4: - resolution: {integrity: sha512-pRr4JO51pCQGjwDPToehYHaJLwZQbMQNBI3eGbZB1TzMHnWbQldApWe+bot7CgA03SFovF1bn03/WYFNi58rCw==} - unimport@3.14.5: resolution: {integrity: sha512-tn890SwFFZxqaJSKQPPd+yygfKSATbM8BZWW1aCR2TJBTs1SDrmLamBueaFtYsGjHtQaRgqEbQflOjN2iW12gA==} @@ -6254,10 +6278,17 @@ snapshots: '@nodelib/fs.stat': 3.0.0 run-parallel: 1.2.0 + '@nodelib/fs.scandir@4.0.1': + dependencies: + '@nodelib/fs.stat': 4.0.0 + run-parallel: 1.2.0 + '@nodelib/fs.stat@2.0.5': {} '@nodelib/fs.stat@3.0.0': {} + '@nodelib/fs.stat@4.0.0': {} + '@nodelib/fs.walk@1.2.8': dependencies: '@nodelib/fs.scandir': 2.1.5 @@ -6268,6 +6299,11 @@ snapshots: '@nodelib/fs.scandir': 3.0.0 fastq: 1.17.1 + '@nodelib/fs.walk@3.0.1': + dependencies: + '@nodelib/fs.scandir': 4.0.1 + fastq: 1.17.1 + '@nuxt/devalue@2.0.2': {} '@nuxt/devtools-kit@1.7.0(magicast@0.3.5)(rollup@4.29.1)(vite@5.4.11(@types/node@20.12.11)(terser@5.31.0))': @@ -9896,7 +9932,7 @@ snapshots: unctx: 2.4.1 unenv: 1.10.0 unhead: 1.11.14 - unimport: 3.13.4(rollup@4.29.1) + unimport: 3.14.5(rollup@4.29.1) unplugin: 2.1.0 unplugin-vue-router: 0.10.9(rollup@4.29.1)(vue-router@4.5.0(vue@3.5.13(typescript@5.7.2)))(vue@3.5.13(typescript@5.7.2)) unstorage: 1.14.4 @@ -10926,24 +10962,6 @@ snapshots: unicorn-magic@0.1.0: {} - unimport@3.13.4(rollup@4.29.1): - dependencies: - '@rollup/pluginutils': 5.1.4(rollup@4.29.1) - acorn: 8.14.0 - escape-string-regexp: 5.0.0 - estree-walker: 3.0.3 - fast-glob: 3.3.2 - local-pkg: 0.5.1 - magic-string: 0.30.17 - mlly: 1.7.3 - pathe: 1.1.2 - pkg-types: 1.3.0 - scule: 1.3.0 - strip-literal: 2.1.1 - unplugin: 1.16.0 - transitivePeerDependencies: - - rollup - unimport@3.14.5(rollup@4.29.1): dependencies: '@rollup/pluginutils': 5.1.4(rollup@4.29.1) diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 2e956ee..806f7ab 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -10,6 +10,7 @@ catalog: '@iconify-json/svg-spinners': ^1.2.2 '@iconify-json/twemoji': ^1.2.2 '@iconify-json/vscode-icons': ^1.2.7 + '@nodelib/fs.walk': ^3.0.1 '@nuxt/eslint': ^0.7.4 '@shikijs/transformers': ^1.26.0 '@types/connect': ^3.4.38 @@ -22,6 +23,7 @@ catalog: bundle-require: ^5.1.0 cac: ^6.7.14 chokidar: ^4.0.3 + debug: ^4.4.0 esbuild: ^0.24.2 eslint: ^9.17.0 fast-glob: ^3.3.2 @@ -44,5 +46,6 @@ catalog: textmate-grammar-glob: ^0.0.1 typescript: ^5.7.2 unbuild: ^3.2.0 + vitest: ^2.1.8 vue-tsc: ^2.2.0 ws: ^8.18.0 diff --git a/shared/configs.ts b/shared/configs.ts index 4156efb..911b582 100644 --- a/shared/configs.ts +++ b/shared/configs.ts @@ -1,7 +1,8 @@ import type { Linter } from 'eslint' +import type { MinimatchOptions } from 'minimatch' import type { FlatConfigItem, MatchedFile } from './types' import { ConfigArray } from '@eslint/config-array' -import { Minimatch, type MinimatchOptions } from 'minimatch' +import { Minimatch } from 'minimatch' const minimatchOpts: MinimatchOptions = { dot: true, flipNegate: true } const _matchInstances = new Map()