Socket
Socket
Sign inDemoInstall

metro-react-native-babel-transformer

Package Overview
Dependencies
158
Maintainers
2
Versions
70
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.56.3 to 0.57.0

10

package.json
{
"name": "metro-react-native-babel-transformer",
"version": "0.56.3",
"version": "0.57.0",
"description": "Babel transformer for React Native applications",

@@ -22,6 +22,6 @@ "main": "src/index.js",

"@babel/core": "^7.0.0",
"babel-preset-fbjs": "^3.1.2",
"metro-babel-transformer": "0.56.3",
"metro-react-native-babel-preset": "0.56.3",
"metro-source-map": "0.56.3"
"babel-preset-fbjs": "^3.3.0",
"metro-babel-transformer": "0.57.0",
"metro-react-native-babel-preset": "0.57.0",
"metro-source-map": "0.57.0"
},

@@ -28,0 +28,0 @@ "peerDependencies": {

@@ -7,7 +7,6 @@ /**

*
* Note: This is a fork of the fb-specific transform.js
*
*
* @format
*/
// Note: This is a fork of the fb-specific transform.js
"use strict";

@@ -105,3 +104,10 @@

let babelRC = null;
return function _getBabelRC(projectRoot, options) {
return function _getBabelRC(_ref) {
let projectRoot = _ref.projectRoot,
extendsBabelConfigPath = _ref.extendsBabelConfigPath,
options = _objectWithoutProperties(_ref, [
"projectRoot",
"extendsBabelConfigPath"
]);
if (babelRC != null) {

@@ -112,6 +118,10 @@ return babelRC;

babelRC = {
plugins: []
}; // Let's look for a babel config file in the project root.
// TODO look into adding a command line option to specify this location
plugins: [],
extends: extendsBabelConfigPath
};
if (extendsBabelConfigPath) {
return babelRC;
} // Let's look for a babel config file in the project root.
let projectBabelRCPath; // .babelrc

@@ -149,6 +159,12 @@

require("metro-react-native-babel-preset"),
_objectSpread({}, presetOptions, {
disableImportExportTransform: experimentalImportSupport,
enableBabelRuntime: options.enableBabelRuntime
})
_objectSpread(
{
projectRoot
},
presetOptions,
{
disableImportExportTransform: experimentalImportSupport,
enableBabelRuntime: options.enableBabelRuntime
}
)
]

@@ -169,3 +185,3 @@ ];

arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
const babelRC = getBabelRC(options.projectRoot, options);
const babelRC = getBabelRC(options);
const extraConfig = {

@@ -201,2 +217,3 @@ babelrc:

const hmrConfig = makeHMRConfig();
hmrConfig.plugins = config.plugins.concat(hmrConfig.plugins);
config = Object.assign({}, config, hmrConfig);

@@ -209,7 +226,7 @@ }

function transform(_ref) {
let filename = _ref.filename,
options = _ref.options,
src = _ref.src,
plugins = _ref.plugins;
function transform(_ref2) {
let filename = _ref2.filename,
options = _ref2.options,
src = _ref2.src,
plugins = _ref2.plugins;
const OLD_BABEL_ENV = process.env.BABEL_ENV;

@@ -254,3 +271,5 @@ process.env.BABEL_ENV = options.dev

} finally {
process.env.BABEL_ENV = OLD_BABEL_ENV;
if (OLD_BABEL_ENV) {
process.env.BABEL_ENV = OLD_BABEL_ENV;
}
}

@@ -257,0 +276,0 @@ }

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc