Update to PureScript v0.15.0 (#8)

* 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

* Update Bower dependencies to master or main

* Update Bower dependencies to master or main

* Update eslint config to es6

* Fix FFI export

* Update CI to use node 14

* Added changelog entry
This commit is contained in:
JordanMartinez 2022-03-22 19:30:15 -05:00 committed by GitHub
parent b5e3e572e0
commit d518aab2ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 64 additions and 72 deletions

View File

@ -1,10 +1,10 @@
{
"parserOptions": {
"ecmaVersion": 5
"ecmaVersion": 6,
"sourceType": "module"
},
"extends": "eslint:recommended",
"env": {
"commonjs": true,
"browser": true
},
"rules": {

View File

@ -13,10 +13,12 @@ jobs:
- uses: actions/checkout@v2
- uses: purescript-contrib/setup-purescript@main
- uses: actions/setup-node@v1
with:
node-version: "10"
purescript: "unstable"
- uses: actions/setup-node@v2
with:
node-version: "14"
- name: Install dependencies
run: |

View File

@ -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 (#8 by @JordanMartinez)
New features:

View File

@ -15,14 +15,14 @@
"package.json"
],
"dependencies": {
"purescript-effect": "^3.0.0",
"purescript-foreign-object": "^3.0.0",
"purescript-http-methods": "^5.0.0",
"purescript-prelude": "^5.0.0",
"purescript-record": "^3.0.0",
"purescript-typelevel-prelude": "^6.0.0",
"purescript-web-file": "^3.0.0",
"purescript-web-promise": "https://github.com/purescript-web/purescript-web-promise.git#2.0.0",
"purescript-web-streams": "https://github.com/purescript-web/purescript-web-streams.git#2.0.0"
"purescript-effect": "master",
"purescript-foreign-object": "master",
"purescript-http-methods": "main",
"purescript-prelude": "master",
"purescript-record": "master",
"purescript-typelevel-prelude": "master",
"purescript-web-file": "master",
"purescript-web-promise": "https://github.com/purescript-web/purescript-web-promise.git#master",
"purescript-web-streams": "https://github.com/purescript-web/purescript-web-streams.git#master"
}
}

View File

@ -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"
}
}

View File

@ -1,5 +1,3 @@
"use strict";
exports._fetch = function(a, b) {
export function _fetch(a, b) {
return fetch(a, b);
};
}

View File

@ -1,15 +1,14 @@
"use strict";
exports.new = function() {
const newImpl = function () {
return new AbortController();
};
export { newImpl as new };
exports.abort = function(controller) {
export function abort(controller) {
return function() {
return controller.abort();
};
};
}
exports.signal = function(controller) {
export function signal(controller) {
return controller.signal;
};
}

View File

@ -1,23 +1,21 @@
"use strict";
exports.unsafeNew = function() {
export function unsafeNew() {
return new Headers();
};
}
exports.unsafeAppend = function(key, value, headers) {
export function unsafeAppend(key, value, headers) {
return headers.append(key, value);
};
}
exports.unsafeFromRecord = function(r) {
export function unsafeFromRecord(r) {
return new Headers(r);
};
}
exports._toArray = function(tuple, headers) {
export function _toArray(tuple, headers) {
return Array.from(headers.entries(), function (pair) {
return tuple(pair[0])(pair[1]);
});
};
}
exports.fromObject = function(obj) {
export function fromObject(obj) {
return new Headers(obj);
};
}

View File

@ -1,10 +1,8 @@
"use strict";
exports._unsafeNew = function(url, options) {
export function _unsafeNew(url, options) {
try {
return new Request(url, options);
} catch (e) {
console.error(e);
throw e;
}
};
}

View File

@ -1,7 +1,5 @@
"use strict";
exports.fromArrayBuffer = function(a) { return a };
exports.fromArrayView = function(a) { return a };
exports.fromString = function(a) { return a };
exports.fromReadableStream = function(a) { return a };
exports.empty = null;
export function fromArrayBuffer(a) { return a }
export function fromArrayView(a) { return a }
export function fromString(a) { return a }
export function fromReadableStream(a) { return a }
export const empty = null;

View File

@ -1,49 +1,47 @@
"use strict";
exports.headers = function (resp) {
export function headers(resp) {
return resp.headers;
};
}
exports.ok = function (resp) {
export function ok(resp) {
return resp.ok;
};
}
exports.redirected = function (resp) {
export function redirected(resp) {
return resp.redirected;
};
}
exports.status = function (resp) {
export function status(resp) {
return resp.status;
};
}
exports.statusText = function (resp) {
export function statusText(resp) {
return resp.statusText;
};
}
exports.url = function (resp) {
export function url(resp) {
return resp.url;
};
}
exports.body = function (resp) {
export function body(resp) {
return function() {
return resp.body;
};
};
}
exports.arrayBuffer = function (resp) {
export function arrayBuffer(resp) {
return function() {
return resp.arrayBuffer();
};
};
}
exports.blob = function (resp) {
export function blob(resp) {
return function() {
return resp.blob();
};
};
}
exports.text = function (resp) {
export function text(resp) {
return function() {
return resp.text();
};
};
}