@tramvai/module-common 4.4.3 → 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,16 +15,13 @@ const providers = [
15
15
  }
16
16
  return JSON.parse(initialState);
17
17
  }
18
- catch (e) {
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
- });
27
- return {};
18
+ catch (error) {
19
+ // Enrich error information
20
+ if (error instanceof Error) {
21
+ error.event = 'initial-state-parse-error';
22
+ error.initialState = initialState;
23
+ }
24
+ throw error;
28
25
  }
29
26
  },
30
27
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/module-common",
3
- "version": "4.4.3",
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.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",
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.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",
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
  },