File tree 11 files changed +63
-71
lines changed
11 files changed +63
-71
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"parserOptions" : {
3
- "ecmaVersion" : 5
3
+ "ecmaVersion" : 6 ,
4
+ "sourceType" : " module"
4
5
},
5
6
"extends" : " eslint:recommended" ,
6
7
"env" : {
7
- "commonjs" : true ,
8
8
"browser" : true
9
9
},
10
10
"rules" : {
Original file line number Diff line number Diff line change @@ -13,10 +13,12 @@ jobs:
13
13
- uses : actions/checkout@v2
14
14
15
15
- uses : purescript-contrib/setup-purescript@main
16
+ with :
17
+ purescript : " unstable"
16
18
17
- - uses : actions/setup-node@v1
19
+ - uses : actions/setup-node@v2
18
20
with :
19
- node-version : " 10 "
21
+ node-version : " 14 "
20
22
21
23
- name : Install dependencies
22
24
run : |
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ Notable changes to this project are documented in this file. The format is based
5
5
## [ Unreleased]
6
6
7
7
Breaking changes:
8
+ - Migrate FFI to ES modules (#8 by @JordanMartinez )
8
9
9
10
New features:
10
11
Original file line number Diff line number Diff line change 15
15
" package.json"
16
16
],
17
17
"dependencies" : {
18
- "purescript-effect" : " ^3.0.0 " ,
19
- "purescript-foreign-object" : " ^3.0.0 " ,
20
- "purescript-http-methods" : " ^5.0.0 " ,
21
- "purescript-prelude" : " ^5.0.0 " ,
22
- "purescript-record" : " ^3.0.0 " ,
23
- "purescript-typelevel-prelude" : " ^6.0.0 " ,
24
- "purescript-web-file" : " ^3.0.0 " ,
25
- "purescript-web-promise" : " https://github.com/purescript-web/purescript-web-promise.git#2.0.0 " ,
26
- "purescript-web-streams" : " https://github.com/purescript-web/purescript-web-streams.git#2.0.0 "
18
+ "purescript-effect" : " master " ,
19
+ "purescript-foreign-object" : " master " ,
20
+ "purescript-http-methods" : " main " ,
21
+ "purescript-prelude" : " master " ,
22
+ "purescript-record" : " master " ,
23
+ "purescript-typelevel-prelude" : " master " ,
24
+ "purescript-web-file" : " master " ,
25
+ "purescript-web-promise" : " https://github.com/purescript-web/purescript-web-promise.git#master " ,
26
+ "purescript-web-streams" : " https://github.com/purescript-web/purescript-web-streams.git#master "
27
27
}
28
28
}
Original file line number Diff line number Diff line change 6
6
},
7
7
"devDependencies" : {
8
8
"eslint" : " ^7.15.0" ,
9
- "pulp" : " ^15 .0.0" ,
10
- "purescript-psa" : " ^0.8.0 " ,
9
+ "pulp" : " 16 .0.0- 0" ,
10
+ "purescript-psa" : " ^0.8.2 " ,
11
11
"rimraf" : " ^3.0.2"
12
12
}
13
13
}
Original file line number Diff line number Diff line change 1
- "use strict" ;
2
-
3
- exports . _fetch = function ( a , b ) {
1
+ export function _fetch ( a , b ) {
4
2
return fetch ( a , b ) ;
5
- } ;
3
+ }
Original file line number Diff line number Diff line change 1
- "use strict" ;
2
-
3
- exports . new = function ( ) {
1
+ const newImpl = function ( ) {
4
2
return new AbortController ( ) ;
5
3
} ;
4
+ export { newImpl as new } ;
6
5
7
- exports . abort = function ( controller ) {
6
+ export function abort ( controller ) {
8
7
return function ( ) {
9
8
return controller . abort ( ) ;
10
9
} ;
11
- } ;
10
+ }
12
11
13
- exports . signal = function ( controller ) {
12
+ export function signal ( controller ) {
14
13
return controller . signal ;
15
- } ;
14
+ }
Original file line number Diff line number Diff line change 1
- "use strict" ;
2
-
3
- exports . unsafeNew = function ( ) {
1
+ export function unsafeNew ( ) {
4
2
return new Headers ( ) ;
5
- } ;
3
+ }
6
4
7
- exports . unsafeAppend = function ( key , value , headers ) {
5
+ export function unsafeAppend ( key , value , headers ) {
8
6
return headers . append ( key , value ) ;
9
- } ;
7
+ }
10
8
11
- exports . unsafeFromRecord = function ( r ) {
9
+ export function unsafeFromRecord ( r ) {
12
10
return new Headers ( r ) ;
13
- } ;
11
+ }
14
12
15
- exports . _toArray = function ( tuple , headers ) {
13
+ export function _toArray ( tuple , headers ) {
16
14
return Array . from ( headers . entries ( ) , function ( pair ) {
17
15
return tuple ( pair [ 0 ] ) ( pair [ 1 ] ) ;
18
16
} ) ;
19
- } ;
17
+ }
20
18
21
- exports . fromObject = function ( obj ) {
19
+ export function fromObject ( obj ) {
22
20
return new Headers ( obj ) ;
23
- } ;
21
+ }
Original file line number Diff line number Diff line change 1
- "use strict" ;
2
-
3
- exports . _unsafeNew = function ( url , options ) {
1
+ export function _unsafeNew ( url , options ) {
4
2
try {
5
3
return new Request ( url , options ) ;
6
4
} catch ( e ) {
7
5
console . error ( e ) ;
8
6
throw e ;
9
7
}
10
- } ;
8
+ }
Original file line number Diff line number Diff line change 1
- "use strict" ;
2
-
3
- exports . fromArrayBuffer = function ( a ) { return a } ;
4
- exports . fromArrayView = function ( a ) { return a } ;
5
- exports . fromString = function ( a ) { return a } ;
6
- exports . fromReadableStream = function ( a ) { return a } ;
7
- exports . empty = null ;
1
+ export function fromArrayBuffer ( a ) { return a }
2
+ export function fromArrayView ( a ) { return a }
3
+ export function fromString ( a ) { return a }
4
+ export function fromReadableStream ( a ) { return a }
5
+ export const empty = null ;
Original file line number Diff line number Diff line change 1
- "use strict" ;
2
-
3
- exports . headers = function ( resp ) {
1
+ export function headers ( resp ) {
4
2
return resp . headers ;
5
- } ;
3
+ }
6
4
7
- exports . ok = function ( resp ) {
5
+ export function ok ( resp ) {
8
6
return resp . ok ;
9
- } ;
7
+ }
10
8
11
- exports . redirected = function ( resp ) {
9
+ export function redirected ( resp ) {
12
10
return resp . redirected ;
13
- } ;
11
+ }
14
12
15
- exports . status = function ( resp ) {
13
+ export function status ( resp ) {
16
14
return resp . status ;
17
- } ;
15
+ }
18
16
19
- exports . statusText = function ( resp ) {
17
+ export function statusText ( resp ) {
20
18
return resp . statusText ;
21
- } ;
19
+ }
22
20
23
- exports . url = function ( resp ) {
21
+ export function url ( resp ) {
24
22
return resp . url ;
25
- } ;
23
+ }
26
24
27
- exports . body = function ( resp ) {
25
+ export function body ( resp ) {
28
26
return function ( ) {
29
27
return resp . body ;
30
28
} ;
31
- } ;
29
+ }
32
30
33
- exports . arrayBuffer = function ( resp ) {
31
+ export function arrayBuffer ( resp ) {
34
32
return function ( ) {
35
33
return resp . arrayBuffer ( ) ;
36
34
} ;
37
- } ;
35
+ }
38
36
39
- exports . blob = function ( resp ) {
37
+ export function blob ( resp ) {
40
38
return function ( ) {
41
39
return resp . blob ( ) ;
42
40
} ;
43
- } ;
41
+ }
44
42
45
- exports . text = function ( resp ) {
43
+ export function text ( resp ) {
46
44
return function ( ) {
47
45
return resp . text ( ) ;
48
46
} ;
49
- } ;
47
+ }
You can’t perform that action at this time.
0 commit comments