Skip to content

Commit b220eb0

Browse files
Update to PureScript v0.15.0 (#59)
* 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 Bower dependencies to master or main * Update pulp to 16.0.0-0 * Update psa to 0.8.2 * Add eslint config * Update ci.yml to v2 * Update Bower dependencies to master or main * Update Bower dependencies to master or main * Refactor unsafeRequireFS * Update Stream.purs * Update Sync.purs * Update changelog * Rename ffi suffix to Impl Co-authored-by: Thomas Honeyman <[email protected]>
1 parent 3cb63cc commit b220eb0

14 files changed

+199
-157
lines changed

.eslintrc.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
22
"parserOptions": {
3-
"ecmaVersion": 5
3+
"ecmaVersion": 6,
4+
"sourceType": "module"
45
},
56
"extends": "eslint:recommended",
67
"env": {
7-
"commonjs": true
8+
"node": true
89
},
910
"rules": {
1011
"strict": [2, "global"],

.github/workflows/ci.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ jobs:
1313
- uses: actions/checkout@v2
1414

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

17-
- uses: actions/setup-node@v1
19+
- uses: actions/setup-node@v2
1820
with:
19-
node-version: "10"
21+
node-version: "14"
2022

2123
- name: Install dependencies
2224
run: |

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Breaking changes:
88

99
New features:
1010
- Add bindings to `mkdir(path, { recursive: true })` via `mkdirRecursive` (#53, #55 by @JordanMartinez)
11+
- Update project and deps to PureScript v0.15.0 (#59 by @JordanMartinez, @thomashoneyman, @sigma-andex)
1112

1213
Bugfixes:
1314

bower.json

+19-19
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,26 @@
2020
"package.json"
2121
],
2222
"dependencies": {
23-
"purescript-datetime": "^5.0.0",
24-
"purescript-effect": "^3.0.0",
25-
"purescript-either": "^5.0.0",
26-
"purescript-enums": "^5.0.0",
27-
"purescript-exceptions": "^5.0.0",
28-
"purescript-functions": "^5.0.0",
29-
"purescript-integers": "^5.0.0",
30-
"purescript-js-date": "^7.0.0",
31-
"purescript-maybe": "^5.0.0",
32-
"purescript-node-buffer": "^7.0.0",
33-
"purescript-node-path": "^4.0.0",
34-
"purescript-node-streams": "^5.0.0",
35-
"purescript-nullable": "^5.0.0",
36-
"purescript-partial": "^3.0.0",
37-
"purescript-prelude": "^5.0.0",
38-
"purescript-strings": "^5.0.0",
39-
"purescript-unsafe-coerce": "^5.0.0"
23+
"purescript-datetime": "master",
24+
"purescript-effect": "master",
25+
"purescript-either": "master",
26+
"purescript-enums": "master",
27+
"purescript-exceptions": "master",
28+
"purescript-functions": "master",
29+
"purescript-integers": "master",
30+
"purescript-js-date": "main",
31+
"purescript-maybe": "master",
32+
"purescript-node-buffer": "master",
33+
"purescript-node-path": "master",
34+
"purescript-node-streams": "master",
35+
"purescript-nullable": "main",
36+
"purescript-partial": "master",
37+
"purescript-prelude": "master",
38+
"purescript-strings": "master",
39+
"purescript-unsafe-coerce": "master"
4040
},
4141
"devDependencies": {
42-
"purescript-console": "^5.0.0",
43-
"purescript-node-buffer": "^7.0.0"
42+
"purescript-console": "master",
43+
"purescript-node-buffer": "master"
4444
}
4545
}

package.json

+2-2
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/Node/FS/Async.js

+26-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,34 @@
1-
"use strict";
1+
export {
2+
rename as renameImpl,
3+
truncate as truncateImpl,
4+
chown as chownImpl,
5+
chmod as chmodImpl,
6+
stat as statImpl,
7+
link as linkImpl,
8+
symlink as symlinkImpl,
9+
readlink as readlinkImpl,
10+
realpath as realpathImpl,
11+
unlink as unlinkImpl,
12+
rmdir as rmdirImpl,
13+
mkdir as mkdirImpl,
14+
readdir as readdirImpl,
15+
utimes as utimesImpl,
16+
readFile as readFileImpl,
17+
writeFile as writeFileImpl,
18+
appendFile as appendFileImpl,
19+
exists as existsImpl,
20+
open as openImpl,
21+
read as readImpl,
22+
write as writeImpl,
23+
close as closeImpl
24+
} from "fs";
225

3-
exports.handleCallbackImpl = function (left, right, f) {
26+
export function handleCallbackImpl(left, right, f) {
427
return function (err, value) {
528
if (err) {
629
f(left(err))();
730
} else {
831
f(right(value))();
932
}
1033
};
11-
};
34+
}

0 commit comments

Comments
 (0)