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, 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: diff --git a/CHANGELOG.md b/CHANGELOG.md index f55367b..46ba0a7 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 (#24 by @kl0tl and @JordanMartinez) New features: 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" } } diff --git a/src/Partial.js b/src/Partial.js index 4870111..1fea9b6 100644 --- a/src/Partial.js +++ b/src/Partial.js @@ -1,7 +1,5 @@ -"use strict"; - // module Partial -exports._crashWith = function (msg) { +export const _crashWith = function (msg) { throw new Error(msg); }; diff --git a/src/Partial/Unsafe.js b/src/Partial/Unsafe.js index 7ec706e..de0cb0e 100644 --- a/src/Partial/Unsafe.js +++ b/src/Partial/Unsafe.js @@ -1,7 +1,5 @@ -"use strict"; - // module Partial.Unsafe -exports._unsafePartial = function (f) { +export const _unsafePartial = function (f) { return f(); };