diff --git a/package-lock.json b/package-lock.json index caf74aef4..8ec8248d3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -792,10 +792,9 @@ } }, "node_modules/@bufbuild/buf": { - "version": "1.35.1", - "resolved": "https://registry.npmjs.org/@bufbuild/buf/-/buf-1.35.1.tgz", - "integrity": "sha512-POtbb4wRhvgCmmClnuaQTpkHL4ukhFItuS/AaD7QDY0kamn4ExNJz4XlHG5jeJODaQ1Wq3f9qn7UIgUr6CUODw==", - "dev": true, + "version": "1.38.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf/-/buf-1.38.0.tgz", + "integrity": "sha512-5I4pTI3kQl36OBBV5+ggxROt6AoukCQB4NG366wSkQN14eguthdLBGvC73LGC6hmVvwjo+nadwodIpGs2nbOvQ==", "hasInstallScript": true, "bin": { "buf": "bin/buf", @@ -806,22 +805,21 @@ "node": ">=12" }, "optionalDependencies": { - "@bufbuild/buf-darwin-arm64": "1.35.1", - "@bufbuild/buf-darwin-x64": "1.35.1", - "@bufbuild/buf-linux-aarch64": "1.35.1", - "@bufbuild/buf-linux-x64": "1.35.1", - "@bufbuild/buf-win32-arm64": "1.35.1", - "@bufbuild/buf-win32-x64": "1.35.1" + "@bufbuild/buf-darwin-arm64": "1.38.0", + "@bufbuild/buf-darwin-x64": "1.38.0", + "@bufbuild/buf-linux-aarch64": "1.38.0", + "@bufbuild/buf-linux-x64": "1.38.0", + "@bufbuild/buf-win32-arm64": "1.38.0", + "@bufbuild/buf-win32-x64": "1.38.0" } }, "node_modules/@bufbuild/buf-darwin-arm64": { - "version": "1.35.1", - "resolved": "https://registry.npmjs.org/@bufbuild/buf-darwin-arm64/-/buf-darwin-arm64-1.35.1.tgz", - "integrity": "sha512-Yy+sk+8sg3LDvMSZLGUIoMCkZajkQSZkdxO96mpqJagKlEYPLGTtakVFCVNX9KgK/sv1bd9sU55iMGXE3+eIYw==", + "version": "1.38.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-darwin-arm64/-/buf-darwin-arm64-1.38.0.tgz", + "integrity": "sha512-4qGrNMUNboPyWHtWhdo9XzCGn+1/BeNlw963hhr8tGkmmc36oDGzacyw/oj7m43533TGMiLmVTqPuOAyYao+Sw==", "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "darwin" @@ -831,13 +829,12 @@ } }, "node_modules/@bufbuild/buf-darwin-x64": { - "version": "1.35.1", - "resolved": "https://registry.npmjs.org/@bufbuild/buf-darwin-x64/-/buf-darwin-x64-1.35.1.tgz", - "integrity": "sha512-LcscoNTCHFeb5y9sitw4w6HWZtJ4Ja/MDBCUU9A8/OGHJSESV0JjhbvVHGNOIsKUbPq5p/SVjYA/Ab/wlmmpaA==", + "version": "1.38.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-darwin-x64/-/buf-darwin-x64-1.38.0.tgz", + "integrity": "sha512-6yADcSHJayTjviy0i/32DOik4nneDvDjsN0vb1UejHL/g1/0YM8dzo4n677uHaxUe4yKr2ivYkBvKpRnMMsgDQ==", "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "darwin" @@ -847,13 +844,12 @@ } }, "node_modules/@bufbuild/buf-linux-aarch64": { - "version": "1.35.1", - "resolved": "https://registry.npmjs.org/@bufbuild/buf-linux-aarch64/-/buf-linux-aarch64-1.35.1.tgz", - "integrity": "sha512-bPeiSURl8WFxCdawtJjAjUOMqknVTw763NLIDcbYSH1/wTiUbM5QeXCORRlHKXtMGM89SYU5AatcY9UhQ+sn9g==", + "version": "1.38.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-linux-aarch64/-/buf-linux-aarch64-1.38.0.tgz", + "integrity": "sha512-Lo8d6QbZp8o11x4vkRV1Mm3wzrcXdORMYumd7Wd64UPz4l/0R11xu1wgv/gFRuse4djOAwWNNzXp4FEOq4oJwQ==", "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -863,13 +859,12 @@ } }, "node_modules/@bufbuild/buf-linux-x64": { - "version": "1.35.1", - "resolved": "https://registry.npmjs.org/@bufbuild/buf-linux-x64/-/buf-linux-x64-1.35.1.tgz", - "integrity": "sha512-n6ziazYjNH9H1JjHiacGi20rIyZuKnsHjF8qWisO8KGajhnS/7tpq0VzYdorqqWyJ1TcnLBWHj+dWYuGay9Nag==", + "version": "1.38.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-linux-x64/-/buf-linux-x64-1.38.0.tgz", + "integrity": "sha512-YHkYkb0e72waDcLthK8C0ns7vMdecg+AcQugwLq6TLjvwJRyEet97tGfK1QUTGzKgN+874MmqOBCuKKfWc40YQ==", "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "linux" @@ -879,13 +874,12 @@ } }, "node_modules/@bufbuild/buf-win32-arm64": { - "version": "1.35.1", - "resolved": "https://registry.npmjs.org/@bufbuild/buf-win32-arm64/-/buf-win32-arm64-1.35.1.tgz", - "integrity": "sha512-3B65+iA1i/LDjJBseEpAvrkEI7VJqrvW39PyYVkIXSHHT917O+n95g74pn38A0XkggN5lEibLEkipBMDUfwMew==", + "version": "1.38.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-win32-arm64/-/buf-win32-arm64-1.38.0.tgz", + "integrity": "sha512-Tgj/inG+CAhRRHK/7Ku8DufVN/iG7yJs3y2U/A+pYjzdreu/egj0/2JFq9I6wjJKaPELp4+Br659qar6tABxiQ==", "cpu": [ "arm64" ], - "dev": true, "optional": true, "os": [ "win32" @@ -895,13 +889,12 @@ } }, "node_modules/@bufbuild/buf-win32-x64": { - "version": "1.35.1", - "resolved": "https://registry.npmjs.org/@bufbuild/buf-win32-x64/-/buf-win32-x64-1.35.1.tgz", - "integrity": "sha512-iafrcs+1FMlD+3ZjI1kVBHGOluT6YcoAUETrGMbQjRha6dL5s2Ldr0G7zCKLIT13yEKG5QTyP8z8gVEpk8C8wg==", + "version": "1.38.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-win32-x64/-/buf-win32-x64-1.38.0.tgz", + "integrity": "sha512-Br32Xgp/tPInxMx/qNMhrsZQuef3CLeDOTqqSiPf6e2PegrWDQCJsF9jGUQTIy1na11nCAkbShnXm0EJK9bA6g==", "cpu": [ "x64" ], - "dev": true, "optional": true, "os": [ "win32" @@ -10233,6 +10226,7 @@ "version": "1.4.0", "license": "Apache-2.0", "devDependencies": { + "@bufbuild/buf": "^1.36.0", "@bufbuild/protoc-gen-es": "^1.10.0", "@types/jasmine": "^5.0.0", "jasmine": "^5.2.0", @@ -10270,6 +10264,7 @@ "connectconformance": "bin/connectconformance.cjs" }, "devDependencies": { + "@bufbuild/buf": "^1.36.0", "@types/debug": "^4.1.12", "@types/node-forge": "^1.3.9", "@types/tar-stream": "^3.1.3" @@ -10370,6 +10365,7 @@ "version": "1.4.0", "license": "Apache-2.0", "devDependencies": { + "@bufbuild/buf": "^1.36.0", "@bufbuild/protoc-gen-es": "^1.10.0", "@connectrpc/connect-conformance": "^1.4.0", "@connectrpc/protoc-gen-connect-es": "^1.4.0", @@ -10389,6 +10385,7 @@ "packages/connect-web-bench": { "name": "@connectrpc/connect-web-bench", "dependencies": { + "@bufbuild/buf": "^1.36.0", "@bufbuild/protobuf": "^1.10.0", "@bufbuild/protoc-gen-es": "^1.10.0", "@connectrpc/connect-web": "1.4.0", @@ -10408,7 +10405,7 @@ "tsx": "^4.16.5" }, "devDependencies": { - "@bufbuild/buf": "^1.35.1", + "@bufbuild/buf": "^1.36.0", "@bufbuild/protoc-gen-es": "^1.10.0", "@connectrpc/protoc-gen-connect-es": "^1.4.0", "@types/express": "^4.17.18", diff --git a/packages/connect-conformance/buf.gen.yaml b/packages/connect-conformance/buf.gen.yaml index c0b87bdcc..20c01f770 100644 --- a/packages/connect-conformance/buf.gen.yaml +++ b/packages/connect-conformance/buf.gen.yaml @@ -1,8 +1,11 @@ -version: v1 +# Learn more: https://buf.build/docs/configuration/v2/buf-gen-yaml +version: v2 +# Deletes the directories specified in the `out` field for all plugins before running code generation. +clean: true plugins: - - plugin: es + - local: protoc-gen-es out: src/gen opt: ts_nocheck=false,target=ts - - plugin: connect-es + - local: protoc-gen-connect-es out: src/gen opt: ts_nocheck=false,target=ts diff --git a/packages/connect-conformance/package.json b/packages/connect-conformance/package.json index 16aa7bfc3..c4a62177a 100644 --- a/packages/connect-conformance/package.json +++ b/packages/connect-conformance/package.json @@ -14,7 +14,6 @@ "connectconformance": "bin/connectconformance.cjs" }, "scripts": { - "pregenerate": "rm -rf src/gen/*", "generate": "buf generate buf.build/connectrpc/conformance:v1.0.2", "clean": "rm -rf ./dist/*", "build": "npm run build:cjs && npm run build:esm", @@ -30,6 +29,7 @@ "undici": "^5.28.4" }, "devDependencies": { + "@bufbuild/buf": "^1.36.0", "@types/node-forge": "^1.3.9", "@types/tar-stream": "^3.1.3", "@types/debug": "^4.1.12" diff --git a/packages/connect-web-bench/buf.gen.yaml b/packages/connect-web-bench/buf.gen.yaml index 050153e4d..a983f1515 100644 --- a/packages/connect-web-bench/buf.gen.yaml +++ b/packages/connect-web-bench/buf.gen.yaml @@ -1,5 +1,7 @@ # Learn more: https://buf.build/docs/configuration/v2/buf-gen-yaml version: v2 +# Deletes the directories specified in the `out` field for all plugins before running code generation. +clean: true plugins: - local: protoc-gen-es out: src/gen/connectweb @@ -19,3 +21,5 @@ plugins: strategy: all opt: target=ts out: src/gen +inputs: + - module: buf.build/bufbuild/registry:f2077dee5ad44f7d9b660b32bf0958ee diff --git a/packages/connect-web-bench/package.json b/packages/connect-web-bench/package.json index e4b88ac98..54dde5559 100644 --- a/packages/connect-web-bench/package.json +++ b/packages/connect-web-bench/package.json @@ -3,11 +3,11 @@ "private": true, "scripts": { "bundle-size": "tsx src/report.ts", - "pregenerate": "rm -rf src/gen/*", - "generate": "buf generate buf.build/bufbuild/registry:f2077dee5ad44f7d9b660b32bf0958ee", + "generate": "buf generate", "postgenerate": "license-header ." }, "dependencies": { + "@bufbuild/buf": "^1.36.0", "@bufbuild/protobuf": "^1.10.0", "@bufbuild/protoc-gen-es": "^1.10.0", "@connectrpc/connect-web": "1.4.0", diff --git a/packages/connect-web/browserstack/buf.gen.yaml b/packages/connect-web/browserstack/buf.gen.yaml index ad253ec55..cfcffd063 100644 --- a/packages/connect-web/browserstack/buf.gen.yaml +++ b/packages/connect-web/browserstack/buf.gen.yaml @@ -1,9 +1,13 @@ -version: v1 +# Learn more: https://buf.build/docs/configuration/v2/buf-gen-yaml +version: v2 +# Deletes the directories specified in the `out` field for all plugins before running code generation. +clean: true plugins: - - name: es + - local: protoc-gen-es out: browserstack/gen opt: target=ts - - name: connect-es + - local: protoc-gen-connect-es out: browserstack/gen opt: target=ts - +inputs: + - module: buf.build/connectrpc/eliza diff --git a/packages/connect-web/package.json b/packages/connect-web/package.json index 328a11d65..da38d954c 100644 --- a/packages/connect-web/package.json +++ b/packages/connect-web/package.json @@ -22,8 +22,7 @@ "conformance:client:node:promise": "connectconformance --mode client --conf ./conformance/conformance-web-node.yaml -v -- ./conformance/client.ts --browser node", "conformance:client:node:callback": "connectconformance --mode client --conf ./conformance/conformance-web-node.yaml -v --known-failing @./conformance/known-failing-callback-client.txt -- ./conformance/client.ts --browser node --useCallbackClient", "jasmine": "jasmine --config=jasmine.json", - "pregenerate": "rm -rf browserstack/gen/*", - "generate": "buf generate buf.build/connectrpc/eliza --template browserstack/buf.gen.yaml", + "generate": "buf generate --template browserstack/buf.gen.yaml", "karma:browserstack": "karma start browserstack/karma.browserstack.conf.cjs" }, "type": "module", @@ -37,6 +36,7 @@ }, "devDependencies": { "webdriverio": "^8.39.1", + "@bufbuild/buf": "^1.36.0", "@bufbuild/protoc-gen-es": "^1.10.0", "@connectrpc/protoc-gen-connect-es": "^1.4.0", "@connectrpc/connect-conformance": "^1.4.0", diff --git a/packages/connect/buf.gen.yaml b/packages/connect/buf.gen.yaml index 8ded7dcca..2f174d473 100644 --- a/packages/connect/buf.gen.yaml +++ b/packages/connect/buf.gen.yaml @@ -1,7 +1,10 @@ -# buf.gen.yaml defines a local generation template. -# For details, see https://docs.buf.build/configuration/v1/buf-gen-yaml -version: v1 +# Learn more: https://buf.build/docs/configuration/v2/buf-gen-yaml +version: v2 +# Deletes the directories specified in the `out` field for all plugins before running code generation. +clean: true plugins: - - plugin: es + - local: protoc-gen-es out: src/protocol-grpc/gen opt: target=ts +inputs: + - directory: src/protocol-grpc/proto diff --git a/packages/connect/package.json b/packages/connect/package.json index cbaeba704..1506a9786 100644 --- a/packages/connect/package.json +++ b/packages/connect/package.json @@ -10,8 +10,7 @@ }, "scripts": { "clean": "rm -rf ./dist/*", - "pregenerate": "rm -rf src/protocol-grpc/gen/*", - "generate": "buf generate src/protocol-grpc/proto", + "generate": "buf generate", "build": "npm run build:cjs && npm run build:esm && node scripts/update-user-agent.mjs", "build:cjs": "tsc --project tsconfig.json --module commonjs --verbatimModuleSyntax false --moduleResolution node10 --outDir ./dist/cjs --declaration --declarationDir ./dist/cjs && echo >./dist/cjs/package.json '{\"type\":\"commonjs\"}'", "build:esm": "tsc --project tsconfig.json --outDir ./dist/esm --declaration --declarationDir ./dist/esm", @@ -63,6 +62,7 @@ "@bufbuild/protobuf": "^1.10.0" }, "devDependencies": { + "@bufbuild/buf": "^1.36.0", "@bufbuild/protoc-gen-es": "^1.10.0", "@types/jasmine": "^5.0.0", "jasmine": "^5.2.0", diff --git a/packages/example/buf.gen.yaml b/packages/example/buf.gen.yaml index 777100267..fd7e37b71 100644 --- a/packages/example/buf.gen.yaml +++ b/packages/example/buf.gen.yaml @@ -1,10 +1,11 @@ -# buf.gen.yaml defines a local generation template. -# For details, see https://docs.buf.build/configuration/v1/buf-gen-yaml -version: v1 +# Learn more: https://buf.build/docs/configuration/v2/buf-gen-yaml +version: v2 +# Deletes the directories specified in the `out` field for all plugins before running code generation. +clean: true plugins: - - plugin: es + - local: protoc-gen-es opt: target=ts out: src/gen - - plugin: connect-es + - local: protoc-gen-connect-es opt: target=ts out: src/gen diff --git a/packages/example/package.json b/packages/example/package.json index 5f819c3fd..049f13896 100644 --- a/packages/example/package.json +++ b/packages/example/package.json @@ -6,7 +6,6 @@ "lint": "tsc --noEmit", "start": "tsx src/server.ts", "client": "tsx src/client.ts", - "pregenerate": "rm -rf src/gen/*", "generate": "buf generate" }, "engines": { @@ -19,7 +18,7 @@ "tsx": "^4.16.5" }, "devDependencies": { - "@bufbuild/buf": "^1.35.1", + "@bufbuild/buf": "^1.36.0", "@bufbuild/protoc-gen-es": "^1.10.0", "@connectrpc/protoc-gen-connect-es": "^1.4.0", "@types/express": "^4.17.18",