-
Notifications
You must be signed in to change notification settings - Fork 653
feat(internal): improve format support in node and bun #6630
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
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6630 +/- ##
==========================================
- Coverage 94.74% 94.73% -0.01%
==========================================
Files 583 583
Lines 46478 46488 +10
Branches 6523 6525 +2
==========================================
+ Hits 44036 44042 +6
- Misses 2399 2402 +3
- Partials 43 44 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
2b5b348
to
59c70c3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. This looks nice and aligned with our recent direction (towards more node compatibility).
Left some comments about test structure.
assertEquals( | ||
stripAnsiCode(format({ a: 1, b: 2 })), | ||
`{ | ||
if (typeof Deno.inspect === "function") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use ignore
option of Deno.test
instead of big if
block to exclude some tests in some environment? ref https://docs.deno.com/api/deno/~/Deno.TestDefinition
@@ -73,7 +73,10 @@ import "../../fs/unstable_lstat_test.ts"; | |||
import "../../fs/unstable_chmod_test.ts"; | |||
import "../../fs/unstable_umask_test.ts"; | |||
import "../../fs/unstable_utime_test.ts"; | |||
import "../../internal/format_test.ts"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Adds support for formatting objects in recent node and bun versions using util.inspect without compromising the experience for users of other runtimes