Skip to content

Migrate to js-promise #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@ Notable changes to this project are documented in this file. The format is based
## [Unreleased]

Breaking changes:

- Fork from web-fetch
- Rename package
- Replaced web-promise dependency with js-promise

New features:

- Improve request options to only use the provided attributes instead of a full options record using default values

Bugfixes:
Expand All @@ -18,6 +21,7 @@ Other improvements:
## [v3.0.0](https://github.com/purescript-web/purescript-web-fetch/releases/tag/v3.0.0) - 2022-04-27

Breaking changes:

- Migrate FFI to ES modules (#8 by @JordanMartinez)

New features:
Expand All @@ -29,13 +33,15 @@ Other improvements:
## [v2.0.0](https://github.com/purescript-web/purescript-web-fetch/releases/tag/v2.0.0) - 2021-02-26

Breaking changes:

- Added support for PureScript 0.14 and dropped support for all previous versions (#2)

New features:

Bugfixes:

Other improvements:

- Migrated CI to GitHub Actions and updated installation instructions to use Spago (#1)
- Added a CHANGELOG.md file and pull request template (#3, #4)

Expand Down
67 changes: 30 additions & 37 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,39 +1,32 @@
{
"name": "purescript-fetch-core",
"license": [
"MIT"
],
"repository": {
"type": "git",
"url": "https://github.com/rowtype-yoga/purescript-fetch-core.git"
},
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"output"
],
"dependencies": {
"purescript-arraybuffer-types": "^v3.0.2",
"purescript-arrays": "^v7.0.0",
"purescript-console": "^v6.0.0",
"purescript-effect": "^v4.0.0",
"purescript-foldable-traversable": "^v6.0.0",
"purescript-foreign": "^v7.0.0",
"purescript-foreign-object": "^v4.0.0",
"purescript-functions": "^v6.0.0",
"purescript-http-methods": "^v6.0.0",
"purescript-maybe": "^v6.0.0",
"purescript-newtype": "^v5.0.0",
"purescript-nullable": "^v6.0.0",
"purescript-prelude": "^v6.0.0",
"purescript-record": "^v4.0.0",
"purescript-tuples": "^v7.0.0",
"purescript-typelevel-prelude": "^v7.0.0",
"purescript-unfoldable": "^v6.0.0",
"purescript-unsafe-coerce": "^v6.0.0",
"purescript-web-file": "^v4.0.0",
"purescript-web-promise": "https://github.com/purescript-web/purescript-web-promise.git#v3.0.0",
"purescript-web-streams": "https://github.com/purescript-web/purescript-web-streams.git#v3.0.0"
}
"name": "purescript-fetch-core",
"license": ["MIT"],
"repository": {
"type": "git",
"url": "https://github.com/rowtype-yoga/purescript-fetch-core.git"
},
"ignore": ["**/.*", "node_modules", "bower_components", "output"],
"dependencies": {
"purescript-arraybuffer-types": "^v3.0.2",
"purescript-arrays": "^v7.0.0",
"purescript-console": "^v6.0.0",
"purescript-effect": "^v4.0.0",
"purescript-foldable-traversable": "^v6.0.0",
"purescript-foreign": "^v7.0.0",
"purescript-foreign-object": "^v4.0.0",
"purescript-functions": "^v6.0.0",
"purescript-http-methods": "^v6.0.0",
"purescript-js-promise": "https://github.com/purescript-contrib/purescript-js-promise.git#^v3.0.0",
"purescript-maybe": "^v6.0.0",
"purescript-newtype": "^v5.0.0",
"purescript-nullable": "^v6.0.0",
"purescript-prelude": "^v6.0.0",
"purescript-record": "^v4.0.0",
"purescript-tuples": "^v7.0.0",
"purescript-typelevel-prelude": "^v7.0.0",
"purescript-unfoldable": "^v6.0.0",
"purescript-unsafe-coerce": "^v6.0.0",
"purescript-web-file": "^v4.0.0",
"purescript-web-streams": "https://github.com/purescript-web/purescript-web-streams.git#^v4.0.0"
}
}
5 changes: 2 additions & 3 deletions packages.dhall
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

let upstream =
https://github.com/purescript/package-sets/releases/download/psc-0.15.4-20220816/packages.dhall
sha256:8b4467b4b5041914f9b765779c8936d6d4c230b1f60eb64f6269c71812fd7e98
https://github.com/purescript/package-sets/releases/download/psc-0.15.10-20230803/packages.dhall
sha256:7da82e40277c398fd70f16af6450fb74287a88e2a3c8885c065dcdb9df893761

in upstream
5 changes: 1 addition & 4 deletions spago.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,21 @@
, dependencies =
[ "arraybuffer-types"
, "arrays"
, "console"
, "effect"
, "foldable-traversable"
, "foreign"
, "foreign-object"
, "functions"
, "http-methods"
, "js-promise"
, "maybe"
, "newtype"
, "nullable"
, "prelude"
, "record"
, "tuples"
, "typelevel-prelude"
, "unfoldable"
, "unsafe-coerce"
, "web-file"
, "web-promise"
, "web-streams"
]
, packages = ./packages.dhall
Expand Down
2 changes: 1 addition & 1 deletion src/Fetch/Core.purs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Prim.Row as Row
import Fetch.Core.AbortController (AbortSignal)
import Fetch.Core.Request (Request)
import Fetch.Core.Response (Response)
import Web.Promise (Promise)
import Promise (Promise)

type FetchOptions =
( keepalive :: Boolean
Expand Down
2 changes: 1 addition & 1 deletion src/Fetch/Core/Response.purs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import Effect (Effect)
import Fetch.Core.Headers (Headers)
import Foreign (Foreign)
import Web.File.Blob (Blob)
import Web.Promise (Promise)
import Promise (Promise)
import Web.Streams.ReadableStream (ReadableStream)

foreign import data Response :: Type
Expand Down