Skip to content

Commit 342bff4

Browse files
authored
build(deps): bump typescript to 5.0.4 (#3353)
1 parent 74f20e2 commit 342bff4

File tree

8 files changed

+223
-122
lines changed

8 files changed

+223
-122
lines changed

package-lock.json

Lines changed: 207 additions & 106 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3483,8 +3483,8 @@
34833483
"@types/vscode": "1.50.0",
34843484
"@types/vscode-webview": "^1.57.1",
34853485
"@types/xml2js": "^0.4.8",
3486-
"@typescript-eslint/eslint-plugin": "^5.38.0",
3487-
"@typescript-eslint/parser": "^5.38.0",
3486+
"@typescript-eslint/eslint-plugin": "^5.59.0",
3487+
"@typescript-eslint/parser": "^5.59.0",
34883488
"@vscode/codicons": "^0.0.32",
34893489
"@vscode/test-electron": "^2.2.3",
34903490
"@vue/compiler-sfc": "^3.2.40",
@@ -3548,7 +3548,7 @@
35483548
"semver": "^7.3.5",
35493549
"strip-ansi": "^5.2.0",
35503550
"tcp-port-used": "^1.0.1",
3551-
"typescript": "^4.8.4",
3551+
"typescript": "^5.0.4",
35523552
"uuid": "^8.3.2",
35533553
"vscode-languageclient": "^6.1.4",
35543554
"vscode-languageserver": "^6.1.1",

src/apprunner/wizards/apprunnerCreateServiceWizard.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const validateName = (name: string) => {
3939
)
4040
}
4141

42-
let matches = name.match(badNameRegExp)
42+
let matches: string[] | undefined = name.match(badNameRegExp) ?? undefined
4343
if (name[0] === '_' || name[0] === '-') {
4444
matches = matches ? [name[0]].concat(matches) : [name[0]]
4545
}

src/codewhisperer/util/dependencyGraph/javaDependencyGraph.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export class JavaDependencyGraph extends DependencyGraph {
9393
return packagePath
9494
}
9595

96-
private generateBuildFileRelativePath(uri: vscode.Uri, projectPath: string, pacakges: RegExpMatchArray) {
96+
private generateBuildFileRelativePath(uri: vscode.Uri, projectPath: string, pacakges: string[]) {
9797
const packagePath = pacakges.length > 0 ? this.generatePackagePath(pacakges[0]) : ''
9898
const sourceFilePath = uri.fsPath
9999
if (!sourceFilePath.startsWith(projectPath)) {

src/shared/utilities/tsUtils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ export function isNonNullable<T>(obj: T): obj is NonNullable<T> {
4242
return obj !== undefined && obj !== null
4343
}
4444

45-
export function isKeyOf<T>(key: PropertyKey, obj: T): key is keyof T {
45+
export function isKeyOf<T extends object>(key: PropertyKey, obj: T): key is keyof T {
4646
return key in obj
4747
}
4848

49-
export function hasKey<T, K extends PropertyKey>(obj: T, key: K): obj is T & { [P in K]: unknown } {
49+
export function hasKey<T extends object, K extends PropertyKey>(obj: T, key: K): obj is T & { [P in K]: unknown } {
5050
return isKeyOf(key, obj)
5151
}
5252

src/test/codecatalyst/devfileLocation.test.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import * as vscode from 'vscode'
88
import { getDevfileLocation } from '../../codecatalyst/model'
99
import { DevEnvClient } from '../../shared/clients/devenvClient'
1010
import * as sinon from 'sinon'
11-
const fileSystemUtils = require('../../shared/filesystemUtilities')
11+
import * as fileSystemUtils from '../../shared/filesystemUtilities'
1212

1313
describe('getDevfileLocation', function () {
1414
let sandbox: sinon.SinonSandbox
@@ -47,7 +47,7 @@ describe('getDevfileLocation', function () {
4747

4848
it('devfile without repo found in workspace root', async function () {
4949
const devfilePath = vscode.Uri.parse('/projects/WebApplication/devfile.yaml').fsPath
50-
sandbox.stub(fileSystemUtils, 'fileExists').callsFake(function (p: string) {
50+
sandbox.stub(fileSystemUtils, 'fileExists').callsFake(async function (p: string) {
5151
return p === devfilePath
5252
})
5353
const client = mockClient('devfile.yaml')
@@ -57,7 +57,7 @@ describe('getDevfileLocation', function () {
5757

5858
it('devfile found in subfolder with repo', async function () {
5959
const devfilePath = vscode.Uri.parse('/projects/WebApplication/devfile.yaml').fsPath
60-
sandbox.stub(fileSystemUtils, 'fileExists').callsFake(function (p: string) {
60+
sandbox.stub(fileSystemUtils, 'fileExists').callsFake(async function (p: string) {
6161
return p === devfilePath
6262
})
6363
const client = mockClient('WebApplication/devfile.yaml')
@@ -74,7 +74,7 @@ describe('getDevfileLocation', function () {
7474

7575
it('falls back to default projects location when devfile cannot be located', async function () {
7676
const devfilePath = vscode.Uri.parse('/projects/devfile.yaml').fsPath
77-
sandbox.stub(fileSystemUtils, 'fileExists').callsFake(function (p: string) {
77+
sandbox.stub(fileSystemUtils, 'fileExists').callsFake(async function (p: string) {
7878
return p === devfilePath
7979
})
8080
const client = mockClient('WebApplication/devfile.yaml')
@@ -84,7 +84,7 @@ describe('getDevfileLocation', function () {
8484

8585
it('falls back to default workspace location when devfile cannot be located', async function () {
8686
const devfilePath = vscode.Uri.parse('/projects/WebApplication/devfile.yaml').fsPath
87-
sandbox.stub(fileSystemUtils, 'fileExists').callsFake(function (p: string) {
87+
sandbox.stub(fileSystemUtils, 'fileExists').callsFake(async function (p: string) {
8888
return p === devfilePath
8989
})
9090
const client = mockClient('devfile.yaml')
@@ -94,7 +94,7 @@ describe('getDevfileLocation', function () {
9494

9595
it('checks project root for devfile when location isnt specified', async function () {
9696
const devfilePath = vscode.Uri.parse('/projects/devfile.yaml').fsPath
97-
sandbox.stub(fileSystemUtils, 'fileExists').callsFake(function (p: string) {
97+
sandbox.stub(fileSystemUtils, 'fileExists').callsFake(async function (p: string) {
9898
return p === devfilePath
9999
})
100100
const client = mockClient(undefined)
@@ -104,7 +104,7 @@ describe('getDevfileLocation', function () {
104104

105105
it('checks workspace root for devfile when location isnt specified', async function () {
106106
const devfilePath = vscode.Uri.parse('/projects/WebApplication/devfile.yaml').fsPath
107-
sandbox.stub(fileSystemUtils, 'fileExists').callsFake(function (p: string) {
107+
sandbox.stub(fileSystemUtils, 'fileExists').callsFake(async function (p: string) {
108108
return p === devfilePath
109109
})
110110
const client = mockClient(undefined)

src/test/credentials/provider/sharedCredentialsProvider.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ describe('SharedCredentialsProvider', async function () {
409409
): Promise<void> {
410410
const makeIni = sandbox.stub(sut as any, 'makeSharedIniFileCredentialsProvider').callsFake(profile => {
411411
// The SDK does not care if fields are undefined, but we need to remove them to test
412-
stripUndefined(profile)
412+
stripUndefined(profile as any)
413413
assert.deepStrictEqual(profile, resolvedProfile)
414414
return () => Promise.resolve({})
415415
})

src/test/setupUtil.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export function setRunnableTimeout(test: Mocha.Runnable, maxTestDuration: number
2323

2424
// The timeout duration is stored within the function itself, allowing
2525
// us to know if we've already added a timeout
26-
if (!hasKey(test.fn, runnableTimeout)) {
26+
if (!hasKey(testFn, runnableTimeout)) {
2727
const fn = function (this: Mocha.Context, done: Mocha.Done) {
2828
const maxTestDuration = (fn as any)[runnableTimeout] as number
2929

0 commit comments

Comments
 (0)