@zgeoff/rig 0.0.3 → 0.0.5

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.
@@ -5,4 +5,3 @@ export interface MemoryBudgetSources {
5
5
  readonly readText: (path: string) => Promise<string | undefined>;
6
6
  }
7
7
  export declare function readMemoryBudget(sources: Readonly<MemoryBudgetSources>): Promise<number>;
8
- export declare function readOptionalText(path: string): Promise<string | undefined>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zgeoff/rig",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "description": "Run every test lane of a repo from one declaration of its limits, with a browser lane built in",
5
5
  "keywords": [
6
6
  "bun",
@@ -37,13 +37,13 @@
37
37
  "typecheck": "tsrs"
38
38
  },
39
39
  "dependencies": {
40
- "@zgeoff/diet": "0.1.3",
41
- "@zgeoff/std": "0.3.0",
40
+ "@zgeoff/diet": "0.1.4",
41
+ "@zgeoff/std": "0.3.2",
42
42
  "gunshi": "1.0.0-rc.1",
43
43
  "ts-pattern": "5.9.2"
44
44
  },
45
45
  "devDependencies": {
46
- "@types/bun": "1.4.3",
46
+ "@types/bun": "1.4.4",
47
47
  "tiny-invariant": "1.3.3",
48
48
  "tsrs": "0.18.0-ts7.1.0-dev.20260929",
49
49
  "typescript": "7.0.2",
package/src/cli.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env bun
2
2
  import { existsSync } from 'node:fs';
3
3
  import { availableParallelism, totalmem } from 'node:os';
4
+ import { readOptionalText } from '@zgeoff/std';
4
5
  import { wireBrowserLaneHooks } from './browser/wire-browser-lane-hooks.ts';
5
6
  import { initFiles } from './init-files.ts';
6
- import { readOptionalText } from './read-memory-budget.ts';
7
7
  import { readRigConfig } from './read-rig-config.ts';
8
8
  import { readTrackedFiles } from './read-tracked-files.ts';
9
9
  import { readWorkerCount } from './read-worker-count.ts';
@@ -1,4 +1,3 @@
1
- import { readFile } from 'node:fs/promises';
2
1
  import { join } from 'node:path';
3
2
 
4
3
  export interface MemoryBudgetSources {
@@ -55,11 +54,3 @@ async function readCgroupCap(
55
54
 
56
55
  return value === undefined || value === 'max' ? undefined : Number(value);
57
56
  }
58
-
59
- // Bun.file's text reads as many bytes as stat reports, and procfs and cgroupfs report 0 for every
60
- // file; readFile reads to the end.
61
- export async function readOptionalText(path: string): Promise<string | undefined> {
62
- const exists = await Bun.file(path).exists();
63
-
64
- return exists ? readFile(path, 'utf8') : undefined;
65
- }