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

feat(console): pass options and depth to custom inspects #14855

Merged
merged 1 commit into from
Jun 13, 2022

Conversation

cjihrig
Copy link
Contributor

@cjihrig cjihrig commented Jun 12, 2022

This commit updates Deno.inspect() to pass inspect options and
the current inspect depth to custom inspect functions.

Refs: #8099
Refs: #14171

@cjihrig cjihrig marked this pull request as draft June 12, 2022 19:37
@cjihrig cjihrig marked this pull request as ready for review June 12, 2022 19:39
@cjihrig cjihrig marked this pull request as draft June 12, 2022 19:41
@cjihrig cjihrig changed the title fix(console): constrol inspect() indent with option fix(console): control inspect() indent with option Jun 12, 2022
This commit updates Deno.inspect() to pass inspect options and
the current inspect depth to custom inspect functions.

Refs: denoland#8099
Refs: denoland#14171
@cjihrig cjihrig changed the title fix(console): control inspect() indent with option feat(console): pass options and depth to custom inspects Jun 12, 2022
@cjihrig cjihrig marked this pull request as ready for review June 12, 2022 20:13
@cjihrig cjihrig marked this pull request as draft June 12, 2022 20:21
@cjihrig cjihrig marked this pull request as ready for review June 12, 2022 21:16
@cjihrig
Copy link
Contributor Author

cjihrig commented Jun 12, 2022

@bartlomieju PTAL. With these changes in place, we can update inspect() to support a starting indentation level (possibly via the currently unused indentLevel option). Then, custom inspect functions can create proper indentation - I have code locally that fixes #14171.

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable

@cjihrig cjihrig merged commit 64abb65 into denoland:main Jun 13, 2022
@cjihrig cjihrig deleted the inspect branch June 13, 2022 14:59
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.

None yet

2 participants