diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6b0550f..d4fd0ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,21 +1,18 @@ name: CI - on: push: branches: [main] pull_request: branches: [main] - jobs: build: runs-on: ubuntu-latest - steps: - uses: actions/checkout@v2 - - name: Set up a PureScript toolchain uses: purescript-contrib/setup-purescript@main - + with: + purescript: 0.14.0-rc3 - name: Cache PureScript dependencies uses: actions/cache@v2 with: @@ -23,12 +20,9 @@ jobs: path: | .spago output - - name: Install dependencies run: spago install - - name: Build source run: spago build --no-install --purs-args '--censor-lib --strict' - - name: Run tests run: spago test --no-install diff --git a/bower.json b/bower.json index 8b3e2fc..35a24da 100644 --- a/bower.json +++ b/bower.json @@ -3,7 +3,7 @@ "license": "BSD-3-Clause", "repository": { "type": "git", - "url": "git://github.com/purescript-contrib/purescript-form-urlencoded.git" + "url": "https://github.com/purescript-contrib/purescript-form-urlencoded.git" }, "ignore": [ "**/.*", @@ -14,15 +14,15 @@ "package.json" ], "dependencies": { - "purescript-globals": "^4.1.0", - "purescript-maybe": "^4.0.0", - "purescript-newtype": "^3.0.0", - "purescript-prelude": "^4.0.0", - "purescript-strings": "^4.0.0", - "purescript-tuples": "^5.0.0", - "purescript-foldable-traversable": "^4.1.1" + "purescript-maybe": "master", + "purescript-newtype": "master", + "purescript-prelude": "master", + "purescript-strings": "master", + "purescript-tuples": "master", + "purescript-js-uri": "https://github.com/purescript-contrib/purescript-js-uri.git#main", + "purescript-foldable-traversable": "master" }, "devDependencies": { - "purescript-assert": "^4.1.0" + "purescript-assert": "master" } } diff --git a/packages.dhall b/packages.dhall index 1f2cd01..9c3ee6f 100644 --- a/packages.dhall +++ b/packages.dhall @@ -1,4 +1,4 @@ let upstream = - https://github.com/purescript/package-sets/releases/download/psc-0.13.8-20200911-2/packages.dhall sha256:872c06349ed9c8210be43982dc6466c2ca7c5c441129826bcb9bf3672938f16e + https://raw.githubusercontent.com/purescript/package-sets/prepare-0.14/src/packages.dhall in upstream diff --git a/spago.dhall b/spago.dhall index c0d4044..fb6fe2e 100644 --- a/spago.dhall +++ b/spago.dhall @@ -4,7 +4,7 @@ , "console" , "effect" , "foldable-traversable" - , "globals" + , "js-uri" , "maybe" , "newtype" , "prelude" diff --git a/src/Data/FormURLEncoded.purs b/src/Data/FormURLEncoded.purs index 4b3ea54..c54e326 100644 --- a/src/Data/FormURLEncoded.purs +++ b/src/Data/FormURLEncoded.purs @@ -8,7 +8,7 @@ import Data.String (joinWith, split) as String import Data.String.Pattern (Pattern(..)) import Data.Traversable (traverse) import Data.Tuple (Tuple(..)) -import Global (decodeURIComponent, encodeURIComponent) +import JSURI (decodeURIComponent, encodeURIComponent) -- | `FormURLEncoded` is an ordered list of key-value pairs with possible duplicates. newtype FormURLEncoded = FormURLEncoded (Array (Tuple String (Maybe String))) @@ -37,7 +37,7 @@ encode = map (String.joinWith "&") <<< traverse encodePart <<< toArray encodePart = case _ of Tuple k Nothing -> encodeURIComponent k Tuple k (Just v) -> (\key val -> key <> "=" <> val) <$> encodeURIComponent k <*> encodeURIComponent v - + -- | Decode `FormURLEncoded` from `application/x-www-form-urlencoded`. decode :: String -> Maybe FormURLEncoded decode = map FormURLEncoded <<< traverse decodePart <<< String.split (Pattern "&")