fix(deps): update dependency chokidar to v5 - #81
Conversation
c0cdaea to
0d356e1
Compare
0d356e1 to
a1b040f
Compare
97da2b6 to
62fb42d
Compare
de24f5b to
4a4f51b
Compare
4a4f51b to
d2a535c
Compare
d2a535c to
51f15f4
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis pull request updates the chokidar file-watching dependency in 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 40: Your package currently depends on chokidar@^5.0.0 (an ESM-only lib
requiring Node >=20.19.0) while rslib.config.mts emits CJS and package.json uses
main: "lib/index.js", so either declare the proper Node engine or align your
build and packaging with ESM; to fix, choose one: (A) keep CJS output—downgrade
chokidar to the last CJS-compatible v4 (e.g., "chokidar": "^4.3.0") in
package.json and leave rslib.config.mts format:'cjs' and main unchanged, or (B)
adopt ESM—update package.json to include "engines": {"node": ">=20.19.0"}, set
"type":"module" and adjust main/exports and rslib.config.mts to emit ESM
(format:'esm') so chokidar@^5 works; update whichever path you pick consistently
across package.json (chokidar entry, "type", "main"/"exports", and "engines")
and rslib.config.mts (format).
🪄 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: f07ccd73-3b8e-4f5d-afc3-43f40c85af59
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (1)
package.json
| "dependencies": { | ||
| "@rspack/lite-tapable": "^1.1.1", | ||
| "chokidar": "^3.6.0", | ||
| "chokidar": "^5.0.0", |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "1) Check declared runtime contract in package.json"
cat package.json | jq '{name, version, type, main, module, exports, engines, dependencies: {chokidar: .dependencies.chokidar}}'
echo
echo "2) Find chokidar imports/usages and import style"
rg -n -C2 --type=ts --type=js '\bfrom\s+["'"'"']chokidar["'"'"']|require\(["'"'"']chokidar["'"'"']\)|\bchokidar\.watch\s*\('
echo
echo "3) Inspect build/module config hints (tsconfig/rslib/workflows)"
fd -i 'tsconfig*.json|rslib*.?(ts|js|json)|*.yml|*.yaml' .github/workflows . 2>/dev/null | sed 's#^`#-` #'
rg -n -C2 '"module"|"moduleResolution"|"target"|"format"|node-version|NODE_VERSION|engines'Repository: rstackjs/ts-checker-rspack-plugin
Length of output: 412
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== package.json: relevant fields =="
node - <<'NODE'
const p = require('./package.json');
console.log(JSON.stringify({
name: p.name,
version: p.version,
type: p.type,
main: p.main,
module: p.module,
exports: p.exports,
engines: p.engines,
chokidar: p.dependencies?.chokidar || p.devDependencies?.chokidar
}, null, 2));
NODE
echo
echo "== chokidar usage/import style (TS/JS) =="
rg -n -C2 --type=ts --type=js 'from\s+["'\'']chokidar["'\'']|require\s*\(\s*["'\'']chokidar["'\'']\b|chokidar\.watch\s*\('
echo
echo "== build/module config hints (tsconfig/rspack/CI) =="
fd -i 'tsconfig*.json|rslib*.?(ts|js|json)|rspack*.?(ts|js|json)|*.yml|*.yaml' .github/workflows . 2>/dev/null | sed 's#^`#-` #'
# Show key settings if files exist
rg -n -C2 '"module"|"moduleResolution"|"target"|"format"|\btype\b|' tsconfig*.json 2>/dev/null || true
rg -n -C2 'node-version|NODE_VERSION|engines' .github/workflows 2>/dev/null || trueRepository: rstackjs/ts-checker-rspack-plugin
Length of output: 1254
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== package.json scripts/fields (contract inputs) =="
node - <<'NODE'
const p = require('./package.json');
console.log(JSON.stringify({
type: p.type,
main: p.main,
exports: p.exports,
module: p.module,
engines: p.engines,
scripts: p.scripts
}, null, 2));
NODE
echo
echo "== Find tsconfig / build config files =="
fd -i "tsconfig*.json" . || true
fd -i "*rspack*.{js,ts}" . || true
fd -i "*webpack*.{js,ts}" . || true
fd -i "*rollup*.{js,ts}" . || true
fd -i "*babel*.{js,ts,json}" . || true
echo
echo "== Extract module/output-related options (tsconfig) =="
for f in $(fd -i "tsconfig*.json" . 2>/dev/null || true); do
echo "--- $f ---"
# print only the first 200 lines around compilerOptions if present
rg -n --max-count 200 '"compilerOptions"' "$f" || true
rg -n --max-count 200 '"module"|"moduleResolution"|"target"|"outDir"|"esModuleInterop"|"allowSyntheticDefaultImports"|"verbatimModuleSyntax"|' "$f" || true
echo
done
echo "== CI node versions / engines usage =="
fd -i ".github/workflows/*.yml" .github/workflows 2>/dev/null || true
rg -n --max-count 200 'node-version|NODE_VERSION' .github/workflows 2>/dev/null || true
rg -n --max-count 200 '"engines"' .github/workflows 2>/dev/null || true
echo
echo "== Confirm build entrypoint output expectations =="
rg -n --max-count 200 'tsc|rspack|ts-node|module.exports|exports\.' package.json . 2>/dev/null | head -n 200 || trueRepository: rstackjs/ts-checker-rspack-plugin
Length of output: 29141
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== package.json (relevant top-level keys) =="
node - <<'NODE'
const p = require('./package.json');
const keys = ['name','version','type','main','module','exports','engines','dependencies','peerDependencies','devDependencies','files','sideEffects','publishConfig','bin'];
const out = {};
for (const k of keys) out[k] = p[k];
out.dependencies = p.dependencies || undefined;
console.log(JSON.stringify(out, null, 2));
NODE
echo
echo "== package.json raw lines around type/exports/engines (search-based) =="
rg -n '"(type|exports|engines)"\s*:' package.json || true
rg -n '"main"\s*:' package.json || true
echo
echo "== Look for rslib config =="
fd -i 'rslib.*\.(js|ts|json|cjs|mjs)' . 2>/dev/null || true
rg -n 'rslib' package.json .github/workflows tsconfig*.json 2>/dev/null || trueRepository: rstackjs/ts-checker-rspack-plugin
Length of output: 1486
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== Check whether lib output exists in repo =="
ls -la lib 2>/dev/null || echo "No ./lib directory in repo"
echo
echo "== Inspect lib/index.js module style (if present) =="
if [ -f lib/index.js ]; then
sed -n '1,120p' lib/index.js | nl -ba
else
echo "Missing lib/index.js"
fi
echo
echo "== Search compiled code for chokidar import style =="
if [ -d lib ]; then
rg -n --hidden --no-ignore-vcs "chokidar" lib | head -n 50
rg -n "require\\(['\"]chokidar['\"]\\)|from ['\"]chokidar['\"]|import .*chokidar|module\\.exports" lib | head -n 80
else
echo "Skipping compiled-code search (no ./lib)"
fi
echo
echo "== Locate rslib config (in repo) =="
fd -i 'rslib*.{js,ts,json,mjs,cjs}' . 2>/dev/null || true
rg -n 'rslib' . -S --hidden --no-ignore-vcs | head -n 80Repository: rstackjs/ts-checker-rspack-plugin
Length of output: 767
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== rslib.config.mts =="
sed -n '1,200p' rslib.config.mts | nl -ba
echo
echo "== tsconfig.json =="
sed -n '1,200p' tsconfig.json | nl -ba
echo
echo "== Consumption style of this package in repo fixtures =="
rg -n --hidden --no-ignore-vcs "require\\(['\"]ts-checker-rspack-plugin['\"]\\)" test examples . || true
rg -n --hidden --no-ignore-vcs "from ['\"]ts-checker-rspack-plugin['\"]" test examples . || true
echo
echo "== Any rslib output/format hints =="
rg -n --hidden --no-ignore-vcs "format|module|cjs|esm|outDir|entry|exports|rollup|tsup" rslib.config.mts tsconfig.json package.json 2>/dev/null || trueRepository: rstackjs/ts-checker-rspack-plugin
Length of output: 161
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== rslib.config.mts =="
sed -n '1,200p' rslib.config.mts
echo
echo "== tsconfig.json =="
sed -n '1,200p' tsconfig.json
echo
echo "== Consumption style of this package in repo fixtures =="
rg -n --hidden --no-ignore-vcs "require\\(['\"]ts-checker-rspack-plugin['\"]\\)" test examples . || true
rg -n --hidden --no-ignore-vcs "from ['\"]ts-checker-rspack-plugin['\"]" test examples . || true
echo
echo "== Any rslib output/format hints =="
rg -n --hidden --no-ignore-vcs "format|module|cjs|esm|outDir|entry|exports|rollup|tsup" rslib.config.mts tsconfig.json package.json 2>/dev/null || trueRepository: rstackjs/ts-checker-rspack-plugin
Length of output: 3004
🌐 Web query:
chokidar v5 ESM-only node minimum version 20.19
💡 Result:
Chokidar v5, released on November 25, 2025, transitioned the package to ESM-only [1][2]. This release requires a minimum Node.js version of 20.19.0 [1][3]. The author specifically selected this version because Node.js versions starting from 20.19.0 support loading ESM files from CommonJS (CJS) contexts [1][2]. The change was implemented in the package.json engines field, updating the requirement from >= 14.16.0 in version 4 to >= 20.19.0 in version 5 [3].
Citations:
- 1: https://github.com/paulmillr/chokidar/releases/tag/5.0.0
- 2: https://newreleases.io/project/npm/chokidar/release/5.0.0
- 3: paulmillr/chokidar@4.0.3...5.0.0
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== .github/workflows/main.yml =="
sed -n '1,200p' .github/workflows/main.yml
echo
echo "== .github/workflows/release.yml =="
sed -n '1,120p' .github/workflows/release.yml
echo
echo "== Find any other CI node-version matrices =="
rg -n --max-count 200 'node-version:\s*\$\{\{\s*matrix\.node\s*\}\}|matrix\.node|node-version:' .github/workflows/*.ymlRepository: rstackjs/ts-checker-rspack-plugin
Length of output: 2090
Declare chokidar v5’s Node runtime contract (and align with CJS output)
chokidar@^5.0.0 is ESM-only and requires Node.js >=20.19.0, but this package publishes CJS (rslib.config.mts sets format: 'cjs' and package.json has main: "lib/index.js") and currently has no engines.node field—so installs/runtimes on older Node versions can break.
Suggested minimal contract update
{
"name": "ts-checker-rspack-plugin",
"version": "1.4.0",
+ "engines": {
+ "node": ">=20.19.0"
+ },
"description": "Runs typescript type checker and linter on separate process.",🤖 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 40, Your package currently depends on chokidar@^5.0.0
(an ESM-only lib requiring Node >=20.19.0) while rslib.config.mts emits CJS and
package.json uses main: "lib/index.js", so either declare the proper Node engine
or align your build and packaging with ESM; to fix, choose one: (A) keep CJS
output—downgrade chokidar to the last CJS-compatible v4 (e.g., "chokidar":
"^4.3.0") in package.json and leave rslib.config.mts format:'cjs' and main
unchanged, or (B) adopt ESM—update package.json to include "engines": {"node":
">=20.19.0"}, set "type":"module" and adjust main/exports and rslib.config.mts
to emit ESM (format:'esm') so chokidar@^5 works; update whichever path you pick
consistently across package.json (chokidar entry, "type", "main"/"exports", and
"engines") and rslib.config.mts (format).
51f15f4 to
111e08a
Compare
111e08a to
f5071cc
Compare
d51dcc3 to
6e50738
Compare
1b9e199 to
a61562b
Compare
b152585 to
bcb467c
Compare
bcb467c to
0b7e707
Compare
429466e to
72295fa
Compare
72295fa to
3ceecc8
Compare
This PR contains the following updates:
^3.6.0→^5.0.0Release Notes
paulmillr/chokidar (chokidar)
v5.0.0Compare Source
New Contributors
Full Changelog: paulmillr/chokidar@4.0.3...5.0.0
v4.0.3Compare Source
What's Changed
Full Changelog: paulmillr/chokidar@4.0.2...4.0.3
v4.0.2Compare Source
What's Changed
New Contributors
Full Changelog: paulmillr/chokidar@4.0.1...4.0.2
v4.0.1Compare Source
New Contributors
Full Changelog: paulmillr/chokidar@4.0.0...4.0.1
v4.0.0Compare Source
Special thanks to @43081j for improvements and help.
Full Changelog: paulmillr/chokidar@3.6.0...4.0.0
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.