From 588753c24c9c2dc06e0125f9d7863ae289245ca1 Mon Sep 17 00:00:00 2001 From: Szymon Rybczak Date: Mon, 7 Aug 2023 15:37:35 +0200 Subject: [PATCH] feat: update doctor to reflect Java >= 17 (#2045) * feat: update doctor to reflect Java >= 17 * test: update tests --- .../src/tools/healthchecks/__tests__/jdk.test.ts | 10 +++++----- packages/cli-doctor/src/tools/versionRanges.ts | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/cli-doctor/src/tools/healthchecks/__tests__/jdk.test.ts b/packages/cli-doctor/src/tools/healthchecks/__tests__/jdk.test.ts index c1d8877c2..e01e3d135 100644 --- a/packages/cli-doctor/src/tools/healthchecks/__tests__/jdk.test.ts +++ b/packages/cli-doctor/src/tools/healthchecks/__tests__/jdk.test.ts @@ -35,17 +35,17 @@ describe('jdk', () => { expect(diagnostics.needsToBeFixed).toBe(true); }); - it('returns false if JDK version is in range (JDK [11-18] version number format)', async () => { + it('returns false if JDK version is in range (JDK [17-20] version number format)', async () => { // @ts-ignore environmentInfo.Languages.Java = { - version: '14.0.4', + version: '17.0.8', }; const diagnostics = await jdk.getDiagnostics(environmentInfo); expect(diagnostics.needsToBeFixed).toBe(false); }); - it('returns true if JDK version is not in range (JDK < 11 version number format)', async () => { + it('returns true if JDK version is not in range (JDK < 17 version number format)', async () => { // @ts-ignore environmentInfo.Languages.Java = { version: '1.8.0_282', @@ -55,10 +55,10 @@ describe('jdk', () => { expect(diagnostics.needsToBeFixed).toBe(true); }); - it('returns true if JDK version is not in range (JDK > 18 version number format)', async () => { + it('returns true if JDK version is not in range (JDK > 20 version number format)', async () => { // @ts-ignore environmentInfo.Languages.Java = { - version: '19.0.1', + version: '21.0.1', }; const diagnostics = await jdk.getDiagnostics(environmentInfo); diff --git a/packages/cli-doctor/src/tools/versionRanges.ts b/packages/cli-doctor/src/tools/versionRanges.ts index b8f37cb21..27e7006e6 100644 --- a/packages/cli-doctor/src/tools/versionRanges.ts +++ b/packages/cli-doctor/src/tools/versionRanges.ts @@ -4,7 +4,7 @@ export default { YARN: '>= 1.10.x', NPM: '>= 4.x', RUBY: '>= 2.6.10', - JAVA: '>= 11 < 19', + JAVA: '>= 17 <= 20', // Android ANDROID_SDK: '>= 33.x', ANDROID_NDK: '>= 23.x',