Skip to content

Commit

Permalink
[eas-cli] [ENG-10225] add requiredPackageManager to build metadata (#…
Browse files Browse the repository at this point in the history
…2067)

* Add requiredPackageManager to build metadata

* Use correct version in changelog

* Fix changelog

* Update @expo/eas-build-job library

* Update graphql schema

* Update gql schema
  • Loading branch information
kadikraman authored Oct 3, 2023
1 parent 0fba735 commit feaedbe
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 60 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ This is the log of notable changes to EAS CLI and related packages.

### 🧹 Chores

- Add `requiredPackageManager` to metadata. ([#2067](https://github.com/expo/eas-cli/pull/2067) by [@kadikraman](https://github.com/kadikraman))

## [5.4.0](https://github.com/expo/eas-cli/releases/tag/v5.4.0) - 2023-09-28

### 🎉 New features
Expand Down
60 changes: 24 additions & 36 deletions packages/eas-cli/graphql.schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/eas-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
"@expo/config": "8.1.2",
"@expo/config-plugins": "7.2.4",
"@expo/config-types": "49.0.0",
"@expo/eas-build-job": "1.0.43",
"@expo/eas-build-job": "1.0.46",
"@expo/eas-json": "5.3.1",
"@expo/json-file": "8.2.37",
"@expo/multipart-body-parser": "1.1.0",
"@expo/osascript": "2.0.33",
"@expo/package-manager": "0.0.57",
"@expo/package-manager": "1.1.1",
"@expo/pkcs12": "0.0.8",
"@expo/plist": "0.0.20",
"@expo/plugin-help": "5.1.22",
Expand Down
2 changes: 2 additions & 0 deletions packages/eas-cli/src/build/context.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { ExpoConfig } from '@expo/config';
import { Platform, Workflow } from '@expo/eas-build-job';
import { BuildProfile, EasJson } from '@expo/eas-json';
import { NodePackageManager } from '@expo/package-manager';

import { Analytics, AnalyticsEventProperties } from '../analytics/AnalyticsManager';
import { ExpoGraphqlClient } from '../commandUtils/context/contextUtils/createGraphqlClient';
Expand Down Expand Up @@ -56,4 +57,5 @@ export interface BuildContext<T extends Platform> {
android: T extends Platform.ANDROID ? AndroidBuildContext : undefined;
ios: T extends Platform.IOS ? IosBuildContext : undefined;
developmentClient: boolean;
requiredPackageManager: NodePackageManager['name'] | null;
}
4 changes: 4 additions & 0 deletions packages/eas-cli/src/build/createContext.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Platform } from '@expo/eas-build-job';
import { BuildProfile, EasJson, ResourceClass } from '@expo/eas-json';
import JsonFile from '@expo/json-file';
import { resolvePackageManager } from '@expo/package-manager';
import getenv from 'getenv';
import resolveFrom from 'resolve-from';
import { v4 as uuidv4 } from 'uuid';
Expand Down Expand Up @@ -67,6 +68,8 @@ export async function createBuildContextAsync<T extends Platform>({
: (buildProfile as BuildProfile<Platform.IOS>)?.buildConfiguration === 'Debug') ??
false;

const requiredPackageManager = resolvePackageManager(projectDir);

const credentialsCtx = new CredentialsContext({
projectInfo: { exp, projectId },
nonInteractive,
Expand Down Expand Up @@ -127,6 +130,7 @@ export async function createBuildContextAsync<T extends Platform>({
runFromCI,
customBuildConfigMetadata,
developmentClient,
requiredPackageManager,
};
if (platform === Platform.ANDROID) {
const common = commonContext as CommonContext<Platform.ANDROID>;
Expand Down
1 change: 1 addition & 0 deletions packages/eas-cli/src/build/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export async function collectMetadataAsync<T extends Platform>(
buildMode: ctx.buildProfile.config ? BuildMode.CUSTOM : BuildMode.BUILD,
customWorkflowName: ctx.customBuildConfigMetadata?.workflowName,
developmentClient: ctx.developmentClient,
requiredPackageManager: ctx.requiredPackageManager ?? undefined,
};
return sanitizeMetadata(metadata);
}
Expand Down
5 changes: 2 additions & 3 deletions packages/eas-cli/src/graphql/generated.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 11 additions & 19 deletions yarn.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit feaedbe

Please sign in to comment.