@thi.ng/compose 2.0.6 → 2.1.1

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 +100 -88
  2. package/README.md +1 -1
  3. package/juxt.js +1 -1
  4. package/package.json +101 -96
package/CHANGELOG.md CHANGED
@@ -1,146 +1,158 @@
1
1
  # Change Log
2
2
 
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- ## [2.0.6](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@2.0.5...@thi.ng/compose@2.0.6) (2021-10-28)
7
-
8
- **Note:** Version bump only for package @thi.ng/compose
9
-
10
-
11
-
12
-
13
-
14
- ## [2.0.5](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@2.0.4...@thi.ng/compose@2.0.5) (2021-10-28)
15
-
16
- **Note:** Version bump only for package @thi.ng/compose
17
-
18
-
19
-
20
-
3
+ - **Last updated**: 2021-11-19T07:59:50Z
4
+ - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
21
5
 
22
- ## [2.0.4](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@2.0.3...@thi.ng/compose@2.0.4) (2021-10-25)
23
-
24
- **Note:** Version bump only for package @thi.ng/compose
25
-
26
-
27
-
28
-
29
-
30
- ## [2.0.3](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@2.0.2...@thi.ng/compose@2.0.3) (2021-10-15)
31
-
32
- **Note:** Version bump only for package @thi.ng/compose
33
-
34
-
35
-
36
-
37
-
38
- ## [2.0.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@2.0.1...@thi.ng/compose@2.0.2) (2021-10-15)
6
+ All notable changes to this project will be documented in this file.
7
+ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelines.
39
8
 
40
- **Note:** Version bump only for package @thi.ng/compose
9
+ **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
10
+ and/or version bumps of transitive dependencies.
41
11
 
12
+ ## [2.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/compose@2.1.0) (2021-11-17)
42
13
 
14
+ #### 🚀 Features
43
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
44
21
 
22
+ #### ♻️ Refactoring
45
23
 
46
- ## [2.0.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/compose@2.0.0...@thi.ng/compose@2.0.1) (2021-10-13)
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.
47
30
 
48
- **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)
49
32
 
33
+ #### ♻️ Refactoring
50
34
 
35
+ - update all countdown loops ([a5f374b](https://github.com/thi-ng/umbrella/commit/a5f374b))
51
36
 
37
+ ### [2.0.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/compose@2.0.1) (2021-10-13)
52
38
 
39
+ #### ♻️ Refactoring
53
40
 
54
- # [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
55
44
 
45
+ # [2.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/compose@2.0.0) (2021-10-12)
56
46
 
57
- ### Build System
47
+ #### 🛑 Breaking changes
58
48
 
59
- * 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
60
61
 
62
+ #### ♻️ Refactoring
61
63
 
62
- ### 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)
63
67
 
64
- * discontinue CommonJS & UMD versions
68
+ ### [1.4.17](https://github.com/thi-ng/umbrella/tree/@thi.ng/compose@1.4.17) (2020-09-13)
65
69
 
66
- - only ESM modules will be published from now on
67
- - CJS obsolete due to ESM support in recent versions of node:
68
- - i.e. launch NodeJS via:
69
- - `node --experimental-specifier-resolution=node --experimental-repl-await`
70
- - in the node REPL use `await import(...)` instead of `require()`
71
- - UMD obsolete due to widespread browser support for ESM
70
+ #### ♻️ Refactoring
72
71
 
73
- Also:
74
- - normalize/restructure/reorg all package.json files
75
- - cleanup all build scripts, remove obsolete
76
- - 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))
77
73
 
74
+ ## [1.4.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/compose@1.4.0) (2020-03-28)
78
75
 
76
+ #### 🚀 Features
79
77
 
78
+ - add promisify() ([dfcf4ab](https://github.com/thi-ng/umbrella/commit/dfcf4ab))
80
79
 
80
+ ### [1.3.9](https://github.com/thi-ng/umbrella/tree/@thi.ng/compose@1.3.9) (2020-02-25)
81
81
 
82
+ #### ♻️ Refactoring
82
83
 
83
- # [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))
84
85
 
85
- ### Features
86
+ ## [1.3.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/compose@1.3.0) (2019-07-07)
86
87
 
87
- - **compose:** add promisify() ([dfcf4ab](https://github.com/thi-ng/umbrella/commit/dfcf4ab7333b25c4332f783d124d86de058feceb))
88
+ #### 🚀 Features
88
89
 
89
- # [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))
90
94
 
91
- ### Features
95
+ ## [1.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/compose@1.2.0) (2019-03-10)
92
96
 
93
- - **compose:** add ifDef() ([64aba00](https://github.com/thi-ng/umbrella/commit/64aba00))
94
- - **compose:** address TS strictNullChecks, make Delay.value protected ([1540f37](https://github.com/thi-ng/umbrella/commit/1540f37))
95
- - **compose:** enable TS strict compiler flags (refactor) ([8ea894a](https://github.com/thi-ng/umbrella/commit/8ea894a))
97
+ #### 🚀 Features
96
98
 
97
- # [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))
98
101
 
99
- ### Features
102
+ #### ♻️ Refactoring
100
103
 
101
- - **compose:** add complement() ([5a5a2d1](https://github.com/thi-ng/umbrella/commit/5a5a2d1))
102
- - **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))
103
106
 
104
- # [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)
105
108
 
106
- ### Bug Fixes
109
+ #### 🚀 Features
107
110
 
108
- - **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()
109
116
 
110
- ### Features
117
+ #### 🩹 Bug fixes
111
118
 
112
- - **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))
113
120
 
114
- # [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)
115
122
 
116
- ### Build System
123
+ #### 🛑 Breaking changes
117
124
 
118
- - update package build scripts & outputs, imports in ~50 packages ([b54b703](https://github.com/thi-ng/umbrella/commit/b54b703))
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.
119
132
 
120
- ### BREAKING CHANGES
133
+ #### ♻️ Refactoring
121
134
 
122
- - enabled multi-outputs (ES6 modules, CJS, UMD)
123
- - build scripts now first build ES6 modules in package root, then call `scripts/bundle-module` to build minified CJS & UMD bundles in `/lib`
124
- - 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))
125
136
 
126
- # [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)
127
138
 
128
- ### Bug Fixes
139
+ #### 🚀 Features
129
140
 
130
- - **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))
131
142
 
132
- ### Features
143
+ #### 🩹 Bug fixes
133
144
 
134
- - **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))
135
146
 
136
- # [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)
137
148
 
138
- ### Features
149
+ #### 🚀 Features
139
150
 
140
- - **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))
141
152
 
142
- # 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)
143
154
 
144
- ### Features
155
+ #### 🚀 Features
145
156
 
146
- - **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.6",
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.1",
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.1",
38
+ "@thi.ng/errors": "^2.1.1"
39
+ },
40
+ "devDependencies": {
41
+ "@microsoft/api-extractor": "^7.18.19",
42
+ "@thi.ng/testament": "^0.2.1",
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.0.6",
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": "c17a556ad25f6882dfa8f806a1d9e8ed7ac7cd71"
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": "8bd27c8bde0b770e7c001943f11c951cd345d668\n"
109
+ }