-
Notifications
You must be signed in to change notification settings - Fork 247
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: update borsh-js to v1.0.0 #1168
Conversation
We have been working on a new version of borsh-js, this commit updates all the files that depend on borsh-js. This update is a breaking change, since the objects schemas (which are exported) are completely different from v0.7.0 (before) to v1.0.1 (now). The main benefit of updating borsh-js is that the new version is agnostic to the class being serialized, meaning that two "deep-equal" instances of different classes can be serialized using the same Schema. This means that near-api-js will be able to (de)serialize objects created across different library versions (which currently is not possible).
🦋 Changeset detectedLatest commit: 54f6708 The changes in this PR will be included in the next version bump. This PR includes changesets to release 12 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The new version of Borsh has been released without the `baseDecode` and `baseEncode` methods. I have migrated these methods as they were from `borsh` to the `near-api-js/utils/format` package.
@andy-haynes this PR is ready to be reviewed. The most important thing to take into account is that the new version of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
"near-api-js": major | ||
"@near-js/accounts": major | ||
"@near-js/biometric-ed25519": major | ||
"@near-js/crypto": major | ||
"@near-js/transactions": major | ||
"@near-js/wallet-account": major |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gagdiez This caused packages to be released as 1.0.0 release instead of 0.x 😐
I just wanted to mention it for future reference.
Pre-flight checklist
pnpm changeset
to create achangeset
JSON document appropriate for this change.Motivation
We have developed a new version of
borsh-js
which is agnostic to theClass
being (de)serialized. This means that two "deep equal" objects can be (de)Serialized using the same Schema, no matter their origin or particular Class.Test Plan
I have updated the dependency of
borsh-js
and changed the code as minimal as possible until all the tests passed again.Related issues/PRs
Fixes #1167