Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix formatting of Set in Bun.inspect() #16013

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

laesse
Copy link

@laesse laesse commented Dec 27, 2024

What does this PR do?

Fixes #16007

  • Documentation or TypeScript types (it's okay to leave the rest blank in this case)
  • Code changes

How did you verify your code works?

Minimal reproduction from bug now shows expected output:

{
  map: Map(2) {
    "foo": "bar",
    "baz": "qux",
  },
  set: Set(2) {
    "foo",
    "bar",
  },
  foo: {
    bar: {
      set: Set(2) {
        "foo",
        "bar",
      },
    },
  },
}

I wrote automated tests test/regression/issue/16007.test.ts

  • I checked the lifetime of memory allocated to verify it's (1) freed and (2) only freed when it should be
  • I included a test for the new code, or an existing test covers it
  • JSValue used outside outside of the stack is either wrapped in a JSC.Strong or is JSValueProtect'ed
  • I wrote TypeScript/JavaScript tests and they pass locally (bun-debug test test-file-name.test)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bun.inspect() has strange formatting when showing a Set inside an object
1 participant