mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
* Parse stack trace string * Syntax highlight error messages * Fix off-by-one * Undo changes to populateStackTrace * Highlight more things * Add a way to write tests for it * Create highlight-cat.ts * Bump * fix: off by ones * feat: add function highlighting to these errors * revisions * undo * l * fix webkit submodule * imo this looks worse * [autofix.ci] apply automated fixes * fix off by one <3 * fix more situations * ch changes * ok * [autofix.ci] apply automated fixes * fix this * fix snapshot * ok * mark test as todo --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Co-authored-by: dave caruso <me@paperdave.net> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
9 lines
339 B
TypeScript
9 lines
339 B
TypeScript
// helper utility for manually running the syntax highlighter on a file
|
|
import { readFileSync } from "fs";
|
|
|
|
// @ts-expect-error
|
|
// don't actually use this API!!
|
|
const highlighter: (code: string) => string = globalThis[Symbol.for("Bun.lazy")]("unstable_syntaxHighlight");
|
|
|
|
console.write(highlighter(readFileSync(process.argv[2], "utf8")));
|