@forwardimpact/libutil 0.1.79 → 0.1.81

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.
@@ -8,9 +8,13 @@ import { createStorage } from "@forwardimpact/libstorage";
8
8
  import { createLogger } from "@forwardimpact/libtelemetry";
9
9
  import { createBundleDownloader, execLine } from "@forwardimpact/libutil";
10
10
 
11
- const { version: VERSION } = JSON.parse(
12
- readFileSync(new URL("../package.json", import.meta.url), "utf8"),
13
- );
11
+ // `bun build --compile` injects FIT_DOWNLOAD_BUNDLE_VERSION via --define,
12
+ // eliminating the readFileSync branch in the compiled binary (which would
13
+ // ENOENT against the bunfs virtual mount). Source execution falls through.
14
+ const VERSION =
15
+ process.env.FIT_DOWNLOAD_BUNDLE_VERSION ||
16
+ JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"))
17
+ .version;
14
18
 
15
19
  const definition = {
16
20
  name: "fit-download-bundle",
@@ -4,9 +4,13 @@ import { createCli } from "@forwardimpact/libcli";
4
4
  import { createLogger } from "@forwardimpact/libtelemetry";
5
5
  import { countTokens } from "@forwardimpact/libutil";
6
6
 
7
- const { version: VERSION } = JSON.parse(
8
- readFileSync(new URL("../package.json", import.meta.url), "utf8"),
9
- );
7
+ // `bun build --compile` injects FIT_TIKTOKEN_VERSION via --define, eliminating
8
+ // the readFileSync branch in the compiled binary (which would ENOENT against
9
+ // the bunfs virtual mount). Source execution falls through to package.json.
10
+ const VERSION =
11
+ process.env.FIT_TIKTOKEN_VERSION ||
12
+ JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"))
13
+ .version;
10
14
 
11
15
  const definition = {
12
16
  name: "fit-tiktoken",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forwardimpact/libutil",
3
- "version": "0.1.79",
3
+ "version": "0.1.81",
4
4
  "description": "Cross-cutting utilities: retry, hashing, token counting, and project discovery.",
5
5
  "keywords": [
6
6
  "util",
@@ -38,6 +38,8 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@forwardimpact/libcli": "^0.1.0",
41
+ "@forwardimpact/libconfig": "^0.1.79",
42
+ "@forwardimpact/libstorage": "^0.1.78",
41
43
  "@forwardimpact/libtelemetry": "^0.1.22"
42
44
  },
43
45
  "devDependencies": {