diff --git a/.mailmap b/.mailmap new file mode 100644 index 0000000000..5b36b34dde --- /dev/null +++ b/.mailmap @@ -0,0 +1,2 @@ +# To learn more about git's mailmap: https://ntietz.com/blog/git-mailmap-for-name-changes +chloe caruso diff --git a/src/bun.js/javascript.zig b/src/bun.js/javascript.zig index 2b0d57c625..5c031793b6 100644 --- a/src/bun.js/javascript.zig +++ b/src/bun.js/javascript.zig @@ -3974,15 +3974,7 @@ pub const VirtualMachine = struct { // We special-case the code property. Let's avoid printing it twice. if (field.eqlComptime("code")) { - if (value.isString()) { - const str = value.toBunString(this.global); - defer str.deref(); - if (!str.isEmpty()) { - if (str.eql(name)) { - continue; - } - } - } + if (!iterator.tried_code_property) continue; } const kind = value.jsType(); @@ -4018,7 +4010,7 @@ pub const VirtualMachine = struct { try writer.print(comptime Output.prettyFmt(" {}: ", allow_ansi_color), .{field}); - // When we're printing errors for a top-level uncaught eception / rejection, suppress further errors here. + // When we're printing errors for a top-level uncaught exception / rejection, suppress further errors here. if (allow_side_effects) { if (this.global.hasException()) { this.global.clearException(); @@ -4039,7 +4031,7 @@ pub const VirtualMachine = struct { ) catch {}; if (allow_side_effects) { - // When we're printing errors for a top-level uncaught eception / rejection, suppress further errors here. + // When we're printing errors for a top-level uncaught exception / rejection, suppress further errors here. if (this.global.hasException()) { this.global.clearException(); } diff --git a/test/js/bun/test/stack.test.ts b/test/js/bun/test/stack.test.ts index 3b0c3a6061..2a55d5b0e1 100644 --- a/test/js/bun/test/stack.test.ts +++ b/test/js/bun/test/stack.test.ts @@ -114,10 +114,10 @@ test("throwing inside an error suppresses the error and continues printing prope const { stderr, exitCode } = result; expect(stderr.toString().trim()).toStartWith(`error: No such file or directory - code: "ENOENT", path: "this-file-path-is-bad", syscall: "open", errno: -2, + code: "ENOENT", `); expect(exitCode).toBe(1); });