diff --git a/package-lock.json b/package-lock.json index da6fb1ffc..b31807086 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,7 +30,7 @@ "eslint-plugin-n": "^17.15.1", "prettier": "^3.4.2", "turbo": "^2.3.3", - "typescript": "5.6.3" + "typescript": "5.7.2" } }, "node_modules/@ampproject/remapping": { @@ -13416,6 +13416,10 @@ "resolved": "packages/typescript-compat/v5.5.x", "link": true }, + "node_modules/ts5.6": { + "resolved": "packages/typescript-compat/v5.6.x", + "link": true + }, "node_modules/tsconfig-paths": { "version": "3.15.0", "resolved": "https://registry.npmmirror.com/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", @@ -14083,9 +14087,9 @@ } }, "node_modules/typescript": { - "version": "5.6.3", - "resolved": "https://registry.npmmirror.com/typescript/-/typescript-5.6.3.tgz", - "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", + "version": "5.7.2", + "resolved": "https://registry.npmmirror.com/typescript/-/typescript-5.7.2.tgz", + "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -15553,7 +15557,7 @@ "@bufbuild/buf": "^1.48.0", "@bufbuild/protoc-gen-es": "^2.2.3", "esbuild": "^0.19.8", - "typescript": "^5.6.3" + "typescript": "^5.7.2" }, "engines": { "node": ">=18.14.1" @@ -15698,6 +15702,37 @@ "engines": { "node": ">=14.17" } + }, + "packages/typescript-compat/v5.6.x": { + "name": "ts5.6", + "dependencies": { + "@connectrpc/connect-conformance": "*", + "@connectrpc/example": "*", + "@types/node": "22.10.1", + "typescript": "5.6.x" + } + }, + "packages/typescript-compat/v5.6.x/node_modules/@types/node": { + "version": "22.10.1", + "resolved": "https://registry.npmmirror.com/@types/node/-/node-22.10.1.tgz", + "integrity": "sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==", + "license": "MIT", + "dependencies": { + "undici-types": "~6.20.0" + } + }, + "packages/typescript-compat/v5.6.x/node_modules/typescript": { + "version": "5.6.3", + "resolved": "https://registry.npmmirror.com/typescript/-/typescript-5.6.3.tgz", + "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } } } } diff --git a/package.json b/package.json index e488a1fc8..39692f1f0 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,6 @@ "eslint-plugin-n": "^17.15.1", "turbo": "^2.3.3", "prettier": "^3.4.2", - "typescript": "5.6.3" + "typescript": "5.7.2" } } diff --git a/packages/connect-cloudflare/package.json b/packages/connect-cloudflare/package.json index 490dcd945..43164d4aa 100644 --- a/packages/connect-cloudflare/package.json +++ b/packages/connect-cloudflare/package.json @@ -10,7 +10,7 @@ "lint": "eslint --max-warnings 0 ." }, "dependencies": { - "@bufbuild/protobuf": "^2.2.3", + "@bufbuild/protobuf": "^2.2.0", "@connectrpc/connect": "2.0.0", "@connectrpc/connect-node": "2.0.0" }, diff --git a/packages/connect-conformance/bin/connectconformance.cjs b/packages/connect-conformance/bin/connectconformance.cjs index 1a1f1a1cf..e5097d326 100755 --- a/packages/connect-conformance/bin/connectconformance.cjs +++ b/packages/connect-conformance/bin/connectconformance.cjs @@ -14,6 +14,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -const { run } = require("../dist/cjs/src/conformance.js"); +const { run } = require("../dist/cjs/conformance.js"); +const { scripts } = require("../package.json"); -run(); +// Extract conformance runner version from the `generate` script +const [, version] = /conformance:(v\d+\.\d+\.\d+)/.exec(scripts.generate) ?? [ + "?", +]; + +run(version); diff --git a/packages/connect-conformance/package.json b/packages/connect-conformance/package.json index 67592c5eb..23be5873d 100644 --- a/packages/connect-conformance/package.json +++ b/packages/connect-conformance/package.json @@ -3,11 +3,11 @@ "version": "2.0.0", "private": true, "type": "module", - "main": "./dist/cjs/src/index.js", + "main": "./dist/cjs/index.js", "exports": { ".": { - "import": "./dist/esm/src/index.js", - "require": "./dist/cjs/src/index.js" + "import": "./dist/esm/index.js", + "require": "./dist/cjs/index.js" } }, "bin": { @@ -19,7 +19,7 @@ "prebuild": "rm -rf ./dist/*", "build": "npm run build:cjs && npm run build:esm", "postbuild": "connectconformance --version", - "build:cjs": "tsc --project tsconfig.json --module commonjs --verbatimModuleSyntax false --moduleResolution node10 --outDir ./dist/cjs && echo >./dist/cjs/src/package.json '{\"type\":\"commonjs\"}'", + "build:cjs": "tsc --project tsconfig.json --module commonjs --verbatimModuleSyntax false --moduleResolution node10 --outDir ./dist/cjs && echo >./dist/cjs/package.json '{\"type\":\"commonjs\"}'", "build:esm": "tsc --project tsconfig.json --outDir ./dist/esm", "format": "prettier --write --ignore-unknown '.' '!dist' '!src/gen'", "license-header": "license-header", @@ -27,7 +27,7 @@ "attw": "attw --pack" }, "dependencies": { - "@bufbuild/protobuf": "^2.2.3", + "@bufbuild/protobuf": "^2.2.0", "@connectrpc/connect": "2.0.0", "fflate": "^0.8.2", "tar-stream": "^3.1.7" diff --git a/packages/connect-conformance/src/conformance.ts b/packages/connect-conformance/src/conformance.ts index 8c55adab6..379f17746 100644 --- a/packages/connect-conformance/src/conformance.ts +++ b/packages/connect-conformance/src/conformance.ts @@ -26,13 +26,8 @@ import * as tar from "tar-stream"; import { pipeline } from "node:stream/promises"; import { Readable } from "node:stream"; import { execFileSync } from "node:child_process"; -import { scripts } from "../package.json"; -export async function run() { - // Extract conformance runner version from the `generate` script - const [, version] = /conformance:(v\d+\.\d+\.\d+)/.exec(scripts.generate) ?? [ - "?", - ]; +export async function run(version: string) { const { archive, bin } = getArtifactNameForEnv(version); const tempDir = getTempDir(version); const binPath = joinPath(tempDir, bin); diff --git a/packages/connect-express/package.json b/packages/connect-express/package.json index e9183bb2c..304a48527 100644 --- a/packages/connect-express/package.json +++ b/packages/connect-express/package.json @@ -41,7 +41,7 @@ }, "peerDependencies": { "express": "^4.18.2 || ^5.0.1", - "@bufbuild/protobuf": "^2.2.3", + "@bufbuild/protobuf": "^2.2.0", "@connectrpc/connect": "2.0.0", "@connectrpc/connect-node": "2.0.0" } diff --git a/packages/connect-fastify/package.json b/packages/connect-fastify/package.json index 72e577188..ea9eb942b 100644 --- a/packages/connect-fastify/package.json +++ b/packages/connect-fastify/package.json @@ -36,7 +36,7 @@ "@connectrpc/connect-node": "2.0.0" }, "peerDependencies": { - "@bufbuild/protobuf": "^2.2.3", + "@bufbuild/protobuf": "^2.2.0", "fastify": "^4.22.1 || ^5.1.0", "@connectrpc/connect": "2.0.0", "@connectrpc/connect-node": "2.0.0" diff --git a/packages/connect-next/package.json b/packages/connect-next/package.json index d06d335c4..f317f12fc 100644 --- a/packages/connect-next/package.json +++ b/packages/connect-next/package.json @@ -30,7 +30,7 @@ "node": ">=18.14.1" }, "peerDependencies": { - "@bufbuild/protobuf": "^2.2.3", + "@bufbuild/protobuf": "^2.2.0", "next": "^13.2.4 || ^14.2.5 || ^15.0.2", "@connectrpc/connect": "2.0.0", "@connectrpc/connect-node": "2.0.0" diff --git a/packages/connect-web-bench/package.json b/packages/connect-web-bench/package.json index 77ac7c3c6..c37599a24 100644 --- a/packages/connect-web-bench/package.json +++ b/packages/connect-web-bench/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "@bufbuild/buf": "^1.48.0", - "@bufbuild/protobuf": "^2.2.3", + "@bufbuild/protobuf": "^2.2.0", "@bufbuild/protoc-gen-es": "^2.2.3", "@connectrpc/connect-web": "2.0.0", "@types/brotli": "^1.3.4", diff --git a/packages/connect/package.json b/packages/connect/package.json index 741d7b95b..d40faf348 100644 --- a/packages/connect/package.json +++ b/packages/connect/package.json @@ -64,7 +64,7 @@ } }, "peerDependencies": { - "@bufbuild/protobuf": "^2.2.3" + "@bufbuild/protobuf": "^2.2.0" }, "devDependencies": { "@bufbuild/buf": "^1.48.0", diff --git a/packages/example/package.json b/packages/example/package.json index 3a82bd8b0..574b0993c 100644 --- a/packages/example/package.json +++ b/packages/example/package.json @@ -15,7 +15,7 @@ "node": ">=18.14.1" }, "dependencies": { - "@bufbuild/protobuf": "^2.2.3", + "@bufbuild/protobuf": "^2.2.0", "@connectrpc/connect-node": "^2.0.0", "@connectrpc/connect-web": "^2.0.0", "tsx": "^4.19.2" @@ -24,6 +24,6 @@ "@bufbuild/buf": "^1.48.0", "@bufbuild/protoc-gen-es": "^2.2.3", "esbuild": "^0.19.8", - "typescript": "^5.6.3" + "typescript": "^5.7.2" } } diff --git a/packages/typescript-compat/v5.6.x/package.json b/packages/typescript-compat/v5.6.x/package.json new file mode 100644 index 000000000..c63a08bf1 --- /dev/null +++ b/packages/typescript-compat/v5.6.x/package.json @@ -0,0 +1,13 @@ +{ + "name": "ts5.6", + "private": true, + "scripts": { + "test": "node_modules/.bin/tsc --outDir dist" + }, + "dependencies": { + "@connectrpc/connect-conformance": "*", + "@connectrpc/example": "*", + "@types/node": "22.10.1", + "typescript": "5.6.x" + } +} diff --git a/packages/typescript-compat/v5.6.x/tsconfig.json b/packages/typescript-compat/v5.6.x/tsconfig.json new file mode 100644 index 000000000..9ad81dc17 --- /dev/null +++ b/packages/typescript-compat/v5.6.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 + } +}