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