@thi.ng/compose 2.0.7 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/CHANGELOG.md +104 -52
  2. package/README.md +1 -1
  3. package/juxt.js +1 -1
  4. package/package.json +101 -96
package/CHANGELOG.md CHANGED
@@ -1,106 +1,158 @@
1
1
  # Change Log
2
2
 
3
+ - **Last updated**: 2021-11-21T17:09:28Z
4
+ - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
+
3
6
  All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
7
+ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelines.
8
+
9
+ **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
10
+ and/or version bumps of transitive dependencies.
11
+
12
+ ## [2.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/compose@2.1.0) (2021-11-17)
13
+
14
+ #### 🚀 Features
15
+
16
+ - Using workspaces for local tools ([bf7a404](https://github.com/thi-ng/umbrella/commit/bf7a404))
17
+ Improving the overall build ergonomics
18
+ - introduced a tools workspaces
19
+ - imported it in all needed packages/examples
20
+ - inclusive project root
21
+
22
+ #### ♻️ Refactoring
5
23
 
6
- ## [2.0.7](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@2.0.6...@thi.ng/compose@2.0.7) (2021-11-03)
24
+ - testrunner to binary ([4ebbbb2](https://github.com/thi-ng/umbrella/commit/4ebbbb2))
25
+ this commit reverts (partly) changes made in:
26
+ ef346d7a8753590dc9094108a3d861a8dbd5dd2c
27
+ overall purpose is better testament ergonomics:
28
+ instead of having to pass NODE_OPTIONS with every invocation
29
+ having a binary to handle this for us.
7
30
 
8
- **Note:** Version bump only for package @thi.ng/compose
31
+ ### [2.0.8](https://github.com/thi-ng/umbrella/tree/@thi.ng/compose@2.0.8) (2021-11-10)
9
32
 
33
+ #### ♻️ Refactoring
10
34
 
35
+ - update all countdown loops ([a5f374b](https://github.com/thi-ng/umbrella/commit/a5f374b))
11
36
 
37
+ ### [2.0.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/compose@2.0.1) (2021-10-13)
12
38
 
39
+ #### ♻️ Refactoring
13
40
 
14
- # [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)
41
+ - update imports in all tests/pkgs ([effd591](https://github.com/thi-ng/umbrella/commit/effd591))
42
+ - update imports in all pkgs ([5fa2b6f](https://github.com/thi-ng/umbrella/commit/5fa2b6f))
43
+ - add .js suffix for all relative imports
15
44
 
45
+ # [2.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/compose@2.0.0) (2021-10-12)
16
46
 
17
- ### Build System
47
+ #### 🛑 Breaking changes
18
48
 
19
- * major update of ALL pkgs (export maps, ESM only) ([0d1d6ea](https://github.com/thi-ng/umbrella/commit/0d1d6ea9fab2a645d6c5f2bf2591459b939c09b6))
49
+ - major update of ALL pkgs (export maps, ESM only) ([0d1d6ea](https://github.com/thi-ng/umbrella/commit/0d1d6ea))
50
+ - BREAKING CHANGE: discontinue CommonJS & UMD versions
51
+ - only ESM modules will be published from now on
52
+ - CJS obsolete due to ESM support in recent versions of node:
53
+ - i.e. launch NodeJS via:
54
+ - `node --experimental-specifier-resolution=node --experimental-repl-await`
55
+ - in the node REPL use `await import(...)` instead of `require()`
56
+ - UMD obsolete due to widespread browser support for ESM
57
+ Also:
58
+ - normalize/restructure/reorg all package.json files
59
+ - cleanup all build scripts, remove obsolete
60
+ - switch from mocha to [@thi.ng/testament](https://github.com/thi-ng/umbrella/tree/main/packages/testament) for all tests
20
61
 
62
+ #### ♻️ Refactoring
21
63
 
22
- ### BREAKING CHANGES
64
+ - update imports ([7e1855c](https://github.com/thi-ng/umbrella/commit/7e1855c))
65
+ - update all tests in _all_ pkgs ([8b582bc](https://github.com/thi-ng/umbrella/commit/8b582bc))
66
+ - update all to use [@thi.ng/testament](https://github.com/thi-ng/umbrella/tree/main/packages/testament)
23
67
 
24
- * discontinue CommonJS & UMD versions
68
+ ### [1.4.17](https://github.com/thi-ng/umbrella/tree/@thi.ng/compose@1.4.17) (2020-09-13)
25
69
 
26
- - only ESM modules will be published from now on
27
- - CJS obsolete due to ESM support in recent versions of node:
28
- - i.e. launch NodeJS via:
29
- - `node --experimental-specifier-resolution=node --experimental-repl-await`
30
- - in the node REPL use `await import(...)` instead of `require()`
31
- - UMD obsolete due to widespread browser support for ESM
70
+ #### ♻️ Refactoring
32
71
 
33
- Also:
34
- - normalize/restructure/reorg all package.json files
35
- - cleanup all build scripts, remove obsolete
36
- - switch from mocha to @thi.ng/testament for all tests
72
+ - update imports, use new Fn types in various pkgs ([ced1e5d](https://github.com/thi-ng/umbrella/commit/ced1e5d))
37
73
 
74
+ ## [1.4.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/compose@1.4.0) (2020-03-28)
38
75
 
76
+ #### 🚀 Features
39
77
 
78
+ - add promisify() ([dfcf4ab](https://github.com/thi-ng/umbrella/commit/dfcf4ab))
40
79
 
80
+ ### [1.3.9](https://github.com/thi-ng/umbrella/tree/@thi.ng/compose@1.3.9) (2020-02-25)
41
81
 
82
+ #### ♻️ Refactoring
42
83
 
43
- # [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)
84
+ - update imports ([252cbab](https://github.com/thi-ng/umbrella/commit/252cbab))
44
85
 
45
- ### Features
86
+ ## [1.3.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/compose@1.3.0) (2019-07-07)
46
87
 
47
- - **compose:** add promisify() ([dfcf4ab](https://github.com/thi-ng/umbrella/commit/dfcf4ab7333b25c4332f783d124d86de058feceb))
88
+ #### 🚀 Features
48
89
 
49
- # [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)
90
+ - add ifDef() ([64aba00](https://github.com/thi-ng/umbrella/commit/64aba00))
91
+ - address TS strictNullChecks, make Delay.value protected ([1540f37](https://github.com/thi-ng/umbrella/commit/1540f37))
92
+ - users now MUST use .deref() to obtain result
93
+ - enable TS strict compiler flags (refactor) ([8ea894a](https://github.com/thi-ng/umbrella/commit/8ea894a))
50
94
 
51
- ### Features
95
+ ## [1.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/compose@1.2.0) (2019-03-10)
52
96
 
53
- - **compose:** add ifDef() ([64aba00](https://github.com/thi-ng/umbrella/commit/64aba00))
54
- - **compose:** address TS strictNullChecks, make Delay.value protected ([1540f37](https://github.com/thi-ng/umbrella/commit/1540f37))
55
- - **compose:** enable TS strict compiler flags (refactor) ([8ea894a](https://github.com/thi-ng/umbrella/commit/8ea894a))
97
+ #### 🚀 Features
56
98
 
57
- # [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)
99
+ - add trampoline() ([9e4c171](https://github.com/thi-ng/umbrella/commit/9e4c171))
100
+ - add complement() ([5a5a2d1](https://github.com/thi-ng/umbrella/commit/5a5a2d1))
58
101
 
59
- ### Features
102
+ #### ♻️ Refactoring
60
103
 
61
- - **compose:** add complement() ([5a5a2d1](https://github.com/thi-ng/umbrella/commit/5a5a2d1))
62
- - **compose:** add trampoline() ([9e4c171](https://github.com/thi-ng/umbrella/commit/9e4c171))
104
+ - update partial() type args, update readme ([81886fe](https://github.com/thi-ng/umbrella/commit/81886fe))
105
+ - update Fn args in various packages ([e453ac3](https://github.com/thi-ng/umbrella/commit/e453ac3))
63
106
 
64
- # [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)
107
+ ## [1.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/compose@1.1.0) (2019-02-15)
65
108
 
66
- ### Bug Fixes
109
+ #### 🚀 Features
67
110
 
68
- - **compose:** add varargs override for jux(), add tests ([e9d57fc](https://github.com/thi-ng/umbrella/commit/e9d57fc))
111
+ - add new functions ([dd13fa9](https://github.com/thi-ng/umbrella/commit/dd13fa9))
112
+ - add constantly()
113
+ - add delay()
114
+ - add delayed()
115
+ - add identity()
69
116
 
70
- ### Features
117
+ #### 🩹 Bug fixes
71
118
 
72
- - **compose:** add new functions ([dd13fa9](https://github.com/thi-ng/umbrella/commit/dd13fa9))
119
+ - add varargs override for jux(), add tests ([e9d57fc](https://github.com/thi-ng/umbrella/commit/e9d57fc))
73
120
 
74
- # [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)
121
+ # [1.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/compose@1.0.0) (2019-01-21)
75
122
 
76
- ### Build System
123
+ #### 🛑 Breaking changes
77
124
 
78
125
  - update package build scripts & outputs, imports in ~50 packages ([b54b703](https://github.com/thi-ng/umbrella/commit/b54b703))
126
+ - BREAKING CHANGE: enabled multi-outputs (ES6 modules, CJS, UMD)
127
+ - build scripts now first build ES6 modules in package root, then call
128
+ `scripts/bundle-module` to build minified CJS & UMD bundles in `/lib`
129
+ - all imports MUST be updated to only refer to package level
130
+ (not individual files anymore). tree shaking in user land will get rid of
131
+ all unused imported symbols.
79
132
 
80
- ### BREAKING CHANGES
133
+ #### ♻️ Refactoring
81
134
 
82
- - enabled multi-outputs (ES6 modules, CJS, UMD)
83
- - build scripts now first build ES6 modules in package root, then call `scripts/bundle-module` to build minified CJS & UMD bundles in `/lib`
84
- - 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.
135
+ - use arrow fns ([35377bd](https://github.com/thi-ng/umbrella/commit/35377bd))
85
136
 
86
- # [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)
137
+ ## [0.3.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/compose@0.3.0) (2018-12-27)
87
138
 
88
- ### Bug Fixes
139
+ #### 🚀 Features
89
140
 
90
- - **compose:** fix comp() for arities >10 ([1ebfea9](https://github.com/thi-ng/umbrella/commit/1ebfea9))
141
+ - add threadFirst/Last, rename compI => compL ([0061b21](https://github.com/thi-ng/umbrella/commit/0061b21))
91
142
 
92
- ### Features
143
+ #### 🩹 Bug fixes
93
144
 
94
- - **compose:** add threadFirst/Last, rename compI => compL ([0061b21](https://github.com/thi-ng/umbrella/commit/0061b21))
145
+ - fix comp() for arities >10 ([1ebfea9](https://github.com/thi-ng/umbrella/commit/1ebfea9))
95
146
 
96
- # [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)
147
+ ## [0.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/compose@0.2.0) (2018-10-17)
97
148
 
98
- ### Features
149
+ #### 🚀 Features
99
150
 
100
- - **compose:** add partial(), update readme ([6851f2c](https://github.com/thi-ng/umbrella/commit/6851f2c))
151
+ - add partial(), update readme ([6851f2c](https://github.com/thi-ng/umbrella/commit/6851f2c))
101
152
 
102
- # 0.1.0 (2018-08-24)
153
+ ## [0.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/compose@0.1.0) (2018-08-24)
103
154
 
104
- ### Features
155
+ #### 🚀 Features
105
156
 
106
- - **compose:** extract comp() & juxt() to new [@thi](https://github.com/thi).ng/compose package ([ca0a04e](https://github.com/thi-ng/umbrella/commit/ca0a04e))
157
+ - extract comp() & juxt() to new [@thi.ng/compose](https://github.com/thi-ng/umbrella/tree/main/packages/compose) package ([ca0a04e](https://github.com/thi-ng/umbrella/commit/ca0a04e))
158
+ - add compI() using reverse arg order of comp()
package/README.md CHANGED
@@ -50,7 +50,7 @@ node --experimental-repl-await
50
50
  > const compose = await import("@thi.ng/compose");
51
51
  ```
52
52
 
53
- Package sizes (gzipped, pre-treeshake): ESM: 825 bytes
53
+ Package sizes (gzipped, pre-treeshake): ESM: 871 bytes
54
54
 
55
55
  ## Dependencies
56
56
 
package/juxt.js CHANGED
@@ -20,7 +20,7 @@ export function juxt(...fns) {
20
20
  default:
21
21
  return (x) => {
22
22
  let res = new Array(fns.length);
23
- for (let i = fns.length; --i >= 0;) {
23
+ for (let i = fns.length; i-- > 0;) {
24
24
  res[i] = fns[i](x);
25
25
  }
26
26
  return res;
package/package.json CHANGED
@@ -1,104 +1,109 @@
1
1
  {
2
- "name": "@thi.ng/compose",
3
- "version": "2.0.7",
4
- "description": "Optimized functional composition helpers",
5
- "type": "module",
6
- "module": "./index.js",
7
- "typings": "./index.d.ts",
8
- "sideEffects": false,
9
- "repository": {
10
- "type": "git",
11
- "url": "https://github.com/thi-ng/umbrella.git"
2
+ "name": "@thi.ng/compose",
3
+ "version": "2.1.2",
4
+ "description": "Optimized functional composition helpers",
5
+ "type": "module",
6
+ "module": "./index.js",
7
+ "typings": "./index.d.ts",
8
+ "sideEffects": false,
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/thi-ng/umbrella.git"
12
+ },
13
+ "homepage": "https://github.com/thi-ng/umbrella/tree/develop/packages/compose#readme",
14
+ "funding": [
15
+ {
16
+ "type": "github",
17
+ "url": "https://github.com/sponsors/postspectacular"
12
18
  },
13
- "homepage": "https://github.com/thi-ng/umbrella/tree/develop/packages/compose#readme",
14
- "funding": [
15
- {
16
- "type": "github",
17
- "url": "https://github.com/sponsors/postspectacular"
18
- },
19
- {
20
- "type": "patreon",
21
- "url": "https://patreon.com/thing_umbrella"
22
- }
23
- ],
24
- "author": "Karsten Schmidt <k+npm@thi.ng>",
25
- "license": "Apache-2.0",
26
- "scripts": {
27
- "build": "yarn clean && tsc --declaration",
28
- "clean": "rimraf *.js *.d.ts *.map doc",
29
- "doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
30
- "doc:ae": "mkdir -p .ae/doc .ae/temp && node_modules/.bin/api-extractor run --local --verbose",
31
- "doc:readme": "yarn doc:stats && ../../scripts/node-esm ../../tools/src/readme.ts",
32
- "doc:stats": "../../scripts/node-esm ../../tools/src/module-stats.ts",
33
- "pub": "yarn build && yarn publish --access public",
34
- "test": "testament test"
19
+ {
20
+ "type": "patreon",
21
+ "url": "https://patreon.com/thing_umbrella"
22
+ }
23
+ ],
24
+ "author": "Karsten Schmidt <k+npm@thi.ng>",
25
+ "license": "Apache-2.0",
26
+ "scripts": {
27
+ "build": "yarn clean && tsc --declaration",
28
+ "clean": "rimraf '*.js' '*.d.ts' '*.map' doc",
29
+ "doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
30
+ "doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
31
+ "doc:readme": "yarn doc:stats && tools:readme",
32
+ "doc:stats": "tools:module-stats",
33
+ "pub": "yarn npm publish --access public",
34
+ "test": "testament test"
35
+ },
36
+ "dependencies": {
37
+ "@thi.ng/api": "^8.3.2",
38
+ "@thi.ng/errors": "^2.1.2"
39
+ },
40
+ "devDependencies": {
41
+ "@microsoft/api-extractor": "^7.18.19",
42
+ "@thi.ng/testament": "^0.2.2",
43
+ "rimraf": "^3.0.2",
44
+ "tools": "^0.0.1",
45
+ "typedoc": "^0.22.9",
46
+ "typescript": "^4.5.2"
47
+ },
48
+ "keywords": [
49
+ "async",
50
+ "composition",
51
+ "functional",
52
+ "typescript"
53
+ ],
54
+ "publishConfig": {
55
+ "access": "public"
56
+ },
57
+ "engines": {
58
+ "node": ">=12.7"
59
+ },
60
+ "files": [
61
+ "*.js",
62
+ "*.d.ts"
63
+ ],
64
+ "exports": {
65
+ ".": {
66
+ "import": "./index.js"
35
67
  },
36
- "dependencies": {
37
- "@thi.ng/api": "^8.1.0",
38
- "@thi.ng/errors": "^2.0.6"
68
+ "./comp": {
69
+ "import": "./comp.js"
39
70
  },
40
- "devDependencies": {
41
- "@thi.ng/testament": "^0.1.6"
71
+ "./complement": {
72
+ "import": "./complement.js"
42
73
  },
43
- "keywords": [
44
- "async",
45
- "composition",
46
- "functional",
47
- "typescript"
48
- ],
49
- "publishConfig": {
50
- "access": "public"
74
+ "./constantly": {
75
+ "import": "./constantly.js"
51
76
  },
52
- "engines": {
53
- "node": ">=12.7"
77
+ "./delay": {
78
+ "import": "./delay.js"
54
79
  },
55
- "files": [
56
- "*.js",
57
- "*.d.ts"
58
- ],
59
- "exports": {
60
- ".": {
61
- "import": "./index.js"
62
- },
63
- "./comp": {
64
- "import": "./comp.js"
65
- },
66
- "./complement": {
67
- "import": "./complement.js"
68
- },
69
- "./constantly": {
70
- "import": "./constantly.js"
71
- },
72
- "./delay": {
73
- "import": "./delay.js"
74
- },
75
- "./delayed": {
76
- "import": "./delayed.js"
77
- },
78
- "./identity": {
79
- "import": "./identity.js"
80
- },
81
- "./ifdef": {
82
- "import": "./ifdef.js"
83
- },
84
- "./juxt": {
85
- "import": "./juxt.js"
86
- },
87
- "./partial": {
88
- "import": "./partial.js"
89
- },
90
- "./promisify": {
91
- "import": "./promisify.js"
92
- },
93
- "./thread-first": {
94
- "import": "./thread-first.js"
95
- },
96
- "./thread-last": {
97
- "import": "./thread-last.js"
98
- },
99
- "./trampoline": {
100
- "import": "./trampoline.js"
101
- }
80
+ "./delayed": {
81
+ "import": "./delayed.js"
102
82
  },
103
- "gitHead": "852cd2450617c86d15d18477dc634f17f04202eb"
104
- }
83
+ "./identity": {
84
+ "import": "./identity.js"
85
+ },
86
+ "./ifdef": {
87
+ "import": "./ifdef.js"
88
+ },
89
+ "./juxt": {
90
+ "import": "./juxt.js"
91
+ },
92
+ "./partial": {
93
+ "import": "./partial.js"
94
+ },
95
+ "./promisify": {
96
+ "import": "./promisify.js"
97
+ },
98
+ "./thread-first": {
99
+ "import": "./thread-first.js"
100
+ },
101
+ "./thread-last": {
102
+ "import": "./thread-last.js"
103
+ },
104
+ "./trampoline": {
105
+ "import": "./trampoline.js"
106
+ }
107
+ },
108
+ "gitHead": "e8a7c2a40191b391cef182c2978e5a6c85987a87\n"
109
+ }