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

babel-preset-expo

Package Overview
Dependencies
Maintainers
28
Versions
126
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-preset-expo - npm Package Compare versions

Comparing version 11.1.0-canary-20240814-ce0f7d5 to 11.1.0-canary-20240904-69100c1

4

build/client-module-proxy-plugin.js

@@ -17,3 +17,5 @@ "use strict";

Program(path, state) {
const isUseClient = path.node.directives.some((directive) => directive.value.value === 'use client');
const isUseClient = path.node.directives.some((directive) => directive.value.value === 'use client' ||
// Convert DOM Components to client proxies in React Server environments.
directive.value.value === 'use dom');
// TODO: use server can be added to scopes inside of the file. https://github.com/facebook/react/blob/29fbf6f62625c4262035f931681c7b7822ca9843/packages/react-server-dom-webpack/src/ReactFlightWebpackNodeRegister.js#L55

@@ -20,0 +22,0 @@ const isUseServer = path.node.directives.some((directive) => directive.value.value === 'use server');

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

* EXPO_PROJECT_ROOT
* EXPO_PUBLIC_USE_STATIC
* EXPO_ROUTER_ABS_APP_ROOT

@@ -12,0 +11,0 @@ * EXPO_ROUTER_APP_ROOT

@@ -26,3 +26,2 @@ "use strict";

* EXPO_PROJECT_ROOT
* EXPO_PUBLIC_USE_STATIC
* EXPO_ROUTER_ABS_APP_ROOT

@@ -34,3 +33,2 @@ * EXPO_ROUTER_APP_ROOT

const { types: t } = api;
const platform = api.caller(common_1.getPlatform);
const possibleProjectRoot = api.caller(common_1.getPossibleProjectRoot);

@@ -54,14 +52,2 @@ const asyncRoutes = api.caller(common_1.getAsyncRoutes);

}
else if (
// TODO: Add cache invalidation.
key.value.startsWith('EXPO_PUBLIC_USE_STATIC')) {
if (platform === 'web') {
const isStatic = process.env.EXPO_PUBLIC_USE_STATIC === 'true' ||
process.env.EXPO_PUBLIC_USE_STATIC === '1';
path.replaceWith(t.booleanLiteral(isStatic));
}
else {
path.replaceWith(t.booleanLiteral(false));
}
}
else if (key.value.startsWith('EXPO_ROUTER_IMPORT_MODE')) {

@@ -68,0 +54,0 @@ path.replaceWith(t.stringLiteral(asyncRoutes ? 'lazy' : 'sync'));

@@ -128,3 +128,2 @@ "use strict";

extraPlugins.push([require('./define-plugin'), inlines]);
extraPlugins.push(use_dom_directive_plugin_1.expoUseDomDirectivePlugin);
if (isProduction) {

@@ -167,2 +166,6 @@ // Metro applies a version of this plugin too but it does it after the Platform modules have been transformed to CJS, this breaks the transform.

}
else {
// DOM components must run after "use client" and only in client environments.
extraPlugins.push(use_dom_directive_plugin_1.expoUseDomDirectivePlugin);
}
// This plugin is fine to run whenever as the server-only imports were introduced as part of RSC and shouldn't be used in any client code.

@@ -169,0 +172,0 @@ extraPlugins.push(environment_restricted_imports_1.environmentRestrictedImportsPlugin);

{
"name": "babel-preset-expo",
"version": "11.1.0-canary-20240814-ce0f7d5",
"version": "11.1.0-canary-20240904-69100c1",
"description": "The Babel preset for Expo projects",

@@ -51,3 +51,3 @@ "main": "build/index.js",

"@babel/preset-typescript": "^7.23.0",
"@react-native/babel-preset": "0.75.0-rc.7",
"@react-native/babel-preset": "0.75.2",
"babel-plugin-react-native-web": "~0.19.10",

@@ -67,6 +67,6 @@ "react-refresh": "^0.14.2"

"babel-plugin-react-compiler": "0.0.0-experimental-334f00b-20240725",
"expo-module-scripts": "3.6.0-canary-20240814-ce0f7d5",
"expo-module-scripts": "3.6.0-canary-20240904-69100c1",
"jest": "^29.2.1"
},
"gitHead": "ce0f7d5c7eaec2c8d06ee4e0dc0e58cd6c1612ed"
"gitHead": "69100c1b099b707057c052ed8096e06cb208aca1"
}
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