Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "Removal",
"description": "Minimum required VSCode version is now 1.83"
}
2 changes: 1 addition & 1 deletion packages/amazonq/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1046,6 +1046,6 @@
},
"engines": {
"npm": "^10.1.0",
"vscode": "^1.68.0"
"vscode": "^1.83.0"
}
}
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
22 changes: 10 additions & 12 deletions packages/core/src/lambda/commands/uploadLambda.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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)
}
Expand Down
29 changes: 0 additions & 29 deletions packages/core/src/shared/filesystemUtilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<vscode.Uri[]> {
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.
*/
Expand Down
5 changes: 0 additions & 5 deletions packages/core/src/test/credentials/auth.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'] })
Expand Down Expand Up @@ -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/)
Expand Down
5 changes: 0 additions & 5 deletions packages/core/src/test/shared/vscode/runCommand.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<never>)): Promise<void | never> {
Expand Down Expand Up @@ -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':
Expand Down
11 changes: 1 addition & 10 deletions packages/core/src/test/techdebt.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "Breaking Change",
"description": "Bumping VS Code minimum version to 1.83.0"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "Removal",
"description": "Minimum required VSCode version is now 1.83"
}
2 changes: 1 addition & 1 deletion packages/toolkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading