@thi.ng/cache 2.0.9 → 2.1.3

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 (2) hide show
  1. package/CHANGELOG.md +119 -43
  2. package/package.json +87 -82
package/CHANGELOG.md CHANGED
@@ -1,93 +1,169 @@
1
1
  # Change Log
2
2
 
3
+ - **Last updated**: 2021-12-13T10:26:00Z
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
5
15
 
6
- ## [2.0.9](https://github.com/thi-ng/umbrella/compare/@thi.ng/cache@2.0.8...@thi.ng/cache@2.0.9) (2021-11-10)
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
7
21
 
8
- **Note:** Version bump only for package @thi.ng/cache
22
+ #### ♻️ Refactoring
9
23
 
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.
10
30
 
31
+ ### [2.0.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/cache@2.0.1) (2021-10-13)
11
32
 
33
+ #### ♻️ Refactoring
12
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
13
38
 
14
- ## [2.0.8](https://github.com/thi-ng/umbrella/compare/@thi.ng/cache@2.0.7...@thi.ng/cache@2.0.8) (2021-11-03)
39
+ # [2.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/cache@2.0.0) (2021-10-12)
15
40
 
16
- **Note:** Version bump only for package @thi.ng/cache
41
+ #### 🛑 Breaking changes
17
42
 
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
18
55
 
56
+ #### 🩹 Bug fixes
19
57
 
58
+ - minor updates (TS4.4) ([7e91cc2](https://github.com/thi-ng/umbrella/commit/7e91cc2))
59
+ - redeclare, not override inherited class properties
20
60
 
61
+ #### ♻️ Refactoring
21
62
 
22
- # [2.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/cache@1.0.94...@thi.ng/cache@2.0.0) (2021-10-12)
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)
23
67
 
68
+ ### [1.0.63](https://github.com/thi-ng/umbrella/tree/@thi.ng/cache@1.0.63) (2020-12-07)
24
69
 
25
- ### Bug Fixes
70
+ #### ♻️ Refactoring
26
71
 
27
- * minor updates (TS4.4) ([7e91cc2](https://github.com/thi-ng/umbrella/commit/7e91cc2b20371d6969f29ec40393d64efb3d9375))
72
+ - update type-only imports ([78d3dee](https://github.com/thi-ng/umbrella/commit/78d3dee))
28
73
 
74
+ ### [1.0.58](https://github.com/thi-ng/umbrella/tree/@thi.ng/cache@1.0.58) (2020-09-13)
29
75
 
30
- ### Build System
76
+ #### ♻️ Refactoring
31
77
 
32
- * major update of ALL pkgs (export maps, ESM only) ([0d1d6ea](https://github.com/thi-ng/umbrella/commit/0d1d6ea9fab2a645d6c5f2bf2591459b939c09b6))
78
+ - update imports ([7deb862](https://github.com/thi-ng/umbrella/commit/7deb862))
33
79
 
80
+ ### [1.0.30](https://github.com/thi-ng/umbrella/tree/@thi.ng/cache@1.0.30) (2020-02-25)
34
81
 
35
- ### BREAKING CHANGES
82
+ #### ♻️ Refactoring
36
83
 
37
- * discontinue CommonJS & UMD versions
84
+ - update imports ([0653e1b](https://github.com/thi-ng/umbrella/commit/0653e1b))
38
85
 
39
- - only ESM modules will be published from now on
40
- - CJS obsolete due to ESM support in recent versions of node:
41
- - i.e. launch NodeJS via:
42
- - `node --experimental-specifier-resolution=node --experimental-repl-await`
43
- - in the node REPL use `await import(...)` instead of `require()`
44
- - UMD obsolete due to widespread browser support for ESM
86
+ ### [1.0.24](https://github.com/thi-ng/umbrella/tree/@thi.ng/cache@1.0.24) (2019-08-21)
45
87
 
46
- Also:
47
- - normalize/restructure/reorg all package.json files
48
- - cleanup all build scripts, remove obsolete
49
- - switch from mocha to @thi.ng/testament for all tests
88
+ #### ♻️ Refactoring
50
89
 
90
+ - update set(), extract doSetEntry() ([db880fd](https://github.com/thi-ng/umbrella/commit/db880fd))
51
91
 
92
+ ### [1.0.20](https://github.com/thi-ng/umbrella/tree/@thi.ng/cache@1.0.20) (2019-07-07)
52
93
 
94
+ #### ♻️ Refactoring
53
95
 
96
+ - address TS strictNullChecks flag ([d53056b](https://github.com/thi-ng/umbrella/commit/d53056b))
54
97
 
98
+ ### [1.0.9](https://github.com/thi-ng/umbrella/tree/@thi.ng/cache@1.0.9) (2019-03-10)
55
99
 
56
- # [1.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/cache@0.2.40...@thi.ng/cache@1.0.0) (2019-01-21)
100
+ #### ♻️ Refactoring
57
101
 
58
- ### Bug Fixes
102
+ - update Fn args in various packages ([e453ac3](https://github.com/thi-ng/umbrella/commit/e453ac3))
59
103
 
60
- - **cache:** TLRU: expected behavior on getSet() ([c3762e9](https://github.com/thi-ng/umbrella/commit/c3762e9))
104
+ # [1.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/cache@1.0.0) (2019-01-21)
61
105
 
62
- ### Build System
106
+ #### 🛑 Breaking changes
63
107
 
64
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))
65
137
 
66
- ### BREAKING CHANGES
138
+ ## [0.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/cache@0.2.0) (2018-04-22)
67
139
 
68
- - enabled multi-outputs (ES6 modules, CJS, UMD)
69
- - build scripts now first build ES6 modules in package root, then call `scripts/bundle-module` to build minified CJS & UMD bundles in `/lib`
70
- - 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
71
141
 
72
- # [0.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/cache@0.1.0...@thi.ng/cache@0.2.0) (2018-04-22)
142
+ - add TLRUCache.prune(), fix ensureSize() ([9d53ae3](https://github.com/thi-ng/umbrella/commit/9d53ae3))
73
143
 
74
- ### Bug Fixes
144
+ #### 🩹 Bug fixes
75
145
 
76
- - **cache:** TLRUCache.get(), add tests, update package ([aa78d77](https://github.com/thi-ng/umbrella/commit/aa78d77))
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)
77
148
 
78
- ### Features
149
+ ## [0.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/cache@0.1.0) (2018-04-22)
79
150
 
80
- - **cache:** add TLRUCache.prune(), fix ensureSize() ([9d53ae3](https://github.com/thi-ng/umbrella/commit/9d53ae3))
151
+ #### 🚀 Features
81
152
 
82
- # 0.1.0 (2018-04-22)
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))
83
156
 
84
- ### Bug Fixes
157
+ #### 🩹 Bug fixes
85
158
 
86
- - **cache:** don't insert new val if > maxsize ([3947419](https://github.com/thi-ng/umbrella/commit/3947419))
87
- - **cache:** recompute size in LRUCache.delete(), extract removeEntry() ([c4a9c07](https://github.com/thi-ng/umbrella/commit/c4a9c07))
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))
88
161
 
89
- ### Features
162
+ #### ♻️ Refactoring
90
163
 
91
- - **cache:** add MRUCache, update package & readme ([26c4cfd](https://github.com/thi-ng/umbrella/commit/26c4cfd))
92
- - **cache:** add TLRUCache ([574b5d9](https://github.com/thi-ng/umbrella/commit/574b5d9))
93
- - **cache:** initial import [@thi](https://github.com/thi).ng/cache package ([7bbbfa8](https://github.com/thi-ng/umbrella/commit/7bbbfa8))
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/package.json CHANGED
@@ -1,89 +1,94 @@
1
1
  {
2
- "name": "@thi.ng/cache",
3
- "version": "2.0.9",
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"
2
+ "name": "@thi.ng/cache",
3
+ "version": "2.1.3",
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
- "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"
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"
35
- },
36
- "dependencies": {
37
- "@thi.ng/api": "^8.2.0",
38
- "@thi.ng/dcons": "^3.0.9",
39
- "@thi.ng/transducers": "^8.0.8"
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.3",
38
+ "@thi.ng/dcons": "^3.1.3",
39
+ "@thi.ng/transducers": "^8.1.3"
40
+ },
41
+ "devDependencies": {
42
+ "@microsoft/api-extractor": "^7.19.2",
43
+ "@thi.ng/testament": "^0.2.3",
44
+ "rimraf": "^3.0.2",
45
+ "tools": "^0.0.1",
46
+ "typedoc": "^0.22.10",
47
+ "typescript": "^4.5.3"
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
- "devDependencies": {
42
- "@thi.ng/testament": "^0.1.6"
74
+ "./api": {
75
+ "import": "./api.js"
43
76
  },
44
- "keywords": [
45
- "acceleration",
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
- "engines": {
59
- "node": ">=12.7"
80
+ "./mru": {
81
+ "import": "./mru.js"
60
82
  },
61
- "files": [
62
- "*.js",
63
- "*.d.ts"
83
+ "./tlru": {
84
+ "import": "./tlru.js"
85
+ }
86
+ },
87
+ "thi.ng": {
88
+ "related": [
89
+ "associative"
64
90
  ],
65
- "exports": {
66
- ".": {
67
- "import": "./index.js"
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": "5fe52419af63984ebe53032201b2a6174b9cb159"
89
- }
91
+ "year": 2018
92
+ },
93
+ "gitHead": "2db9dd34c0c2c60cbfde3dad0bca352b20292f5c\n"
94
+ }