diff --git a/package-lock.json b/package-lock.json index 11d464fcc55..cc42d933cd4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19394,7 +19394,7 @@ }, "engines": { "npm": "^10.1.0", - "vscode": "^1.68.0" + "vscode": "^1.83.0" } }, "packages/core/node_modules/@types/node": { diff --git a/packages/amazonq/.changes/next-release/Removal-c259464a-0437-47e6-be6c-8df023ad477c.json b/packages/amazonq/.changes/next-release/Removal-c259464a-0437-47e6-be6c-8df023ad477c.json new file mode 100644 index 00000000000..a97df091840 --- /dev/null +++ b/packages/amazonq/.changes/next-release/Removal-c259464a-0437-47e6-be6c-8df023ad477c.json @@ -0,0 +1,4 @@ +{ + "type": "Removal", + "description": "Minimum required VSCode version is now 1.83" +} diff --git a/packages/amazonq/package.json b/packages/amazonq/package.json index 5d474ff04b3..7662b0ed006 100644 --- a/packages/amazonq/package.json +++ b/packages/amazonq/package.json @@ -1046,6 +1046,6 @@ }, "engines": { "npm": "^10.1.0", - "vscode": "^1.68.0" + "vscode": "^1.83.0" } } diff --git a/packages/core/package.json b/packages/core/package.json index 74d0eb2011d..c549bbd9e53 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -5,7 +5,7 @@ "license": "Apache-2.0", "engines": { "npm": "^10.1.0", - "vscode": "^1.68.0" + "vscode": "^1.83.0" }, "exports": { ".": "./dist/src/extension.js", diff --git a/packages/core/src/lambda/commands/uploadLambda.ts b/packages/core/src/lambda/commands/uploadLambda.ts index f6af25d983b..fbcc26539d3 100644 --- a/packages/core/src/lambda/commands/uploadLambda.ts +++ b/packages/core/src/lambda/commands/uploadLambda.ts @@ -12,7 +12,7 @@ import AdmZip from 'adm-zip' import * as path from 'path' import { fs } from '../../shared' import { showConfirmationMessage, showViewLogsMessage } from '../../shared/utilities/messages' -import { cloud9Findfile, makeTemporaryToolkitFolder, tryRemoveFolder } from '../../shared/filesystemUtilities' +import { makeTemporaryToolkitFolder, tryRemoveFolder } from '../../shared/filesystemUtilities' import * as localizedText from '../../shared/localizedText' import { getLogger } from '../../shared/logger' import { SamCliBuildInvocation } from '../../shared/sam/cli/samCliBuild' @@ -494,17 +494,15 @@ export async function findApplicationJsonFile( } const isdir = await fs.existsDir(startPath.fsPath) const parentDir = isdir ? startPath.fsPath : path.dirname(startPath.fsPath) - const found = cloud9 - ? await cloud9Findfile(parentDir, '.application.json') - : await vscode.workspace.findFiles( - new vscode.RelativePattern(parentDir, '**/.application.json'), - // exclude: - // - null = NO excludes apply - // - undefined = default excludes apply (e.g. the `files.exclude` setting but not `search.exclude`). - // eslint-disable-next-line unicorn/no-null - null, - 1 - ) + const found = await vscode.workspace.findFiles( + new vscode.RelativePattern(parentDir, '**/.application.json'), + // exclude: + // - null = NO excludes apply + // - undefined = default excludes apply (e.g. the `files.exclude` setting but not `search.exclude`). + // eslint-disable-next-line unicorn/no-null + null, + 1 + ) if (!found || found.length === 0) { getLogger().debug('uploadLambda: .application.json not found in: "%s"', parentDir) } diff --git a/packages/core/src/shared/filesystemUtilities.ts b/packages/core/src/shared/filesystemUtilities.ts index bb3c05d5dd1..c77369813dc 100644 --- a/packages/core/src/shared/filesystemUtilities.ts +++ b/packages/core/src/shared/filesystemUtilities.ts @@ -221,35 +221,6 @@ export async function hasFileWithSuffix(dir: string, suffix: string, exclude?: v return matchedFiles.length > 0 } -/** - * TEMPORARY SHIM for vscode.workspace.findFiles() on Cloud9. - * - * @param dir Directory to search - * @param fileName Name of file to locate - * @returns List of one or zero Uris (for compat with vscode.workspace.findFiles()) - */ -export async function cloud9Findfile(dir: string, fileName: string): Promise { - getLogger().debug('cloud9Findfile: %s', dir) - const files = await fs.readdir(dir) - const subDirs: vscode.Uri[] = [] - for (const file of files) { - const [currentFileName] = file - const filePath = path.join(dir, currentFileName) - if (filePath === path.join(dir, fileName)) { - return [vscode.Uri.file(filePath)] - } - if (await fs.existsDir(filePath)) { - subDirs.push(vscode.Uri.file(filePath)) - } - } - for (const d of subDirs) { - const found = await cloud9Findfile(d.fsPath, fileName) - if (found.length > 0) { - return found - } - } - return [] -} /** * @returns A string path to the last locally stored download location. If none, returns the users 'Downloads' directory path. */ diff --git a/packages/core/src/test/credentials/auth.test.ts b/packages/core/src/test/credentials/auth.test.ts index 013022e6101..022e2c5c6e7 100644 --- a/packages/core/src/test/credentials/auth.test.ts +++ b/packages/core/src/test/credentials/auth.test.ts @@ -19,7 +19,6 @@ import { UserCredentialsUtils } from '../../shared/credentials/userCredentialsUt import { getCredentialsFilename } from '../../auth/credentials/sharedCredentialsFile' import { Connection, isIamConnection, isSsoConnection, scopesSsoAccountAccess } from '../../auth/connection' import { AuthNode, createDeleteConnectionButton, promptForConnection } from '../../auth/utils' -import { isMinVscode } from '../../shared/vscode/env' const ssoProfile = createSsoProfile() const scopedSsoProfile = createSsoProfile({ scopes: ['foo'] }) @@ -586,10 +585,6 @@ describe('Auth', function () { }) it('reauthenticates a connection if the user selects an expired one', async function () { - if (isMinVscode('1.83.0')) { - this.skip() - } - getTestWindow().onDidShowQuickPick(async (picker) => { await picker.untilReady() const connItem = picker.findItemOrThrow(/IAM Identity Center/) diff --git a/packages/core/src/test/shared/vscode/runCommand.test.ts b/packages/core/src/test/shared/vscode/runCommand.test.ts index c72752befc9..52a7bccb69a 100644 --- a/packages/core/src/test/shared/vscode/runCommand.test.ts +++ b/packages/core/src/test/shared/vscode/runCommand.test.ts @@ -17,7 +17,6 @@ import { assertTelemetry, getMetrics, installFakeClock } from '../../testUtil' import { getTestWindow } from '../../shared/vscode/window' import { makeTemporaryToolkitFolder } from '../../../shared' import path from 'path' -import * as env from '../../../shared/vscode/env' import { fakeErrorChain, getAwsServiceError } from '../errors.test' async function throwMe(errorOrFn?: Error | (() => Promise)): Promise { @@ -104,10 +103,6 @@ describe('runCommand', function () { } it('vscode ISDIR', async function () { - if (env.isMinVscode('1.83.0')) { - this.skip() - } - const pat = (() => { switch (os.platform()) { case 'win32': diff --git a/packages/core/src/test/techdebt.test.ts b/packages/core/src/test/techdebt.test.ts index d83a8d68c85..43a2d180f59 100644 --- a/packages/core/src/test/techdebt.test.ts +++ b/packages/core/src/test/techdebt.test.ts @@ -18,16 +18,7 @@ describe('tech debt', function () { it('vscode minimum version', async function () { const minVscode = env.getMinVscodeVersion() - - assert.ok( - semver.lt(minVscode, '1.75.0'), - 'remove filesystemUtilities.findFile(), use vscode.workspace.findFiles() instead (after Cloud9 VFS fixes bug)' - ) - - assert.ok( - semver.lt(minVscode, '1.75.0'), - 'remove AsyncLocalStorage polyfill used in `spans.ts` if Cloud9 is on node 14+' - ) + assert.ok(semver.lt(minVscode, '1.84.0')) // see https://github.com/microsoft/vscode/issues/173861 assert.ok( diff --git a/packages/toolkit/.changes/next-release/Breaking Change-91df9fbf-ea4b-4087-b43f-77f35253c525.json b/packages/toolkit/.changes/next-release/Breaking Change-91df9fbf-ea4b-4087-b43f-77f35253c525.json new file mode 100644 index 00000000000..205db3ae630 --- /dev/null +++ b/packages/toolkit/.changes/next-release/Breaking Change-91df9fbf-ea4b-4087-b43f-77f35253c525.json @@ -0,0 +1,4 @@ +{ + "type": "Breaking Change", + "description": "Bumping VS Code minimum version to 1.83.0" +} diff --git a/packages/toolkit/.changes/next-release/Removal-cf2f67d7-fd40-4834-960c-bbd57508a7f4.json b/packages/toolkit/.changes/next-release/Removal-cf2f67d7-fd40-4834-960c-bbd57508a7f4.json new file mode 100644 index 00000000000..a97df091840 --- /dev/null +++ b/packages/toolkit/.changes/next-release/Removal-cf2f67d7-fd40-4834-960c-bbd57508a7f4.json @@ -0,0 +1,4 @@ +{ + "type": "Removal", + "description": "Minimum required VSCode version is now 1.83" +} diff --git a/packages/toolkit/package.json b/packages/toolkit/package.json index 5d2fe80b1f4..3e957178a01 100644 --- a/packages/toolkit/package.json +++ b/packages/toolkit/package.json @@ -53,7 +53,7 @@ "browser": "./dist/src/extensionWeb", "engines": { "npm": "^10.1.0", - "vscode": "^1.68.0" + "vscode": "^1.83.0" }, "scripts": { "vscode:prepublish": "npm run clean && npm run buildScripts && webpack --mode production",