Repository navigation
chore(deps): bump chokidar from 4.0.3 to 6.0.0 - #1035
Conversation
chokidar 5 is ESM-only and chokidar 6 requires Node.js 22.22+. - Switch tsconfig module to node20 so the CommonJS build can require() the ESM-only package - Use the named watch export, since require(esm) does not provide the esModuleInterop default - Declare engines.node >=22.22 to match chokidar's requirement Co-Authored-By: Claude Opus 5.5 <[email protected]>
✅ Deploy Preview for mdts-unhappychoice ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Runtime and module settings package.json, tsconfig.json |
package.json requires Node.js >=22.22 and updates the Chokidar range to ^6.0.0. tsconfig.json changes the module target from node16 to node20. |
Named watcher integration src/server/watcher.ts, test/__mocks__/chokidar.ts, test/unit/server/watcher.test.ts |
The server creates directory, file-pattern, and content watchers with the named watch import. The mock and tests use named exports. Watcher options and tested behavior remain unchanged. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Other
Merge Risk: 
Minimal · up to 13617
-
The migration is ready to merge with no established build, startup, or CI compatibility risk.
Pre-merge checks: 
5
-
Full details: Docstring Coverage
-
Explanation
No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 3 files. (2 skipped: 2 unsupported.)
-
Finishing Touches
-
📝 Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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 @coderabbitai help to get the list of available commands.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1035 +/- ##
=======================================
Coverage 99.33% 99.33%
=======================================
Files 71 71
Lines 1663 1663
Branches 400 407 +7
=======================================
Hits 1652 1652
Misses 10 10
Partials 1 1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
Replaces #1032, which failed type-checking because chokidar 5+ is ESM-only:
Changes
chokidar^4.0.3 → ^6.0.0tsconfig.json:modulenode16→node20, which lets the CommonJS buildrequire()ESM-only packages (supported natively since Node 22.12)src/server/watcher.ts: use the namedwatchexport instead of the default import (require(esm)returns the module namespace, so theesModuleInteropdefault would not resolve)package.json: addengines.node: ">=22.22", matching chokidar 6's requirement@typescript-eslint/*entries that npm deduplicated on reinstallBreaking change
mdts now requires Node.js 22.22 or later (chokidar 6 requirement). Users on older Node versions get an
EBADENGINEwarning on install and the CLI fails at startup.Note that CI reads its Node version from
package.json, so withenginesset it now runs on the latest Node that satisfies>=22.22, not the runner default.Verification
npm run buildandnpm test: 142 tests passed, including the CLI e2e tests that run the built CLI against the real chokidar 6npm run lintpassesreload-contentwhen a watched file changes, and chokidar 6 firesaddwith mdts'signoredfilter🤖 Generated with Claude Code
Summary by CodeRabbit