{"record":{"id":"b01d4492e159f5f6","repo":"oven-sh/bun","slug":"benchmark-files-must-only-contain-a-za-z0-9","errorCode":null,"errorMessage":"Benchmark files must only contain /a-zA-Z0-9-_/ ${benchmarkID} in file ${file}","messagePattern":"Benchmark files must only contain /a-zA-Z0-9-_/ (.+?) in file (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"bench/snippets/runner-entrypoint.js","lineNumber":128,"sourceCode":"  NODE_NO_WARNINGS: \"1\",\n  NODE_OPTIONS: \"--no-warnings\",\n  BUN_DEBUG_QUIET_LOGS: \"1\",\n  NO_COLOR: \"1\",\n  DISABLE_COLORS: \"1\",\n};\n\nfunction* run({ cmds, file }) {\n  const benchmarkID = basename(file)\n    .toLowerCase()\n    .replace(/\\.m?js$/, \"\")\n    .replace(/\\.tsx?$/, \"\")\n    .replace(\".node\", \"\")\n    .replace(\".deno\", \"\")\n    .replace(\".bun\", \"\");\n\n  // if benchmarkID doesn't contain only words, letters or numbers or dashes or underscore, throw\n  if (!/^[a-z0-9_-]+$/i.test(benchmarkID)) {\n    throw new Error(\n      \"Benchmark files must only contain /a-zA-Z0-9-_/ \" +\n        JSON.stringify(benchmarkID) +\n        \" in file \" +\n        JSON.stringify(file),\n    );\n  }\n\n  for (let runtime in cmds) {\n    const timestamp = Date.now();\n    const spawnStart = performance.now();\n    var { stdout, exitCode } = spawnSync({\n      cmd: cmds[runtime],\n      env,\n      stderr: \"inherit\",\n      stdout: \"pipe\",\n    });\n    const spawnElapsed = performance.now() - spawnStart;\n    stdout = stdout.toString();","sourceCodeStart":110,"sourceCodeEnd":146,"githubUrl":"https://github.com/oven-sh/bun/blob/8c5296ac459e8252d3cd702f3fbcbb0c249d95d5/bench/snippets/runner-entrypoint.js#L110-L146","documentation":"Error \"Benchmark files must only contain /a-zA-Z0-9-_/ ${benchmarkID} in file ${file}\" thrown in oven-sh/bun.","triggerScenarios":"Thrown at bench/snippets/runner-entrypoint.js:128 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8c5296ac459e8252d3cd702f3fbcbb0c249d95d5","analyzedAt":"2026-08-16T08:01:58.794Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}