@bufbuild/protoc-gen-es
Advanced tools
Comparing version 0.3.0 to 0.4.0
{ | ||
"name": "@bufbuild/protoc-gen-es", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"description": "Protocol Buffers code generator for ECMAScript", | ||
@@ -23,6 +23,6 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@bufbuild/protoplugin": "0.3.0" | ||
"@bufbuild/protoplugin": "0.4.0" | ||
}, | ||
"peerDependencies": { | ||
"@bufbuild/protobuf": "0.3.0" | ||
"@bufbuild/protobuf": "0.4.0" | ||
}, | ||
@@ -29,0 +29,0 @@ "peerDependenciesMeta": { |
{ | ||
"name": "@bufbuild/protoc-gen-es", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"description": "Protocol Buffers code generator for ECMAScript", | ||
@@ -23,6 +23,6 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@bufbuild/protoplugin": "0.3.0" | ||
"@bufbuild/protoplugin": "0.4.0" | ||
}, | ||
"peerDependencies": { | ||
"@bufbuild/protobuf": "0.3.0" | ||
"@bufbuild/protobuf": "0.4.0" | ||
}, | ||
@@ -29,0 +29,0 @@ "peerDependenciesMeta": { |
@@ -124,12 +124,27 @@ # @bufbuild/protoc-gen-es | ||
By default, we generate JavaScript and TypeScript declaration files, which | ||
produces the smallest code size. If you prefer to generate TypeScript, use | ||
`target=ts`. | ||
produces the smallest code size and is the most compatible with various | ||
bundler configurations. If you prefer to generate TypeScript, use `target=ts`. | ||
### `import_extension=.js` | ||
By default, [protoc-gen-es](https://www.npmjs.com/package/@bufbuild/protoc-gen-es) | ||
(and all other plugins based on [@bufbuild/protoplugin](https://www.npmjs.com/package/@bufbuild/protoplugin)) | ||
uses a `.js` file extensions in import paths, even in TypeScript files. | ||
This is unintuitive, but necessary for [ECMAScript modules in Node.js](https://www.typescriptlang.org/docs/handbook/esm-node.html). | ||
Unfortunately, not all bundlers and tools have caught up yet, and Deno | ||
requires `.ts`. With this plugin option, you can replace `.js` extensions | ||
in import paths with the given value. For example, set | ||
- `import_extension=none` to remove the `.js` extension | ||
- `import_extension=.ts` to replace the `.js` extension with `.ts` | ||
### `keep_empty_files=true` | ||
By default, [protoc-gen-es](https://www.npmjs.com/package/@bufbuild/protoc-gen-es) | ||
(and all other plugins based on [@bufbuild/protoplugin](https://www.npmjs.com/package/@bufbuild/protoplugin)) | ||
omit empty files from the plugin output. This option disables pruning of | ||
empty files, to allow for smooth interoperation with Bazel and similar | ||
By default, [protoc-gen-es](https://www.npmjs.com/package/@bufbuild/protoc-gen-es) | ||
(and all other plugins based on [@bufbuild/protoplugin](https://www.npmjs.com/package/@bufbuild/protoplugin)) | ||
omit empty files from the plugin output. This option disables pruning of | ||
empty files, to allow for smooth interoperation with Bazel and similar | ||
tooling that requires all output files to be declared ahead of time. | ||
Unless you use Bazel, it is very unlikely that you need this option. |
145484
150
+ Added@bufbuild/protobuf@0.4.0(transitive)
+ Added@bufbuild/protoplugin@0.4.0(transitive)
- Removed@bufbuild/protobuf@0.3.0(transitive)
- Removed@bufbuild/protoplugin@0.3.0(transitive)
Updated@bufbuild/protoplugin@0.4.0