From 98f98bd2359975f7408a45d5d9a6a6a92d661094 Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Tue, 22 Mar 2022 09:21:32 -0500 Subject: [PATCH 01/10] Update .eslintrc.json to ES6 --- .eslintrc.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index d7cf0c8..839784c 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,7 +1,7 @@ { - "env": { "browser": true, "commonjs": true }, + "env": { "browser": true }, "extends": "eslint:recommended", - "parserOptions": { "ecmaVersion": 5 }, + "parserOptions": { "ecmaVersion": 6, "sourceType": "module" }, "rules": { "block-scoped-var": "error", "consistent-return": "error", From df4e36cf25d5af859d4b37a8ff577edfdee92a7a Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Tue, 22 Mar 2022 09:21:33 -0500 Subject: [PATCH 02/10] Migrated FFI to ES modules via 'lebab' --- src/JSURI.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/JSURI.js b/src/JSURI.js index 8c7cd6b..0fb3ba8 100644 --- a/src/JSURI.js +++ b/src/JSURI.js @@ -34,7 +34,7 @@ function _decodeURIComponent(fail, succeed, input) { } } -exports._decodeURIComponent = _decodeURIComponent; +export {_decodeURIComponent}; exports._decodeFormURLComponent = function encode(fail, succeed, input) { return _decodeURIComponent(fail, succeed, input.replace(/\+/g, " ")); From 35f466f482ba94aae965ca3827eb6f503d018ef9 Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Tue, 22 Mar 2022 09:21:33 -0500 Subject: [PATCH 03/10] Removed '"use strict";' in FFI files --- src/JSURI.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/JSURI.js b/src/JSURI.js index 0fb3ba8..c595ce8 100644 --- a/src/JSURI.js +++ b/src/JSURI.js @@ -1,5 +1,3 @@ -"use strict"; - // A helper which transforms the result ofencodeURIComponent to be compliant // with RFC3896, as described in the MDN documentation here: // From 125c86e3b030246af46c3b92779005aa29b6a630 Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Tue, 22 Mar 2022 09:21:33 -0500 Subject: [PATCH 04/10] Update to CI to use 'unstable' purescript --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 43f9f20..4989d99 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 From c6c0aabfe5dbf074feaa7873e1de55e8883c338a Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Tue, 22 Mar 2022 09:21:33 -0500 Subject: [PATCH 05/10] Add CI test: verify 'bower.json' file works via pulp --- .github/workflows/ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4989d99..fc54710 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,3 +55,12 @@ jobs: - 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 + if [ -d "test" ]; then + npx pulp test + fi From ca7a467982ac6ad843e28b63d878a0f2dc14c025 Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Tue, 22 Mar 2022 09:21:33 -0500 Subject: [PATCH 06/10] Ignore spago-based tests (temporarily) --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fc54710..e16f413 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,8 +50,8 @@ 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 From 8d5827a9390ed71360af81d08439446a5a60020b Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Tue, 22 Mar 2022 09:21:33 -0500 Subject: [PATCH 07/10] Update Bower dependencies to master or main --- bower.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bower.json b/bower.json index e2656d0..5e881a8 100644 --- a/bower.json +++ b/bower.json @@ -14,11 +14,11 @@ "output" ], "dependencies": { - "purescript-functions": "^5.0.0", - "purescript-maybe": "^5.0.0" + "purescript-functions": "master", + "purescript-maybe": "master" }, "devDependencies": { - "purescript-assert": "^5.0.0", - "purescript-effect": "^3.0.0" + "purescript-assert": "master", + "purescript-effect": "master" } } From 817dacd5a4178d6229468184e798270827952114 Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Tue, 22 Mar 2022 09:21:33 -0500 Subject: [PATCH 08/10] Update packages.dhall to 'prepare-0.15' package set --- packages.dhall | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages.dhall b/packages.dhall index 7a6905b..582d6d3 100644 --- a/packages.dhall +++ b/packages.dhall @@ -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 From 221b2082a718ca6b3333e504ccc9e13b3523396b Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Tue, 22 Mar 2022 10:33:31 -0500 Subject: [PATCH 09/10] Fix FFI export --- src/JSURI.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/JSURI.js b/src/JSURI.js index c595ce8..80f96ab 100644 --- a/src/JSURI.js +++ b/src/JSURI.js @@ -8,7 +8,7 @@ function toRFC3896(input) { }); } -exports._encodeURIComponent = function encode(fail, succeed, input) { +export const _encodeURIComponent = function encode(fail, succeed, input) { try { return succeed(toRFC3896(encodeURIComponent(input))); } catch (err) { @@ -16,7 +16,7 @@ exports._encodeURIComponent = function encode(fail, succeed, input) { } }; -exports._encodeFormURLComponent = function encode(fail, succeed, input) { +export const _encodeFormURLComponent = function encode(fail, succeed, input) { try { return succeed(toRFC3896(encodeURIComponent(input)).replace(/%20/g, "+")); } catch (err) { @@ -34,6 +34,6 @@ function _decodeURIComponent(fail, succeed, input) { export {_decodeURIComponent}; -exports._decodeFormURLComponent = function encode(fail, succeed, input) { +export const _decodeFormURLComponent = function encode(fail, succeed, input) { return _decodeURIComponent(fail, succeed, input.replace(/\+/g, " ")); }; From 40a9e25433176902574ee7fabac66cf46aa3e30e Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Tue, 22 Mar 2022 10:36:24 -0500 Subject: [PATCH 10/10] Added changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ab4af48..678bfc4 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: +- Update project and deps to PureScript v0.15.0 (#11 by @JordanMartinez) New features: