diff --git a/.eslintrc.json b/.eslintrc.json index 17f167d..240b092 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", diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 43f9f20..e16f413 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 @@ -49,8 +50,17 @@ 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 + if [ -d "test" ]; then + npx pulp test + fi diff --git a/CHANGELOG.md b/CHANGELOG.md index 880ae14..a11de33 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 (#44 by @JordanMartinez) New features: diff --git a/bower.json b/bower.json index 00e99a3..3a3f733 100644 --- a/bower.json +++ b/bower.json @@ -18,12 +18,12 @@ "package.json" ], "dependencies": { - "purescript-effect": "^3.0.0", - "purescript-functions": "^5.0.0", - "purescript-maybe": "^5.0.0", - "purescript-prelude": "^5.0.0" + "purescript-effect": "master", + "purescript-functions": "master", + "purescript-maybe": "master", + "purescript-prelude": "master" }, "devDependencies": { - "purescript-assert": "^5.0.0" + "purescript-assert": "master" } } 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 diff --git a/spago.dhall b/spago.dhall index 2f813bb..4e13bfd 100644 --- a/spago.dhall +++ b/spago.dhall @@ -5,7 +5,6 @@ , "functions" , "maybe" , "prelude" - , "psci-support" ] , packages = ./packages.dhall , sources = [ "src/**/*.purs", "test/**/*.purs" ] diff --git a/src/Data/Nullable.js b/src/Data/Nullable.js index 35039cf..e66d640 100644 --- a/src/Data/Nullable.js +++ b/src/Data/Nullable.js @@ -1,13 +1,12 @@ /* eslint-disable no-eq-null, eqeqeq */ -"use strict"; +const nullImpl = null; +export { nullImpl as null }; -exports["null"] = null; - -exports.nullable = function (a, r, f) { +export function nullable(a, r, f) { return a == null ? r : f(a); -}; +} -exports.notNull = function (x) { +export function notNull(x) { return x; -}; +}