Releases: GoogleChromeLabs/pwa-wp
0.8.2
What's Changed
- Bump minimum PHP and WP versions by @westonruter in #1204
- Upgrade Workbox to 7.3.0 by @westonruter in #1205
- Update all dependencies.
Full Changelog: 0.8.1...0.8.2
0.8.1
This release updates dependencies, bumps minimum WP version to 6.4, and ups the latest tested WP version to 6.5.
Full Changelog: 0.8.0...0.8.1
0.8.0
What's Changed
- Improve performance of denylist patterns by @westonruter in #780
- Add id attribute to check network and reload script by @thelovekesh in #793
- Update dependabot to run weekly by @westonruter in #821
- Fix PHPStan analysis errors; Update
Build, test & measure
workflow by @thelovekesh in #935 - Handle the case when
theme_color
is not set by @rafaucau in #909 - Eliminate redundant Short Name field row by @westonruter in #954
- Fix multi-byte characters sanitization in short name field by @thelovekesh in #984
- Replace mysqladmin by @westonruter in #1015
- Disable missing eslint rule: jsdoc/newline-after-description by @westonruter in #1016
- Add grouping of WordPress dependency updates by @westonruter in #1022
- Update Node to v20 and inter-dependent update packages for ESLint by @westonruter in #1093
- Fix PHP CI including PHPCS and PHPUnit; bump PHP/WP versions by @westonruter in #1095
- Fix inefficient rewrite flushing by @westonruter in #1096
- Workbox is upgraded from v6.5.3 to v7.0.0.
See also issues and pull requests in the 0.8 milestone.
Full Changelog: 0.7.0...0.8.0
Props
Lovekesh Kumar (@thelovekesh), Rafał Całka (@rafaucau), Pascal Birchler (@swissspidy), Weston Ruter (@westonruter)
0.7.1
This release includes just one change:
- Improve performance of denylist patterns. (#780)
Compare all changes in 0.7.0...0.7.1.
Installation
Now available to install via WordPress.org.
You can also install the pwa.zip
build linked below by uploading it in the WordPress admin.
0.7.0
This release includes 16 closed issues and 27 merged pull requests (aside from dependency updates including updating Workbox to v6.5.3).
For a full list of issues and pull requests, see the 0.7 milestone. Compare all changes in 0.6.0...0.7.0.
Changelog
Service Worker
- Make use of Workbox window to register service worker and provide access to registration. #204, #578, #777
- Eliminate custom
skipWaiting
message in favor of de facto Workbox message. #444, #578 - Deprecate integrations. #403, #713
- Prevent errors from being raised on IE11. #227, #578
- Use
plugins_url()
to allow for filtering of Workbox.js script URLs so they can be loaded from CDN. #543, #600 - Don't flush rewrite rules on every admin request. #544
- Update
wp_register_service_worker_caching_route()
to reflect change to underlying register method. #424
Offline Page
- Remove offline commenting feature and add post request handler to display offline/error templates. #363, #728
- Automatically reload the offline page once the user is back online. #438, #697, #763, #716
- Only unauthenticate user when
parse_query
is for the main query, fixing PHP notice foris_offline()
being called incorrectly. #538, #712 - Update error messages placeholders to use Mustache tags instead of HTML comments to avoid stripping by minifiers. #709, #720
- Use
wp_robots()
to prevent indexing the error template on WP≥5.7. #414
Web App Manifest
- Add short name field in General Settings when Site Title is longer than 12 characters. #210, #691
- Warn when no Site Icon set, when it is too small, or when a PNG is not being used. #229, #702
- Facilitate indicating the site icon as being maskable. #304, #698, #770
- Output link/meta tags depending on web app manifest display value. #581
- Make
apple-touch-startup-image
link tags filterable. Note: Safari as of 15.4 now supports reading icons from the Web App Manifest making this customlink[rel=apple-touch-startup-image]
obsolete going forward. #586, #595
HTTPS
- Remove HTTPS detection/migration since landed in WP 5.7. #557
Misc
- Introduce PHPStan for static analysis. #243, #560, #563
- Make README.md canonical, generating readme.txt at build time. #400
- Add WordPress-VIP-Go standards for PHPCS. #471, #476
- Add husky. #736, #747
- Fix PHP 8 unit testing. #599
- Add wp-env for development environment. #778
Props
Alberto Medina (@amedina), Ankit Gade (@ankitrox), Derek Herman (@derekherman), Diede Exterkate (@diedexx), Felix Arntz (@felixarntz), Fellyph Cintra (@fellyph), Greg Ziółkowski (@gziolo), Jeffery To (@jefferyto), Jip (@moorscode), Lovekesh Kumar (@thelovekesh), Maitreyie Chavan (@maitreyie-chavan), Max Hartshorn (@maxhartshorn), Pierre Gordon (@pierlon), Pooja Killekar (@pooja-muchandikar), Rutvik Savsani (@rutviksavsani), Stew Heckenberg (@Youdaman), Viktor Szépe (@szepeviktor), Weston Ruter (@westonruter)
Installation
Now available to install via WordPress.org.
You can also install the pwa.zip
build linked below by uploading it in the WordPress admin.
0.6.0
This release includes 12 closed issues and 18 merged pull requests (aside from dependency updates including updating Workbox to v5.1.4).
For a full list of issues and pull requests, see the 0.6 milestone. Compare all changes in 0.5.0...0.6.0.
Changelog
Service Worker
- ✨ Add default caching strategies for navigations and assets from core, themes, plugins, and uploaded images. This, along with the UI to opt-in for offline browsing (below), eliminates the need for having a separate helper plugin (e.g. Basic Site Caching) to make a site available offline. The default caching strategy configurations are informed by data from HTTP Archive, although there are new filters to customize them (such as increasing the number of assets stored in cache). See the pull request description for full details. #338, #265, #176, #264
- ✨ Provide means of opting-in to offline browsing via a new toggle on the Reading Settings screen.
#344, #365 - ✨ Add
offline.php
template for the Twenty Twenty-One theme. #361 - Use pretty permalink for frontend service worker, using
/wp.serviceworker
instead of/?wp_service_worker=1
. #287, #289 - Fix support for serving 304 Not Modified service worker script responses. #291
- Update wording of the server offline message. #314
- Avoid constructing asset versions with HTML entities in context of SW. #325
- Correct version handling for precached assets. #317
- Eliminate use of
wp_service_worker_json_encode()
. #341, #359 - Update the way a navigation route is registered (for single page apps). #319, #320
- Add
X-Robots-Tag
to service worker response for good measure. #300, #330 - Guard against scripts and styles being erroneously printed in service worker at the
wp_enqueue_scripts
action. #293, #336
Web App Manifest
- Serve Web App Manifest with a Content-Type of
application/manifest+json
. #306, #349 - Add helper function to obtain the URL for the Web App Manifest. #305
HTTPS
- Allow HTTPS detection and UI to be disabled. #308
Misc
- Mark all classes as
final
. #340, #360 - Eliminate Travis in favor of GitHub Actions for linting and testing. #197, #354
- Migrate default branch name from
master
todevelop
. #296
Props
Alberto Medina (@amedina), Alejandro Vargas (@avargaz), Daniel Olson (@emaildano), Derek Herman (@derekherman), Erick Hitter (@ethitter), Felix Arntz (@felixarntz), Gary Jones (@GaryJones), Hidetaka Okamoto (@hideokamoto), Ian Dunn (@iandunn), Jeffrey Posnick (@jeffposnick), Jono Alderson (@jono-alderson), Koen Van den Wijngaert (@vdwijngaert), Kurt Zenisek (@KZeni), Pascal Birchler (@swissspidy), Piotr Delawski (@delawski), Weston Ruter (@westonruter)
Installation
Now available to install via WordPress.org.
You can also install the pwa.zip
build linked below by uploading it in the WordPress admin.
0.6.0-RC1
This is the first release candidate of v0.6.0. It includes 12 closed issues and 18 merged pull requests (aside from dependency updates including updating Workbox to v5.1.4).
For a full list of issues and pull requests, see the 0.6 milestone. Compare all changes in 0.5.0...0.6.0-RC1.
Changelog
Service Worker
- ✨ Add default caching strategies for navigations and assets from core, themes, plugins, and uploaded images. This, along with the UI to opt-in for offline browsing (below), eliminates the need for having a separate helper plugin (e.g. Basic Site Caching) to make a site available offline. The default caching strategy configurations are informed by data from HTTP Archive, although there are new filters to customize them (such as increasing the number of assets stored in cache). See the pull request description for full details. #338, #265, #176, #264
- ✨ Provide means of opting-in to offline browsing via a new toggle on the Reading Settings screen.
#344, #365 - ✨ Add
offline.php
template for the Twenty Twenty-One theme. #361 - Use pretty permalink for frontend service worker, using
/wp.serviceworker
instead of/?wp_service_worker=1
. #287, #289 - Fix support for serving 304 Not Modified service worker script responses. #291
- Update wording of the server offline message. #314
- Avoid constructing asset versions with HTML entities in context of SW. #325
- Correct version handling for precached assets. #317
- Eliminate use of
wp_service_worker_json_encode()
. #341, #359 - Update the way a navigation route is registered (for single page apps). #319, #320
- Add
X-Robots-Tag
to service worker response for good measure. #300, #330 - Guard against scripts and styles being erroneously printed in service worker at the
wp_enqueue_scripts
action. #293, #336
Web App Manifest
- Serve Web App Manifest with a Content-Type of
application/manifest+json
. #306, #349 - Add helper function to obtain the URL for the Web App Manifest. #305
HTTPS
- Allow HTTPS detection and UI to be disabled. #308
Misc
- Mark all classes as
final
. #340, #360 - Eliminate Travis in favor of GitHub Actions for linting and testing. #197, #354
- Migrate default branch name from
master
todevelop
. #296
Props
Alberto Medina (@amedina), Alejandro Vargas (@avargaz), Daniel Olson (@emaildano), Derek Herman (@derekherman), Erick Hitter (@ethitter), Felix Arntz (@felixarntz), Gary Jones (@GaryJones), Hidetaka Okamoto (@hideokamoto), Ian Dunn (@iandunn), Jeffrey Posnick (@jeffposnick), Jono Alderson (@jono-alderson), Koen Van den Wijngaert (@vdwijngaert), Kurt Zenisek (@KZeni), Pascal Birchler (@swissspidy), Piotr Delawski (@delawski), Weston Ruter (@westonruter)
Installation
You can install the pwa.zip
build linked below by uploading it in the WordPress admin.
0.5.0
This release includes 7 closed issues and 2 merged pull requests (aside from dependency updates). The two key changes are:
- ✨ Prevent service worker from varying by authentication state (and prevent auto-reloading). This is by far the most important update in this release, and it addresses some key pain points that have come to light with usage across the 30k+ active installs. #279, #205, #166, #202, #249, #223, #277
- When an updated service worker is activated, the window will not automatically reload.
- As soon as a service worker is installed, clients are now claimed by default; this makes sense to do since WordPress pages are not (normally) single-page-applications. In other words, a page accessed without a service worker is the same as a page served with a service worker (it's just the latter may be served from cache). If
clients.claim()
is not desired, it can be disabled viaadd_filter( 'wp_service_worker_clients_claim', '__return_false' )
. This seems the best default for at least the 80% use case. - Eliminate the “update site” link which was (rarely) shown. It was only shown when skip-waiting was disabled and if the admin bar was showing. Now skip-waiting is enabled and no reloading is being done, there is no need for this additional button. If a site wants to disable skip-waiting and add such a button, they can still do so. Again, it's removed since it's not deemed part in the 80% use case.
- Prevent the error templates for offline and 500 from being served with logged-in user state. Site owners should expect that that user-specific information should not be displayed on this page. This prevents the need for the service worker to update once logging-in or logging-out.
- In the same way, the service workers are also served with the user authentication being cleared to avoid serving user-specific information in the service worker. This also guards against the service worker varying by authentication state. This is somewhat similar to how the REST API behaves. Nevertheless, this may end up being an undesirable and we'll need to watch this for use cases. It could be useful to serve some auth key (e.g. REST API nonce) in the service worker, but this would end up being a pain as well once the key expires.
- 🐛 Prevent attempting to precache empty URLs which causes SW install failure. #271, #270
For a full list of issues and pull requests, see the 0.5 milestone. Compare all changes in 0.4.0...0.5.0.
Installation
Now available to install via WordPress.org.
You can also install the pwa.zip
build linked below by uploading it in the WordPress admin.
0.4.0
This release includes 9 closed issues and 26 merged pull requests. For a full list intended for this release, see the 0.4 milestone. Compare all changes in 0.3.0...0.4.0. A summary of the changes in this release:
Changelog
Service Worker
- ✨ Bundle default offline templates (
offline.php
) for each core theme. #199, #225 - ✨ Upgrade Workbox to v5.1.1. #218, #220, #224, #228, #233, #236, #253
- ✨ Prevent Workbox debug messages from cluttering console by introducing new
WP_SERVICE_WORKER_DEBUG_LOG
constant which is used to opt-in to those debug messages, rather than usingWP_DEBUG
. #170, #173 - 🐛 Fix compatibility with translation plugins by ensuring service worker script src is same as scope. #231, #266
- 🏗 Give versioned URL path to Workbox library to ensure cached JS files for older versions are not used upon upgrading. #268
- 🚮 Remove experimental support for streaming responses using theme template parts. #191, #215, #219
Web App Manifest
- ✨ Automatically copy name to
short_name
in web app manifest if not greater than 12 characters. #212 - 🐛 Prevent including HTML entities in web app manifest name and description fields. #226
Other
- 📖 Move documentation to the wiki. #171, #172, #216, #237, #238, #263
- 🏗 Enable Dependabot and update dependencies. #254
Props
Props Alberto Medina (@amedina), Ian Dunn (@iandunn), Pascal Birchler (@swissspidy), Viktor Szépe (@szepeviktor), and Weston Ruter (@westonruter).
Installation
Now available to install via WordPress.org.
You can also install the pwa.zip
build linked below by uploading it in the WordPress admin.
0.3.0
This release includes 30 closed issues and merged pull requests. For a full list intended for this release, see the 0.3 milestone. Compare all changes in 0.2.0...0.3.0. A summary of the changes in this release:
- Eliminate need for disabling navigation preload while adding navigation request caching strategy. #178
- Guard against causing Workbox to call
importScripts()
after SW installation, as this can cause a JS error. #194 - Differentiate between client and server being offline in the messaging on the offline page. #177, #190
- Only use enqueued scripts/style handles in revision to prevent endless reload if skip waiting enabled. #183 #187
- Prevent needless
wordpress_sw_installed
cookie from being set outside the wp-admin. #188, #189 - Skip installation of service worker from post embed iframe. #182
- Eliminate auto-derived
short_name
from manifest since not reliable. #181, #200, #201 - Use name instead of
short_name
for meta tags when latter is not available. #168, #169. - Prevent optimizer plugins from erroneously stripping HTML comments from JS. #155, #165.
- Update Workbox.js to 4.3.1. #154
- Clean up code: remove unused basename calculation; avoid PHP-4 style
intval()
function, use cast instead; remove redundant CSS rule… #164, #162, #157, #159, #156, #161, #158, #163. - Bump minimum required WordPress version to 5.2. #151
- Update npm and composer packages. #195
- Add trailing slash to
start_url
in Web App Manifest. This fixes a lighthouse audit in regards to thestart_url
not being in the service workerscope
on a multisite subdirectory install. #179 - Ensure required global variables are set before applying
admin_title
filter when generating offline/500 error template for admin. #206, #207
Props Alain Schlesser (@schlessera), Ian Dunn (@iandunn), @nuvoPoint, Pascal Birchler (@swissspidy), Ron Rennick (@rrennick), and Weston Ruter (@westonruter).