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: deepMergeObject improvements; NumericLiteral and StringLiteral keys #63

Merged
merged 2 commits into from
May 31, 2023

Conversation

Tahul
Copy link
Collaborator

@Tahul Tahul commented May 31, 2023

Hey; this is a follow-up of #62

This also fixes remaining parts of: https://github.com/nuxtlabs/studio-api/issues/730

This adds support for NumericLiteral and BooleanLiteral keys on proxifyObject.

If you run the first commit, you'll see that the test merges two of the same keys into two different ones in the object.

That can have unexpected behavior when generating the code from this.


I'm not sure about the fix, but it seem to be getting the expected result without breaking any other test.

It might be worth writing other tests for proxifyObject to ensure I did not break any other usage with these changes, could you let me know if you have ideas of such cases?

@Tahul Tahul changed the title test(object): add failing test for boolean/numeric key properties feat: deepMergeObject improvements; NumericLiteral and StringLiteral keys May 31, 2023
@Tahul Tahul requested a review from antfu May 31, 2023 13:01
@antfu antfu merged commit 8568f76 into main May 31, 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.

2 participants