@bufbuild/protoc-gen-es 0.4.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -30
- package/dist/cjs/package.json +3 -3
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,38 +1,11 @@
|
|
|
1
1
|
# @bufbuild/protoc-gen-es
|
|
2
2
|
|
|
3
|
-
The code generator for Protocol Buffers for ECMAScript.
|
|
4
|
-
following definition:
|
|
5
|
-
|
|
6
|
-
```protobuf
|
|
7
|
-
message Person {
|
|
8
|
-
string name = 1;
|
|
9
|
-
int32 id = 2; // Unique ID number for this person.
|
|
10
|
-
string email = 3;
|
|
11
|
-
}
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
Is compiled to an ECMAScript class that can be used like this:
|
|
15
|
-
|
|
16
|
-
```typescript
|
|
17
|
-
let pete = new Person({
|
|
18
|
-
name: "pete",
|
|
19
|
-
id: 123
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
let bytes = pete.toBinary();
|
|
23
|
-
pete = Person.fromBinary(bytes);
|
|
24
|
-
pete = Person.fromJsonString('{"name": "pete", "id": 123}');
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
Learn more about the project at [github.com/bufbuild/protobuf-es](https://github.com/bufbuild/protobuf-es).
|
|
28
|
-
|
|
3
|
+
The code generator plugin for Protocol Buffers for ECMAScript. Learn more about the project at [github.com/bufbuild/protobuf-es](https://github.com/bufbuild/protobuf-es).
|
|
29
4
|
|
|
30
5
|
## Installation
|
|
31
6
|
|
|
32
|
-
`protoc-gen-es`
|
|
33
|
-
like [buf](https://github.com/bufbuild/buf) and [protoc](https://github.com/protocolbuffers/protobuf/releases).
|
|
34
|
-
It generates base types - messages and enumerations - from your Protocol Buffer
|
|
35
|
-
schema. The generated code requires the runtime library [@bufbuild/protobuf](https://www.npmjs.com/package/@bufbuild/protobuf).
|
|
7
|
+
`protoc-gen-es` generates base types - messages and enumerations - from your Protocol Buffer
|
|
8
|
+
schema. The generated code requires the runtime library [@bufbuild/protobuf](https://www.npmjs.com/package/@bufbuild/protobuf). It is compatible with Protocol Buffer compilers like [buf](https://github.com/bufbuild/buf) and [protoc](https://github.com/protocolbuffers/protobuf/releases).
|
|
36
9
|
|
|
37
10
|
To install the plugin and the runtime library, run:
|
|
38
11
|
|
package/dist/cjs/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bufbuild/protoc-gen-es",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Protocol Buffers code generator for ECMAScript",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
},
|
|
21
21
|
"preferUnplugged": true,
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@bufbuild/protoplugin": "0.
|
|
23
|
+
"@bufbuild/protoplugin": "1.0.0"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
|
-
"@bufbuild/protobuf": "0.
|
|
26
|
+
"@bufbuild/protobuf": "1.0.0"
|
|
27
27
|
},
|
|
28
28
|
"peerDependenciesMeta": {
|
|
29
29
|
"@bufbuild/protobuf": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bufbuild/protoc-gen-es",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Protocol Buffers code generator for ECMAScript",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
},
|
|
21
21
|
"preferUnplugged": true,
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@bufbuild/protoplugin": "0.
|
|
23
|
+
"@bufbuild/protoplugin": "1.0.0"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
|
-
"@bufbuild/protobuf": "0.
|
|
26
|
+
"@bufbuild/protobuf": "1.0.0"
|
|
27
27
|
},
|
|
28
28
|
"peerDependenciesMeta": {
|
|
29
29
|
"@bufbuild/protobuf": {
|