Skip to content

Commit

Permalink
Merge pull request #238 from vdaas/backport/release/v1.7/feature/buf/…
Browse files Browse the repository at this point in the history
…migrate-to-v2

Backport: buf migrate to v2 (#235)
  • Loading branch information
kmrmt authored Oct 15, 2024
2 parents 9cf70d8 + 23ab2e6 commit eec5957
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 11 deletions.
5 changes: 0 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ NODE_VERSION := $(eval NODE_VERSION := $(shell cat NODE_VERSION))$(NODE_VERSION)
NODE_ROOT = src
NPM_BIN = $(shell npm prefix)

BUF_CONFIGS = \
$(PROTO_ROOT)/buf.yaml \
$(PROTO_ROOT)/buf.lock

SHADOW_ROOT = vald
SHADOW_PROTO_ROOT = $(SHADOW_ROOT)/$(SHADOW_ROOT)

Expand Down Expand Up @@ -211,7 +207,6 @@ $(NODESOURCES): \
$(SHADOWS)
$(NODE_ROOT)/$(SHADOW_ROOT)/%_grpc_pb.js: $(SHADOW_PROTO_ROOT)/%.proto
@$(call green, "generating node files...")
cp -f $(BUF_CONFIGS) $(SHADOW_ROOT)
$(BUF_GEN_PATH) generate --include-imports

$(VALD_DIR):
Expand Down
5 changes: 2 additions & 3 deletions buf.gen.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
version: v1
version: v2
managed:
enabled: true
plugins:
- plugin: buf.build/community/timostamm-protobuf-ts
- remote: buf.build/community/timostamm-protobuf-ts
out: src
# https://github.com/timostamm/protobuf-ts/blob/main/MANUAL.md#the-protoc-plugin
opt:
- add_pb_suffix
- client_grpc1
Expand Down
9 changes: 9 additions & 0 deletions buf.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Generated by buf. DO NOT EDIT.
version: v2
deps:
- name: buf.build/bufbuild/protovalidate
commit: 1baebb0a15184714854fa1ddfd22a29b
digest: b5:6ee11b05d5f54b6257c79c3141eb1050723c4433cf490259ba1d8c02cd08c3e325625527b00fec4dc8b338901f1f3c567ef7ff0698b1c92d09b2dfa6f516c1e6
- name: buf.build/googleapis/googleapis
commit: 28151c0d0a1641bf938a7672c500e01d
digest: b5:93b70089baa4fc05a92d3e52db91a4b7812db3b57b9664f6cb301733938cb630e377a938e8a56779388171c749c1d42a2e9a6c6230f2ff45f127a8102a6a27d0
3 changes: 0 additions & 3 deletions buf.work.yaml

This file was deleted.

19 changes: 19 additions & 0 deletions buf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: v2
modules:
- path: vald
lint:
use:
- DEFAULT
except:
- FIELD_NOT_REQUIRED
- PACKAGE_NO_IMPORT_CYCLE
disallow_comment_ignores: true
breaking:
use:
- FILE
except:
- EXTENSION_NO_DELETE
- FIELD_SAME_DEFAULT
deps:
- buf.build/bufbuild/protovalidate
- buf.build/googleapis/googleapis

0 comments on commit eec5957

Please sign in to comment.