Skip to content

Commit

Permalink
♻ Remove chain and generated code (#197)
Browse files Browse the repository at this point in the history
* 🔥 Remove seq namespace, skip protect tests for now

* ♻️ Rewrite apply to have polymorphic operations

* 🔥 Remove all generated code

* ♻️ Remove protect from exports, JSDoc and codecov

* 🔥 Remove @flow doclets
  • Loading branch information
nlepage committed Jan 4, 2018
1 parent 16c9a0d commit 0ac62d7
Show file tree
Hide file tree
Showing 104 changed files with 54 additions and 638 deletions.
4 changes: 2 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
"ignore": ".spec.js",
"plugins": [
["module-resolver", {
"root": ["./tmpsrc"]
"root": ["./src"]
}]
],
},
"test": {
"plugins": [
["module-resolver", {
"root": ["./src", "./generated", "../../misc"]
"root": ["./src", "../../misc"]
}]
]
}
Expand Down
2 changes: 2 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
coverage:
range: "100..100"
ignore:
- "packages/immutadot/src/util/protect.js"
3 changes: 0 additions & 3 deletions config/jsdoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
"source": {
"include": ["src", "package.json", "../../README.md"]
},
"plugins": [
"../../misc/jsdoc-flow-plugin.js"
],
"opts": {
"template": "../node_modules/hotdoc/template",
"destination": "../../docs",
Expand Down
156 changes: 0 additions & 156 deletions misc/generate-flow.js

This file was deleted.

7 changes: 0 additions & 7 deletions misc/jsdoc-flow-plugin.js

This file was deleted.

3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,12 @@
"babel-preset-env": "~1.6.1",
"babel-preset-stage-2": "~6.24.1",
"codecov": "~3.0.0",
"command-line-args": "^4.0.7",
"cross-env": "~5.1.1",
"eslint": "~4.14.0",
"fs-extra": "~5.0.0",
"greenkeeper-lockfile": "1",
"hotdoc": "~0.7.2",
"jest": "~21.2.1",
"jsdoc": "~3.5.5",
"jsdoc-api": "~4.0.0",
"lerna": "~2.5.1",
"lodash": "~4.17.4"
},
Expand Down
1 change: 0 additions & 1 deletion packages/immutadot-lodash/.npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
/coverage/
/generated/
/src/
12 changes: 4 additions & 8 deletions packages/immutadot-lodash/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,11 @@
"lerna": "~2.5.1"
},
"scripts": {
"generate:flow": "node ../../misc/generate-flow.js --external",
"prebuild": "yarn generate:flow && rm -rf tmpsrc && mkdir tmpsrc && cp -r src/* generated/* tmpsrc",
"build": "cross-env BABEL_ENV=production babel tmpsrc -d .",
"postbuild": "rm -rf tmpsrc",
"prelint": "yarn generate:flow",
"lint": "eslint src generated",
"pretest": "lerna run --scope immutadot build && yarn generate:flow",
"build": "cross-env BABEL_ENV=production babel src -d .",
"lint": "eslint src",
"pretest": "lerna run --scope immutadot build",
"test": "jest -c ../../config/jest.js",
"pretest:coverage": "lerna run --scope immutadot build && yarn generate:flow",
"pretest:coverage": "lerna run --scope immutadot build",
"test:coverage": "jest -c ../../config/jest.js --maxWorkers=2 --coverage",
"docs": "jsdoc -c ../../config/jsdoc.json",
"docs:private": "jsdoc -c ../../config/jsdoc.json -p"
Expand Down
1 change: 0 additions & 1 deletion packages/immutadot-lodash/src/array/difference.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { convert } from 'immutadot/core/convert'
* @example difference({ nested: { prop: [1, 2] } }, 'nested.prop', [2, 3]) // => { nested: { prop: [1] } }
* @see {@link https://lodash.com/docs#difference|lodash.difference} for more information.
* @since 1.0.0
* @flow
*/
const difference = convert(_difference)
export { difference }
1 change: 0 additions & 1 deletion packages/immutadot-lodash/src/array/differenceBy.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { convert } from 'immutadot/core/convert'
* @example differenceBy({ nested: { prop: [1.2, 3.4, 5.6] } }, 'nested.prop', [5.4, 2.1], Math.floor) // => { nested: { prop: [1.2, 3.4] } }
* @see {@link https://lodash.com/docs#differenceBy|lodash.differenceBy} for more information.
* @since 1.0.0
* @flow
*/
const differenceBy = convert(_differenceBy)
export { differenceBy }
1 change: 0 additions & 1 deletion packages/immutadot-lodash/src/array/differenceWith.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { convert } from 'immutadot/core/convert'
* @example differenceWith({ nested: { prop: [{ x: 1 }, { x: 2 }] } }, 'nested.prop', [{ x: 2 }, { x: 3 }], (a, b) => a.x === b.x) // => { nested: { prop: [{ x: 1 }] } }
* @see {@link https://lodash.com/docs#differenceWith|lodash.differenceWith} for more information.
* @since 1.0.0
* @flow
*/
const differenceWith = convert(_differenceWith)
export { differenceWith }
1 change: 0 additions & 1 deletion packages/immutadot-lodash/src/array/drop.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { convert } from 'immutadot/core/convert'
* @example drop({ nested: { prop: [1, 2, 3, 4] } }, 'nested.prop', 2) // => { nested: { prop: [3, 4] } }
* @see {@link https://lodash.com/docs#drop|lodash.drop} for more information.
* @since 1.0.0
* @flow
*/
const drop = convert(_drop)
export { drop }
1 change: 0 additions & 1 deletion packages/immutadot-lodash/src/array/dropRight.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { convert } from 'immutadot/core/convert'
* @example dropRight({ nested: { prop: [1, 2, 3, 4] } }, 'nested.prop', 2) // => { nested: { prop: [1, 2] } }
* @see {@link https://lodash.com/docs#dropRight|lodash.dropRight} for more information.
* @since 1.0.0
* @flow
*/
const dropRight = convert(_dropRight)
export { dropRight }
1 change: 0 additions & 1 deletion packages/immutadot-lodash/src/array/dropRightWhile.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { convert } from 'immutadot/core/convert'
* @example dropRightWhile({ nested: { prop: [1, 2, 3, 4] } }, 'nested.prop', v => v > 2) // => { nested: { prop: [1, 2] } }
* @see {@link https://lodash.com/docs#dropRightWhile|lodash.dropRightWhile} for more information.
* @since 1.0.0
* @flow
*/
const dropRightWhile = convert(_dropRightWhile)
export { dropRightWhile }
1 change: 0 additions & 1 deletion packages/immutadot-lodash/src/array/dropWhile.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { convert } from 'immutadot/core/convert'
* @example dropWhile({ nested: { prop: [1, 2, 3, 4] } }, 'nested.prop', v => v < 3) // => { nested: { prop: [3, 4] } }
* @see {@link https://lodash.com/docs#dropWhile|lodash.dropWhile} for more information.
* @since 1.0.0
* @flow
*/
const dropWhile = convert(_dropWhile)
export { dropWhile }
1 change: 0 additions & 1 deletion packages/immutadot-lodash/src/array/intersection.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { convert } from 'immutadot/core/convert'
* @example intersection({ nested: { prop: [1, 2] } }, 'nested.prop', [2, 3]) // => { nested: { prop: [2] } }
* @see {@link https://lodash.com/docs#intersection|lodash.intersection} for more information.
* @since 1.0.0
* @flow
*/
const intersection = convert(_intersection)
export { intersection }
1 change: 0 additions & 1 deletion packages/immutadot-lodash/src/array/intersectionBy.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { convert } from 'immutadot/core/convert'
* @example intersectionBy({ nested: { prop: [1.2, 2.1] } }, 'nested.prop', [2.3, 3.2], Math.floor) // => { nested: { prop: [2.1] } }
* @see {@link https://lodash.com/docs#intersectionBy|lodash.intersectionBy} for more information.
* @since 1.0.0
* @flow
*/
const intersectionBy = convert(_intersectionBy)
export { intersectionBy }
1 change: 0 additions & 1 deletion packages/immutadot-lodash/src/array/intersectionWith.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { convert } from 'immutadot/core/convert'
* @example intersectionWith({ nested: { prop: [{ x: 1 }, { x: 2 }] } }, 'nested.prop', [{ x: 2 }, { x: 3 }], (a, b) => a.x === b.x) // => { nested: { prop: [{ x: 2 }] } }
* @see {@link https://lodash.com/docs#intersectionWith|lodash.intersectionWith} for more information.
* @since 1.0.0
* @flow
*/
const intersectionWith = convert(_intersectionWith)
export { intersectionWith }
1 change: 0 additions & 1 deletion packages/immutadot-lodash/src/array/pull.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { convertLodashFp } from 'util/convertLodashFp'
* @example pull({ nested: { prop: [1, 2, 3, 1, 2, 3] } }, 'nested.prop', 1, 3) // => { nested: { prop: [2, 2] } }
* @see {@link https://lodash.com/docs#pull|lodash.pull} for more information.
* @since 1.0.0
* @flow
*/
const pull = convertLodashFp(_pull)
export { pull }
1 change: 0 additions & 1 deletion packages/immutadot-lodash/src/array/pullAll.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { convertLodashFp } from 'util/convertLodashFp'
* @example pullAll({ nested: { prop: [1, 2, 3, 1, 2, 3] } }, 'nested.prop', [1, 3]) // => { nested: { prop: [2, 2] } }
* @see {@link https://lodash.com/docs#pullAll|lodash.pullAll} for more information.
* @since 1.0.0
* @flow
*/
const pullAll = convertLodashFp(_pullAll)
export { pullAll }
1 change: 0 additions & 1 deletion packages/immutadot-lodash/src/array/pullAllBy.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { convertLodashFp } from 'util/convertLodashFp'
* @example pullAllBy({ nested: { prop: [{ x: 1 }, { x: 2 }, { x: 3 }, { x: 1 }, { x: 2 }, { x: 3 }] } }, 'nested.prop', [{ x: 1 }, { x: 3 }], 'x') // => { nested: { prop: [{ x: 2 }, { x: 2 }] } }
* @see {@link https://lodash.com/docs#pullAllBy|lodash.pullAllBy} for more information.
* @since 1.0.0
* @flow
*/
const pullAllBy = convertLodashFp(_pullAllBy)
export { pullAllBy }
1 change: 0 additions & 1 deletion packages/immutadot-lodash/src/array/pullAllWith.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { convertLodashFp } from 'util/convertLodashFp'
* @example pullAllWith({ nested: { prop: [{ x: 1 }, { x: 2 }, { x: 3 }, { x: 1 }, { x: 2 }, { x: 3 }] } }, 'nested.prop', [{ x: 1 }, { x: 3 }], (a, b) => a.x === b.x) // => { nested: { prop: [{ x: 2 }, { x: 2 }] } }
* @see {@link https://lodash.com/docs#pullAllWith|lodash.pullAllWith} for more information.
* @since 1.0.0
* @flow
*/
const pullAllWith = convertLodashFp(_pullAllWith)
export { pullAllWith }
1 change: 0 additions & 1 deletion packages/immutadot-lodash/src/array/pullAt.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { convertLodashFp } from 'util/convertLodashFp'
* @example pullAt({ nested: { prop: [4, 3, 2, 1] } }, 'nested.prop', 1, 3) // => { nested: { prop: [4, 2] } }
* @see {@link https://lodash.com/docs#pullAt|lodash.pullAt} for more information.
* @since 1.0.0
* @flow
*/
const pullAt = convertLodashFp(_pullAt)
export { pullAt }
1 change: 0 additions & 1 deletion packages/immutadot-lodash/src/array/remove.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { convertLodashFp } from 'util/convertLodashFp'
* @example remove({ nested: { prop: [1, 2, 3, 4] } }, 'nested.prop', v => v > 2) // => { nested: { prop: [1, 2] } }
* @see {@link https://lodash.com/docs#remove|lodash.remove} for more information.
* @since 1.0.0
* @flow
*/
const remove = convertLodashFp(_remove)
export { remove }
1 change: 0 additions & 1 deletion packages/immutadot-lodash/src/array/take.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { convert } from 'immutadot/core/convert'
* @example take({ nested: { prop: [1, 2, 3, 4] } }, 'nested.prop', 2) // => { nested: { prop: [1, 2] } }
* @see {@link https://lodash.com/docs#take|lodash.take} for more information.
* @since 1.0.0
* @flow
*/
const take = convert(_take)
export { take }
1 change: 0 additions & 1 deletion packages/immutadot-lodash/src/array/takeRight.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { convert } from 'immutadot/core/convert'
* @example takeRight({ nested: { prop: [1, 2, 3, 4] } }, 'nested.prop', 2) // => { nested: { prop: [3, 4] } }
* @see {@link https://lodash.com/docs#takeRight|lodash.takeRight} for more information.
* @since 1.0.0
* @flow
*/
const takeRight = convert(_takeRight)
export { takeRight }
1 change: 0 additions & 1 deletion packages/immutadot-lodash/src/array/takeRightWhile.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { convert } from 'immutadot/core/convert'
* @example takeRightWhile({ nested: { prop: [1, 2, 3, 4] } }, 'nested.prop', v => v > 3) // => { nested: { prop: [4] } }
* @see {@link https://lodash.com/docs#takeRightWhile|lodash.takeRightWhile} for more information.
* @since 1.0.0
* @flow
*/
const takeRightWhile = convert(_takeRightWhile)
export { takeRightWhile }
1 change: 0 additions & 1 deletion packages/immutadot-lodash/src/array/takeWhile.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { convert } from 'immutadot/core/convert'
* @example takeWhile({ nested: { prop: [1, 2, 3, 4] } }, 'nested.prop', v => v < 2) // => { nested: { prop: [1] } }
* @see {@link https://lodash.com/docs#takeWhile|lodash.takeWhile} for more information.
* @since 1.0.0
* @flow
*/
const takeWhile = convert(_takeWhile)
export { takeWhile }

0 comments on commit 0ac62d7

Please sign in to comment.