@aptre/protobuf-es-lite 0.5.2 → 0.5.3
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 +1 -22
- package/dist/message.d.ts +1 -1
- package/dist/message.js +2 -0
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@aptre/protobuf-es-lite)
|
|
4
4
|
[](https://www.npmjs.com/package/@aptre/protobuf-es-lite)
|
|
5
|
-
[![DeepWiki
|
|
6
|
-
|
|
7
|
-
[DeepWiki Widget]: https://img.shields.io/badge/DeepWiki-aperturerobotics%2Fprotobuf--es--lite-blue.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAyCAYAAAAnWDnqAAAAAXNSR0IArs4c6QAAA05JREFUaEPtmUtyEzEQhtWTQyQLHNak2AB7ZnyXZMEjXMGeK/AIi+QuHrMnbChYY7MIh8g01fJoopFb0uhhEqqcbWTp06/uv1saEDv4O3n3dV60RfP947Mm9/SQc0ICFQgzfc4CYZoTPAswgSJCCUJUnAAoRHOAUOcATwbmVLWdGoH//PB8mnKqScAhsD0kYP3j/Yt5LPQe2KvcXmGvRHcDnpxfL2zOYJ1mFwrryWTz0advv1Ut4CJgf5uhDuDj5eUcAUoahrdY/56ebRWeraTjMt/00Sh3UDtjgHtQNHwcRGOC98BJEAEymycmYcWwOprTgcB6VZ5JK5TAJ+fXGLBm3FDAmn6oPPjR4rKCAoJCal2eAiQp2x0vxTPB3ALO2CRkwmDy5WohzBDwSEFKRwPbknEggCPB/imwrycgxX2NzoMCHhPkDwqYMr9tRcP5qNrMZHkVnOjRMWwLCcr8ohBVb1OMjxLwGCvjTikrsBOiA6fNyCrm8V1rP93iVPpwaE+gO0SsWmPiXB+jikdf6SizrT5qKasx5j8ABbHpFTx+vFXp9EnYQmLx02h1QTTrl6eDqxLnGjporxl3NL3agEvXdT0WmEost648sQOYAeJS9Q7bfUVoMGnjo4AZdUMQku50McDcMWcBPvr0SzbTAFDfvJqwLzgxwATnCgnp4wDl6Aa+Ax283gghmj+vj7feE2KBBRMW3FzOpLOADl0Isb5587h/U4gGvkt5v60Z1VLG8BhYjbzRwyQZemwAd6cCR5/XFWLYZRIMpX39AR0tjaGGiGzLVyhse5C9RKC6ai42ppWPKiBagOvaYk8lO7DajerabOZP46Lby5wKjw1HCRx7p9sVMOWGzb/vA1hwiWc6jm3MvQDTogQkiqIhJV0nBQBTU+3okKCFDy9WwferkHjtxib7t3xIUQtHxnIwtx4mpg26/HfwVNVDb4oI9RHmx5WGelRVlrtiw43zboCLaxv46AZeB3IlTkwouebTr1y2NjSpHz68WNFjHvupy3q8TFn3Hos2IAk4Ju5dCo8B3wP7VPr/FGaKiG+T+v+TQqIrOqMTL1VdWV1DdmcbO8KXBz6esmYWYKPwDL5b5FA1a0hwapHiom0r/cKaoqr+27/XcrS5UwSMbQAAAABJRU5ErkJggg==
|
|
8
|
-
[DeepWiki]: https://deepwiki.com/aperturerobotics/protobuf-es-lite
|
|
5
|
+
[](https://deepwiki.com/aperturerobotics/protobuf-es-lite)
|
|
9
6
|
|
|
10
7
|
protobuf-es-lite is a TypeScript and JavaScript protobuf implementation.
|
|
11
8
|
|
|
@@ -194,24 +191,6 @@ annotation shadows an underlying problem, for example an unresolvable import. To
|
|
|
194
191
|
remove the annotation and to enable type checks, set the plugin option
|
|
195
192
|
`ts_nocheck=false`.
|
|
196
193
|
|
|
197
|
-
## Developing on MacOS
|
|
198
|
-
|
|
199
|
-
On MacOS, some homebrew packages are required for `yarn gen`:
|
|
200
|
-
|
|
201
|
-
```
|
|
202
|
-
brew install bash make coreutils gnu-sed findutils protobuf
|
|
203
|
-
brew link --overwrite protobuf
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
Add to your .bashrc or .zshrc:
|
|
207
|
-
|
|
208
|
-
```
|
|
209
|
-
export PATH="/opt/homebrew/opt/coreutils/libexec/gnubin:$PATH"
|
|
210
|
-
export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH"
|
|
211
|
-
export PATH="/opt/homebrew/opt/findutils/libexec/gnubin:$PATH"
|
|
212
|
-
export PATH="/opt/homebrew/opt/make/libexec/gnubin:$PATH"
|
|
213
|
-
```
|
|
214
|
-
|
|
215
194
|
## Support
|
|
216
195
|
|
|
217
196
|
Please open a [GitHub issue] with any questions / issues.
|
package/dist/message.d.ts
CHANGED
|
@@ -76,7 +76,7 @@ export interface MessageType<T extends Message<T> = AnyMessage> {
|
|
|
76
76
|
/**
|
|
77
77
|
* Serialize the message to binary data.
|
|
78
78
|
*/
|
|
79
|
-
toBinary(a: Message<T
|
|
79
|
+
toBinary(a: Message<T> | undefined | null, options?: Partial<BinaryWriteOptions>): Uint8Array;
|
|
80
80
|
/**
|
|
81
81
|
* Serialize the message to a JSON value, a JavaScript value that can be
|
|
82
82
|
* passed to JSON.stringify().
|
package/dist/message.js
CHANGED
|
@@ -79,6 +79,8 @@ export function createMessageType(params, exts) {
|
|
|
79
79
|
return mt.fromJson(json, options);
|
|
80
80
|
},
|
|
81
81
|
toBinary(a, options) {
|
|
82
|
+
if (a == null)
|
|
83
|
+
return new Uint8Array(0);
|
|
82
84
|
const opt = binaryMakeWriteOptions(options);
|
|
83
85
|
const writer = opt.writerFactory();
|
|
84
86
|
binaryWriteMessage(a, fields, writer, opt);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aptre/protobuf-es-lite",
|
|
3
3
|
"description": "Lightweight Protobuf codegen for TypeScript and JavaScript.",
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.3",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"url": "git+ssh://git@github.com/aperturerobotics/protobuf-es-lite.git"
|
|
@@ -114,8 +114,8 @@
|
|
|
114
114
|
"lint": "ESLINT_USE_FLAT_CONFIG=false eslint -c .eslintrc.cjs ./",
|
|
115
115
|
"release:version": "npm version patch -m \"release: v%s\" --no-git-tag-version",
|
|
116
116
|
"release:version:minor": "npm version minor -m \"release: v%s\" --no-git-tag-version",
|
|
117
|
-
"release:commit": "git reset && git add package.json && git commit -s -m \"release: v$
|
|
118
|
-
"release:publish": "git push && git push --tags
|
|
117
|
+
"release:commit": "git reset && git add package.json && git commit -s -m \"release: v$(node -p \"require('./package.json').version\")\" && git tag v$(node -p \"require('./package.json').version\")",
|
|
118
|
+
"release:publish": "git push && git push --tags",
|
|
119
119
|
"release": "npm run release:version && npm run release:commit",
|
|
120
120
|
"release:minor": "npm run release:version:minor && npm run release:commit",
|
|
121
121
|
"prepare": "husky"
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
"lz-string": "^1.5.0"
|
|
127
127
|
},
|
|
128
128
|
"devDependencies": {
|
|
129
|
-
"@types/node": "^
|
|
129
|
+
"@types/node": "^24.0.0",
|
|
130
130
|
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
131
131
|
"@typescript-eslint/parser": "^8.0.0",
|
|
132
132
|
"eslint": "^9.3.0",
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"prettier": "^3.2.5",
|
|
138
138
|
"rimraf": "^6.0.0",
|
|
139
139
|
"typescript": "^5.4.5",
|
|
140
|
-
"vitest": "^
|
|
140
|
+
"vitest": "^4.0.0"
|
|
141
141
|
},
|
|
142
142
|
"lint-staged": {
|
|
143
143
|
"package.json": "prettier --write",
|