Skip to content

Commit b234c41

Browse files
Update to v0.15.0 (#50)
* Convert foreign modules to try bundling with esbuild * 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 8a783f2 commit b234c41

File tree

7 files changed

+28
-31
lines changed

7 files changed

+28
-31
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 (#50 by @kl0tl and @JordanMartinez)
89

910
New features:
1011

bower.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
"package.json"
1717
],
1818
"dependencies": {
19-
"purescript-math": "^3.0.0",
20-
"purescript-maybe": "^5.0.0",
21-
"purescript-numbers": "^8.0.0",
22-
"purescript-prelude": "^5.0.0"
19+
"purescript-math": "master",
20+
"purescript-maybe": "master",
21+
"purescript-numbers": "master",
22+
"purescript-prelude": "master"
2323
},
2424
"devDependencies": {
25-
"purescript-assert": "^5.0.0",
26-
"purescript-console": "^5.0.0",
27-
"purescript-partial": "^3.0.0"
25+
"purescript-assert": "master",
26+
"purescript-console": "master",
27+
"purescript-partial": "master"
2828
}
2929
}

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/Int.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
"use strict";
2-
3-
exports.fromNumberImpl = function (just) {
1+
export const fromNumberImpl = function (just) {
42
return function (nothing) {
53
return function (n) {
64
/* jshint bitwise: false */
@@ -9,11 +7,11 @@ exports.fromNumberImpl = function (just) {
97
};
108
};
119

12-
exports.toNumber = function (n) {
10+
export const toNumber = function (n) {
1311
return n;
1412
};
1513

16-
exports.fromStringAsImpl = function (just) {
14+
export const fromStringAsImpl = function (just) {
1715
return function (nothing) {
1816
return function (radix) {
1917
var digits;
@@ -39,27 +37,27 @@ exports.fromStringAsImpl = function (just) {
3937
};
4038
};
4139

42-
exports.toStringAs = function (radix) {
40+
export const toStringAs = function (radix) {
4341
return function (i) {
4442
return i.toString(radix);
4543
};
4644
};
4745

4846

49-
exports.quot = function (x) {
47+
export const quot = function (x) {
5048
return function (y) {
5149
/* jshint bitwise: false */
5250
return x / y | 0;
5351
};
5452
};
5553

56-
exports.rem = function (x) {
54+
export const rem = function (x) {
5755
return function (y) {
5856
return x % y;
5957
};
6058
};
6159

62-
exports.pow = function (x) {
60+
export const pow = function (x) {
6361
return function (y) {
6462
/* jshint bitwise: false */
6563
return Math.pow(x,y) | 0;

src/Data/Int/Bits.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,48 @@
1-
"use strict";
2-
31
// module Data.Int.Bits
42

5-
exports.and = function (n1) {
3+
export const and = function (n1) {
64
return function (n2) {
75
/* jshint bitwise: false */
86
return n1 & n2;
97
};
108
};
119

12-
exports.or = function (n1) {
10+
export const or = function (n1) {
1311
return function (n2) {
1412
/* jshint bitwise: false */
1513
return n1 | n2;
1614
};
1715
};
1816

19-
exports.xor = function (n1) {
17+
export const xor = function (n1) {
2018
return function (n2) {
2119
/* jshint bitwise: false */
2220
return n1 ^ n2;
2321
};
2422
};
2523

26-
exports.shl = function (n1) {
24+
export const shl = function (n1) {
2725
return function (n2) {
2826
/* jshint bitwise: false */
2927
return n1 << n2;
3028
};
3129
};
3230

33-
exports.shr = function (n1) {
31+
export const shr = function (n1) {
3432
return function (n2) {
3533
/* jshint bitwise: false */
3634
return n1 >> n2;
3735
};
3836
};
3937

40-
exports.zshr = function (n1) {
38+
export const zshr = function (n1) {
4139
return function (n2) {
4240
/* jshint bitwise: false */
4341
return n1 >>> n2;
4442
};
4543
};
4644

47-
exports.complement = function (n) {
45+
export const complement = function (n) {
4846
/* jshint bitwise: false */
4947
return ~n;
5048
};

0 commit comments

Comments
 (0)