@serwist/sw
Advanced tools
Comparing version 9.0.0-preview.11 to 9.0.0-preview.12
@@ -19,5 +19,4 @@ import type { PrecacheEntry, PrecacheRouteOptions } from "@serwist/precaching"; | ||
/** | ||
* An URL that should point to a HTML | ||
* file with which navigation requests for URLs that aren't precached will be fulfilled. | ||
* For more complex cases, consider `@serwist/sw.fallbacks`instead. | ||
* An URL that should point to a HTML file with which navigation requests for URLs that aren't | ||
* precached will be fulfilled. | ||
*/ | ||
@@ -24,0 +23,0 @@ navigateFallback: string; |
@@ -30,10 +30,10 @@ import { precacheAndRoute, PrecacheFallbackPlugin, cleanupOutdatedCaches, createHandlerBoundToURL } from '@serwist/precaching'; | ||
precacheAndRoute(precacheEntries, precacheOptions); | ||
if (cleanupOutdatedCaches$1) cleanupOutdatedCaches(); | ||
if (options.navigateFallback) { | ||
registerRoute(new NavigationRoute(createHandlerBoundToURL(options.navigateFallback), { | ||
allowlist: options.navigateFallbackAllowlist, | ||
denylist: options.navigateFallbackDenylist | ||
})); | ||
} | ||
} | ||
if (cleanupOutdatedCaches$1) cleanupOutdatedCaches(); | ||
if (options.navigateFallback) { | ||
registerRoute(new NavigationRoute(createHandlerBoundToURL(options.navigateFallback), { | ||
allowlist: options.navigateFallbackAllowlist, | ||
denylist: options.navigateFallbackDenylist | ||
})); | ||
} | ||
}; | ||
@@ -40,0 +40,0 @@ |
{ | ||
"name": "@serwist/sw", | ||
"version": "9.0.0-preview.11", | ||
"version": "9.0.0-preview.12", | ||
"type": "module", | ||
@@ -31,13 +31,13 @@ "description": "This module makes it easy to get started with the Serwist service worker libraries.", | ||
"dependencies": { | ||
"@serwist/background-sync": "9.0.0-preview.11", | ||
"@serwist/broadcast-update": "9.0.0-preview.11", | ||
"@serwist/cacheable-response": "9.0.0-preview.11", | ||
"@serwist/core": "9.0.0-preview.11", | ||
"@serwist/expiration": "9.0.0-preview.11", | ||
"@serwist/google-analytics": "9.0.0-preview.11", | ||
"@serwist/navigation-preload": "9.0.0-preview.11", | ||
"@serwist/precaching": "9.0.0-preview.11", | ||
"@serwist/range-requests": "9.0.0-preview.11", | ||
"@serwist/routing": "9.0.0-preview.11", | ||
"@serwist/strategies": "9.0.0-preview.11" | ||
"@serwist/background-sync": "9.0.0-preview.12", | ||
"@serwist/broadcast-update": "9.0.0-preview.12", | ||
"@serwist/cacheable-response": "9.0.0-preview.12", | ||
"@serwist/core": "9.0.0-preview.12", | ||
"@serwist/expiration": "9.0.0-preview.12", | ||
"@serwist/google-analytics": "9.0.0-preview.12", | ||
"@serwist/navigation-preload": "9.0.0-preview.12", | ||
"@serwist/precaching": "9.0.0-preview.12", | ||
"@serwist/range-requests": "9.0.0-preview.12", | ||
"@serwist/routing": "9.0.0-preview.12", | ||
"@serwist/strategies": "9.0.0-preview.12" | ||
}, | ||
@@ -47,4 +47,4 @@ "devDependencies": { | ||
"typescript": "5.4.0-dev.20240206", | ||
"@serwist/constants": "9.0.0-preview.11", | ||
"@serwist/utils": "9.0.0-preview.11" | ||
"@serwist/constants": "9.0.0-preview.12", | ||
"@serwist/utils": "9.0.0-preview.12" | ||
}, | ||
@@ -51,0 +51,0 @@ "peerDependencies": { |
@@ -23,5 +23,4 @@ import type { PrecacheEntry, PrecacheRouteOptions } from "@serwist/precaching"; | ||
/** | ||
* An URL that should point to a HTML | ||
* file with which navigation requests for URLs that aren't precached will be fulfilled. | ||
* For more complex cases, consider `@serwist/sw.fallbacks`instead. | ||
* An URL that should point to a HTML file with which navigation requests for URLs that aren't | ||
* precached will be fulfilled. | ||
*/ | ||
@@ -56,14 +55,14 @@ navigateFallback: string; | ||
precacheAndRoute(precacheEntries, precacheOptions); | ||
} | ||
if (cleanupOutdatedCaches) cleanupOutdatedCachesImpl(); | ||
if (cleanupOutdatedCaches) cleanupOutdatedCachesImpl(); | ||
if (options.navigateFallback) { | ||
registerRoute( | ||
new NavigationRoute(createHandlerBoundToURL(options.navigateFallback), { | ||
allowlist: options.navigateFallbackAllowlist, | ||
denylist: options.navigateFallbackDenylist, | ||
}), | ||
); | ||
if (options.navigateFallback) { | ||
registerRoute( | ||
new NavigationRoute(createHandlerBoundToURL(options.navigateFallback), { | ||
allowlist: options.navigateFallbackAllowlist, | ||
denylist: options.navigateFallbackDenylist, | ||
}), | ||
); | ||
} | ||
} | ||
}; |
Sorry, the diff of this file is not supported yet
30965
627
+ Added@serwist/background-sync@9.0.0-preview.12(transitive)
+ Added@serwist/broadcast-update@9.0.0-preview.12(transitive)
+ Added@serwist/cacheable-response@9.0.0-preview.12(transitive)
+ Added@serwist/core@9.0.0-preview.12(transitive)
+ Added@serwist/expiration@9.0.0-preview.12(transitive)
+ Added@serwist/google-analytics@9.0.0-preview.12(transitive)
+ Added@serwist/navigation-preload@9.0.0-preview.12(transitive)
+ Added@serwist/precaching@9.0.0-preview.12(transitive)
+ Added@serwist/range-requests@9.0.0-preview.12(transitive)
+ Added@serwist/routing@9.0.0-preview.12(transitive)
+ Added@serwist/strategies@9.0.0-preview.12(transitive)
- Removed@serwist/background-sync@9.0.0-preview.11(transitive)
- Removed@serwist/broadcast-update@9.0.0-preview.11(transitive)
- Removed@serwist/cacheable-response@9.0.0-preview.11(transitive)
- Removed@serwist/core@9.0.0-preview.11(transitive)
- Removed@serwist/expiration@9.0.0-preview.11(transitive)
- Removed@serwist/google-analytics@9.0.0-preview.11(transitive)
- Removed@serwist/navigation-preload@9.0.0-preview.11(transitive)
- Removed@serwist/precaching@9.0.0-preview.11(transitive)
- Removed@serwist/range-requests@9.0.0-preview.11(transitive)
- Removed@serwist/routing@9.0.0-preview.11(transitive)
- Removed@serwist/strategies@9.0.0-preview.11(transitive)