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

Fix array console output #1135

Merged
merged 3 commits into from Dec 15, 2023
Merged

Fix array console output #1135

merged 3 commits into from Dec 15, 2023

Conversation

ankur22
Copy link
Collaborator

@ankur22 ankur22 commented Dec 12, 2023

What?

This changes the way the output of an array with console.out is parsed which affects the display from:

{"0":"foo","1":"bar"}

to:

["foo","bar"]

Why?

To better represent the array type when it is printed to the console.

Checklist

  • I have performed a self-review of my code
  • I have added tests for my changes
  • I have commented on my code, particularly in hard-to-understand areas

Related PR(s)/Issue(s)

Updates: #987

@ankur22 ankur22 changed the base branch from main to add/array-parsing December 12, 2023 11:55
@ankur22 ankur22 changed the base branch from add/array-parsing to add/remote-error December 12, 2023 11:55
inancgumus
inancgumus previously approved these changes Dec 13, 2023
Copy link
Member

@inancgumus inancgumus left a comment

Choose a reason for hiding this comment

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

👍 Nice

common/remote_object.go Outdated Show resolved Hide resolved
ka3de
ka3de previously approved these changes Dec 15, 2023
Copy link
Collaborator

@ka3de ka3de left a comment

Choose a reason for hiding this comment

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

LGTM.

@ankur22 ankur22 force-pushed the add/remote-error branch 2 times, most recently from 82fb803 to bda54b9 Compare December 15, 2023 11:38
Base automatically changed from add/remote-error to main December 15, 2023 13:00
@ankur22 ankur22 dismissed stale reviews from ka3de and inancgumus December 15, 2023 13:00

The base branch was changed.

ankur22 added a commit that referenced this pull request Dec 15, 2023
ankur22 added a commit that referenced this pull request Dec 15, 2023
This allows the remote object to be parsed into an array if that is
what it is instead of an object where the keys are index values.
This updates parseConsoleRemoteObjectValue to work with
parseConsoleRemoteArrayPreview which will parse an array.
Copy link
Collaborator

@ka3de ka3de left a comment

Choose a reason for hiding this comment

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

LGTM.

@ankur22 ankur22 merged commit 5e38a3f into main Dec 15, 2023
17 checks passed
@ankur22 ankur22 deleted the fix/array-console-output branch December 15, 2023 15:01
ankur22 added a commit that referenced this pull request Dec 18, 2023
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

3 participants