Skip to content

Commit

Permalink
createWithCache's request param is now required
Browse files Browse the repository at this point in the history
  • Loading branch information
rbshop committed Oct 22, 2024
1 parent f0e1845 commit 19fd3cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/hydrogen/src/cache/create-with-cache.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('createWithCache', () => {
beforeEach(() => {
vi.useFakeTimers();
cache = new InMemoryCache();
withCache = createWithCache({cache, waitUntil});
withCache = createWithCache({cache, waitUntil, request: {headers: {}}});
waitUntil.mockClear();
return () => vi.useRealTimers();
});
Expand Down
4 changes: 2 additions & 2 deletions packages/hydrogen/src/cache/create-with-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ type CreateWithCacheOptions = {
cache: Cache;
/** The `waitUntil` function is used to keep the current request/response lifecycle alive even after a response has been sent. It should be provided by your platform. */
waitUntil: WaitUntil;
/** The `request` object is used to access certain headers for debugging */
request?: CrossRuntimeRequest;
/** The `request` object is used by the Subrequest profiler, and to access certain headers for debugging */
request: CrossRuntimeRequest;
};

type WithCacheRunOptions<T> = {
Expand Down

0 comments on commit 19fd3cf

Please sign in to comment.