fix: make _extend method use shallow copy#331
Open
0816i wants to merge 1 commit into
Open
Conversation
Author
|
It looks like this fix wasn't included in the 4.10.x update. |
|
@terehov any chance to merge this in? |
|
@terehov Please ? |
|
@terehov sorry to bug again, but can you take a minute to merge and release this? |
terehov
pushed a commit
that referenced
this pull request
Jun 27, 2026
_extend copied origin into a throwaway object and returned it, but the callers ignore the return value and rely on in-place mutation, so custom inspect options (depth, colors, ...) were silently dropped. Mutate the passed-in context directly so the options take effect.
terehov
pushed a commit
that referenced
this pull request
Jun 27, 2026
Guards the _extend fix from PR #331: inspect() and formatWithOptions() must honor depth and colors options. These tests fail against the previous behavior where options were applied to a discarded copy.
terehov
added a commit
that referenced
this pull request
Jun 27, 2026
_extend copied origin into a throwaway object and returned it, but the callers ignore the return value and rely on in-place mutation, so custom inspect options (depth, colors, ...) were silently dropped. Mutate the passed-in context directly so the options take effect.
terehov
added a commit
that referenced
this pull request
Jun 27, 2026
Guards the _extend fix from PR #331: inspect() and formatWithOptions() must honor depth and colors options. These tests fail against the previous behavior where options were applied to a discarded copy.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
after use polyfill to all environment, at node.js it couldn't override prettyInspectOptions to ctx.
fix: #327