Skip to content

Commit

Permalink
Update buf CLI and make use of the clean option (#958)
Browse files Browse the repository at this point in the history
  • Loading branch information
timostamm authored Aug 12, 2024
1 parent c8a4f2b commit 5136bd3
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 35 deletions.
60 changes: 30 additions & 30 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions packages/bundle-size/buf.gen.yaml
Original file line number Diff line number Diff line change
@@ -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
opt: target=ts
Expand Down
3 changes: 1 addition & 2 deletions packages/bundle-size/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
"private": true,
"scripts": {
"bundle-size": "tsx src/report.ts",
"pregenerate": "rm -rf src/gen",
"generate": "buf generate buf.build/googleapis/googleapis:9475e2896f8a46d09806149f9382e538",
"postgenerate": "license-header .",
"format": "prettier --write --ignore-unknown '.' '!src/gen/**' '!.turbo'",
"license-header": "license-header",
"lint": "eslint --max-warnings 0 ."
},
"dependencies": {
"@bufbuild/buf": "^1.35.1",
"@bufbuild/buf": "^1.36.0",
"@bufbuild/protobuf": "2.0.0",
"@bufbuild/protoplugin": "2.0.0",
"@bufbuild/protoc-gen-es": "2.0.0",
Expand Down
2 changes: 2 additions & 0 deletions packages/protobuf-example/buf.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
version: v2
inputs:
- directory: proto
# Deletes the directories specified in the `out` field for all plugins before running code generation.
clean: true
plugins:
# The code generator is installed with `npm install @bufbuild/protoc-gen-es`.
- local: protoc-gen-es
Expand Down
3 changes: 1 addition & 2 deletions packages/protobuf-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"build": "../../node_modules/typescript/bin/tsc --noEmit",
"add": "tsx src/add.ts",
"list": "tsx src/list.ts",
"pregenerate": "rm -rf src/gen",
"generate": "buf generate",
"postgenerate": "license-header src/gen",
"format": "prettier --write --ignore-unknown '.' '!.turbo' '!src/gen/**'",
Expand All @@ -15,7 +14,7 @@
},
"type": "module",
"dependencies": {
"@bufbuild/buf": "^1.35.1",
"@bufbuild/buf": "^1.36.0",
"@bufbuild/protobuf": "2.0.0",
"@bufbuild/protoc-gen-es": "2.0.0",
"typescript": "^5.5.4"
Expand Down
2 changes: 1 addition & 1 deletion packages/protoplugin-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"license": "Apache-2.0",
"dependencies": {
"@bufbuild/buf": "^1.35.1",
"@bufbuild/buf": "^1.36.0",
"@bufbuild/protobuf": "^2.0.0",
"@bufbuild/protoc-gen-es": "^2.0.0",
"@bufbuild/protoplugin": "^2.0.0",
Expand Down

0 comments on commit 5136bd3

Please sign in to comment.