To support Protobuf editions, we have to make breaking changes that also affect users of proto2 and proto3. This prompted us to make more extensive changes that take feedback from version 1 into account:
We no longer use classes. Instead, we generate a schema object and a type for every message. To create a new instance, to serialize, and for other concerns, we provide functions. Here is a simple example:
import { create, toBinary } from "@bufbuild/protobuf";
import { UserSchema } from "./gen/example_pb";
let user = create(UserSchema, {
firstName: "Homer",
lastName: "Simpson",
active: true,
});
const bytes = toBinary(UserSchema, user);
If you use proto3, messages are now plain objects. Files with proto2 and editions use the prototype chain to track field presence.
This approach solves several outstanding issues, such as:
This is the third beta release for version 2. See v2.0.0-alpha.1 for an introduction. To install beta packages, run npm install @bufbuild/protobuf@beta @bufbuild/protoc-gen-es@beta.
Fix the git input parameter ref to align with the git notion of a ref. This allows for the use of branch names, tag names, and commit hashes.
Fix unexpected buf build errors with absolute path directory inputs without workspace and/or module configurations (e.g. buf.yaml, buf.work.yaml) and proto file paths set to the --path flag.
v1.35.0
Add buf generate --clean flag that will delete the directories, jar files, or zip files that the
plugins will write to, prior to generation. Allows cleaning of existing assets without having
to call rm -rf.
Deprecate --username flag on and username prompt on buf registry login. A username is no longer
required to log in.
Fix the git input parameter ref to align with the git notion of a ref. This allows for the use
of branch names, tag names, and commit hashes.
Fix unexpected buf build errors with absolute path directory inputs without workspace and/or
module configurations (e.g. buf.yaml, buf.work.yaml) and proto file paths set to the --path flag.
[v1.35.0] - 2024-07-22
Add buf generate --clean flag that will delete the directories, jar files, or zip files that the
plugins will write to, prior to generation. Allows cleaning of existing assets without having
to call rm -rf.
Deprecate --username flag on and username prompt on buf registry login. A username is no longer
required to log in.
Add --list-services and --list-methods flags to buf curl, which trigger the command to list
known services or methods in the RPC schema, instead of invoking an RPC method.
To support Protobuf editions, we have to make breaking changes that also affect users of proto2 and proto3. This prompted us to make more extensive changes that take feedback from version 1 into account:
We no longer use classes. Instead, we generate a schema object and a type for every message. To create a new instance, to serialize, and for other concerns, we provide functions. Here is a simple example:
import { create, toBinary } from "@bufbuild/protobuf";
import { UserSchema } from "./gen/example_pb";
let user = create(UserSchema, {
firstName: "Homer",
lastName: "Simpson",
active: true,
});
const bytes = toBinary(UserSchema, user);
If you use proto3, messages are now plain objects. Files with proto2 and editions use the prototype chain to track field presence.
This approach solves several outstanding issues, such as:
This is the third beta release for version 2. See v2.0.0-alpha.1 for an introduction. To install beta packages, run npm install @bufbuild/protobuf@beta @bufbuild/protoc-gen-es@beta.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Bumps the dev-dependencies group with 12 updates in the / directory:
1.10.0
2.0.0
1.34.0
1.35.1
1.10.0
2.0.0
0.1.19
0.1.21
0.0.3
0.1.0
20.14.10
22.0.0
1.6.0
2.0.4
3.3.2
3.3.3
8.1.0
8.2.3
4.16.2
4.16.3
5.5.3
5.5.4
1.6.0
2.0.4
Updates
@bufbuild/protobuf
from 1.10.0 to 2.0.0Release notes
Sourced from
@bufbuild/protobuf
's releases.... (truncated)
Commits
76cbbc1
Release 2.0.0 (#950)64b8e61
Switch to v2 (#948)1bb6d8a
Add keywords to package.json files (#912)5e0b35c
Add mutable registry (#899)Updates
@bufbuild/buf
from 1.34.0 to 1.35.1Release notes
Sourced from
@bufbuild/buf
's releases.Changelog
Sourced from
@bufbuild/buf
's changelog.Commits
f37053e
Release v1.35.1 (#3186)9b236ca
Only check directories in workspace targeting fallback logic (#3184)8be3d05
Validate domain in buf registry login and logout (#3182)8c22e90
Fix git ref to allow branches and tags (#3095)eee05d1
Return to development (#3179)da90244
Release v1.35.0 (#3178)0b436b4
Add comments to addFuncs (#3172)8996858
Add OAuth2 client to support device flow (#3143)0d9adad
Export target framework conversion functions (#3164)afb50e1
Add new cmake registry type (#3156)Updates
@bufbuild/protoc-gen-es
from 1.10.0 to 2.0.0Release notes
Sourced from
@bufbuild/protoc-gen-es
's releases.... (truncated)
Commits
76cbbc1
Release 2.0.0 (#950)64b8e61
Switch to v2 (#948)1bb6d8a
Add keywords to package.json files (#912)Updates
@jsse/eslint-config
from 0.1.19 to 0.1.21Commits
Updates
@jsse/tsconfig
from 0.0.3 to 0.1.0Updates
@types/node
from 20.14.10 to 22.0.0Commits
Updates
@vitest/coverage-v8
from 1.6.0 to 2.0.4Release notes
Sourced from
@vitest/coverage-v8
's releases.... (truncated)
Commits
400481f
chore: release v2.0.49057614
fix(coverage): consistent type-only file handling (#6183)a852b16
refactor: enable isolatedDeclarations in snapshot and spy packages (#6146)81b8d67
chore: release v2.0.399a12ae
chore: release v2.0.280a43d5
fix(browser): inline pretty-format and replace picocolors with tinyrainbow (#...16eb6c8
chore: release v2.0.11b150a3
chore: release v2.0.05611895
chore: release v2.0.0-beta.13368c137
fix(coverage): remove work-around for implicitelse
(#6014)Updates
prettier
from 3.3.2 to 3.3.3Release notes
Sourced from prettier's releases.
Changelog
Sourced from prettier's changelog.
... (truncated)
Commits
5282938
Release 3.3.39102b73
Add parentheses for decorator expressions (#16458)6bbd461
chore(deps): update eslint related dependencies (#16478)04b560f
chore(deps): update dependency browserslist to v4.23.2 (#16475)614f070
chore(deps): update typescript-eslint to v8.0.0-alpha.41 (#16477)d59a15d
chore(deps): update dependency npm-run-all2 to v6.2.2 (#16476)5ca2fc9
Support Angular@let
declaration syntax (#16474)bfcfdcc
chore(deps): update babel to v7.24.8 (#16472)977c161
chore(deps): update dependency acorn to v8.12.1 (#16464)550606e
chore(deps): update babel to v7.24.8 (#16470)Updates
tsup
from 8.1.0 to 8.2.3Release notes
Sourced from tsup's releases.
Commits
048c93b
fix: get metafile on windows2de6dd5
fix: Revert "refactor: replaceglobby
with faster alternative (#1158)"6e66f29
chore: upgrade deps44c88a7
fix(dts): terminate worker when work is done (#1142)0f0b4b2
refactor: replaceglobby
with faster alternative (#1158)aeda546
refactor: replace colorette with picocolors0303783
docs: update tsup API docs link [ci skip] (#1160)31cffed
docs: use jsdocs.io for now, closes #1145, #1159e7ced34
feat: add option to retain node protocol809c57a
chore: upgrade tsup & depsUpdates
tsx
from 4.16.2 to 4.16.3Release notes
Sourced from tsx's releases.
Commits
ca4bf11
refactor(cjs): resolver organized in multiple files3df00f4
fix(resolver): prioritize requested path in dependencies1c3fd22
docs(usages): update link to knip usage (#622)8344163
chore(deps): update dependency node to v20.16.0 (#621)178f338
chore: remove unusedeslintConfig
(#620)1affdd0
docs: make logos easier to see7d38e42
docs: fix marquee bug on safarie5ddeb3
docs: fix marquee on safari630c4d6
docs: update sponsor link338a8a0
docs(usages): add arktype to projects (#616)Updates
typescript
from 5.5.3 to 5.5.4Release notes
Sourced from typescript's releases.
Commits
c8a7d58
Bump version to 5.5.4 and LKGc0ded04
🤖 Pick PR #58771 (Allow references to the global Symb...) into release-5.5 (#...5ba41e2
🤖 Pick PR #59208 (Write non-missing undefined on mapp...) into release-5.5 (#...b075332
🤖 Pick PR #59337 (Allow declarationMap to be emitted ...) into release-5.5 (#...9dd6f91
Cherry-pick "Stop using latest Node in CI" to release-5.5 (#59348)bf0ddaf
🤖 Pick PR #59070 (Delay the calculation of common sou...) into release-5.5 (#...a44e2d9
🤖 Pick PR #59160 (Fixed crash on authored import type...) into release-5.5 (#...f35206d
🤖 Pick PR #59325 (Don't skip markLinkedReferences on ...) into release-5.5 (#...1109550
Fix baselines on release-5.5 (#59330)8794318
🤖 Pick PR #59215 (Fix codefix crash on circular alias...) into release-5.5 (#...Updates
vitest
from 1.6.0 to 2.0.4Release notes
Sourced from vitest's releases.
... (truncated)
Commits
400481f
chore: release v2.0.45da45db
fix(coverage): ignore*.cts
files (#6189)f68453f
feat(coverage): addthresholds.\<glob>.100
option (#6174)02e3f00
fix(coverage): global thresholds to include files from glob thresholds (#6172)807a2cb
fix: resolve assets imported withrequire
(#6159)f1ef2f6
refactor(runner): add docs to@vitest/runner
, remove barrel files (#6126)f55dc00
chore(deps): update all non-major dependencies (#6046)3826941
fix: one-line environment options (#5105)81b8d67
chore: release v2.0.309dc75c
chore(deps): update dependency@edge-runtime/vm
to v4 (#6047)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show