Skip to content

Commit

Permalink
Merge pull request #601 from fluture-js/avaq/maintenance
Browse files Browse the repository at this point in the history
Maintenance
  • Loading branch information
Avaq committed Nov 28, 2023
2 parents 47b62eb + 670fb9b commit c5c00dc
Show file tree
Hide file tree
Showing 46 changed files with 139 additions and 137 deletions.
14 changes: 13 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,19 @@
"no-console": 2,
"eqeqeq": [2, "smart"],
"no-eq-null": ["off"],
"no-param-reassign": ["off"]
"no-param-reassign": ["off"],
"no-shadow": ["off"],
"keyword-spacing": ["off"],
"no-plusplus": ["off"],
"operator-assignment": ["off"],
"one-var": ["off"],
"generator-star-spacing": ["error", {"before": false, "after": false}],
"no-mixed-operators": ["off"],
"capitalized-comments": ["off"],
"init-declarations": ["off"],
"function-call-argument-newline": ["off"],
"no-multi-assign": ["off"],
"no-invalid-this": ["off"]
},
"overrides": [
{
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Install NodeJS
uses: actions/setup-node@v1
with:
node-version: 14.x
node-version: 18.x
- name: Install Dependencies
run: npm install
- name: Execute Tests
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export {
isNever,
never,
reject,
resolve
resolve,
} from './src/future.js';

export {after} from './src/after.js';
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
],
"dependencies": {
"sanctuary-show": "^2.0.0",
"sanctuary-type-identifiers": "^3.0.0"
"sanctuary-type-identifiers": "^4.0.0"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^25.0.0",
Expand All @@ -80,20 +80,20 @@
"chai": "^4.1.2",
"codecov": "^3.6.1",
"es-check": "^7.0.0",
"eslint": "^7.0.0",
"eslint-config-warp": "^4.0.0",
"fantasy-laws": "^1.0.1",
"eslint": "^8.54.0",
"eslint-config-warp": "^7.1.0",
"fantasy-laws": "^2.0.1",
"jsverify": "^0.8.3",
"oletus": "^4.0.0",
"ramda": "^0.27.0",
"remark-cli": "^11.0.0",
"remark-validate-links": "^12.1.0",
"ramda": "^0.29.1",
"remark-cli": "^12.0.0",
"remark-validate-links": "^13.0.0",
"rimraf": "^5.0.0",
"rollup": "^3.2.5",
"rollup": "^4.5.2",
"sanctuary-benchmark": "^1.0.0",
"sanctuary-either": "^2.0.0",
"sanctuary-type-classes": "^13.0.0",
"tsd": "^0.28.1",
"tsd": "^0.29.0",
"typescript": "^5.0.4",
"xyz": "^4.0.0"
},
Expand Down
17 changes: 8 additions & 9 deletions rollup.config.dist.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/* global process require Set */
/* global process Set */

import {readFileSync} from 'fs';
import node from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';

var pkg = require('./package.json');
var pkg = JSON.parse(readFileSync('package.json', 'utf8'));

var dependencies = pkg => {
var deps = Object.keys(pkg.dependencies || {}).concat(Object.keys(pkg.peerDependencies || {}));
return Array.from(new Set(deps.concat(deps.flatMap(dependency => (
dependencies(require(`${dependency}/package.json`))
dependencies(JSON.parse(readFileSync(`node_modules/${dependency}/package.json`, 'utf8')))
)))));
};

Expand All @@ -24,8 +24,7 @@ ${readFileSync('./LICENSE')}*/
${dependencies(pkg).map(dependency => `/** ${dependency} license
${readFileSync(`./node_modules/${dependency}/LICENSE`)}*/`
).join('\n\n')}`;
${readFileSync(`./node_modules/${dependency}/LICENSE`)}*/`).join('\n\n')}`;

var typeref = `/// <reference types="https://cdn.jsdelivr.net/gh/fluture-js/Fluture@${
process.env.VERSION || pkg.version
Expand All @@ -39,15 +38,15 @@ export default [{
footer: footer,
format: 'iife',
name: 'Fluture',
file: 'dist/bundle.js'
}
file: 'dist/bundle.js',
},
}, {
input: 'index.js',
plugins: [node(), commonjs({include: 'node_modules/**'})],
output: {
banner: `${banner}\n${typeref}\n`,
footer: footer,
format: 'es',
file: 'dist/module.js'
}
file: 'dist/module.js',
},
}];
6 changes: 3 additions & 3 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var dependencies = {
'sanctuary-show': 'sanctuaryShow',
'sanctuary-type-identifiers': 'sanctuaryTypeIdentifiers'
'sanctuary-type-identifiers': 'sanctuaryTypeIdentifiers',
};

export default {
Expand All @@ -10,6 +10,6 @@ export default {
format: 'umd',
file: 'index.cjs',
name: 'Fluture',
globals: dependencies
}
globals: dependencies,
},
};
2 changes: 1 addition & 1 deletion src/after.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
application1,
createInterpreter,
never,
positiveInteger
positiveInteger,
} from './future.js';

export var After = createInterpreter(2, 'after', function After$interpret(rec, rej, res){
Expand Down
2 changes: 1 addition & 1 deletion src/alt.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
application,
application1,
future,
isFuture
isFuture,
} from './future.js';

export var alternative = {pred: isAlt, error: invalidArgumentOf('have Alt implemented')};
Expand Down
2 changes: 1 addition & 1 deletion src/and.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {createTransformation, application1, application, future} from './future.js';

export var AndTransformation = createTransformation(1, 'and', {
resolved: function AndTransformation$resolved(){ return this.$1 }
resolved: function AndTransformation$resolved(){ return this.$1 },
});

export function and(left){
Expand Down
2 changes: 1 addition & 1 deletion src/bichain.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {call} from './internal/utils.js';

export var BichainTransformation = createTransformation(2, 'bichain', {
rejected: function BichainTransformation$rejected(x){ return call(this.$1, x) },
resolved: function BichainTransformation$resolved(x){ return call(this.$2, x) }
resolved: function BichainTransformation$resolved(x){ return call(this.$2, x) },
});

export function bichain(f){
Expand Down
4 changes: 2 additions & 2 deletions src/both.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import {createTransformation, Resolve, application1, application, future} from '
export var PairTransformation = createTransformation(1, 'pair', {
resolved: function PairTransformation$resolved(x){
return new Resolve(this.context, [x, this.$1]);
}
},
});

export var BothTransformation =
createParallelTransformation('both', earlyCrash, earlyReject, noop, {
resolved: function BothTransformation$resolved(x){
return this.$1._transform(new PairTransformation(this.context, x));
}
},
});

export function both(left){
Expand Down
2 changes: 1 addition & 1 deletion src/chain-rej.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {call} from './internal/utils.js';
import {createTransformation, application1, application, future, func} from './future.js';

export var ChainRejTransformation = createTransformation(1, 'chainRej', {
rejected: function ChainRejTransformation$rejected(x){ return call(this.$1, x) }
rejected: function ChainRejTransformation$rejected(x){ return call(this.$1, x) },
});

export function chainRej(f){
Expand Down
2 changes: 1 addition & 1 deletion src/coalesce.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export var CoalesceTransformation = createTransformation(2, 'coalesce', {
},
resolved: function CoalesceTransformation$resolved(x){
return new Resolve(this.context, call(this.$2, x));
}
},
});

export function coalesce(f){
Expand Down

0 comments on commit c5c00dc

Please sign in to comment.