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

[JavaScript] Support partial record #1208

Merged
merged 4 commits into from
Dec 5, 2023
Merged

Conversation

theweipeng
Copy link
Member

What do these changes do?

  1. JavaScript is a dynamic language, so the object being serialized may lack certain properties. We should handle partial objects by adding default values for non-referencable types and making the description of object field types optional.

  2. Sometimes, webpack may mock the process object, which can break environment detection. To mitigate this, we can detect the process.version.node property, as it is usually not mocked.

Related issue number

Closes #1207

Check code requirements

  • tests added / passed (if needed)
  • Ensure all linting tests pass, see here for how to run them

Copy link
Collaborator

@chaokunyang chaokunyang left a comment

Choose a reason for hiding this comment

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

LGTM

@chaokunyang chaokunyang merged commit 445bfa7 into apache:main Dec 5, 2023
16 checks passed
@chaokunyang
Copy link
Collaborator

I see referenceResolver naming, maybe we can name it to 'refResolver' for consistency with other languages

@theweipeng
Copy link
Member Author

I see referenceResolver naming, maybe we can name it to 'refResolver' for consistency with other languages

Good idea, I'll correct it in the next update

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.

[JavaScript] Use Type.object to define protocol will cause error
2 participants