@tramvai/module-common 4.4.1 → 4.4.4

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.
@@ -15,24 +15,13 @@ const providers = [
15
15
  }
16
16
  return JSON.parse(initialState);
17
17
  }
18
- catch (e) {
19
- if (window.logger) {
20
- const log = window.logger('tramvai-state');
21
- log.error({
22
- event: 'initial-state-parse-error',
23
- error: e,
24
- initialState,
25
- });
18
+ catch (error) {
19
+ // Enrich error information
20
+ if (error instanceof Error) {
21
+ error.event = 'initial-state-parse-error';
22
+ error.initialState = initialState;
26
23
  }
27
- else {
28
- // if logger is not ready, we still can log this error in inline scripts with error interceptors.
29
- // force unhandled promise reject, because we don't need to break application here with sync error.
30
- // eslint-disable-next-line promise/catch-or-return
31
- Promise.resolve().then(() => {
32
- throw Object.assign(e, { initialState, event: 'initial-state-parse-error' });
33
- });
34
- }
35
- return {};
24
+ throw error;
36
25
  }
37
26
  },
38
27
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/module-common",
3
- "version": "4.4.1",
3
+ "version": "4.4.4",
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.1",
40
- "@tramvai/experiments": "4.4.1",
41
- "@tramvai/module-cookie": "4.4.1",
42
- "@tramvai/module-environment": "4.4.1",
43
- "@tramvai/module-log": "4.4.1",
44
- "@tramvai/tokens-child-app": "4.4.1",
45
- "@tramvai/tokens-core-private": "4.4.1",
46
- "@tramvai/tokens-common": "4.4.1",
47
- "@tramvai/tokens-render": "4.4.1",
48
- "@tramvai/tokens-router": "4.4.1",
49
- "@tramvai/tokens-server-private": "4.4.1",
50
- "@tramvai/types-actions-state-context": "4.4.1",
40
+ "@tramvai/experiments": "4.4.4",
41
+ "@tramvai/module-cookie": "4.4.4",
42
+ "@tramvai/module-environment": "4.4.4",
43
+ "@tramvai/module-log": "4.4.4",
44
+ "@tramvai/tokens-child-app": "4.4.4",
45
+ "@tramvai/tokens-core-private": "4.4.4",
46
+ "@tramvai/tokens-common": "4.4.4",
47
+ "@tramvai/tokens-render": "4.4.4",
48
+ "@tramvai/tokens-router": "4.4.4",
49
+ "@tramvai/tokens-server-private": "4.4.4",
50
+ "@tramvai/types-actions-state-context": "4.4.4",
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.2",
56
56
  "@tinkoff/utils": "^2.1.2",
57
- "@tramvai/cli": "4.4.1",
58
- "@tramvai/core": "4.4.1",
59
- "@tramvai/papi": "4.4.1",
60
- "@tramvai/react": "4.4.1",
61
- "@tramvai/state": "4.4.1",
62
- "@tramvai/tokens-server": "4.4.1",
57
+ "@tramvai/cli": "4.4.4",
58
+ "@tramvai/core": "4.4.4",
59
+ "@tramvai/papi": "4.4.4",
60
+ "@tramvai/react": "4.4.4",
61
+ "@tramvai/state": "4.4.4",
62
+ "@tramvai/tokens-server": "4.4.4",
63
63
  "react": ">=16.14.0",
64
64
  "tslib": "^2.4.0"
65
65
  },