expo-build-properties 58.0.2 → 58.0.3
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/CHANGELOG.md +6 -0
- package/build/iosSceneSupport.js +16 -10
- package/build/iosSceneSupport.js.map +1 -1
- package/package.json +3 -3
- package/src/iosSceneSupport.ts +28 -10
- package/.npmignore +0 -24
- package/.tsbuildinfo +0 -1
- package/jest.config.js +0 -1
- package/tsconfig.json +0 -9
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,12 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 58.0.3 — 2026-09-16
|
|
14
|
+
|
|
15
|
+
### 🐛 Bug fixes
|
|
16
|
+
|
|
17
|
+
- [iOS] Let `ios.enableSceneSupport` adopt the scene lifecycle when another config plugin has inserted lines into the startup block, such as `@react-native-firebase/app`. ([#50221](https://github.com/expo/expo/pull/50221) by [@alanjhughes](https://github.com/alanjhughes))
|
|
18
|
+
|
|
13
19
|
## 58.0.2 — 2026-09-15
|
|
14
20
|
|
|
15
21
|
### 🎉 New features
|
package/build/iosSceneSupport.js
CHANGED
|
@@ -40,19 +40,22 @@ const PROPERTY_NAME = 'ios.enableSceneSupport';
|
|
|
40
40
|
const ORIGINAL_APP_DELEGATE = 'class AppDelegate: ExpoAppDelegate {';
|
|
41
41
|
const SCENE_APP_DELEGATE = 'class AppDelegate: ExpoAppDelegate, ExpoReactNativeFactoryProvider {';
|
|
42
42
|
const FACTORY_ASSIGNMENT = ' reactNativeFactory = factory';
|
|
43
|
-
const
|
|
44
|
-
|
|
43
|
+
const LEGACY_WINDOW = ` window = UIWindow(frame: UIScreen.main.bounds)
|
|
44
|
+
`;
|
|
45
|
+
const LEGACY_START = ` factory.startReactNative(
|
|
45
46
|
withModuleName: "main",
|
|
46
47
|
in: window,
|
|
47
48
|
launchOptions: launchOptions)
|
|
48
49
|
`;
|
|
50
|
+
const LEGACY_STARTUP = `${LEGACY_WINDOW}${LEGACY_START}`;
|
|
49
51
|
/** The published SDK 57 template wraps the startup in an `os()` check. */ const LEGACY_STARTUP_WRAPPED = `#if os(iOS) || os(tvOS)
|
|
50
52
|
${LEGACY_STARTUP}#endif
|
|
51
53
|
`;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
];
|
|
54
|
+
const WINDOW_STATEMENT = /^[ \t]*window = UIWindow\(frame: UIScreen\.main\.bounds\)\r?\n/m;
|
|
55
|
+
const START_STATEMENT = /^[ \t]*factory\.startReactNative\([^)]*\)\r?\n/m;
|
|
56
|
+
const EMPTY_OS_WRAPPER = /^[ \t]*#if os\(iOS\) \|\| os\(tvOS\)\r?\n[ \t]*#endif\r?\n/m;
|
|
57
|
+
const OS_WRAPPER = /^([ \t]*#if os\(iOS\) \|\| os\(tvOS\)\r?\n)([\s\S]*?)(^[ \t]*#endif\r?\n)/m;
|
|
58
|
+
const BLANK_LINES_AFTER_FACTORY = new RegExp(`(${FACTORY_ASSIGNMENT}\\r?\\n)(?:[ \\t]*\\r?\\n)+`);
|
|
56
59
|
const SCENE_MANIFEST = {
|
|
57
60
|
UIApplicationSupportsMultipleScenes: false,
|
|
58
61
|
UISceneConfigurations: {
|
|
@@ -116,13 +119,16 @@ function updateAppDelegate(contents, enabled) {
|
|
|
116
119
|
return contents;
|
|
117
120
|
}
|
|
118
121
|
if (enabled) {
|
|
119
|
-
|
|
120
|
-
if (!contents.includes(ORIGINAL_APP_DELEGATE) || !startup) {
|
|
122
|
+
if (!contents.includes(ORIGINAL_APP_DELEGATE) || !WINDOW_STATEMENT.test(contents) || !START_STATEMENT.test(contents)) {
|
|
121
123
|
throw new Error(`\`${PROPERTY_NAME}\` requires the standard Expo SDK 57 Swift AppDelegate.`);
|
|
122
124
|
}
|
|
123
|
-
return contents.replace(ORIGINAL_APP_DELEGATE, SCENE_APP_DELEGATE).replace(
|
|
125
|
+
return contents.replace(ORIGINAL_APP_DELEGATE, SCENE_APP_DELEGATE).replace(WINDOW_STATEMENT, '').replace(START_STATEMENT, '').replace(EMPTY_OS_WRAPPER, '').replace(BLANK_LINES_AFTER_FACTORY, '$1\n');
|
|
126
|
+
}
|
|
127
|
+
const restored = contents.replace(SCENE_APP_DELEGATE, ORIGINAL_APP_DELEGATE);
|
|
128
|
+
if (OS_WRAPPER.test(restored)) {
|
|
129
|
+
return restored.replace(OS_WRAPPER, `$1${LEGACY_WINDOW}$2${LEGACY_START}$3`);
|
|
124
130
|
}
|
|
125
|
-
return
|
|
131
|
+
return restored.replace(`${FACTORY_ASSIGNMENT}\n\n`, `${FACTORY_ASSIGNMENT}\n\n${LEGACY_STARTUP_WRAPPED}\n`);
|
|
126
132
|
}
|
|
127
133
|
|
|
128
134
|
//# sourceMappingURL=iosSceneSupport.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["iosSceneSupport.ts"],"sourcesContent":[null],"names":["withIosSceneSupport","PROPERTY_NAME","MINIMUM_EXPO_VERSION","NATIVE_SUPPORT_SDK_MAJOR","ORIGINAL_APP_DELEGATE","SCENE_APP_DELEGATE","FACTORY_ASSIGNMENT","LEGACY_STARTUP","LEGACY_STARTUP_WRAPPED","
|
|
1
|
+
{"version":3,"sources":["iosSceneSupport.ts"],"sourcesContent":[null],"names":["withIosSceneSupport","PROPERTY_NAME","MINIMUM_EXPO_VERSION","NATIVE_SUPPORT_SDK_MAJOR","ORIGINAL_APP_DELEGATE","SCENE_APP_DELEGATE","FACTORY_ASSIGNMENT","LEGACY_WINDOW","LEGACY_START","LEGACY_STARTUP","LEGACY_STARTUP_WRAPPED","WINDOW_STATEMENT","START_STATEMENT","EMPTY_OS_WRAPPER","OS_WRAPPER","BLANK_LINES_AFTER_FACTORY","RegExp","SCENE_MANIFEST","UIApplicationSupportsMultipleScenes","UISceneConfigurations","UIWindowSceneSessionRoleApplication","UISceneConfigurationName","UISceneDelegateClassName","config","props","enabled","ios","enableSceneSupport","undefined","expoVersion","getExpoVersion","semver","major","WarningAggregator","addWarningIOS","lt","Error","JSON","stringify","withAppDelegate","modResults","language","contents","updateAppDelegate","withInfoPlist","manifest","UIApplicationSceneManifest","isOwnedManifest","projectRoot","_internal","expoPackageJsonPath","resolveFrom","silent","installedVersion","require","version","sdkVersion","valid","isEnabled","includes","test","replace","restored"],"mappings":";;;;+BAmDaA;;;eAAAA;;;;yBAjDqD;;;;;;;gEAC1C;;;;;;;gEACL;;;;;;;;;;;AAInB,MAAMC,gBAAgB;AACtB,mGAAmG,GACnG,MAAMC,uBAAuB;AAC7B,wEAAwE,GACxE,MAAMC,2BAA2B;AAEjC,MAAMC,wBAAwB;AAC9B,MAAMC,qBAAqB;AAC3B,MAAMC,qBAAqB;AAC3B,MAAMC,gBAAgB,CAAC;AACvB,CAAC;AACD,MAAMC,eAAe,CAAC;;;;AAItB,CAAC;AACD,MAAMC,iBAAiB,GAAGF,gBAAgBC,cAAc;AACxD,wEAAwE,GACxE,MAAME,yBAAyB,CAAC;AAChC,EAAED,eAAe;AACjB,CAAC;AACD,MAAME,mBAAmB;AACzB,MAAMC,kBAAkB;AACxB,MAAMC,mBAAmB;AACzB,MAAMC,aAAa;AACnB,MAAMC,4BAA4B,IAAIC,OAAO,CAAC,CAAC,EAAEV,mBAAmB,2BAA2B,CAAC;AAEhG,MAAMW,iBAAiB;IACrBC,qCAAqC;IACrCC,uBAAuB;QACrBC,qCAAqC;YACnC;gBACEC,0BAA0B;gBAC1BC,0BAA0B;YAC5B;SACD;IACH;AACF;AAMO,MAAMtB,sBAAsD,CAACuB,QAAQC;IAC1E,MAAMC,UAAUD,MAAME,GAAG,EAAEC;IAC3B,IAAIF,YAAYG,WAAW;QACzB,OAAOL;IACT;IAEA,MAAMM,cAAcC,eAAeP;IACnC,IAAIM,eAAeE,iBAAM,CAACC,KAAK,CAACH,gBAAgB1B,0BAA0B;QACxE8B,kCAAiB,CAACC,aAAa,CAC7BjC,eACA,CAAC,+DAA+D,EAAEA,cAAc,kFAAkF,CAAC;Q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F,WAAWA,UAAU3B;AACtD;AAEA,SAASmB,gBAAgBF,QAAiB;IACxC,OAAOR,KAAKC,SAAS,CAACO,cAAcR,KAAKC,SAAS,CAACrB;AACrD;AAEA,SAAS0B,kBAAkBD,QAAgB,EAAEjB,OAAgB;IAC3D,MAAMiC,YAAYhB,SAASiB,QAAQ,CAACtD;IACpC,IAAIoB,YAAYiC,WAAW;QACzB,OAAOhB;IACT;IAEA,IAAIjB,SAAS;QACX,IACE,CAACiB,SAASiB,QAAQ,CAACvD,0BACnB,CAACO,iBAAiBiD,IAAI,CAAClB,aACvB,CAAC9B,gBAAgBgD,IAAI,CAAClB,WACtB;YACA,MAAM,IAAIN,MAAM,CAAC,EAAE,EAAEnC,cAAc,uDAAuD,CAAC;QAC7F;QACA,OAAOyC,SACJmB,OAAO,CAACzD,uBAAuBC,oBAC/BwD,OAAO,CAAClD,kBAAkB,IAC1BkD,OAAO,CAACjD,iBAAiB,IACzBiD,OAAO,CAAChD,kBAAkB,IAC1BgD,OAAO,CAAC9C,2BAA2B;IACxC;IAEA,MAAM+C,WAAWpB,SAASmB,OAAO,CAACxD,oBAAoBD;IACtD,IAAIU,WAAW8C,IAAI,CAACE,WAAW;QAC7B,OAAOA,SAASD,OAAO,CAAC/C,YAAY,CAAC,EAAE,EAAEP,cAAc,EAAE,EAAEC,aAAa,EAAE,CAAC;IAC7E;IACA,OAAOsD,SAASD,OAAO,CACrB,GAAGvD,mBAAmB,IAAI,CAAC,EAC3B,GAAGA,mBAAmB,IAAI,EAAEI,uBAAuB,EAAE,CAAC;AAE1D"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-build-properties",
|
|
3
|
-
"version": "58.0.
|
|
3
|
+
"version": "58.0.3",
|
|
4
4
|
"description": "Config plugin to customize native build properties on prebuild",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"build",
|
|
@@ -41,13 +41,13 @@
|
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/node": "^22.14.0",
|
|
43
43
|
"@types/semver": "^7.0.0",
|
|
44
|
-
"expo": "58.0.0-preview.
|
|
44
|
+
"expo": "58.0.0-preview.3",
|
|
45
45
|
"expo-module-scripts": "56.0.3"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"expo": "*"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "917a61b581baeb852aa4fe331da2c1395d824351",
|
|
51
51
|
"scripts": {
|
|
52
52
|
"build": "expo-build cjs:src",
|
|
53
53
|
"clean": "expo-module clean",
|
package/src/iosSceneSupport.ts
CHANGED
|
@@ -15,18 +15,23 @@ const NATIVE_SUPPORT_SDK_MAJOR = 58;
|
|
|
15
15
|
const ORIGINAL_APP_DELEGATE = 'class AppDelegate: ExpoAppDelegate {';
|
|
16
16
|
const SCENE_APP_DELEGATE = 'class AppDelegate: ExpoAppDelegate, ExpoReactNativeFactoryProvider {';
|
|
17
17
|
const FACTORY_ASSIGNMENT = ' reactNativeFactory = factory';
|
|
18
|
-
const
|
|
19
|
-
|
|
18
|
+
const LEGACY_WINDOW = ` window = UIWindow(frame: UIScreen.main.bounds)
|
|
19
|
+
`;
|
|
20
|
+
const LEGACY_START = ` factory.startReactNative(
|
|
20
21
|
withModuleName: "main",
|
|
21
22
|
in: window,
|
|
22
23
|
launchOptions: launchOptions)
|
|
23
24
|
`;
|
|
25
|
+
const LEGACY_STARTUP = `${LEGACY_WINDOW}${LEGACY_START}`;
|
|
24
26
|
/** The published SDK 57 template wraps the startup in an `os()` check. */
|
|
25
27
|
const LEGACY_STARTUP_WRAPPED = `#if os(iOS) || os(tvOS)
|
|
26
28
|
${LEGACY_STARTUP}#endif
|
|
27
29
|
`;
|
|
28
|
-
|
|
29
|
-
const
|
|
30
|
+
const WINDOW_STATEMENT = /^[ \t]*window = UIWindow\(frame: UIScreen\.main\.bounds\)\r?\n/m;
|
|
31
|
+
const START_STATEMENT = /^[ \t]*factory\.startReactNative\([^)]*\)\r?\n/m;
|
|
32
|
+
const EMPTY_OS_WRAPPER = /^[ \t]*#if os\(iOS\) \|\| os\(tvOS\)\r?\n[ \t]*#endif\r?\n/m;
|
|
33
|
+
const OS_WRAPPER = /^([ \t]*#if os\(iOS\) \|\| os\(tvOS\)\r?\n)([\s\S]*?)(^[ \t]*#endif\r?\n)/m;
|
|
34
|
+
const BLANK_LINES_AFTER_FACTORY = new RegExp(`(${FACTORY_ASSIGNMENT}\\r?\\n)(?:[ \\t]*\\r?\\n)+`);
|
|
30
35
|
|
|
31
36
|
const SCENE_MANIFEST = {
|
|
32
37
|
UIApplicationSupportsMultipleScenes: false,
|
|
@@ -111,14 +116,27 @@ function updateAppDelegate(contents: string, enabled: boolean): string {
|
|
|
111
116
|
}
|
|
112
117
|
|
|
113
118
|
if (enabled) {
|
|
114
|
-
|
|
115
|
-
|
|
119
|
+
if (
|
|
120
|
+
!contents.includes(ORIGINAL_APP_DELEGATE) ||
|
|
121
|
+
!WINDOW_STATEMENT.test(contents) ||
|
|
122
|
+
!START_STATEMENT.test(contents)
|
|
123
|
+
) {
|
|
116
124
|
throw new Error(`\`${PROPERTY_NAME}\` requires the standard Expo SDK 57 Swift AppDelegate.`);
|
|
117
125
|
}
|
|
118
|
-
return contents
|
|
126
|
+
return contents
|
|
127
|
+
.replace(ORIGINAL_APP_DELEGATE, SCENE_APP_DELEGATE)
|
|
128
|
+
.replace(WINDOW_STATEMENT, '')
|
|
129
|
+
.replace(START_STATEMENT, '')
|
|
130
|
+
.replace(EMPTY_OS_WRAPPER, '')
|
|
131
|
+
.replace(BLANK_LINES_AFTER_FACTORY, '$1\n');
|
|
119
132
|
}
|
|
120
133
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
.replace(
|
|
134
|
+
const restored = contents.replace(SCENE_APP_DELEGATE, ORIGINAL_APP_DELEGATE);
|
|
135
|
+
if (OS_WRAPPER.test(restored)) {
|
|
136
|
+
return restored.replace(OS_WRAPPER, `$1${LEGACY_WINDOW}$2${LEGACY_START}$3`);
|
|
137
|
+
}
|
|
138
|
+
return restored.replace(
|
|
139
|
+
`${FACTORY_ASSIGNMENT}\n\n`,
|
|
140
|
+
`${FACTORY_ASSIGNMENT}\n\n${LEGACY_STARTUP_WRAPPED}\n`
|
|
141
|
+
);
|
|
124
142
|
}
|
package/.npmignore
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# @generated by expo-module-scripts
|
|
2
|
-
|
|
3
|
-
# Exclude all top-level hidden directories by convention
|
|
4
|
-
/.*/
|
|
5
|
-
|
|
6
|
-
# Exclude tarballs generated by `npm pack`
|
|
7
|
-
/*.tgz
|
|
8
|
-
|
|
9
|
-
__mocks__
|
|
10
|
-
__tests__
|
|
11
|
-
__rsc_tests__
|
|
12
|
-
|
|
13
|
-
/e2e
|
|
14
|
-
/e2e-cli
|
|
15
|
-
/babel.config.js
|
|
16
|
-
/oxlint.config.mjs
|
|
17
|
-
/android/src/androidTest/
|
|
18
|
-
/android/src/test/
|
|
19
|
-
/ios/Tests
|
|
20
|
-
|
|
21
|
-
# Exclude native build output (pnpm pack ignores nested .gitignore files)
|
|
22
|
-
.cxx/
|
|
23
|
-
.gradle/
|
|
24
|
-
/android/build/
|
package/.tsbuildinfo
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":"6.0.3"}
|
package/jest.config.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require('expo-module-scripts/jest-preset-plugin');
|