diff --git a/.tidyrc.json b/.tidyrc.json new file mode 100644 index 0000000..9e39cf1 --- /dev/null +++ b/.tidyrc.json @@ -0,0 +1,10 @@ +{ + "importSort": "ide", + "importWrap": "source", + "indent": 2, + "operatorsFile": null, + "ribbon": 1, + "typeArrowPlacement": "first", + "unicode": "never", + "width": null +} diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e04484..bc1b2e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ Notable changes to this project are documented in this file. The format is based ## [Unreleased] Breaking changes: +- Migrated from `web-promise` to `js-promise` New features: diff --git a/bower.json b/bower.json index 1202e02..e81e083 100644 --- a/bower.json +++ b/bower.json @@ -18,11 +18,11 @@ "purescript-effect": "^4.0.0", "purescript-foreign-object": "^4.0.0", "purescript-http-methods": "^6.0.0", + "purescript-js-promise": "https://github.com/purescript-contrib/purescript-js-promise.git#^1.0.0", "purescript-prelude": "^6.0.0", "purescript-record": "^4.0.0", "purescript-typelevel-prelude": "^7.0.0", "purescript-web-file": "^4.0.0", - "purescript-web-promise": "https://github.com/purescript-web/purescript-web-promise.git#^3.0.0", "purescript-web-streams": "https://github.com/purescript-web/purescript-web-streams.git#^3.0.0" } } diff --git a/package.json b/package.json index 4ea39f9..532609e 100644 --- a/package.json +++ b/package.json @@ -2,12 +2,13 @@ "private": true, "scripts": { "clean": "rimraf output && rimraf .pulp-cache", - "build": "eslint src && pulp build -- --censor-lib --strict" + "build": "eslint src && purs-tidy check --config-require src/**/*.purs && pulp build -- --censor-lib --strict" }, "devDependencies": { - "eslint": "^7.15.0", - "pulp": "16.0.0-0", + "eslint": "^8.28.0", + "pulp": "^16.0.2", "purescript-psa": "^0.8.2", + "purs-tidy": "^0.9.2", "rimraf": "^3.0.2" } } diff --git a/src/Web/Fetch.purs b/src/Web/Fetch.purs index 9ef390a..bb05340 100644 --- a/src/Web/Fetch.purs +++ b/src/Web/Fetch.purs @@ -7,10 +7,10 @@ module Web.Fetch import Effect (Effect) import Effect.Uncurried (EffectFn2, runEffectFn2) import Prim.Row as Row +import Promise (Promise) import Web.Fetch.AbortController (AbortSignal) import Web.Fetch.Request (Request) import Web.Fetch.Response (Response) -import Web.Promise (Promise) type FetchOptions = ( keepalive :: Boolean diff --git a/src/Web/Fetch/Response.purs b/src/Web/Fetch/Response.purs index fc0e9e7..8f2c721 100644 --- a/src/Web/Fetch/Response.purs +++ b/src/Web/Fetch/Response.purs @@ -2,9 +2,9 @@ module Web.Fetch.Response where import Data.ArrayBuffer.Types (ArrayBuffer, Uint8Array) import Effect (Effect) +import Promise (Promise) import Web.Fetch.Headers (Headers) import Web.File.Blob (Blob) -import Web.Promise (Promise) import Web.Streams.ReadableStream (ReadableStream) foreign import data Response :: Type