authorgravatar for git@paperclover.netclover caruso <git@paperclover.net> 2025-10-15 23:36:01-07:00
committergravatar for git@paperclover.netclover caruso <git@paperclover.net> 2026-01-14 01:08:17-08:00
log692bc30864b34cdc3fe5297a7186605fbc73337f
treeff4b85481072442ef95824fa648a99134ea14780
parent6b198b1e34ecf21148334df6eb9d79edf857b4db
signature Commit is signed but in an unrecognized format.

fix: node v22 wasnt getting hit by the startup check

additionally block Deno since it can't run sitegen

2 files changed, 10 insertions(+), 5 deletions(-)

framework/hot.ts+2
......@@ -8,6 +8,8 @@
88export const projectRoot = path.resolve(import.meta.dirname, "../");
99export const projectSrc = path.resolve(projectRoot, "src");
1010
11using _ = null;
12
1113// Create a project-relative require. For convenience, it is generic-typed.
1214export const load = createRequire(
1315 pathToFileURL(path.join(projectRoot, "run.js")).toString(),
run.js+8-5
......@@ -16,12 +16,17 @@ process.emit = function (event, error) {
1616 : originalEmit.apply(process, arguments);
1717};
1818
19let hot;
1920try {
2021 // required APIs
21 assert(zlib.zstdCompress);
22 await new Promise((resolve) => zlib.zstdCompress(new Uint8Array(), resolve));
2223
2324 // seems to fail in bun
2425 (await import("source-map-support")).install({ hookRequire: true });
26
27 // Init hooks
28 hot = await import("./framework/hot.ts");
29 hot.load("./lib/log.ts");
2530} catch (e) {
2631 const brand = process.versions.bun
2732 ? `bun ${process.versions.bun}`
......@@ -34,13 +39,11 @@ try {
3439 `this is node.js version ${process.version}${brandText}\n\n` +
3540 `get node.js --> https://nodejs.org/en/download/current\n`,
3641 );
37 console.error(e);
42 globalThis.console.error(e);
3843 process.exit(1);
44 await new Promise(() => {});
3945}
4046
41// Init hooks
42const hot = await import("./framework/hot.ts");
43
4447const log = hot.load("./lib/log.ts");
4548console.info = log.info;
4649console.warn = log.warn;