From 4e30a3f2bda4ac4d63333a208693df2e95dd35da Mon Sep 17 00:00:00 2001 From: ice breaker <1324318532@qq.com> Date: Thu, 27 Jul 2023 23:55:40 +0800 Subject: [PATCH] chore: upgrade del to 7.x esm --- package.json | 4 +- pnpm-lock.yaml | 97 ++++++++++++++++-------------------------------- scripts/clean.js | 3 +- 3 files changed, 36 insertions(+), 68 deletions(-) diff --git a/package.json b/package.json index 5a029cf..dd3c4ba 100644 --- a/package.json +++ b/package.json @@ -58,10 +58,10 @@ "@vitest/coverage-v8": "^0.33.0", "cross-env": "^7.0.3", "defu": "^6.1.2", - "del": "^6.1.1", + "del": "^7.0.0", "eslint": "8.45.0", "eslint-config-icebreaker": "^1.2.2", - "eslint-config-prettier": "^8.8.0", + "eslint-config-prettier": "^8.9.0", "eslint-plugin-prettier": "^5.0.0", "klaw": "^4.1.0", "lodash": "^4.17.21", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c2222ae..84cd235 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -54,8 +54,8 @@ devDependencies: specifier: ^6.1.2 version: 6.1.2 del: - specifier: ^6.1.1 - version: 6.1.1 + specifier: ^7.0.0 + version: 7.0.0 eslint: specifier: 8.45.0 version: 8.45.0 @@ -63,11 +63,11 @@ devDependencies: specifier: ^1.2.2 version: 1.2.2(eslint@8.45.0)(typescript@5.1.6) eslint-config-prettier: - specifier: ^8.8.0 - version: 8.8.0(eslint@8.45.0) + specifier: ^8.9.0 + version: 8.9.0(eslint@8.45.0) eslint-plugin-prettier: specifier: ^5.0.0 - version: 5.0.0(eslint-config-prettier@8.8.0)(eslint@8.45.0)(prettier@3.0.0) + version: 5.0.0(eslint-config-prettier@8.9.0)(eslint@8.45.0)(prettier@3.0.0) klaw: specifier: ^4.1.0 version: 4.1.0 @@ -645,7 +645,7 @@ packages: engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} dependencies: cross-spawn: 7.0.3 - fast-glob: 3.3.0 + fast-glob: 3.3.1 is-glob: 4.0.3 open: 9.1.0 picocolors: 1.0.0 @@ -1224,14 +1224,6 @@ packages: - supports-color dev: true - /aggregate-error@3.1.0: - resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} - engines: {node: '>=8'} - dependencies: - clean-stack: 2.2.0 - indent-string: 4.0.0 - dev: true - /aggregate-error@4.0.1: resolution: {integrity: sha512-0poP0T7el6Vq3rstR8Mn4V/IQrpBLO6POkUSrN7RhyY+GF/InCFShQzsQ39T25gkHhLgSLByyAz+Kjb+c2L98w==} engines: {node: '>=12'} @@ -1553,11 +1545,6 @@ packages: escape-string-regexp: 1.0.5 dev: true - /clean-stack@2.2.0: - resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} - engines: {node: '>=6'} - dev: true - /clean-stack@4.2.0: resolution: {integrity: sha512-LYv6XPxoyODi36Dp976riBtSY27VmFo+MKqEU9QCCWyTrdEPDog+RWA7xQWHi6Vbp61j5c4cdzzX1NidnwtUWg==} engines: {node: '>=12'} @@ -1822,18 +1809,18 @@ packages: resolution: {integrity: sha512-+uO4+qr7msjNNWKYPHqN/3+Dx3NFkmIzayk2L1MyZQlvgZb/J1A0fo410dpKrN2SnqFjt8n4JL8fDJE0wIgjFQ==} dev: true - /del@6.1.1: - resolution: {integrity: sha512-ua8BhapfP0JUJKC/zV9yHHDW/rDoDxP4Zhn3AkA6/xT6gY7jYXJiaeyBZznYVujhZZET+UgcbZiQ7sN3WqcImg==} - engines: {node: '>=10'} + /del@7.0.0: + resolution: {integrity: sha512-tQbV/4u5WVB8HMJr08pgw0b6nG4RGt/tj+7Numvq+zqcvUFeMaIWWOUFltiU+6go8BSO2/ogsB4EasDaj0y68Q==} + engines: {node: '>=14.16'} dependencies: - globby: 11.1.0 - graceful-fs: 4.2.10 + globby: 13.2.2 + graceful-fs: 4.2.11 is-glob: 4.0.3 - is-path-cwd: 2.2.0 - is-path-inside: 3.0.3 - p-map: 4.0.0 + is-path-cwd: 3.0.0 + is-path-inside: 4.0.0 + p-map: 5.5.0 rimraf: 3.0.2 - slash: 3.0.0 + slash: 4.0.0 dev: true /deprecation@2.3.1: @@ -2038,7 +2025,7 @@ packages: '@typescript-eslint/eslint-plugin': 6.2.0(@typescript-eslint/parser@6.2.0)(eslint@8.45.0)(typescript@5.1.6) '@typescript-eslint/parser': 6.2.0(eslint@8.45.0)(typescript@5.1.6) eslint: 8.45.0 - eslint-config-prettier: 8.8.0(eslint@8.45.0) + eslint-config-prettier: 8.9.0(eslint@8.45.0) eslint-config-standard: 17.1.0(eslint-plugin-import@2.27.5)(eslint-plugin-n@16.0.1)(eslint-plugin-promise@6.1.1)(eslint@8.45.0) eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@6.2.0)(eslint-plugin-import@2.27.5)(eslint@8.45.0) eslint-plugin-import: 2.27.5(@typescript-eslint/parser@6.2.0)(eslint-import-resolver-typescript@3.5.5)(eslint@8.45.0) @@ -2053,8 +2040,8 @@ packages: - supports-color dev: true - /eslint-config-prettier@8.8.0(eslint@8.45.0): - resolution: {integrity: sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==} + /eslint-config-prettier@8.9.0(eslint@8.45.0): + resolution: {integrity: sha512-+sbni7NfVXnOpnRadUA8S28AUlsZt9GjgFvABIRL9Hkn8KqNzOp+7Lw4QWtrwn20KzU3wqu1QoOj2m+7rKRqkA==} hasBin: true peerDependencies: eslint: '>=7.0.0' @@ -2228,7 +2215,7 @@ packages: semver: 6.3.1 dev: true - /eslint-plugin-prettier@5.0.0(eslint-config-prettier@8.8.0)(eslint@8.45.0)(prettier@3.0.0): + /eslint-plugin-prettier@5.0.0(eslint-config-prettier@8.9.0)(eslint@8.45.0)(prettier@3.0.0): resolution: {integrity: sha512-AgaZCVuYDXHUGxj/ZGu1u8H8CYgDY3iG6w5kUFw4AzMVXzB7VvbKgYR4nATIN+OvUrghMbiDLeimVjVY5ilq3w==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -2243,7 +2230,7 @@ packages: optional: true dependencies: eslint: 8.45.0 - eslint-config-prettier: 8.8.0(eslint@8.45.0) + eslint-config-prettier: 8.9.0(eslint@8.45.0) prettier: 3.0.0 prettier-linter-helpers: 1.0.0 synckit: 0.8.5 @@ -2434,19 +2421,8 @@ packages: resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==} dev: true - /fast-glob@3.2.12: - resolution: {integrity: sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==} - engines: {node: '>=8.6.0'} - dependencies: - '@nodelib/fs.stat': 2.0.5 - '@nodelib/fs.walk': 1.2.8 - glob-parent: 5.1.2 - merge2: 1.4.1 - micromatch: 4.0.5 - dev: true - - /fast-glob@3.3.0: - resolution: {integrity: sha512-ChDuvbOypPuNjO8yIDf36x7BlZX1smcUMTTcyoIjycexOxd6DFsKsg21qVBzEmr3G7fUKIRy2/psii+CIUt7FA==} + /fast-glob@3.3.1: + resolution: {integrity: sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==} engines: {node: '>=8.6.0'} dependencies: '@nodelib/fs.stat': 2.0.5 @@ -2719,8 +2695,8 @@ packages: dependencies: array-union: 2.1.0 dir-glob: 3.0.1 - fast-glob: 3.2.12 - ignore: 5.2.1 + fast-glob: 3.3.1 + ignore: 5.2.4 merge2: 1.4.1 slash: 3.0.0 dev: true @@ -2730,7 +2706,7 @@ packages: engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dependencies: dir-glob: 3.0.1 - fast-glob: 3.3.0 + fast-glob: 3.3.1 ignore: 5.2.4 merge2: 1.4.1 slash: 4.0.0 @@ -2873,11 +2849,6 @@ packages: engines: {node: '>=14.18.0'} dev: true - /ignore@5.2.1: - resolution: {integrity: sha512-d2qQLzTJ9WxQftPAuEQpSPmKqzxePjzVbpAVv62AQ64NTL+wR4JkrVqR/LqFsFEUsHDAiId52mJteHDFuDkElA==} - engines: {node: '>= 4'} - dev: true - /ignore@5.2.4: resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==} engines: {node: '>= 4'} @@ -3063,9 +3034,9 @@ packages: engines: {node: '>=8'} dev: true - /is-path-cwd@2.2.0: - resolution: {integrity: sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==} - engines: {node: '>=6'} + /is-path-cwd@3.0.0: + resolution: {integrity: sha512-kyiNFFLU0Ampr6SDZitD/DwUo4Zs1nSdnygUBqsu3LooL00Qvb5j+UnvApUn/TTj1J3OuE6BTdQ5rudKmU2ZaA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dev: true /is-path-inside@3.0.3: @@ -3073,6 +3044,11 @@ packages: engines: {node: '>=8'} dev: true + /is-path-inside@4.0.0: + resolution: {integrity: sha512-lJJV/5dYS+RcL8uQdBDW9c9uWFLLBNRyFhnAKXw5tVqLlKZ4RMGZKv+YQ/IA3OhD+RpbJa1LLFM1FQPGyIXvOA==} + engines: {node: '>=12'} + dev: true + /is-plain-obj@1.1.0: resolution: {integrity: sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==} engines: {node: '>=0.10.0'} @@ -3902,13 +3878,6 @@ packages: p-limit: 4.0.0 dev: true - /p-map@4.0.0: - resolution: {integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==} - engines: {node: '>=10'} - dependencies: - aggregate-error: 3.1.0 - dev: true - /p-map@5.5.0: resolution: {integrity: sha512-VFqfGDHlx87K66yZrNdI4YGtD70IRyd+zSvgks6mzHPRNkoKy+9EKP4SFC77/vTTQYmRmti7dvqC+m5jBrBAcg==} engines: {node: '>=12'} diff --git a/scripts/clean.js b/scripts/clean.js index 125fe75..eaa2108 100644 --- a/scripts/clean.js +++ b/scripts/clean.js @@ -1,7 +1,6 @@ -const deleteAsync = require('del') - // 同时兼容 `yarn clean` and `yarn clean xxx yyy zzz` ;(async () => { + const { deleteAsync } = await import('del') const dirs = process.argv.slice(2) if (dirs.length === 0) { dirs.push('dist')