Compare commits

..
Author SHA1 Message Date
Will Schurman 7e154ec9dc [3/n][eas-cli] getUsername -> getUsernameForActor 2022-09-19 15:32:16 -07:00
13 changed files with 21 additions and 35 deletions

No files matched your search

-2
View File
@@ -23,8 +23,6 @@ This is the log of notable changes to EAS CLI and related packages.
### 🧹 Chores
- Standardize the GQL 'Update' schema using UpdateFragmentNode. ([#1348](https://github.com/expo/eas-cli/pull/1348) by [@kgc00](https://github.com/kgc00))
- Remove 'owner' app config field dependency. ([#1368](https://github.com/expo/eas-cli/pull/1368), [#1369](https://github.com/expo/eas-cli/pull/1369), [#1371](https://github.com/expo/eas-cli/pull/1371), [#1372](https://github.com/expo/eas-cli/pull/1372), [#1373](https://github.com/expo/eas-cli/pull/1373), by [@wschurman](https://github.com/wschurman))
- Add Xcode 14 image. ([#1365](https://github.com/expo/eas-cli/pull/1365) by [@szdziedzic](https://github.com/szdziedzic))
## [2.1.0](https://github.com/expo/eas-cli/releases/tag/v2.1.0) - 2022-09-05
+1 -1
View File
@@ -13,7 +13,7 @@
"@expo/config": "7.0.1",
"@expo/config-plugins": "5.0.1",
"@expo/config-types": "46.0.2",
"@expo/eas-build-job": "0.2.94",
"@expo/eas-build-job": "0.2.90",
"@expo/eas-json": "2.1.0",
"@expo/json-file": "8.2.36",
"@expo/multipart-body-parser": "1.1.0",
@@ -4,7 +4,7 @@ import path from 'path';
import slash from 'slash';
import { AndroidCredentials } from '../../credentials/android/AndroidCredentialsProvider';
import { getUsername } from '../../project/projectUtils';
import { getUsernameForActor } from '../../project/projectUtils';
import { ensureLoggedInAsync } from '../../user/actions';
import { getVcsClient } from '../../vcs';
import { BuildContext } from '../context';
@@ -24,8 +24,7 @@ export async function prepareJobAsync(
ctx: BuildContext<Platform.ANDROID>,
jobData: JobData
): Promise<Job> {
const username = getUsername(
ctx.exp,
const username = getUsernameForActor(
await ensureLoggedInAsync({ nonInteractive: ctx.nonInteractive })
);
const buildProfile: BuildProfile<Platform.ANDROID> = ctx.buildProfile;
+2 -3
View File
@@ -3,7 +3,7 @@ import path from 'path';
import slash from 'slash';
import { IosCredentials, TargetCredentials } from '../../credentials/ios/types';
import { getUsername } from '../../project/projectUtils';
import { getUsernameForActor } from '../../project/projectUtils';
import { ensureLoggedInAsync } from '../../user/actions';
import { getVcsClient } from '../../vcs';
import { BuildContext } from '../context';
@@ -26,8 +26,7 @@ export async function prepareJobAsync(
): Promise<Job> {
const projectRootDirectory =
slash(path.relative(await getVcsClient().getRootPathAsync(), ctx.projectDir)) || '.';
const username = getUsername(
ctx.exp,
const username = getUsernameForActor(
await ensureLoggedInAsync({ nonInteractive: ctx.nonInteractive })
);
const buildCredentials: Ios.Job['secrets']['buildCredentials'] = {};
+2 -3
View File
@@ -5,7 +5,7 @@ import fs from 'fs-extra';
import resolveFrom from 'resolve-from';
import Log from '../log';
import { getUsername, isExpoUpdatesInstalled } from '../project/projectUtils';
import { getUsernameForActor, isExpoUpdatesInstalled } from '../project/projectUtils';
import {
readChannelSafelyAsync as readAndroidChannelSafelyAsync,
readReleaseChannelSafelyAsync as readAndroidReleaseChannelSafelyAsync,
@@ -49,8 +49,7 @@ export async function collectMetadataAsync<T extends Platform>(
(await vcsClient.getLastCommitMessageAsync()) ?? undefined
),
isGitWorkingTreeDirty: await vcsClient.hasUncommittedChangesAsync(),
username: getUsername(
ctx.exp,
username: getUsernameForActor(
await ensureLoggedInAsync({ nonInteractive: ctx.nonInteractive })
),
message: ctx.message,
@@ -378,7 +378,7 @@ export default class UpdatePublish extends EasCommand {
if (!skipBundler) {
const bundleSpinner = ora().start('Building bundle...');
try {
await buildBundlesAsync({ projectDir, inputDir, platform: platformFlag });
await buildBundlesAsync({ projectDir, inputDir });
bundleSpinner.succeed('Built bundle!');
} catch (e) {
bundleSpinner.fail('Failed to build bundle!');
@@ -9,7 +9,7 @@ import nullthrows from 'nullthrows';
import { readAppJson } from '../../build/utils/appJson';
import env from '../../env';
import Log, { learnMore } from '../../log';
import { getProjectConfigDescription, getUsername } from '../../project/projectUtils';
import { getProjectConfigDescription, getUsernameForActor } from '../../project/projectUtils';
import { promptAsync } from '../../prompts';
import { ensureLoggedInAsync } from '../../user/actions';
import { resolveWorkflowAsync } from '../workflow';
@@ -175,7 +175,7 @@ async function getSuggestedApplicationIdAsync(exp: ExpoConfig): Promise<string |
return maybeBundleId;
} else {
// the only callsite is heavily interactive
const username = getUsername(exp, await ensureLoggedInAsync({ nonInteractive: false }));
const username = getUsernameForActor(await ensureLoggedInAsync({ nonInteractive: false }));
// It's common to use dashes in your node project name, strip them from the suggested package name.
const possibleId = `com.${username}.${exp.slug}`.split('-').join('');
if (isApplicationIdValid(possibleId)) {
@@ -9,7 +9,7 @@ import { readAppJson } from '../../build/utils/appJson';
import Log, { learnMore } from '../../log';
import { promptAsync } from '../../prompts';
import { ensureLoggedInAsync } from '../../user/actions';
import { getProjectConfigDescription, getUsername } from '../projectUtils';
import { getProjectConfigDescription, getUsernameForActor } from '../projectUtils';
import { resolveWorkflowAsync } from '../workflow';
export const INVALID_BUNDLE_IDENTIFIER_MESSAGE = `Invalid format of iOS bundle identifier. Only alphanumeric characters, '.' and '-' are allowed, and each '.' must be followed by a letter.`;
@@ -173,7 +173,7 @@ async function getSuggestedBundleIdentifierAsync(exp: ExpoConfig): Promise<strin
return maybeAndroidPackage;
} else {
// the only callsite is heavily interactive
const username = getUsername(exp, await ensureLoggedInAsync({ nonInteractive: false }));
const username = getUsernameForActor(await ensureLoggedInAsync({ nonInteractive: false }));
// It's common to use dashes in your node project name, strip them from the suggested package name.
const possibleId = `com.${username}.${exp.slug}`.split('-').join('');
if (isBundleIdentifierValid(possibleId)) {
+1 -7
View File
@@ -18,17 +18,11 @@ import { getVcsClient } from '../vcs';
import { getExpoConfig } from './expoConfig';
import { fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync } from './fetchOrCreateProjectIDForWriteToConfigWithConfirmationAsync';
export function getUsername(exp: ExpoConfig, user: Actor): string | undefined {
export function getUsernameForActor(user: Actor): string | undefined {
switch (user.__typename) {
case 'User':
return user.username;
case 'Robot':
// owner field is necessary to run `expo prebuild`
if (!exp.owner) {
throw new Error(
'The "owner" manifest property is required when using robot users. See: https://docs.expo.dev/versions/latest/config/app/#owner'
);
}
// robot users don't have usernames
return undefined;
}
-4
View File
@@ -147,11 +147,9 @@ export async function buildUnsortedUpdateInfoGroupAsync(
export async function buildBundlesAsync({
projectDir,
inputDir,
platform = 'all',
}: {
projectDir: string;
inputDir: string;
platform?: PublishPlatform | 'all';
}): Promise<void> {
const packageJSON = JsonFile.read(path.resolve(projectDir, 'package.json'));
if (!packageJSON) {
@@ -162,8 +160,6 @@ export async function buildBundlesAsync({
'export',
'--output-dir',
inputDir,
'--platform',
platform,
'--experimental-bundle',
'--non-interactive',
'--dump-sourcemap',
+1 -1
View File
@@ -6,7 +6,7 @@
"bugs": "https://github.com/expo/eas-cli/issues",
"dependencies": {
"@babel/code-frame": "7.18.6",
"@expo/eas-build-job": "0.2.94",
"@expo/eas-build-job": "0.2.90",
"chalk": "4.1.2",
"env-string": "1.0.1",
"fs-extra": "10.1.0",
+3 -2
View File
@@ -303,7 +303,7 @@
"enum": [
"default",
"latest",
"macos-monterey-12.6-xcode-14.0",
"stable",
"macos-monterey-12.4-xcode-13.4",
"macos-monterey-12.3-xcode-13.3",
"macos-monterey-12.1-xcode-13.2",
@@ -311,8 +311,9 @@
"macos-big-sur-11.4-xcode-12.5"
],
"markdownEnumDescriptions": [
"- Expo SDK `>=45` - `macos-monterey-12.3-xcode-13.3`\n- Expo SDK `<45` - `macos-big-sur-11.4-xcode-13.0`",
"`macos-monterey-12.4-xcode-13.4`",
"`macos-monterey-12.6-xcode-14.0`"
"`macos-monterey-12.3-xcode-13.3`"
]
},
{
Generated
+4 -4
View File
@@ -1343,10 +1343,10 @@
slugify "^1.3.4"
sucrase "^3.20.0"
"@expo/[email protected]4":
version "0.2.94"
resolved "https://registry.yarnpkg.com/@expo/eas-build-job/-/eas-build-job-0.2.94.tgz#05111ebeaf9a841c3eb778023dcde272af3fa48c"
integrity sha512-+tig8SczdGfjk2Tma5cVmESkx0bPBmR6dan2Bp5ITai3nhl8JN9mNZfEJPaBPCDlUe37sHvJwosh3GMfcq7QYg==
"@expo/[email protected]0":
version "0.2.90"
resolved "https://registry.yarnpkg.com/@expo/eas-build-job/-/eas-build-job-0.2.90.tgz#9d2b25a79d44cb9532b08a67caa13cb9529a9deb"
integrity sha512-gCWcfSsg4O+Ua1xt6JA2Himzlj1LBes8mEhbcm1vu1kgg15QP62Aer4ck/B2vxiox9ZqYxK2ZvEdyZ7SI+GNGQ==
dependencies:
joi "^17.4.2"
semver "^7.3.5"