@expo/eas-json 3.9.2 → 3.10.2

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.
@@ -22,6 +22,10 @@ const CacheSchema = joi_1.default.object({
22
22
  key: joi_1.default.string().max(128),
23
23
  cacheDefaultPaths: joi_1.default.boolean(),
24
24
  customPaths: joi_1.default.array().items(joi_1.default.string()),
25
+ paths: joi_1.default.array().items(joi_1.default.string()),
26
+ }).rename('customPaths', 'paths')
27
+ .messages({
28
+ 'object.rename.override': 'Cannot provide both "cache.customPaths" and "cache.paths" - use "cache.paths"'
25
29
  });
26
30
  const CommonBuildProfileSchema = joi_1.default.object({
27
31
  // builder
package/build/utils.d.ts CHANGED
@@ -10,7 +10,8 @@ interface EasJsonDeprecationWarning {
10
10
  export declare class EasJsonUtils {
11
11
  static getBuildProfileNamesAsync(accessor: EasJsonAccessor): Promise<string[]>;
12
12
  static getBuildProfileAsync<T extends Platform>(accessor: EasJsonAccessor, platform: T, profileName?: string): Promise<BuildProfile<T>>;
13
- static getBuildProfileDeprecationWarnings(buildProfile: BuildProfile, profileName?: string): EasJsonDeprecationWarning[];
13
+ static getBuildProfileDeprecationWarningsAsync(easJsonAccessor: EasJsonAccessor, platform: Platform, profileName: string): Promise<EasJsonDeprecationWarning[]>;
14
+ private static getCustomPathsDeprecationWarnings;
14
15
  static getCliConfigAsync(accessor: EasJsonAccessor): Promise<EasJson['cli'] | null>;
15
16
  static getSubmitProfileNamesAsync(accessor: EasJsonAccessor): Promise<string[]>;
16
17
  static getSubmitProfileAsync<T extends Platform>(accessor: EasJsonAccessor, platform: T, profileName?: string): Promise<SubmitProfile<T>>;
package/build/utils.js CHANGED
@@ -14,17 +14,36 @@ class EasJsonUtils {
14
14
  const easJson = await accessor.readAsync();
15
15
  return (0, resolver_1.resolveBuildProfile)({ easJson, platform, profileName });
16
16
  }
17
- static getBuildProfileDeprecationWarnings(buildProfile, profileName) {
17
+ static async getBuildProfileDeprecationWarningsAsync(easJsonAccessor, platform, profileName) {
18
18
  var _a;
19
19
  const warnings = [];
20
+ const buildProfile = await EasJsonUtils.getBuildProfileAsync(easJsonAccessor, platform, profileName);
21
+ const rawEasJson = await easJsonAccessor.readRawJsonAsync();
20
22
  if (((_a = buildProfile.cache) === null || _a === void 0 ? void 0 : _a.cacheDefaultPaths) !== undefined) {
21
23
  warnings.push({
22
24
  message: [
23
- `The "build.${profileName !== null && profileName !== void 0 ? profileName : 'production'}.cache.cacheDefaultPaths" field in eas.json is deprecated and will be removed in the future.`,
25
+ `The "build.${profileName}.cache.cacheDefaultPaths" field in eas.json is deprecated and will be removed in the future.`,
24
26
  ],
25
27
  docsUrl: 'https://docs.expo.dev/build-reference/caching/#ios-dependencies',
26
28
  });
27
29
  }
30
+ warnings.push(...EasJsonUtils.getCustomPathsDeprecationWarnings(rawEasJson, profileName));
31
+ return warnings;
32
+ }
33
+ static getCustomPathsDeprecationWarnings(rawEasJson, profileName) {
34
+ var _a, _b, _c, _d, _e, _f;
35
+ const warnings = [];
36
+ if (((_c = (_b = (_a = rawEasJson.build) === null || _a === void 0 ? void 0 : _a[profileName]) === null || _b === void 0 ? void 0 : _b.cache) === null || _c === void 0 ? void 0 : _c.customPaths) !== undefined) {
37
+ warnings.push({
38
+ message: [
39
+ `The "build.${profileName}.cache.customPaths" field in eas.json is deprecated and will be removed in the future. Please use "build.${profileName}.cache.paths" instead.`,
40
+ ],
41
+ docsUrl: 'https://docs.expo.dev/build-reference/eas-json/#cache',
42
+ });
43
+ }
44
+ if (((_e = (_d = rawEasJson.build) === null || _d === void 0 ? void 0 : _d[profileName]) === null || _e === void 0 ? void 0 : _e.extends) !== undefined) {
45
+ warnings.push(...EasJsonUtils.getCustomPathsDeprecationWarnings(rawEasJson, (_f = rawEasJson.build) === null || _f === void 0 ? void 0 : _f[profileName].extends));
46
+ }
28
47
  return warnings;
29
48
  }
30
49
  static async getCliConfigAsync(accessor) {
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@expo/eas-json",
3
3
  "description": "A library for interacting with eas.json",
4
- "version": "3.9.2",
4
+ "version": "3.10.2",
5
5
  "author": "Expo <support@expo.dev>",
6
6
  "bugs": "https://github.com/expo/eas-cli/issues",
7
7
  "dependencies": {
8
8
  "@babel/code-frame": "7.18.6",
9
- "@expo/eas-build-job": "1.0.7",
9
+ "@expo/eas-build-job": "1.0.10",
10
10
  "chalk": "4.1.2",
11
11
  "env-string": "1.0.1",
12
12
  "fs-extra": "10.1.0",
@@ -51,5 +51,5 @@
51
51
  "node": "18.6.0",
52
52
  "yarn": "1.22.19"
53
53
  },
54
- "gitHead": "7bf0493a4d23b91e6961f9dc9e248f1c87cfbe03"
54
+ "gitHead": "aa22163688c21a367b99292d87715fc0bedfa600"
55
55
  }