Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 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
6 changes: 2 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
- uses: actions/checkout@v2

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

- uses: actions/setup-node@v1
with:
Expand Down
6 changes: 3 additions & 3 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
"package.json"
],
"dependencies": {
"purescript-effect": "^3.0.0"
"purescript-effect": "master"
},
"devDependencies": {
"purescript-assert": "^5.0.0",
"purescript-console": "^5.0.0"
"purescript-assert": "master",
"purescript-console": "master"
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
59 changes: 23 additions & 36 deletions src/Node/Path.js
Original file line number Diff line number Diff line change
@@ -1,45 +1,32 @@
"use strict";
import path from "path";
export const normalize = path.normalize;

var path = require("path");

exports.normalize = path.normalize;

exports.concat = function (segments) {
export function concat(segments) {
return path.join.apply(this, segments);
};
}

exports.resolve = function (from) {
return function (to) {
return function () {
return path.resolve.apply(this, from.concat([to]));
};
};
};
export function resolve(from) {
return to => (function() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be

return to => {
  return () => {
  };
];

return path.resolve.apply(this, from.concat([to]));
});
}

exports.relative = function (from) {
return function (to) {
return path.relative(from, to);
};
};
export function relative(from) {
return to => path.relative(from, to);
}

exports.dirname = function (p) {
export function dirname(p) {
return path.normalize(path.dirname(p));
};

exports.basename = path.basename;

exports.basenameWithoutExt = function (p) {
return function (ext) {
return path.basename(p, ext);
};
};

exports.extname = path.extname;

exports.sep = path.sep;
}

exports.delimiter = path.delimiter;
export const basename = path.basename;

exports.parse = path.parse;
export function basenameWithoutExt(p) {
return ext => path.basename(p, ext);
}

exports.isAbsolute = path.isAbsolute;
export const extname = path.extname;
export const sep = path.sep;
export const delimiter = path.delimiter;
export const parse = path.parse;
export const isAbsolute = path.isAbsolute;