expo-build-properties 0.6.0 → 0.7.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/CHANGELOG.md +7 -1
- package/README.md +3 -5
- package/build/pluginConfig.d.ts +9 -7
- package/build/pluginConfig.js +1 -1
- package/package.json +2 -2
- package/src/pluginConfig.ts +10 -8
package/CHANGELOG.md
CHANGED
|
@@ -10,7 +10,13 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
-
## 0.
|
|
13
|
+
## 0.7.0 — 2023-05-08
|
|
14
|
+
|
|
15
|
+
### 🐛 Bug fixes
|
|
16
|
+
|
|
17
|
+
- Fixed false alarm error throwing when `ios.flipper=false` and `useFrameworks`. ([#22296](https://github.com/expo/expo/pull/22296) by [@kudo](https://github.com/kudo))
|
|
18
|
+
|
|
19
|
+
## 0.6.0 - 2023-04-14
|
|
14
20
|
|
|
15
21
|
### 🎉 New features
|
|
16
22
|
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# expo-build-properties
|
|
2
2
|
|
|
3
|
-
**`expo-build-properties`** is a config plugin
|
|
3
|
+
**`expo-build-properties`** is a [config plugin](https://docs.expo.dev/config-plugins/introduction/) to customize native build properties when using [`npx expo prebuild`](https://docs.expo.dev/workflow/prebuild/).
|
|
4
4
|
|
|
5
5
|
## API documentation
|
|
6
6
|
|
|
@@ -9,10 +9,8 @@
|
|
|
9
9
|
|
|
10
10
|
### Installation
|
|
11
11
|
|
|
12
|
-
**Note:** To use this config plugin, your apps must be a managed app and build by either [EAS Build](/build/introduction.md) or `expo run:[android|ios]`.
|
|
13
|
-
|
|
14
12
|
```
|
|
15
|
-
expo install expo-build-properties
|
|
13
|
+
npx expo install expo-build-properties
|
|
16
14
|
```
|
|
17
15
|
|
|
18
16
|
Add plugin to `app.json`. For example:
|
|
@@ -48,4 +46,4 @@ Contributions are very welcome! Please refer to guidelines described in the [con
|
|
|
48
46
|
[docs-main]: https://github.com/expo/expo/blob/main/docs/pages/versions/unversioned/sdk/build-properties.mdx
|
|
49
47
|
[docs-stable]: https://docs.expo.dev/versions/latest/sdk/build-properties/
|
|
50
48
|
[contributing]: https://github.com/expo/expo#contributing
|
|
51
|
-
[config-plugins]: https://docs.expo.dev/
|
|
49
|
+
[config-plugins]: https://docs.expo.dev/home/config-plugins/introduction
|
package/build/pluginConfig.d.ts
CHANGED
|
@@ -60,10 +60,11 @@ export interface PluginConfigTypeAndroid {
|
|
|
60
60
|
*/
|
|
61
61
|
packagingOptions?: PluginConfigTypeAndroidPackagingOptions;
|
|
62
62
|
/**
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
63
|
+
* By default, Flipper is enabled with the version that comes bundled with `react-native`.
|
|
64
|
+
*
|
|
65
|
+
* Use this to change the [Flipper](https://fbflipper.com/) version when
|
|
66
|
+
* running your app on Android. You can set the `flipper` property to a
|
|
67
|
+
* semver string and specify an alternate Flipper version.
|
|
67
68
|
*/
|
|
68
69
|
flipper?: string;
|
|
69
70
|
/**
|
|
@@ -91,16 +92,17 @@ export interface PluginConfigTypeIos {
|
|
|
91
92
|
* Enable [`use_frameworks!`](https://guides.cocoapods.org/syntax/podfile.html#use_frameworks_bang)
|
|
92
93
|
* in `Podfile` to use frameworks instead of static libraries for Pods.
|
|
93
94
|
*
|
|
94
|
-
*
|
|
95
|
+
* > You cannot use `useFrameworks` and `flipper` at the same time , and
|
|
96
|
+
* doing so will generate an error.
|
|
95
97
|
*/
|
|
96
98
|
useFrameworks?: 'static' | 'dynamic';
|
|
97
99
|
/**
|
|
98
100
|
* Enable [Flipper](https://fbflipper.com/) when running your app on iOS in
|
|
99
101
|
* Debug mode. Setting `true` enables the default version of Flipper, while
|
|
100
102
|
* setting a semver string will enable a specific version of Flipper you've
|
|
101
|
-
* declared in your package.json
|
|
103
|
+
* declared in your **package.json**. The default for this configuration is `false`.
|
|
102
104
|
*
|
|
103
|
-
*
|
|
105
|
+
* > You cannot use `flipper` at the same time as `useFrameworks`, and
|
|
104
106
|
* doing so will generate an error.
|
|
105
107
|
*/
|
|
106
108
|
flipper?: boolean | string;
|
package/build/pluginConfig.js
CHANGED
|
@@ -130,7 +130,7 @@ function validateConfig(config) {
|
|
|
130
130
|
maybeThrowInvalidVersions(config);
|
|
131
131
|
// explicitly block using use_frameworks and Flipper in iOS
|
|
132
132
|
// https://github.com/facebook/flipper/issues/2414
|
|
133
|
-
if (config
|
|
133
|
+
if (Boolean(config.ios?.flipper) && config.ios?.useFrameworks !== undefined) {
|
|
134
134
|
throw new Error('`ios.flipper` cannot be enabled when `ios.useFrameworks` is set.');
|
|
135
135
|
}
|
|
136
136
|
if (config.android?.enableShrinkResourcesInReleaseBuilds === true &&
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-build-properties",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Config plugin to customize native build properties on prebuild",
|
|
5
5
|
"main": "build/withBuildProperties.js",
|
|
6
6
|
"types": "build/withBuildProperties.d.ts",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"expo": "*"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "4ba50c428c8369bb6b3a51a860d4898ad4ccbe78"
|
|
44
44
|
}
|
package/src/pluginConfig.ts
CHANGED
|
@@ -81,10 +81,11 @@ export interface PluginConfigTypeAndroid {
|
|
|
81
81
|
packagingOptions?: PluginConfigTypeAndroidPackagingOptions;
|
|
82
82
|
|
|
83
83
|
/**
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
84
|
+
* By default, Flipper is enabled with the version that comes bundled with `react-native`.
|
|
85
|
+
*
|
|
86
|
+
* Use this to change the [Flipper](https://fbflipper.com/) version when
|
|
87
|
+
* running your app on Android. You can set the `flipper` property to a
|
|
88
|
+
* semver string and specify an alternate Flipper version.
|
|
88
89
|
*/
|
|
89
90
|
flipper?: string;
|
|
90
91
|
|
|
@@ -115,7 +116,8 @@ export interface PluginConfigTypeIos {
|
|
|
115
116
|
* Enable [`use_frameworks!`](https://guides.cocoapods.org/syntax/podfile.html#use_frameworks_bang)
|
|
116
117
|
* in `Podfile` to use frameworks instead of static libraries for Pods.
|
|
117
118
|
*
|
|
118
|
-
*
|
|
119
|
+
* > You cannot use `useFrameworks` and `flipper` at the same time , and
|
|
120
|
+
* doing so will generate an error.
|
|
119
121
|
*/
|
|
120
122
|
useFrameworks?: 'static' | 'dynamic';
|
|
121
123
|
|
|
@@ -123,9 +125,9 @@ export interface PluginConfigTypeIos {
|
|
|
123
125
|
* Enable [Flipper](https://fbflipper.com/) when running your app on iOS in
|
|
124
126
|
* Debug mode. Setting `true` enables the default version of Flipper, while
|
|
125
127
|
* setting a semver string will enable a specific version of Flipper you've
|
|
126
|
-
* declared in your package.json
|
|
128
|
+
* declared in your **package.json**. The default for this configuration is `false`.
|
|
127
129
|
*
|
|
128
|
-
*
|
|
130
|
+
* > You cannot use `flipper` at the same time as `useFrameworks`, and
|
|
129
131
|
* doing so will generate an error.
|
|
130
132
|
*/
|
|
131
133
|
flipper?: boolean | string;
|
|
@@ -284,7 +286,7 @@ export function validateConfig(config: any): PluginConfigType {
|
|
|
284
286
|
|
|
285
287
|
// explicitly block using use_frameworks and Flipper in iOS
|
|
286
288
|
// https://github.com/facebook/flipper/issues/2414
|
|
287
|
-
if (config
|
|
289
|
+
if (Boolean(config.ios?.flipper) && config.ios?.useFrameworks !== undefined) {
|
|
288
290
|
throw new Error('`ios.flipper` cannot be enabled when `ios.useFrameworks` is set.');
|
|
289
291
|
}
|
|
290
292
|
|