Skip to content

Commit b30bea0

Browse files
committed
fix: support TypeScript 7 toolchain
Use the native TypeScript 7 compiler for type-checking while retaining the official TypeScript 6 compatibility API for TSLint and ts-loader. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent c821b44 commit b30bea0

5 files changed

Lines changed: 108 additions & 58 deletions

File tree

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ javaDebugger/
2727
### Prerequisites
2828
- [JDK](http://www.oracle.com/technetwork/java/javase/downloads/index.html), (version 11 or later)
2929
- [VS Code](https://code.visualstudio.com/), (version 1.44.0 or later)
30-
- [Node.JS](https://nodejs.org/en/), (>= 12.8.1)
30+
- [Node.JS](https://nodejs.org/en/), (>= 16.20.0)
3131
- [Language Support for Java by Red Hat](https://marketplace.visualstudio.com/items?itemName=redhat.java), (version 0.60.0 or later)
3232

3333
Install all the dependencies using `npm` (supposed to be installed together with [Node.JS](https://nodejs.org/en/)).

package-lock.json

Lines changed: 99 additions & 53 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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1376,7 +1376,7 @@
13761376
},
13771377
"scripts": {
13781378
"vscode:prepublish": "npm run build",
1379-
"compile": "tsc -p . && webpack --config webpack.config.js",
1379+
"compile": "node ./node_modules/@typescript/native/lib/tsc.js -p . && webpack --config webpack.config.js",
13801380
"watch": "webpack --config webpack.config.js --watch",
13811381
"build": "webpack --config webpack.config.js --mode=\"production\"",
13821382
"tslint": "tslint -t verbose --project tsconfig.json",
@@ -1389,11 +1389,12 @@
13891389
"@types/mocha": "^10.0.9",
13901390
"@types/node": "^14.18.63",
13911391
"@types/vscode": "1.95.0",
1392+
"@typescript/native": "npm:typescript@^7.0.2",
13921393
"@vscode/test-electron": "^3.1.0",
13931394
"mocha": "^10.8.2",
13941395
"ts-loader": "^9.6.2",
13951396
"tslint": "^6.1.3",
1396-
"typescript": "^7.0.2",
1397+
"typescript": "npm:@typescript/typescript6@^6.0.2",
13971398
"webpack": "^5.105.0",
13981399
"webpack-cli": "^4.10.0"
13991400
},

test/suite/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT license.
33

4-
import * as glob from "glob";
5-
import * as Mocha from "mocha";
4+
import glob = require("glob");
5+
import Mocha = require("mocha");
66
import * as path from "path";
77

88
export function run(): Promise<void> {

tsconfig.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
"noImplicitReturns": true,
1515
"noUnusedParameters": true,
1616
"strictNullChecks": true,
17+
"strictFunctionTypes": false,
18+
"strictPropertyInitialization": false,
19+
"useUnknownInCatchVariables": false,
1720
"alwaysStrict": true,
1821
"skipLibCheck": true
1922
},

0 commit comments

Comments
 (0)