Open greenkeeper[bot] opened 6 years ago
Update to this version instead π
Developers who use Workbox to generate their service worker (using the CLI, Node interface, or webpack plugin) can now take advantage of some additional options:
Setting offlineGoogleAnalytics: true
will automatically add code to initialize Workbox's offline Google Analytics support in the generated service worker.
Both fetchOptions
and matchOptions
can now be used when configuring a runtimeCaching
route, and those values will be passed through when constructing the corresponding Workbox caching strategy. Many thanks to @peterjosling for contributing this in #1608.
Using a custom plugin within a runtimeCaching
route is now possible, thanks to enhancements made by @tsirlucas in #1598.
Here's a snippet of Workbox's build configuration, showing off all of the new features:
{
// ... other options ...
offlineGoogleAnalytics: true,
runtimeCaching: {[
urlPattern: /abc/,
handler: 'staleWhileRevalidate',
options: {
fetchOptions: {
mode: 'no-cors',
},
matchOptions: {
ignoreSearch: true,
},
plugins: [{
cacheDidUpdate: async ({cacheName, request, oldResponse, newResponse}) => {
// Do something in your custom plugin.
},
}],
},
]},
}
PATCH
method in Workbox's routerDevelopers who need to match HTTP PATCH
requests using Workbox's router can now do so, thanks to @kevin-brotcke's change in #1618.
Note that non-GET
requests can't be added to a cache, so this is most useful when used alongside a network-only strategy configured with the Workbox background sync plugin, in order to retry failed PATCH
requests once the network becomes available.
workbox.core.registerQuotaErrorCallback
is now publicly visibleDue to a scoping error, the workbox.core.registerQuotaErrorCallback()
function was previously not exposed. This is now public, matching the documented interface. Thanks to @Tronil for pointing out this discrepancy in #1616.
Check out our docs @ developers.google.com/web/tools/workbox/
devDependency
workbox-webpack-plugin was updated from 2.1.3
to 3.6.1
.Update to this version instead π
disable()
method to workbox.navigationPreload
workbox.navigationPreload
provides an enable()
method to enable navigation preload, but it did not provide a way to disable it (without invoking the underlying service worker APIs). Now developers can call workbox.navigationPreload.disable()
to disable navigation preload. (#1651)method
option can now be used for runtime caching via generateSW()
method
option from being used by runtime caching configuration in generateSW()
. Thanks to @chrisdns, this has been fixed! (#1638)workbox.expiration.Plugin
with purgeOnQuotaError
set to true
would result in an error. Thanks to @salmoro for discovering and fixing the issue! (#1643).event
that triggered them, so developers writing custom plugins could not access any information about the event in those callback. Now all plugin callback are passed the event object (when available). (#1640)workbox-streams
package's strategy()
method is exposed on the browser build of workbox.streams
that gets loaded by the workbox-sw
loader, but it wasn't exported by the module in a way that was accessible to module bundlers. Now it's possible to import {strategy}
from workbox-streams/strategy.mjs
. (#1635).Check out our docs @ developers.google.com/web/tools/workbox/
devDependency
workbox-webpack-plugin was updated from 2.1.3
to 3.6.2
.devDependency
workbox-webpack-plugin was updated from 2.1.3
to 3.6.3
.Update to this version instead π
This release fixes an issue (#1677) that several users have reported, triggered by precaching a URL that returns a 30x redirect to another URL. For instance, having '/index.html'
listed in your precache manifest can trigger this issue, if your web server responds to requests for '/index.html
' with a 301 redirect to the destination URL '/'
. When the issue manifests itself, the final, redirect content ends up being served with an incorrect Content-Type:
response header, which can in turn lead problems displaying that cached content.
If you do use 30x redirects for some of your URLs, we recommend updating to this latest release of Workbox.
In order to "clear out" the problematic content that was previously precached with an incorrect Content-Type
, after updating Workbox, you can deploy a small change to URLs that you know are affected (i.e. make any change to your '/index.html
' file, if that's being fulfilled with a 30x redirect).
It's also possible to force all previously cached entries to be precached again by changing the cacheId
option in "generate SW" mode, or by including
workbox.core.setCacheNameDetails({precache: 'my-new-id'});
in your service worker source file in "inject manifest" mode.
Check out our docs @ developers.google.com/web/tools/workbox/
devDependency
workbox-webpack-plugin was updated from 2.1.3
to 4.0.0
.devDependency
workbox-webpack-plugin was updated from 2.1.3
to 4.1.0
.Update to this version instead π
The new version differs by 18 commits.
6fd1909
v4.1.0
5e04a62
Prevent onSync infinite loops (#1943)
5e2c4a1
Merge pull request #1941 from GoogleChrome/workbox-window-update
46f1c2b
Resolve getSW correctly after an update is found
eab861f
Merge pull request #1938 from GoogleChrome/fix-bcu-plugin
1b0a5fa
Explicitly check event.request
ea248e7
Merge pull request #1932 from GoogleChrome/bg-sync-array-buffer
b51b6f8
Run eslint or .eslintrc
d822ba9
Update tests/mocks to work after cherry-pick
8b9dc50
Update code and tests to work cross-browser
60a784e
Rename files and fix exports
bd5f411
Merge pull request #1929 from GoogleChrome/skipWaiting-message
a6ad817
Add a message listener when skipWaiting: false
b6b1506
Call bind() to get the right this in precaching's plugins (#1928)
d76e770
Merge pull request #1922 from GoogleChrome/fix-jsdocs
There are 18 commits in total.
See the full diff
devDependency
workbox-webpack-plugin was updated from 2.1.3
to 4.1.1
.Update to this version instead π
workbox-window
The removeEventListener()
method of the Workbox
class would throw due to an implementation error, this has been fixed. [#1963]
If, at registration time, there was already both an active and waiting service worker with the same script URL as the one being registered, calling getSW()
or messageSW()
after registration would target the active service worker rather than the waiting service worker. The intended behavior is that the target service worker associated with a Workbox
instance is always the most recently registered service worker with a matching script URL. These methods now target the waiting service worker [#1961]
Special thanks to @donavon for contributions that went into this release.
The new version differs by 11 commits.
fb837ca
v4.1.1
e2d5ae8
Add changes from manual lerna bootstrap
493ef61
Merge pull request #1963 from donavon/bugfix/set-remove
122c0d5
Test coverage for removeEventListener
41666a8
change Set.remove to Set.delete
d971e3e
Resolve getSW() to a matching waiting SW (#1961)
121729c
Bump workbox-build deps (#1959)
da6e0f2
Merge pull request #1952 from kaykayehnn/fix-typo
2a1f6ba
Fix JSDoc comment typo
e15877f
Merge pull request #1948 from GoogleChrome/version-updates
91219e1
Update version metadata
See the full diff
devDependency
workbox-webpack-plugin was updated from 2.1.3
to 4.2.0
.Update to this version instead π
The new version differs by 50 commits.
60f99c8
v4.2.0
23be765
Adds cacheNames.prefix and suffix (#2001)
bb78e35
Merge pull request #2000 from GoogleChrome/migrate-streams-tests
10d3568
Update tests to run in a SW env
d478486
Rename files
adef0e2
Merge pull request #1999 from GoogleChrome/migrate-sw-tests
b70cd0d
Update tests to run in a SW env
b637c89
Rename files
2cc0f8b
Merge pull request #1996 from GoogleChrome/migrate-strategies-tests
90756b4
Update tests to run in a SW env
eb73b03
Rename files
76ba317
Merge pull request #1992 from GoogleChrome/migrate-routing-tests
47bf2c0
Update tests to run in a SW env
5b8e1c7
Rename files
cb2eac0
Merge pull request #1991 from GoogleChrome/migrate-range-requests-tests
There are 50 commits in total.
See the full diff
devDependency
workbox-webpack-plugin was updated from 2.1.3
to 4.3.0
.devDependency
workbox-webpack-plugin was updated from 2.1.3
to 4.3.1
.devDependency
workbox-webpack-plugin was updated from 2.1.3
to 5.0.0
.devDependency
workbox-webpack-plugin was updated from 2.1.3
to 5.1.0
.devDependency
workbox-webpack-plugin was updated from 2.1.3
to 5.1.1
.devDependency
workbox-webpack-plugin was updated from 2.1.3
to 5.1.2
.devDependency
workbox-webpack-plugin was updated from 2.1.3
to 5.1.3
.
βοΈ Greenkeeperβs updated Terms of Service will come into effect on April 6th, 2018.
Version 3.0.0 of workbox-webpack-plugin was just published.
The version 3.0.0 is not covered by your current version range.
If you donβt accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.
It might be worth looking into these changes and trying to get this project onto the latest version of workbox-webpack-plugin.
If you have a solid test suite and good coverage, a passing build is a strong indicator that you can take advantage of these changes directly by merging the proposed change into your project. If the build fails or you donβt have such unconditional trust in your tests, this branch is a great starting point for you to work on the update.
FAQ and help
There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those donβt help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new).Your Greenkeeper bot :palm_tree: