Skip to content

Commit 2206797

Browse files
Update to v0.15.0 (#146)
* Convert foreign modules to try bundling with esbuild * Migrated FFI to ES modules via 'lebab' * Replaced 'export var' with 'export const' * Removed '"use strict";' in FFI files * Update to CI to use 'unstable' purescript * Update pulp to 16.0.0-0 and psa to 0.8.2 * Update Bower dependencies to master * Update .eslintrc.json to ES6 * Added changelog entry Co-authored-by: Cyril Sobierajewicz <[email protected]>
1 parent 1e1b752 commit 2206797

File tree

9 files changed

+35
-42
lines changed

9 files changed

+35
-42
lines changed

.eslintrc.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
{
22
"parserOptions": {
3-
"ecmaVersion": 5
3+
"ecmaVersion": 6,
4+
"sourceType": "module"
45
},
56
"extends": "eslint:recommended",
6-
"env": {
7-
"commonjs": true
8-
},
97
"rules": {
108
"strict": [2, "global"],
119
"block-scoped-var": 2,

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
- uses: actions/checkout@v2
1414

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

1719
- uses: actions/setup-node@v1
1820
with:

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
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 (#146 by @kl0tl and @JordanMartinez)
89

910
New features:
1011

bower.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,23 @@
1717
"package.json"
1818
],
1919
"dependencies": {
20-
"purescript-bifunctors": "^5.0.0",
21-
"purescript-const": "^5.0.0",
22-
"purescript-control": "^5.0.0",
23-
"purescript-either": "^5.0.0",
24-
"purescript-functors": "^4.0.0",
25-
"purescript-identity": "^5.0.0",
26-
"purescript-maybe": "^5.0.0",
27-
"purescript-newtype": "^4.0.0",
28-
"purescript-orders": "^5.0.0",
29-
"purescript-prelude": "^5.0.0",
30-
"purescript-tuples": "^6.0.0"
20+
"purescript-bifunctors": "master",
21+
"purescript-const": "master",
22+
"purescript-control": "master",
23+
"purescript-either": "master",
24+
"purescript-functors": "master",
25+
"purescript-identity": "master",
26+
"purescript-maybe": "master",
27+
"purescript-newtype": "master",
28+
"purescript-orders": "master",
29+
"purescript-prelude": "master",
30+
"purescript-tuples": "master"
3131
},
3232
"devDependencies": {
33-
"purescript-assert": "^5.0.0",
34-
"purescript-console": "^5.0.0",
35-
"purescript-integers": "^5.0.0",
36-
"purescript-math": "^3.0.0",
37-
"purescript-unsafe-coerce": "^5.0.0"
33+
"purescript-assert": "master",
34+
"purescript-console": "master",
35+
"purescript-integers": "master",
36+
"purescript-math": "master",
37+
"purescript-unsafe-coerce": "master"
3838
}
3939
}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
},
88
"devDependencies": {
99
"eslint": "^7.15.0",
10-
"pulp": "^15.0.0",
11-
"purescript-psa": "^0.8.0",
10+
"pulp": "16.0.0-0",
11+
"purescript-psa": "^0.8.2",
1212
"rimraf": "^3.0.2"
1313
}
1414
}

src/Data/Foldable.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
"use strict";
2-
3-
exports.foldrArray = function (f) {
1+
export const foldrArray = function (f) {
42
return function (init) {
53
return function (xs) {
64
var acc = init;
@@ -13,7 +11,7 @@ exports.foldrArray = function (f) {
1311
};
1412
};
1513

16-
exports.foldlArray = function (f) {
14+
export const foldlArray = function (f) {
1715
return function (init) {
1816
return function (xs) {
1917
var acc = init;

src/Data/FunctorWithIndex.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
"use strict";
2-
3-
exports.mapWithIndexArray = function (f) {
1+
export const mapWithIndexArray = function (f) {
42
return function (xs) {
53
var l = xs.length;
64
var result = Array(l);

src/Data/Traversable.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
"use strict";
2-
31
// jshint maxparams: 3
42

5-
exports.traverseArrayImpl = (function () {
3+
export const traverseArrayImpl = (function () {
64
function array1(a) {
75
return [a];
86
}

test/Main.js

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,30 @@
1-
"use strict";
2-
3-
exports.arrayFrom1UpTo = function (n) {
1+
export function arrayFrom1UpTo(n) {
42
var result = [];
53
for (var i = 1; i <= n; i++) {
64
result.push(i);
75
}
86
return result;
9-
};
7+
}
108

11-
exports.arrayReplicate = function (n) {
9+
export function arrayReplicate(n) {
1210
return function (x) {
1311
var result = [];
1412
for (var i = 1; i <= n; i++) {
1513
result.push(x);
1614
}
1715
return result;
1816
};
19-
};
17+
}
2018

21-
exports.mkNEArray = function (nothing) {
19+
export function mkNEArray(nothing) {
2220
return function (just) {
2321
return function (arr) {
2422
return arr.length > 0 ? just(arr) : nothing;
2523
};
2624
};
27-
};
25+
}
2826

29-
exports.foldMap1NEArray = function (append) {
27+
export function foldMap1NEArray(append) {
3028
return function (f) {
3129
return function (arr) {
3230
var acc = f(arr[0]);
@@ -37,4 +35,4 @@ exports.foldMap1NEArray = function (append) {
3735
return acc;
3836
};
3937
};
40-
};
38+
}

0 commit comments

Comments
 (0)