Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update workbox monorepo to v6.5.4 - autoclosed #70

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jun 10, 2021

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
workbox-sw (source) ^6.0.2 -> 6.5.4 age adoption passing confidence
workbox-webpack-plugin (source) ^6.0.2 -> 6.5.4 age adoption passing confidence

Release Notes

googlechrome/workbox

v6.5.4

Compare Source

What's New 👀
  • Webpack plugin can be extended and subclasses can access the config property [#​3056]
  • In workbox-precaching during a fall back to the network, if the request's mode is no-cors, integrity will not be used and the cache entry will not be repaired. [#​3099]
What's fixed 🐛
Misc 🤹
  • updated idb and selenium-assitant versions
Thank yous 🌿

Full Changelog: GoogleChrome/workbox@v6.5.3...v6.5.4

v6.5.3

Compare Source

v6.5.2

Compare Source

Workbox v6.5.2 includes a number of improvements to the TypeScript documentation and exported types, which should in turn improve the generated documentation.

A full changelog is available at GoogleChrome/workbox@v6.5.1...v6.5.2

v6.5.1

Compare Source

The Workbox v6.5.1 release includes a few changes related to our TypeScript interfaces and documentation.

A full changelog is available at GoogleChrome/workbox@v6.5.0...v6.5.1

What's New
  • Additional inline @examples of using our build tools have been added to the TSDocs for workbox-build and workbox-webpack-plugin. [#​3038]
  • The TypeScript type for the generateSW(), injectManifest(), and getManifest() methods in workbox-build has been updated from unknown to an appropriate actual type specific to each method. This should lead to better TSDoc generation and type inferences for developers. As this takes what was previously only a runtime check and moves it to a compile-time check, we believe that it should be functionally equivalent to prior releases, but if you run into problems, please let us know by opening an issue. [#​3037]
What's Fixed
  • We have re-added the default export to workbox-webpack-plugin. [#​3036]

v6.5.0

Compare Source

The Workbox v6.5.0 release includes a number of smaller fixes, as well as a major rewrite of the workbox-webpack-plugin to TypeScript.

A full changelog is available at GoogleChrome/workbox@v6.4.2...v6.5.0

What's New

  • workbox-webpack-plugin has been rewritten in TypeScript, and has public TypeScript definitions for its interfaces published as part of this release. We do not anticipate any changes in the underlying functionality as part of this rewrite. [#​2882]
  • A forceSyncFallback parameter has been added to workbox-background-sync, without changing the default behavior. When forceSyncFallback is explicitly set to true, workbox-background-sync will always attempt to replay queued requests when the service worker starts up and never rely on the sync event listener. Most developers will not need this behavior, but it can be useful when targeting environments that have a non-functional Background Sync implementation, like some Electron runtimes. [#​3020]

What's Fixed

  • A more informative message is returned when an opaque response is erroneously used in workbox-streams. [#​3001]
  • Removed a dynamic method call in workbox-background-sync which could lead to errors when run through with certain aggressive minifiers. [#​3012]
  • A waitUntil() was added to the StaleWhileRevalidate strategy, ensuring that it works properly with navigation preload responses. [#​3015]
  • Removed the dependency on the deprecated source-map-url package. [#​3031]

New Contributors

Thank you to @​roikoren755 for their contributions to the workbox-webpack-plugin TypeScript migration!

v6.4.2

Compare Source

The Workbox v6.4.2 release fixes a few issues:

What's Changed
New Contributors

Full Changelog: GoogleChrome/workbox@v6.4.1...v6.4.2

v6.4.1

Compare Source

The Workbox v6.4.1 release fixes a few issues:

🐛 What's Fixed?

workbox-build
worbox-navigation-preload
  • The inline TypeScript definition for preloadResponse was incorrect, and has been fixed to reflect the previous definition that used to be provided by the TypeScript standard library. [#​2975]
worbox-strategies
  • Take request.url into account in StrategyHandler.getCacheKey(). This ensures if a custom strategy overrides the Strategy._handle() method and performs multiple cache operations on different URLs, the cache key is properly calculated for each distinct URL. [#​2973]

v6.4.0

Compare Source

Workbox v6.4.0 includes:

🎉 What's New?
  • We upgraded to TypeScript 4.4.3. This required us to declare inline some types that are now longer part of the TypeScript standard; see #​2946 for more context. [#​2950]
worbox-background-sync
  • You can check the number of requests in the sync queue with the new method size(). [#​2941]
🐛 What's Fixed?
  • We upgraded @​surma/rollup-plugin-off-main to patch a vulnerability from the dependency. [#​2962]
  • A missing sourcemap is no longer a fatal error when running injectManifest. It returns now returns a warning and continues with execution. [#​2959]
🎁 Thank you

To our new contributors in this version: @​StephanBijzitter and @​fuzail-ahmed!

v6.3.0

Compare Source

Workbox v6.3.0 includes a couple of bug fixes and several new features.

🎉 What's New?
Allow precaching "repair" when using subresource integrity

Although unexpected, there are edge cases where the precache might not be in an inconsistent state, most likely due to a developer manually deleting something in DevTools.

When this happens, workbox-precaching defaults to falling-back to using a network response (assuming the device is online) when there's a precaching miss. Up until now, workbox-precaching hasn't attempting to use this network response to repopulate the precache, because there are no guarantees that the network response corresponds to the version of the asset specified in the precache manifest.

However, if the precache entry includes an integrity property, then subresource integrity guarantees that the response does correspond to the same version of the asset in the manifest. So it should be safe to "repair" the cache with that response. [#​2921]

IDB writes use relaxed durability

This small change to the way Workbox writes to IndexedDB should lead to slightly better performance, without any appreciable downsides. [#​2934]

notifyAllClients option in BroadcastCacheUpdate

BroadcastCacheUpdate uses postMessage() to notify all open tabs controlled by the current service worker about a cache update. This default behavior is not changing.

Setting notifyAllClients: false when configuring BroadcastCacheUpdate and the associated plugin will result in postMessage() only communicating the update to the specific window client that triggered the fetch request which resulted in the cache update. [#​2920]

All WorkboxEvents TypeScript types are now exported

This enhancement makes it easier to use TypeScript to write workbox-window event handlers. [#​2919]

Debug logging when caching responses with Vary: headers

The presence of Vary: headers on a cached Response can make it difficult to properly match and delete cache entries. To make it clearer to developers when this is happening, the development builds of Workbox will now log a message to the console when a Response that's being cached includes a Vary: header. [#​2916]

🐛 What's Fixed?
workbox-cli
  • Update to chokidar dependency, for better node compatibility and to eliminate security warnings. [#​2913]
workbox-precaching
  • Preserve all request headers in PrecacheCacheKeyPlugin. [#​2914]

v6.2.4

Compare Source

🐛 What's Fixed?

  • Passing in functions for onSync and handler in generateSW's runtimeCaching should not fail validation. [#​2911]

v6.2.3

Compare Source

🐛 What's Fixed?

  • Move @types/trusted-types to dependencies of workbox-window [#​2909]

v6.2.2

Compare Source

Workbox v6.2.2 fixes a few bugs introduced in the v6.2.0 release.

🐛 What's Fixed?

  • Validation fix for plugin functions passed to runtimeCaching in the build tools. [#​2901]

  • Ensure that our tsc configuration transpiles newer language features down to the ES2017 target level. [#​2902]

  • Update to our lerna configuration to use the --exact tag when publishing to npm, to ensure that all the mutual dependencies in the monorepo use exact version matches, and not ^ versions. [#​2904]

v6.2.1

Compare Source

v6.2.0

Compare Source

Workbox v6.2.0 includes a number of bug fixes and internal refactoring described below.

Our intention is not to include any breaking changes in v6.2.0, and we've made an effort to maintain the same public interfaces and general behaviors while rewriting some of Workbox's internals.

🎉 What's New?
workbox-build TypeScript rewrite

The workbox-build module has been rewritten in TypeScript, following the earlier migration of the workbox-cli module. (workbox-webpack-plugin has not yet been migrated.) Developers who use workbox-build from their own TypeScript code should benefit from the official, accurate type definitions that are now published alongside workbox-build. [#​2867]

Build tool option validation

As part of this change, workbox-build now uses the TypeScript definitions as the source of truth when validating the configuration options developers provide. Previously, joi was used for validation with its own set of schema, and this would sometimes lead to mismatches between what the validation logic thought was okay and what the code actually expected. Developers who inspect the validation errors returned by workbox-build will likely see different error strings in v6.2.0. We expect that moving forward, using TypeScript as the source of truth will lead to fewer of those mismatches.This change applies to both workbox-cli and workbox-webpack-plugin, as well, which rely on workbox-build under the hood.

IndexedDB code migration

Another refactoring is the replacement of our previous custom IndexedDB logic with the idb library. No developer-visible changes are expected due to this migration. [#​2838]

Multiple controlling events during a page's lifetime

Following this change, worbox-window's controlling event is fired each time the underlying oncontrollerchange event happens. Multiple controlling events can occur on a long-lived page in which multiple service worker updates take place. isExternal: true will be set when the service worker that takes control is "external," which will always be the case for multiple updates.

Previously, controlling would only be fired once per lifetime of the page, which does not match the documented behavior. This change is considered a bug fix to match the expected behavior, and developers are encouraged to test their logic to ensure that they were not relying on the previous, buggy behavior. [#​2817]

TrustedScriptURL support in workbox-window

Developers who have opted-in to the CSP policy "require-trusted-types-for 'script'" and who are using TypeScript would have previously had trouble using TrustedScriptURLs in workbox-window. This release improves that support. [#​2872]

rangeRequests option in runtimeCaching

Setting rangeRequests: true inside of a runtimeCaching configuration entry will add the RangeRequestsPlugin to the service worker generated by Workbox's build tools. [#​2871]

🐛 What's Fixed?
workbox-core
  • The HandlerDidErrorCallbackParam type definition is now exported alongside the other relevant TypeScript types. [#​2886]
workbox-webpack-plugin
  • A bug was fixed that could lead to invalid generated code when quotation chars when webpack's eval-cheap-source-map is used along with the InjectManifest plugin. [#​2847]
workbox-window
  • ports was missing on the WorkboxMessageEvent. It's been added, mirroring the value of the underlying MessageEvent, when used in an onmessage handler. [#​2874]

  • The WorkboxEventMap type definition is now exported alongside the other relevant TypeScript types. [#​2870]

Thanks!

Thank you @​rockwalrus for contributing a PR [#​2857] that went into this release!

v6.1.5

Compare Source

Workbox v6.1.5 includes fixes in workbox-cli, workbox-window and workbox-webpack-plugin. Also, the rollup and @rollup/plugin-node-resolve dependencies were updated.

(There was no v6.1.3 or v6.1.4 release.)

🐛 What's Fixed?
workbox-cli

In the configuration file generated by workbox wizard the regex for ignoreURLParametersMatching are now serialized correctly, as before they were being serialized as strings and that was causing errors. [#​2796]

workbox-window

Added support for external controlling events. The controlling event is now dispatched whether it originated in the current or external service worker. Developers can check the isExternal flag to distinguish between the two. [#​2786]

workbox-webpack-plugin

Fix to push an Error object to compilation.warnings instead of strings, since pushing strings causes the warnings to not be bubbled up correctly. See [#​2790]

Thanks!

Thank you @​jcabak for contributing documentation updates [#​2808]!

v6.1.4

Compare Source

v6.1.2

Compare Source

Workbox v6.1.2 includes several fixes to the workbox-cli's wizard mode, and removes some potentially confusing logging.

🐛 What's Fixed?
workbox-build
  • A warning message was logged when workbox-build was used, due to an update to the @rollup/plugin-replace plugin that it uses. The underlying issue raised in the warning message has been addressed. [#​2772]
workbox-cli
  • Previously, the wizard question flow would not give developers the opportunity to specify a value to override the default ignoreURLParametersMatching setting. The wizard now provides some context and explicitly asks about overriding this value. [#​2763]

  • There were two issues fixed in the wizard related to entering the globDirectory value: the separator characters, --------, were inadvertently selectable, and additionally, the logic was buggy when a manual directory name was entered. Both of these issues are fixed. [#​2766]

workbox-strategies
  • There was previously unnecessary logging of an uncaught error when a network request failed while offline, even if the response was eventually provided via the cache. This amounted to extra noise in the JS console, and could be particularly confusing if it was triggered during Chrome's new automatic offline check. This uncaught error should no longer show up in the logs. [#​2777]
Thanks!

Special thanks to @​ognjenjevremovic for contributing the two workbox-cli PRs that went into this release!

v6.1.1

Compare Source

Workbox v6.1.1 includes a bug fix for the NetworkFirst strategy, as well as some documentation and TypeScript fixes.

🐛 What's Fixed?
workbox-strategies

The NetworkFirst strategy uses two promises: one for the network request, and one is the optional networkTimeoutSeconds option is set. If the network request succeeds, then the timeout promise's timer is canceled. However, the strategy previously attempted to wait until both promises resolve before the handler resolves. This meant that, if the network request succeeds before the timeout, the strategy's over handler promise would not properly resolve.

See #​2744

Thanks!

Special thanks to @​joshkel for both bringing that NetworkFirst issue to our attention, as well as contributing the code for the fix!

v6.1.0

Compare Source

Workbox v6.1.0 includes a number of new features, as well as an important fix for a bug that could have affected workbox-precaching behavior in earlier v6 releases.

🎉 What's New?
setCatchHandler for individual Routes

The setCatchHandler() method on a Router allows you to configure "fallback" logic if any handler invoked by that Router returns an error. It can be awkward to use, however, if you have many different Routes registered for the same Router, and you would prefer that the fallback logic only be invoked when one or two particular Route handlers fail.

Starting in this release, each individual Route object has a setCatchHandler() method, allowing you to add fallback logic just to that Route, without affecting any other Routes. To use this method, make sure you explicitly construct a Route first, and then pass that Route to the (overloaded) registerRoute() method:

import {Route, registerRoute} from 'workbox-routing';
import {NetworkOnly, StaleWhileRevalidate} from 'workbox-strategies';

const navigationRoute = new Route(
  ({event, request, url}) => request.mode === 'navigate',
  new NetworkOnly()
);
navigationRoute.setCatchHandler(
  ({event, request, url}) => {
    // Do something to generate a fallback response,
    // e.g. read a HTML document from the cache.
  }
);
registerRoute(navigationRoute);

// This route, created implicitly via an overloaded registerRoute()
// method, won't have the catch handler applied.
registerRoute(
  ({event, request, url}) => request.destination === 'image',
  new StaleWhileRevalidate()
);

See #​2699

New "recipes"

The workbox-recipes module has been extended with a few new features:

  • A new recipe, warmStrategyCache, which takes an array of paths and a Workbox strategy and warms that strategy's cache with those paths at service worker install time.
  • Adds a warmCache option to page, image, and static resource recipes to allow users to warm those caches.
  • Adds a plugins option to page, image, and static resource recipes to allow users to pass additional plugins to those recipes, allowing a user, for instance, to add a URL normalization plugin to the page recipe.

The workbox-recipes documentation has more information and examples.

See #​2718

🐛 What's Fixed?
workbox-precaching

The expected behavior for workbox-precaching is that all URLs listed in the precache manifest need to be considered "cacheable" in order for service worker installation to succeed. By default, workbox-precaching considers any response with a status code less than 400 as being cacheable (including opaque responses, which have a status code of 0). Developers who need to customize this behavior can pass a cacheWillUpdate plugin to workbox-precaching, and use that logic to determine whether or not a response should be precached during installation.

Two bugs were introduced in the Workbox v6.0.0 release:

  • The default criteria, in which any response with a status of 400 or higher should be considered uncacheable, would lead to the invalid response being inadvertently written to the cache prior to failing the service worker installation. The next time installation was attempted, this previously cached error response wouldn't be retried, so after enough retries, the service worker would eventually finish installation, even though some responses that should have been considered invalid were precached.

  • If a developer uses a cacheWillUpdate plugin while precaching, returning null from the plugin properly excluded that response from being precached, but it would not cause the overall service worker installation to fail.

Both of these bugs are fixed in the v6.1.0 release. During service worker installation, if any response that is uncacheable (either via the default or custom cacheWillUpdate criteria) is encountered, installation will consistently fail and the invalid response won't be added to the cache.

See #​2738

workbox-webpack-plugin
  • Using the chunks or excludeChunks options could lead to a warning message under some circumstances, due to workbox-webpack-plugin assuming they always corresponded to chunk group names. The code will now check to see if the name matches a chunk itself, not just a group. See #​2735
All build tools
  • The source-map dependency has been updated to resolve an issue that could occur when run in a Node environment that had a polyfilled fetch(). See #​2716
Thanks!

Special thanks to @​Spiderpig86 for contributing a PR that was part of this release.


Configuration

📅 Schedule: Branch creation - "before 7pm on Friday" in timezone Asia/Tokyo, Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, click this checkbox.

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot added the renovate label Jun 10, 2021
@renovate renovate bot force-pushed the renovate/workbox-monorepo branch from 8a17aee to 162b155 Compare June 11, 2021 00:52
@renovate renovate bot force-pushed the renovate/workbox-monorepo branch from 162b155 to 26529d4 Compare July 4, 2021 20:49
@renovate renovate bot changed the title Update workbox monorepo to v6.1.5 Pin dependencies Jul 4, 2021
@renovate renovate bot force-pushed the renovate/workbox-monorepo branch 5 times, most recently from b3efa34 to 321accf Compare July 15, 2021 17:08
@renovate renovate bot force-pushed the renovate/workbox-monorepo branch 5 times, most recently from 23c6e0e to d688ce5 Compare July 29, 2021 16:46
@renovate renovate bot force-pushed the renovate/workbox-monorepo branch 2 times, most recently from 259f71c to e0616c5 Compare August 5, 2021 19:10
@renovate renovate bot force-pushed the renovate/workbox-monorepo branch 3 times, most recently from 5e58b6f to bc34578 Compare August 19, 2021 17:48
@renovate renovate bot force-pushed the renovate/workbox-monorepo branch 2 times, most recently from 6089c5d to c966eda Compare August 26, 2021 19:56
@renovate renovate bot force-pushed the renovate/workbox-monorepo branch 2 times, most recently from 7b26014 to 2791269 Compare September 9, 2021 17:47
@renovate renovate bot force-pushed the renovate/workbox-monorepo branch 2 times, most recently from d91761c to 66c93e4 Compare September 13, 2021 09:58
@renovate renovate bot changed the title Pin dependencies Update workbox monorepo to v6.3.0 Sep 13, 2021
@renovate renovate bot force-pushed the renovate/workbox-monorepo branch from 66c93e4 to 3c514d3 Compare November 16, 2021 01:57
@renovate renovate bot changed the title Update workbox monorepo to v6.3.0 Update workbox monorepo to v6.4.1 Nov 16, 2021
@renovate renovate bot force-pushed the renovate/workbox-monorepo branch 2 times, most recently from 19912dd to fef57f6 Compare December 2, 2021 23:12
@renovate renovate bot changed the title Update workbox monorepo to v6.4.1 Update workbox monorepo to v6.4.2 Dec 2, 2021
@renovate renovate bot force-pushed the renovate/workbox-monorepo branch from fef57f6 to f9221bc Compare March 7, 2022 15:26
@renovate renovate bot changed the title Update workbox monorepo to v6.4.2 Update workbox monorepo to v6.5.1 Mar 7, 2022
@renovate renovate bot force-pushed the renovate/workbox-monorepo branch from f9221bc to 9f42054 Compare March 26, 2022 12:00
@renovate renovate bot changed the title Update workbox monorepo to v6.5.1 Update workbox monorepo to v6.5.2 Mar 26, 2022
@renovate renovate bot force-pushed the renovate/workbox-monorepo branch from 9f42054 to c01c44b Compare April 24, 2022 19:05
@renovate renovate bot changed the title Update workbox monorepo to v6.5.2 Update workbox monorepo to v6.5.3 Apr 24, 2022
@renovate renovate bot force-pushed the renovate/workbox-monorepo branch from c01c44b to a0f0cae Compare September 25, 2022 11:45
@renovate renovate bot changed the title Update workbox monorepo to v6.5.3 Update workbox monorepo to v6.5.4 Sep 25, 2022
@renovate renovate bot changed the title Update workbox monorepo to v6.5.4 Update workbox monorepo to v6.5.4 - autoclosed Nov 20, 2022
@renovate renovate bot closed this Nov 20, 2022
@renovate renovate bot deleted the renovate/workbox-monorepo branch November 20, 2022 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants