From 219c660caf75eecc4de680d5d344ce24892efd89 Mon Sep 17 00:00:00 2001 From: "Andrew W. Harn" Date: Tue, 17 Oct 2023 15:45:27 +0000 Subject: [PATCH 1/2] Update Node versions Signed-off-by: Andrew W. Harn --- .github/workflows/secrets-sdk-publish.yml | 2 +- .github/workflows/secrets-sdk.yml | 4 ++-- .github/workflows/zowe-cli.yml | 7 +++---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/secrets-sdk-publish.yml b/.github/workflows/secrets-sdk-publish.yml index 8877dc5863..b157db3156 100644 --- a/.github/workflows/secrets-sdk-publish.yml +++ b/.github/workflows/secrets-sdk-publish.yml @@ -15,7 +15,7 @@ jobs: - name: Setup node uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 check-latest: true cache: npm - name: Install dependencies diff --git a/.github/workflows/secrets-sdk.yml b/.github/workflows/secrets-sdk.yml index 4cef21b3bc..097ab981a4 100644 --- a/.github/workflows/secrets-sdk.yml +++ b/.github/workflows/secrets-sdk.yml @@ -90,7 +90,7 @@ jobs: - host: windows-latest target: aarch64-pc-windows-msvc build: npm run build -- --target aarch64-pc-windows-msvc - name: stable - ${{ matrix.settings.target }} - node@16 + name: stable - ${{ matrix.settings.target }} - node@18 runs-on: ${{ matrix.settings.host }} steps: - uses: actions/checkout@v3 @@ -224,8 +224,8 @@ jobs: target: armv7-unknown-linux-gnueabihf platform: linux/arm/v7 node: - - "16" - "18" + - "20" runs-on: ${{ matrix.settings.host }} steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/zowe-cli.yml b/.github/workflows/zowe-cli.yml index 428bb0a42c..b235c8fdc5 100644 --- a/.github/workflows/zowe-cli.yml +++ b/.github/workflows/zowe-cli.yml @@ -30,7 +30,7 @@ jobs: strategy: fail-fast: false matrix: - node-version: [16.x, 18.x] + node-version: [18.x, 20.x] os: [windows-latest, ubuntu-latest, macos-latest] env: @@ -182,11 +182,10 @@ jobs: persist-credentials: false ref: ${{ github.ref }} - # Use Node 16 until npm@9 bundled with Node 18 becomes more stable - - name: Use Node.js 16 + - name: Use Node.js 18 uses: actions/setup-node@v3 with: - node-version: '16' + node-version: '18' - name: Install Dependencies run: npm ci From 52eabe7abcd1700a2d7a9638cd3df68ff1a7715e Mon Sep 17 00:00:00 2001 From: "Andrew W. Harn" Date: Tue, 17 Oct 2023 15:45:40 +0000 Subject: [PATCH 2/2] Use legacy fake timers Signed-off-by: Andrew W. Harn --- .gitignore | 2 +- packages/core/__tests__/utils/__unit__/CoreUtils.unit.test.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 7620b9b638..a5c9d970ab 100644 --- a/.gitignore +++ b/.gitignore @@ -71,7 +71,7 @@ typings/ /config/ **/docs/typedoc/ __tests__/__results__/ -packages/zosunix/__tests__/__results__/ +packages/**/__tests__/__results__/ /__tests__/tmpproj/ /__tests__/src/locales /.nyc_output diff --git a/packages/core/__tests__/utils/__unit__/CoreUtils.unit.test.ts b/packages/core/__tests__/utils/__unit__/CoreUtils.unit.test.ts index 12e1458af5..e238ee2df1 100644 --- a/packages/core/__tests__/utils/__unit__/CoreUtils.unit.test.ts +++ b/packages/core/__tests__/utils/__unit__/CoreUtils.unit.test.ts @@ -306,7 +306,7 @@ describe("CoreUtils", () => { it("should sleep the default amount", async () => { const defaultSleepTime = 1000; - jest.useFakeTimers(); + jest.useFakeTimers({legacyFakeTimers: true}); jest.spyOn(global, "setTimeout"); const waitForSleep = CoreUtils.sleep(); @@ -324,7 +324,7 @@ describe("CoreUtils", () => { it("should sleep for the specified amount", async () => { const specifiedTime = 5000; - jest.useFakeTimers(); + jest.useFakeTimers({legacyFakeTimers: true}); jest.spyOn(global, "setTimeout"); const waitForSleep = CoreUtils.sleep(specifiedTime);