From 53018c20c0ebd7844a883cf1bcfcc5d435d7530e Mon Sep 17 00:00:00 2001 From: Cyril Sobierajewicz Date: Fri, 2 Jul 2021 18:48:42 +0200 Subject: [PATCH 1/8] Convert foreign modules to try bundling with esbuild --- src/Effect/Console.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Effect/Console.js b/src/Effect/Console.js index 4009a17..5b53437 100644 --- a/src/Effect/Console.js +++ b/src/Effect/Console.js @@ -1,47 +1,47 @@ "use strict"; -exports.log = function (s) { +export var log = function (s) { return function () { console.log(s); }; }; -exports.warn = function (s) { +export var warn = function (s) { return function () { console.warn(s); }; }; -exports.error = function (s) { +export var error = function (s) { return function () { console.error(s); }; }; -exports.info = function (s) { +export var info = function (s) { return function () { console.info(s); }; }; -exports.time = function (s) { +export var time = function (s) { return function () { console.time(s); }; }; -exports.timeLog = function (s) { +export var timeLog = function (s) { return function () { console.timeLog(s); }; }; -exports.timeEnd = function (s) { +export var timeEnd = function (s) { return function () { console.timeEnd(s); }; }; -exports.clear = function () { +export var clear = function () { console.clear(); }; From 9933372b0c2111da77779e91a1fa32e43f502441 Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Fri, 11 Mar 2022 14:13:29 -0800 Subject: [PATCH 2/8] Replaced 'export var' with 'export const' --- src/Effect/Console.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Effect/Console.js b/src/Effect/Console.js index 5b53437..65c98d3 100644 --- a/src/Effect/Console.js +++ b/src/Effect/Console.js @@ -1,47 +1,47 @@ "use strict"; -export var log = function (s) { +export const log = function (s) { return function () { console.log(s); }; }; -export var warn = function (s) { +export const warn = function (s) { return function () { console.warn(s); }; }; -export var error = function (s) { +export const error = function (s) { return function () { console.error(s); }; }; -export var info = function (s) { +export const info = function (s) { return function () { console.info(s); }; }; -export var time = function (s) { +export const time = function (s) { return function () { console.time(s); }; }; -export var timeLog = function (s) { +export const timeLog = function (s) { return function () { console.timeLog(s); }; }; -export var timeEnd = function (s) { +export const timeEnd = function (s) { return function () { console.timeEnd(s); }; }; -export var clear = function () { +export const clear = function () { console.clear(); }; From 63e1a2f5f6cfe5df1de53aa3ad2584010e7996c2 Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Fri, 11 Mar 2022 14:13:29 -0800 Subject: [PATCH 3/8] Removed '"use strict";' in FFI files --- src/Effect/Console.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Effect/Console.js b/src/Effect/Console.js index 65c98d3..fdf4345 100644 --- a/src/Effect/Console.js +++ b/src/Effect/Console.js @@ -1,5 +1,3 @@ -"use strict"; - export const log = function (s) { return function () { console.log(s); From be7a43805d95a8c8d5353312a70f04202f8df598 Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Fri, 11 Mar 2022 14:13:29 -0800 Subject: [PATCH 4/8] Update to CI to use 'unstable' purescript --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 43d2897..b6ebf3a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,8 @@ jobs: - uses: actions/checkout@v2 - uses: purescript-contrib/setup-purescript@main + with: + purescript: "unstable" - uses: actions/setup-node@v1 with: From a6ae2beddfbb3f7cb6669f542231ba9003c9ee05 Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Fri, 11 Mar 2022 14:13:30 -0800 Subject: [PATCH 5/8] Update pulp to 16.0.0-0 and psa to 0.8.2 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 1c67b54..4ea39f9 100644 --- a/package.json +++ b/package.json @@ -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" } } From 0d65872bd17de44248a835fd1dfe07735a888173 Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Fri, 11 Mar 2022 14:59:19 -0800 Subject: [PATCH 6/8] Update Bower dependencies to master --- bower.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bower.json b/bower.json index 9e3bec9..483558f 100644 --- a/bower.json +++ b/bower.json @@ -16,7 +16,7 @@ "package.json" ], "dependencies": { - "purescript-effect": "^3.0.0", - "purescript-prelude": "^5.0.0" + "purescript-effect": "master", + "purescript-prelude": "master" } } From 12aa880599c102674e9af58a50049761827e46a1 Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Mon, 14 Mar 2022 07:02:35 -0700 Subject: [PATCH 7/8] Update eslint config to es6 --- .eslintrc.json | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 144db4a..70febb7 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,11 +1,9 @@ { "parserOptions": { - "ecmaVersion": 5 + "ecmaVersion": 6, + "sourceType": "module" }, "extends": "eslint:recommended", - "env": { - "commonjs": true - }, "globals": { "console": true }, From 0c8ea0a72486f32169b626c7d97ec98e02971e20 Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Mon, 14 Mar 2022 07:09:16 -0700 Subject: [PATCH 8/8] Add changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf2d70c..c556894 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ Notable changes to this project are documented in this file. The format is based ## [Unreleased] Breaking changes: +- Migrated FFI to ES modules (#39 by @kl0tl and @JordanMartinez) New features: