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

better printing for console.log types #15404

Merged
merged 6 commits into from
Nov 26, 2024
Merged

better printing for console.log types #15404

merged 6 commits into from
Nov 26, 2024

Conversation

RiskyMH
Copy link
Member

@RiskyMH RiskyMH commented Nov 25, 2024

What does this PR do?

adds support for arguments, Object: null prototype, class B extends A, and not mentioning function type twice if anonymous.

class A {}
class B extends A {}
console.log(A, B, class extends B {})

console.log(Object.create(null));
console.log(new Headers())
console.log({})

console.log(function* () {})

function args() {
  console.log(arguments)
}
args(1)
$ bun-debug test.js // new
[class A] [class B extends A] [class (anonymous) extends B]
[Object: null prototype] {}
Headers {}
{}
[GeneratorFunction]
[ 1 ]

$ bun test.js // current
[class A] [class B] [class (anonymous)]
{}
Headers {}
{}
[GeneratorFunction: GeneratorFunction]
{"0":1}

$ node test.js // node
[class A] [class B extends A] [class (anonymous) extends B]
[Object: null prototype] {}
Headers {}
{}
[GeneratorFunction (anonymous)]
[Arguments] { '0': 1 }
  • Documentation or TypeScript types (it's okay to leave the rest blank in this case)
  • Code changes

How did you verify your code works?

manual testing

@robobun
Copy link

robobun commented Nov 25, 2024

@RiskyMH, your commit 0ea0d36 has 16 failures in #6886:

  • test/js/bun/spawn/spawn.test.ts - timeout on 🪟 2019 x64
  • test/cli/run/require-cache.test.ts - 1 failing on 🪟 2019 x64-baseline
  • test/js/bun/http/bun-serve-static.test.ts - timeout on 🐧 3.20 x64-baseline
  • test/js/bun/http/bun-serve-static.test.ts - timeout on 🐧 3.20 x64
  • test/integration/next-pages/test/dev-server.test.ts - 1 failing on 🐧 3.20 x64-baseline
  • test/integration/next-pages/test/dev-server.test.ts - 1 failing on 🐧 3.20 x64
  • test/js/node/test/parallel/fs-watch-recursive-update-file.test.js - 1 failing on 🍎 14 aarch64
  • test/js/node/test/parallel/fs-watch-recursive-add-folder.test.js - 1 failing on 🍎 14 aarch64
  • test/js/node/test/parallel/worker-nested-uncaught.test.js - segmentation fault on 🐧 3.20 aarch64
  • test/js/node/test/parallel/worker-nested-uncaught.test.js - segmentation fault on 🐧 3.20 x64-baseline
  • test/js/node/test/parallel/worker-nested-uncaught.test.js - segmentation fault on 🐧 3.20 x64
  • test/v8/v8.test.ts - 22 failing on 🐧 3.20 aarch64
  • test/v8/v8.test.ts - 22 failing on 🐧 3.20 x64-baseline
  • test/v8/v8.test.ts - 22 failing on 🐧 3.20 x64
  • test/js/node/test/parallel/fs-watch-recursive-add-file-with-url.test.js - 1 failing on 🍎 14 aarch64
  • test/js/node/test/parallel/fs-watch-recursive-linux-parallel-remove.test.js - 1 failing on 🐧 11 x64
  • test/js/node/test/parallel/fs-watch-recursive-linux-parallel-remove.test.js - 1 failing on 🐧 22.04 x64
  • test/js/node/test/parallel/fs-watch-recursive-linux-parallel-remove.test.js - 1 failing on 🐧 22.04 x64-baseline
  • test/js/node/test/parallel/fs-watch-recursive-linux-parallel-remove.test.js - 1 failing on 🐧 3.20 aarch64
  • test/js/node/test/parallel/fs-watch-recursive-linux-parallel-remove.test.js - 1 failing on 🐧 3.20 x64-baseline
  • test/js/node/test/parallel/fs-watch-recursive-linux-parallel-remove.test.js - 1 failing on 🐧 3.20 x64
  • test/js/node/test/parallel/timers-ordering.test.js - 1 failing on 🐧 22.04 x64
  • test/js/node/child_process/child_process.test.ts - 1 failing on 🐧 3.20 aarch64
  • test/js/node/child_process/child_process.test.ts - 1 failing on 🐧 3.20 x64-baseline
  • test/js/node/child_process/child_process.test.ts - 1 failing on 🐧 3.20 x64
  • test/js/bun/http/serve.test.ts - segmentation fault on 🐧 3.20 aarch64
  • test/js/bun/http/serve.test.ts - segmentation fault on 🐧 3.20 x64-baseline
  • test/js/bun/http/serve.test.ts - segmentation fault on 🐧 3.20 x64
  • test/js/node/test/parallel/child-process-exec-timeout-kill.test.js - 1 failing on 🍎 14 aarch64
  • test/integration/next-pages/test/next-build.test.ts - 1 failing on 🐧 22.04 aarch64
  • test/integration/next-pages/test/next-build.test.ts - 1 failing on 🍎 14 aarch64
  • test/integration/next-pages/test/next-build.test.ts - 1 failing on 🐧 20.04 x64
  • test/integration/next-pages/test/next-build.test.ts - 1 failing on 🐧 22.04 x64
  • test/integration/next-pages/test/next-build.test.ts - 1 failing on 🐧 22.04 x64-baseline
  • test/cli/install/registry/bun-install-registry.test.ts - 1 failing on 🍎 14 aarch64
  • test/cli/install/registry/bun-install-registry.test.ts - timeout on 🐧 22.04 x64
  • @Jarred-Sumner
    Copy link
    Collaborator

    no tests :(

    @Jarred-Sumner Jarred-Sumner merged commit 0d6d4fa into main Nov 26, 2024
    65 of 67 checks passed
    @Jarred-Sumner Jarred-Sumner deleted the riskymh/console.log branch November 26, 2024 22:27
    snoglobe pushed a commit that referenced this pull request Dec 4, 2024
    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.

    3 participants