aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Godbolt <matt@godbolt.org>2023-12-18 20:11:11 -0600
committerGitHub <noreply@github.com>2023-12-18 20:11:11 -0600
commit32ddf75adc1e6bf2557d37384183d28587efcaf9 (patch)
treeca713ff2ed402e60f8df508ddbf49db3915fad61
parent6f073e7cc61867f57c7725b37fc320fd19ff5bce (diff)
downloadcompiler-explorer-gh-9974.tar.gz
compiler-explorer-gh-9974.zip
Update to ts5 (#5879)gh-9974
Co-authored-by: Jeremy <51220084+jeremy-rifkin@users.noreply.github.com>
-rw-r--r--cypress/tsconfig.json2
-rw-r--r--package-lock.json10
-rw-r--r--package.json2
-rw-r--r--test/options-handler.ts9
-rw-r--r--tsconfig.backend.json4
5 files changed, 16 insertions, 11 deletions
diff --git a/cypress/tsconfig.json b/cypress/tsconfig.json
index a80cc3fbe..034bbfcdf 100644
--- a/cypress/tsconfig.json
+++ b/cypress/tsconfig.json
@@ -8,5 +8,7 @@
/* Code generation */
"typeRoots": ["../node_modules/@types"],
"types": ["mocha", "chai", "chai-http"],
+ /* https://github.com/cypress-io/cypress/issues/26203#issuecomment-1571861397 */
+ "sourceMap": false
}
}
diff --git a/package-lock.json b/package-lock.json
index b08ca6e6a..ab6a7ee3e 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -141,7 +141,7 @@
"supervisor": "^0.12.0",
"terser-webpack-plugin": "^5.3.9",
"ts-loader": "^9.5.1",
- "typescript": "^4.9.5",
+ "typescript": "^5.3.3",
"webpack": "^5.89.0",
"webpack-cli": "^5.1.4",
"webpack-dev-middleware": "^6.1.1",
@@ -19101,15 +19101,15 @@
}
},
"node_modules/typescript": {
- "version": "4.9.5",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz",
- "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==",
+ "version": "5.3.3",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz",
+ "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==",
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
- "node": ">=4.2.0"
+ "node": ">=14.17"
}
},
"node_modules/unbox-primitive": {
diff --git a/package.json b/package.json
index 3d281576d..6a02f034e 100644
--- a/package.json
+++ b/package.json
@@ -150,7 +150,7 @@
"supervisor": "^0.12.0",
"terser-webpack-plugin": "^5.3.9",
"ts-loader": "^9.5.1",
- "typescript": "^4.9.5",
+ "typescript": "^5.3.3",
"webpack": "^5.89.0",
"webpack-cli": "^5.1.4",
"webpack-dev-middleware": "^6.1.1",
diff --git a/test/options-handler.ts b/test/options-handler.ts
index 96e21dfa0..5750931c9 100644
--- a/test/options-handler.ts
+++ b/test/options-handler.ts
@@ -141,7 +141,9 @@ const fakeCompilerInfo = (id: string, lang: string, group: string, semver: strin
};
class TestBaseCompiler extends BaseCompiler {
- public override supportedLibraries = super.supportedLibraries;
+ getSupportedLibrariesTest() {
+ return this.supportedLibraries;
+ }
}
describe('Options handler', () => {
@@ -458,7 +460,7 @@ describe('Options handler', () => {
const clientOptions = createClientOptions(libs);
compiler.initialiseLibraries(clientOptions);
- const libNames = _.keys(compiler.supportedLibraries);
+ const libNames = _.keys(compiler.getSupportedLibrariesTest());
libNames.should.deep.equal(['fs', 'someotherlib']);
});
it('can detect libraries from options', () => {
@@ -500,7 +502,8 @@ describe('Options handler', () => {
});
it('should be able to parse basic tools', () => {
class TestBaseTool extends BaseTool {
- public override env = super.env;
+ // TestBaseTool is never instantiated, it's just used to trick ts into thinking this is public
+ public override env = null as any;
}
const tools = optionsHandler.parseTools({fake: optionsProps.tools}) as unknown as Record<
string,
diff --git a/tsconfig.backend.json b/tsconfig.backend.json
index 5cada03ea..f6968e17d 100644
--- a/tsconfig.backend.json
+++ b/tsconfig.backend.json
@@ -6,12 +6,12 @@
"compilerOptions": {
/* Module resolution */
"target": "esnext",
- "module": "esnext",
+ "module": "nodenext",
"moduleResolution": "nodenext",
/* Code generation */
"outDir": "./out/dist",
"typeRoots": ["./node_modules/@types"],
- "types": ["mocha", "chai", "chai-http"],
+ "types": ["mocha", "chai"],
/* Other options */
"allowJs": true
}