protoscript
Advanced tools
Changelog
v0.0.12
Protocol Buffers Well-Known Types are now exported from protoscript
. References to well-known types are now imported from protoscript
rather than being generated. This is a non breaking change. If you have well-known types in your project, you can remove the google/protobuf
directory that was generated in previous versions alongside your other .pb.js/ts
files.
The output location of google/protobuf
was a common reason for using dest
in proto.config.mjs
so this change should facilitate zero configuration for a greater number of projects.
Changelog
v0.0.11
Include file extensions in generated file imports
introduced in v0.0.7
for TypeScript users. Generated TypeScript imports will revert to the following:- import { Foo } from './foo.pb.js';
+ import { Foo } from './foo.pb';
When targeting ESM, the TypeScript compiler expects .js
extensions and not .ts
extensions for imports because the compiler does not manipulate import paths: https://www.typescriptlang.org/docs/handbook/esm-node.html.
Including a full extension results in the following TypeScript error:
[tsserver 2691] [E] An import path cannot end with a '.ts' extension.
The TypeScript team's recommendation to use .js
extensions for .ts
file imports when targeting ESM causes a number of issues with the broader JavaScript ecosystem. Until this situation is rectified, ProtoScript will not emit ESM compliant extensions for TypeScript. This only impacts TypeScript users who wish to target ESM in Node.JS using the TypeScript compiler, as bundlers are not pedantic about file extensions. If you're impacted by this, please join the discussion in #202
Changelog
v0.0.10
The following .protoscript.json
:
{
"root": "src",
};
Would be renamed to proto.config.mjs
and changed to the following:
/** @type {import('protoscript').Config} */
export default {
root: "src",
};
Use relative file path for determining path to compiler instead of hard coding from project root. This should interop better with more exotic package tooling and repo setup.
Fix: Improved map
detection. Previously field types suffixed with Entry
were incorrectly flagged as maps. This has been fixed.
Changelog
v0.0.8
Changelog
v0.0.7
Changelog
v0.0.6