Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to v0.15.0 #209

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
3 changes: 1 addition & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"env": { "commonjs": true },
"extends": "eslint:recommended",
"parserOptions": { "ecmaVersion": 5 },
"parserOptions": { "ecmaVersion": 6, "sourceType": "module" },
"rules": {
"block-scoped-var": "error",
"consistent-return": "error",
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
- name: Set up PureScript toolchain
uses: purescript-contrib/setup-purescript@main
with:
purescript: "unstable"
purs-tidy: "latest"

- name: Cache PureScript dependencies
Expand Down Expand Up @@ -49,8 +50,15 @@ jobs:
- name: Build the project
run: npm run build

- name: Run tests
run: npm run test
# - name: Run tests
# run: npm run test

- name: Check formatting
run: purs-tidy check src test

- name: Verify Bower & Pulp
run: |
npm install bower pulp@16.0.0-0
npx bower install
npx pulp build -- --censor-lib --strict
npx pulp test
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 (#209 by @JordanMartinez)

New features:

Expand Down
38 changes: 21 additions & 17 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,26 @@
"package.json"
],
"dependencies": {
"purescript-arrays": "^v6.0.0",
"purescript-bifunctors": "^v5.0.0",
"purescript-control": "^v5.0.0",
"purescript-datetime": "^v5.0.0",
"purescript-effect": "^v3.0.0",
"purescript-either": "^v5.0.0",
"purescript-exceptions": "^v5.0.0",
"purescript-foldable-traversable": "^v5.0.0",
"purescript-functions": "^v5.0.0",
"purescript-maybe": "^v5.0.0",
"purescript-newtype": "^v4.0.0",
"purescript-parallel": "^v5.0.0",
"purescript-prelude": "^v5.0.0",
"purescript-refs": "^v5.0.0",
"purescript-tailrec": "^v5.0.0",
"purescript-transformers": "^v5.0.0",
"purescript-unsafe-coerce": "^v5.0.0"
"purescript-arrays": "master",
"purescript-bifunctors": "master",
"purescript-control": "master",
"purescript-datetime": "master",
"purescript-effect": "master",
"purescript-either": "master",
"purescript-exceptions": "master",
"purescript-foldable-traversable": "master",
"purescript-functions": "master",
"purescript-maybe": "master",
"purescript-newtype": "master",
"purescript-parallel": "master",
"purescript-prelude": "master",
"purescript-refs": "master",
"purescript-tailrec": "master",
"purescript-transformers": "master",
"purescript-unsafe-coerce": "master"
},
"devDependencies": {
"purescript-minibench": "master",
"purescript-assert": "master"
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
},
"devDependencies": {
"eslint": "^7.10.0",
"purescript-psa": "^0.8.0"
"purescript-psa": "^0.8.2"
}
}
2 changes: 1 addition & 1 deletion packages.dhall
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
let upstream =
https://github.com/purescript/package-sets/releases/download/psc-0.14.3-20210722/packages.dhall sha256:1ceb43aa59436bf5601bac45f6f3781c4e1f0e4c2b8458105b018e5ed8c30f8c
https://raw.githubusercontent.com/purescript/package-sets/prepare-0.15/src/packages.dhall

in upstream
1 change: 0 additions & 1 deletion spago.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
, "parallel"
, "partial"
, "prelude"
, "psci-support"
, "refs"
, "tailrec"
, "transformers"
Expand Down
59 changes: 28 additions & 31 deletions src/Effect/Aff.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/* globals setImmediate, clearImmediate, setTimeout, clearTimeout */
/* eslint-disable no-unused-vars, no-prototype-builtins, no-use-before-define, no-unused-labels, no-param-reassign */
"use strict";

var Aff = function () {
// A unique value for empty.
var EMPTY = {};
Expand Down Expand Up @@ -1039,17 +1037,16 @@ var Aff = function () {
return Aff;
}();

exports._pure = Aff.Pure;

exports._throwError = Aff.Throw;
export const _pure = Aff.Pure;
export const _throwError = Aff.Throw;

exports._catchError = function (aff) {
export function _catchError(aff) {
return function (k) {
return Aff.Catch(aff, k);
};
};
}

exports._map = function (f) {
export function _map(f) {
return function (aff) {
if (aff.tag === Aff.Pure.tag) {
return Aff.Pure(f(aff._1));
Expand All @@ -1059,71 +1056,71 @@ exports._map = function (f) {
});
}
};
};
}

exports._bind = function (aff) {
export function _bind(aff) {
return function (k) {
return Aff.Bind(aff, k);
};
};
}

exports._fork = function (immediate) {
export function _fork(immediate) {
return function (aff) {
return Aff.Fork(immediate, aff);
};
};
}

exports._liftEffect = Aff.Sync;
export const _liftEffect = Aff.Sync;

exports._parAffMap = function (f) {
export function _parAffMap(f) {
return function (aff) {
return Aff.ParMap(f, aff);
};
};
}

exports._parAffApply = function (aff1) {
export function _parAffApply(aff1) {
return function (aff2) {
return Aff.ParApply(aff1, aff2);
};
};
}

exports._parAffAlt = function (aff1) {
export function _parAffAlt(aff1) {
return function (aff2) {
return Aff.ParAlt(aff1, aff2);
};
};
}

exports.makeAff = Aff.Async;
export const makeAff = Aff.Async;

exports.generalBracket = function (acquire) {
export function generalBracket(acquire) {
return function (options) {
return function (k) {
return Aff.Bracket(acquire, options, k);
};
};
};
}

exports._makeFiber = function (util, aff) {
export function _makeFiber(util, aff) {
return function () {
return Aff.Fiber(util, null, aff);
};
};
}

exports._makeSupervisedFiber = function (util, aff) {
export function _makeSupervisedFiber(util, aff) {
return function () {
var supervisor = Aff.Supervisor(util);
return {
fiber: Aff.Fiber(util, supervisor, aff),
supervisor: supervisor
};
};
};
}

exports._killAll = function (error, supervisor, cb) {
export function _killAll(error, supervisor, cb) {
return supervisor.killAll(error, cb);
};
}

exports._delay = function () {
export const _delay = function () {
function setDelay(n, k) {
if (n === 0 && typeof setImmediate !== "undefined") {
return setImmediate(k);
Expand Down Expand Up @@ -1154,4 +1151,4 @@ exports._delay = function () {
};
}();

exports._sequential = Aff.Seq;
export const _sequential = Aff.Seq;