-
Notifications
You must be signed in to change notification settings - Fork 557
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
Add platform version field to manifest #2803
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2803 +/- ##
==========================================
+ Coverage 94.45% 94.46% +0.01%
==========================================
Files 484 486 +2
Lines 10329 10358 +29
Branches 1574 1579 +5
==========================================
+ Hits 9756 9785 +29
Misses 573 573 ☔ View full report in Codecov by Sentry. |
76650bb
to
8fa16bb
Compare
return; | ||
} | ||
|
||
if (semver.gt(manifest.platformVersion, getPlatformVersion())) { |
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.
Patch versions are probably fine and may not need to reject, WDYT? 🤔
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.
Technically we can't guarantee that it'll work on a newer patch version, I think, so to be safe, I decided to reject any newer versions.
b5a6500
to
fe59029
Compare
This adds a new field to the manifest,
platformVersion
. It is intended to be set to the current version of the Snaps SDK, and if set, is checked by the Snap controller to make sure the current supported version by the Snaps Platform is equal or newer than the specifiedplatformVersion
.I've added a feature flag
rejectInvalidPlatformVersion
which, when enabled, will throw an error upon installation if specified platform version is too new. Otherwise it simply logs a warning in the console.