| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| README.md | 2017-08-24 | 2.6 kB | |
| Workbox v2.0.0 source code.tar.gz | 2017-08-24 | 288.2 kB | |
| Workbox v2.0.0 source code.zip | 2017-08-24 | 525.7 kB | |
| Totals: 3 Items | 816.4 kB | 0 | |
What's new?
The v2.0.0 introduces a few breaking changes to interfaces, along with bug fixes and new functionality. Please read carefully before upgrading!
Note that all Workbox packages have been tagged with the 2.0.0 version number on npm, regardless of whether they have breaking changes or not.
Breaking changes
workbox-cli
- Move towards using 'workbox' over 'workbox-cli'.
The
workbox-clialias for the command line interface is now deprecated, in favor of the preferredworkboxalias. Usingworkbox-cliwill log a warning message, and it will be removed as an alias in a future release. Developers are encouraged to switch to usingworkboxnow.
workbox-routing
- No longer register a fetch handler for each Router by default
We've made registering a
fetchhandler optional, allowing developers who want more control to use theRouterclass from inside anyfetchhandler. Developers who are using theworkbox-routingmodule directly can callrouter.addFetchListener()to mimic the previous behavior.
workbox-runtime-caching
- Rename cacheWillMatch to cachedResponseWillBeUsed
Developers who have implemented their own Workbox plugins that respond to
cacheWillMatchlifecycle events should rename the method they expose tocachedResponseWillBeUsed. Developers using the pre-made plugins do not need to change anything. - Adds JSDocs for the lifecycle methods, and awaits the return of each.
The underlying
RequestWrapperobject that triggers request lifecycle methods will now alwaysawaitthe methods' return values. No changes should be necessary unless you've implemented your own plugin which returns a Promise and you do not want the RequestWrapper to delay while waiting for it to resolve.
New features
workbox-range-requests
- New library to support Range requests
This allows Workbox to honor the
Range:request header when fulfilling requests for cached resources. This comes up often when playing back cached media content.