Upgrading pub_semver 1 to 2
Breaking1.4.4 → 2.2.1Breaking5Platform4Deprecated1New1Changed57Fixed4Other1
BreakingUpgrade verdict
5 breaking changes and 4 platform requirement changes.
In plain terms
- Three font file types now use new names, so code looking up the old names will no longer find them.
- The model/vnd.mts file type is no longer recognized.
- Code can no longer extend or implement the Version class.
- Two fields on Version now declare their element type as Object instead of a bare List, which can affect code that assigns or reads them.
Must act Top 5 of 10 that need code or config changes
Dart SDK requirement changed in 2.1.5: >=2.0.0 <3.0.0 → ^3.4.0.
What you must change
Breaking5
Renames application/x-font-otf, application/x-font-ttf and application/x-font-woff to font/otf, font/ttf and font/woff.
application/x-font-otffont/otfapplication/x-font-ttffont/ttfapplication/x-font-wofffont/woffRemoves the model/vnd.mts mime type.
model/vnd.mtsMarks the Version class as final instead of using @sealed.
VersionAdds type parameters to the signatures of the Version.preRelease and Version.build fields (List to List<Object>).
Version.preReleaseVersion.buildextensionFromMime(String mimeType) returns null instead of mimeType for an unknown mime type.
extensionFromMimePlatform4
Requires Dart 3.4.0.
Requires Dart 2.17.
Requires Dart 3.4 or greater.
Requires Dart 3.1 or greater.
Deprecations to plan for
Deprecated1
Notes that VersionConstraint.any and VersionConstraint.empty should not be reassigned and will become final.
VersionConstraint.anyVersionConstraint.empty