-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Language Support - Add initial support for Python ## Visualization - Add support for node clusters. This is used heavily in Python, for context-managers and exception-handling. ## Demo - Add Python support - Add sharing - click the "Share" button to get a sharable link to what you currently see ## Testing - Enable live-testing with the web viewer. Requires that you run both `bun web-tests --watch` and `bun web` at the same time. - By default, `bun web` only shows failing tests - `bun web` color-codes tests to note which are failing ## Extension - No changes ## Known Issues - Backlinks are no longer thicker than normal links. That said, they were half-broken to begin with and were somewhat arbitrary.
- Loading branch information
Showing
31 changed files
with
5,407 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,47 @@ | ||
import { testFunctions as testFuncsForGo } from "../src/test/collect-go"; | ||
import { testFunctions as testFuncsForC } from "../src/test/collect-c"; | ||
import { intoRecords } from "../src/test/commentTestUtils"; | ||
import { watch } from "fs"; | ||
import { parseArgs } from "util"; | ||
import { collectTests } from "../src/test/commentTestCollector"; | ||
|
||
const records = intoRecords([...testFuncsForC, ...testFuncsForGo]); | ||
const watchDir = import.meta.dir + "/../src"; | ||
|
||
Bun.write("./dist/tests/commentTests.json", JSON.stringify(records)); | ||
const { values } = parseArgs({ | ||
args: Bun.argv, | ||
options: { | ||
watch: { | ||
type: "boolean", | ||
default: false, | ||
}, | ||
}, | ||
strict: true, | ||
allowPositionals: true, | ||
}); | ||
|
||
async function generateJson() { | ||
try { | ||
const records = intoRecords(await collectTests()); | ||
Bun.write("./dist/tests/commentTests.json", JSON.stringify(records)); | ||
} catch (error) { | ||
console.log(error); | ||
} | ||
} | ||
|
||
generateJson(); | ||
if (values.watch) { | ||
const watcher = watch( | ||
watchDir, | ||
{ recursive: true }, | ||
async (event, filename) => { | ||
console.log(`${event}: ${filename}, regenerating commentTests.json`); | ||
await generateJson(); | ||
}, | ||
); | ||
|
||
process.on("SIGINT", () => { | ||
// close watcher when Ctrl-C is pressed | ||
console.log("Closing watcher..."); | ||
watcher.close(); | ||
|
||
process.exit(0); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.