diff --git a/package-lock.json b/package-lock.json index 560caa497..f95c7dbe9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,7 +28,7 @@ "@types/node": "^24.1.0", "jest": "^29.7.0", "turbo": "^2.5.5", - "typescript": "~5.6.3" + "typescript": "^5.9.2" }, "engines": { "node": ">=20", @@ -7027,6 +7027,18 @@ "resolved": "packages/typescript-compat/v5.5.x", "link": true }, + "node_modules/ts5.6": { + "resolved": "packages/typescript-compat/v5.6.x", + "link": true + }, + "node_modules/ts5.7": { + "resolved": "packages/typescript-compat/v5.7.x", + "link": true + }, + "node_modules/ts5.8": { + "resolved": "packages/typescript-compat/v5.8.x", + "link": true + }, "node_modules/tsx": { "version": "4.20.3", "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.20.3.tgz", @@ -7173,9 +7185,9 @@ "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==" }, "node_modules/typescript": { - "version": "5.6.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", - "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", + "version": "5.9.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz", + "integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==", "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -7713,10 +7725,19 @@ "name": "ts5.2", "dependencies": { "@bufbuild/protobuf-test": "*", - "@types/node": "24.1.0", + "@types/node": "24.2.1", "typescript": "5.2.x" } }, + "packages/typescript-compat/v5.2.x/node_modules/@types/node": { + "version": "24.2.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.2.1.tgz", + "integrity": "sha512-DRh5K+ka5eJic8CjH7td8QpYEV6Zo10gfRkjHCO3weqZHWDtAaSTFtl4+VMqOJ4N5jcuhZ9/l+yy8rVgw7BQeQ==", + "license": "MIT", + "dependencies": { + "undici-types": "~7.10.0" + } + }, "packages/typescript-compat/v5.2.x/node_modules/typescript": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", @@ -7729,14 +7750,29 @@ "node": ">=14.17" } }, + "packages/typescript-compat/v5.2.x/node_modules/undici-types": { + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.10.0.tgz", + "integrity": "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==", + "license": "MIT" + }, "packages/typescript-compat/v5.3.x": { "name": "ts5.3", "dependencies": { "@bufbuild/protobuf-test": "*", - "@types/node": "24.1.0", + "@types/node": "24.2.1", "typescript": "5.3.x" } }, + "packages/typescript-compat/v5.3.x/node_modules/@types/node": { + "version": "24.2.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.2.1.tgz", + "integrity": "sha512-DRh5K+ka5eJic8CjH7td8QpYEV6Zo10gfRkjHCO3weqZHWDtAaSTFtl4+VMqOJ4N5jcuhZ9/l+yy8rVgw7BQeQ==", + "license": "MIT", + "dependencies": { + "undici-types": "~7.10.0" + } + }, "packages/typescript-compat/v5.3.x/node_modules/typescript": { "version": "5.3.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", @@ -7750,6 +7786,12 @@ "node": ">=14.17" } }, + "packages/typescript-compat/v5.3.x/node_modules/undici-types": { + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.10.0.tgz", + "integrity": "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==", + "license": "MIT" + }, "packages/typescript-compat/v5.4.x": { "name": "ts5.4", "dependencies": { @@ -7775,10 +7817,19 @@ "name": "ts5.5", "dependencies": { "@bufbuild/protobuf-test": "*", - "@types/node": "24.1.0", + "@types/node": "24.2.1", "typescript": "5.5.x" } }, + "packages/typescript-compat/v5.5.x/node_modules/@types/node": { + "version": "24.2.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.2.1.tgz", + "integrity": "sha512-DRh5K+ka5eJic8CjH7td8QpYEV6Zo10gfRkjHCO3weqZHWDtAaSTFtl4+VMqOJ4N5jcuhZ9/l+yy8rVgw7BQeQ==", + "license": "MIT", + "dependencies": { + "undici-types": "~7.10.0" + } + }, "packages/typescript-compat/v5.5.x/node_modules/typescript": { "version": "5.5.4", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", @@ -7792,6 +7843,120 @@ "node": ">=14.17" } }, + "packages/typescript-compat/v5.5.x/node_modules/undici-types": { + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.10.0.tgz", + "integrity": "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==", + "license": "MIT" + }, + "packages/typescript-compat/v5.6.x": { + "name": "ts5.6", + "dependencies": { + "@bufbuild/protobuf-test": "*", + "@types/node": "24.2.1", + "typescript": "5.6.x" + } + }, + "packages/typescript-compat/v5.6.x/node_modules/@types/node": { + "version": "24.2.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.2.1.tgz", + "integrity": "sha512-DRh5K+ka5eJic8CjH7td8QpYEV6Zo10gfRkjHCO3weqZHWDtAaSTFtl4+VMqOJ4N5jcuhZ9/l+yy8rVgw7BQeQ==", + "license": "MIT", + "dependencies": { + "undici-types": "~7.10.0" + } + }, + "packages/typescript-compat/v5.6.x/node_modules/typescript": { + "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", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "packages/typescript-compat/v5.6.x/node_modules/undici-types": { + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.10.0.tgz", + "integrity": "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==", + "license": "MIT" + }, + "packages/typescript-compat/v5.7.x": { + "name": "ts5.7", + "dependencies": { + "@bufbuild/protobuf-test": "*", + "@types/node": "24.2.1", + "typescript": "5.7.x" + } + }, + "packages/typescript-compat/v5.7.x/node_modules/@types/node": { + "version": "24.2.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.2.1.tgz", + "integrity": "sha512-DRh5K+ka5eJic8CjH7td8QpYEV6Zo10gfRkjHCO3weqZHWDtAaSTFtl4+VMqOJ4N5jcuhZ9/l+yy8rVgw7BQeQ==", + "license": "MIT", + "dependencies": { + "undici-types": "~7.10.0" + } + }, + "packages/typescript-compat/v5.7.x/node_modules/typescript": { + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", + "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "packages/typescript-compat/v5.7.x/node_modules/undici-types": { + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.10.0.tgz", + "integrity": "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==", + "license": "MIT" + }, + "packages/typescript-compat/v5.8.x": { + "name": "ts5.8", + "dependencies": { + "@bufbuild/protobuf-test": "*", + "@types/node": "24.2.1", + "typescript": "5.8.x" + } + }, + "packages/typescript-compat/v5.8.x/node_modules/@types/node": { + "version": "24.2.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.2.1.tgz", + "integrity": "sha512-DRh5K+ka5eJic8CjH7td8QpYEV6Zo10gfRkjHCO3weqZHWDtAaSTFtl4+VMqOJ4N5jcuhZ9/l+yy8rVgw7BQeQ==", + "license": "MIT", + "dependencies": { + "undici-types": "~7.10.0" + } + }, + "packages/typescript-compat/v5.8.x/node_modules/typescript": { + "version": "5.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", + "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "packages/typescript-compat/v5.8.x/node_modules/undici-types": { + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.10.0.tgz", + "integrity": "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==", + "license": "MIT" + }, "packages/upstream-protobuf": { "dependencies": { "fflate": "^0.8.1", diff --git a/package.json b/package.json index 96bba90a0..5ad43a943 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@types/node": "^24.1.0", "jest": "^29.7.0", "turbo": "^2.5.5", - "typescript": "~5.6.3" + "typescript": "^5.9.2" }, "//": "avoid hoisting of @typescript/vfs, see packages/protoplugin/src/transpile.ts", "dependencies": { diff --git a/packages/bundle-size/README.md b/packages/bundle-size/README.md index 92d2b4088..6a0bf965a 100644 --- a/packages/bundle-size/README.md +++ b/packages/bundle-size/README.md @@ -16,11 +16,11 @@ usually do. We repeat this for an increasing number of files. | code generator | files | bundle size | minified | compressed | | ------------------- | ----: | ----------: | --------: | ---------: | -| Protobuf-ES | 1 | 132,159 b | 68,489 b | 15,756 b | -| Protobuf-ES | 4 | 134,348 b | 69,996 b | 16,428 b | -| Protobuf-ES | 8 | 137,110 b | 71,767 b | 16,932 b | -| Protobuf-ES | 16 | 147,560 b | 79,748 b | 19,320 b | -| Protobuf-ES | 32 | 175,351 b | 101,766 b | 24,771 b | +| Protobuf-ES | 1 | 132,341 b | 68,489 b | 15,756 b | +| Protobuf-ES | 4 | 134,530 b | 69,996 b | 16,428 b | +| Protobuf-ES | 8 | 137,292 b | 71,767 b | 16,932 b | +| Protobuf-ES | 16 | 147,742 b | 79,748 b | 19,320 b | +| Protobuf-ES | 32 | 175,533 b | 101,766 b | 24,771 b | | protobuf-javascript | 1 | 104,048 b | 70,320 b | 15,540 b | | protobuf-javascript | 4 | 130,537 b | 85,672 b | 16,956 b | | protobuf-javascript | 8 | 152,429 b | 98,044 b | 18,138 b | diff --git a/packages/protobuf-conformance/src/conformance.ts b/packages/protobuf-conformance/src/conformance.ts index 3f1929cde..ad3c614a2 100644 --- a/packages/protobuf-conformance/src/conformance.ts +++ b/packages/protobuf-conformance/src/conformance.ts @@ -180,7 +180,10 @@ async function* readMessages( messageDesc: Desc, ): AsyncIterable> { // append chunk to buffer, returning updated buffer - function append(buffer: Uint8Array, chunk: Uint8Array): Uint8Array { + function append( + buffer: Uint8Array, + chunk: Uint8Array, + ): Uint8Array { const n = new Uint8Array(buffer.byteLength + chunk.byteLength); n.set(buffer); n.set(chunk, buffer.byteLength); diff --git a/packages/protobuf-test/src/wire/text-encoding.test.ts b/packages/protobuf-test/src/wire/text-encoding.test.ts index 8b26e733c..089b65de3 100644 --- a/packages/protobuf-test/src/wire/text-encoding.test.ts +++ b/packages/protobuf-test/src/wire/text-encoding.test.ts @@ -100,7 +100,7 @@ describe("configureTextEncoding()", () => { configureTextEncoding({ checkUtf8: backup.checkUtf8, decodeUtf8: backup.decodeUtf8, - encodeUtf8(text: string): Uint8Array { + encodeUtf8(text: string) { arg = text; return new Uint8Array(10); }, diff --git a/packages/protobuf/src/to-binary.ts b/packages/protobuf/src/to-binary.ts index 988b76be0..57688631c 100644 --- a/packages/protobuf/src/to-binary.ts +++ b/packages/protobuf/src/to-binary.ts @@ -54,7 +54,7 @@ export function toBinary( schema: Desc, message: MessageShape, options?: Partial, -): Uint8Array { +): Uint8Array { return writeFields( new BinaryWriter(), makeWriteOptions(options), diff --git a/packages/protobuf/src/wire/base64-encoding.ts b/packages/protobuf/src/wire/base64-encoding.ts index 3b4d7fb9b..daf736d83 100644 --- a/packages/protobuf/src/wire/base64-encoding.ts +++ b/packages/protobuf/src/wire/base64-encoding.ts @@ -23,7 +23,7 @@ * "_" instead of "/", * no padding */ -export function base64Decode(base64Str: string) { +export function base64Decode(base64Str: string): Uint8Array { const table = getDecodeTable(); // estimate byte size, not accounting for inner padding and whitespace let es = (base64Str.length * 3) / 4; @@ -39,7 +39,7 @@ export function base64Decode(base64Str: string) { b = table[base64Str.charCodeAt(i)]; if (b === undefined) { switch (base64Str[i]) { - // @ts-expect-error TS7029: Fallthrough case in switch + // @ts-ignore TS7029: Fallthrough case in switch -- ignore instead of expect-error for compiler settings without noFallthroughCasesInSwitch: true case "=": groupPos = 0; // reset state when padding found case "\n": diff --git a/packages/protobuf/src/wire/binary-encoding.ts b/packages/protobuf/src/wire/binary-encoding.ts index 0230b9279..cdd01cdad 100644 --- a/packages/protobuf/src/wire/binary-encoding.ts +++ b/packages/protobuf/src/wire/binary-encoding.ts @@ -130,7 +130,7 @@ export class BinaryWriter { /** * Return all bytes written and reset this writer. */ - finish(): Uint8Array { + finish(): Uint8Array { if (this.buf.length) { this.chunks.push(new Uint8Array(this.buf)); // flush the buffer this.buf = []; @@ -412,7 +412,7 @@ export class BinaryReader { // ignore } break; - // @ts-expect-error TS7029: Fallthrough case in switch + // @ts-ignore TS7029: Fallthrough case in switch -- ignore instead of expect-error for compiler settings without noFallthroughCasesInSwitch: true case WireType.Bit64: this.pos += 4; case WireType.Bit32: diff --git a/packages/protobuf/src/wire/size-delimited.ts b/packages/protobuf/src/wire/size-delimited.ts index 090f13c0d..73498ea10 100644 --- a/packages/protobuf/src/wire/size-delimited.ts +++ b/packages/protobuf/src/wire/size-delimited.ts @@ -54,7 +54,10 @@ export async function* sizeDelimitedDecodeStream( options?: BinaryReadOptions, ): AsyncIterableIterator> { // append chunk to buffer, returning updated buffer - function append(buffer: Uint8Array, chunk: Uint8Array): Uint8Array { + function append( + buffer: Uint8Array, + chunk: Uint8Array, + ): Uint8Array { const n = new Uint8Array(buffer.byteLength + chunk.byteLength); n.set(buffer); n.set(chunk, buffer.length); diff --git a/packages/protobuf/src/wire/text-encoding.ts b/packages/protobuf/src/wire/text-encoding.ts index cdce935ee..e55797982 100644 --- a/packages/protobuf/src/wire/text-encoding.ts +++ b/packages/protobuf/src/wire/text-encoding.ts @@ -22,7 +22,7 @@ interface TextEncoding { /** * Encode UTF-8 text to binary. */ - encodeUtf8: (text: string) => Uint8Array; + encodeUtf8: (text: string) => Uint8Array; /** * Decode UTF-8 text from binary. */ @@ -51,7 +51,7 @@ export function getTextEncoding() { globalThis as unknown as GlobalWithTextEncoderDecoder ).TextDecoder(); (globalThis as GlobalWithTextEncoding)[symbol] = { - encodeUtf8(text: string): Uint8Array { + encodeUtf8(text: string): Uint8Array { return te.encode(text); }, decodeUtf8(bytes: Uint8Array): string { @@ -77,7 +77,7 @@ type GlobalWithTextEncoding = { type GlobalWithTextEncoderDecoder = { TextEncoder: { new (): { - encode(text: string): Uint8Array; + encode(text: string): Uint8Array; }; }; TextDecoder: { diff --git a/packages/typescript-compat/v4.9.x/src/uint8array-arraybuffer.ts b/packages/typescript-compat/v4.9.x/src/uint8array-arraybuffer.ts new file mode 100644 index 000000000..5a26970a5 --- /dev/null +++ b/packages/typescript-compat/v4.9.x/src/uint8array-arraybuffer.ts @@ -0,0 +1,28 @@ +import {BinaryWriter, base64Decode, getTextEncoding} from "@bufbuild/protobuf/wire"; +import {DescMessage, type Message, toBinary} from "@bufbuild/protobuf"; + +export function testBinaryWriterFinish() { + const infer = new BinaryWriter().finish(); + const uint8Arr: Uint8Array = new BinaryWriter().finish(); + return [infer, uint8Arr] as const; +} + +export function testBase64Decode() { + const infer = base64Decode(""); + const uint8Arr: Uint8Array = base64Decode(""); + return [infer, uint8Arr] as const; +} + +export function testEncodeUtf8() { + const infer = getTextEncoding().encodeUtf8(""); + const uint8Arr: Uint8Array = getTextEncoding().encodeUtf8(""); + return [infer, uint8Arr] as const; +} + +export function testToBinary() { + const infer = toBinary(null as unknown as DescMessage, null as unknown as Message); + const uint8Arr: Uint8Array = toBinary(null as unknown as DescMessage, null as unknown as Message); + return [infer, uint8Arr] as const; +} + + diff --git a/packages/typescript-compat/v4.9.x/tsconfig.json b/packages/typescript-compat/v4.9.x/tsconfig.json index 21a99507b..d886f408f 100644 --- a/packages/typescript-compat/v4.9.x/tsconfig.json +++ b/packages/typescript-compat/v4.9.x/tsconfig.json @@ -1,5 +1,6 @@ { "include": [ + "./src/**/*.ts", "../../protobuf-test/src/types.test.ts", "../../protobuf-test/src/registry.test.ts", "../../protobuf-test/src/json_types.test.ts", @@ -19,9 +20,7 @@ "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "strict": true, - // To guard against regression and ensure we are remaining backwards - // compatible, set the skipLibCheck flag to false explicitly. - "skipLibCheck": false, + "skipLibCheck": true, // Certain errors are only triggered by actually emitting declaration files, // see https://github.com/bufbuild/protobuf-es/pull/398 "declaration": true, diff --git a/packages/typescript-compat/v5.0.x/src/uint8array-arraybuffer.ts b/packages/typescript-compat/v5.0.x/src/uint8array-arraybuffer.ts new file mode 100644 index 000000000..5a26970a5 --- /dev/null +++ b/packages/typescript-compat/v5.0.x/src/uint8array-arraybuffer.ts @@ -0,0 +1,28 @@ +import {BinaryWriter, base64Decode, getTextEncoding} from "@bufbuild/protobuf/wire"; +import {DescMessage, type Message, toBinary} from "@bufbuild/protobuf"; + +export function testBinaryWriterFinish() { + const infer = new BinaryWriter().finish(); + const uint8Arr: Uint8Array = new BinaryWriter().finish(); + return [infer, uint8Arr] as const; +} + +export function testBase64Decode() { + const infer = base64Decode(""); + const uint8Arr: Uint8Array = base64Decode(""); + return [infer, uint8Arr] as const; +} + +export function testEncodeUtf8() { + const infer = getTextEncoding().encodeUtf8(""); + const uint8Arr: Uint8Array = getTextEncoding().encodeUtf8(""); + return [infer, uint8Arr] as const; +} + +export function testToBinary() { + const infer = toBinary(null as unknown as DescMessage, null as unknown as Message); + const uint8Arr: Uint8Array = toBinary(null as unknown as DescMessage, null as unknown as Message); + return [infer, uint8Arr] as const; +} + + diff --git a/packages/typescript-compat/v5.0.x/tsconfig.json b/packages/typescript-compat/v5.0.x/tsconfig.json index bdb572f03..80033320d 100644 --- a/packages/typescript-compat/v5.0.x/tsconfig.json +++ b/packages/typescript-compat/v5.0.x/tsconfig.json @@ -1,5 +1,6 @@ { "include": [ + "./src/**/*.ts", "../../protobuf-test/src/types.test.ts", "../../protobuf-test/src/registry.test.ts", "../../protobuf-test/src/json_types.test.ts", @@ -19,9 +20,7 @@ "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "strict": true, - // To guard against regression and ensure we are remaining backwards - // compatible, set the skipLibCheck flag to false explicitly. - "skipLibCheck": false, + "skipLibCheck": true, // Certain errors are only triggered by actually emitting declaration files, // see https://github.com/bufbuild/protobuf-es/pull/398 "declaration": true, diff --git a/packages/typescript-compat/v5.1.x/src/uint8array-arraybuffer.ts b/packages/typescript-compat/v5.1.x/src/uint8array-arraybuffer.ts new file mode 100644 index 000000000..5a26970a5 --- /dev/null +++ b/packages/typescript-compat/v5.1.x/src/uint8array-arraybuffer.ts @@ -0,0 +1,28 @@ +import {BinaryWriter, base64Decode, getTextEncoding} from "@bufbuild/protobuf/wire"; +import {DescMessage, type Message, toBinary} from "@bufbuild/protobuf"; + +export function testBinaryWriterFinish() { + const infer = new BinaryWriter().finish(); + const uint8Arr: Uint8Array = new BinaryWriter().finish(); + return [infer, uint8Arr] as const; +} + +export function testBase64Decode() { + const infer = base64Decode(""); + const uint8Arr: Uint8Array = base64Decode(""); + return [infer, uint8Arr] as const; +} + +export function testEncodeUtf8() { + const infer = getTextEncoding().encodeUtf8(""); + const uint8Arr: Uint8Array = getTextEncoding().encodeUtf8(""); + return [infer, uint8Arr] as const; +} + +export function testToBinary() { + const infer = toBinary(null as unknown as DescMessage, null as unknown as Message); + const uint8Arr: Uint8Array = toBinary(null as unknown as DescMessage, null as unknown as Message); + return [infer, uint8Arr] as const; +} + + diff --git a/packages/typescript-compat/v5.1.x/tsconfig.json b/packages/typescript-compat/v5.1.x/tsconfig.json index 45dd7be6b..6affe1904 100644 --- a/packages/typescript-compat/v5.1.x/tsconfig.json +++ b/packages/typescript-compat/v5.1.x/tsconfig.json @@ -1,5 +1,6 @@ { "include": [ + "./src/**/*.ts", "../../protobuf-test/src/types.test.ts", "../../protobuf-test/src/registry.test.ts", "../../protobuf-test/src/json_types.test.ts", @@ -19,9 +20,7 @@ "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "strict": true, - // To guard against regression and ensure we are remaining backwards - // compatible, set the skipLibCheck flag to false explicitly. - "skipLibCheck": false, + "skipLibCheck": true, // Certain errors are only triggered by actually emitting declaration files, // see https://github.com/bufbuild/protobuf-es/pull/398 "declaration": true, diff --git a/packages/typescript-compat/v5.2.x/package.json b/packages/typescript-compat/v5.2.x/package.json index e7431774a..eb003aa23 100644 --- a/packages/typescript-compat/v5.2.x/package.json +++ b/packages/typescript-compat/v5.2.x/package.json @@ -6,7 +6,7 @@ }, "dependencies": { "@bufbuild/protobuf-test": "*", - "@types/node": "24.1.0", + "@types/node": "24.2.1", "typescript": "5.2.x" } } diff --git a/packages/typescript-compat/v5.2.x/src/uint8array-arraybuffer.ts b/packages/typescript-compat/v5.2.x/src/uint8array-arraybuffer.ts new file mode 100644 index 000000000..5a26970a5 --- /dev/null +++ b/packages/typescript-compat/v5.2.x/src/uint8array-arraybuffer.ts @@ -0,0 +1,28 @@ +import {BinaryWriter, base64Decode, getTextEncoding} from "@bufbuild/protobuf/wire"; +import {DescMessage, type Message, toBinary} from "@bufbuild/protobuf"; + +export function testBinaryWriterFinish() { + const infer = new BinaryWriter().finish(); + const uint8Arr: Uint8Array = new BinaryWriter().finish(); + return [infer, uint8Arr] as const; +} + +export function testBase64Decode() { + const infer = base64Decode(""); + const uint8Arr: Uint8Array = base64Decode(""); + return [infer, uint8Arr] as const; +} + +export function testEncodeUtf8() { + const infer = getTextEncoding().encodeUtf8(""); + const uint8Arr: Uint8Array = getTextEncoding().encodeUtf8(""); + return [infer, uint8Arr] as const; +} + +export function testToBinary() { + const infer = toBinary(null as unknown as DescMessage, null as unknown as Message); + const uint8Arr: Uint8Array = toBinary(null as unknown as DescMessage, null as unknown as Message); + return [infer, uint8Arr] as const; +} + + diff --git a/packages/typescript-compat/v5.2.x/tsconfig.json b/packages/typescript-compat/v5.2.x/tsconfig.json index c95cba729..5ca9cd071 100644 --- a/packages/typescript-compat/v5.2.x/tsconfig.json +++ b/packages/typescript-compat/v5.2.x/tsconfig.json @@ -1,5 +1,6 @@ { "include": [ + "./src/**/*.ts", "../../protobuf-test/src/types.test.ts", "../../protobuf-test/src/registry.test.ts", "../../protobuf-test/src/json_types.test.ts", @@ -19,9 +20,7 @@ "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, + "skipLibCheck": true, /* Skip type checking all .d.ts files. */ // Certain errors are only triggered by actually emitting declaration files, // see https://github.com/bufbuild/protobuf-es/pull/398 "declaration": true, diff --git a/packages/typescript-compat/v5.3.x/package.json b/packages/typescript-compat/v5.3.x/package.json index a3cd74e2f..7a284b74a 100644 --- a/packages/typescript-compat/v5.3.x/package.json +++ b/packages/typescript-compat/v5.3.x/package.json @@ -6,7 +6,7 @@ }, "dependencies": { "@bufbuild/protobuf-test": "*", - "@types/node": "24.1.0", + "@types/node": "24.2.1", "typescript": "5.3.x" } } diff --git a/packages/typescript-compat/v5.3.x/src/uint8array-arraybuffer.ts b/packages/typescript-compat/v5.3.x/src/uint8array-arraybuffer.ts new file mode 100644 index 000000000..5a26970a5 --- /dev/null +++ b/packages/typescript-compat/v5.3.x/src/uint8array-arraybuffer.ts @@ -0,0 +1,28 @@ +import {BinaryWriter, base64Decode, getTextEncoding} from "@bufbuild/protobuf/wire"; +import {DescMessage, type Message, toBinary} from "@bufbuild/protobuf"; + +export function testBinaryWriterFinish() { + const infer = new BinaryWriter().finish(); + const uint8Arr: Uint8Array = new BinaryWriter().finish(); + return [infer, uint8Arr] as const; +} + +export function testBase64Decode() { + const infer = base64Decode(""); + const uint8Arr: Uint8Array = base64Decode(""); + return [infer, uint8Arr] as const; +} + +export function testEncodeUtf8() { + const infer = getTextEncoding().encodeUtf8(""); + const uint8Arr: Uint8Array = getTextEncoding().encodeUtf8(""); + return [infer, uint8Arr] as const; +} + +export function testToBinary() { + const infer = toBinary(null as unknown as DescMessage, null as unknown as Message); + const uint8Arr: Uint8Array = toBinary(null as unknown as DescMessage, null as unknown as Message); + return [infer, uint8Arr] as const; +} + + diff --git a/packages/typescript-compat/v5.3.x/tsconfig.json b/packages/typescript-compat/v5.3.x/tsconfig.json index 14f27259b..a7c22738a 100644 --- a/packages/typescript-compat/v5.3.x/tsconfig.json +++ b/packages/typescript-compat/v5.3.x/tsconfig.json @@ -1,5 +1,6 @@ { "include": [ + "./src/**/*.ts", "../../protobuf-test/src/types.test.ts", "../../protobuf-test/src/registry.test.ts", "../../protobuf-test/src/json_types.test.ts", @@ -19,9 +20,7 @@ "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, + "skipLibCheck": true, /* Skip type checking all .d.ts files. */ // Certain errors are only triggered by actually emitting declaration files, // see https://github.com/bufbuild/protobuf-es/pull/398 "declaration": true, diff --git a/packages/typescript-compat/v5.4.x/src/uint8array-arraybuffer.ts b/packages/typescript-compat/v5.4.x/src/uint8array-arraybuffer.ts new file mode 100644 index 000000000..5a26970a5 --- /dev/null +++ b/packages/typescript-compat/v5.4.x/src/uint8array-arraybuffer.ts @@ -0,0 +1,28 @@ +import {BinaryWriter, base64Decode, getTextEncoding} from "@bufbuild/protobuf/wire"; +import {DescMessage, type Message, toBinary} from "@bufbuild/protobuf"; + +export function testBinaryWriterFinish() { + const infer = new BinaryWriter().finish(); + const uint8Arr: Uint8Array = new BinaryWriter().finish(); + return [infer, uint8Arr] as const; +} + +export function testBase64Decode() { + const infer = base64Decode(""); + const uint8Arr: Uint8Array = base64Decode(""); + return [infer, uint8Arr] as const; +} + +export function testEncodeUtf8() { + const infer = getTextEncoding().encodeUtf8(""); + const uint8Arr: Uint8Array = getTextEncoding().encodeUtf8(""); + return [infer, uint8Arr] as const; +} + +export function testToBinary() { + const infer = toBinary(null as unknown as DescMessage, null as unknown as Message); + const uint8Arr: Uint8Array = toBinary(null as unknown as DescMessage, null as unknown as Message); + return [infer, uint8Arr] as const; +} + + diff --git a/packages/typescript-compat/v5.4.x/tsconfig.json b/packages/typescript-compat/v5.4.x/tsconfig.json index f710ac924..1b7313805 100644 --- a/packages/typescript-compat/v5.4.x/tsconfig.json +++ b/packages/typescript-compat/v5.4.x/tsconfig.json @@ -1,5 +1,6 @@ { "include": [ + "./src/**/*.ts", "../../protobuf-test/src/types.test.ts", "../../protobuf-test/src/registry.test.ts", "../../protobuf-test/src/json_types.test.ts", @@ -19,9 +20,7 @@ "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, + "skipLibCheck": true, /* Skip type checking all .d.ts files. */ // Certain errors are only triggered by actually emitting declaration files, // see https://github.com/bufbuild/protobuf-es/pull/398 "declaration": true, diff --git a/packages/typescript-compat/v5.5.x/package.json b/packages/typescript-compat/v5.5.x/package.json index 4ea2bd16e..cc803fcf4 100644 --- a/packages/typescript-compat/v5.5.x/package.json +++ b/packages/typescript-compat/v5.5.x/package.json @@ -6,7 +6,7 @@ }, "dependencies": { "@bufbuild/protobuf-test": "*", - "@types/node": "24.1.0", + "@types/node": "24.2.1", "typescript": "5.5.x" } } diff --git a/packages/typescript-compat/v5.5.x/src/uint8array-arraybuffer.ts b/packages/typescript-compat/v5.5.x/src/uint8array-arraybuffer.ts new file mode 100644 index 000000000..5a26970a5 --- /dev/null +++ b/packages/typescript-compat/v5.5.x/src/uint8array-arraybuffer.ts @@ -0,0 +1,28 @@ +import {BinaryWriter, base64Decode, getTextEncoding} from "@bufbuild/protobuf/wire"; +import {DescMessage, type Message, toBinary} from "@bufbuild/protobuf"; + +export function testBinaryWriterFinish() { + const infer = new BinaryWriter().finish(); + const uint8Arr: Uint8Array = new BinaryWriter().finish(); + return [infer, uint8Arr] as const; +} + +export function testBase64Decode() { + const infer = base64Decode(""); + const uint8Arr: Uint8Array = base64Decode(""); + return [infer, uint8Arr] as const; +} + +export function testEncodeUtf8() { + const infer = getTextEncoding().encodeUtf8(""); + const uint8Arr: Uint8Array = getTextEncoding().encodeUtf8(""); + return [infer, uint8Arr] as const; +} + +export function testToBinary() { + const infer = toBinary(null as unknown as DescMessage, null as unknown as Message); + const uint8Arr: Uint8Array = toBinary(null as unknown as DescMessage, null as unknown as Message); + return [infer, uint8Arr] as const; +} + + diff --git a/packages/typescript-compat/v5.5.x/tsconfig.json b/packages/typescript-compat/v5.5.x/tsconfig.json index 7ca691e50..3146bd52e 100644 --- a/packages/typescript-compat/v5.5.x/tsconfig.json +++ b/packages/typescript-compat/v5.5.x/tsconfig.json @@ -1,5 +1,6 @@ { "include": [ + "./src/**/*.ts", "../../protobuf-test/src/types.test.ts", "../../protobuf-test/src/registry.test.ts", "../../protobuf-test/src/json_types.test.ts", @@ -19,9 +20,7 @@ "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, + "skipLibCheck": true, /* Skip type checking all .d.ts files. */ // Certain errors are only triggered by actually emitting declaration files, // see https://github.com/bufbuild/protobuf-es/pull/398 "declaration": true, 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..53057440f --- /dev/null +++ b/packages/typescript-compat/v5.6.x/package.json @@ -0,0 +1,12 @@ +{ + "name": "ts5.6", + "private": true, + "scripts": { + "test": "node_modules/.bin/tsc --outDir dist" + }, + "dependencies": { + "@bufbuild/protobuf-test": "*", + "@types/node": "24.2.1", + "typescript": "5.6.x" + } +} diff --git a/packages/typescript-compat/v5.6.x/src/uint8array-arraybuffer.ts b/packages/typescript-compat/v5.6.x/src/uint8array-arraybuffer.ts new file mode 100644 index 000000000..5a26970a5 --- /dev/null +++ b/packages/typescript-compat/v5.6.x/src/uint8array-arraybuffer.ts @@ -0,0 +1,28 @@ +import {BinaryWriter, base64Decode, getTextEncoding} from "@bufbuild/protobuf/wire"; +import {DescMessage, type Message, toBinary} from "@bufbuild/protobuf"; + +export function testBinaryWriterFinish() { + const infer = new BinaryWriter().finish(); + const uint8Arr: Uint8Array = new BinaryWriter().finish(); + return [infer, uint8Arr] as const; +} + +export function testBase64Decode() { + const infer = base64Decode(""); + const uint8Arr: Uint8Array = base64Decode(""); + return [infer, uint8Arr] as const; +} + +export function testEncodeUtf8() { + const infer = getTextEncoding().encodeUtf8(""); + const uint8Arr: Uint8Array = getTextEncoding().encodeUtf8(""); + return [infer, uint8Arr] as const; +} + +export function testToBinary() { + const infer = toBinary(null as unknown as DescMessage, null as unknown as Message); + const uint8Arr: Uint8Array = toBinary(null as unknown as DescMessage, null as unknown as Message); + return [infer, uint8Arr] as const; +} + + 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..ec55837c1 --- /dev/null +++ b/packages/typescript-compat/v5.6.x/tsconfig.json @@ -0,0 +1,29 @@ +{ + "include": [ + "./src/**/*.ts", + "../../protobuf-test/src/types.test.ts", + "../../protobuf-test/src/registry.test.ts", + "../../protobuf-test/src/json_types.test.ts", + "../../protobuf-test/src/is-message.test.ts", + "../../protobuf-test/src/generate-code.test.ts", + "../../protobuf-test/src/fields.test.ts", + "../../protobuf-test/src/create.test.ts", + "../../protobuf-test/src/wkt/*.test.ts", + "../../protobuf-test/src/gen/**/*", + "../../protobuf-test/src/codegenv1/types.test.ts" + ], + // These are the default compiler options for TypeScript v5.6.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. */ + "skipLibCheck": true, /* Skip type checking all .d.ts files. */ + // Certain errors are only triggered by actually emitting declaration files, + // see https://github.com/bufbuild/protobuf-es/pull/398 + "declaration": true, + "declarationMap": true + } +} diff --git a/packages/typescript-compat/v5.7.x/package.json b/packages/typescript-compat/v5.7.x/package.json new file mode 100644 index 000000000..8d06cc242 --- /dev/null +++ b/packages/typescript-compat/v5.7.x/package.json @@ -0,0 +1,12 @@ +{ + "name": "ts5.7", + "private": true, + "scripts": { + "test": "node_modules/.bin/tsc --outDir dist" + }, + "dependencies": { + "@bufbuild/protobuf-test": "*", + "@types/node": "24.2.1", + "typescript": "5.7.x" + } +} diff --git a/packages/typescript-compat/v5.7.x/src/uint8array-arraybuffer.ts b/packages/typescript-compat/v5.7.x/src/uint8array-arraybuffer.ts new file mode 100644 index 000000000..d29f8c701 --- /dev/null +++ b/packages/typescript-compat/v5.7.x/src/uint8array-arraybuffer.ts @@ -0,0 +1,32 @@ +import {BinaryWriter, base64Decode, getTextEncoding} from "@bufbuild/protobuf/wire"; +import {DescMessage, type Message, toBinary} from "@bufbuild/protobuf"; + +export function testBinaryWriterFinish() { + const infer = new BinaryWriter().finish(); + const uint8Arr: Uint8Array = new BinaryWriter().finish(); + const uint8ArrBuff: Uint8Array = new BinaryWriter().finish(); + return [infer, uint8Arr, uint8ArrBuff] as const; +} + +export function testBase64Decode() { + const infer = base64Decode(""); + const uint8Arr: Uint8Array = base64Decode(""); + const uint8ArrBuff: Uint8Array = base64Decode(""); + return [infer, uint8Arr, uint8ArrBuff] as const; +} + +export function testEncodeUtf8() { + const infer = getTextEncoding().encodeUtf8(""); + const uint8Arr: Uint8Array = getTextEncoding().encodeUtf8(""); + const uint8ArrBuff: Uint8Array = getTextEncoding().encodeUtf8(""); + return [infer, uint8Arr, uint8ArrBuff] as const; +} + +export function testToBinary() { + const infer = toBinary(null as unknown as DescMessage, null as unknown as Message); + const uint8Arr: Uint8Array = toBinary(null as unknown as DescMessage, null as unknown as Message); + const uint8ArrBuff: Uint8Array = toBinary(null as unknown as DescMessage, null as unknown as Message); + return [infer, uint8Arr, uint8ArrBuff] as const; +} + + diff --git a/packages/typescript-compat/v5.7.x/tsconfig.json b/packages/typescript-compat/v5.7.x/tsconfig.json new file mode 100644 index 000000000..7f9118070 --- /dev/null +++ b/packages/typescript-compat/v5.7.x/tsconfig.json @@ -0,0 +1,31 @@ +{ + "include": [ + "./src/**/*.ts", + "../../protobuf-test/src/types.test.ts", + "../../protobuf-test/src/registry.test.ts", + "../../protobuf-test/src/json_types.test.ts", + "../../protobuf-test/src/is-message.test.ts", + "../../protobuf-test/src/generate-code.test.ts", + "../../protobuf-test/src/fields.test.ts", + "../../protobuf-test/src/create.test.ts", + "../../protobuf-test/src/wkt/*.test.ts", + "../../protobuf-test/src/gen/**/*", + "../../protobuf-test/src/codegenv1/types.test.ts" + ], + // These are the default compiler options for TypeScript v5.7.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 + } +} diff --git a/packages/typescript-compat/v5.8.x/package.json b/packages/typescript-compat/v5.8.x/package.json new file mode 100644 index 000000000..d7cc4a686 --- /dev/null +++ b/packages/typescript-compat/v5.8.x/package.json @@ -0,0 +1,12 @@ +{ + "name": "ts5.8", + "private": true, + "scripts": { + "test": "node_modules/.bin/tsc --outDir dist" + }, + "dependencies": { + "@bufbuild/protobuf-test": "*", + "@types/node": "24.2.1", + "typescript": "5.8.x" + } +} diff --git a/packages/typescript-compat/v5.8.x/src/uint8array-arraybuffer.ts b/packages/typescript-compat/v5.8.x/src/uint8array-arraybuffer.ts new file mode 100644 index 000000000..d29f8c701 --- /dev/null +++ b/packages/typescript-compat/v5.8.x/src/uint8array-arraybuffer.ts @@ -0,0 +1,32 @@ +import {BinaryWriter, base64Decode, getTextEncoding} from "@bufbuild/protobuf/wire"; +import {DescMessage, type Message, toBinary} from "@bufbuild/protobuf"; + +export function testBinaryWriterFinish() { + const infer = new BinaryWriter().finish(); + const uint8Arr: Uint8Array = new BinaryWriter().finish(); + const uint8ArrBuff: Uint8Array = new BinaryWriter().finish(); + return [infer, uint8Arr, uint8ArrBuff] as const; +} + +export function testBase64Decode() { + const infer = base64Decode(""); + const uint8Arr: Uint8Array = base64Decode(""); + const uint8ArrBuff: Uint8Array = base64Decode(""); + return [infer, uint8Arr, uint8ArrBuff] as const; +} + +export function testEncodeUtf8() { + const infer = getTextEncoding().encodeUtf8(""); + const uint8Arr: Uint8Array = getTextEncoding().encodeUtf8(""); + const uint8ArrBuff: Uint8Array = getTextEncoding().encodeUtf8(""); + return [infer, uint8Arr, uint8ArrBuff] as const; +} + +export function testToBinary() { + const infer = toBinary(null as unknown as DescMessage, null as unknown as Message); + const uint8Arr: Uint8Array = toBinary(null as unknown as DescMessage, null as unknown as Message); + const uint8ArrBuff: Uint8Array = toBinary(null as unknown as DescMessage, null as unknown as Message); + return [infer, uint8Arr, uint8ArrBuff] as const; +} + + diff --git a/packages/typescript-compat/v5.8.x/tsconfig.json b/packages/typescript-compat/v5.8.x/tsconfig.json new file mode 100644 index 000000000..79feaa49f --- /dev/null +++ b/packages/typescript-compat/v5.8.x/tsconfig.json @@ -0,0 +1,31 @@ +{ + "include": [ + "./src/**/*.ts", + "../../protobuf-test/src/types.test.ts", + "../../protobuf-test/src/registry.test.ts", + "../../protobuf-test/src/json_types.test.ts", + "../../protobuf-test/src/is-message.test.ts", + "../../protobuf-test/src/generate-code.test.ts", + "../../protobuf-test/src/fields.test.ts", + "../../protobuf-test/src/create.test.ts", + "../../protobuf-test/src/wkt/*.test.ts", + "../../protobuf-test/src/gen/**/*", + "../../protobuf-test/src/codegenv1/types.test.ts" + ], + // These are the default compiler options for TypeScript v5.8.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 + } +}