@komaci/prefetch 252.0.4 → 252.0.5

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.
@@ -55,7 +55,7 @@ describe('prefetchService', () => {
55
55
  expect(service.getState()).toBe('done');
56
56
  });
57
57
  });
58
- it('calls bulkResolver with adgInput', async () => {
58
+ it('calls bulkResolver with adgInput & expected resolver config', async () => {
59
59
  expect.assertions(3);
60
60
  const routingResult = defaultRoutingResult(pageRef);
61
61
  const { viewset = {} } = routingResult;
@@ -67,7 +67,10 @@ describe('prefetchService', () => {
67
67
  }
68
68
  const adgFn = (await (adgModulesImporter === null || adgModulesImporter === void 0 ? void 0 : adgModulesImporter())).default;
69
69
  const { createRouter } = setupRouterMock(() => routingResult);
70
- const setup = setupPrefetch(createRouter, [pageRef], mockPrefetchConfig);
70
+ const setup = setupPrefetch(createRouter, [pageRef], {
71
+ ...mockPrefetchConfig,
72
+ skipUniqueCheck: true,
73
+ });
71
74
  setup.run();
72
75
  const mockGetBulkAdgResolver = jest.spyOn(ResolverApi, 'getBulkAdgResolver');
73
76
  await waitForExpect(() => {
@@ -85,6 +88,7 @@ describe('prefetchService', () => {
85
88
  MaxResolutionDepth: 512,
86
89
  WireTimeout: 180 * 1000,
87
90
  WireSlowRunningTimeout: 30 * 1000,
91
+ skipUniqueCheck: true,
88
92
  }, expect.anything());
89
93
  expect(mockGetBulkAdgResolver.mock.calls[0][1]).toHaveLength(1);
90
94
  });
@@ -279,6 +279,7 @@ export class PrefetchService {
279
279
  usePhaseGrouping: this.config.usePhaseGrouping,
280
280
  usePromisifiedHold: this.config.usePromisifiedHold,
281
281
  WireCtx: this.config.WireCtx,
282
+ skipUniqueCheck: this.config.skipUniqueCheck,
282
283
  };
283
284
  bulkResolutionGroup.bulkResolver = getBulkAdgResolver(adgFn, adgInputs, bulkResolutionStatusCbs, environmentCfg, { prefetchId: this._prefetchId, bulkResolverId: bulkResolverId });
284
285
  this.resolutionGroups.push(bulkResolutionGroup);
@@ -95,5 +95,9 @@ export declare type PrefetchConfig<TAddress = PageReference> = {
95
95
  * Wire context. Use it to pass a cachePolicy, for example.
96
96
  */
97
97
  WireCtx?: AdapterRequestContext;
98
+ /**
99
+ * Skips checking whether or not an adg composition is unique
100
+ */
101
+ skipUniqueCheck?: boolean;
98
102
  };
99
103
  //# sourceMappingURL=prefetchTypes.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@komaci/prefetch",
3
- "version": "252.0.4",
3
+ "version": "252.0.5",
4
4
  "description": "Komaci prefetch service.",
5
5
  "homepage": "https://komaci.dev/",
6
6
  "repository": {
@@ -26,14 +26,14 @@
26
26
  "build/**/*.d.ts"
27
27
  ],
28
28
  "dependencies": {
29
- "@komaci/module-shared": "252.0.4",
30
- "@komaci/resolver": "252.0.4",
29
+ "@komaci/module-shared": "252.0.5",
30
+ "@komaci/resolver": "252.0.5",
31
31
  "@lwrjs/router": "0.6.0-alpha.15",
32
32
  "o11y": "^244.0.0",
33
33
  "o11y_schema": "244.21.0"
34
34
  },
35
35
  "devDependencies": {
36
- "@komaci/types": "252.0.4",
36
+ "@komaci/types": "252.0.5",
37
37
  "wait-for-expect": "^3.0.2"
38
38
  }
39
39
  }