Skip to content

Commit a3e651c

Browse files
Update to PureScript v0.15.0 (#79)
* Change FFI to use ES modules * Update .eslintrc.json to ES6 * Removed '"use strict";' in FFI files * Update to CI to use 'unstable' purescript * Add CI test: verify 'bower.json' file works via pulp * Ignore spago-based tests (temporarily) * Update Bower dependencies to master or main * Update packages.dhall to 'prepare-0.15' package set * Removed unneeded 'psci-support' package * Fix linting error * Added changelog entry Co-authored-by: Mark Eibes <[email protected]>
1 parent 52a5fe1 commit a3e651c

File tree

7 files changed

+30
-21
lines changed

7 files changed

+30
-21
lines changed

.eslintrc.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"env": { "browser": true, "commonjs": true },
2+
"env": { "browser": true },
33
"extends": "eslint:recommended",
4-
"parserOptions": { "ecmaVersion": 5 },
4+
"parserOptions": { "ecmaVersion": 6, "sourceType": "module" },
55
"rules": {
66
"block-scoped-var": "error",
77
"consistent-return": "error",

.github/workflows/ci.yml

+12-2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
- name: Set up PureScript toolchain
1717
uses: purescript-contrib/setup-purescript@main
1818
with:
19+
purescript: "unstable"
1920
purs-tidy: "latest"
2021

2122
- name: Cache PureScript dependencies
@@ -49,8 +50,17 @@ jobs:
4950
- name: Build the project
5051
run: npm run build
5152

52-
- name: Run tests
53-
run: npm run test
53+
# - name: Run tests
54+
# run: npm run test
5455

5556
- name: Check formatting
5657
run: purs-tidy check src test
58+
59+
- name: Verify Bower & Pulp
60+
run: |
61+
npm install bower [email protected]
62+
npx bower install
63+
npx pulp build -- --censor-lib --strict
64+
if [ -d "test" ]; then
65+
npx pulp test
66+
fi

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 (#79 by @i-am-the-slime and @JordanMartinez)
89

910
New features:
1011

bower.json

+11-11
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@
1616
"package.json"
1717
],
1818
"dependencies": {
19-
"purescript-datetime": "^5.0.0",
20-
"purescript-fixed-points": "^6.0.0",
21-
"purescript-lists": "^6.0.0",
22-
"purescript-numbers": "^8.0.0",
23-
"purescript-parsing": "^7.0.0",
24-
"purescript-prelude": "^5.0.0",
25-
"purescript-transformers": "^5.0.0"
19+
"purescript-datetime": "master",
20+
"purescript-fixed-points": "main",
21+
"purescript-lists": "master",
22+
"purescript-numbers": "master",
23+
"purescript-parsing": "main",
24+
"purescript-prelude": "master",
25+
"purescript-transformers": "master"
2626
},
2727
"devDependencies": {
28-
"purescript-aff": "^6.0.0",
29-
"purescript-assert": "^5.0.0",
30-
"purescript-console": "^5.0.0",
31-
"purescript-effect": "^3.0.0"
28+
"purescript-aff": "main",
29+
"purescript-assert": "master",
30+
"purescript-console": "master",
31+
"purescript-effect": "master"
3232
}
3333
}

packages.dhall

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
let upstream =
2-
https://github.com/purescript/package-sets/releases/download/psc-0.14.3-20210722/packages.dhall sha256:1ceb43aa59436bf5601bac45f6f3781c4e1f0e4c2b8458105b018e5ed8c30f8c
2+
https://raw.githubusercontent.com/purescript/package-sets/prepare-0.15/src/packages.dhall
33

44
in upstream
5-
with parsing.version = "v7.0.0"

spago.dhall

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
, "parsing"
2222
, "partial"
2323
, "prelude"
24-
, "psci-support"
2524
, "strings"
2625
, "transformers"
2726
, "tuples"

src/Data/Formatter/Number.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
"use strict";
2-
31
// Converts a number to a string of the nearest integer _without_ appending ".0"
42
// (like `show` for `Number`) or clamping to +/- 2 billion (like when working
53
// with `Int`). This is important for performance compared to other means of
64
// showing an integer potentially larger than +/- 2 billion.
7-
exports.showNumberAsInt = function (n) { return Math.round(n).toString(); };
5+
export function showNumberAsInt(n) {
6+
return Math.round(n).toString();
7+
}

0 commit comments

Comments
 (0)