Skip to content

Update chokidar - #34

Open
andriyor wants to merge 2 commits into
unifiedjs:mainfrom
andriyor:update-chokidar
Open

Update chokidar#34
andriyor wants to merge 2 commits into
unifiedjs:mainfrom
andriyor:update-chokidar

Conversation

@andriyor

@andriyor andriyor commented Aug 30, 2026

Copy link
Copy Markdown

Initial checklist

  • I read the support docs
  • I read the contributing guide
  • I agree to follow the code of conduct
  • I searched issues and discussions and couldn’t find anything or linked relevant results below
  • I made sure the docs are up to date
  • I included tests (or that’s not needed)

Description of changes

Bumps chokidar from ^3.0.0 to ^5.0.0. Types needed two tweaks: FSWatcher
is imported as a type (it is no longer a namespace), and done is cast because
error now passes unknown. Dropped glob support does not affect us —
fileSet.origins are resolved paths. Existing --watch tests cover it.

Likely a major, though: chokidar@5 wants Node >= 20.19.0 while the readme
promises Node 16 for this line, and #19 was labelled semver/major for the same
reason. I left the readme and engines alone since dropping Node 16 is your
call. Happy to hold this for the next major.

Second commit fixes four pre-existing type errors in lib/parse-argv.js under
TypeScript 5.9.3 (floating typescript: ^5.0.0); main is red without it, so
this PR could not go green. Glad to split it out if you prefer.

@github-actions github-actions Bot added the 👋 phase/new Post is being triaged automatically label Aug 30, 2026
@github-actions

This comment has been minimized.

@andriyor

Copy link
Copy Markdown
Author

CI was red on the type-check, but those four lib/parse-argv.js errors are pre-existing on main and unrelated to chokidar — I reproduced them on a clean clone of main with TypeScript 5.9.3 (the project floats typescript: ^5.0.0).

TS 5.9 reports conditional-return mismatches on the ternary branches rather than on the return, so the @ts-expect-error in toArray no longer covers them, and lastIfArray was relying on a check that has since tightened.

Pushed be75301 as a separate commit to unblock this PR. Happy to split it into its own PR if you'd rather keep this one to just the chokidar bump.

andriyor and others added 2 commits August 30, 2026 15:32
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`lastIfArray` needs the same `@ts-expect-error` as its siblings, and in
`toArray` the directive no longer covered the errors, which TS now reports
on the ternary branches instead of the `return`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Aug 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (2850f77) to head (061e6c3).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #34   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            4         4           
  Lines          906       908    +2     
=========================================
+ Hits           906       908    +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions Bot added 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Aug 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🤞 phase/open Post is being triaged manually

Development

Successfully merging this pull request may close these issues.

1 participant