Socket
Socket
Sign inDemoInstall

metro-file-map

Package Overview
Dependencies
Maintainers
2
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metro-file-map - npm Package Compare versions

Comparing version 0.76.8 to 0.76.9

2

package.json
{
"name": "metro-file-map",
"version": "0.76.8",
"version": "0.76.9",
"description": "[Experimental] - 🚇 File crawling, watching and mapping for Metro",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -15,3 +15,7 @@ "use strict";

function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
return obj && obj.__esModule
? obj
: {
default: obj,
};
}

@@ -18,0 +22,0 @@ /**

@@ -25,3 +25,5 @@ "use strict";

if (obj === null || (typeof obj !== "object" && typeof obj !== "function")) {
return { default: obj };
return {
default: obj,
};
}

@@ -54,3 +56,7 @@ var cache = _getRequireWildcardCache(nodeInterop);

function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
return obj && obj.__esModule
? obj
: {
default: obj,
};
}

@@ -57,0 +63,0 @@ /**

@@ -25,3 +25,5 @@ "use strict";

if (obj === null || (typeof obj !== "object" && typeof obj !== "function")) {
return { default: obj };
return {
default: obj,
};
}

@@ -54,3 +56,7 @@ var cache = _getRequireWildcardCache(nodeInterop);

function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
return obj && obj.__esModule
? obj
: {
default: obj,
};
}

@@ -57,0 +63,0 @@ /**

@@ -21,3 +21,5 @@ "use strict";

if (obj === null || (typeof obj !== "object" && typeof obj !== "function")) {
return { default: obj };
return {
default: obj,
};
}

@@ -24,0 +26,0 @@ var cache = _getRequireWildcardCache(nodeInterop);

@@ -68,3 +68,5 @@ "use strict";

if (obj === null || (typeof obj !== "object" && typeof obj !== "function")) {
return { default: obj };
return {
default: obj,
};
}

@@ -97,3 +99,7 @@ var cache = _getRequireWildcardCache(nodeInterop);

function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
return obj && obj.__esModule
? obj
: {
default: obj,
};
}

@@ -816,32 +822,34 @@ /**

let changeQueue = Promise.resolve();
let eventsQueue = [];
let eventStartTimestamp = null;
let nextEmit = null;
const emitChange = () => {
if (eventsQueue.length) {
const hmrPerfLogger = this._options.perfLoggerFactory?.("HMR", {
key: this._getNextChangeID(),
if (nextEmit == null || nextEmit.eventsQueue.length === 0) {
// Nothing to emit
return;
}
const { eventsQueue, firstEventTimestamp, firstEnqueuedTimestamp } =
nextEmit;
const hmrPerfLogger = this._options.perfLoggerFactory?.("HMR", {
key: this._getNextChangeID(),
});
if (hmrPerfLogger != null) {
hmrPerfLogger.start({
timestamp: firstEventTimestamp,
});
if (hmrPerfLogger != null) {
hmrPerfLogger.start({
timestamp: (0, _nullthrows.default)(eventStartTimestamp),
});
hmrPerfLogger.point("waitingForChangeInterval_start", {
timestamp: (0, _nullthrows.default)(eventStartTimestamp),
});
hmrPerfLogger.point("waitingForChangeInterval_end");
hmrPerfLogger.annotate({
int: {
eventsQueueLength: eventsQueue.length,
},
});
hmrPerfLogger.point("fileChange_start");
}
const changeEvent = {
logger: hmrPerfLogger,
eventsQueue,
};
this.emit("change", changeEvent);
eventsQueue = [];
eventStartTimestamp = null;
hmrPerfLogger.point("waitingForChangeInterval_start", {
timestamp: firstEnqueuedTimestamp,
});
hmrPerfLogger.point("waitingForChangeInterval_end");
hmrPerfLogger.annotate({
int: {
eventsQueueLength: eventsQueue.length,
},
});
hmrPerfLogger.point("fileChange_start");
}
const changeEvent = {
logger: hmrPerfLogger,
eventsQueue,
};
this.emit("change", changeEvent);
nextEmit = null;
};

@@ -885,6 +893,4 @@ const onChange = (type, filePath, root, metadata) => {

}
if (eventStartTimestamp == null) {
eventStartTimestamp =
_perf_hooks.performance.timeOrigin + _perf_hooks.performance.now();
}
const onChangeStartTime =
_perf_hooks.performance.timeOrigin + _perf_hooks.performance.now();
changeQueue = changeQueue

@@ -894,3 +900,4 @@ .then(async () => {

if (
eventsQueue.find(
nextEmit != null &&
nextEmit.eventsQueue.find(
(event) =>

@@ -911,7 +918,18 @@ event.type === type &&

const enqueueEvent = (metadata) => {
eventsQueue.push({
const event = {
filePath: absoluteFilePath,
metadata,
type,
});
};
if (nextEmit == null) {
nextEmit = {
eventsQueue: [event],
firstEventTimestamp: onChangeStartTime,
firstEnqueuedTimestamp:
_perf_hooks.performance.timeOrigin +
_perf_hooks.performance.now(),
};
} else {
nextEmit.eventsQueue.push(event);
}
return null;

@@ -918,0 +936,0 @@ };

@@ -9,3 +9,7 @@ "use strict";

function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
return obj && obj.__esModule
? obj
: {
default: obj,
};
}

@@ -12,0 +16,0 @@ /**

@@ -22,3 +22,5 @@ "use strict";

if (obj === null || (typeof obj !== "object" && typeof obj !== "function")) {
return { default: obj };
return {
default: obj,
};
}

@@ -25,0 +27,0 @@ var cache = _getRequireWildcardCache(nodeInterop);

@@ -21,3 +21,5 @@ "use strict";

if (obj === null || (typeof obj !== "object" && typeof obj !== "function")) {
return { default: obj };
return {
default: obj,
};
}

@@ -24,0 +26,0 @@ var cache = _getRequireWildcardCache(nodeInterop);

@@ -22,3 +22,5 @@ "use strict";

if (obj === null || (typeof obj !== "object" && typeof obj !== "function")) {
return { default: obj };
return {
default: obj,
};
}

@@ -25,0 +27,0 @@ var cache = _getRequireWildcardCache(nodeInterop);

@@ -24,3 +24,5 @@ "use strict";

if (obj === null || (typeof obj !== "object" && typeof obj !== "function")) {
return { default: obj };
return {
default: obj,
};
}

@@ -53,3 +55,7 @@ var cache = _getRequireWildcardCache(nodeInterop);

function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
return obj && obj.__esModule
? obj
: {
default: obj,
};
}

@@ -56,0 +62,0 @@ /**

@@ -23,3 +23,5 @@ "use strict";

if (obj === null || (typeof obj !== "object" && typeof obj !== "function")) {
return { default: obj };
return {
default: obj,
};
}

@@ -52,3 +54,7 @@ var cache = _getRequireWildcardCache(nodeInterop);

function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
return obj && obj.__esModule
? obj
: {
default: obj,
};
}

@@ -55,0 +61,0 @@ /**

@@ -35,3 +35,5 @@ "use strict";

if (obj === null || (typeof obj !== "object" && typeof obj !== "function")) {
return { default: obj };
return {
default: obj,
};
}

@@ -64,3 +66,7 @@ var cache = _getRequireWildcardCache(nodeInterop);

function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
return obj && obj.__esModule
? obj
: {
default: obj,
};
}

@@ -67,0 +73,0 @@ /**

@@ -26,3 +26,5 @@ "use strict";

if (obj === null || (typeof obj !== "object" && typeof obj !== "function")) {
return { default: obj };
return {
default: obj,
};
}

@@ -55,3 +57,7 @@ var cache = _getRequireWildcardCache(nodeInterop);

function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
return obj && obj.__esModule
? obj
: {
default: obj,
};
}

@@ -58,0 +64,0 @@ /**

@@ -16,3 +16,7 @@ "use strict";

function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : { default: obj };
return obj && obj.__esModule
? obj
: {
default: obj,
};
}

@@ -32,3 +36,5 @@ function _getRequireWildcardCache(nodeInterop) {

if (obj === null || (typeof obj !== "object" && typeof obj !== "function")) {
return { default: obj };
return {
default: obj,
};
}

@@ -35,0 +41,0 @@ var cache = _getRequireWildcardCache(nodeInterop);

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc