Socket
Socket
Sign inDemoInstall

metro-react-native-babel-preset

Package Overview
Dependencies
Maintainers
3
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metro-react-native-babel-preset - npm Package Compare versions

Comparing version 0.63.0 to 0.64.0

2

package.json
{
"name": "metro-react-native-babel-preset",
"version": "0.63.0",
"version": "0.64.0",
"description": "Babel preset for React Native applications",

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

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

var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {

@@ -22,2 +23,3 @@ var symbols = Object.getOwnPropertySymbols(object);

}
return keys;

@@ -29,2 +31,3 @@ }

var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {

@@ -46,2 +49,3 @@ ownKeys(Object(source), true).forEach(function(key) {

}
return target;

@@ -61,2 +65,3 @@ }

}
return obj;

@@ -101,3 +106,5 @@ }

if (len == null || len > arr.length) len = arr.length;
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
return arr2;

@@ -131,3 +138,2 @@ }

].concat(_toConsumableArray(passthroughSyntaxPlugins), [
[require("@babel/plugin-transform-computed-properties")],
[require("@babel/plugin-transform-destructuring")],

@@ -151,2 +157,5 @@ [require("@babel/plugin-transform-function-name")],

];
const es2015ComputedProperty = [
require("@babel/plugin-transform-computed-properties")
];
const es2015Spread = [require("@babel/plugin-transform-spread")];

@@ -200,2 +209,5 @@ const es2015TemplateLiterals = [

(options && options.unstable_transformProfile) || "default";
const isHermesStable = transformProfile === "hermes-stable";
const isHermesCanary = transformProfile === "hermes-canary";
const isHermes = isHermesStable || isHermesCanary;
const isNull = src == null;

@@ -237,3 +249,7 @@ const hasClass = isNull || src.indexOf("class") !== -1;

if (isNull || hasClass || src.indexOf("...") !== -1) {
if (!isHermesCanary) {
extraPlugins.push(es2015ComputedProperty);
}
if (!isHermesCanary && (isNull || hasClass || src.indexOf("...") !== -1)) {
extraPlugins.push(es2015Spread);

@@ -243,6 +259,3 @@ extraPlugins.push(objectRestSpread);

if (
transformProfile !== "hermes-canary" &&
(isNull || src.indexOf("`") !== -1)
) {
if (!isHermes && (isNull || src.indexOf("`") !== -1)) {
extraPlugins.push(es2015TemplateLiterals);

@@ -271,7 +284,3 @@ }

if (
transformProfile !== "hermes-stable" &&
transformProfile !== "hermes-canary" &&
(isNull || src.indexOf("?.") !== -1)
) {
if (!isHermes && (isNull || src.indexOf("?.") !== -1)) {
extraPlugins.push(optionalChaining);

@@ -284,3 +293,3 @@ }

if (transformProfile !== "hermes-canary") {
if (!isHermes) {
extraPlugins.push(shorthandProperties);

@@ -287,0 +296,0 @@ }

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