From fc85bb941e50d277638595327da049ddf864b597 Mon Sep 17 00:00:00 2001 From: dynst <148708712+dynst@users.noreply.github.com> Date: Thu, 24 Jul 2025 00:00:00 +0000 Subject: [PATCH 1/5] update tsconfig for node 20 minimum version --- tsconfig.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index c94d2ce2c7..0c07756cae 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,10 +4,10 @@ "declaration": true, "esModuleInterop": true, "forceConsistentCasingInFileNames": true, - "lib": ["es2020"], - "target": "es2020", - "module": "commonjs", - "moduleResolution": "node", + "lib": ["es2022"], + "target": "es2022", + "module": "node16", + "moduleResolution": "node16", "newLine": "LF", "noEmitOnError": true, "noFallthroughCasesInSwitch": true, From 717dd873cac943b1f1ff9866dce0de5cf1557f1a Mon Sep 17 00:00:00 2001 From: dynst <148708712+dynst@users.noreply.github.com> Date: Thu, 24 Jul 2025 00:00:00 +0000 Subject: [PATCH 2/5] allow require(esm) --- tsconfig.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index 0c07756cae..c53e6df5dd 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,8 +6,8 @@ "forceConsistentCasingInFileNames": true, "lib": ["es2022"], "target": "es2022", - "module": "node16", - "moduleResolution": "node16", + "module": "nodenext", + "moduleResolution": "nodenext", "newLine": "LF", "noEmitOnError": true, "noFallthroughCasesInSwitch": true, From 3955fe206270cfa2accef9731c085ff6ea00fc2c Mon Sep 17 00:00:00 2001 From: dynst <148708712+dynst@users.noreply.github.com> Date: Wed, 6 Aug 2025 00:00:00 +0000 Subject: [PATCH 3/5] set output.asyncChunks=false in webpack tests no ChunkLoadError is possible then. --- packages/socket/webpack.web.config.cjs | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/socket/webpack.web.config.cjs b/packages/socket/webpack.web.config.cjs index 4ef48d13b1..bc1487d36d 100644 --- a/packages/socket/webpack.web.config.cjs +++ b/packages/socket/webpack.web.config.cjs @@ -12,6 +12,7 @@ module.exports = [ target: target, entry: globSync("./build/**/*.spec.js", { dotRelative: true }).sort(), output: { + asyncChunks: false, path: distdir, filename: "tests.js", }, From f299fc032401aff2bc6b271bb4979106d44685e2 Mon Sep 17 00:00:00 2001 From: dynst <148708712+dynst@users.noreply.github.com> Date: Wed, 6 Aug 2025 00:00:00 +0000 Subject: [PATCH 4/5] set module=node20, new in TypeScript 5.9 Effectively synonymous with nodenext. --- tsconfig.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index c53e6df5dd..71c7b3e1e0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,8 +6,8 @@ "forceConsistentCasingInFileNames": true, "lib": ["es2022"], "target": "es2022", - "module": "nodenext", - "moduleResolution": "nodenext", + "module": "node20", + "moduleResolution": "node16", "newLine": "LF", "noEmitOnError": true, "noFallthroughCasesInSwitch": true, From 0ef0bdb71d8d047023366e5c1fe7be61f75affbb Mon Sep 17 00:00:00 2001 From: dynst <148708712+dynst@users.noreply.github.com> Date: Wed, 6 Aug 2025 00:00:00 +0000 Subject: [PATCH 5/5] remove explicit moduleResolution=node16 already implied by tsconfig compilerOptions.module=node20 --- tsconfig.json | 1 - 1 file changed, 1 deletion(-) diff --git a/tsconfig.json b/tsconfig.json index 71c7b3e1e0..6cf604ecb4 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,7 +7,6 @@ "lib": ["es2022"], "target": "es2022", "module": "node20", - "moduleResolution": "node16", "newLine": "LF", "noEmitOnError": true, "noFallthroughCasesInSwitch": true,