@tramvai/module-common 4.33.2 → 4.33.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.
@@ -24,7 +24,8 @@ AsyncLocalStorageModule = __decorate([
24
24
  app.addHook('onRequest', (req, reply, done) => {
25
25
  storage.run({}, done);
26
26
  });
27
- // prevent memory leaks
27
+ // prevent memory leaks, because async context can be destroyed after response,
28
+ // all stored resources will be accumulated in memory, and peak memory allocation will be high
28
29
  app.addHook('onResponse', () => {
29
30
  const store = storage.getStore();
30
31
  if (store) {
@@ -28,7 +28,8 @@ exports.AsyncLocalStorageModule = tslib.__decorate([
28
28
  app.addHook('onRequest', (req, reply, done) => {
29
29
  storage.run({}, done);
30
30
  });
31
- // prevent memory leaks
31
+ // prevent memory leaks, because async context can be destroyed after response,
32
+ // all stored resources will be accumulated in memory, and peak memory allocation will be high
32
33
  app.addHook('onResponse', () => {
33
34
  const store = storage.getStore();
34
35
  if (store) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/module-common",
3
- "version": "4.33.2",
3
+ "version": "4.33.3",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -37,29 +37,29 @@
37
37
  "@tinkoff/pubsub": "0.7.1",
38
38
  "@tinkoff/url": "0.10.1",
39
39
  "@tramvai/safe-strings": "0.7.2",
40
- "@tramvai/experiments": "4.33.2",
41
- "@tramvai/module-cookie": "4.33.2",
42
- "@tramvai/module-environment": "4.33.2",
43
- "@tramvai/module-log": "4.33.2",
44
- "@tramvai/tokens-child-app": "4.33.2",
45
- "@tramvai/tokens-core-private": "4.33.2",
46
- "@tramvai/tokens-common": "4.33.2",
47
- "@tramvai/tokens-render": "4.33.2",
48
- "@tramvai/tokens-router": "4.33.2",
49
- "@tramvai/tokens-server-private": "4.33.2",
50
- "@tramvai/types-actions-state-context": "4.33.2",
40
+ "@tramvai/experiments": "4.33.3",
41
+ "@tramvai/module-cookie": "4.33.3",
42
+ "@tramvai/module-environment": "4.33.3",
43
+ "@tramvai/module-log": "4.33.3",
44
+ "@tramvai/tokens-child-app": "4.33.3",
45
+ "@tramvai/tokens-core-private": "4.33.3",
46
+ "@tramvai/tokens-common": "4.33.3",
47
+ "@tramvai/tokens-render": "4.33.3",
48
+ "@tramvai/tokens-router": "4.33.3",
49
+ "@tramvai/tokens-server-private": "4.33.3",
50
+ "@tramvai/types-actions-state-context": "4.33.3",
51
51
  "hoist-non-react-statics": "^3.3.1",
52
52
  "node-abort-controller": "^3.0.1"
53
53
  },
54
54
  "peerDependencies": {
55
55
  "@tinkoff/dippy": "0.10.8",
56
56
  "@tinkoff/utils": "^2.1.2",
57
- "@tramvai/cli": "4.33.2",
58
- "@tramvai/core": "4.33.2",
59
- "@tramvai/papi": "4.33.2",
60
- "@tramvai/react": "4.33.2",
61
- "@tramvai/state": "4.33.2",
62
- "@tramvai/tokens-server": "4.33.2",
57
+ "@tramvai/cli": "4.33.3",
58
+ "@tramvai/core": "4.33.3",
59
+ "@tramvai/papi": "4.33.3",
60
+ "@tramvai/react": "4.33.3",
61
+ "@tramvai/state": "4.33.3",
62
+ "@tramvai/tokens-server": "4.33.3",
63
63
  "react": ">=16.14.0",
64
64
  "tslib": "^2.4.0"
65
65
  },