Skip to content
This repository was archived by the owner on Aug 4, 2023. It is now read-only.

Commit a2eaddc

Browse files
Update to PureScript v0.15.0 (#14)
* Migrated FFI to ES modules via 'lebab' * Removed '"use strict";' in FFI files * Update to CI to use 'unstable' purescript * Update Bower dependencies to master or main * Update pulp to 16.0.0-0 * Update psa to 0.8.2 * Update CI to use Node 14 * Update eslint to es6 * Fix FFI exports * Added changelog entry
1 parent 26ceb2e commit a2eaddc

File tree

7 files changed

+35
-33
lines changed

7 files changed

+35
-33
lines changed

.eslintrc.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"parserOptions": {
3-
"ecmaVersion": 5
3+
"ecmaVersion": 6,
4+
"sourceType": "module"
45
},
56
"extends": "eslint:recommended",
67
"env": {
7-
"commonjs": true,
88
"browser": true
99
},
1010
"globals": {

.github/workflows/ci.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ jobs:
1313
- uses: actions/checkout@v2
1414

1515
- uses: purescript-contrib/setup-purescript@main
16+
with:
17+
purescript: "unstable"
1618

17-
- uses: actions/setup-node@v1
19+
- uses: actions/setup-node@v2
1820
with:
19-
node-version: "10"
21+
node-version: "14"
2022

2123
- name: Install dependencies
2224
run: |

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Notable changes to this project are documented in this file. The format is based
55
## [Unreleased]
66

77
Breaking changes:
8+
- Migrate FFI to ES modules (#14 by @JordanMartinez)
89

910
New features:
1011

bower.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
"output"
1414
],
1515
"dependencies": {
16-
"purescript-effect": "^3.0.0",
17-
"purescript-exceptions": "^5.0.0",
18-
"purescript-functions": "^5.0.0",
19-
"purescript-maybe": "^5.0.0",
20-
"purescript-prelude": "^5.0.0",
21-
"purescript-foldable-traversable": "^5.0.0"
16+
"purescript-effect": "master",
17+
"purescript-exceptions": "master",
18+
"purescript-functions": "master",
19+
"purescript-maybe": "master",
20+
"purescript-prelude": "master",
21+
"purescript-foldable-traversable": "master"
2222
}
2323
}

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
},
77
"devDependencies": {
88
"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",
1111
"rimraf": "^3.0.2"
1212
}
1313
}

src/Web/Promise/Internal.js

+16-15
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,34 @@
1-
"use strict";
2-
3-
exports.new = function(k) {
1+
const newImpl = function (k) {
42
return new Promise(k);
53
};
4+
export { newImpl as new };
65

7-
exports.then_ = function(k, p) {
6+
export function then_(k, p) {
87
return p.then(k);
9-
};
8+
}
109

11-
exports.catch = function(k, p) {
10+
const catchImpl = function (k, p) {
1211
return p.catch(k);
1312
};
13+
export { catchImpl as catch };
1414

15-
exports.finally = function(k, p) {
15+
const finallyImpl = function (k, p) {
1616
return p.finally(k);
1717
};
18+
export { finallyImpl as finally };
1819

19-
exports.resolve = function(a) {
20+
export function resolve(a) {
2021
return Promise.resolve(a);
21-
};
22+
}
2223

23-
exports.reject = function(a) {
24+
export function reject(a) {
2425
return Promise.reject(a);
25-
};
26+
}
2627

27-
exports.all = function(a) {
28+
export function all(a) {
2829
return Promise.all(a);
29-
};
30+
}
3031

31-
exports.race = function(a) {
32+
export function race(a) {
3233
return Promise.race(a);
33-
};
34+
}

src/Web/Promise/Rejection.js

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
"use strict";
2-
3-
exports.fromError = function(a) {
1+
export function fromError(a) {
42
return a;
5-
};
3+
}
64

7-
exports._toError = function(just, nothing, ref) {
5+
export function _toError(just, nothing, ref) {
86
if (ref instanceof Error) {
97
return just(ref);
108
}
119
return nothing;
12-
};
10+
}

0 commit comments

Comments
 (0)