diff --git a/package-lock.json b/package-lock.json index 1e39b292c..05ca91024 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,7 +30,7 @@ "eslint-plugin-n": "^17.10.1", "prettier": "^3.3.3", "turbo": "^2.2.3", - "typescript": "5.5.4" + "typescript": "5.6.3" } }, "node_modules/@ampproject/remapping": { @@ -14132,6 +14132,10 @@ "resolved": "packages/typescript-compat/v5.4.x", "link": true }, + "node_modules/ts5.5": { + "resolved": "packages/typescript-compat/v5.5.x", + "link": true + }, "node_modules/tsconfig-paths": { "version": "3.15.0", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", @@ -14152,9 +14156,9 @@ "license": "0BSD" }, "node_modules/tsx": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.19.1.tgz", - "integrity": "sha512-0flMz1lh74BR4wOvBjuh9olbnwqCPc35OOlfyzHba0Dc+QNUeWX/Gq2YTbnwcWPO3BMd8fkzRVrHcsR+a7z7rA==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.19.2.tgz", + "integrity": "sha512-pOUl6Vo2LUq/bSa8S5q7b91cgNSjctn9ugq/+Mvow99qW6x/UZYwzxy/3NmqoT66eHYfCVvFvACC58UBPFf28g==", "license": "MIT", "dependencies": { "esbuild": "~0.23.0", @@ -14821,9 +14825,9 @@ } }, "node_modules/typescript": { - "version": "5.5.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", - "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", + "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -16505,7 +16509,7 @@ "devDependencies": { "@cloudflare/workers-types": "^4.20240821.1", "@connectrpc/connect-conformance": "^2.0.0-rc.2", - "tsx": "^4.19.0", + "tsx": "^4.19.2", "wrangler": "^3.73.0" } }, @@ -16539,7 +16543,7 @@ "@connectrpc/connect-node": "2.0.0-rc.2", "@types/express": "^5.0.0", "express": "^5.0.1", - "tsx": "^4.19.0" + "tsx": "^4.19.2" }, "engines": { "node": ">=18.14.1" @@ -16692,14 +16696,14 @@ "@bufbuild/protobuf": "^2.2.0", "@connectrpc/connect-node": "^2.0.0-rc.2", "@connectrpc/connect-web": "^2.0.0-rc.2", - "tsx": "^4.16.5" + "tsx": "^4.19.2" }, "devDependencies": { "@bufbuild/buf": "^1.46.0", "@bufbuild/protoc-gen-es": "^2.1.0", "@types/express": "^4.17.18", "esbuild": "^0.19.8", - "typescript": "^5.5.4" + "typescript": "^5.6.3" }, "engines": { "node": ">=18.14.1" @@ -16723,6 +16727,8 @@ }, "packages/typescript-compat/v4.9.x/node_modules/typescript": { "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -16750,6 +16756,8 @@ }, "packages/typescript-compat/v5.0.x/node_modules/typescript": { "version": "5.0.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz", + "integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==", "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -16777,6 +16785,8 @@ }, "packages/typescript-compat/v5.1.x/node_modules/typescript": { "version": "5.1.6", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", + "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==", "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -16804,6 +16814,8 @@ }, "packages/typescript-compat/v5.2.x/node_modules/typescript": { "version": "5.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", + "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -16831,6 +16843,8 @@ }, "packages/typescript-compat/v5.3.x/node_modules/typescript": { "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -16858,6 +16872,39 @@ }, "packages/typescript-compat/v5.4.x/node_modules/typescript": { "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "packages/typescript-compat/v5.5.x": { + "name": "ts5.5", + "dependencies": { + "@connectrpc/connect-conformance": "*", + "@connectrpc/example": "*", + "@types/node": "22.5.4", + "typescript": "5.5.x" + } + }, + "packages/typescript-compat/v5.5.x/node_modules/@types/node": { + "version": "22.5.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.5.4.tgz", + "integrity": "sha512-FDuKUJQm/ju9fT/SeX/6+gBzoPzlVCzfzmGkwKvRHQVxi4BntVbyIwf6a4Xn62mrvndLiml6z/UBXIdEVjQLXg==", + "license": "MIT", + "dependencies": { + "undici-types": "~6.19.2" + } + }, + "packages/typescript-compat/v5.5.x/node_modules/typescript": { + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", + "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", diff --git a/package.json b/package.json index 34ea926ae..db161816a 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,6 @@ "eslint-plugin-n": "^17.10.1", "prettier": "^3.3.3", "turbo": "^2.2.3", - "typescript": "5.5.4" + "typescript": "5.6.3" } } diff --git a/packages/connect-cloudflare/package.json b/packages/connect-cloudflare/package.json index 4171cb9fa..b665c230a 100644 --- a/packages/connect-cloudflare/package.json +++ b/packages/connect-cloudflare/package.json @@ -17,7 +17,7 @@ "devDependencies": { "@cloudflare/workers-types": "^4.20240821.1", "wrangler": "^3.73.0", - "tsx": "^4.19.0", + "tsx": "^4.19.2", "@connectrpc/connect-conformance": "^2.0.0-rc.2" } } diff --git a/packages/connect-express/package.json b/packages/connect-express/package.json index db37d2a3a..d1e13f743 100644 --- a/packages/connect-express/package.json +++ b/packages/connect-express/package.json @@ -37,7 +37,7 @@ "@connectrpc/connect-node": "2.0.0-rc.2", "@types/express": "^5.0.0", "express": "^5.0.1", - "tsx": "^4.19.0" + "tsx": "^4.19.2" }, "peerDependencies": { "express": "^4.18.2 || ^5.0.1", diff --git a/packages/connect-web-bench/README.md b/packages/connect-web-bench/README.md index e15001d5e..e86d3ce4d 100644 --- a/packages/connect-web-bench/README.md +++ b/packages/connect-web-bench/README.md @@ -15,10 +15,10 @@ usually do. We repeat this for an increasing number of RPCs. | code generator | RPCs | bundle size | minified | compressed | | -------------- | ---: | ----------: | --------: | ---------: | -| Connect-ES | 1 | 276,243 b | 176,254 b | 35,750 b | -| Connect-ES | 4 | 280,495 b | 179,356 b | 36,486 b | -| Connect-ES | 8 | 285,358 b | 183,787 b | 37,416 b | -| Connect-ES | 16 | 294,486 b | 191,411 b | 38,989 b | +| Connect-ES | 1 | 276,498 b | 176,488 b | 35,716 b | +| Connect-ES | 4 | 280,750 b | 179,590 b | 36,547 b | +| Connect-ES | 8 | 285,613 b | 184,021 b | 37,458 b | +| Connect-ES | 16 | 294,741 b | 191,645 b | 38,978 b | | gRPC-Web | 1 | 876,563 b | 548,495 b | 52,300 b | | gRPC-Web | 4 | 928,964 b | 580,477 b | 54,673 b | | gRPC-Web | 8 | 1,004,833 b | 628,223 b | 57,118 b | diff --git a/packages/connect-web-bench/chart.svg b/packages/connect-web-bench/chart.svg index b814ec2f4..cfd706211 100644 --- a/packages/connect-web-bench/chart.svg +++ b/packages/connect-web-bench/chart.svg @@ -42,13 +42,13 @@ 0 KiB - + Connect-ES -Connect-ES 34.91 KiB for 1 RPCs -Connect-ES 35.63 KiB for 4 RPCs -Connect-ES 36.54 KiB for 8 RPCs -Connect-ES 38.08 KiB for 16 RPCs +Connect-ES 34.88 KiB for 1 RPCs +Connect-ES 35.69 KiB for 4 RPCs +Connect-ES 36.58 KiB for 8 RPCs +Connect-ES 38.06 KiB for 16 RPCs diff --git a/packages/connect/src/connect-error.ts b/packages/connect/src/connect-error.ts index 3b7a2b63f..91d847342 100644 --- a/packages/connect/src/connect-error.ts +++ b/packages/connect/src/connect-error.ts @@ -132,7 +132,7 @@ export class ConnectError extends Error { return new ConnectError(String(reason), code, undefined, undefined, reason); } - static [Symbol.hasInstance](v: unknown): boolean { + static override [Symbol.hasInstance](v: unknown): boolean { if (!(v instanceof Error)) { return false; } diff --git a/packages/example/package.json b/packages/example/package.json index 5dd975854..ba161e719 100644 --- a/packages/example/package.json +++ b/packages/example/package.json @@ -18,13 +18,13 @@ "@bufbuild/protobuf": "^2.2.0", "@connectrpc/connect-node": "^2.0.0-rc.2", "@connectrpc/connect-web": "^2.0.0-rc.2", - "tsx": "^4.16.5" + "tsx": "^4.19.2" }, "devDependencies": { "@bufbuild/buf": "^1.46.0", "@bufbuild/protoc-gen-es": "^2.1.0", "@types/express": "^4.17.18", "esbuild": "^0.19.8", - "typescript": "^5.5.4" + "typescript": "^5.6.3" } } diff --git a/packages/typescript-compat/v5.5.x/package.json b/packages/typescript-compat/v5.5.x/package.json new file mode 100644 index 000000000..1dc80f4ca --- /dev/null +++ b/packages/typescript-compat/v5.5.x/package.json @@ -0,0 +1,12 @@ +{ + "name": "ts5.5", + "scripts": { + "test": "node_modules/.bin/tsc --outDir dist" + }, + "dependencies": { + "@connectrpc/connect-conformance": "*", + "@connectrpc/example": "*", + "@types/node": "22.5.4", + "typescript": "5.5.x" + } +} diff --git a/packages/typescript-compat/v5.5.x/tsconfig.json b/packages/typescript-compat/v5.5.x/tsconfig.json new file mode 100644 index 000000000..9ad81dc17 --- /dev/null +++ b/packages/typescript-compat/v5.5.x/tsconfig.json @@ -0,0 +1,22 @@ +{ + "include": [ + "../../connect-conformance/src/index.ts", + "../../example/src/**/*.ts" + ], + // These are the default compiler options for TypeScript v5.4.x, created + // with `tsc --init` (except where noted in comments below) + "compilerOptions": { + "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + "module": "commonjs", /* Specify what module code is generated. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + "strict": true, /* Enable all strict type-checking options. */ + // To guard against regression and ensure we are remaining backwards + // compatible, set the skipLibCheck flag to false explicitly. + "skipLibCheck": false, + // Certain errors are only triggered by actually emitting declaration files, + // see https://github.com/bufbuild/protobuf-es/pull/398 + "declaration": true, + "declarationMap": true + } +}