Skip to content

Update to PureScript v0.15.0 #14

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

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"parserOptions": {
"ecmaVersion": 5
"ecmaVersion": 6,
"sourceType": "module"
},
"extends": "eslint:recommended",
"env": {
"commonjs": true,
"browser": true
},
"rules": {
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ jobs:
- uses: actions/checkout@v2

- uses: purescript-contrib/setup-purescript@main
with:
purescript: "unstable"

- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: "10"
node-version: "14"

- name: Install dependencies
run: |
Expand Down
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 (#14 by @JordanMartinez)

New features:

Expand Down
6 changes: 3 additions & 3 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"package.json"
],
"dependencies": {
"purescript-web-dom": "^5.0.0",
"purescript-web-html": "^3.0.0",
"purescript-web-uievents": "^3.0.0"
"purescript-web-dom": "master",
"purescript-web-html": "master",
"purescript-web-uievents": "master"
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,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"
}
}
6 changes: 2 additions & 4 deletions src/Web/CSSOM.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Web.CSSOM
"use strict";

exports.getStyleSheets = function(doc) {
export function getStyleSheets(doc) {
return function() {
return doc.styleSheets;
};
};
}
30 changes: 14 additions & 16 deletions src/Web/CSSOM/CSSStyleDeclaration.js
Original file line number Diff line number Diff line change
@@ -1,55 +1,53 @@
"use strict";

exports.cssText = function (style) {
export function cssText(style) {
return function () {
return style.cssText;
};
};
}

exports.setCssText = function (style) {
export function setCssText(style) {
return function (newCSS) {
return function () {
style.cssText = newCSS;
};
};
};
}

exports.length = function (style) {
export function length(style) {
return function () {
return style.length;
};
};
}

exports.getPropertyPriority = function (style) {
export function getPropertyPriority(style) {
return function (propName) {
return function () {
return style.getPropertyPriority(propName);
};
};
};
}

exports.getPropertyValue = function (style) {
export function getPropertyValue(style) {
return function (propName) {
return function () {
return style.getPropertyValue(propName);
};
};
};
}

exports.removeProperty = function (style) {
export function removeProperty(style) {
return function (propName) {
return function () {
style.removeProperty(propName);
};
};
};
}

exports.setProperty = function (style) {
export function setProperty(style) {
return function (propName) {
return function (propValue) {
return function () {
style.setProperty(propName, propValue);
};
};
};
};
}
22 changes: 10 additions & 12 deletions src/Web/CSSOM/CSSStyleSheet.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,28 @@
"use strict";

var getProp = function (name) {
return function (sheet) {
return sheet[name];
};
};

exports.disabled = getProp("disabled");
exports._href = getProp("href");
exports._ownerNode = getProp("ownerNode");
exports._parentStyleSheet = getProp("parentStyleSheet");
exports._title = getProp("title");
exports._type = getProp("type");
export const disabled = getProp("disabled");
export const _href = getProp("href");
export const _ownerNode = getProp("ownerNode");
export const _parentStyleSheet = getProp("parentStyleSheet");
export const _title = getProp("title");
export const _type = getProp("type");

exports.setDisabled = function (bool) {
export function setDisabled(bool) {
return function (sheet) {
return function () {
sheet.disabled = bool;
};
};
};
}

exports.toggleDisabled = function (sheet) {
export function toggleDisabled(sheet) {
return function () {
var bool = !sheet.disabled;
sheet.disabled = bool;
return bool;
};
};
}
6 changes: 2 additions & 4 deletions src/Web/CSSOM/ElementCSSInlineStyle.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"use strict";

exports.style = function (el) {
export function style(el) {
return function () {
return el.style;
};
};
}
10 changes: 4 additions & 6 deletions src/Web/CSSOM/MouseEvent.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
"use strict";

exports.offsetX = function (e) {
export function offsetX(e) {
return e.offsetX;
};
}

exports.offsetY = function (e) {
export function offsetY(e) {
return e.offsetY;
};
}
14 changes: 6 additions & 8 deletions src/Web/CSSOM/StyleSheetList.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
"use strict";

exports.length = function (list) {
export function length(list) {
return function () {
return list.length;
};
};
}

exports.toArray = function (list) {
export function toArray(list) {
return function () {
return Array.prototype.slice.call(list);
};
};
}

exports._item = function (index) {
export function _item(index) {
return function (list) {
return function () {
return list.item(index);
};
};
};
}