babel-preset-expo 12.0.0-preview.5 → 12.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -97,7 +97,7 @@ function reactServerActionsPlugin(api) {
|
|
|
97
97
|
? t.arrowFunctionExpression(extractedFunctionParams, t.blockStatement(extractedFunctionBody), true)
|
|
98
98
|
: t.functionExpression(path.node.id, extractedFunctionParams, t.blockStatement(extractedFunctionBody), false, true), extractedIdentifier.name);
|
|
99
99
|
// Create a top-level declaration for the extracted function.
|
|
100
|
-
const bindingKind = '
|
|
100
|
+
const bindingKind = 'var';
|
|
101
101
|
const functionDeclaration = t.exportNamedDeclaration(t.variableDeclaration(bindingKind, [
|
|
102
102
|
t.variableDeclarator(extractedIdentifier, extractedFunctionExpr),
|
|
103
103
|
]));
|
|
@@ -294,7 +294,7 @@ function reactServerActionsPlugin(api) {
|
|
|
294
294
|
const id = left;
|
|
295
295
|
const exportedSpecifier = t.exportSpecifier(id, t.identifier('default'));
|
|
296
296
|
// Replace `export default foo = async () => {}` with `const foo = async () => {}`
|
|
297
|
-
path.replaceWith(t.variableDeclaration('
|
|
297
|
+
path.replaceWith(t.variableDeclaration('var', [t.variableDeclarator(id, right)]));
|
|
298
298
|
// Insert `(() => _registerServerReference(foo, "file:///unknown", "default"))();`
|
|
299
299
|
path.insertAfter(t.exportNamedDeclaration(null, [exportedSpecifier]));
|
|
300
300
|
}
|
|
@@ -306,7 +306,7 @@ function reactServerActionsPlugin(api) {
|
|
|
306
306
|
const moduleScope = path.scope.getProgramParent();
|
|
307
307
|
const extractedIdentifier = moduleScope.generateUidIdentifier('$$INLINE_ACTION');
|
|
308
308
|
// @ts-expect-error: Transform `export default async () => {}` to `const $$INLINE_ACTION = async () => {}`
|
|
309
|
-
path.node.declaration = t.variableDeclaration('
|
|
309
|
+
path.node.declaration = t.variableDeclaration('var', [
|
|
310
310
|
t.variableDeclarator(extractedIdentifier, path.node.declaration),
|
|
311
311
|
]);
|
|
312
312
|
// Strip the `export default`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babel-preset-expo",
|
|
3
|
-
"version": "12.0.0
|
|
3
|
+
"version": "12.0.0",
|
|
4
4
|
"description": "The Babel preset for Expo projects",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"files": [
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"jest": "^29.2.1",
|
|
71
71
|
"react-compiler-runtime": "^19.0.0-beta-8a03594-20241020"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "8f2567ad26ca782cd2d7ab7fa77a34979e2b4e01"
|
|
74
74
|
}
|