[Snyk] Upgrade @bufbuild/protobuf from 1.10.0 to 2.0.0#57
Open
Conversation
Snyk has created this PR to upgrade @bufbuild/protobuf from 1.10.0 to 2.0.0. See this package in npm: @bufbuild/protobuf See this project in Snyk: https://app.snyk.io/org/as203038/project/2aa6cb33-d0d4-4ea7-bba5-9f2bd3287adb?utm_source=github&utm_medium=referral&page=upgrade-pr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Snyk has created this PR to upgrade @bufbuild/protobuf from 1.10.0 to 2.0.0.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
The recommended version is 8 versions ahead of your current version.
The recommended version was released on a month ago.
Release notes
Package name: @bufbuild/protobuf
-
2.0.0 - 2024-07-30
import { create, toBinary } from "@ bufbuild/protobuf";
- #397 Provide custom options at runtime
- #551 Generated types allow assigning wrong message type if it is a superset of the target type
- #414 Improvements for proto2 required
- #738 type-save full enum value names
- #928 Better interop with 3rd party frameworks requiring plain objects
- #508 JSON types
-
2.0.0-beta.3 - 2024-07-23
- Add GeneratedFile.array by @ timostamm in #935
- Add DescEnum.value by @ timostamm in #927
- Rename GenDescMessage to GenMessage by @ timostamm in #925
- Improve plugin option import_extension by @ timostamm in #909
- Add $typeName first by @ timostamm in #923
- Fix createFileRegistry() with empty arguments by @ timostamm in #933
-
2.0.0-beta.2 - 2024-06-26
- Avoid Array.flatMap by @ timostamm in #904
-
2.0.0-beta.1 - 2024-06-24
- Bump
- Improve parameter parsing by @ srikrsna-buf in #880
- Throw errors in ReflectMessage instead of returning them by @ timostamm in #882
- Add typeOnly argument to GeneratedFile.import by @ timostamm in #887
- Fix create() with wrapper oneof field by @ timostamm in #889
- Improve clash resolution in generated names by @ timostamm in #888
- Use suffix "Schema" for generated descriptors by @ timostamm in #890
- Use JsonObject to represent google.protobuf.Struct by @ timostamm in #893
- JSON Types by @ timostamm in #866
- Add mutable registry by @ timostamm in #898
- Avoid the prototype chain with editions if possible by @ timostamm in #897
-
2.0.0-alpha.4 - 2024-06-04
- Remove addListItem and setMapEntry from ReflectMessage by @ timostamm in #875
- Relax validation in BinaryWriter by @ timostamm in #877
-
2.0.0-alpha.3 - 2024-06-03
- Move Registry to the top level exports by @ timostamm in #841
- Rename
- Fix Registry exports by @ timostamm in #846
- Fix JSON error message by @ timostamm in #849
- Replace LongType with a boolean by @ timostamm in #851
- Update generated service types to use generated desc types by @ srikrsna-buf in #856
- Remove
- Rename JSON serialization option emitDefaultValues by @ timostamm in #863
- Change return type of merge functions by @ timostamm in #867
- Add
-
2.0.0-alpha.2 - 2024-05-13
- Change default value of plugin option
- Bump supported version of TypeScript to 4.9.5 by @ timostamm in #805
- Remove Node10 subpath fallbacks by @ timostamm in #804
- Remove DescField.optional by @ timostamm in #808
- Mark all exports from codegenv1 private by @ timostamm in #806
- Strip only last .proto suffix for DescFile.name by @ timostamm in #807
- Fix wrapper extension JSON serialization by @ timostamm in #821
- Check for matching field numbers in StartGroup / EndGroup tags by @ timostamm in #810
- For deprecated elements, generate a
- Add option accessors by @ timostamm in #828
- Support option retention by @ timostamm in #827
- Introduce DescMessage.field by @ timostamm in #839
- Add function parentTypes() to reflect by @ timostamm in #817
- Make DescField.presence available for all fields by @ timostamm in #822
- Generate comments for feature options by @ timostamm in #809
- Return zero values from ReflectMessage.get by @ timostamm in #813
- Rely on ReflectMessage for jstype=JS_STRING by @ timostamm in #823
- Add localName property to DescField and others by @ timostamm in #834
- Avoid JIT deoptimizations by @ timostamm in #836
- Speed up reflect with classes by @ timostamm in #837
-
2.0.0-alpha.1 - 2024-04-22
import { create, toBinary, fromBinary, fromJsonString } from "@ bufbuild/protobuf";
- #397 Provide custom options at runtime
- #551 Generated types allow assigning wrong message type if it is a superset of the target type
- #414 Improvements for proto2 required
- #738 type-save full enum value names
- #928 Better interop with 3rd party frameworks requiring plain objects
- #508 JSON types
-
1.10.0 - 2024-05-30
- Skip null values in message initializer object by @ timostamm in #862
- Fix Node10 subpath fallbacks by @ timostamm in #803
- Check for matching field numbers in StartGroup / EndGroup tags by @ smaye81 in #816
- Update to google protobuf v27.0 by @ timostamm in #854
from @bufbuild/protobuf GitHub release notesWhat's new in version 2
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 { 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:
Tip
Take a look at the upgrade guide to learn more.
Note
Connect-ES does not support version 2 yet. We will update it shortly.
Contributors
Thanks to @ srikrsna-buf for his contributions to v2!
What's Changed
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.Full Changelog: v2.0.0-beta.2...v2.0.0-beta.3
What's Changed
This is the second 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.Full Changelog: v2.0.0-beta.1...v2.0.0-beta.2
What's Changed
This is the first 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.typescriptversion in protoplugin by @ srikrsna-buf in #879Full Changelog: v2.0.0-alpha.4...v2.0.0-beta.1
What's Changed
This is the fourth alpha release for version 2. See v2.0.0-alpha.1 for an introduction.
Full Changelog: v2.0.0-alpha.3...v2.0.0-alpha.4
What's Changed
This is the third alpha release for version 2. See v2.0.0-alpha.1 for an introduction.
exportDecltoexportby @ srikrsna-buf in #843ecmascriptsubpath by @ srikrsna-buf in #857methodfield toDescMethod; Improve generated service types by @ srikrsna-buf in #874Full Changelog: v2.0.0-alpha.2...v2.0.0-alpha.3
What's Changed
This is the second alpha release for version 2. See v2.0.0-alpha.1 for an introduction.
Breaking
import_extensiontononeby @ srikrsna-buf in #832Fixes
@ deprecatedtag on descriptors by @ timostamm in #818New Features
Performance improvements
Full Changelog: v2.0.0-alpha.1...v2.0.0-alpha.2
What's new in version 2
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 uses classes. Instead, we generate a type and a descriptor for every message, and provide functions to create a new instance, for serialization, and other concerns. Here is a simple example:
import { UserDesc } from "./gen/user_pb.js";
let user = create(UserDesc, {
firstName: "Homer",
lastName: "Simpson",
active: true,
locations: ["Springfield"],
projects: { SPP: "Springfield Power Plant" },
manager: {
firstName: "Montgomery",
lastName: "Burns",
},
});
const bytes = toBinary(UserDesc, user);
user = fromBinary(UserDesc, bytes);
user = fromJsonString(UserDesc, '{"firstName": "Homer", "lastName": "Simpson"}');
This approach solves several outstanding issues, such as:
If you use proto3, messages are now plain objects. Files with proto2 and editions use the prototype chain to track field presence.
Please note that this is an alpha release, and APIs might still change. We're also missing documentation yet. But if you want to try it out, we welcome your feedback!
This release is published with the
alphatag. To install the alpha packages, you can run:Contributors
Thanks to @ srikrsna-buf for his contributions to v2!
What's Changed
Full Changelog: v1.9.0...v1.10.0
Important
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information: