Update workbox monorepo to v6.2.0 #639

Merged
konrad merged 1 commits from renovate/workbox-monorepo into main 2021-08-05 19:13:39 +00:00
Member

This PR contains the following updates:

Package Type Update Change
workbox-cli devDependencies minor 6.1.5 -> 6.2.0
workbox-precaching dependencies minor 6.1.5 -> 6.2.0

Release Notes

googlechrome/workbox

v6.2.0

Compare Source

Workbox v6.2.0. It 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!


Configuration

📅 Schedule: 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, check this box.

This PR has been generated by Renovate Bot.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [workbox-cli](https://github.com/googlechrome/workbox) | devDependencies | minor | [`6.1.5` -> `6.2.0`](https://renovatebot.com/diffs/npm/workbox-cli/6.1.5/6.2.0) | | [workbox-precaching](https://github.com/googlechrome/workbox) | dependencies | minor | [`6.1.5` -> `6.2.0`](https://renovatebot.com/diffs/npm/workbox-precaching/6.1.5/6.2.0) | --- ### Release Notes <details> <summary>googlechrome/workbox</summary> ### [`v6.2.0`](https://github.com/googlechrome/workbox/releases/v6.2.0) [Compare Source](https://github.com/googlechrome/workbox/compare/v6.1.5...v6.2.0) Workbox v6.2.0. It 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`. \[[#&#8203;2867](https://github.com/googlechrome/workbox/issues/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`](https://joi.dev/) 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](https://github.com/jakearchibald/idb). No developer-visible changes are expected due to this migration. \[[#&#8203;2838](https://github.com/googlechrome/workbox/issues/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](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange) 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](https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found)," 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. \[[#&#8203;2817](https://github.com/googlechrome/workbox/issues/2817)] ##### TrustedScriptURL support in workbox-window Developers who have opted-in to the [CSP policy](https://web.dev/trusted-types/) `"require-trusted-types-for 'script'"` and who are using TypeScript would have previously had trouble using `TrustedScriptURL`s in `workbox-window`. This release improves that support. \[[#&#8203;2872](https://github.com/googlechrome/workbox/issues/2872)] ##### rangeRequests option in runtimeCaching Setting `rangeRequests: true` inside of a [`runtimeCaching`](https://developers.google.com/web/tools/workbox/reference-docs/latest/module-workbox-build#.RuntimeCachingEntry) configuration entry will add the RangeRequestsPlugin to the service worker generated by Workbox's build tools. \[[#&#8203;2871](https://github.com/googlechrome/workbox/issues/2871)] ##### 🐛 What's Fixed? ##### workbox-core - The `HandlerDidErrorCallbackParam` type definition is now exported alongside the other relevant TypeScript types. \[[#&#8203;2886](https://github.com/googlechrome/workbox/issues/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. \[[#&#8203;2847](https://github.com/googlechrome/workbox/issues/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. \[[#&#8203;2874](https://github.com/googlechrome/workbox/issues/2874)] - The `WorkboxEventMap` type definition is now exported alongside the other relevant TypeScript types. \[[#&#8203;2870](https://github.com/googlechrome/workbox/issues/2870)] ##### Thanks! Thank you [@&#8203;rockwalrus](https://github.com/rockwalrus) for contributing a PR \[[#&#8203;2857](https://github.com/googlechrome/workbox/issues/2857)] that went into this release! </details> --- ### Configuration 📅 **Schedule**: 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. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box. --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
renovate added the
dependencies
label 2021-08-05 18:02:10 +00:00
renovate added 1 commit 2021-08-05 18:02:11 +00:00
continuous-integration/drone/pr Build is passing Details
8630dc5843
Update workbox monorepo to v6.2.0
konrad merged commit f4c31a3168 into main 2021-08-05 19:13:39 +00:00
This repo is archived. You cannot comment on pull requests.
No description provided.