@thi.ng/compose
Advanced tools
Comparing version 1.4.36 to 2.0.0
@@ -6,16 +6,26 @@ # Change Log | ||
## [1.4.36](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@1.4.35...@thi.ng/compose@1.4.36) (2021-09-03) | ||
# [2.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@1.4.36...@thi.ng/compose@2.0.0) (2021-10-12) | ||
**Note:** Version bump only for package @thi.ng/compose | ||
### Build System | ||
* major update of ALL pkgs (export maps, ESM only) ([0d1d6ea](https://github.com/thi-ng/umbrella/commit/0d1d6ea9fab2a645d6c5f2bf2591459b939c09b6)) | ||
### BREAKING CHANGES | ||
# [1.4.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@1.3.12...@thi.ng/compose@1.4.0) (2020-03-28) | ||
* discontinue CommonJS & UMD versions | ||
- only ESM modules will be published from now on | ||
- CJS obsolete due to ESM support in recent versions of node: | ||
- i.e. launch NodeJS via: | ||
- `node --experimental-specifier-resolution=node --experimental-repl-await` | ||
- in the node REPL use `await import(...)` instead of `require()` | ||
- UMD obsolete due to widespread browser support for ESM | ||
### Features | ||
Also: | ||
- normalize/restructure/reorg all package.json files | ||
- cleanup all build scripts, remove obsolete | ||
- switch from mocha to @thi.ng/testament for all tests | ||
* **compose:** add promisify() ([dfcf4ab](https://github.com/thi-ng/umbrella/commit/dfcf4ab7333b25c4332f783d124d86de058feceb)) | ||
@@ -26,64 +36,65 @@ | ||
# [1.3.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@1.2.5...@thi.ng/compose@1.3.0) (2019-07-07) | ||
# [1.4.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@1.3.12...@thi.ng/compose@1.4.0) (2020-03-28) | ||
### Features | ||
### Features | ||
* **compose:** add ifDef() ([64aba00](https://github.com/thi-ng/umbrella/commit/64aba00)) | ||
* **compose:** address TS strictNullChecks, make Delay.value protected ([1540f37](https://github.com/thi-ng/umbrella/commit/1540f37)) | ||
* **compose:** enable TS strict compiler flags (refactor) ([8ea894a](https://github.com/thi-ng/umbrella/commit/8ea894a)) | ||
- **compose:** add promisify() ([dfcf4ab](https://github.com/thi-ng/umbrella/commit/dfcf4ab7333b25c4332f783d124d86de058feceb)) | ||
# [1.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@1.1.2...@thi.ng/compose@1.2.0) (2019-03-10) | ||
# [1.3.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@1.2.5...@thi.ng/compose@1.3.0) (2019-07-07) | ||
### Features | ||
### Features | ||
* **compose:** add complement() ([5a5a2d1](https://github.com/thi-ng/umbrella/commit/5a5a2d1)) | ||
* **compose:** add trampoline() ([9e4c171](https://github.com/thi-ng/umbrella/commit/9e4c171)) | ||
- **compose:** add ifDef() ([64aba00](https://github.com/thi-ng/umbrella/commit/64aba00)) | ||
- **compose:** address TS strictNullChecks, make Delay.value protected ([1540f37](https://github.com/thi-ng/umbrella/commit/1540f37)) | ||
- **compose:** enable TS strict compiler flags (refactor) ([8ea894a](https://github.com/thi-ng/umbrella/commit/8ea894a)) | ||
# [1.1.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@1.0.2...@thi.ng/compose@1.1.0) (2019-02-15) | ||
# [1.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@1.1.2...@thi.ng/compose@1.2.0) (2019-03-10) | ||
### Bug Fixes | ||
### Features | ||
* **compose:** add varargs override for jux(), add tests ([e9d57fc](https://github.com/thi-ng/umbrella/commit/e9d57fc)) | ||
- **compose:** add complement() ([5a5a2d1](https://github.com/thi-ng/umbrella/commit/5a5a2d1)) | ||
- **compose:** add trampoline() ([9e4c171](https://github.com/thi-ng/umbrella/commit/9e4c171)) | ||
### Features | ||
# [1.1.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@1.0.2...@thi.ng/compose@1.1.0) (2019-02-15) | ||
* **compose:** add new functions ([dd13fa9](https://github.com/thi-ng/umbrella/commit/dd13fa9)) | ||
### Bug Fixes | ||
# [1.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@0.3.0...@thi.ng/compose@1.0.0) (2019-01-21) | ||
- **compose:** add varargs override for jux(), add tests ([e9d57fc](https://github.com/thi-ng/umbrella/commit/e9d57fc)) | ||
### Build System | ||
### Features | ||
* update package build scripts & outputs, imports in ~50 packages ([b54b703](https://github.com/thi-ng/umbrella/commit/b54b703)) | ||
- **compose:** add new functions ([dd13fa9](https://github.com/thi-ng/umbrella/commit/dd13fa9)) | ||
### BREAKING CHANGES | ||
# [1.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@0.3.0...@thi.ng/compose@1.0.0) (2019-01-21) | ||
* enabled multi-outputs (ES6 modules, CJS, UMD) | ||
### Build System | ||
- build scripts now first build ES6 modules in package root, then call | ||
`scripts/bundle-module` to build minified CJS & UMD bundles in `/lib` | ||
- all imports MUST be updated to only refer to package level | ||
(not individual files anymore). tree shaking in user land will get rid of | ||
all unused imported symbols. | ||
- update package build scripts & outputs, imports in ~50 packages ([b54b703](https://github.com/thi-ng/umbrella/commit/b54b703)) | ||
# [0.3.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@0.2.2...@thi.ng/compose@0.3.0) (2018-12-27) | ||
### BREAKING CHANGES | ||
### Bug Fixes | ||
- enabled multi-outputs (ES6 modules, CJS, UMD) | ||
- build scripts now first build ES6 modules in package root, then call `scripts/bundle-module` to build minified CJS & UMD bundles in `/lib` | ||
- all imports MUST be updated to only refer to package level (not individual files anymore). tree shaking in user land will get rid of all unused imported symbols. | ||
* **compose:** fix comp() for arities >10 ([1ebfea9](https://github.com/thi-ng/umbrella/commit/1ebfea9)) | ||
# [0.3.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@0.2.2...@thi.ng/compose@0.3.0) (2018-12-27) | ||
### Features | ||
### Bug Fixes | ||
* **compose:** add threadFirst/Last, rename compI => compL ([0061b21](https://github.com/thi-ng/umbrella/commit/0061b21)) | ||
- **compose:** fix comp() for arities >10 ([1ebfea9](https://github.com/thi-ng/umbrella/commit/1ebfea9)) | ||
# [0.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@0.1.4...@thi.ng/compose@0.2.0) (2018-10-17) | ||
### Features | ||
### Features | ||
- **compose:** add threadFirst/Last, rename compI => compL ([0061b21](https://github.com/thi-ng/umbrella/commit/0061b21)) | ||
* **compose:** add partial(), update readme ([6851f2c](https://github.com/thi-ng/umbrella/commit/6851f2c)) | ||
# [0.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@0.1.4...@thi.ng/compose@0.2.0) (2018-10-17) | ||
<a name="0.1.0"></a> | ||
# 0.1.0 (2018-08-24) | ||
### Features | ||
### Features | ||
- **compose:** add partial(), update readme ([6851f2c](https://github.com/thi-ng/umbrella/commit/6851f2c)) | ||
* **compose:** extract comp() & juxt() to new [@thi](https://github.com/thi).ng/compose package ([ca0a04e](https://github.com/thi-ng/umbrella/commit/ca0a04e)) | ||
# 0.1.0 (2018-08-24) | ||
### Features | ||
- **compose:** extract comp() & juxt() to new [@thi](https://github.com/thi).ng/compose package ([ca0a04e](https://github.com/thi-ng/umbrella/commit/ca0a04e)) |
@@ -1,2 +0,2 @@ | ||
import { illegalArity } from "@thi.ng/errors"; | ||
import { illegalArity } from "@thi.ng/errors/illegal-arity"; | ||
export function comp(...fns) { | ||
@@ -3,0 +3,0 @@ let [a, b, c, d, e, f, g, h, i, j] = fns; |
export const delay = (body) => new Delay(body); | ||
export class Delay { | ||
value; | ||
body; | ||
realized; | ||
constructor(body) { | ||
@@ -4,0 +7,0 @@ this.body = body; |
{ | ||
"name": "@thi.ng/compose", | ||
"version": "1.4.36", | ||
"version": "2.0.0", | ||
"description": "Optimized functional composition helpers", | ||
"type": "module", | ||
"module": "./index.js", | ||
"main": "./lib/index.js", | ||
"umd:main": "./lib/index.umd.js", | ||
"typings": "./index.d.ts", | ||
"sideEffects": false, | ||
"repository": { | ||
@@ -27,24 +27,18 @@ "type": "git", | ||
"scripts": { | ||
"build": "yarn clean && yarn build:es6 && node ../../scripts/bundle-module", | ||
"build:release": "yarn clean && yarn build:es6 && node ../../scripts/bundle-module all", | ||
"build:es6": "tsc --declaration", | ||
"build:test": "rimraf build && tsc -p test/tsconfig.json", | ||
"build:check": "tsc --isolatedModules --noEmit", | ||
"test": "mocha test", | ||
"cover": "nyc mocha test && nyc report --reporter=lcov", | ||
"clean": "rimraf *.js *.d.ts *.map .nyc_output build coverage doc lib", | ||
"doc:readme": "ts-node -P ../../tools/tsconfig.json ../../tools/src/readme.ts", | ||
"doc": "typedoc --excludePrivate --out doc --theme ../../tools/doc/typedoc-theme src/index.ts", | ||
"build": "yarn clean && tsc --declaration", | ||
"clean": "rimraf *.js *.d.ts *.map doc", | ||
"doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts", | ||
"doc:ae": "mkdir -p .ae/doc .ae/temp && node_modules/.bin/api-extractor run --local --verbose", | ||
"pub": "yarn build:release && yarn publish --access public" | ||
"doc:readme": "yarn doc:stats && ../../scripts/node-esm ../../tools/src/readme.ts", | ||
"doc:stats": "../../scripts/node-esm ../../tools/src/module-stats.ts", | ||
"pub": "yarn build && yarn publish --access public", | ||
"test": "testament test" | ||
}, | ||
"dependencies": { | ||
"@thi.ng/api": "^7.2.0", | ||
"@thi.ng/errors": "^1.3.4" | ||
"@thi.ng/api": "^8.0.0", | ||
"@thi.ng/errors": "^2.0.0" | ||
}, | ||
"files": [ | ||
"*.js", | ||
"*.d.ts", | ||
"lib" | ||
], | ||
"devDependencies": { | ||
"@thi.ng/testament": "^0.1.0" | ||
}, | ||
"keywords": [ | ||
@@ -59,4 +53,51 @@ "async", | ||
}, | ||
"sideEffects": false, | ||
"gitHead": "d971cb3f9b215a95483f78f1a8614015e331146f" | ||
"files": [ | ||
"*.js", | ||
"*.d.ts" | ||
], | ||
"exports": { | ||
".": { | ||
"import": "./index.js" | ||
}, | ||
"./comp": { | ||
"import": "./comp.js" | ||
}, | ||
"./complement": { | ||
"import": "./complement.js" | ||
}, | ||
"./constantly": { | ||
"import": "./constantly.js" | ||
}, | ||
"./delay": { | ||
"import": "./delay.js" | ||
}, | ||
"./delayed": { | ||
"import": "./delayed.js" | ||
}, | ||
"./identity": { | ||
"import": "./identity.js" | ||
}, | ||
"./ifdef": { | ||
"import": "./ifdef.js" | ||
}, | ||
"./juxt": { | ||
"import": "./juxt.js" | ||
}, | ||
"./partial": { | ||
"import": "./partial.js" | ||
}, | ||
"./promisify": { | ||
"import": "./promisify.js" | ||
}, | ||
"./thread-first": { | ||
"import": "./thread-first.js" | ||
}, | ||
"./thread-last": { | ||
"import": "./thread-last.js" | ||
}, | ||
"./trampoline": { | ||
"import": "./trampoline.js" | ||
} | ||
}, | ||
"gitHead": "9ac1344b38b565eb894306fbf72233b6c0b2d115" | ||
} |
@@ -1,2 +0,2 @@ | ||
import { illegalArgs } from "@thi.ng/errors"; | ||
import { illegalArgs } from "@thi.ng/errors/illegal-arguments"; | ||
export function partial(fn, ...args) { | ||
@@ -3,0 +3,0 @@ let [a, b, c, d, e, f, g, h] = args; |
@@ -36,11 +36,19 @@ <!-- This file is generated - DO NOT EDIT! --> | ||
ES module import: | ||
```html | ||
// ES module | ||
<script type="module" src="https://unpkg.com/@thi.ng/compose?module" crossorigin></script> | ||
<script type="module" src="https://cdn.skypack.dev/@thi.ng/compose"></script> | ||
``` | ||
// UMD | ||
<script src="https://unpkg.com/@thi.ng/compose/lib/index.umd.js" crossorigin></script> | ||
[Skypack documentation](https://docs.skypack.dev/) | ||
For NodeJS (v14.6+): | ||
```text | ||
node --experimental-specifier-resolution=node --experimental-repl-await | ||
> const compose = await import("@thi.ng/compose"); | ||
``` | ||
Package sizes (gzipped, pre-treeshake): ESM: 815 bytes / CJS: 916 bytes / UMD: 955 bytes | ||
Package sizes (gzipped, pre-treeshake): ESM: 836 bytes | ||
@@ -47,0 +55,0 @@ ## Dependencies |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
0
89
Yes
39593
1
32
462
+ Added@thi.ng/api@8.11.14(transitive)
+ Added@thi.ng/errors@2.5.20(transitive)
- Removed@thi.ng/api@7.2.0(transitive)
- Removed@thi.ng/errors@1.3.4(transitive)
Updated@thi.ng/api@^8.0.0
Updated@thi.ng/errors@^2.0.0