@trackunit/react-core-contexts-test 1.16.9 → 1.17.0

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.
package/index.cjs2.js CHANGED
@@ -18,20 +18,20 @@ var reactRouter = require('@tanstack/react-router');
18
18
  var graphql = require('graphql');
19
19
 
20
20
  function _interopNamespaceDefault(e) {
21
- var n = Object.create(null);
22
- if (e) {
23
- Object.keys(e).forEach(function (k) {
24
- if (k !== 'default') {
25
- var d = Object.getOwnPropertyDescriptor(e, k);
26
- Object.defineProperty(n, k, d.get ? d : {
27
- enumerable: true,
28
- get: function () { return e[k]; }
21
+ var n = Object.create(null);
22
+ if (e) {
23
+ Object.keys(e).forEach(function (k) {
24
+ if (k !== 'default') {
25
+ var d = Object.getOwnPropertyDescriptor(e, k);
26
+ Object.defineProperty(n, k, d.get ? d : {
27
+ enumerable: true,
28
+ get: function () { return e[k]; }
29
+ });
30
+ }
29
31
  });
30
- }
31
- });
32
- }
33
- n.default = e;
34
- return Object.freeze(n);
32
+ }
33
+ n.default = e;
34
+ return Object.freeze(n);
35
35
  }
36
36
 
37
37
  var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
@@ -13582,10 +13582,10 @@ const TestErrorComponent = ({ error }) => {
13582
13582
  */
13583
13583
  const RouterContainer = ({ addTestRootContainer, selectedRouterProps, rootRoute, children, }) => {
13584
13584
  const client = react.useApolloClient();
13585
- // The current version of createMemoryHistory seem to have issues when NOT ending on / so adding a # will not effect what url is rendered but it seems to work
13586
13585
  const memoryHistory = React.useRef(reactRouter.createMemoryHistory({
13587
- initialEntries: selectedRouterProps?.initialEntries?.reverse().map(entry => entry.path + "#") ?? ["/#"],
13588
- initialIndex: 0,
13586
+ initialEntries: selectedRouterProps?.initialEntries
13587
+ ? [...selectedRouterProps.initialEntries].reverse().map(entry => entry.path)
13588
+ : ["/"],
13589
13589
  }));
13590
13590
  const addTestRootContainerRef = React.useRef(addTestRootContainer);
13591
13591
  React.useEffect(() => {
@@ -14490,7 +14490,7 @@ const mergeDeepVars = (defaults, overrides) => {
14490
14490
  * assetId: "assetId",
14491
14491
  * });
14492
14492
  *
14493
- * AssetRuntime.getAssetInfo = jest.fn().mockResolvedValue({ assetId: "assetId" });
14493
+ * AssetRuntime.getAssetInfo = vi.fn().mockResolvedValue({ assetId: "assetId" });
14494
14494
  * await trackunitProviders()
14495
14495
  * .apollo([mock])
14496
14496
  * .render(<App />);
package/index.esm2.js CHANGED
@@ -13560,10 +13560,10 @@ const TestErrorComponent = ({ error }) => {
13560
13560
  */
13561
13561
  const RouterContainer = ({ addTestRootContainer, selectedRouterProps, rootRoute, children, }) => {
13562
13562
  const client = useApolloClient();
13563
- // The current version of createMemoryHistory seem to have issues when NOT ending on / so adding a # will not effect what url is rendered but it seems to work
13564
13563
  const memoryHistory = useRef(createMemoryHistory({
13565
- initialEntries: selectedRouterProps?.initialEntries?.reverse().map(entry => entry.path + "#") ?? ["/#"],
13566
- initialIndex: 0,
13564
+ initialEntries: selectedRouterProps?.initialEntries
13565
+ ? [...selectedRouterProps.initialEntries].reverse().map(entry => entry.path)
13566
+ : ["/"],
13567
13567
  }));
13568
13568
  const addTestRootContainerRef = useRef(addTestRootContainer);
13569
13569
  useEffect(() => {
@@ -14468,7 +14468,7 @@ const mergeDeepVars = (defaults, overrides) => {
14468
14468
  * assetId: "assetId",
14469
14469
  * });
14470
14470
  *
14471
- * AssetRuntime.getAssetInfo = jest.fn().mockResolvedValue({ assetId: "assetId" });
14471
+ * AssetRuntime.getAssetInfo = vi.fn().mockResolvedValue({ assetId: "assetId" });
14472
14472
  * await trackunitProviders()
14473
14473
  * .apollo([mock])
14474
14474
  * .render(<App />);
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@trackunit/react-core-contexts-test",
3
- "version": "1.16.9",
3
+ "version": "1.17.0",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
7
7
  "node": ">=24.x"
8
8
  },
9
9
  "dependencies": {
10
- "@trackunit/shared-utils": "1.14.9",
10
+ "@trackunit/shared-utils": "1.15.0",
11
11
  "@tanstack/router-core": "1.114.29",
12
- "@trackunit/iris-app-runtime-core-api": "1.15.9",
13
- "@trackunit/react-core-contexts-api": "1.16.9",
12
+ "@trackunit/iris-app-runtime-core-api": "1.16.0",
13
+ "@trackunit/react-core-contexts-api": "1.17.0",
14
14
  "es-toolkit": "^1.39.10"
15
15
  },
16
16
  "peerDependencies": {
@@ -29,7 +29,7 @@ export type PickDeepPartialNullable<TValue, TKeys extends keyof TValue> = {
29
29
  * assetId: "assetId",
30
30
  * });
31
31
  *
32
- * AssetRuntime.getAssetInfo = jest.fn().mockResolvedValue({ assetId: "assetId" });
32
+ * AssetRuntime.getAssetInfo = vi.fn().mockResolvedValue({ assetId: "assetId" });
33
33
  * await trackunitProviders()
34
34
  * .apollo([mock])
35
35
  * .render(<App />);