From 9eb89a7d737ba90cd8bf2dd916ddf86ab84ea463 Mon Sep 17 00:00:00 2001 From: Quinlan Jung Date: Wed, 13 Nov 2024 14:20:15 -0800 Subject: [PATCH] Temporary Commit at 11/13/2024, 2:20:15 PM --- CHANGELOG.md | 2 ++ packages/eas-cli/src/project/publish.ts | 6 ++-- packages/eas-cli/src/utils/fingerprintCli.ts | 29 ++++++++------------ 3 files changed, 16 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 854d90c5a1..844059307d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ This is the log of notable changes to EAS CLI and related packages. ### ๐ŸŽ‰ New features +- Calculate fingerprint on each update. ([#2687](https://github.com/expo/eas-cli/pull/2687) by [@quinlanj](https://github.com/quinlanj)) + ### ๐Ÿ› Bug fixes ### ๐Ÿงน Chores diff --git a/packages/eas-cli/src/project/publish.ts b/packages/eas-cli/src/project/publish.ts index 1572b457f7..707251c834 100644 --- a/packages/eas-cli/src/project/publish.ts +++ b/packages/eas-cli/src/project/publish.ts @@ -50,7 +50,7 @@ import { truthy } from '../utils/expodash/filter'; import groupBy from '../utils/expodash/groupBy'; import mapMapAsync from '../utils/expodash/mapMapAsync'; import uniqBy from '../utils/expodash/uniqBy'; -import { createFingerprintsByKeyAsync } from '../utils/fingerprintCli'; +import { FingerprintOptions, createFingerprintsByKeyAsync } from '../utils/fingerprintCli'; import { Client } from '../vcs/vcs'; // update publish does not currently support web @@ -908,12 +908,12 @@ export async function maybeCalculateFingerprintForRuntimeVersionInfoObjectsWitho runtimeToPlatformsAndFingerprintInfoAndFingerprintSourceMapping.filter( infoGroup => !infoGroup.fingerprintHash ); - const fingerprintOptionsByRuntimeAndPlatform = new Map(); + const fingerprintOptionsByRuntimeAndPlatform = new Map(); for (const infoGroup of runtimesToComputeFingerprintsFor) { for (const platform of infoGroup.platforms) { const runtimeAndPlatform = `${infoGroup.runtimeVersion}-${platform}`; const options = { - platform, + platforms: [platform], workflow: workflowsByPlatform[platform], projectDir, env, diff --git a/packages/eas-cli/src/utils/fingerprintCli.ts b/packages/eas-cli/src/utils/fingerprintCli.ts index aae893cecf..9dc6b37b31 100644 --- a/packages/eas-cli/src/utils/fingerprintCli.ts +++ b/packages/eas-cli/src/utils/fingerprintCli.ts @@ -5,15 +5,17 @@ import mapMapAsync from './expodash/mapMapAsync'; import Log from '../log'; import { ora } from '../ora'; +export type FingerprintOptions = { + workflow: Workflow; + platforms: string[]; + debug?: boolean; + env: Env | undefined; + cwd?: string; +}; + export async function createFingerprintAsync( projectDir: string, - options: { - workflow: Workflow; - platforms: string[]; - debug?: boolean; - env: Env | undefined; - cwd?: string; - } + options: FingerprintOptions ): Promise<{ hash: string; sources: object[]; @@ -58,13 +60,7 @@ export async function createFingerprintAsync( async function createFingerprintWithoutLoggingAsync( projectDir: string, fingerprintPath: string, - options: { - workflow: Workflow; - platforms: string[]; - debug?: boolean; - env: Env | undefined; - cwd?: string; - } + options: FingerprintOptions ): Promise<{ hash: string; sources: object[]; @@ -99,10 +95,7 @@ async function createFingerprintWithoutLoggingAsync( */ export async function createFingerprintsByKeyAsync( projectDir: string, - fingerprintOptionsByKey: Map< - string, - { workflow: Workflow; platforms: string[]; debug?: boolean; env: Env | undefined } - > + fingerprintOptionsByKey: Map ): Promise< Map< string,