fix(node): Record local variables with falsy values, null and undefined#10821
Merged
fix(node): Record local variables with falsy values, null and undefined#10821
null and undefined#10821Conversation
Lms24
commented
Feb 27, 2024
| obj: { name: 'some name', num: 5 }, | ||
| ty: '<Some>', | ||
| bool: false, | ||
| num: 0, |
Member
Author
There was a problem hiding this comment.
In case of a number, we would previously report '<0>' instead of 0. I think changing this should be okay but wanted to double check if there are implications to this change. Anyone have an idea?
Contributor
size-limit report 📦
|
Lms24
commented
Feb 27, 2024
Member
|
toString it 😅? |
mydea
approved these changes
Feb 27, 2024
null and undefined
3 tasks
timfish
approved these changes
Feb 27, 2024
Contributor
|
Should we backport this to v7? |
This was referenced Mar 18, 2024
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.
We previously didn't record local local variables with falsy values because we checked for truthiness instead of definedness when unrolling and serializing the variable values. This PR changes how we check for and extract variable properties to record
0,'',false)nullundefinedFixes implementations in
nodeandnode-experimentalfixes #10815