metro-file-map
Advanced tools
Comparing version 0.76.6 to 0.76.7
{ | ||
"name": "metro-file-map", | ||
"version": "0.76.6", | ||
"version": "0.76.7", | ||
"description": "[Experimental] - 🚇 File crawling, watching and mapping for Metro", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -870,3 +870,5 @@ "use strict"; | ||
// The file has been accessed, not modified | ||
// The file has been accessed, not modified. If the modified time is | ||
// null, then it is assumed that the watcher does not have capabilities | ||
// to detect modified time, and change processing proceeds. | ||
if ( | ||
@@ -876,2 +878,3 @@ type === "change" && | ||
metadata && | ||
metadata.modifiedTime != null && | ||
linkStats.modifiedTime === metadata.modifiedTime | ||
@@ -896,2 +899,4 @@ ) { | ||
metadata && | ||
event.metadata.modifiedTime != null && | ||
metadata.modifiedTime != null && | ||
event.metadata.modifiedTime === metadata.modifiedTime)) | ||
@@ -921,5 +926,3 @@ ) | ||
(0, _invariant.default)( | ||
metadata != null && | ||
metadata.modifiedTime != null && | ||
metadata.size != null, | ||
metadata != null && metadata.size != null, | ||
"since the file exists or changed, it should have metadata" | ||
@@ -926,0 +929,0 @@ ); |
@@ -125,6 +125,2 @@ "use strict"; | ||
const modifiedTime = fileMetadata[_constants.default.MTIME]; | ||
(0, _invariant.default)( | ||
typeof modifiedTime === "number", | ||
"File in TreeFS missing modified time" | ||
); | ||
return { | ||
@@ -131,0 +127,0 @@ fileType, |
@@ -313,3 +313,3 @@ /** | ||
} catch (error) { | ||
if (error?.code !== "ENOENT") { | ||
if (!isIgnorableFileError(error)) { | ||
this.emit("error", error); | ||
@@ -372,3 +372,7 @@ return; | ||
error.code === "ENOENT" || | ||
// Workaround Windows EPERM on watched folder deletion. | ||
// Workaround Windows EPERM on watched folder deletion, and when | ||
// reading locked files (pending further writes or pending deletion). | ||
// In such cases, we'll receive a subsequent event when the file is | ||
// deleted or ready to read. | ||
// https://github.com/facebook/metro/issues/1001 | ||
// https://github.com/nodejs/node-v0.x-archive/issues/4337 | ||
@@ -375,0 +379,0 @@ (error.code === "EPERM" && platform === "win32") |
@@ -289,4 +289,5 @@ "use strict"; | ||
) { | ||
const mtime = Number(mtime_ms); | ||
self._emitEvent(eventType, relativePath, self.root, { | ||
modifiedTime: Number(mtime_ms), | ||
modifiedTime: mtime !== 0 ? mtime : null, | ||
size, | ||
@@ -293,0 +294,0 @@ type, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
318137
5289