Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to PureScript v0.15.0 #28

4 changes: 2 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 (#28 by @JordanMartinez)

New features:

Expand Down
8 changes: 4 additions & 4 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
"url": "https://github.com/purescript-contrib/purescript-react-dom.git"
},
"dependencies": {
"purescript-effect": "^3.0.0",
"purescript-react": "^9.0.0",
"purescript-web-dom": "^5.0.0"
"purescript-effect": "master",
"purescript-react": "main",
"purescript-web-dom": "master"
},
"devDependencies": {
"purescript-console": "^5.0.0"
"purescript-console": "master"
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"devDependencies": {
"eslint": "^7.6.0",
"purescript-psa": "^0.8.0"
"purescript-psa": "^0.8.2"
},
"peerDependencies": {
"react-dom": "^16.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages.dhall
Original file line number Diff line number Diff line change
@@ -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
1 change: 0 additions & 1 deletion spago.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
, "maybe"
, "nullable"
, "prelude"
, "psci-support"
, "react"
, "web-dom"
]
Expand Down
23 changes: 10 additions & 13 deletions src/ReactDOM.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
"use strict";
import ReactDOM from "react-dom";
import ReactDOMServer from "react-dom/server";

var ReactDOM = require("react-dom");
var ReactDOMServer = require("react-dom/server");

exports.renderImpl = function (element, container) {
export function renderImpl(element, container) {
return ReactDOM.render(element, container);
};
}

exports.hydrateImpl = function (element, container) {
export function hydrateImpl(element, container) {
return ReactDOM.hydrate(element, container);
};

exports.unmountComponentAtNodeImpl = ReactDOM.unmountComponentAtNode;
exports.findDOMNodeImpl = ReactDOM.findDOMNode;
}

exports.renderToStringImpl = ReactDOMServer.renderToString;
exports.renderToStaticMarkupImpl = ReactDOMServer.renderToStaticMarkup;
export const unmountComponentAtNodeImpl = ReactDOM.unmountComponentAtNode;
export const findDOMNodeImpl = ReactDOM.findDOMNode;
export const renderToStringImpl = ReactDOMServer.renderToString;
export const renderToStaticMarkupImpl = ReactDOMServer.renderToStaticMarkup;