@aptre/protobuf-es-lite 0.4.7 → 0.4.9
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 +24 -21
- package/dist/scalar.d.ts +1 -1
- package/package.json +7 -9
package/README.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
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 Widget]][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
9
|
|
|
6
10
|
protobuf-es-lite is a TypeScript and JavaScript protobuf implementation.
|
|
7
11
|
|
|
@@ -146,9 +150,9 @@ bundler configurations. If you prefer to generate TypeScript, use `target=ts`.
|
|
|
146
150
|
|
|
147
151
|
### `import_extension=.js`
|
|
148
152
|
|
|
149
|
-
By default,
|
|
150
|
-
|
|
151
|
-
|
|
153
|
+
By default, protoc-gen-es (and all other plugins based on
|
|
154
|
+
[protoplugin](./src/protoplugin)) uses a `.js` file extensions in import paths,
|
|
155
|
+
even in TypeScript files.
|
|
152
156
|
|
|
153
157
|
This is unintuitive, but necessary for [ECMAScript modules in Node.js](https://www.typescriptlang.org/docs/handbook/esm-node.html).
|
|
154
158
|
Unfortunately, not all bundlers and tools have caught up yet, and Deno
|
|
@@ -160,11 +164,10 @@ in import paths with the given value. For example, set
|
|
|
160
164
|
|
|
161
165
|
### `js_import_style`
|
|
162
166
|
|
|
163
|
-
By default,
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
`require()` calls.
|
|
167
|
+
By default, protoc-gen-es (and all other plugins based on
|
|
168
|
+
[protoplugin](./src/protoplugin)) generates ECMAScript `import` and `export`
|
|
169
|
+
statements. For use cases where CommonJS is difficult to avoid, this option can
|
|
170
|
+
be used to generate CommonJS `require()` calls.
|
|
168
171
|
|
|
169
172
|
Possible values:
|
|
170
173
|
- `js_import_style=module` generate ECMAScript `import` / `export` statements -
|
|
@@ -173,23 +176,23 @@ Possible values:
|
|
|
173
176
|
|
|
174
177
|
### `keep_empty_files=true`
|
|
175
178
|
|
|
176
|
-
By default,
|
|
177
|
-
(
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
Unless you use Bazel, it is very unlikely that you need this option.
|
|
179
|
+
By default, protoc-gen-es (and all other plugins based on
|
|
180
|
+
[protoplugin](./src/protoplugin)) omits empty files from the plugin output. This
|
|
181
|
+
option disables pruning of empty files, to allow for smooth interoperation with
|
|
182
|
+
Bazel and similar tooling that requires all output files to be declared ahead of
|
|
183
|
+
time. Unless you use Bazel, it is very unlikely that you need this option.
|
|
182
184
|
|
|
183
185
|
### `ts_nocheck=false`
|
|
184
186
|
|
|
185
|
-
By default,
|
|
186
|
-
|
|
187
|
-
|
|
187
|
+
By default, protoc-gen-es (and all other plugins based on
|
|
188
|
+
[protoplugin](./src/protoplugin)) generates an annotation at the top of each
|
|
189
|
+
file: `// @ts-nocheck`.
|
|
188
190
|
|
|
189
|
-
We generate the annotation to support a wide range of compiler configurations
|
|
190
|
-
future changes to the language. But there can be situations where the
|
|
191
|
-
shadows an underlying problem, for example an unresolvable import. To
|
|
192
|
-
the annotation and to enable type checks, set the plugin option
|
|
191
|
+
We generate the annotation to support a wide range of compiler configurations
|
|
192
|
+
and future changes to the language. But there can be situations where the
|
|
193
|
+
annotation shadows an underlying problem, for example an unresolvable import. To
|
|
194
|
+
remove the annotation and to enable type checks, set the plugin option
|
|
195
|
+
`ts_nocheck=false`.
|
|
193
196
|
|
|
194
197
|
## Developing on MacOS
|
|
195
198
|
|
package/dist/scalar.d.ts
CHANGED
|
@@ -76,4 +76,4 @@ export declare function isScalarZeroValue(type: ScalarType, value: unknown): boo
|
|
|
76
76
|
* If clone is set, Uint8Array will always be copied to a new value.
|
|
77
77
|
*/
|
|
78
78
|
export declare function normalizeScalarValue<T>(type: ScalarType, value: T | null | undefined, clone: boolean, longType?: LongType): T;
|
|
79
|
-
export declare function toU8Arr(input: ArrayLike<number>, clone: boolean): Uint8Array
|
|
79
|
+
export declare function toU8Arr(input: ArrayLike<number>, clone: boolean): Uint8Array<ArrayBufferLike>;
|
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.4.
|
|
4
|
+
"version": "0.4.9",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"url": "git+ssh://git@github.com/aperturerobotics/protobuf-es-lite.git"
|
|
@@ -62,29 +62,27 @@
|
|
|
62
62
|
"release:commit": "git reset && git add package.json && git commit -s -m \"release: v$npm_package_version\" && git tag v$npm_package_version",
|
|
63
63
|
"release:publish": "git push && git push --tags && npm run build && npm publish",
|
|
64
64
|
"release": "npm run release:version && npm run release:commit",
|
|
65
|
-
"release:minor": "npm run release:version:minor && npm run release:commit"
|
|
65
|
+
"release:minor": "npm run release:version:minor && npm run release:commit",
|
|
66
|
+
"prepare": "husky"
|
|
66
67
|
},
|
|
67
68
|
"preferUnplugged": true,
|
|
68
|
-
"pre-commit": [
|
|
69
|
-
"precommit"
|
|
70
|
-
],
|
|
71
69
|
"dependencies": {
|
|
72
70
|
"@typescript/vfs": "^1.5.0",
|
|
73
71
|
"lz-string": "^1.5.0"
|
|
74
72
|
},
|
|
75
73
|
"devDependencies": {
|
|
76
|
-
"@types/node": "^
|
|
74
|
+
"@types/node": "^22.7.5",
|
|
77
75
|
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
78
76
|
"@typescript-eslint/parser": "^8.0.0",
|
|
79
77
|
"eslint": "^9.3.0",
|
|
80
|
-
"eslint-config-prettier": "^
|
|
78
|
+
"eslint-config-prettier": "^10.1.2",
|
|
81
79
|
"eslint-plugin-unused-imports": "^4.0.0",
|
|
80
|
+
"husky": "^9.1.7",
|
|
82
81
|
"lint-staged": ">=15.2.5",
|
|
83
|
-
"pre-commit": "^1.2.2",
|
|
84
82
|
"prettier": "^3.2.5",
|
|
85
83
|
"rimraf": "^6.0.0",
|
|
86
84
|
"typescript": "^5.4.5",
|
|
87
|
-
"vitest": "^
|
|
85
|
+
"vitest": "^3.1.2"
|
|
88
86
|
},
|
|
89
87
|
"lint-staged": {
|
|
90
88
|
"package.json": "prettier --write",
|