Socket
Socket
Sign inDemoInstall

metro-transform-plugins

Package Overview
Dependencies
54
Maintainers
2
Versions
70
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.80.4 to 0.80.5

4

package.json
{
"name": "metro-transform-plugins",
"version": "0.80.4",
"version": "0.80.5",
"description": "πŸš‡ Transform plugins for Metro.",

@@ -29,3 +29,3 @@ "main": "src/index.js",

"babel-plugin-tester": "^6.0.1",
"metro": "0.80.4"
"metro": "0.80.5"
},

@@ -32,0 +32,0 @@ "engines": {

@@ -30,4 +30,11 @@ /**

{
AssignmentExpression: unsafe,
CallExpression: unsafe,
AssignmentExpression: unsafe,
/**
* This will mark `foo?.()` as unsafe, so it is not replaced with `undefined` down the line.
*
* We saw this case in the wild, where the unary expression `void foo?.()` was replaced with `undefined`
* resulting in the expression call being skipped.
*/
OptionalCallExpression: unsafe,
},

@@ -34,0 +41,0 @@ state

@@ -66,6 +66,3 @@ /**

isIdentifier(node, dev) &&
isGlobalOrFlowDeclared(scope.getBinding(dev.name)) &&
!isMemberExpression(parent) &&
// not { __DEV__: 'value'}
(!isObjectProperty(parent) || parent.value === node);
isGlobalOrFlowDeclared(scope.getBinding(dev.name));
function findProperty(objectExpression, key, fallback) {

@@ -105,3 +102,3 @@ let value = null;

visitor: {
Identifier(path, state) {
ReferencedIdentifier(path, state) {
if (!state.opts.dev && isDev(path.node, path.parent, path.scope)) {

@@ -108,0 +105,0 @@ path.replaceWith(t.booleanLiteral(state.opts.dev));

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚑️ by Socket Inc