@komaci/prefetch 250.0.1 → 250.0.2

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
  });
@@ -278,6 +278,7 @@ export class PrefetchService {
278
278
  WireSlowRunningTimeout: 30 * 1000,
279
279
  usePhaseGrouping: this.config.usePhaseGrouping,
280
280
  usePromisifiedHold: this.config.usePromisifiedHold,
281
+ skipUniqueCheck: this.config.skipUniqueCheck,
281
282
  };
282
283
  bulkResolutionGroup.bulkResolver = getBulkAdgResolver(adgFn, adgInputs, bulkResolutionStatusCbs, environmentCfg, { prefetchId: this._prefetchId, bulkResolverId: bulkResolverId });
283
284
  this.resolutionGroups.push(bulkResolutionGroup);
@@ -90,5 +90,9 @@ export declare type PrefetchConfig<TAddress = PageReference> = {
90
90
  * use a promise instead of a timeout for holding queue
91
91
  */
92
92
  usePromisifiedHold?: boolean;
93
+ /**
94
+ * Skips checking whether or not an adg composition is unique
95
+ */
96
+ skipUniqueCheck?: boolean;
93
97
  };
94
98
  //# sourceMappingURL=prefetchTypes.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@komaci/prefetch",
3
- "version": "250.0.1",
3
+ "version": "250.0.2",
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": "250.0.1",
30
- "@komaci/resolver": "250.0.1",
29
+ "@komaci/module-shared": "250.0.2",
30
+ "@komaci/resolver": "250.0.2",
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": "250.0.1",
36
+ "@komaci/types": "250.0.2",
37
37
  "wait-for-expect": "^3.0.2"
38
38
  }
39
39
  }