@expo/eas-json
Advanced tools
Comparing version 3.9.2 to 3.10.1
@@ -25,2 +25,6 @@ "use strict"; | ||
customPaths: joi_1.default.array().items(joi_1.default.string()), | ||
paths: joi_1.default.array().items(joi_1.default.string()), | ||
}).rename('customPaths', 'paths') | ||
.messages({ | ||
'object.rename.override': 'Cannot provide both "cache.customPaths" and "cache.paths" - use "cache.paths"' | ||
}); | ||
@@ -27,0 +31,0 @@ const CommonBuildProfileSchema = joi_1.default.object({ |
@@ -13,3 +13,4 @@ import { Platform } from '@expo/eas-build-job'; | ||
static getBuildProfileAsync<T extends Platform>(accessor: EasJsonAccessor, platform: T, profileName?: string): Promise<BuildProfile<T>>; | ||
static getBuildProfileDeprecationWarnings(buildProfile: BuildProfile, profileName?: string): EasJsonDeprecationWarning[]; | ||
static getBuildProfileDeprecationWarningsAsync(easJsonAccessor: EasJsonAccessor, platform: Platform, profileName: string): Promise<EasJsonDeprecationWarning[]>; | ||
private static getCustomPathsDeprecationWarnings; | ||
static getCliConfigAsync(accessor: EasJsonAccessor): Promise<EasJson['cli'] | null>; | ||
@@ -16,0 +17,0 @@ static getSubmitProfileNamesAsync(accessor: EasJsonAccessor): Promise<string[]>; |
@@ -17,9 +17,11 @@ "use strict"; | ||
} | ||
static getBuildProfileDeprecationWarnings(buildProfile, profileName) { | ||
static async getBuildProfileDeprecationWarningsAsync(easJsonAccessor, platform, profileName) { | ||
var _a; | ||
const warnings = []; | ||
const buildProfile = await EasJsonUtils.getBuildProfileAsync(easJsonAccessor, platform, profileName); | ||
const rawEasJson = await easJsonAccessor.readRawJsonAsync(); | ||
if (((_a = buildProfile.cache) === null || _a === void 0 ? void 0 : _a.cacheDefaultPaths) !== undefined) { | ||
warnings.push({ | ||
message: [ | ||
`The "build.${profileName !== null && profileName !== void 0 ? profileName : 'production'}.cache.cacheDefaultPaths" field in eas.json is deprecated and will be removed in the future.`, | ||
`The "build.${profileName}.cache.cacheDefaultPaths" field in eas.json is deprecated and will be removed in the future.`, | ||
], | ||
@@ -29,4 +31,21 @@ docsUrl: 'https://docs.expo.dev/build-reference/caching/#ios-dependencies', | ||
} | ||
warnings.push(...EasJsonUtils.getCustomPathsDeprecationWarnings(rawEasJson, profileName)); | ||
return warnings; | ||
} | ||
static getCustomPathsDeprecationWarnings(rawEasJson, profileName) { | ||
var _a, _b, _c, _d, _e, _f; | ||
const warnings = []; | ||
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) { | ||
warnings.push({ | ||
message: [ | ||
`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.`, | ||
], | ||
docsUrl: 'https://docs.expo.dev/build-reference/eas-json/#cache', | ||
}); | ||
} | ||
if (((_e = (_d = rawEasJson.build) === null || _d === void 0 ? void 0 : _d[profileName]) === null || _e === void 0 ? void 0 : _e.extends) !== undefined) { | ||
warnings.push(...EasJsonUtils.getCustomPathsDeprecationWarnings(rawEasJson, (_f = rawEasJson.build) === null || _f === void 0 ? void 0 : _f[profileName].extends)); | ||
} | ||
return warnings; | ||
} | ||
static async getCliConfigAsync(accessor) { | ||
@@ -33,0 +52,0 @@ var _a; |
{ | ||
"name": "@expo/eas-json", | ||
"description": "A library for interacting with eas.json", | ||
"version": "3.9.2", | ||
"version": "3.10.1", | ||
"author": "Expo <support@expo.dev>", | ||
@@ -9,3 +9,3 @@ "bugs": "https://github.com/expo/eas-cli/issues", | ||
"@babel/code-frame": "7.18.6", | ||
"@expo/eas-build-job": "1.0.7", | ||
"@expo/eas-build-job": "1.0.10", | ||
"chalk": "4.1.2", | ||
@@ -55,3 +55,3 @@ "env-string": "1.0.1", | ||
}, | ||
"gitHead": "7bf0493a4d23b91e6961f9dc9e248f1c87cfbe03" | ||
"gitHead": "02af3f587fd3c236f0a65a0c2cf69f30fd1a3b8c" | ||
} |
40074
886
+ Added@expo/eas-build-job@1.0.10(transitive)
- Removed@expo/eas-build-job@1.0.7(transitive)
Updated@expo/eas-build-job@1.0.10