@tramvai/module-dns-cache 7.0.2 → 7.1.0

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/lib/server.es.js CHANGED
@@ -31,8 +31,8 @@ const TramvaiDnsCacheModule = declareModule({
31
31
  return interceptors.dns({
32
32
  maxTTL,
33
33
  maxItems,
34
- // TODO: wait for https://github.com/nodejs/undici/pull/4589 release
35
- // storage,
34
+ // https://github.com/nodejs/undici/pull/4589
35
+ storage,
36
36
  });
37
37
  },
38
38
  deps: {
@@ -173,6 +173,9 @@ const TramvaiDnsCacheModule = declareModule({
173
173
  full: () => {
174
174
  return false;
175
175
  },
176
+ get size() {
177
+ return cache.size;
178
+ },
176
179
  };
177
180
  return adapter;
178
181
  },
package/lib/server.js CHANGED
@@ -43,8 +43,8 @@ const TramvaiDnsCacheModule = core.declareModule({
43
43
  return undici.interceptors.dns({
44
44
  maxTTL,
45
45
  maxItems,
46
- // TODO: wait for https://github.com/nodejs/undici/pull/4589 release
47
- // storage,
46
+ // https://github.com/nodejs/undici/pull/4589
47
+ storage,
48
48
  });
49
49
  },
50
50
  deps: {
@@ -185,6 +185,9 @@ const TramvaiDnsCacheModule = core.declareModule({
185
185
  full: () => {
186
186
  return false;
187
187
  },
188
+ get size() {
189
+ return cache.size;
190
+ },
188
191
  };
189
192
  return adapter;
190
193
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/module-dns-cache",
3
- "version": "7.0.2",
3
+ "version": "7.1.0",
4
4
  "description": "DNS lookup cache",
5
5
  "browser": "lib/browser.js",
6
6
  "main": "lib/server.js",
@@ -24,11 +24,11 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@tinkoff/utils": "^2.1.2",
27
- "@tramvai/core": "7.0.2",
28
- "@tramvai/tokens-common": "7.0.2",
29
- "@tramvai/tokens-http-client": "7.0.2",
27
+ "@tramvai/core": "7.1.0",
28
+ "@tramvai/tokens-common": "7.1.0",
29
+ "@tramvai/tokens-http-client": "7.1.0",
30
30
  "cacheable-lookup": "^7.0.0",
31
- "undici": "^7.16.0"
31
+ "undici": "^7.18.2"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "tslib": "^2.4.0"