Skip to content

Commit a018afc

Browse files
Update to PureScript v0.15.0 (#11)
* Update .eslintrc.json to ES6 * Migrated FFI to ES modules via 'lebab' * 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 * Fix FFI export * Added changelog entry
1 parent d5ed716 commit a018afc

File tree

6 files changed

+24
-15
lines changed

6 files changed

+24
-15
lines changed

.eslintrc.json

Lines changed: 2 additions & 2 deletions
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

Lines changed: 12 additions & 2 deletions
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 pulp@16.0.0-0
62+
npx bower install
63+
npx pulp build -- --censor-lib --strict
64+
if [ -d "test" ]; then
65+
npx pulp test
66+
fi

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+
- Update project and deps to PureScript v0.15.0 (#11 by @JordanMartinez)
89

910
New features:
1011

bower.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
"output"
1515
],
1616
"dependencies": {
17-
"purescript-functions": "^5.0.0",
18-
"purescript-maybe": "^5.0.0"
17+
"purescript-functions": "master",
18+
"purescript-maybe": "master"
1919
},
2020
"devDependencies": {
21-
"purescript-assert": "^5.0.0",
22-
"purescript-effect": "^3.0.0"
21+
"purescript-assert": "master",
22+
"purescript-effect": "master"
2323
}
2424
}

packages.dhall

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +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

src/JSURI.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
"use strict";
2-
31
// A helper which transforms the result ofencodeURIComponent to be compliant
42
// with RFC3896, as described in the MDN documentation here:
53
//
@@ -10,15 +8,15 @@ function toRFC3896(input) {
108
});
119
}
1210

13-
exports._encodeURIComponent = function encode(fail, succeed, input) {
11+
export const _encodeURIComponent = function encode(fail, succeed, input) {
1412
try {
1513
return succeed(toRFC3896(encodeURIComponent(input)));
1614
} catch (err) {
1715
return fail(err);
1816
}
1917
};
2018

21-
exports._encodeFormURLComponent = function encode(fail, succeed, input) {
19+
export const _encodeFormURLComponent = function encode(fail, succeed, input) {
2220
try {
2321
return succeed(toRFC3896(encodeURIComponent(input)).replace(/%20/g, "+"));
2422
} catch (err) {
@@ -34,8 +32,8 @@ function _decodeURIComponent(fail, succeed, input) {
3432
}
3533
}
3634

37-
exports._decodeURIComponent = _decodeURIComponent;
35+
export {_decodeURIComponent};
3836

39-
exports._decodeFormURLComponent = function encode(fail, succeed, input) {
37+
export const _decodeFormURLComponent = function encode(fail, succeed, input) {
4038
return _decodeURIComponent(fail, succeed, input.replace(/\+/g, " "));
4139
};

0 commit comments

Comments
 (0)