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: add version warning banner (anoma#1491) #1534

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

h3ll0ofr1end
Copy link

This PR introduces a feature to verify the interface version for compatibility by dynamically fetching the required version from the remote package.json file hosted on GitHub.

  • Introduced checkInterfaceCompatibilityError to handle interface version validation.
  • Enhanced the useCompatibilityErrors hook to include this new check.
  • The required interface version is fetched dynamically, ensuring accuracy and up-to-date compatibility.
  • Displays a warning banner if the interface version is outdated or incompatible.

This update aligns the interface version check with the existing validations for the indexer and keychain, ensuring consistency across compatibility checks.

by 5ElementsNodes

Copy link
Collaborator

@euharrison euharrison left a comment

Choose a reason for hiding this comment

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

Nice! Thanks!


if (
requiredMajor > currentMajor ||
(requiredMajor === currentMajor && requiredMinor > currentMinor)
Copy link
Collaborator

Choose a reason for hiding this comment

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

How about using the semver package to compare this?
It'll be easier to read and probably handling border cases as well

Copy link
Author

Choose a reason for hiding this comment

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

Agreed with you.
Using the compatibility.json file (currently used for the other checks) to exclude patches from the Interface check invalidates the check itself, because it's a local file.
Excluded semver for this reason, but maybe we can use an internal normalize function to achieve the same result. On it.

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