Skip to content

Commit 4d74acd

Browse files
migrate to js-promise
1 parent 662ddf1 commit 4d74acd

File tree

6 files changed

+41
-46
lines changed

6 files changed

+41
-46
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@ Notable changes to this project are documented in this file. The format is based
55
## [Unreleased]
66

77
Breaking changes:
8+
89
- Fork from web-fetch
910
- Rename package
11+
- Replaced web-promise dependency with js-promise
1012

1113
New features:
14+
1215
- Improve request options to only use the provided attributes instead of a full options record using default values
1316

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

2023
Breaking changes:
24+
2125
- Migrate FFI to ES modules (#8 by @JordanMartinez)
2226

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

3135
Breaking changes:
36+
3237
- Added support for PureScript 0.14 and dropped support for all previous versions (#2)
3338

3439
New features:
3540

3641
Bugfixes:
3742

3843
Other improvements:
44+
3945
- Migrated CI to GitHub Actions and updated installation instructions to use Spago (#1)
4046
- Added a CHANGELOG.md file and pull request template (#3, #4)
4147

bower.json

Lines changed: 30 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,32 @@
11
{
2-
"name": "purescript-fetch-core",
3-
"license": [
4-
"MIT"
5-
],
6-
"repository": {
7-
"type": "git",
8-
"url": "https://github.com/rowtype-yoga/purescript-fetch-core.git"
9-
},
10-
"ignore": [
11-
"**/.*",
12-
"node_modules",
13-
"bower_components",
14-
"output"
15-
],
16-
"dependencies": {
17-
"purescript-arraybuffer-types": "^v3.0.2",
18-
"purescript-arrays": "^v7.0.0",
19-
"purescript-console": "^v6.0.0",
20-
"purescript-effect": "^v4.0.0",
21-
"purescript-foldable-traversable": "^v6.0.0",
22-
"purescript-foreign": "^v7.0.0",
23-
"purescript-foreign-object": "^v4.0.0",
24-
"purescript-functions": "^v6.0.0",
25-
"purescript-http-methods": "^v6.0.0",
26-
"purescript-maybe": "^v6.0.0",
27-
"purescript-newtype": "^v5.0.0",
28-
"purescript-nullable": "^v6.0.0",
29-
"purescript-prelude": "^v6.0.0",
30-
"purescript-record": "^v4.0.0",
31-
"purescript-tuples": "^v7.0.0",
32-
"purescript-typelevel-prelude": "^v7.0.0",
33-
"purescript-unfoldable": "^v6.0.0",
34-
"purescript-unsafe-coerce": "^v6.0.0",
35-
"purescript-web-file": "^v4.0.0",
36-
"purescript-web-promise": "https://github.com/purescript-web/purescript-web-promise.git#v3.0.0",
37-
"purescript-web-streams": "https://github.com/purescript-web/purescript-web-streams.git#v3.0.0"
38-
}
2+
"name": "purescript-fetch-core",
3+
"license": ["MIT"],
4+
"repository": {
5+
"type": "git",
6+
"url": "https://github.com/rowtype-yoga/purescript-fetch-core.git"
7+
},
8+
"ignore": ["**/.*", "node_modules", "bower_components", "output"],
9+
"dependencies": {
10+
"purescript-arraybuffer-types": "^v3.0.2",
11+
"purescript-arrays": "^v7.0.0",
12+
"purescript-console": "^v6.0.0",
13+
"purescript-effect": "^v4.0.0",
14+
"purescript-foldable-traversable": "^v6.0.0",
15+
"purescript-foreign": "^v7.0.0",
16+
"purescript-foreign-object": "^v4.0.0",
17+
"purescript-functions": "^v6.0.0",
18+
"purescript-http-methods": "^v6.0.0",
19+
"purescript-js-promise": "https://github.com/purescript-contrib/purescript-js-promise.git#^v3.0.0",
20+
"purescript-maybe": "^v6.0.0",
21+
"purescript-newtype": "^v5.0.0",
22+
"purescript-nullable": "^v6.0.0",
23+
"purescript-prelude": "^v6.0.0",
24+
"purescript-record": "^v4.0.0",
25+
"purescript-tuples": "^v7.0.0",
26+
"purescript-typelevel-prelude": "^v7.0.0",
27+
"purescript-unfoldable": "^v6.0.0",
28+
"purescript-unsafe-coerce": "^v6.0.0",
29+
"purescript-web-file": "^v4.0.0",
30+
"purescript-web-streams": "https://github.com/purescript-web/purescript-web-streams.git#^v4.0.0"
31+
}
3932
}

packages.dhall

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
21
let upstream =
3-
https://github.com/purescript/package-sets/releases/download/psc-0.15.4-20220816/packages.dhall
4-
sha256:8b4467b4b5041914f9b765779c8936d6d4c230b1f60eb64f6269c71812fd7e98
2+
https://github.com/purescript/package-sets/releases/download/psc-0.15.10-20230803/packages.dhall
3+
sha256:7da82e40277c398fd70f16af6450fb74287a88e2a3c8885c065dcdb9df893761
54

65
in upstream

spago.dhall

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,21 @@
22
, dependencies =
33
[ "arraybuffer-types"
44
, "arrays"
5-
, "console"
65
, "effect"
76
, "foldable-traversable"
87
, "foreign"
98
, "foreign-object"
109
, "functions"
1110
, "http-methods"
11+
, "js-promise"
1212
, "maybe"
1313
, "newtype"
14-
, "nullable"
1514
, "prelude"
1615
, "record"
1716
, "tuples"
1817
, "typelevel-prelude"
1918
, "unfoldable"
20-
, "unsafe-coerce"
2119
, "web-file"
22-
, "web-promise"
2320
, "web-streams"
2421
]
2522
, packages = ./packages.dhall

src/Fetch/Core.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Prim.Row as Row
1010
import Fetch.Core.AbortController (AbortSignal)
1111
import Fetch.Core.Request (Request)
1212
import Fetch.Core.Response (Response)
13-
import Web.Promise (Promise)
13+
import Promise (Promise)
1414

1515
type FetchOptions =
1616
( keepalive :: Boolean

src/Fetch/Core/Response.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import Effect (Effect)
1818
import Fetch.Core.Headers (Headers)
1919
import Foreign (Foreign)
2020
import Web.File.Blob (Blob)
21-
import Web.Promise (Promise)
21+
import Promise (Promise)
2222
import Web.Streams.ReadableStream (ReadableStream)
2323

2424
foreign import data Response :: Type

0 commit comments

Comments
 (0)