From 7ddd630cfdfb2d8fd4a1dcefbe985a1444f83cf7 Mon Sep 17 00:00:00 2001 From: Piotr Szeremeta Date: Mon, 18 Sep 2023 08:28:39 +0200 Subject: [PATCH 1/2] [FIX] Remove semver validation from node version read from .nvmrc (#2052) * [FIX] Remove semver validation from node version read from .nvmrc Node version can be specified as an alias (such as `iojs`, `lts/hydrogen` etc), so validating it as semver may cause errors for some users. * update CHANGELOG.md --- CHANGELOG.md | 2 ++ packages/eas-cli/src/utils/profiles.ts | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b820ddab8..981e17b2bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ This is the log of notable changes to EAS CLI and related packages. ### ๐Ÿ› Bug fixes +- Support node aliases in .nvmrc. ([#2052](https://github.com/expo/eas-cli/pull/2052) by [@khamilowicz](https://github.com/khamilowicz)) + ### ๐Ÿงน Chores - Rollouts: more robust printing function. ([#2047](https://github.com/expo/eas-cli/pull/2047) by [@quinlanj](https://github.com/quinlanj)) diff --git a/packages/eas-cli/src/utils/profiles.ts b/packages/eas-cli/src/utils/profiles.ts index 4d97830184..6b2f15ae04 100644 --- a/packages/eas-cli/src/utils/profiles.ts +++ b/packages/eas-cli/src/utils/profiles.ts @@ -8,7 +8,6 @@ import { } from '@expo/eas-json'; import fs from 'fs-extra'; import path from 'path'; -import semver from 'semver'; import Log, { learnMore } from '../log'; @@ -83,9 +82,6 @@ async function getNodeVersionFromFileAsync(projectDir: string): Promise Date: Mon, 18 Sep 2023 10:26:36 +0200 Subject: [PATCH 2/2] fix tests --- packages/eas-cli/src/channel/__tests__/print-utils-test.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/eas-cli/src/channel/__tests__/print-utils-test.ts b/packages/eas-cli/src/channel/__tests__/print-utils-test.ts index 9e07d55f69..7776bafdfb 100644 --- a/packages/eas-cli/src/channel/__tests__/print-utils-test.ts +++ b/packages/eas-cli/src/channel/__tests__/print-utils-test.ts @@ -1,3 +1,5 @@ +import { format } from '@expo/timeago.js'; + import { getAlwaysTrueBranchMapping, getEmptyBranchMapping } from '../branch-mapping'; import { getDescriptionByBranchId } from '../print-utils'; import { testChannelObject, testUpdateBranch1, testUpdateBranch2 } from './fixtures'; @@ -13,11 +15,12 @@ describe(getDescriptionByBranchId, () => { codeSigningKey: undefined, group: '16ca6dba-e63b-48b0-baa3-15a894ee9434', isRollBackToEmbedded: false, - message: '"fix bug" (1 month ago by quintest113)', + message: `"fix bug" (${format('2023-07-17T22:48:59.278Z', 'en_US')} by quintest113)`, platforms: 'android, ios', runtimeVersion: 'exposdk:48.0.0', }, }); + expect(descriptionByBranchId[testUpdateBranch2.id]).toEqual({ branch: 'production', branchRolloutPercentage: 85, @@ -25,7 +28,7 @@ describe(getDescriptionByBranchId, () => { codeSigningKey: undefined, group: 'e40ad156-e9af-4cc2-8e9d-c7b5c328db48', isRollBackToEmbedded: false, - message: '"fix bug" (2 months ago by quintest113)', + message: `"fix bug" (${format('2023-06-23T23:37:10.004Z', 'en_US')} by quintest113)`, platforms: 'android, ios', runtimeVersion: 'exposdk:48.0.0', },