packages feed

filepath-bytestring 1.4.100.3.2 → 1.5.2.0.0

raw patch · 4 files changed

+24/−18 lines, 4 filesdep ~bytestringdep ~filepathPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: bytestring, filepath

API changes (from Hackage documentation)

Files

CHANGELOG view
@@ -1,19 +1,16 @@-filepath-bytestring (1.4.100.3.2) unstable; urgency=medium--  * Relax bounds to allow base-4.19.-- -- Joey Hess <id@joeyh.name>  Mon, 29 Jul 2024 19:40:51 -0400--filepath-bytestring (1.4.100.3.1) unstable; urgency=medium+filepath-bytestring (1.5.2.0.0) unstable; urgency=medium -  * Updated to filepath-1.4.100.3, which fixes a regression.-  * Allow up to filepath-1.4.200.1.+  * Update to correspond to filepath-1.5.2.0, which fixes a bug+    introduced in filepath-1.4.100.2.+  * normalise C:\\\\ to C:\ - -- Joey Hess <id@joeyh.name>  Mon, 29 Jul 2024 19:27:57 -0400+ -- Joey Hess <id@joeyh.name>  Tue, 06 Feb 2024 10:33:31 -0400  filepath-bytestring (1.4.2.1.13) unstable; urgency=medium    * Relax bounds to allow base-4.18 and filepath-1.4.100.3 (ghc 9.6).+    (Note that this version did not replicate a bug introduced in+    filepath-1.4.100.2. So the test suite would sometimes fail.)   -- Joey Hess <id@joeyh.name>  Tue, 20 Jun 2023 12:22:31 -0400 
System/FilePath/Internal.hs view
@@ -964,6 +964,7 @@ -- > Posix:   normalise "./bob/fred/" == "bob/fred/" -- > Windows: normalise "c:\\file/bob\\" == "C:\\file\\bob\\" -- > Windows: normalise "c:\\" == "C:\\"+-- > Windows: normalise "c:\\\\\\\\" == "C:\\" -- > Windows: normalise "C:.\\" == "C:" -- > Windows: normalise "\\\\server\\test" == "\\\\server\\test" -- > Windows: normalise "//server/test" == "\\\\server\\test"@@ -1012,9 +1013,14 @@ normaliseDrive :: RawFilePath -> RawFilePath normaliseDrive "" = "" normaliseDrive _ | isPosix = B.singleton pathSeparator-normaliseDrive drive-	| isJust (readDriveLetter x2) = upcasedriveletter x2-	| otherwise = x2+normaliseDrive drive =+  case readDriveLetter x2 of+    Nothing -> x2+    Just (drv, _) ->+      case B.unpack drv of+        (x:_:[]) -> B.pack [upcasedriveletter x, colon]+        (x:_) -> B.pack [upcasedriveletter x, colon, pathSeparator]+        _ -> error "impossible"   where 	x2 = B.map repSlash drive @@ -1022,7 +1028,8 @@  	-- A Windows drive letter is an ascii character, so it's safe to 	-- operate on the ByteString containing it using B8.-	upcasedriveletter = B8.map toUpper+	upcasedriveletter = fromIntegral . ord . toUpper . chr . fromIntegral+	colon = fromIntegral (ord ':')  -- Information for validity functions on Windows. See [1]. isBadCharacter :: Word8 -> Bool
filepath-bytestring.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.18 name:           filepath-bytestring-version:        1.4.100.3.2+version:        1.5.2.0.0 -- NOTE: Don't forget to update CHANGELOG and the filepath dependency below license:        BSD3 license-file:   LICENSE@@ -54,7 +54,8 @@      build-depends:         base >= 4 && < 4.20,-        bytestring >= 0.11.2.0+        bytestring >= 0.11.3.0,+        filepath == 1.5.2.0     if os(Windows)         build-depends: utf8-string     else@@ -79,7 +80,7 @@         QuickCheck >= 2.7 && < 2.15, 	-- Versions of filepath that are equvilant to this 	-- library, for quickcheck equivilance tests.-        filepath >= 1.4.100.3 && <= 1.4.200.1+        filepath == 1.5.2.0  benchmark filepath-bench     type: exitcode-stdio-1.0@@ -92,4 +93,4 @@         criterion,         filepath-bytestring, 	-- Version of filepath to benchmark against-        filepath >= 1.4.100.3 && <= 1.4.200.1+        filepath >= 1.4.2 && <= 1.4.2.1
tests/TestGen.hs view
@@ -395,6 +395,7 @@     ,("P.normalise \"./bob/fred/\" == \"bob/fred/\"", property $ P.normalise "./bob/fred/" == "bob/fred/")     ,("W.normalise \"c:\\\\file/bob\\\\\" == \"C:\\\\file\\\\bob\\\\\"", property $ W.normalise "c:\\file/bob\\" == "C:\\file\\bob\\")     ,("W.normalise \"c:\\\\\" == \"C:\\\\\"", property $ W.normalise "c:\\" == "C:\\")+    ,("W.normalise \"c:\\\\\\\\\\\\\\\\\" == \"C:\\\\\"", property $ W.normalise "c:\\\\\\\\" == "C:\\")     ,("W.normalise \"C:.\\\\\" == \"C:\"", property $ W.normalise "C:.\\" == "C:")     ,("W.normalise \"\\\\\\\\server\\\\test\" == \"\\\\\\\\server\\\\test\"", property $ W.normalise "\\\\server\\test" == "\\\\server\\test")     ,("W.normalise \"//server/test\" == \"\\\\\\\\server\\\\test\"", property $ W.normalise "//server/test" == "\\\\server\\test")