Skip to content

Commit

Permalink
Revert Workbox 7.3.0 to 7.1.0, code quality improvements
Browse files Browse the repository at this point in the history
Workbox 7.3.0 was not yet available on the Google APIs server for some reason.

Check here to determine when it can actually be updated in the future:
https://storage.googleapis.com/workbox-cdn/releases/7.3.0/workbox-core.prod.js
  • Loading branch information
chrisblakley committed Oct 30, 2024
1 parent 47279bd commit cf7e3b7
Show file tree
Hide file tree
Showing 15 changed files with 33 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .github/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "nebula-wp",
"title": "Nebula",
"description": "Advanced Starter WordPress Theme for Developers",
"version": "12.5.30.593",
"version": "12.5.30.636",
"homepage": "https://gearside.com/nebula/",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion Nebula-Child/assets/css/admin.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Nebula-Child/assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jQuery(function(){
window.performance.measure('(Child) DOM Ready Functions', '(Child) DOM Ready [Start]', '(Child) DOM Ready [End]', {
detail: {
devtools: {
dataType: "track-entry",
track: "Nebula",
dataType: 'track-entry',
track: 'Nebula',
}
}
});
Expand All @@ -48,8 +48,8 @@ window.addEventListener('load', function(){
window.performance.measure('(Child) Window Load Functions', '(Child) Window Load [Start]', '(Child) Window Load [End]', {
detail: {
devtools: {
dataType: "track-entry",
track: "Nebula",
dataType: 'track-entry',
track: 'Nebula',
}
}
});
Expand Down
4 changes: 2 additions & 2 deletions Nebula-Child/resources/sw.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
//BEGIN automated edits. These will be automatically overwritten.
const THEME_NAME = 'nebula-child';
const NEBULA_VERSION = 'v12.5.30.593'; //Wednesday, October 30, 2024 2:13:16 PM
const NEBULA_VERSION = 'v12.5.30.636'; //Wednesday, October 30, 2024 3:15:21 PM
const OFFLINE_URL = 'https://nebula.gearside.com/offline/';
const OFFLINE_IMG = 'https://nebula.gearside.com/wp-content/themes/Nebula-main/assets/img/offline.svg';
const META_ICON = 'https://nebula.gearside.com/wp-content/themes/Nebula-main/assets/img/meta/android-chrome-512x512.png';
const MANIFEST = 'https://nebula.gearside.com/wp-content/themes/Nebula-main/inc/manifest.json';
const HOME_URL = 'https://nebula.gearside.com/';
//END automated edits

importScripts('https://cdn.jsdelivr.net/npm/workbox-sw@7.3.0/build/workbox-sw.min.js'); //DO NOT FORGET: Update Workbox Window in the optimization.js module!
importScripts('https://cdn.jsdelivr.net/npm/workbox-sw@7.1.0/build/workbox-sw.min.js'); //DO NOT FORGET: Update Workbox Window in the optimization.js module!
workbox.setConfig({debug: false}); //https://developers.google.com/web/tools/workbox/guides/troubleshoot-and-debug
//The Service Worker console can be inspected by visiting chrome://inspect/#service-workers

Expand Down
4 changes: 2 additions & 2 deletions Nebula-Child/style.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/admin.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/critical.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/login.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/css/pre.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions assets/js/modules/optimization.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ nebula.performanceMetrics = async function(){
window.performance.measure('(Nebula) Until CPU Idle', 'navigationStart', '(Nebula) CPU Idle', {
detail: {
devtools: {
dataType: "track-entry",
track: "Nebula",
dataType: 'track-entry',
track: 'Nebula',
}
}
});
Expand Down Expand Up @@ -176,7 +176,7 @@ nebula.workbox = async function(){
window.performance.mark('(Nebula) SW Registration [Start]');

//Dynamically import Workbox-Window
import('https://cdn.jsdelivr.net/npm/workbox-window@7.3.0/build/workbox-window.prod.mjs').then(function(module){
import('https://cdn.jsdelivr.net/npm/workbox-window@7.1.0/build/workbox-window.prod.mjs').then(function(module){
const Workbox = module.Workbox;
const workbox = new Workbox(nebula.site.sw_url);

Expand Down Expand Up @@ -289,13 +289,13 @@ nebula.unregisterServiceWorker = function(){

//Clear the caches
nebula.emptyCaches = async function(){
if ( 'caches' in window ){
const names = await caches.keys();
for ( let name of names ){
if ( 'caches' in window ){
const names = await caches.keys();
for ( let name of names ){
await nebula.yield();
await caches.delete(name);
}
}
await caches.delete(name);
}
}
};

//Progressive Web App functions (when the user installs the PWA onto their device)
Expand Down
8 changes: 4 additions & 4 deletions assets/js/nebula.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,16 +126,16 @@ jQuery(window).on('load', function(){
window.performance.measure('(Nebula) Window Load Functions', '(Nebula) Window Load [Start]', '(Nebula) Window Load [End]', {
detail: {
devtools: {
dataType: "track-entry",
track: "Nebula",
dataType: 'track-entry',
track: 'Nebula',
}
}
});
window.performance.measure('(Nebula) Window Loaded', 'navigationStart', '(Nebula) Window Load [End]', {
detail: {
devtools: {
dataType: "track-entry",
track: "Nebula",
dataType: 'track-entry',
track: 'Nebula',
}
}
});
Expand Down
Loading

0 comments on commit cf7e3b7

Please sign in to comment.