babel-preset-expo 11.1.0-canary-20241021-7aba813 → 12.0.0-preview.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.
- package/build/index.js +2 -3
- package/package.json +12 -8
- package/react-compiler-runtime.js +0 -21
package/build/index.js
CHANGED
|
@@ -78,9 +78,8 @@ function babelPresetExpo(api, options = {}) {
|
|
|
78
78
|
extraPlugins.push([
|
|
79
79
|
require('babel-plugin-react-compiler'),
|
|
80
80
|
{
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
// compilationMode: 'infer',
|
|
81
|
+
// TODO: Update when we bump React to 19.
|
|
82
|
+
target: '18',
|
|
84
83
|
environment: {
|
|
85
84
|
enableResetCacheOnSourceFileChanges: !isProduction,
|
|
86
85
|
...(platformOptions['react-compiler']?.environment ?? {}),
|
package/package.json
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babel-preset-expo",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.0.0-preview.0",
|
|
4
4
|
"description": "The Babel preset for Expo projects",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"files": [
|
|
7
7
|
"build",
|
|
8
|
-
"lazy-imports-blacklist.js"
|
|
9
|
-
"react-compiler-runtime.js"
|
|
8
|
+
"lazy-imports-blacklist.js"
|
|
10
9
|
],
|
|
11
10
|
"scripts": {
|
|
12
11
|
"build": "expo-module build",
|
|
@@ -53,18 +52,23 @@
|
|
|
53
52
|
"react-refresh": "^0.14.2"
|
|
54
53
|
},
|
|
55
54
|
"peerDependencies": {
|
|
56
|
-
"babel-plugin-react-compiler": "
|
|
55
|
+
"babel-plugin-react-compiler": "^19.0.0-beta-9ee70a1-20241017",
|
|
56
|
+
"react-compiler-runtime": "^19.0.0-beta-8a03594-20241020"
|
|
57
57
|
},
|
|
58
58
|
"peerDependenciesMeta": {
|
|
59
59
|
"babel-plugin-react-compiler": {
|
|
60
60
|
"optional": true
|
|
61
|
+
},
|
|
62
|
+
"react-compiler-runtime": {
|
|
63
|
+
"optional": true
|
|
61
64
|
}
|
|
62
65
|
},
|
|
63
66
|
"devDependencies": {
|
|
64
67
|
"@babel/core": "^7.20.0",
|
|
65
|
-
"babel-plugin-react-compiler": "
|
|
66
|
-
"expo-module-scripts": "
|
|
67
|
-
"jest": "^29.2.1"
|
|
68
|
+
"babel-plugin-react-compiler": "^19.0.0-beta-9ee70a1-20241017",
|
|
69
|
+
"expo-module-scripts": "^4.0.0",
|
|
70
|
+
"jest": "^29.2.1",
|
|
71
|
+
"react-compiler-runtime": "^19.0.0-beta-8a03594-20241020"
|
|
68
72
|
},
|
|
69
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "7c7d2362fff23bec26cd145ed34edd9c403551bd"
|
|
70
74
|
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// lib/react-compiler-runtime.js
|
|
2
|
-
const $empty = Symbol.for('react.memo_cache_sentinel');
|
|
3
|
-
const React = require('react');
|
|
4
|
-
/**
|
|
5
|
-
* DANGER: this hook is NEVER meant to be called directly!
|
|
6
|
-
*
|
|
7
|
-
* Note that this is a temporary userspace implementation of this function
|
|
8
|
-
* from React 19. It is not as efficient and may invalidate more frequently
|
|
9
|
-
* than the official API. Please upgrade to React 19 as soon as you can.
|
|
10
|
-
**/
|
|
11
|
-
export function c(size) {
|
|
12
|
-
return React.useState(() => {
|
|
13
|
-
const $ = new Array(size);
|
|
14
|
-
for (let ii = 0; ii < size; ii++) {
|
|
15
|
-
$[ii] = $empty;
|
|
16
|
-
}
|
|
17
|
-
// @ts-ignore
|
|
18
|
-
$[$empty] = true;
|
|
19
|
-
return $;
|
|
20
|
-
})[0];
|
|
21
|
-
}
|