-
-
Notifications
You must be signed in to change notification settings - Fork 43
Closed
Description
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:
sourceFile.stat.mtimeMs: 1621590505837.191
targetStat.mtimeMs: 1621590505836.999
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.
Metadata
Metadata
Assignees
Labels
No labels