oven-sh/bun · error · Error

Benchmark files must only contain /a-zA-Z0-9-_/ ${benchmarkI

Error message

Benchmark files must only contain /a-zA-Z0-9-_/ ${benchmarkID} in file ${file}

What it means

Error "Benchmark files must only contain /a-zA-Z0-9-_/ ${benchmarkID} in file ${file}" thrown in oven-sh/bun.

Source

Thrown at bench/snippets/runner-entrypoint.js:128

  NODE_NO_WARNINGS: "1",
  NODE_OPTIONS: "--no-warnings",
  BUN_DEBUG_QUIET_LOGS: "1",
  NO_COLOR: "1",
  DISABLE_COLORS: "1",
};

function* run({ cmds, file }) {
  const benchmarkID = basename(file)
    .toLowerCase()
    .replace(/\.m?js$/, "")
    .replace(/\.tsx?$/, "")
    .replace(".node", "")
    .replace(".deno", "")
    .replace(".bun", "");

  // if benchmarkID doesn't contain only words, letters or numbers or dashes or underscore, throw
  if (!/^[a-z0-9_-]+$/i.test(benchmarkID)) {
    throw new Error(
      "Benchmark files must only contain /a-zA-Z0-9-_/ " +
        JSON.stringify(benchmarkID) +
        " in file " +
        JSON.stringify(file),
    );
  }

  for (let runtime in cmds) {
    const timestamp = Date.now();
    const spawnStart = performance.now();
    var { stdout, exitCode } = spawnSync({
      cmd: cmds[runtime],
      env,
      stderr: "inherit",
      stdout: "pipe",
    });
    const spawnElapsed = performance.now() - spawnStart;
    stdout = stdout.toString();

View on GitHub (pinned to 8c5296ac45)

When it happens

Trigger: Thrown at bench/snippets/runner-entrypoint.js:128 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of oven-sh/bun@8c5296ac45 (2026-08-16). Data as JSON: /api/errors/b01d4492e159f5f6. Report an issue: GitHub.