@hasna/evals 0.1.6 → 0.1.7

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.
@@ -1 +1 @@
1
- {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/doctor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,wBAAgB,aAAa,IAAI,OAAO,CAoDvC"}
1
+ {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/doctor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,wBAAgB,aAAa,IAAI,OAAO,CAkEvC"}
package/dist/cli/index.js CHANGED
@@ -30480,11 +30480,23 @@ function doctorCommand() {
30480
30480
  }
30481
30481
  try {
30482
30482
  const { loadDataset: loadDataset2 } = await Promise.resolve().then(() => (init_loader(), exports_loader));
30483
- const examplesPath = new URL("../../../datasets/examples/smoke.jsonl", import.meta.url).pathname;
30484
- const { cases } = await loadDataset2(examplesPath);
30485
- checks.push({ name: `Example dataset (${cases.length} cases)`, ok: cases.length > 0, hint: "datasets/examples/smoke.jsonl missing" });
30483
+ const { existsSync } = await import("fs");
30484
+ const { join: join2 } = await import("path");
30485
+ const { homedir: homedir2 } = await import("os");
30486
+ const candidates = [
30487
+ new URL("../../../datasets/examples/smoke.jsonl", import.meta.url).pathname,
30488
+ join2(import.meta.dir, "../../../datasets/examples/smoke.jsonl"),
30489
+ join2(import.meta.dir, "../../datasets/examples/smoke.jsonl"),
30490
+ join2(import.meta.dir, "../datasets/examples/smoke.jsonl"),
30491
+ join2(homedir2(), ".hasna", "evals", "examples", "smoke.jsonl")
30492
+ ];
30493
+ const found = candidates.find((p) => existsSync(p));
30494
+ if (!found)
30495
+ throw new Error("not found");
30496
+ const { cases } = await loadDataset2(found);
30497
+ checks.push({ name: `Example dataset (${cases.length} cases)`, ok: cases.length > 0 });
30486
30498
  } catch {
30487
- checks.push({ name: "Example dataset", ok: false, hint: "Run from the open-evals project directory" });
30499
+ checks.push({ name: "Example dataset (optional)", ok: false, hint: "datasets/examples/smoke.jsonl not found \u2014 install @hasna/evals globally to include examples" });
30488
30500
  }
30489
30501
  console.log(`
30490
30502
  \x1B[1mevals doctor\x1B[0m
@@ -30494,7 +30506,7 @@ function doctorCommand() {
30494
30506
  console.log(` ${icon} ${c.name}${!c.ok && c.hint ? `
30495
30507
  hint: ${c.hint}` : ""}`);
30496
30508
  }
30497
- const allOk = checks.every((c) => c.ok || c.name.includes("optional"));
30509
+ const allOk = checks.every((c) => c.ok || c.name.toLowerCase().includes("optional"));
30498
30510
  console.log(allOk ? `
30499
30511
  \x1B[32m All checks passed.\x1B[0m
30500
30512
  ` : `
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/evals",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "Open source AI evaluation framework — LLM-as-judge + assertion-based evals for any AI app. CLI + MCP server.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",