From 01f505d05b0036f7bc750242bb0bf4926fb03612 Mon Sep 17 00:00:00 2001 From: Orion Kindel Date: Sun, 26 Nov 2023 16:14:56 -0600 Subject: [PATCH] fix: use url-immutable --- spago.yaml | 20 ++++++++++++++++++-- src/HTTP.purs | 2 +- src/HTTP/Request.purs | 2 +- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/spago.yaml b/spago.yaml index fd47f44..e4a4568 100644 --- a/spago.yaml +++ b/spago.yaml @@ -15,7 +15,7 @@ package: - maybe - newtype - node-buffer - - node-url + - url - nullable - numbers - ordered-collections @@ -27,7 +27,23 @@ package: - web-file name: fetch workspace: - extra_packages: {} + extra_packages: + url: + git: 'https://git.orionkindel.com/thunderstrike/purescript-url-immutable.git' + ref: 'dbfa3b6' + dependencies: + - arrays + - effect + - filterable + - foldable-traversable + - integers + - maybe + - newtype + - nullable + - ordered-collections + - prelude + - strings + - tuples package_set: url: https://raw.githubusercontent.com/purescript/package-sets/psc-0.15.10-20230930/packages.json hash: sha256-nTsd44o7/hrTdk0c6dh0wyBqhFFDJJIeKdQU6L1zv/A= diff --git a/src/HTTP.purs b/src/HTTP.purs index 91028ef..de50ed7 100644 --- a/src/HTTP.purs +++ b/src/HTTP.purs @@ -6,6 +6,7 @@ import Control.Promise (Promise) import Control.Promise as Promise import Data.Nullable (Nullable) import Data.Nullable as Nullable +import Data.URL (URL) import Effect (Effect) import Effect.Aff.Class (class MonadAff, liftAff) import Foreign.Object (Object) @@ -14,7 +15,6 @@ import HTTP.Header (headers) as X import HTTP.Request (class Request, Method(..)) as X import HTTP.Request as Req import HTTP.Response (Response) -import Node.URL (URL) foreign import fetchImpl :: URL -> String -> Object String -> Nullable Req.RawRequestBody -> Effect (Promise Response) diff --git a/src/HTTP/Request.purs b/src/HTTP/Request.purs index 6cc58cf..4907fff 100644 --- a/src/HTTP/Request.purs +++ b/src/HTTP/Request.purs @@ -27,6 +27,7 @@ import Data.Newtype (unwrap) import Data.Nullable as Nullable import Data.Tuple.Containing (class TupleContaining, extract) import Data.Tuple.Nested (type (/\), (/\)) +import Data.URL (URL) import Effect (Effect) import Effect.Aff.Class (class MonadAff, liftAff) import Effect.Class (class MonadEffect, liftEffect) @@ -39,7 +40,6 @@ import HTTP.MIME as MIME import Node.Buffer (Buffer) import Node.Buffer as Buffer import Node.Encoding (Encoding(..)) -import Node.URL (URL) import Simple.JSON (class WriteForeign, writeJSON) import Unsafe.Coerce (unsafeCoerce) import Web.File.Blob (Blob)