Repository navigation
fix: keep the path case of changed files on Windows - #2286
Open
kaanisthatyou wants to merge 1 commit into
Open
kaanisthatyou wants to merge 1 commit into
kaanisthatyou wants to merge 1 commit into
Conversation
match() lowercased the first character of every matched path on Windows, which undid the drive letter normalisation in watch.js (c:\ -> C:\), so the files passed to the 'restart' event no longer matched path.resolve(). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XvSbVkca8tLnsnVVNKUQHQ
✅ Deploy Preview for nodemon ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Windows,
match()lowercased the first character of every matched path:This undoes the drive letter normalisation that
watch.jsapplies right before callingmatch()(c:\foo -> C:\foo), so the files emitted with therestartevent have a lowercase drive letter and don't compare equal topath.resolve()/process.cwd()based paths.Reproduction on Windows 11 / Node 24.14.0, using the required API from
doc/requireable.md:The existing tests already cover this on Windows. Running each test file as
npm run specdoes (in Git Bash):test/monitor/match.test.jstest/monitor/watch-restart.test.jstest/events/complete.test.jsAll other test files have the same results before and after. On Linux and macOS the removed code was a no-op because absolute paths start with
/, so behaviour there is unchanged. For the same reason a test for this cannot fail on the current Linux-only CI.The remaining Windows failures (
fork/run,rules/index,events/scripts,misc/sigint,config/load-logging) are unrelated; happy to look at those separately, since CONTRIBUTING mentions help with Windows tests is wanted.🤖 Generated with Claude Code
https://claude.ai/code/session_01XvSbVkca8tLnsnVVNKUQHQ