babel-preset-expo
Advanced tools
Comparing version 11.1.0-canary-20240814-ce0f7d5 to 11.1.0-canary-20240904-69100c1
@@ -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" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
11
87237
1644
+ Added@react-native/babel-plugin-codegen@0.75.2(transitive)
+ Added@react-native/babel-preset@0.75.2(transitive)
+ Added@react-native/codegen@0.75.2(transitive)
+ Addedansi-regex@5.0.1(transitive)
+ Addedcliui@8.0.1(transitive)
+ Addedemoji-regex@8.0.0(transitive)
+ Addedget-caller-file@2.0.5(transitive)
+ Addedis-fullwidth-code-point@3.0.0(transitive)
+ Addedrequire-directory@2.1.1(transitive)
+ Addedstring-width@4.2.3(transitive)
+ Addedstrip-ansi@6.0.1(transitive)
+ Addedwrap-ansi@7.0.0(transitive)
+ Addedy18n@5.0.8(transitive)
+ Addedyargs@17.7.2(transitive)
+ Addedyargs-parser@21.1.1(transitive)
- Removed@react-native/babel-plugin-codegen@0.75.0-rc.7(transitive)
- Removed@react-native/babel-preset@0.75.0-rc.7(transitive)
- Removed@react-native/codegen@0.75.0-rc.7(transitive)