@tramvai/test-mocks 5.9.2 → 5.14.9

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.
@@ -3,7 +3,7 @@ import noop from '@tinkoff/utils/function/noop';
3
3
  const createMockEnvManager = (env = {}) => {
4
4
  return {
5
5
  get: (name) => env[name],
6
- getInt: (name, def) => { var _a; return (_a = parseInt(env[name], 10)) !== null && _a !== void 0 ? _a : def; },
6
+ getInt: (name, def) => parseInt(env[name], 10) ?? def,
7
7
  getAll: () => env,
8
8
  update: noop,
9
9
  clientUsed: () => env,
package/lib/envManager.js CHANGED
@@ -11,7 +11,7 @@ var noop__default = /*#__PURE__*/_interopDefaultLegacy(noop);
11
11
  const createMockEnvManager = (env = {}) => {
12
12
  return {
13
13
  get: (name) => env[name],
14
- getInt: (name, def) => { var _a; return (_a = parseInt(env[name], 10)) !== null && _a !== void 0 ? _a : def; },
14
+ getInt: (name, def) => parseInt(env[name], 10) ?? def,
15
15
  getAll: () => env,
16
16
  update: noop__default["default"],
17
17
  clientUsed: () => env,
package/lib/router.es.js CHANGED
@@ -39,7 +39,6 @@ const createMockRouter = ({ currentRoute = { name: 'root', path: '/' }, currentU
39
39
  return route;
40
40
  }
41
41
  commitNavigation(navigation) {
42
- var _a, _b, _c;
43
42
  if (blocked) {
44
43
  blocked = false;
45
44
  return;
@@ -47,9 +46,9 @@ const createMockRouter = ({ currentRoute = { name: 'root', path: '/' }, currentU
47
46
  route = {
48
47
  ...route,
49
48
  name: 'changed-after-navigate',
50
- path: (_b = (_a = navigation.url) === null || _a === void 0 ? void 0 : _a.path) !== null && _b !== void 0 ? _b : route.path,
49
+ path: navigation.url?.path ?? route.path,
51
50
  };
52
- url = (_c = navigation.url) !== null && _c !== void 0 ? _c : url;
51
+ url = navigation.url ?? url;
53
52
  }
54
53
  })({});
55
54
  };
package/lib/router.js CHANGED
@@ -43,7 +43,6 @@ const createMockRouter = ({ currentRoute = { name: 'root', path: '/' }, currentU
43
43
  return route;
44
44
  }
45
45
  commitNavigation(navigation) {
46
- var _a, _b, _c;
47
46
  if (blocked) {
48
47
  blocked = false;
49
48
  return;
@@ -51,9 +50,9 @@ const createMockRouter = ({ currentRoute = { name: 'root', path: '/' }, currentU
51
50
  route = {
52
51
  ...route,
53
52
  name: 'changed-after-navigate',
54
- path: (_b = (_a = navigation.url) === null || _a === void 0 ? void 0 : _a.path) !== null && _b !== void 0 ? _b : route.path,
53
+ path: navigation.url?.path ?? route.path,
55
54
  };
56
- url = (_c = navigation.url) !== null && _c !== void 0 ? _c : url;
55
+ url = navigation.url ?? url;
57
56
  }
58
57
  })({});
59
58
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/test-mocks",
3
- "version": "5.9.2",
3
+ "version": "5.14.9",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -17,14 +17,14 @@
17
17
  "watch": "tsc -w"
18
18
  },
19
19
  "dependencies": {
20
- "@tramvai/core": "5.9.2",
20
+ "@tramvai/core": "5.14.9",
21
21
  "@tinkoff/pubsub": "0.8.2",
22
- "@tinkoff/router": "0.5.26",
22
+ "@tinkoff/router": "0.5.46",
23
23
  "@tinkoff/url": "0.11.2",
24
- "@tramvai/module-cookie": "5.9.2",
25
- "@tramvai/module-common": "5.9.2",
26
- "@tramvai/state": "5.9.2",
27
- "@tramvai/tokens-common": "5.9.2"
24
+ "@tramvai/module-cookie": "5.14.9",
25
+ "@tramvai/module-common": "5.14.9",
26
+ "@tramvai/state": "5.14.9",
27
+ "@tramvai/tokens-common": "5.14.9"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "@tinkoff/dippy": "0.11.3",