-
-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mtimeMs comparison is broken in node v14.17.0 #83
Comments
Thanks for reporting. Please open an issue on the Node.js issue tracker. |
OK, will do. Have provided a very simple PR for consideration here too. |
It's looking like this problem is due to a change in libuv, based on the discussion in the issue I opened on node. I think this is likely to be much easier to fix here (with the PR I have already put up) than it is going to be over in node / libuv. Thoughts? |
I'm happy to add a workaround here in the meantime, but it's always best to try to also fix it at the source. |
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
In node v14.17.0 on Mac OSX Catalina I am seeing an issue where gulp-changed always detects the source file as changed because the target is getting an mtimeMs slightly behind that of the source file when gulp creates it. This problem did not exist in v14.16.1.
The comparison happens here: https://github.com/sindresorhus/gulp-changed/blob/main/index.js#L28 and I am seeing mtimes for example like this:
Previously the target mtime would be eg 1621590505837 so the two
floor
comparisons would work fine.A simple work-around for this is to use floor for the source and ceil for the target, which resolves the issue for me. I will provide a PR with this change.
The text was updated successfully, but these errors were encountered: