Socket
Socket
Sign inDemoInstall

metro

Package Overview
Dependencies
Maintainers
2
Versions
156
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metro - npm Package Compare versions

Comparing version 0.80.8 to 0.80.9

30

package.json
{
"name": "metro",
"version": "0.80.8",
"version": "0.80.9",
"description": "🚇 The JavaScript bundler for React Native.",

@@ -37,14 +37,14 @@ "main": "src/index.js",

"lodash.throttle": "^4.1.1",
"metro-babel-transformer": "0.80.8",
"metro-cache": "0.80.8",
"metro-cache-key": "0.80.8",
"metro-config": "0.80.8",
"metro-core": "0.80.8",
"metro-file-map": "0.80.8",
"metro-resolver": "0.80.8",
"metro-runtime": "0.80.8",
"metro-source-map": "0.80.8",
"metro-symbolicate": "0.80.8",
"metro-transform-plugins": "0.80.8",
"metro-transform-worker": "0.80.8",
"metro-babel-transformer": "0.80.9",
"metro-cache": "0.80.9",
"metro-cache-key": "0.80.9",
"metro-config": "0.80.9",
"metro-core": "0.80.9",
"metro-file-map": "0.80.9",
"metro-resolver": "0.80.9",
"metro-runtime": "0.80.9",
"metro-source-map": "0.80.9",
"metro-symbolicate": "0.80.9",
"metro-transform-plugins": "0.80.9",
"metro-transform-worker": "0.80.9",
"mime-types": "^2.1.27",

@@ -70,4 +70,4 @@ "node-fetch": "^2.2.0",

"jest-snapshot-serializer-raw": "^1.2.0",
"metro-babel-register": "0.80.8",
"metro-memory-fs": "0.80.8",
"metro-babel-register": "0.80.9",
"metro-memory-fs": "0.80.9",
"mock-req": "^0.2.0",

@@ -74,0 +74,0 @@ "mock-res": "^0.6.0",

@@ -91,3 +91,12 @@ "use strict";

let fullKey = Buffer.concat([partialKey, Buffer.from(sha1, "hex")]);
const result = await cache.get(fullKey);
let result;
try {
result = await cache.get(fullKey);
} catch (error) {
this._config.reporter.update({
type: "cache_read_error",
error,
});
throw error;
}
const data = result

@@ -106,3 +115,8 @@ ? {

}
void cache.set(fullKey, data.result);
cache.set(fullKey, data.result).catch((error) => {
this._config.reporter.update({
type: "cache_write_error",
error,
});
});
return {

@@ -109,0 +123,0 @@ ...data.result,

@@ -13,4 +13,2 @@ /**

export type GlobalCacheDisabledReason = 'too_many_errors' | 'too_many_misses';
export interface BundleDetails {

@@ -69,8 +67,8 @@ bundleType: string;

| {
type: 'global_cache_error';
type: 'cache_read_error';
error: Error;
}
| {
type: 'global_cache_disabled';
reason: GlobalCacheDisabledReason;
type: 'cache_write_error';
error: Error;
}

@@ -77,0 +75,0 @@ | {type: 'transform_cache_reset'}

@@ -9,4 +9,2 @@ "use strict";

const path = require("path");
const GLOBAL_CACHE_DISABLED_MESSAGE_FORMAT =
"The global cache is now disabled because %s";
const DARK_BLOCK_CHAR = "\u2593";

@@ -65,21 +63,2 @@ const LIGHT_BLOCK_CHAR = "\u2591";

}
_logCacheDisabled(reason) {
const format = GLOBAL_CACHE_DISABLED_MESSAGE_FORMAT;
switch (reason) {
case "too_many_errors":
reporting.logWarning(
this.terminal,
format,
"it has been failing too many times."
);
break;
case "too_many_misses":
reporting.logWarning(
this.terminal,
format,
"it has been missing too many consecutive keys."
);
break;
}
}
_logBundleBuildDone(buildID) {

@@ -168,5 +147,2 @@ const progress = this._activeBundles.get(buildID);

break;
case "global_cache_disabled":
this._logCacheDisabled(event.reason);
break;
case "resolver_warning":

@@ -173,0 +149,0 @@ this._logWarning(event.message);

@@ -59,3 +59,4 @@ "use strict";

dependencyMapName,
globalPrefix
globalPrefix,
skipRequireRename
) {

@@ -70,3 +71,3 @@ const params = buildParameters(

const ast = t.file(t.program([t.expressionStatement(def)]));
const requireName = renameRequires(ast);
const requireName = skipRequireRename ? "require" : renameRequires(ast);
return {

@@ -73,0 +74,0 @@ ast,

@@ -44,3 +44,3 @@ "use strict";

if (result == null) {
throw new Error("invalid asset file path: `${filePath}");
throw new Error(`invalid asset file path: ${filePath}`);
}

@@ -47,0 +47,0 @@ return result;

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

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

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