Skip to content

Add util.inspect.custom support to util.inspect/Bun.inspect/console.log - #4194

Merged
Jarred-Sumner merged 11 commits into
mainfrom
util-inspect-custom
Aug 18, 2023
Merged

Jarred-Sumner merged 11 commits into
mainfrom
util-inspect-custom

Conversation

@paperclover

@paperclover paperclover commented Aug 17, 2023 •

Copy link
Copy Markdown
Contributor

What does this PR do?

This merges util.inspect and Bun.inspect, as well as gives the console formatter support for calling util.inspect.custom functions.

Breaking change: Bun.inspect instead of taking variadic arguments, it will function exactly like util.inspect.

  • Code changes

How did you verify your code works?

  • I wrote automated tests
  • I ran make js and committed the transpiled changes
  • I or my editor ran Prettier on the changed files (or I ran bun fmt)
  • I included a test for the new code, or an existing test covers it
  • I checked the lifetime of memory allocated to verify it's (1) freed and (2) only freed when it should be
  • I or my editor ran zig fmt on the changed files
  • 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 added TypeScript types for the new methods, getters, or setters

@Jarred-Sumner
Jarred-Sumner marked this pull request as draft August 17, 2023 21:28
@paperclover
paperclover marked this pull request as ready for review August 18, 2023 00:18
@github-actions

github-actions Bot commented Aug 18, 2023 •

Copy link
Copy Markdown
Contributor

❌ @paperdave 1 files with test failures on linux-x64:

  • test/js/bun/test/test-test.test.ts

View test output

#509cca0d9ec02b6d439357e0f42e5213d9e0ae0e

@github-actions

github-actions Bot commented Aug 18, 2023 •

Copy link
Copy Markdown
Contributor

❌ @paperdave 1 files with test failures on linux-x64-baseline:

  • test/js/bun/test/test-test.test.ts

View test output

#509cca0d9ec02b6d439357e0f42e5213d9e0ae0e

@github-actions

github-actions Bot commented Aug 18, 2023 •

Copy link
Copy Markdown
Contributor

❌ @paperdave 5 files with test failures on bun-darwin-x64-baseline:

  • test/js/bun/spawn/spawn-streaming-stdin.test.ts
  • test/js/bun/sqlite/sqlite.test.js
  • test/js/bun/test/test-test.test.ts
  • test/js/third_party/webpack/webpack.test.ts
  • test/js/web/timers/setTimeout.test.js

View test output

#509cca0d9ec02b6d439357e0f42e5213d9e0ae0e

@Jarred-Sumner
Jarred-Sumner marked this pull request as draft August 18, 2023 02:03
@github-actions

github-actions Bot commented Aug 18, 2023 •

Copy link
Copy Markdown
Contributor

❌ @paperdave 5 files with test failures on bun-darwin-aarch64:

  • test/js/bun/spawn/spawn.test.ts
  • test/js/bun/test/test-test.test.ts
  • test/js/node/dns/node-dns.test.js
  • test/js/node/watch/fs.watch.test.ts
  • test/js/web/worker.test.ts

View test output

#509cca0d9ec02b6d439357e0f42e5213d9e0ae0e

@paperclover
paperclover marked this pull request as ready for review August 18, 2023 02:32
@Jarred-Sumner
Jarred-Sumner merged commit 6fd0043 into main Aug 18, 2023
@Jarred-Sumner
Jarred-Sumner deleted the util-inspect-custom branch August 18, 2023 03:56
@Jarred-Sumner

Copy link
Copy Markdown
Collaborator

Thank you

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.

2 participants