From 1346630386e09468ef03872cad3578c4f78045aa Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Fri, 11 Mar 2022 14:20:40 -0800 Subject: [PATCH 1/7] Migrated FFI to ES modules via 'lebab' --- src/Test/QuickCheck/Gen.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Test/QuickCheck/Gen.js b/src/Test/QuickCheck/Gen.js index a2367f0..253816f 100644 --- a/src/Test/QuickCheck/Gen.js +++ b/src/Test/QuickCheck/Gen.js @@ -3,10 +3,10 @@ // module Test.QuickCheck.Gen -exports.float32ToInt32 = function (n) { +export function float32ToInt32(n) { var arr = new ArrayBuffer(4); var fv = new Float32Array(arr); var iv = new Int32Array(arr); fv[0] = n; return iv[0]; -}; +} From 277fe4feb04dfe3cdc82536f6b26b8424e132ca7 Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Fri, 11 Mar 2022 14:20:40 -0800 Subject: [PATCH 2/7] Removed '"use strict";' in FFI files --- src/Test/QuickCheck/Gen.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Test/QuickCheck/Gen.js b/src/Test/QuickCheck/Gen.js index 253816f..55d7a56 100644 --- a/src/Test/QuickCheck/Gen.js +++ b/src/Test/QuickCheck/Gen.js @@ -1,6 +1,4 @@ /* global ArrayBuffer, Float32Array, Int32Array */ -"use strict"; - // module Test.QuickCheck.Gen export function float32ToInt32(n) { From 906c6e6021bbd830d7ba50ec18adb8d9f2445c72 Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Fri, 11 Mar 2022 14:20:40 -0800 Subject: [PATCH 3/7] 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 d858fc23af3ed0e59ff7e58db87e070e53109c1f Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Fri, 11 Mar 2022 14:20:41 -0800 Subject: [PATCH 4/7] 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 fd4391e..a1d6811 100644 --- a/package.json +++ b/package.json @@ -7,8 +7,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 8fea16f967c2f1c0418b57937fe3cf7e81aecf9b Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Fri, 11 Mar 2022 14:59:25 -0800 Subject: [PATCH 5/7] Update Bower dependencies to master --- bower.json | 58 +++++++++++++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/bower.json b/bower.json index 7d54fe2..06f114e 100644 --- a/bower.json +++ b/bower.json @@ -20,36 +20,36 @@ "package.json" ], "dependencies": { - "purescript-arrays": "^6.0.0", - "purescript-console": "^5.0.0", - "purescript-control": "^5.0.0", - "purescript-effect": "^3.0.0", - "purescript-either": "^5.0.0", - "purescript-enums": "^5.0.0", - "purescript-exceptions": "^5.0.0", - "purescript-foldable-traversable": "^5.0.0", - "purescript-gen": "^3.0.0", - "purescript-identity": "^5.0.0", - "purescript-integers": "^5.0.0", - "purescript-lazy": "^5.0.0", - "purescript-lcg": "^3.0.0", - "purescript-lists": "^6.0.0", - "purescript-math": "^3.0.0", - "purescript-maybe": "^5.0.0", - "purescript-newtype": "^4.0.0", - "purescript-nonempty": "^6.0.0", - "purescript-partial": "^3.0.0", - "purescript-prelude": "^5.0.0", - "purescript-record": "^3.0.0", - "purescript-st": "^5.0.0", - "purescript-strings": "^5.0.0", - "purescript-tailrec": "^5.0.0", - "purescript-transformers": "^5.0.0", - "purescript-tuples": "^6.0.0", - "purescript-unfoldable": "^5.0.0" + "purescript-arrays": "master", + "purescript-console": "master", + "purescript-control": "master", + "purescript-effect": "master", + "purescript-either": "master", + "purescript-enums": "master", + "purescript-exceptions": "master", + "purescript-foldable-traversable": "master", + "purescript-gen": "master", + "purescript-identity": "master", + "purescript-integers": "master", + "purescript-lazy": "master", + "purescript-lcg": "master", + "purescript-lists": "master", + "purescript-math": "master", + "purescript-maybe": "master", + "purescript-newtype": "master", + "purescript-nonempty": "master", + "purescript-partial": "master", + "purescript-prelude": "master", + "purescript-record": "master", + "purescript-st": "master", + "purescript-strings": "master", + "purescript-tailrec": "master", + "purescript-transformers": "master", + "purescript-tuples": "master", + "purescript-unfoldable": "master" }, "devDependencies": { - "purescript-assert": "^5.0.0", - "purescript-numbers": "^8.0.0" + "purescript-assert": "master", + "purescript-numbers": "master" } } From b94988014d688f0948b184d43a49cd409195a0f3 Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Tue, 15 Mar 2022 16:40:02 -0500 Subject: [PATCH 6/7] Update .eslintrc.json to ES6 --- .eslintrc.json | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 84cef4f..1c6afb9 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,11 +1,9 @@ { "parserOptions": { - "ecmaVersion": 5 + "ecmaVersion": 6, + "sourceType": "module" }, "extends": "eslint:recommended", - "env": { - "commonjs": true - }, "rules": { "strict": [2, "global"], "block-scoped-var": 2, From d5845f5c0ffe71f476d42e7c708b3b421642fa0d Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Tue, 15 Mar 2022 16:41:34 -0500 Subject: [PATCH 7/7] Added changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index de57c18..b0b9b69 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: +- Migrate FFI to ES modules (#130 by @kl0tl and @JordanMartinez) New features: