expo-build-properties 0.12.0 → 0.12.1

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 CHANGED
@@ -10,6 +10,13 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 0.12.1 — 2024-05-06
14
+
15
+ ### 🎉 New features
16
+
17
+ - Add `ios.ccacheEnabled` option to enable the C++ compiler cache for iOS builds. ([#28638](https://github.com/expo/expo/pull/28638) by [@byCedric](https://github.com/byCedric))
18
+ - Add `ios.privacyManifestAggregationEnabled` option to enable/disable privacy manifest aggregation. ([#28646](https://github.com/expo/expo/pull/28646) by [@brentvatne](https://github.com/brentvatne)).
19
+
13
20
  ## 0.12.0 — 2024-04-18
14
21
 
15
22
  ### 🛠 Breaking changes
package/build/android.js CHANGED
@@ -3,8 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.withAndroidQueries = exports.withAndroidCleartextTraffic = exports.withAndroidPurgeProguardRulesOnce = exports.withAndroidProguardRules = exports.withAndroidBuildProperties = void 0;
7
- exports.updateAndroidProguardRules = updateAndroidProguardRules;
6
+ exports.withAndroidQueries = exports.withAndroidCleartextTraffic = exports.updateAndroidProguardRules = exports.withAndroidPurgeProguardRulesOnce = exports.withAndroidProguardRules = exports.withAndroidBuildProperties = void 0;
8
7
  const config_plugins_1 = require("expo/config-plugins");
9
8
  const fs_1 = __importDefault(require("fs"));
10
9
  const path_1 = __importDefault(require("path"));
@@ -166,6 +165,7 @@ function updateAndroidProguardRules(contents, newProguardRules, updateMode) {
166
165
  }
167
166
  return newContents;
168
167
  }
168
+ exports.updateAndroidProguardRules = updateAndroidProguardRules;
169
169
  const withAndroidCleartextTraffic = (config, props) => {
170
170
  return (0, config_plugins_1.withAndroidManifest)(config, (config) => {
171
171
  if (props.android?.usesCleartextTraffic == null) {
@@ -1,12 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.renderQueryProviders = renderQueryProviders;
4
- exports.renderQueryPackages = renderQueryPackages;
5
- exports.renderQueryIntents = renderQueryIntents;
3
+ exports.renderQueryIntents = exports.renderQueryPackages = exports.renderQueryProviders = void 0;
6
4
  function renderQueryProviders(data) {
7
5
  const dataStr = Array.isArray(data) ? data.join(';') : data;
8
6
  return dataStr ? { $: { 'android:authorities': dataStr } } : undefined;
9
7
  }
8
+ exports.renderQueryProviders = renderQueryProviders;
10
9
  function renderQueryPackages(data) {
11
10
  return (Array.isArray(data) ? data : [data]).filter(Boolean).map((datum) => ({
12
11
  $: {
@@ -14,6 +13,7 @@ function renderQueryPackages(data) {
14
13
  },
15
14
  }));
16
15
  }
16
+ exports.renderQueryPackages = renderQueryPackages;
17
17
  function renderQueryIntents(queryIntents) {
18
18
  return (queryIntents?.map((intent) => {
19
19
  const { data, category, action } = intent;
@@ -36,3 +36,4 @@ function renderQueryIntents(queryIntents) {
36
36
  };
37
37
  }) ?? []);
38
38
  }
39
+ exports.renderQueryIntents = renderQueryIntents;
@@ -6,8 +6,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
6
6
  return (mod && mod.__esModule) ? mod : { "default": mod };
7
7
  };
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.appendContents = appendContents;
10
- exports.purgeContents = purgeContents;
9
+ exports.purgeContents = exports.appendContents = void 0;
11
10
  const assert_1 = __importDefault(require("assert"));
12
11
  /**
13
12
  * Append new contents to src with generated section comments
@@ -29,6 +28,7 @@ function appendContents(src, contents, sectionOptions) {
29
28
  return `${src}\n${sectionedContents}`;
30
29
  }
31
30
  }
31
+ exports.appendContents = appendContents;
32
32
  /**
33
33
  * Purge a generated section
34
34
  */
@@ -38,6 +38,7 @@ function purgeContents(src, sectionOptions) {
38
38
  const regex = new RegExp(`\\n${escapeRegExp(start)}\\n[\\s\\S]*\\n${escapeRegExp(end)}`, 'gm');
39
39
  return src.replace(regex, '');
40
40
  }
41
+ exports.purgeContents = purgeContents;
41
42
  /**
42
43
  * Create comments for generated section
43
44
  */
package/build/ios.js CHANGED
@@ -20,6 +20,14 @@ exports.withIosBuildProperties = createBuildPodfilePropsConfigPlugin([
20
20
  propName: 'apple.extraPods',
21
21
  propValueGetter: (config) => JSON.stringify(config.ios?.extraPods ?? []),
22
22
  },
23
+ {
24
+ propName: 'apple.ccacheEnabled',
25
+ propValueGetter: (config) => (config.ios?.ccacheEnabled ?? false).toString(),
26
+ },
27
+ {
28
+ propName: 'apple.privacyManifestAggregationEnabled',
29
+ propValueGetter: (config) => (config.ios?.privacyManifestAggregationEnabled ?? false).toString(),
30
+ },
23
31
  ], 'withIosBuildProperties');
24
32
  const withIosDeploymentTarget = (config, props) => {
25
33
  const deploymentTarget = props.ios?.deploymentTarget;
@@ -202,6 +202,24 @@ export interface PluginConfigTypeIos {
202
202
  * this property is actually handled by `expo-modules-autolinking` but not the config-plugins inside expo-build-properties.
203
203
  */
204
204
  extraPods?: ExtraIosPodDependency[];
205
+ /**
206
+ * Enable C++ compiler cache for iOS builds.
207
+ *
208
+ * This speeds up compiling C++ code by caching the results of previous compilations.
209
+ *
210
+ * @see https://reactnative.dev/docs/build-speed#local-caches
211
+ * @see https://ccache.dev/
212
+ */
213
+ ccacheEnabled?: boolean;
214
+ /**
215
+ * Enable aggregation of Privacy Manifests (`PrivacyInfo.xcprivacy`) from
216
+ * CocoaPods resource bundles. If enabled, the manifests will be merged into a
217
+ * single file. If not enabled, developers will need to manually aggregate them.
218
+ *
219
+ * @see https://docs.expo.dev/guides/apple-privacy/
220
+ * @see https://developer.apple.com/documentation/bundleresources/privacy_manifest_files
221
+ */
222
+ privacyManifestAggregationEnabled?: boolean;
205
223
  }
206
224
  /**
207
225
  * Interface representing extra CocoaPods dependency.
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.validateConfig = validateConfig;
6
+ exports.validateConfig = void 0;
7
7
  const ajv_1 = __importDefault(require("ajv"));
8
8
  const semver_1 = __importDefault(require("semver"));
9
9
  /**
@@ -145,6 +145,8 @@ const schema = {
145
145
  deploymentTarget: { type: 'string', pattern: '\\d+\\.\\d+', nullable: true },
146
146
  useFrameworks: { type: 'string', enum: ['static', 'dynamic'], nullable: true },
147
147
  networkInspector: { type: 'boolean', nullable: true },
148
+ ccacheEnabled: { type: 'boolean', nullable: true },
149
+ privacyManifestAggregationEnabled: { type: 'boolean', nullable: true },
148
150
  extraPods: {
149
151
  type: 'array',
150
152
  items: {
@@ -236,3 +238,4 @@ function validateConfig(config) {
236
238
  }
237
239
  return config;
238
240
  }
241
+ exports.validateConfig = validateConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-build-properties",
3
- "version": "0.12.0",
3
+ "version": "0.12.1",
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": "4165b8d72e1b9a1889c2767534cc619e21468110"
43
+ "gitHead": "7995f30a8d2af4836f3aef9fe322e9403fc23d34"
44
44
  }
package/src/ios.ts CHANGED
@@ -22,6 +22,15 @@ export const withIosBuildProperties = createBuildPodfilePropsConfigPlugin<Plugin
22
22
  propName: 'apple.extraPods',
23
23
  propValueGetter: (config) => JSON.stringify(config.ios?.extraPods ?? []),
24
24
  },
25
+ {
26
+ propName: 'apple.ccacheEnabled',
27
+ propValueGetter: (config) => (config.ios?.ccacheEnabled ?? false).toString(),
28
+ },
29
+ {
30
+ propName: 'apple.privacyManifestAggregationEnabled',
31
+ propValueGetter: (config) =>
32
+ (config.ios?.privacyManifestAggregationEnabled ?? false).toString(),
33
+ },
25
34
  ],
26
35
  'withIosBuildProperties'
27
36
  );
@@ -236,6 +236,26 @@ export interface PluginConfigTypeIos {
236
236
  * this property is actually handled by `expo-modules-autolinking` but not the config-plugins inside expo-build-properties.
237
237
  */
238
238
  extraPods?: ExtraIosPodDependency[];
239
+
240
+ /**
241
+ * Enable C++ compiler cache for iOS builds.
242
+ *
243
+ * This speeds up compiling C++ code by caching the results of previous compilations.
244
+ *
245
+ * @see https://reactnative.dev/docs/build-speed#local-caches
246
+ * @see https://ccache.dev/
247
+ */
248
+ ccacheEnabled?: boolean;
249
+
250
+ /**
251
+ * Enable aggregation of Privacy Manifests (`PrivacyInfo.xcprivacy`) from
252
+ * CocoaPods resource bundles. If enabled, the manifests will be merged into a
253
+ * single file. If not enabled, developers will need to manually aggregate them.
254
+ *
255
+ * @see https://docs.expo.dev/guides/apple-privacy/
256
+ * @see https://developer.apple.com/documentation/bundleresources/privacy_manifest_files
257
+ */
258
+ privacyManifestAggregationEnabled?: boolean;
239
259
  }
240
260
 
241
261
  /**
@@ -532,6 +552,8 @@ const schema: JSONSchemaType<PluginConfigType> = {
532
552
  useFrameworks: { type: 'string', enum: ['static', 'dynamic'], nullable: true },
533
553
 
534
554
  networkInspector: { type: 'boolean', nullable: true },
555
+ ccacheEnabled: { type: 'boolean', nullable: true },
556
+ privacyManifestAggregationEnabled: { type: 'boolean', nullable: true },
535
557
 
536
558
  extraPods: {
537
559
  type: 'array',