Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ghc-mime-types for openSUSE:Factory checked in at 2023-10-18 21:25:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-mime-types (Old) and /work/SRC/openSUSE:Factory/.ghc-mime-types.new.31755 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-mime-types" Wed Oct 18 21:25:59 2023 rev:15 rq:1118481 version:0.1.2.0 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-mime-types/ghc-mime-types.changes 2023-04-04 21:21:35.329593987 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-mime-types.new.31755/ghc-mime-types.changes 2023-10-18 21:26:14.089841779 +0200 @@ -1,0 +2,10 @@ +Wed Oct 18 02:11:00 UTC 2023 - Peter Simons <[email protected]> + +- Update mime-types to version 0.1.2.0. + ## 0.1.2.0 + + * Added `defaultExtensionMap` to provide the inverse of `defaultMimeMap`. + + See PR [#930](https://github.com/yesodweb/wai/pull/930) and [#948](https://github.com/yesodweb/wai/pull/948). + +------------------------------------------------------------------- Old: ---- mime-types-0.1.1.0.tar.gz New: ---- mime-types-0.1.2.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-mime-types.spec ++++++ --- /var/tmp/diff_new_pack.m1O6AR/_old 2023-10-18 21:26:15.737901479 +0200 +++ /var/tmp/diff_new_pack.m1O6AR/_new 2023-10-18 21:26:15.753902058 +0200 @@ -19,7 +19,7 @@ %global pkg_name mime-types %global pkgver %{pkg_name}-%{version} Name: ghc-%{pkg_name} -Version: 0.1.1.0 +Version: 0.1.2.0 Release: 0 Summary: Basic mime-type handling types and functions License: MIT ++++++ mime-types-0.1.1.0.tar.gz -> mime-types-0.1.2.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mime-types-0.1.1.0/ChangeLog.md new/mime-types-0.1.2.0/ChangeLog.md --- old/mime-types-0.1.1.0/ChangeLog.md 2022-09-11 14:48:55.000000000 +0200 +++ new/mime-types-0.1.2.0/ChangeLog.md 2023-10-18 04:09:01.000000000 +0200 @@ -1,3 +1,9 @@ +## 0.1.2.0 + +* Added `defaultExtensionMap` to provide the inverse of `defaultMimeMap`. + +See PR [#930](https://github.com/yesodweb/wai/pull/930) and [#948](https://github.com/yesodweb/wai/pull/948). + ## 0.1.1.0 * Replace `audio/x-mpegurl` with IANA registered type diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mime-types-0.1.1.0/Network/Mime.hs new/mime-types-0.1.2.0/Network/Mime.hs --- old/mime-types-0.1.1.0/Network/Mime.hs 2022-09-11 14:48:55.000000000 +0200 +++ new/mime-types-0.1.2.0/Network/Mime.hs 2023-10-18 04:09:01.000000000 +0200 @@ -6,6 +6,7 @@ -- * Defaults , defaultMimeType , defaultMimeMap + , defaultExtensionMap -- * Utilities , fileNameExtensions -- * Types @@ -13,8 +14,10 @@ , MimeType , MimeMap , Extension + , ExtensionMap ) where +import qualified Data.List as L import Data.Text (Text) import qualified Data.Text as T import Data.ByteString (ByteString) @@ -24,6 +27,12 @@ -- | Maps extensions to mime types. type MimeMap = Map.Map Extension MimeType +-- | Maps mime types to extensions. +-- The list of extensions is in alphabetical order. +-- +-- @since 0.1.2.0 +type ExtensionMap = Map.Map MimeType [Extension] + -- | The filename component of a filepath, leaving off the directory but -- keeping all extensions. type FileName = Text @@ -75,8 +84,21 @@ -- -- Generated from the Apache and nginx mime.types files. defaultMimeMap :: MimeMap -defaultMimeMap = Map.fromAscList [ - ("123", "application/vnd.lotus-1-2-3") +defaultMimeMap = Map.fromAscList mimeAscList + +-- | A mapping of 'MimeType' to a set of 'Extension's. +-- +-- @since 0.1.2.0 +defaultExtensionMap :: ExtensionMap +defaultExtensionMap = + L.foldr go mempty mimeAscList + where + go (ext, mimeType) = + Map.alter (Just . maybe [ext] (ext :)) mimeType + +mimeAscList :: [(Extension, MimeType)] +mimeAscList = + [ ("123", "application/vnd.lotus-1-2-3") , ("3dml", "text/vnd.in3d.3dml") , ("3ds", "image/x-3ds") , ("3g2", "video/3gpp2") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mime-types-0.1.1.0/mime-types.cabal new/mime-types-0.1.2.0/mime-types.cabal --- old/mime-types-0.1.1.0/mime-types.cabal 2022-09-11 14:56:25.000000000 +0200 +++ new/mime-types-0.1.2.0/mime-types.cabal 2023-10-18 04:09:01.000000000 +0200 @@ -1,5 +1,5 @@ name: mime-types -version: 0.1.1.0 +version: 0.1.2.0 synopsis: Basic mime-type handling types and functions description: API docs and the README are available at <http://www.stackage.org/package/mime-types>. homepage: https://github.com/yesodweb/wai
