@react-native/babel-preset 0.87.0-rc.0 → 0.88.0-nightly-20260710-102fde7b6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native/babel-preset",
3
- "version": "0.87.0-rc.0",
3
+ "version": "0.88.0-nightly-20260710-102fde7b6",
4
4
  "description": "Babel preset for React Native applications",
5
5
  "repository": {
6
6
  "type": "git",
@@ -55,7 +55,7 @@
55
55
  "@babel/plugin-transform-runtime": "^7.24.7",
56
56
  "@babel/plugin-transform-typescript": "^7.25.2",
57
57
  "@babel/plugin-transform-unicode-regex": "^7.24.7",
58
- "@react-native/babel-plugin-codegen": "0.87.0-rc.0",
58
+ "@react-native/babel-plugin-codegen": "0.88.0-nightly-20260710-102fde7b6",
59
59
  "babel-plugin-syntax-hermes-parser": "0.36.1",
60
60
  "babel-plugin-transform-flow-enums": "^0.0.2",
61
61
  "react-refresh": "^0.14.0"
@@ -38,10 +38,6 @@ function isDeepReactNativeImport(source) {
38
38
  return parts.length > 1 && parts[0] === 'react-native';
39
39
  }
40
40
 
41
- function isInitializeCoreImport(source) {
42
- return source === 'react-native/Libraries/Core/InitializeCore';
43
- }
44
-
45
41
  function withLocation(node, loc) {
46
42
  if (!node.loc) {
47
43
  return {...node, loc};
@@ -55,7 +51,7 @@ module.exports = ({types: t}) => ({
55
51
  ImportDeclaration(path, state) {
56
52
  const source = path.node.source.value;
57
53
 
58
- if (isDeepReactNativeImport(source) && !isInitializeCoreImport(source)) {
54
+ if (isDeepReactNativeImport(source)) {
59
55
  const loc = path.node.loc;
60
56
  state.import.push({source, loc});
61
57
  }
@@ -71,10 +67,7 @@ module.exports = ({types: t}) => ({
71
67
  ) {
72
68
  const source =
73
69
  args[0].node.type === 'StringLiteral' ? args[0].node.value : '';
74
- if (
75
- isDeepReactNativeImport(source) &&
76
- !isInitializeCoreImport(source)
77
- ) {
70
+ if (isDeepReactNativeImport(source)) {
78
71
  const loc = path.node.loc;
79
72
  state.require.push({source, loc});
80
73
  }
@@ -83,11 +76,7 @@ module.exports = ({types: t}) => ({
83
76
  ExportNamedDeclaration(path, state) {
84
77
  const source = path.node.source;
85
78
 
86
- if (
87
- source &&
88
- isDeepReactNativeImport(source.value) &&
89
- !isInitializeCoreImport(source)
90
- ) {
79
+ if (source && isDeepReactNativeImport(source.value)) {
91
80
  const loc = path.node.loc;
92
81
  state.export.push({source: source.value, loc});
93
82
  }