Skip to content

Commit 84a8c02

Browse files
committed
Fix: Update to TypeScript 6.0.
Update 3rd party dependencies.
1 parent 9538af5 commit 84a8c02

11 files changed

Lines changed: 72 additions & 37 deletions

File tree

client/eslint.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended"
2222
import eslint from "@eslint/js";
2323
import { defineConfig } from "eslint/config";
2424
import tseslint from "typescript-eslint";
25+
import globals from "globals";
2526

2627
export default defineConfig(
2728
eslint.configs.recommended,
@@ -34,6 +35,11 @@ export default defineConfig(
3435
},
3536
{
3637
name: "local",
38+
languageOptions: {
39+
globals: {
40+
...globals.browser
41+
}
42+
},
3743
rules: {
3844
"no-unused-vars": "off",
3945
"@typescript-eslint/no-unused-vars": [

client/package.json5

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -45,53 +45,54 @@
4545
type: 'module',
4646
version: '0.1.51',
4747
dependencies: {
48-
'@codemirror/commands': '^6.10.2',
48+
'@codemirror/commands': '^6.10.3',
4949
'@codemirror/lang-cpp': '^6.0.3',
5050
'@codemirror/lang-css': '^6.3.1',
5151
'@codemirror/lang-go': '^6.0.1',
5252
'@codemirror/lang-html': '^6.4.11',
5353
'@codemirror/lang-java': '^6.0.2',
54-
'@codemirror/lang-javascript': '^6.2.4',
54+
'@codemirror/lang-javascript': '^6.2.5',
5555
'@codemirror/lang-json': '^6.0.2',
5656
'@codemirror/lang-markdown': '^6.5.0',
5757
'@codemirror/lang-php': '^6.0.2',
5858
'@codemirror/lang-python': '^6.2.1',
5959
'@codemirror/lang-rust': '^6.0.2',
6060
'@codemirror/lang-sql': '^6.10.0',
6161
'@codemirror/lang-xml': '^6.1.0',
62-
'@codemirror/lang-yaml': '^6.1.2',
63-
'@codemirror/state': '^6.5.4',
62+
'@codemirror/lang-yaml': '^6.1.3',
63+
'@codemirror/state': '^6.6.0',
6464
'@codemirror/view': '6.38.8',
65-
'@hpcc-js/wasm-graphviz': '^1.21.0',
66-
'@mathjax/mathjax-newcm-font': '^4.1.0',
65+
'@hpcc-js/wasm-graphviz': '^1.21.2',
66+
'@mathjax/mathjax-newcm-font': '^4.1.1',
6767
codemirror: '^6.0.2',
68-
mathjax: '^4.1.0',
69-
mermaid: '^11.12.3',
70-
'npm-check-updates': '^19.3.2',
68+
mathjax: '^4.1.1',
69+
mermaid: '^11.13.0',
70+
'npm-check-updates': '^19.6.5',
7171
'pdfjs-dist': '5.4.624',
7272
tinymce: '^8.3.2',
7373
'toastify-js': '^1.12.0',
7474
},
7575
devDependencies: {
7676
'@eslint/js': '^10.0.1',
7777
'@types/chai': '^5.2.3',
78-
'@types/dom-navigation': '^1.0.6',
78+
'@types/dom-navigation': '^1.0.7',
7979
'@types/js-beautify': '^1.14.3',
8080
'@types/mocha': '^10.0.10',
81-
'@types/node': '^24.10.13',
81+
'@types/node': '^24.12.0',
8282
'@types/toastify-js': '^1.12.4',
83-
'@typescript-eslint/eslint-plugin': '^8.56.0',
84-
'@typescript-eslint/parser': '^8.56.0',
83+
'@typescript-eslint/eslint-plugin': '^8.57.2',
84+
'@typescript-eslint/parser': '^8.57.2',
8585
chai: '^6.2.2',
86-
esbuild: '^0.27.3',
87-
eslint: '^10.0.0',
86+
esbuild: '^0.27.4',
87+
eslint: '^10.1.0',
8888
'eslint-config-prettier': '^10.1.8',
8989
'eslint-plugin-import': '^2.32.0',
9090
'eslint-plugin-prettier': '^5.5.5',
91+
globals: '^17.4.0',
9192
mocha: '^11.7.5',
9293
prettier: '^3.8.1',
93-
typescript: '^5.9.3',
94-
'typescript-eslint': '^8.56.0',
94+
typescript: '^6.0.2',
95+
'typescript-eslint': '^8.57.2',
9596
},
9697
scripts: {
9798
test: 'echo "Error: no test specified" && exit 1',

client/src/CodeChatEditor.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
// ### JavaScript/TypeScript
4545
//
4646
// #### Third-party
47-
import "./third-party/wc-mermaid/wc-mermaid";
47+
import "./third-party/wc-mermaid/wc-mermaid.js";
4848

4949
// #### Local
5050
import { assert } from "./assert.mjs";
@@ -58,7 +58,7 @@ import {
5858
scroll_to_line as codemirror_scroll_to_line,
5959
set_CodeMirror_positions,
6060
} from "./CodeMirror-integration.mjs";
61-
import "./graphviz-webcomponent-setup.mts";
61+
import "./graphviz-webcomponent-setup.mjs";
6262
// This must be imported *after* the previous setup import, so it's placed here,
6363
// instead of in the third-party category above.
6464
import "./third-party/graphviz-webcomponent/graph.js";

client/src/global.d.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Copyright (C) 2025 Bryan A. Jones.
2+
//
3+
// This file is part of the CodeChat Editor. The CodeChat Editor is free
4+
// software: you can redistribute it and/or modify it under the terms of the GNU
5+
// General Public License as published by the Free Software Foundation, either
6+
// version 3 of the License, or (at your option) any later version.
7+
//
8+
// The CodeChat Editor is distributed in the hope that it will be useful, but
9+
// WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10+
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
11+
// details.
12+
//
13+
// You should have received a copy of the GNU General Public License along with
14+
// the CodeChat Editor. If not, see
15+
// [http://www.gnu.org/licenses](http://www.gnu.org/licenses).
16+
//
17+
// `global.d.ts` -- Global type definitions
18+
// =============================================================================
19+
//
20+
// Copied from the [TypeScript Docs](https://www.typescriptlang.org/tsconfig/#noUncheckedSideEffectImports):
21+
//
22+
// Recognize all CSS files as module imports.
23+
declare module "*.css" {}

client/src/graphviz-webcomponent-setup.mts renamed to client/src/graphviz-webcomponent-setup.mjs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424
// Note that this must be in a separate module which is imported before the
2525
// graphviz webcomponent; see the
2626
// [ESBuild docs](https://esbuild.github.io/content-types/#real-esm-imports).
27-
/*eslint-disable-next-line @typescript-eslint/no-explicit-any */
28-
(window as any).graphvizWebComponent = {
27+
window.graphvizWebComponent = {
2928
rendererUrl: "/static/bundled/renderer.js",
3029
delayWorkerLoading: true,
3130
};

client/src/shared_types.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// the CodeChat Editor. If not, see
1515
// [http://www.gnu.org/licenses](http://www.gnu.org/licenses).
1616
//
17-
// `shared_types.mts` -- Shared type definitionsz
17+
// `shared_types.mts` -- Shared type definitions
1818
// =============================================================================
1919
//
2020
// The time, in ms, to wait between the last user edit and sending updated data

client/tsconfig.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,12 @@
2929
// see also
3030
// [the TypeScript docs](https://www.typescriptlang.org/tsconfig#isolatedModules).
3131
"isolatedModules": true,
32-
"module": "nodenext",
32+
"module": "esnext",
3333
"outDir": "out",
34-
"rootDir": "src",
35-
"strict": true
34+
"rootDir": "./src",
35+
"strict": true,
36+
// Starting in TypeScript 6.0, no ambient type packages are auto-included. Add these explicitly. See the [TypeScript 5.x to 6.0 Migration Guide](https://gist.github.com/privatenumber/3d2e80da28f84ee30b77d53e1693378f#16-types-defaults-to-).
37+
"types": ["node", "mocha"]
3638
},
3739
"exclude": ["node_modules", "static", "HashReader.js", "eslint.config.js"]
3840
}

extensions/VSCode/package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,29 +80,29 @@
8080
"escape-html": "^1.0.3"
8181
},
8282
"devDependencies": {
83-
"@emnapi/core": "^1.8.1",
84-
"@emnapi/runtime": "^1.8.1",
83+
"@emnapi/core": "^1.9.1",
84+
"@emnapi/runtime": "^1.9.1",
8585
"@eslint/js": "^10.0.1",
8686
"@napi-rs/cli": "^3.5.1",
8787
"@tybys/wasm-util": "^0.10.1",
8888
"@types/escape-html": "^1.0.4",
89-
"@types/node": "^24.10.13",
89+
"@types/node": "^24.12.0",
9090
"@types/vscode": "1.61.0",
91-
"@typescript-eslint/eslint-plugin": "^8.56.0",
92-
"@typescript-eslint/parser": "^8.56.0",
91+
"@typescript-eslint/eslint-plugin": "^8.57.2",
92+
"@typescript-eslint/parser": "^8.57.2",
9393
"@vscode/vsce": "^3.7.1",
9494
"chalk": "^5.6.2",
95-
"esbuild": "^0.27.3",
96-
"eslint": "^10.0.0",
95+
"esbuild": "^0.27.4",
96+
"eslint": "^10.1.0",
9797
"eslint-config-prettier": "^10.1.8",
9898
"eslint-plugin-import": "^2.32.0",
9999
"eslint-plugin-node": "^11.1.0",
100100
"eslint-plugin-prettier": "^5.5.5",
101101
"npm-run-all2": "^8.0.4",
102102
"ovsx": "^0.10.9",
103103
"prettier": "^3.8.1",
104-
"typescript": "^5.9.3",
105-
"typescript-eslint": "^8.56.0"
104+
"typescript": "^6.0.2",
105+
"typescript-eslint": "^8.57.2"
106106
},
107107
"optionalDependencies": {
108108
"bufferutil": "^4.1.0"

extensions/VSCode/tsconfig.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
"sourceMap": true,
2525
"strict": true,
2626
"rootDirs": ["src", "../../client/src/*"],
27+
"rootDir": "../..",
28+
// Starting in TypeScript 6.0, no ambient type packages are auto-included. Add these explicitly. See the [TypeScript 5.x to 6.0 Migration Guide](https://gist.github.com/privatenumber/3d2e80da28f84ee30b77d53e1693378f#16-types-defaults-to-).
29+
"types": ["node"],
2730
"allowJs": true
2831
},
2932
"exclude": ["node_modules", ".vscode-test", "out", "server", "eslint.config.js"]

server/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ anyhow = "1.0.100"
6262
bytes = { version = "1", features = ["serde"] }
6363
chrono = "0.4"
6464
clap = { version = "4", features = ["derive"] }
65-
dprint-plugin-markdown = { git = "https://github.com/bjones1/dprint-plugin-markdown.git", branch = "all-fixes", version = "0.20.0" }
65+
dprint-plugin-markdown = { git = "https://github.com/bjones1/dprint-plugin-markdown.git", branch = "all-fixes", version = "0.21.0" }
6666
dunce = "1.0.5"
6767
futures-util = "0.3.29"
6868
htmd = { git = "https://github.com/bjones1/htmd.git", branch = "dom-interface", version = "0.5" }
@@ -115,7 +115,7 @@ futures = "0.3.31"
115115
predicates = "3.1.2"
116116
pretty_assertions = "1.4.1"
117117
thirtyfour = { git = "https://github.com/bjones1/thirtyfour.git", branch = "selenium_manager" }
118-
tokio-tungstenite = "0.28"
118+
tokio-tungstenite = "0.29"
119119

120120
# #### Use local packages for development
121121
[patch.crates-io]

0 commit comments

Comments
 (0)