Skip to content
This repository was archived by the owner on Aug 4, 2023. It is now read-only.

Update to PureScript v0.15.0 #14

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"parserOptions": {
"ecmaVersion": 5
"ecmaVersion": 6,
"sourceType": "module"
},
"extends": "eslint:recommended",
"env": {
"commonjs": true,
"browser": true
},
"globals": {
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ jobs:
- uses: actions/checkout@v2

- uses: purescript-contrib/setup-purescript@main
with:
purescript: "unstable"

- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: "10"
node-version: "14"

- name: Install dependencies
run: |
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Notable changes to this project are documented in this file. The format is based
## [Unreleased]

Breaking changes:
- Migrate FFI to ES modules (#14 by @JordanMartinez)

New features:

Expand Down
12 changes: 6 additions & 6 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
"output"
],
"dependencies": {
"purescript-effect": "^3.0.0",
"purescript-exceptions": "^5.0.0",
"purescript-functions": "^5.0.0",
"purescript-maybe": "^5.0.0",
"purescript-prelude": "^5.0.0",
"purescript-foldable-traversable": "^5.0.0"
"purescript-effect": "master",
"purescript-exceptions": "master",
"purescript-functions": "master",
"purescript-maybe": "master",
"purescript-prelude": "master",
"purescript-foldable-traversable": "master"
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
},
"devDependencies": {
"eslint": "^7.15.0",
"pulp": "^15.0.0",
"purescript-psa": "^0.8.0",
"pulp": "16.0.0-0",
"purescript-psa": "^0.8.2",
"rimraf": "^3.0.2"
}
}
31 changes: 16 additions & 15 deletions src/Web/Promise/Internal.js
Original file line number Diff line number Diff line change
@@ -1,33 +1,34 @@
"use strict";

exports.new = function(k) {
const newImpl = function (k) {
return new Promise(k);
};
export { newImpl as new };

exports.then_ = function(k, p) {
export function then_(k, p) {
return p.then(k);
};
}

exports.catch = function(k, p) {
const catchImpl = function (k, p) {
return p.catch(k);
};
export { catchImpl as catch };

exports.finally = function(k, p) {
const finallyImpl = function (k, p) {
return p.finally(k);
};
export { finallyImpl as finally };

exports.resolve = function(a) {
export function resolve(a) {
return Promise.resolve(a);
};
}

exports.reject = function(a) {
export function reject(a) {
return Promise.reject(a);
};
}

exports.all = function(a) {
export function all(a) {
return Promise.all(a);
};
}

exports.race = function(a) {
export function race(a) {
return Promise.race(a);
};
}
10 changes: 4 additions & 6 deletions src/Web/Promise/Rejection.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
"use strict";

exports.fromError = function(a) {
export function fromError(a) {
return a;
};
}

exports._toError = function(just, nothing, ref) {
export function _toError(just, nothing, ref) {
if (ref instanceof Error) {
return just(ref);
}
return nothing;
};
}