chore(deps): update dependency del to v8 - #39
Conversation
a147eb6 to
8c28491
Compare
8c28491 to
049e76b
Compare
049e76b to
c1070fd
Compare
📝 WalkthroughWalkthroughThis pull request upgrades the 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@package.json`:
- Line 34: The project upgraded del to ^8 which removed the default export and
renamed the API to deleteAsync; update all import and callsites in
css-extract/TestCache.test.js and css-extract/emitOption.test.js to use the
named import (e.g., replace default import usage like `import del from "del"`
and `await del(...)` with `import { deleteAsync } from "del"` and `await
deleteAsync(...)`) and adjust any callsite semantics accordingly; additionally
add an engines.node entry to package.json (Node >=18) to reflect del@8 runtime
requirement.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 21e07e98-ea75-41cb-8372-d4c072dc43dc
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (1)
package.json
| "html-webpack-plugin": "5.6.7", | ||
| "jsdom": "^25.0.1", | ||
| "del": "^6.1.1", | ||
| "del": "^8.0.1", |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== del imports (default vs named) =="
rg -nP --type=js --type=ts --type=mjs --type=cjs '^\s*import\s+.+\s+from\s+["'\'']del["'\''];?$' -C2
echo
echo "== direct del(...) invocations =="
rg -nP --type=js --type=ts --type=mjs --type=cjs '\bdel\s*\(' -C2
echo
echo "== already-migrated deleteAsync usage =="
rg -nP --type=js --type=ts --type=mjs --type=cjs '\bdeleteAsync\s*\(' -C2Repository: rstackjs/rspack-plugin-ci
Length of output: 152
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== del imports (default vs named) =="
rg -nP --type=js --type=ts --type=cjs --type=cts '^\s*import\s+.+\s+from\s+["'\'']del["'\''];?$' -C2 || true
echo
echo "== direct del(...) invocations =="
rg -nP --type=js --type=ts --type=cjs --type=cts '\bdel\s*\(' -C2 || true
echo
echo "== already-migrated deleteAsync usage =="
rg -nP --type=js --type=ts --type=cjs --type=cts '\bdeleteAsync\s*\(' -C2 || trueRepository: rstackjs/rspack-plugin-ci
Length of output: 285
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== package.json engines (if any) =="
if [ -f package.json ]; then
cat -n package.json | sed -n '1,160p' | rg -n "engines" -n || true
echo
rg -n '"engines"\s*:\s*\{' package.json -n || true
fi
echo "== del imports (from 'del') =="
rg -nP --glob '*.js' --glob '*.ts' --glob '*.mjs' --glob '*.cjs' \
'^\s*import\s+.+\s+from\s+["'\'']del["'\''];?\s*$' -C2 . || true
echo
echo "== require('del') =="
rg -nP --glob '*.js' --glob '*.ts' --glob '*.mjs' --glob '*.cjs' \
'require\s*\(\s*["'\'']del["'\'']\s*\)' -C2 . || true
echo
echo "== direct del(...) invocations =="
rg -nP --glob '*.js' --glob '*.ts' --glob '*.mjs' --glob '*.cjs' \
'\bdel\s*\(' -C1 . || true
echo
echo "== deleteAsync usage =="
rg -nP --glob '*.js' --glob '*.ts' --glob '*.mjs' --glob '*.cjs' \
'\bdeleteAsync\s*\(' -C1 . || trueRepository: rstackjs/rspack-plugin-ci
Length of output: 2358
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Show the full engines block from package.json (small)
sed -n '1,80p' package.json | cat -nRepository: rstackjs/rspack-plugin-ci
Length of output: 1808
🌐 Web query:
del@8 default export deleteAsync named exports node version requirement engines
💡 Result:
Starting with version 7.0.0, the del package is a pure ESM (ECMAScript module) package and no longer uses a default export [1]. Instead, it provides named exports [1]. For asynchronous file deletion, you must use the named export deleteAsync [2][3]: import {deleteAsync} from 'del'; const deletedPaths = await deleteAsync(['temp/.js']); For synchronous operations, you must use the named export deleteSync [2][4]: import {deleteSync} from 'del'; const deletedPaths = deleteSync(['temp/.js']); The minimum Node.js version requirement for del v8.x is Node.js 18 [5][6]. This requirement was introduced in version 8.0.0 [6][7]. Previous major version, 7.0.0, required Node.js 14 [1].
Citations:
- 1: https://github.com/sindresorhus/del/releases/tag/v7.0.0
- 2: https://www.npmjs.com/package/del
- 3: https://github.com/sindresorhus/del?tab=readme-ov-file
- 4: https://github.com/sindresorhus/del/blob/main/readme.md
- 5: https://npmx.dev/package/del/v/%5E8.0.0
- 6: https://github.com/sindresorhus/del/releases/tag/v8.0.0
- 7: https://github.com/sindresorhus/del/pull/161
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== del imports (default import from 'del') =="
rg -nP --glob '*.js' --glob '*.ts' --glob '*.mjs' --glob '*.cjs' \
'^\s*import\s+[^;]+?\s+from\s+["'\'']del["'\''];?\s*$' -C2 . || true
echo
echo "== require('del') =="
rg -nP --glob '*.js' --glob '*.ts' --glob '*.mjs' --glob '*.cjs' \
'require\s*\(\s*["'\'']del["'\'']\s*\)' -C2 . || true
echo
echo "== direct del(...) invocations (potentially still old API) =="
rg -nP --glob '*.js' --glob '*.ts' --glob '*.mjs' --glob '*.cjs' \
'\bdel\s*\(' -C1 . || true
echo
echo "== already-migrated deleteAsync usage =="
rg -nP --glob '*.js' --glob '*.ts' --glob '*.mjs' --glob '*.cjs' \
'\bdeleteAsync\s*\(' -C1 . || trueRepository: rstackjs/rspack-plugin-ci
Length of output: 2338
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== del imports (default import from 'del') =="
rg -nP --glob '*.js' --glob '*.ts' --glob '*.mjs' --glob '*.cjs' \
'^\s*import\s+[^;]+?\s+from\s+["'\'']del["'\''];?\s*$' -C2 . || true
echo
echo "== require('del') =="
rg -nP --glob '*.js' --glob '*.ts' --glob '*.mjs' --glob '*.cjs' \
'require\s*\(\s*["'\'']del["'\'']\s*\)' -C2 . || true
echo
echo "== direct del(...) invocations (potentially still old API) =="
rg -nP --glob '*.js' --glob '*.ts' --glob '*.mjs' --glob '*.cjs' \
'\bdel\s*\(' -C1 . || true
echo
echo "== already-migrated deleteAsync usage =="
rg -nP --glob '*.js' --glob '*.ts' --glob '*.mjs' --glob '*.cjs' \
'\bdeleteAsync\s*\(' -C1 . || trueRepository: rstackjs/rspack-plugin-ci
Length of output: 2338
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== del imports (default import from 'del') =="
rg -nP --glob '*.js' --glob '*.ts' --glob '*.mjs' --glob '*.cjs' \
'^\s*import\s+[^;]+?\s+from\s+["'\'']del["'\''];?\s*$' -C2 . || true
echo
echo "== require('del') =="
rg -nP --glob '*.js' --glob '*.ts' --glob '*.mjs' --glob '*.cjs' \
'require\s*\(\s*["'\'']del["'\'']\s*\)' -C2 . || true
echo
echo "== direct del(...) invocations (potentially still old API) =="
rg -nP --glob '*.js' --glob '*.ts' --glob '*.mjs' --glob '*.cjs' \
'\bdel\s*\(' -C1 . || true
echo
echo "== already-migrated deleteAsync usage =="
rg -nP --glob '*.js' --glob '*.ts' --glob '*.mjs' --glob '*.cjs' \
'\bdeleteAsync\s*\(' -C1 . || trueRepository: rstackjs/rspack-plugin-ci
Length of output: 2338
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== del imports (default import from 'del') =="
rg -nP --glob '*.js' --glob '*.ts' --glob '*.mjs' --glob '*.cjs' \
'^\s*import\s+[^;]+?\s+from\s+["'\'']del["'\''];?\s*$' -C2 . || true
echo
echo "== require('del') =="
rg -nP --glob '*.js' --glob '*.ts' --glob '*.mjs' --glob '*.cjs' \
'require\s*\(\s*["'\'']del["'\'']\s*\)' -C2 . || true
echo
echo "== direct del(...) invocations (potentially still old API) =="
rg -nP --glob '*.js' --glob '*.ts' --glob '*.mjs' --glob '*.cjs' \
'\bdel\s*\(' -C1 . || true
echo
echo "== already-migrated deleteAsync usage =="
rg -nP --glob '*.js' --glob '*.ts' --glob '*.mjs' --glob '*.cjs' \
'\bdeleteAsync\s*\(' -C1 . || trueRepository: rstackjs/rspack-plugin-ci
Length of output: 2338
🏁 Script executed:
#!/bin/bash
set -euo pipefail
RG_OPTS=(--glob '!**/node_modules/**' --glob '*.js' --glob '*.ts' --glob '*.mjs' --glob '*.cjs')
echo "== del imports (default import from 'del') =="
rg -nP "${RG_OPTS[@]}" '^\s*import\s+[^;]+?\s+from\s+["'\'']del["'\''];?\s*$' -C2 . || true
echo
echo "== require('del') =="
rg -nP "${RG_OPTS[@]}" 'require\s*\(\s*["'\'']del["'\'']\s*\)' -C2 . || true
echo
echo "== direct del(...) invocations =="
rg -nP "${RG_OPTS[@]}" '\bdel\s*\(' -C1 . || true
echo
echo "== already-migrated deleteAsync usage =="
rg -nP "${RG_OPTS[@]}" '\bdeleteAsync\s*\(' -C1 . || trueRepository: rstackjs/rspack-plugin-ci
Length of output: 2310
Breaking API contract: migrate all del callsites to named deleteAsync before shipping del@^8.0.1.
del is bumped to ^8.0.1, but the repo still imports and calls it via the v7-style default API (import del from "del"; + await del(...)) in:
css-extract/TestCache.test.jscss-extract/emitOption.test.js
No deleteAsync( usage exists yet.
Suggested migration pattern
- import del from "del";
+ import { deleteAsync } from "del";
- await del([outputPath]);
+ await deleteAsync([outputPath]);Also: del@8 requires Node.js >= 18, but package.json does not specify engines.node.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@package.json` at line 34, The project upgraded del to ^8 which removed the
default export and renamed the API to deleteAsync; update all import and
callsites in css-extract/TestCache.test.js and css-extract/emitOption.test.js to
use the named import (e.g., replace default import usage like `import del from
"del"` and `await del(...)` with `import { deleteAsync } from "del"` and `await
deleteAsync(...)`) and adjust any callsite semantics accordingly; additionally
add an engines.node entry to package.json (Node >=18) to reflect del@8 runtime
requirement.
32b3e82 to
36b61a4
Compare
c12d5b9 to
7b45506
Compare
068aa72 to
ad90f38
Compare
1a18ba1 to
5ecc382
Compare
2307ff1 to
4acd91a
Compare
4acd91a to
b59c28e
Compare
This PR contains the following updates:
^6.1.1→^8.0.1Release Notes
sindresorhus/del (del)
v8.0.1Compare Source
v8.0.0Compare Source
Breaking
e2e5b71Improvements
e2e5b71v7.1.0Compare Source
pathtoonProgressevent (#155)f5d31e6v7.0.0Compare Source
Breaking
106d7d8require('del')→import {deleteAsync} from 'del'require('del').sync→import {deleteSync} from 'del'Configuration
📅 Schedule: (in timezone Asia/Shanghai)
* 0-3 1,15 * *)🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.