authorgravatar for git@paperclover.netclover caruso <git@paperclover.net> 2025-10-13 23:13:29-07:00
committergravatar for git@paperclover.netclover caruso <git@paperclover.net> 2025-10-18 10:17:56-07:00
log123f64dc0198ef576cae7e75bc02f2742c527d93
tree108e7d675092ad83f7a46b9d8579e29a62a0ceaa
parent7d22daf0aa163766378720a93902c040dff9acb8
signature Commit is signed but in an unrecognized format.

fix: random things trying to run with deno and bun (they dont work)


2 files changed, 14 insertions(+), 8 deletions(-)

lib/log/stack.ts+10-2
......@@ -251,9 +251,10 @@ function getPackageRoot(absPath: string) {
251251 const process = globalThis.process;
252252 if (!fs || !path || !process) return null;
253253
254 const isNodeBuiltin = absPath.startsWith("node:");
254255 if (
255256 "Bun" in globalThis &&
256 (absPath.startsWith("node:") || absPath.startsWith("internal:"))
257 (isNodeBuiltin || absPath.startsWith("internal:"))
257258 ) {
258259 return [
259260 `https://github.com/oven-sh/bun/blob/bun-v${process.versions.bun}/src/js/`,
......@@ -261,7 +262,14 @@ function getPackageRoot(absPath: string) {
261262 absPath.replace(":", "/") + ".ts",
262263 ];
263264 }
264 if (absPath.startsWith("node:")) {
265 if (isNodeBuiltin) {
266 if ("Deno" in globalThis) {
267 return [
268 `https://github.com/denoland/deno/blob/v${process.versions.deno}/ext/node/polyfills/`,
269 "",
270 absPath.slice(5) + ".js",
271 ];
272 }
265273 return [
266274 `https://github.com/nodejs/node/blob/${process.version}/lib/`,
267275 "",
run.js+4-6
......@@ -54,12 +54,10 @@ process.on("uncaughtException", (error) => {
5454});
5555
5656if (fs.existsSync(".env")) {
57 const env = fs.readFileSync(".env", "utf-8").split("\n").map((x) =>
58 x.trim().split("=")
59 );
60 for (const [k, v] of env) {
61 process.env[k] = v;
62 }
57 const env = fs.readFileSync(".env", "utf-8")
58 .split("\n").filter(Boolean)
59 .map((x) => x.trim().split("="));
60 for (const [k, v] of env) process.env[k] = v;
6361}
6462
6563// Load with hooks