From ab8c1fe88cc378e65d868aefca64c2bf468c908c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Victor=20Peter=20Rouven=20M=C3=BCller?= Date: Wed, 3 Mar 2021 20:16:22 +0100 Subject: [PATCH] Update to purescript 0.14 (#167) --- packages.dhall | 2 +- spago.dhall | 2 +- src/HTTPure/Utils.purs | 11 ++++------- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/packages.dhall b/packages.dhall index dbe04f4..0e0b19c 100644 --- a/packages.dhall +++ b/packages.dhall @@ -1,5 +1,5 @@ let upstream = - https://github.com/purescript/package-sets/releases/download/psc-0.13.6-20200127/packages.dhall sha256:06a623f48c49ea1c7675fdf47f81ddb02ae274558e29f511efae1df99ea92fb8 + https://github.com/purescript/package-sets/releases/download/psc-0.14.0-20210302/packages.dhall sha256:20cc5b89cf15433623ad6f250f112bf7a6bd82b5972363ecff4abf1febb02c50 let overrides = {=} diff --git a/spago.dhall b/spago.dhall index da590b6..0613217 100644 --- a/spago.dhall +++ b/spago.dhall @@ -10,7 +10,6 @@ , "exceptions" , "foldable-traversable" , "foreign" - , "globals" , "lists" , "maybe" , "newtype" @@ -30,6 +29,7 @@ , "tuples" , "type-equality" , "unsafe-coerce" + , "js-uri" ] , packages = ./packages.dhall , sources = [ "src/**/*.purs", "test/**/*.purs", "docs/**/*.purs" ] diff --git a/src/HTTPure/Utils.purs b/src/HTTPure/Utils.purs index c93a553..7b0ef50 100644 --- a/src/HTTPure/Utils.purs +++ b/src/HTTPure/Utils.purs @@ -1,6 +1,5 @@ module HTTPure.Utils - ( module Global - , encodeURIComponent + ( encodeURIComponent , replacePlus , urlDecode ) where @@ -9,12 +8,10 @@ import Prelude import Data.Maybe as Maybe import Data.String as String -import Global (decodeURIComponent) as Global -import Global.Unsafe (unsafeEncodeURIComponent) - +import JSURI as JSURI encodeURIComponent :: String -> String -encodeURIComponent = unsafeEncodeURIComponent +encodeURIComponent s = Maybe.fromMaybe s $ JSURI.encodeURIComponent s replacePlus :: String -> String @@ -24,4 +21,4 @@ replacePlus = urlDecode :: String -> String urlDecode s = - Maybe.fromMaybe s $ Global.decodeURIComponent s + Maybe.fromMaybe s $ JSURI.decodeURIComponent s