bajaclaw 0.14.4 → 0.14.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.
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  ██╔══██╗██╔══██║██ ██║██╔══██║ ██║ ██║ ██╔══██║██║███╗██║
8
8
  ██████╔╝██║ ██║╚█████╔╝██║ ██║ ╚██████╗███████╗██║ ██║╚███╔███╔╝
9
9
  ╚═════╝ ╚═╝ ╚═╝ ╚════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝╚═╝ ╚═╝ ╚══╝╚══╝
10
- autonomous agents on your terms · MIT · v0.14.4
10
+ autonomous agents on your terms · MIT · v0.14.5
11
11
  ```
12
12
 
13
13
  **BajaClaw is a long-running agent runtime for the `claude` CLI.** It turns
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bajaclaw",
3
- "version": "0.14.4",
3
+ "version": "0.14.5",
4
4
  "description": "BajaClaw - autonomous agents on your terms",
5
5
  "type": "module",
6
6
  "bajaclaw": {
@@ -14,7 +14,7 @@
14
14
  "scripts": {
15
15
  "build": "tsc -p tsconfig.json",
16
16
  "dev": "tsx src/cli.ts",
17
- "test": "node --test \"tests/**/*.test.js\"",
17
+ "test": "node scripts/run-tests.js",
18
18
  "lint": "tsc --noEmit",
19
19
  "prepare": "npm run build",
20
20
  "postinstall": "node scripts/postinstall.js"
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/env node
2
+ // Cross-version test runner. Node 22+ expands "tests/**/*.test.js"
3
+ // natively in --test; Node 20 does not and fails with "Could not
4
+ // find" because it treats the pattern as a literal filename. This
5
+ // script enumerates the actual test files and invokes node --test
6
+ // with explicit paths, which works on every supported Node.
7
+ import { readdirSync } from "node:fs";
8
+ import { spawn } from "node:child_process";
9
+ import { join, dirname } from "node:path";
10
+ import { fileURLToPath } from "node:url";
11
+
12
+ const root = dirname(dirname(fileURLToPath(import.meta.url)));
13
+ const testsDir = join(root, "tests");
14
+ const files = readdirSync(testsDir)
15
+ .filter((f) => f.endsWith(".test.js"))
16
+ .map((f) => join(testsDir, f))
17
+ .sort();
18
+
19
+ if (files.length === 0) {
20
+ console.error("no test files found in", testsDir);
21
+ process.exit(1);
22
+ }
23
+
24
+ const proc = spawn(process.execPath, ["--test", ...files], { stdio: "inherit" });
25
+ proc.on("exit", (code, signal) => {
26
+ if (signal) process.kill(process.pid, signal);
27
+ else process.exit(code ?? 1);
28
+ });