git.iko.soy/rowtype-yoga/purescript-fetch-core
on main help sign in
Merge pull request #1 from thomashoneyman/main

Migrate to js-promise

commitc70a5c2789ceaef9c9ce89682ae8eac305018523 authorJantxu <77549848+sigma-andex@users.noreply.github.com> dateFri 4 Aug 2023, 17:28 (3 years ago) parent662ddf14d74acd
6 files changed+41−46
CHANGELOG.md+6 bower.json+30−37 packages.dhall+2−3 spago.dhall+1−4 src/Fetch/Core.purs+1−1 src/Fetch/Core/Response.purs+1−1
CHANGELOG.md+6
@@ -5,10 +5,13 @@ Notable changes to this project are documented in this file. The format is based
55## [Unreleased]
66
77Breaking changes:
8+
89- Fork from web-fetch
910- Rename package
11+- Replaced web-promise dependency with js-promise
1012
1113New features:
14+
1215- Improve request options to only use the provided attributes instead of a full options record using default values
1316
1417Bugfixes:
@@ -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
2023Breaking changes:
24+
2125- Migrate FFI to ES modules (#8 by @JordanMartinez)
2226
2327New features:
@@ -29,6 +33,7 @@ Other improvements:
2933## [v2.0.0](https://github.com/purescript-web/purescript-web-fetch/releases/tag/v2.0.0) - 2021-02-26
3034
3135Breaking changes:
36+
3237- Added support for PureScript 0.14 and dropped support for all previous versions (#2)
3338
3439New features:
@@ -36,6 +41,7 @@ New features:
3641Bugfixes:
3742
3843Other 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+30−37
@@ -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+2−3
@@ -1,6 +1,5 @@
1−
21let 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
65in upstream
spago.dhall+1−4
@@ -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+1−1
@@ -10,7 +10,7 @@ import Prim.Row as Row
1010import Fetch.Core.AbortController (AbortSignal)
1111import Fetch.Core.Request (Request)
1212import Fetch.Core.Response (Response)
13−import Web.Promise (Promise)
13+import Promise (Promise)
1414
1515type FetchOptions =
1616 ( keepalive :: Boolean
src/Fetch/Core/Response.purs+1−1
@@ -18,7 +18,7 @@ import Effect (Effect)
1818import Fetch.Core.Headers (Headers)
1919import Foreign (Foreign)
2020import Web.File.Blob (Blob)
21−import Web.Promise (Promise)
21+import Promise (Promise)
2222import Web.Streams.ReadableStream (ReadableStream)
2323
2424foreign import data Response :: Type