Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fullstory/babel-plugin-react-native

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fullstory/babel-plugin-react-native - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

20

lib/index.js

@@ -347,2 +347,22 @@ "use strict";

},
// RN screen selector support
JSXOpeningElement: function JSXOpeningElement(path, state) {
var filename = state.file.opts.filename;
var isReactNavigationFile = filename.includes('node_modules/@react-navigation');
if (!isReactNavigationFile) {
return;
}
if (!t.isJSXIdentifier(path.node.name)) {
return;
}
// rewrite all `<MaybeScreen />` components.
var isMaybeScreenView = path.node.name.name === 'MaybeScreen';
// <Screen /> is a bit more generic so we want to be specific here
var isNativeStackView = path.node.name.name === 'Screen' && filename.includes('native-stack/src/views/NativeStackView');
if (isMaybeScreenView || isNativeStackView) {
path.node.attributes.push(t.jsxAttribute(t.jsxIdentifier('fsAttribute'), t.jsxExpressionContainer(t.objectExpression([t.objectProperty(t.stringLiteral('screen-name'), t.memberExpression(t.identifier('route'), t.identifier('name')))]))));
}
},
JSXAttribute: function JSXAttribute(path) {

@@ -349,0 +369,0 @@ // disable view optimization for only View component

2

package.json
{
"name": "@fullstory/babel-plugin-react-native",
"version": "1.1.0",
"version": "1.2.0",
"description": "The official FullStory React Native babel plugin",

@@ -5,0 +5,0 @@ "repository": "git://github.com/fullstorydev/fullstory-babel-plugin-react-native.git",

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