Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: GoogleChrome/workbox
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v6.1.5
Choose a base ref
...
head repository: GoogleChrome/workbox
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v6.2.0
Choose a head ref

Commits on Apr 13, 2021

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ef225a9 View commit details

Commits on Apr 15, 2021

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    4243caa View commit details

Commits on Apr 22, 2021

  1. fetch() stubs in Google Analytics tests (#2823)

    * fetch() stubs
    
    * Remove a comment
    
    * One more stub
    jeffposnick authored Apr 22, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    9f7e97a View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    2ddef47 View commit details

Commits on Apr 27, 2021

  1. 5.1.2 to 6.1.5 (#2830)

    jeffposnick authored Apr 27, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    7a8f5d3 View commit details

Commits on May 10, 2021

  1. Strategy handler - adding ; to iterateCallbacks (#2840)

    * Removing githead attribute from package.json files from lerna erroring out
    
    * adding missing ;
    tropicadri authored May 10, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    79a415c View commit details

Commits on May 17, 2021

  1. DbWrapper deprecation (#2838)

    Remove DbWrapper and update to idb library.
    tropicadri authored May 17, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    bbaa0bb View commit details

Commits on May 24, 2021

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    8388786 View commit details

Commits on Jun 2, 2021

  1. Fix quotation chars when eval-cheap-source-map is used (#2847)

    * Fix some quotation characters
    
    * Don't use ?.
    
    * Linying
    jeffposnick authored Jun 2, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f6fb94a View commit details

Commits on Jun 17, 2021

  1. Migrate workbox-build to TypeScript (#2867)

    * WIP
    
    * Finished getManifest
    
    * GenerateSW migrated
    
    * Getting there
    
    * WIP
    
    * Runtime caching TS
    
    * More WIP
    
    * More WIP
    
    * Validation, type fixes
    
    * Builds!
    
    * No default exports
    
    * null support in optional strings
    
    * Accept string or buffer again
    
    * Fix JSDocs
    
    * CanIUse update
    
    * test/additional-manifest-entries-transform
    
    * lib/bundle
    
    * cdnUtils test
    
    * Switched to esModuleInterop
    
    * Still WIP
    
    * get-file-size migration
    
    * get-string-details test migration
    
    * A few more
    
    * populateSWTemplate changes
    
    * A few more
    
    * validate options
    
    * Update ts-auto-guard
    
    * Fix dependency-check
    
    * Swapped the exports
    
    * JSON Schema + ajv
    
    * TS 4.1.5
    
    * Getting closer to validation
    
    * Some default logic
    
    * Switched default quotes
    
    * Cleanup optional types
    
    * Figuring out errors
    
    * Refactor
    
    * Update validate-options test
    
    * Started integration test migration
    
    * Remove joi schema
    
    * Fixed some swDest logic
    
    * Closer to webpack tests working
    
    * Fix transformManifest usage
    
    * Use a copy of the exclude array
    
    * More include/exclude fun
    
    * swDest default fix
    
    * Function support?
    
    * modifyURLPrefix workaround
    
    * Fix an import
    
    * Improve error messages
    
    * Fix test string
    
    * New validation unit test
    
    * getManifest working
    
    * Working through generateSW
    
    * Function massaging
    
    * Cleanup of exclude/include
    
    * Fix a few more gSW tests
    
    * RouteMatchCallback function
    
    * Expiration w/cacheName check
    
    * Optional globDirectory
    
    * InjectManifest tests
    
    * Test cleanup
    
    * Fix a test
    
    * Fix a config modification
    
    * v5 injectmanifest test
    
    * esModuleInterop support
    
    * Fixes for proxied build
    
    * Final tweaks
    
    * Linting
    
    * Automated linting fixes
    
    * Tweak linting rules
    
    * Update packages/workbox-build/src/lib/get-file-details.ts
    
    Co-authored-by: Adriana Jara <32825533+tropicadri@users.noreply.github.com>
    
    * Update test/workbox-build/node/generate-sw.js
    
    Co-authored-by: Adriana Jara <32825533+tropicadri@users.noreply.github.com>
    
    * Update packages/workbox-build/src/lib/additional-manifest-entries-transform.ts
    
    Co-authored-by: Adriana Jara <32825533+tropicadri@users.noreply.github.com>
    
    * Update packages/workbox-build/src/lib/additional-manifest-entries-transform.ts
    
    Co-authored-by: Adriana Jara <32825533+tropicadri@users.noreply.github.com>
    
    * Update packages/workbox-build/src/lib/cdn-utils.ts
    
    Co-authored-by: Adriana Jara <32825533+tropicadri@users.noreply.github.com>
    
    * Update packages/workbox-build/src/lib/get-file-manifest-entries.ts
    
    Co-authored-by: Adriana Jara <32825533+tropicadri@users.noreply.github.com>
    
    * Update packages/workbox-build/src/lib/stringify-without-comments.ts
    
    Co-authored-by: Adriana Jara <32825533+tropicadri@users.noreply.github.com>
    
    * Update packages/workbox-build/src/lib/validate-options.ts
    
    Co-authored-by: Adriana Jara <32825533+tropicadri@users.noreply.github.com>
    
    * Update packages/workbox-build/src/lib/additional-manifest-entries-transform.ts
    
    Co-authored-by: Adriana Jara <32825533+tropicadri@users.noreply.github.com>
    
    Co-authored-by: Adriana Jara <32825533+tropicadri@users.noreply.github.com>
    jeffposnick and tropicadri authored Jun 17, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    77b1c2f View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    0c5ce41 View commit details
  3. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    064df86 View commit details

Commits on Jun 23, 2021

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    86ada01 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    06a561a View commit details

Commits on Jul 1, 2021

  1. Fire controlling event more than once (#2817) (#2857)

    * Fire controlling event more than once (#2817)
    
    Dispatches the `controlling` event every time the documentation 
    specifies that it should.
    
    * Test tweak
    
    * One more fix
    
    Co-authored-by: Jeff Posnick <jeffy@google.com>
    rockwalrus and jeffposnick authored Jul 1, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    0b5d9d8 View commit details

Commits on Jul 7, 2021

  1. rangeRequests option in runtimeCaching (#2871)

    * rangeRequests runtime caching option
    
    * Spaces for a better JSON diff
    jeffposnick authored Jul 7, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    9f36ebe View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1ec2689 View commit details

Commits on Jul 12, 2021

  1. upgrade to tslin dependencies from 2.30 to 4.28 (#2885)

    * Removing githead attribute from package.json files from lerna erroring out
    
    * upgrade to tslin dependencies from 2.30 to 4.28
    
    * re enabling ts lint
    
    * fixing calculateEffectiveBoundaries test
    
    * small identation, types fixes
    tropicadri authored Jul 12, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ad9b029 View commit details

Commits on Jul 13, 2021

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    33288ac View commit details
  2. v6.2.0-alpha.0

    tropicadri committed Jul 13, 2021
    Copy the full SHA
    46af63c View commit details

Commits on Jul 20, 2021

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    92dcf91 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    4138eee View commit details
  3. v6.2.0-alpha.1

    tropicadri committed Jul 20, 2021
    Copy the full SHA
    8c49eb9 View commit details

Commits on Jul 28, 2021

  1. Modify ajv function validation (#2899)

    * Remove ajv-keywords
    
    * Linting
    jeffposnick authored Jul 28, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    430088d View commit details

Commits on Aug 2, 2021

  1. v6.2.0-alpha.2

    jeffposnick committed Aug 2, 2021
    Copy the full SHA
    a347648 View commit details

Commits on Aug 5, 2021

  1. v6.2.0

    jeffposnick committed Aug 5, 2021
    Copy the full SHA
    6ec5152 View commit details
Showing with 7,992 additions and 3,434 deletions.
  1. +1 −1 .gitignore
  2. +0 −3 .ncurc.js
  3. +1 −1 demos/src/workbox-background-sync-demo/sw.js
  4. +1 −1 demos/src/workbox-broadcast-update-demo/sw.js
  5. +1 −1 demos/src/workbox-cacheable-response/sw.js
  6. +1 −1 demos/src/workbox-core/sw.js
  7. +1 −1 demos/src/workbox-expiration/sw.js
  8. +1 −1 demos/src/workbox-google-analytics/sw.js
  9. +1 −1 demos/src/workbox-navigation-preload/sw.js
  10. +1 −1 demos/src/workbox-precaching/sw-1.js
  11. +1 −1 demos/src/workbox-precaching/sw-2.js
  12. +1 −1 demos/src/workbox-range-requests/sw.js
  13. +1 −1 demos/src/workbox-routing/sw.js
  14. +1 −1 demos/src/workbox-strategies/sw.js
  15. +1 −1 demos/src/workbox-streams/sw.js
  16. +1 −1 demos/src/workbox-sw/sw.js
  17. +1 −1 demos/src/workbox-window/sw.js
  18. +46 −0 gulp-tasks/build-node-packages.js
  19. +7 −5 gulp-tasks/build-packages.js
  20. +1 −0 gulp-tasks/lint.js
  21. +2 −2 gulp-tasks/utils/constants.js
  22. +3 −3 gulp-tasks/utils/versioned-cdn-url.js
  23. +1 −1 infra/testing/server/routes/sw-bundle.js
  24. +3 −1 infra/testing/validator/service-worker-runtime.js
  25. +1 −1 infra/testing/webpack-build-check.js
  26. +1 −1 lerna.json
  27. +505 −50 package-lock.json
  28. +15 −5 package.json
  29. +9 −2 packages/workbox-background-sync/package-lock.json
  30. +4 −4 packages/workbox-background-sync/package.json
  31. +31 −27 packages/workbox-background-sync/src/Queue.ts
  32. +1 −1 packages/workbox-background-sync/src/_version.ts
  33. +4 −4 packages/workbox-background-sync/src/index.ts
  34. +170 −0 packages/workbox-background-sync/src/lib/QueueDb.ts
  35. +23 −78 packages/workbox-background-sync/src/lib/QueueStore.ts
  36. +1 −1 packages/workbox-broadcast-update/package-lock.json
  37. +3 −4 packages/workbox-broadcast-update/package.json
  38. +1 −1 packages/workbox-broadcast-update/src/_version.ts
  39. +1 −1 packages/workbox-broadcast-update/src/responsesAreSame.ts
  40. +63 −41 packages/workbox-build/package-lock.json
  41. +20 −20 packages/workbox-build/package.json
  42. +6 −2 packages/workbox-build/src/_types.js
  43. +1 −1 packages/workbox-build/src/cdn-details.json
  44. +30 −19 packages/workbox-build/src/{generate-sw.js → generate-sw.ts}
  45. +6 −11 packages/workbox-build/src/{get-manifest.js → get-manifest.ts}
  46. +9 −6 packages/workbox-build/src/{index.js → index.ts}
  47. +37 −38 packages/workbox-build/src/{inject-manifest.js → inject-manifest.ts}
  48. +0 −42 packages/workbox-build/src/lib/additional-manifest-entries-transform.js
  49. +56 −0 packages/workbox-build/src/lib/additional-manifest-entries-transform.ts
  50. +33 −17 packages/workbox-build/src/lib/{bundle.js → bundle.ts}
  51. +0 −40 packages/workbox-build/src/lib/cdn-utils.js
  52. +37 −0 packages/workbox-build/src/lib/cdn-utils.ts
  53. +12 −10 packages/workbox-build/src/lib/{copy-workbox-libraries.js → copy-workbox-libraries.ts}
  54. +8 −2 packages/workbox-build/src/lib/{errors.js → errors.ts}
  55. +3 −1 packages/workbox-build/src/lib/{escape-regexp.js → escape-regexp.ts}
  56. +5 −3 packages/workbox-build/src/lib/{get-composite-details.js → get-composite-details.ts}
  57. +0 −61 packages/workbox-build/src/lib/get-file-details.js
  58. +72 −0 packages/workbox-build/src/lib/get-file-details.ts
  59. +7 −7 packages/workbox-build/src/lib/{get-file-hash.js → get-file-hash.ts}
  60. +0 −119 packages/workbox-build/src/lib/get-file-manifest-entries.js
  61. +114 −0 packages/workbox-build/src/lib/get-file-manifest-entries.ts
  62. +6 −6 packages/workbox-build/src/lib/{get-file-size.js → get-file-size.ts}
  63. +6 −5 packages/workbox-build/src/lib/{get-string-details.js → get-string-details.ts}
  64. +4 −4 packages/workbox-build/src/lib/{get-string-hash.js → get-string-hash.ts}
  65. +6 −4 packages/workbox-build/src/lib/{maximum-size-transform.js → maximum-size-transform.ts}
  66. +10 −7 packages/workbox-build/src/lib/{modify-url-prefix-transform.js → modify-url-prefix-transform.ts}
  67. +11 −12 packages/workbox-build/src/lib/{module-registry.js → module-registry.ts}
  68. +4 −3 ...src/lib/{no-revision-for-urls-matching-transform.js → no-revision-for-urls-matching-transform.ts}
  69. +13 −12 packages/workbox-build/src/lib/{populate-sw-template.js → populate-sw-template.ts}
  70. +6 −3 packages/workbox-build/src/lib/{rebase-path.js → rebase-path.ts}
  71. +15 −10 packages/workbox-build/src/lib/{replace-and-update-source-map.js → replace-and-update-source-map.ts}
  72. +0 −166 packages/workbox-build/src/lib/runtime-caching-converter.js
  73. +170 −0 packages/workbox-build/src/lib/runtime-caching-converter.ts
  74. +0 −17 packages/workbox-build/src/lib/stringify-without-comments.js
  75. +23 −0 packages/workbox-build/src/lib/stringify-without-comments.ts
  76. +26 −16 packages/workbox-build/src/lib/{transform-manifest.js → transform-manifest.ts}
  77. +0 −23 packages/workbox-build/src/lib/validate-options.js
  78. +185 −0 packages/workbox-build/src/lib/validate-options.ts
  79. +14 −11 ...s/workbox-build/src/lib/{write-sw-using-default-template.js → write-sw-using-default-template.ts}
  80. +0 −34 packages/workbox-build/src/options/defaults.js
  81. +0 −15 packages/workbox-build/src/options/objects/manifest-entry.js
  82. +0 −23 packages/workbox-build/src/options/partials/base.js
  83. +0 −88 packages/workbox-build/src/options/partials/generate.js
  84. +0 −23 packages/workbox-build/src/options/partials/glob.js
  85. +0 −16 packages/workbox-build/src/options/partials/inject.js
  86. +0 −21 packages/workbox-build/src/options/partials/webpack.js
  87. +0 −19 packages/workbox-build/src/options/schema/generate-sw.js
  88. +0 −16 packages/workbox-build/src/options/schema/get-manifest.js
  89. +0 −19 packages/workbox-build/src/options/schema/inject-manifest.js
  90. +0 −21 packages/workbox-build/src/options/schema/webpack-generate-sw.js
  91. +0 −34 packages/workbox-build/src/options/schema/webpack-inject-manifest.js
  92. +1 −0 packages/workbox-build/src/rollup-plugin-off-main-thread.d.ts
  93. +865 −0 packages/workbox-build/src/schema/GenerateSWOptions.json
  94. +757 −0 packages/workbox-build/src/schema/GetManifestOptions.json
  95. +769 −0 packages/workbox-build/src/schema/InjectManifestOptions.json
  96. +844 −0 packages/workbox-build/src/schema/WebpackGenerateSWOptions.json
  97. +756 −0 packages/workbox-build/src/schema/WebpackInjectManifestOptions.json
  98. +1 −0 packages/workbox-build/src/source-map-url.d.ts
  99. +1 −0 packages/workbox-build/src/strip-comments.d.ts
  100. +1 −1 packages/workbox-build/src/templates/{sw-template.js → sw-template.ts}
  101. +247 −0 packages/workbox-build/src/types.ts
  102. +27 −0 packages/workbox-build/tsconfig.json
  103. +1 −1 packages/workbox-cacheable-response/package-lock.json
  104. +3 −4 packages/workbox-cacheable-response/package.json
  105. +1 −1 packages/workbox-cacheable-response/src/CacheableResponse.ts
  106. +1 −1 packages/workbox-cacheable-response/src/_version.ts
  107. +1 −1 packages/workbox-cli/package-lock.json
  108. +3 −4 packages/workbox-cli/package.json
  109. +39 −43 packages/workbox-cli/src/app.ts
  110. +13 −9 packages/workbox-cli/src/bin.ts
  111. +1 −1 packages/workbox-cli/src/lib/cleanup-stack-trace.ts
  112. +5 −5 packages/workbox-cli/src/lib/logger.ts
  113. +15 −12 packages/workbox-cli/src/lib/questions/ask-config-location.ts
  114. +12 −10 packages/workbox-cli/src/lib/questions/ask-extensions-to-cache.ts
  115. +8 −1 packages/workbox-cli/src/lib/questions/ask-questions.ts
  116. +4 −4 packages/workbox-cli/src/lib/questions/ask-root-of-web-app.ts
  117. +1 −1 packages/workbox-cli/src/lib/questions/ask-start_url-query-params.ts
  118. +9 −7 packages/workbox-cli/src/lib/questions/ask-sw-dest.ts
  119. +6 −5 packages/workbox-cli/src/lib/questions/ask-sw-src.ts
  120. +2 −0 packages/workbox-cli/src/lib/read-config.ts
  121. +3 −3 packages/workbox-cli/src/lib/run-wizard.ts
  122. +4 −0 packages/workbox-cli/tsconfig.json
  123. +1 −1 packages/workbox-core/package-lock.json
  124. +2 −3 packages/workbox-core/package.json
  125. +0 −4 packages/workbox-core/src/_private.ts
  126. +0 −325 packages/workbox-core/src/_private/DBWrapper.ts
  127. +1 −1 packages/workbox-core/src/_private/Deferred.ts
  128. +7 −4 packages/workbox-core/src/_private/assert.ts
  129. +13 −13 packages/workbox-core/src/_private/cacheNames.ts
  130. +0 −34 packages/workbox-core/src/_private/deleteDatabase.ts
  131. +1 −1 packages/workbox-core/src/_private/dontWaitFor.ts
  132. +1 −1 packages/workbox-core/src/_private/executeQuotaErrorCallbacks.ts
  133. +1 −1 packages/workbox-core/src/_private/getFriendlyURL.ts
  134. +3 −3 packages/workbox-core/src/_private/logger.ts
  135. +1 −1 packages/workbox-core/src/_private/timeout.ts
  136. +1 −1 packages/workbox-core/src/_private/waitUntil.ts
  137. +1 −1 packages/workbox-core/src/_version.ts
  138. +5 −5 packages/workbox-core/src/cacheNames.ts
  139. +1 −1 packages/workbox-core/src/clientsClaim.ts
  140. +2 −2 packages/workbox-core/src/copyResponse.ts
  141. +17 −14 packages/workbox-core/src/models/messages/messages.ts
  142. +2 −0 packages/workbox-core/src/models/quotaErrorCallbacks.ts
  143. +3 −1 packages/workbox-core/src/registerQuotaErrorCallback.ts
  144. +1 −1 packages/workbox-core/src/setCacheNameDetails.ts
  145. +3 −3 packages/workbox-core/src/skipWaiting.ts
  146. +1 −1 packages/workbox-core/src/types.ts
  147. +1 −1 packages/workbox-core/src/utils/pluginUtils.ts
  148. +5 −3 packages/workbox-expiration/package-lock.json
  149. +4 −4 packages/workbox-expiration/package.json
  150. +4 −4 packages/workbox-expiration/src/CacheExpiration.ts
  151. +12 −10 packages/workbox-expiration/src/ExpirationPlugin.ts
  152. +1 −1 packages/workbox-expiration/src/_version.ts
  153. +82 −64 packages/workbox-expiration/src/models/CacheTimestampsModel.ts
  154. +1 −1 packages/workbox-google-analytics/package-lock.json
  155. +6 −7 packages/workbox-google-analytics/package.json
  156. +1 −1 packages/workbox-google-analytics/src/_version.ts
  157. +2 −2 packages/workbox-google-analytics/src/initialize.ts
  158. +1 −1 packages/workbox-navigation-preload/package-lock.json
  159. +3 −4 packages/workbox-navigation-preload/package.json
  160. +1 −1 packages/workbox-navigation-preload/src/_version.ts
  161. +1 −1 packages/workbox-navigation-preload/src/disable.ts
  162. +2 −2 packages/workbox-navigation-preload/src/enable.ts
  163. +1 −1 packages/workbox-precaching/package-lock.json
  164. +5 −6 packages/workbox-precaching/package.json
  165. +13 −9 packages/workbox-precaching/src/PrecacheController.ts
  166. +15 −11 packages/workbox-precaching/src/PrecacheStrategy.ts
  167. +1 −1 packages/workbox-precaching/src/_version.ts
  168. +1 −1 packages/workbox-precaching/src/addPlugins.ts
  169. +1 −1 packages/workbox-precaching/src/addRoute.ts
  170. +1 −1 packages/workbox-precaching/src/cleanupOutdatedCaches.ts
  171. +2 −2 packages/workbox-precaching/src/createHandlerBoundToURL.ts
  172. +1 −1 packages/workbox-precaching/src/getCacheKeyForURL.ts
  173. +1 −1 packages/workbox-precaching/src/matchPrecache.ts
  174. +1 −1 packages/workbox-precaching/src/precache.ts
  175. +1 −1 packages/workbox-precaching/src/precacheAndRoute.ts
  176. +3 −1 packages/workbox-precaching/src/utils/PrecacheCacheKeyPlugin.ts
  177. +9 −6 packages/workbox-precaching/src/utils/PrecacheInstallReportPlugin.ts
  178. +1 −1 packages/workbox-precaching/src/utils/deleteOutdatedCaches.ts
  179. +1 −1 packages/workbox-precaching/src/utils/generateURLVariations.ts
  180. +1 −1 packages/workbox-precaching/src/utils/getOrCreatePrecacheController.ts
  181. +1 −1 packages/workbox-precaching/src/utils/printCleanupDetails.ts
  182. +2 −2 packages/workbox-precaching/src/utils/printInstallDetails.ts
  183. +1 −1 packages/workbox-range-requests/package-lock.json
  184. +3 −4 packages/workbox-range-requests/package.json
  185. +1 −1 packages/workbox-range-requests/src/_version.ts
  186. +1 −1 packages/workbox-range-requests/src/createPartialResponse.ts
  187. +1 −1 packages/workbox-recipes/package-lock.json
  188. +8 −9 packages/workbox-recipes/package.json
  189. +1 −1 packages/workbox-recipes/src/_version.ts
  190. +3 −3 packages/workbox-recipes/src/googleFontsCache.ts
  191. +3 −3 packages/workbox-recipes/src/imageCache.ts
  192. +3 −3 packages/workbox-recipes/src/offlineFallback.ts
  193. +4 −4 packages/workbox-recipes/src/pageCache.ts
  194. +3 −3 packages/workbox-recipes/src/staticResourceCache.ts
  195. +1 −1 packages/workbox-routing/package-lock.json
  196. +3 −4 packages/workbox-routing/package.json
  197. +1 −1 packages/workbox-routing/src/NavigationRoute.ts
  198. +2 −2 packages/workbox-routing/src/RegExpRoute.ts
  199. +2 −2 packages/workbox-routing/src/Route.ts
  200. +21 −16 packages/workbox-routing/src/Router.ts
  201. +1 −1 packages/workbox-routing/src/_version.ts
  202. +1 −1 packages/workbox-routing/src/registerRoute.ts
  203. +1 −1 packages/workbox-routing/src/setCatchHandler.ts
  204. +1 −1 packages/workbox-routing/src/setDefaultHandler.ts
  205. +1 −1 packages/workbox-strategies/package-lock.json
  206. +3 −4 packages/workbox-strategies/package.json
  207. +4 −2 packages/workbox-strategies/src/CacheFirst.ts
  208. +3 −1 packages/workbox-strategies/src/NetworkFirst.ts
  209. +3 −1 packages/workbox-strategies/src/NetworkOnly.ts
  210. +4 −2 packages/workbox-strategies/src/StaleWhileRevalidate.ts
  211. +14 −9 packages/workbox-strategies/src/Strategy.ts
  212. +18 −14 packages/workbox-strategies/src/StrategyHandler.ts
  213. +1 −1 packages/workbox-strategies/src/_version.ts
  214. +2 −2 packages/workbox-strategies/src/utils/messages.ts
  215. +1 −1 packages/workbox-streams/package-lock.json
  216. +4 −5 packages/workbox-streams/package.json
  217. +1 −1 packages/workbox-streams/src/_version.ts
  218. +1 −1 packages/workbox-streams/src/isSupported.ts
  219. +1 −1 packages/workbox-streams/src/utils/createHeaders.ts
  220. +1 −1 packages/workbox-sw/_version.mjs
  221. +1 −1 packages/workbox-sw/package-lock.json
  222. +2 −3 packages/workbox-sw/package.json
  223. +1 −1 packages/workbox-webpack-plugin/package-lock.json
  224. +3 −4 packages/workbox-webpack-plugin/package.json
  225. +5 −6 packages/workbox-webpack-plugin/src/generate-sw.js
  226. +24 −9 packages/workbox-webpack-plugin/src/inject-manifest.js
  227. +2 −1 packages/workbox-webpack-plugin/src/lib/get-manifest-entries-from-compilation.js
  228. +6 −3 packages/workbox-window/package-lock.json
  229. +5 −3 packages/workbox-window/package.json
  230. +41 −22 packages/workbox-window/src/Workbox.ts
  231. +1 −1 packages/workbox-window/src/_version.ts
  232. +4 −2 packages/workbox-window/src/index.ts
  233. +2 −0 packages/workbox-window/src/messageSW.ts
  234. +2 −1 packages/workbox-window/src/utils/WorkboxEvent.ts
  235. +3 −3 packages/workbox-window/src/utils/WorkboxEventTarget.ts
  236. +10 −0 prettier.config.js
  237. +517 −0 test/workbox-background-sync/sw/lib/test-QueueDb.mjs
  238. +6 −171 test/workbox-background-sync/sw/lib/test-QueueStore.mjs
  239. +6 −6 test/workbox-background-sync/sw/test-Queue.mjs
  240. +1 −0 test/workbox-build/node/dependency-check.js
  241. +44 −86 test/workbox-build/node/generate-sw.js
  242. +14 −26 test/workbox-build/node/get-manifest.js
  243. +27 −58 test/workbox-build/node/inject-manifest.js
  244. +7 −7 test/workbox-build/node/lib/additional-manifest-entries-transform.js
  245. +13 −18 test/workbox-build/node/lib/bundle.js
  246. +2 −7 test/workbox-build/node/lib/cdn-utils.js
  247. +5 −5 test/workbox-build/node/lib/copy-workbox-libraries.js
  248. +2 −2 test/workbox-build/node/lib/escape-regexp.js
  249. +1 −1 test/workbox-build/node/lib/get-composite-details.js
  250. +20 −16 test/workbox-build/node/lib/get-file-details.js
  251. +6 −6 test/workbox-build/node/lib/get-file-hash.js
  252. +34 −25 test/workbox-build/node/lib/get-file-manifest-entries.js
  253. +8 −8 test/workbox-build/node/lib/get-file-size.js
  254. +1 −1 test/workbox-build/node/lib/get-string-details.js
  255. +1 −1 test/workbox-build/node/lib/get-string-hash.js
  256. +9 −9 test/workbox-build/node/lib/modify-url-prefix-transform.js
  257. +2 −1 test/workbox-build/node/lib/module-registry.js
  258. +7 −7 test/workbox-build/node/lib/no-revision-for-urls-matching-transform.js
  259. +19 −13 test/workbox-build/node/lib/populate-sw-template.js
  260. +1 −1 test/workbox-build/node/lib/replace-and-update-source-map.js
  261. +10 −3 test/workbox-build/node/lib/runtime-caching-converter.js
  262. +1 −1 test/workbox-build/node/lib/transform-manifest.js
  263. +69 −30 test/workbox-build/node/lib/validate-options.js
  264. +24 −18 test/workbox-build/node/lib/write-sw-using-default-template.js
  265. +27 −42 test/workbox-cli/node/app.js
  266. +0 −644 test/workbox-core/sw/_private/test-DBWrapper.mjs
  267. +6 −4 test/workbox-expiration/sw/test-CacheExpiration.mjs
  268. +5 −4 test/workbox-expiration/sw/test-CacheTimestampsModel.mjs
  269. +16 −7 test/workbox-google-analytics/sw/test-initialize.mjs
  270. +1 −1 test/workbox-range-requests/sw/utils/test-calculateEffectiveBoundaries.mjs
  271. +2 −2 test/workbox-strategies/sw/test-StrategyHandler.mjs
  272. +1 −1 test/workbox-webpack-plugin/node/v4/generate-sw.js
  273. +99 −6 test/workbox-webpack-plugin/node/v4/inject-manifest.js
  274. +3 −1 test/workbox-webpack-plugin/node/v5/generate-sw.js
  275. +137 −43 test/workbox-webpack-plugin/node/v5/inject-manifest.js
  276. +3 −3 ...box-build/src/options/objects/reg-exp.js → test/workbox-webpack-plugin/static/module-import-sw.js
  277. +3 −1 test/workbox-window/integration/test-all.js
  278. +2 −1 test/workbox-window/window/sw-message-reply.js
  279. +59 −4 test/workbox-window/window/test-Workbox.mjs
  280. +3 −0 tsconfig.json
  281. +3 −0 typescript.eslintrc.js
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ firebase-debug.log
# Generated TypeScript files and build data
tsconfig.tsbuildinfo
packages/workbox-*/**/*.d.ts
!packages/workbox-cli/src/index.d.ts
!packages/workbox-*/src/**/*.d.ts
packages/workbox-*/**/*.js
!packages/workbox-build/**/*.js
!packages/workbox-webpack-plugin/**/*.js
3 changes: 0 additions & 3 deletions .ncurc.js
Original file line number Diff line number Diff line change
@@ -8,8 +8,5 @@ module.exports = {
// See https://github.com/GoogleChrome/workbox/issues/2479
'@octokit/rest',
'service-worker-mock',
// See https://github.com/GoogleChrome/workbox/issues/2602
'@typescript-eslint/eslint-plugin',
'@typescript-eslint/parser',
],
};
2 changes: 1 addition & 1 deletion demos/src/workbox-background-sync-demo/sw.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
importScripts('https://storage.googleapis.com/workbox-cdn/releases/5.1.2/workbox-sw.js');
importScripts('https://storage.googleapis.com/workbox-cdn/releases/6.1.5/workbox-sw.js');

// Note: Ignore the error that Glitch raises about workbox being undefined.
workbox.setConfig({
2 changes: 1 addition & 1 deletion demos/src/workbox-broadcast-update-demo/sw.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
importScripts('https://storage.googleapis.com/workbox-cdn/releases/5.1.2/workbox-sw.js');
importScripts('https://storage.googleapis.com/workbox-cdn/releases/6.1.5/workbox-sw.js');

workbox.setConfig({
debug: true,
2 changes: 1 addition & 1 deletion demos/src/workbox-cacheable-response/sw.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
importScripts('https://storage.googleapis.com/workbox-cdn/releases/5.1.2/workbox-sw.js');
importScripts('https://storage.googleapis.com/workbox-cdn/releases/6.1.5/workbox-sw.js');

workbox.setConfig({
debug: true,
2 changes: 1 addition & 1 deletion demos/src/workbox-core/sw.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
importScripts('https://storage.googleapis.com/workbox-cdn/releases/5.1.2/workbox-sw.js');
importScripts('https://storage.googleapis.com/workbox-cdn/releases/6.1.5/workbox-sw.js');

// Note: Ignore the error that Glitch raises about workbox being undefined.
workbox.setConfig({
2 changes: 1 addition & 1 deletion demos/src/workbox-expiration/sw.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
importScripts('https://storage.googleapis.com/workbox-cdn/releases/5.1.2/workbox-sw.js');
importScripts('https://storage.googleapis.com/workbox-cdn/releases/6.1.5/workbox-sw.js');

// Note: Ignore the error that Glitch raises about workbox being undefined.
workbox.setConfig({
2 changes: 1 addition & 1 deletion demos/src/workbox-google-analytics/sw.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
importScripts('https://storage.googleapis.com/workbox-cdn/releases/5.1.2/workbox-sw.js');
importScripts('https://storage.googleapis.com/workbox-cdn/releases/6.1.5/workbox-sw.js');

workbox.setConfig({
debug: true,
2 changes: 1 addition & 1 deletion demos/src/workbox-navigation-preload/sw.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
importScripts('https://storage.googleapis.com/workbox-cdn/releases/5.1.2/workbox-sw.js');
importScripts('https://storage.googleapis.com/workbox-cdn/releases/6.1.5/workbox-sw.js');

workbox.setConfig({
debug: true,
2 changes: 1 addition & 1 deletion demos/src/workbox-precaching/sw-1.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
importScripts('https://storage.googleapis.com/workbox-cdn/releases/5.1.2/workbox-sw.js');
importScripts('https://storage.googleapis.com/workbox-cdn/releases/6.1.5/workbox-sw.js');

workbox.setConfig({
debug: true,
2 changes: 1 addition & 1 deletion demos/src/workbox-precaching/sw-2.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
importScripts('https://storage.googleapis.com/workbox-cdn/releases/5.1.2/workbox-sw.js');
importScripts('https://storage.googleapis.com/workbox-cdn/releases/6.1.5/workbox-sw.js');

workbox.setConfig({
debug: true,
2 changes: 1 addition & 1 deletion demos/src/workbox-range-requests/sw.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
importScripts('https://storage.googleapis.com/workbox-cdn/releases/5.1.2/workbox-sw.js');
importScripts('https://storage.googleapis.com/workbox-cdn/releases/6.1.5/workbox-sw.js');

workbox.setConfig({
debug: true,
2 changes: 1 addition & 1 deletion demos/src/workbox-routing/sw.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
importScripts('https://storage.googleapis.com/workbox-cdn/releases/5.1.2/workbox-sw.js');
importScripts('https://storage.googleapis.com/workbox-cdn/releases/6.1.5/workbox-sw.js');

workbox.setConfig({
debug: true,
2 changes: 1 addition & 1 deletion demos/src/workbox-strategies/sw.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
importScripts('https://storage.googleapis.com/workbox-cdn/releases/5.1.2/workbox-sw.js');
importScripts('https://storage.googleapis.com/workbox-cdn/releases/6.1.5/workbox-sw.js');
// To avoid async issues, we load strategies before we call it in the event listener
workbox.loadModule('workbox-strategies');
// Note: Ignore the error that Glitch raises about workbox being undefined.
2 changes: 1 addition & 1 deletion demos/src/workbox-streams/sw.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
importScripts('https://storage.googleapis.com/workbox-cdn/releases/5.1.2/workbox-sw.js');
importScripts('https://storage.googleapis.com/workbox-cdn/releases/6.1.5/workbox-sw.js');

workbox.setConfig({
debug: true,
2 changes: 1 addition & 1 deletion demos/src/workbox-sw/sw.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
importScripts('https://storage.googleapis.com/workbox-cdn/releases/5.1.2/workbox-sw.js');
importScripts('https://storage.googleapis.com/workbox-cdn/releases/6.1.5/workbox-sw.js');

// Note: Ignore the error that Glitch raises about workbox being undefined.
workbox.setConfig({
2 changes: 1 addition & 1 deletion demos/src/workbox-window/sw.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
importScripts('https://storage.googleapis.com/workbox-cdn/releases/5.1.2/workbox-sw.js');
importScripts('https://storage.googleapis.com/workbox-cdn/releases/6.1.5/workbox-sw.js');

workbox.setConfig({
debug: true,
46 changes: 46 additions & 0 deletions gulp-tasks/build-node-packages.js
Original file line number Diff line number Diff line change
@@ -8,6 +8,8 @@

const {parallel} = require('gulp');
const execa = require('execa');
const fse = require('fs-extra');
const TJS = require('typescript-json-schema');
const upath = require('upath');

const constants = require('./utils/constants');
@@ -28,7 +30,51 @@ async function buildNodePackage(packagePath) {
], {preferLocal: true});
}

async function generateWorkboxBuildJSONSchema(packagePath) {
const program = TJS.programFromConfig(upath.join(packagePath,
'tsconfig.json'));
const generator = TJS.buildGenerator(program, {
noExtraProps: true,
required: true,
});
const optionTypes = [
'GenerateSWOptions',
'GetManifestOptions',
'InjectManifestOptions',
'WebpackGenerateSWOptions',
'WebpackInjectManifestOptions',
];
for (const optionType of optionTypes) {
const schema = generator.getSchemaForSymbol(optionType);

if (schema.properties.manifestTransforms) {
schema.properties.manifestTransforms.items = {};
}

if (schema.properties.exclude) {
schema.properties.exclude.items = {};
}

if (schema.properties.include) {
schema.properties.include.items = {};
}

if (schema.definitions.RouteMatchCallback) {
schema.definitions.RouteMatchCallback = {};
}

await fse.writeJSON(upath.join(packagePath, 'src', 'schema',
`${optionType}.json`), schema, {spaces: 2});
}
}

async function buildNodeTSPackage(packagePath) {
// Hardcode special logic for workbox-build, as it's the only package
// that requires JSON schema generation.
if (packagePath.endsWith('workbox-build')) {
await generateWorkboxBuildJSONSchema(packagePath);
}

await execa('tsc', ['-b', packagePath], {preferLocal: true});
}

12 changes: 7 additions & 5 deletions gulp-tasks/build-packages.js
Original file line number Diff line number Diff line change
@@ -23,9 +23,11 @@ async function cleanPackage(packagePath) {
if (await fse.pathExists(upath.join(packagePath, 'src', 'index.ts'))) {
// Store the list of deleted files, so we can delete directories after.
const deletedPaths = await del([
upath.join(packagePath, '**/*.+(js|mjs|d.ts)'),
`${packagePath}/**/*.+(js|mjs|d.ts)`,
// Don't delete files in node_modules.
'!**/node_modules', '!**/node_modules/**/*',
'!**/node_modules/**/*',
// Don't delete anything under src.
`!${packagePath}/src/**/*`,
]);

// Any directories in `deletedPaths` that are top-level directories to the
@@ -57,12 +59,12 @@ module.exports = {
build_packages_clean: cleanSequence(),
build_packages: series(
cleanSequence(),
// This needs to be a series, not in parallel, so that there isn't a
// race condition with the terser nameCache.
series(build_sw_packages, build_window_packages),
parallel(
build_node_packages,
build_node_ts_packages,
// This needs to be a series, not in parallel, so that there isn't a
// race condition with the terser nameCache.
series(build_sw_packages, build_window_packages),
),
),
};
1 change: 1 addition & 0 deletions gulp-tasks/lint.js
Original file line number Diff line number Diff line change
@@ -28,5 +28,6 @@ async function lint_ts() {
module.exports = {
lint_js,
lint_ts,
// Temporarily disable lint_ts until we upgrade our ESLint dependencies.
lint: parallel(lint_js, lint_ts),
};
4 changes: 2 additions & 2 deletions gulp-tasks/utils/constants.js
Original file line number Diff line number Diff line change
@@ -14,8 +14,8 @@ module.exports = {
GENERATED_RELEASE_FILES_DIRNAME: 'generated-release-files',

// This is used in the publish-bundle step to avoid doing anything
// with tags < v4.0.0.
MIN_RELEASE_TAG_TO_PUBLISH: 'v6.1.1',
// with tags that have known issues.
MIN_RELEASE_TAG_TO_PUBLISH: 'v6.1.5',
GITHUB_OWNER: 'GoogleChrome',
GITHUB_REPO: 'workbox',

6 changes: 3 additions & 3 deletions gulp-tasks/utils/versioned-cdn-url.js
Original file line number Diff line number Diff line change
@@ -6,8 +6,8 @@
https://opensource.org/licenses/MIT.
*/

const {getCDNOrigin} = require(
'../../packages/workbox-build/src/lib/cdn-utils');
const cdn = require('../../packages/workbox-build/src/cdn-details.json');
const lernaPkg = require('../../lerna.json');

module.exports = () => `${getCDNOrigin()}/${lernaPkg.version}`;
module.exports = () => `${cdn.origin}/${cdn.bucketName}/${cdn.releasesDir}` +
`/${lernaPkg.version}`;
2 changes: 1 addition & 1 deletion infra/testing/server/routes/sw-bundle.js
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@ async function handler(req, res) {
plugins: [
multiEntry(),
nodeResolve({
moduleDirectories: ['packages'],
moduleDirectories: ['packages', 'node_modules'],
}),
// TODO(philipwalton): some of our shared testing helpers use commonjs
// so we have to support this for the time being.
4 changes: 3 additions & 1 deletion infra/testing/validator/service-worker-runtime.js
Original file line number Diff line number Diff line change
@@ -198,7 +198,9 @@ module.exports = async ({

vm.runInNewContext(swString, context);

validateMethodCalls({methodsToSpies, expectedMethodCalls, context});
if (expectedMethodCalls) {
validateMethodCalls({methodsToSpies, expectedMethodCalls, context});
}

// Optionally check the usage of addEventListener().
if (addEventListenerValidation) {
2 changes: 1 addition & 1 deletion infra/testing/webpack-build-check.js
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
*/

function joinMessages(errorsOrWarnings) {
if ('message' in errorsOrWarnings[0]) {
if (errorsOrWarnings[0].message) {
return errorsOrWarnings.map((item) => item.message).join('\n');
} else {
return errorsOrWarnings.join('\n');
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -3,5 +3,5 @@
"packages": [
"packages/*"
],
"version": "6.1.5"
"version": "6.2.0"
}
Loading