@forwardimpact/libcodegen 0.1.50 → 0.1.52

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.
@@ -20,9 +20,13 @@ import {
20
20
  } from "@forwardimpact/libcodegen";
21
21
  import { createStorage } from "@forwardimpact/libstorage";
22
22
 
23
- const { version: VERSION } = JSON.parse(
24
- readFileSync(new URL("../package.json", import.meta.url), "utf8"),
25
- );
23
+ // `bun build --compile` injects FIT_CODEGEN_VERSION via --define, eliminating
24
+ // the readFileSync branch in the compiled binary (which would ENOENT against
25
+ // the bunfs virtual mount). Source execution falls through to package.json.
26
+ const VERSION =
27
+ process.env.FIT_CODEGEN_VERSION ||
28
+ JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"))
29
+ .version;
26
30
 
27
31
  const definition = {
28
32
  name: "fit-codegen",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forwardimpact/libcodegen",
3
- "version": "0.1.50",
3
+ "version": "0.1.52",
4
4
  "description": "Protobuf code generation — keep types in sync with proto definitions without hand-writing.",
5
5
  "keywords": [
6
6
  "codegen",
@@ -49,7 +49,7 @@
49
49
  "@forwardimpact/libstorage": "^0.1.53",
50
50
  "@forwardimpact/libtelemetry": "^0.1.22",
51
51
  "@forwardimpact/libutil": "^0.1.64",
52
- "@grpc/proto-loader": "^0.8.0",
52
+ "@grpc/proto-loader": "^0.8.1",
53
53
  "mustache": "^4.2.0",
54
54
  "protobufjs": "^7.5.6",
55
55
  "protobufjs-cli": "2.0.1"