@thi.ng/cache 2.0.8 → 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.
- package/CHANGELOG.md +125 -41
- package/README.md +1 -1
- package/package.json +87 -82
package/CHANGELOG.md
CHANGED
|
@@ -1,85 +1,169 @@
|
|
|
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/cache@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
|
-
|
|
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
|
-
|
|
31
|
+
### [2.0.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/cache@2.0.1) (2021-10-13)
|
|
9
32
|
|
|
33
|
+
#### ♻️ Refactoring
|
|
10
34
|
|
|
35
|
+
- update imports in all tests/pkgs ([effd591](https://github.com/thi-ng/umbrella/commit/effd591))
|
|
36
|
+
- update imports in all pkgs ([5fa2b6f](https://github.com/thi-ng/umbrella/commit/5fa2b6f))
|
|
37
|
+
- add .js suffix for all relative imports
|
|
11
38
|
|
|
39
|
+
# [2.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/cache@2.0.0) (2021-10-12)
|
|
12
40
|
|
|
41
|
+
#### 🛑 Breaking changes
|
|
13
42
|
|
|
14
|
-
|
|
43
|
+
- major update of ALL pkgs (export maps, ESM only) ([0d1d6ea](https://github.com/thi-ng/umbrella/commit/0d1d6ea))
|
|
44
|
+
- BREAKING CHANGE: discontinue CommonJS & UMD versions
|
|
45
|
+
- only ESM modules will be published from now on
|
|
46
|
+
- CJS obsolete due to ESM support in recent versions of node:
|
|
47
|
+
- i.e. launch NodeJS via:
|
|
48
|
+
- `node --experimental-specifier-resolution=node --experimental-repl-await`
|
|
49
|
+
- in the node REPL use `await import(...)` instead of `require()`
|
|
50
|
+
- UMD obsolete due to widespread browser support for ESM
|
|
51
|
+
Also:
|
|
52
|
+
- normalize/restructure/reorg all package.json files
|
|
53
|
+
- cleanup all build scripts, remove obsolete
|
|
54
|
+
- switch from mocha to [@thi.ng/testament](https://github.com/thi-ng/umbrella/tree/main/packages/testament) for all tests
|
|
15
55
|
|
|
56
|
+
#### 🩹 Bug fixes
|
|
16
57
|
|
|
17
|
-
|
|
58
|
+
- minor updates (TS4.4) ([7e91cc2](https://github.com/thi-ng/umbrella/commit/7e91cc2))
|
|
59
|
+
- redeclare, not override inherited class properties
|
|
18
60
|
|
|
19
|
-
|
|
61
|
+
#### ♻️ Refactoring
|
|
20
62
|
|
|
63
|
+
- update imports (transducers) ([09fb93e](https://github.com/thi-ng/umbrella/commit/09fb93e))
|
|
64
|
+
- update imports ([d02461f](https://github.com/thi-ng/umbrella/commit/d02461f))
|
|
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)
|
|
21
67
|
|
|
22
|
-
###
|
|
68
|
+
### [1.0.63](https://github.com/thi-ng/umbrella/tree/@thi.ng/cache@1.0.63) (2020-12-07)
|
|
23
69
|
|
|
24
|
-
|
|
70
|
+
#### ♻️ Refactoring
|
|
25
71
|
|
|
72
|
+
- update type-only imports ([78d3dee](https://github.com/thi-ng/umbrella/commit/78d3dee))
|
|
26
73
|
|
|
27
|
-
###
|
|
74
|
+
### [1.0.58](https://github.com/thi-ng/umbrella/tree/@thi.ng/cache@1.0.58) (2020-09-13)
|
|
28
75
|
|
|
29
|
-
|
|
76
|
+
#### ♻️ Refactoring
|
|
30
77
|
|
|
31
|
-
-
|
|
32
|
-
- CJS obsolete due to ESM support in recent versions of node:
|
|
33
|
-
- i.e. launch NodeJS via:
|
|
34
|
-
- `node --experimental-specifier-resolution=node --experimental-repl-await`
|
|
35
|
-
- in the node REPL use `await import(...)` instead of `require()`
|
|
36
|
-
- UMD obsolete due to widespread browser support for ESM
|
|
78
|
+
- update imports ([7deb862](https://github.com/thi-ng/umbrella/commit/7deb862))
|
|
37
79
|
|
|
38
|
-
|
|
39
|
-
- normalize/restructure/reorg all package.json files
|
|
40
|
-
- cleanup all build scripts, remove obsolete
|
|
41
|
-
- switch from mocha to @thi.ng/testament for all tests
|
|
80
|
+
### [1.0.30](https://github.com/thi-ng/umbrella/tree/@thi.ng/cache@1.0.30) (2020-02-25)
|
|
42
81
|
|
|
82
|
+
#### ♻️ Refactoring
|
|
43
83
|
|
|
84
|
+
- update imports ([0653e1b](https://github.com/thi-ng/umbrella/commit/0653e1b))
|
|
44
85
|
|
|
86
|
+
### [1.0.24](https://github.com/thi-ng/umbrella/tree/@thi.ng/cache@1.0.24) (2019-08-21)
|
|
45
87
|
|
|
88
|
+
#### ♻️ Refactoring
|
|
46
89
|
|
|
90
|
+
- update set(), extract doSetEntry() ([db880fd](https://github.com/thi-ng/umbrella/commit/db880fd))
|
|
47
91
|
|
|
48
|
-
|
|
92
|
+
### [1.0.20](https://github.com/thi-ng/umbrella/tree/@thi.ng/cache@1.0.20) (2019-07-07)
|
|
49
93
|
|
|
50
|
-
|
|
94
|
+
#### ♻️ Refactoring
|
|
51
95
|
|
|
52
|
-
-
|
|
96
|
+
- address TS strictNullChecks flag ([d53056b](https://github.com/thi-ng/umbrella/commit/d53056b))
|
|
53
97
|
|
|
54
|
-
###
|
|
98
|
+
### [1.0.9](https://github.com/thi-ng/umbrella/tree/@thi.ng/cache@1.0.9) (2019-03-10)
|
|
99
|
+
|
|
100
|
+
#### ♻️ Refactoring
|
|
101
|
+
|
|
102
|
+
- update Fn args in various packages ([e453ac3](https://github.com/thi-ng/umbrella/commit/e453ac3))
|
|
103
|
+
|
|
104
|
+
# [1.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/cache@1.0.0) (2019-01-21)
|
|
105
|
+
|
|
106
|
+
#### 🛑 Breaking changes
|
|
55
107
|
|
|
56
108
|
- update package build scripts & outputs, imports in ~50 packages ([b54b703](https://github.com/thi-ng/umbrella/commit/b54b703))
|
|
109
|
+
- BREAKING CHANGE: enabled multi-outputs (ES6 modules, CJS, UMD)
|
|
110
|
+
- build scripts now first build ES6 modules in package root, then call
|
|
111
|
+
`scripts/bundle-module` to build minified CJS & UMD bundles in `/lib`
|
|
112
|
+
- all imports MUST be updated to only refer to package level
|
|
113
|
+
(not individual files anymore). tree shaking in user land will get rid of
|
|
114
|
+
all unused imported symbols.
|
|
115
|
+
|
|
116
|
+
#### 🩹 Bug fixes
|
|
117
|
+
|
|
118
|
+
- TLRU: expected behavior on getSet() ([c3762e9](https://github.com/thi-ng/umbrella/commit/c3762e9))
|
|
119
|
+
|
|
120
|
+
### [0.2.29](https://github.com/thi-ng/umbrella/tree/@thi.ng/cache@0.2.29) (2018-10-17)
|
|
121
|
+
|
|
122
|
+
#### ♻️ Refactoring
|
|
123
|
+
|
|
124
|
+
- update Infinity consts in various packages ([296e1e0](https://github.com/thi-ng/umbrella/commit/296e1e0))
|
|
125
|
+
|
|
126
|
+
### [0.2.18](https://github.com/thi-ng/umbrella/tree/@thi.ng/cache@0.2.18) (2018-08-27)
|
|
127
|
+
|
|
128
|
+
#### ♻️ Refactoring
|
|
129
|
+
|
|
130
|
+
- update iterator methods ([866f3cd](https://github.com/thi-ng/umbrella/commit/866f3cd))
|
|
131
|
+
|
|
132
|
+
### [0.2.16](https://github.com/thi-ng/umbrella/tree/@thi.ng/cache@0.2.16) (2018-08-24)
|
|
133
|
+
|
|
134
|
+
#### ♻️ Refactoring
|
|
135
|
+
|
|
136
|
+
- update/replace deps (iterators => transducers) ([065d78b](https://github.com/thi-ng/umbrella/commit/065d78b))
|
|
57
137
|
|
|
58
|
-
|
|
138
|
+
## [0.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/cache@0.2.0) (2018-04-22)
|
|
59
139
|
|
|
60
|
-
|
|
61
|
-
- build scripts now first build ES6 modules in package root, then call `scripts/bundle-module` to build minified CJS & UMD bundles in `/lib`
|
|
62
|
-
- 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.
|
|
140
|
+
#### 🚀 Features
|
|
63
141
|
|
|
64
|
-
|
|
142
|
+
- add TLRUCache.prune(), fix ensureSize() ([9d53ae3](https://github.com/thi-ng/umbrella/commit/9d53ae3))
|
|
65
143
|
|
|
66
|
-
|
|
144
|
+
#### 🩹 Bug fixes
|
|
67
145
|
|
|
68
|
-
-
|
|
146
|
+
- TLRUCache.get(), add tests, update package ([aa78d77](https://github.com/thi-ng/umbrella/commit/aa78d77))
|
|
147
|
+
- get() now correctly shifts element to back (LRU)
|
|
69
148
|
|
|
70
|
-
|
|
149
|
+
## [0.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/cache@0.1.0) (2018-04-22)
|
|
71
150
|
|
|
72
|
-
|
|
151
|
+
#### 🚀 Features
|
|
73
152
|
|
|
74
|
-
|
|
153
|
+
- add TLRUCache ([574b5d9](https://github.com/thi-ng/umbrella/commit/574b5d9))
|
|
154
|
+
- add MRUCache, update package & readme ([26c4cfd](https://github.com/thi-ng/umbrella/commit/26c4cfd))
|
|
155
|
+
- initial import [@thi.ng/cache](https://github.com/thi-ng/umbrella/tree/main/packages/cache) package ([7bbbfa8](https://github.com/thi-ng/umbrella/commit/7bbbfa8))
|
|
75
156
|
|
|
76
|
-
|
|
157
|
+
#### 🩹 Bug fixes
|
|
77
158
|
|
|
78
|
-
-
|
|
79
|
-
-
|
|
159
|
+
- recompute size in LRUCache.delete(), extract removeEntry() ([c4a9c07](https://github.com/thi-ng/umbrella/commit/c4a9c07))
|
|
160
|
+
- don't insert new val if > maxsize ([3947419](https://github.com/thi-ng/umbrella/commit/3947419))
|
|
80
161
|
|
|
81
|
-
|
|
162
|
+
#### ♻️ Refactoring
|
|
82
163
|
|
|
83
|
-
-
|
|
84
|
-
-
|
|
85
|
-
-
|
|
164
|
+
- make LRU ops O(1), update/remove (some) interfaces ([00ca831](https://github.com/thi-ng/umbrella/commit/00ca831))
|
|
165
|
+
- use Map to index dcons cells
|
|
166
|
+
- update CachOpts (add map ctor option)
|
|
167
|
+
- remove LRUEntry
|
|
168
|
+
- update LRU entries iterator
|
|
169
|
+
- update/extend ICache & LRUCache, update readme ([d37a91e](https://github.com/thi-ng/umbrella/commit/d37a91e))
|
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,89 +1,94 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
"name": "@thi.ng/cache",
|
|
3
|
+
"version": "2.1.2",
|
|
4
|
+
"description": "In-memory cache implementations with ES6 Map-like API and different eviction strategies",
|
|
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/cache#readme",
|
|
14
|
+
"funding": [
|
|
15
|
+
{
|
|
16
|
+
"type": "github",
|
|
17
|
+
"url": "https://github.com/sponsors/postspectacular"
|
|
12
18
|
},
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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/dcons": "^3.1.2",
|
|
39
|
+
"@thi.ng/transducers": "^8.1.2"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@microsoft/api-extractor": "^7.18.19",
|
|
43
|
+
"@thi.ng/testament": "^0.2.2",
|
|
44
|
+
"rimraf": "^3.0.2",
|
|
45
|
+
"tools": "^0.0.1",
|
|
46
|
+
"typedoc": "^0.22.9",
|
|
47
|
+
"typescript": "^4.5.2"
|
|
48
|
+
},
|
|
49
|
+
"keywords": [
|
|
50
|
+
"acceleration",
|
|
51
|
+
"cache",
|
|
52
|
+
"datastructure",
|
|
53
|
+
"lru",
|
|
54
|
+
"map",
|
|
55
|
+
"mru",
|
|
56
|
+
"tlru",
|
|
57
|
+
"ttl",
|
|
58
|
+
"typescript"
|
|
59
|
+
],
|
|
60
|
+
"publishConfig": {
|
|
61
|
+
"access": "public"
|
|
62
|
+
},
|
|
63
|
+
"engines": {
|
|
64
|
+
"node": ">=12.7"
|
|
65
|
+
},
|
|
66
|
+
"files": [
|
|
67
|
+
"*.js",
|
|
68
|
+
"*.d.ts"
|
|
69
|
+
],
|
|
70
|
+
"exports": {
|
|
71
|
+
".": {
|
|
72
|
+
"import": "./index.js"
|
|
40
73
|
},
|
|
41
|
-
"
|
|
42
|
-
|
|
74
|
+
"./api": {
|
|
75
|
+
"import": "./api.js"
|
|
43
76
|
},
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
"cache",
|
|
47
|
-
"datastructure",
|
|
48
|
-
"lru",
|
|
49
|
-
"map",
|
|
50
|
-
"mru",
|
|
51
|
-
"tlru",
|
|
52
|
-
"ttl",
|
|
53
|
-
"typescript"
|
|
54
|
-
],
|
|
55
|
-
"publishConfig": {
|
|
56
|
-
"access": "public"
|
|
77
|
+
"./lru": {
|
|
78
|
+
"import": "./lru.js"
|
|
57
79
|
},
|
|
58
|
-
"
|
|
59
|
-
|
|
80
|
+
"./mru": {
|
|
81
|
+
"import": "./mru.js"
|
|
60
82
|
},
|
|
61
|
-
"
|
|
62
|
-
|
|
63
|
-
|
|
83
|
+
"./tlru": {
|
|
84
|
+
"import": "./tlru.js"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"thi.ng": {
|
|
88
|
+
"related": [
|
|
89
|
+
"associative"
|
|
64
90
|
],
|
|
65
|
-
"
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
"./api": {
|
|
70
|
-
"import": "./api.js"
|
|
71
|
-
},
|
|
72
|
-
"./lru": {
|
|
73
|
-
"import": "./lru.js"
|
|
74
|
-
},
|
|
75
|
-
"./mru": {
|
|
76
|
-
"import": "./mru.js"
|
|
77
|
-
},
|
|
78
|
-
"./tlru": {
|
|
79
|
-
"import": "./tlru.js"
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
"thi.ng": {
|
|
83
|
-
"related": [
|
|
84
|
-
"associative"
|
|
85
|
-
],
|
|
86
|
-
"year": 2018
|
|
87
|
-
},
|
|
88
|
-
"gitHead": "852cd2450617c86d15d18477dc634f17f04202eb"
|
|
89
|
-
}
|
|
91
|
+
"year": 2018
|
|
92
|
+
},
|
|
93
|
+
"gitHead": "e8a7c2a40191b391cef182c2978e5a6c85987a87\n"
|
|
94
|
+
}
|