🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

metro-runtime

Package Overview
Dependencies
Maintainers
2
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metro-runtime - npm Package Compare versions

Comparing version

to
0.67.0

src/modules/empty-module.js

2

package.json
{
"name": "metro-runtime",
"version": "0.66.2",
"version": "0.67.0",
"description": "🚇 Module required for evaluating Metro bundles.",

@@ -5,0 +5,0 @@ "main": "src",

/**
* Copyright (c) Facebook, Inc. and its affiliates.
* Copyright (c) Meta Platforms, Inc. and affiliates.
*

@@ -14,4 +14,4 @@ * This source code is licensed under the MIT license found in the

module.exports = function(moduleID) {
module.exports = function (moduleID) {
return Promise.resolve().then(() => dynamicRequire.importAll(moduleID));
};
/**
* Copyright (c) Facebook, Inc. and its affiliates.
* Copyright (c) Meta Platforms, Inc. and affiliates.
*

@@ -25,3 +25,3 @@ * This source code is licensed under the MIT license found in the

const injectUpdate = update => {
const injectUpdate = (update) => {
update.added.forEach(inject);

@@ -50,3 +50,3 @@ update.modified.forEach(inject);

this._ws.onerror = error => {
this._ws.onerror = (error) => {
this.emit("connection-error", error);

@@ -60,4 +60,4 @@ };

this._ws.onmessage = message => {
const data = JSON.parse(message.data);
this._ws.onmessage = (message) => {
const data = JSON.parse(String(message.data));

@@ -88,3 +88,3 @@ switch (data.type) {

type: "unknown-message",
message: data
message: data,
});

@@ -94,3 +94,3 @@ }

this.on("update", update => {
this.on("update", (update) => {
if (this._isEnabled) {

@@ -132,3 +132,3 @@ injectUpdate(update);

_flushQueue() {
this._queue.forEach(message => this.send(message));
this._queue.forEach((message) => this.send(message));

@@ -170,3 +170,3 @@ this._queue.length = 0;

function applyUpdateLocally(update) {
update.deleted.forEach(id => {
update.deleted.forEach((id) => {
if (addedIDs.has(id)) {

@@ -180,3 +180,3 @@ addedIDs.delete(id);

});
update.added.forEach(item => {
update.added.forEach((item) => {
const id = item.module[0];

@@ -192,3 +192,3 @@

});
update.modified.forEach(item => {
update.modified.forEach((item) => {
const id = item.module[0];

@@ -205,5 +205,5 @@ moduleMap.set(id, item);

modified: [],
deleted: []
deleted: [],
};
deletedIDs.forEach(id => {
deletedIDs.forEach((id) => {
result.deleted.push(id);

@@ -210,0 +210,0 @@ });

/**
* Copyright (c) Facebook, Inc. and its affiliates.
* Copyright (c) Meta Platforms, Inc. and affiliates.
*

@@ -4,0 +4,0 @@ * This source code is licensed under the MIT license found in the

/**
* Copyright (c) Facebook, Inc. and its affiliates.
* Copyright (c) Meta Platforms, Inc. and affiliates.
*

@@ -27,3 +27,3 @@ * This source code is licensed under the MIT license found in the

global.$RefreshSig$ = () => type => type;
global.$RefreshSig$ = () => (type) => type;
}

@@ -69,4 +69,4 @@

publicModule: {
exports: {}
}
exports: {},
},
};

@@ -115,3 +115,3 @@ modules[moduleId] = mod;

.slice(initializingIndex)
.map(id => (modules[id] ? modules[id].verboseName : "[unknown]")); // We want to show A -> B -> A:
.map((id) => (modules[id] ? modules[id].verboseName : "[unknown]")); // We want to show A -> B -> A:

@@ -224,3 +224,3 @@ cycle.push(cycle[0]);

segmentId,
localId
localId,
};

@@ -258,3 +258,3 @@ }

if (moduleIds) {
moduleIds.forEach(moduleId => {
moduleIds.forEach((moduleId) => {
if (!modules[moduleId] && !definingSegmentByModuleID.has(moduleId)) {

@@ -412,3 +412,3 @@ definingSegmentByModuleID.set(moduleId, segmentId);

beginEvent: () => {},
endEvent: () => {}
endEvent: () => {},
};

@@ -420,3 +420,3 @@

var createHotReloadingObject = function() {
var createHotReloadingObject = function () {
const hot = {

@@ -426,9 +426,9 @@ _acceptCallback: null,

_didAccept: false,
accept: callback => {
accept: (callback) => {
hot._didAccept = true;
hot._acceptCallback = callback;
},
dispose: callback => {
dispose: (callback) => {
hot._disposeCallback = callback;
}
},
};

@@ -440,3 +440,3 @@ return hot;

const metroHotUpdateModule = function(
const metroHotUpdateModule = function (
id,

@@ -487,3 +487,3 @@ factory,

[id], // Start with the changed module and go upwards
pendingID => {
(pendingID) => {
const pendingModule = modules[pendingID];

@@ -532,3 +532,3 @@

source: mod,
failed: pendingModule
failed: pendingModule,
});

@@ -614,3 +614,3 @@ didBailOut = true;

source: mod,
failed: updatedMod
failed: updatedMod,
}

@@ -641,3 +641,3 @@ );

source: mod,
failed: parentMod
failed: parentMod,
});

@@ -664,3 +664,3 @@ return;

const topologicalSort = function(roots, getEdges, earlyStop) {
const topologicalSort = function (roots, getEdges, earlyStop) {
const result = [];

@@ -677,3 +677,3 @@ const visited = new Set();

dependentNodes.forEach(dependent => {
dependentNodes.forEach((dependent) => {
if (visited.has(dependent)) {

@@ -688,3 +688,3 @@ return;

roots.forEach(root => {
roots.forEach((root) => {
if (!visited.has(root)) {

@@ -697,3 +697,3 @@ traverseDependentNodes(root);

const runUpdatedModule = function(id, factory, dependencyMap) {
const runUpdatedModule = function (id, factory, dependencyMap) {
const mod = modules[id];

@@ -815,3 +815,3 @@

var isReactRefreshBoundary = function(Refresh, moduleExports) {
var isReactRefreshBoundary = function (Refresh, moduleExports) {
if (Refresh.isLikelyComponentType(moduleExports)) {

@@ -818,0 +818,0 @@ return true;

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