Skip to content

Upgrading mime-types 2 to 3

Breaking2.99.3 → 3.7.0Breaking1Deprecated3New1Changed4Other12

Fetching 19 releases from GitHub…5 / 19
BreakingUpgrade verdict

1 breaking change.

  • Comparing MIME types now uses simpler logic. In rare cases this can raise an error where it previously did not.
  • A method used internally for sorting MIME types is being phased out and will get a new name later. Nothing breaks right now.
  • Creating a MIME type from an array is now deprecated and will show a warning.
3 items need code or config changes

Ruby requirement changed in 3.0: >= 1.9.2 → >= 2.0.

Adds logger >= 0, mime-types-data ~> 3.2025, >= 3.2025.0507.

Breaking1
Simplifies MIME::Type#<=> to use the new priority_compare and String fallback, which may raise exceptions where none occurred before.
MIME::Type#<=>MIME::Type#priority_compareString
Deprecated2
Deprecates MIME::Type#priority_compare, which will be renamed to MIME::Type#<=> in a future release.
MIME::Type#priority_compareMIME::Type#<=>
Deprecates Array-based MIME::Type initialization, which now emits deprecation warnings.
MIME::Type