Comments (5)
@alexander-fenster Thanks for responding!
Totally understand the situation and the pain of competing priorities.
I think the major issue for me and many other is the lack of support for well-known types such as StringValue, Struct etc. There's quite a few issues and PRs open with a lot of comments and pings (#1042, #839, #677, #1271, #929, ...) some dating back to 2017. So as far as my specific concerns go, it would be nice to have some kind of plan to sort that out.
from protobuf.js.
@timosaikkonen For well-known types support, take a look at proto3-json-serializer
NPM module that I wrote a couple years ago after figuring out that supporting spec-compliant proto3 JSON is probably easier to implement externally rather than by making big changes here. The serializer library will convert from a valid JSON to your schema and back, including the wrapper types (google.protobuf.Struct
and its descendants). The price you pay for that is a recursive traversing of your object, but we use it in our (Google Cloud) libraries without problems so far.
from protobuf.js.
Hi @timosaikkonen! The owner of the project is @dcodeIO so please direct all ownership related questions to him.
@bcoe and I work for Google Cloud client libraries (which use protobuf.js) and we spend some time maintaining the repository, sending some fixes or features. We try to keep up on project health in terms of fixing critical problems and making sure that all reported vulnerabilities are fixed soon enough, but I cannot commit more than just a few hours per month on doing it - so doing whatever I can here.
If there's anything that you (or anyone else) need to get merged and it's a small fix (non-breaking and not a huge refactor), I'll be happy to spend my Friday afternoon reviewing and merging it. For anything that requires immediate attention, don't hesitate to ping me by email (my last name at google dot com). I'm not great in responding to GitHub notifications, which I do receive a lot (well illustrated by the 3 weeks response time to this issue :) ) so sorry if you feel there's no one here - we are here, just not fulltime.
from protobuf.js.
I was concerned about this projects health, so I was seeking an alternative to protobufjs. I stumbled upon protobuf-ts.
https://www.npmjs.com/package/@protobuf-ts/plugin
Some advantages that I discovered are....
- It uses protoc, so it supports more proto3 features (e.g. proto3 optional fields)
- It is fairly easy to get started because the author maintains an install script for protoc.
- The typescript is a bit more verbose, but generates much safer and more idiomatic typescript type definitions. These diverge somewhat from the protobuf JSON representation, but that was necessary for type safety and you can still convert protobuf JSON into a protobuf-ts object if necessary.
I also was having issues with protobufjs enums. I didn't have to hack the files to get enums to work in typescript.
I hope this is useful to someone like me looking for an alternative.
from protobuf.js.
Speaking about well supported alternatives, for a new project not concerned about compatibility with the existing code base, I would suggest looking at https://buf.build. Those folks support TypeScript natively and the project is alive. They have their own idea of how to represent various protobuf features (such as oneofs, enums, and bytes
fields) internally, which will make it very hard to migrate if you decide to do so, but it should not be a concern for new projects.
[disclaimer: I'm not affiliated with their project in any way, this is the result of my own investigation of the area]
from protobuf.js.
Related Issues (20)
- Prototype Pollution vulnerability HOT 6
- CustomError [ProtocolError]: missing required 'header'
- Support repeated options
- `pbts` does not generate comments for enum properties
- Descriptor binaries does not match the binaries generated using `protoc`
- Javascript enviroment, Json to protobuf text format
- C++ and JS compatability HOT 2
- npm exec `could not determine executable to run`
- Latest protobuf release not listed on CDNs HOT 10
- v6.11.4 still listed as vulnerable to CVE-2023-36665 HOT 1
- `pbts` generating syntax error on types when using multi-line `@typedef`s in static code HOT 1
- Unexpected null behaviour (TS, --force-message, properties and members) HOT 2
- Support `l_bracket SpecialFieldName r_bracket` in optionValues
- make it clear in doc that snake_case get converted to CamelCase
- Calling `ns.remove(node)` on renamed nodes does not work.
- `@types/node` is listed as a prod dependency, adds 2MB to package size (unnecessarily?)
- utf8 read function frequent string concatenation generate a large number of ConsString objects
- U64 deserialization confusion HOT 2
- v7.3.3 release is missing `dist` directory HOT 3
- "length" is outside of buffer bounds HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from protobuf.js.