Skip to content

Commit 16acdf3

Browse files
Update to v0.15.0 (#21)
* Add support for es modules * Replaced 'export var' with 'export const' * 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 * Remove unused let binding to fix warning * Redefine FFI to avoid syntax error * Tweak FFI again to remove reference error Co-authored-by: sigma-andex <sigma.andex@pm.me>
1 parent f5bbd96 commit 16acdf3

File tree

6 files changed

+21
-25
lines changed

6 files changed

+21
-25
lines changed

.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:

bower.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
"output"
1717
],
1818
"dependencies": {
19-
"purescript-functions": "^5.0.0",
20-
"purescript-math": "^3.0.0",
21-
"purescript-maybe": "^5.0.0"
19+
"purescript-functions": "master",
20+
"purescript-math": "master",
21+
"purescript-maybe": "master"
2222
},
2323
"devDependencies": {
24-
"purescript-assert": "^5.0.0",
25-
"purescript-console": "^5.0.0"
24+
"purescript-assert": "master",
25+
"purescript-console": "master"
2626
}
2727
}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"test": "pulp test"
77
},
88
"devDependencies": {
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/Data/Number.js

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
/* globals exports */
2-
"use strict";
2+
export const nan = NaN;
3+
const isNaNImpl = isNaN;
4+
export { isNaNImpl as isNaN };
5+
export const infinity = Infinity;
6+
const isFiniteImpl = isFinite;
7+
export { isFiniteImpl as isFinite };
38

4-
exports.nan = NaN;
5-
6-
exports.isNaN = isNaN;
7-
8-
exports.infinity = Infinity;
9-
10-
exports.isFinite = isFinite;
11-
12-
exports.fromStringImpl = function(str, isFinite, just, nothing) {
9+
export function fromStringImpl(str, isFinite, just, nothing) {
1310
var num = parseFloat(str);
1411
if (isFinite(num)) {
1512
return just(num);
1613
} else {
1714
return nothing;
1815
}
19-
};
16+
}

src/Data/Number/Format.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ function wrap(method) {
66
};
77
}
88

9-
exports.toPrecisionNative = wrap(Number.prototype.toPrecision);
10-
exports.toFixedNative = wrap(Number.prototype.toFixed);
11-
exports.toExponentialNative = wrap(Number.prototype.toExponential);
12-
13-
exports.toString = function(num) { return num.toString(); };
9+
export const toPrecisionNative = wrap(Number.prototype.toPrecision);
10+
export const toFixedNative = wrap(Number.prototype.toFixed);
11+
export const toExponentialNative = wrap(Number.prototype.toExponential);
12+
export function toString(num) { return num.toString(); }

test/Test/Main.purs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ main = do
2121
-- code was moved into this repo
2222
globalsTestCode :: Effect Unit
2323
globalsTestCode = do
24-
let num = 12345.6789
25-
2624
log "nan /= nan"
2725
assert $ nan /= nan
2826

0 commit comments

Comments
 (0)