Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

workbox-navigation-preload

Package Overview
Dependencies
Maintainers
6
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

workbox-navigation-preload - npm Package Compare versions

Comparing version 6.3.0 to 6.4.0

2

_version.js
"use strict";
// @ts-ignore
try {
self['workbox:navigation-preload:6.2.4'] && _();
self['workbox:navigation-preload:6.3.0'] && _();
}
catch (e) { }

@@ -6,3 +6,3 @@ this.workbox = this.workbox || {};

try {
self['workbox:navigation-preload:6.2.4'] && _();
self['workbox:navigation-preload:6.3.0'] && _();
} catch (e) {}

@@ -9,0 +9,0 @@

@@ -1,2 +0,2 @@

this.workbox=this.workbox||{},this.workbox.navigationPreload=function(t){"use strict";try{self["workbox:navigation-preload:6.2.4"]&&_()}catch(t){}function e(){return Boolean(self.registration&&self.registration.navigationPreload)}return t.disable=function(){e()&&self.addEventListener("activate",(t=>{t.waitUntil(self.registration.navigationPreload.disable().then((()=>{})))}))},t.enable=function(t){e()&&self.addEventListener("activate",(e=>{e.waitUntil(self.registration.navigationPreload.enable().then((()=>{t&&self.registration.navigationPreload.setHeaderValue(t)})))}))},t.isSupported=e,t}({});
this.workbox=this.workbox||{},this.workbox.navigationPreload=function(t){"use strict";try{self["workbox:navigation-preload:6.3.0"]&&_()}catch(t){}function e(){return Boolean(self.registration&&self.registration.navigationPreload)}return t.disable=function(){e()&&self.addEventListener("activate",(t=>{t.waitUntil(self.registration.navigationPreload.disable().then((()=>{})))}))},t.enable=function(t){e()&&self.addEventListener("activate",(e=>{e.waitUntil(self.registration.navigationPreload.enable().then((()=>{t&&self.registration.navigationPreload.setHeaderValue(t)})))}))},t.isSupported=e,t}({});
//# sourceMappingURL=workbox-navigation-preload.prod.js.map

@@ -5,5 +5,20 @@ import { disable } from './disable.js';

import './_version.js';
interface NavigationPreloadState {
enabled?: boolean;
headerValue?: string;
}
interface NavigationPreloadManager {
disable(): Promise<void>;
enable(): Promise<void>;
getState(): Promise<NavigationPreloadState>;
setHeaderValue(value: string): Promise<void>;
}
declare global {
interface ServiceWorkerRegistration {
readonly navigationPreload: NavigationPreloadManager;
}
}
/**
* @module workbox-navigation-preload
*/
export { disable, enable, isSupported, };
export { disable, enable, isSupported };

@@ -15,2 +15,2 @@ /*

*/
export { disable, enable, isSupported, };
export { disable, enable, isSupported };
{
"name": "workbox-navigation-preload",
"version": "6.3.0",
"version": "6.4.0",
"license": "MIT",

@@ -25,5 +25,5 @@ "author": "Google's Web DevRel Team",

"dependencies": {
"workbox-core": "6.3.0"
"workbox-core": "6.4.0"
},
"gitHead": "03055e64014a46f6cc977a3a50ad814c6409d36a"
"gitHead": "cdad230c678a3626c217615d5792eb0f1c77194c"
}
// @ts-ignore
try{self['workbox:navigation-preload:6.3.0']&&_()}catch(e){}
try{self['workbox:navigation-preload:6.4.0']&&_()}catch(e){}

@@ -13,3 +13,2 @@ /*

// Give TypeScript the correct global.

@@ -27,7 +26,7 @@ declare let self: ServiceWorkerGlobalScope;

event.waitUntil(
self.registration.navigationPreload.disable().then(() => {
if (process.env.NODE_ENV !== 'production') {
logger.log(`Navigation preload is disabled.`);
}
})
self.registration.navigationPreload.disable().then(() => {
if (process.env.NODE_ENV !== 'production') {
logger.log(`Navigation preload is disabled.`);
}
}),
);

@@ -34,0 +33,0 @@ });

@@ -13,3 +13,2 @@ /*

// Give TypeScript the correct global.

@@ -32,12 +31,14 @@ declare let self: ServiceWorkerGlobalScope;

event.waitUntil(
self.registration.navigationPreload.enable().then(() => {
self.registration.navigationPreload.enable().then(() => {
// Defaults to Service-Worker-Navigation-Preload: true if not set.
if (headerValue) {
void self.registration.navigationPreload.setHeaderValue(headerValue);
}
if (headerValue) {
void self.registration.navigationPreload.setHeaderValue(
headerValue,
);
}
if (process.env.NODE_ENV !== 'production') {
logger.log(`Navigation preload is enabled.`);
}
})
if (process.env.NODE_ENV !== 'production') {
logger.log(`Navigation preload is enabled.`);
}
}),
);

@@ -44,0 +45,0 @@ });

@@ -14,3 +14,21 @@ /*

// See https://github.com/GoogleChrome/workbox/issues/2946
interface NavigationPreloadState {
enabled?: boolean;
headerValue?: string;
}
interface NavigationPreloadManager {
disable(): Promise<void>;
enable(): Promise<void>;
getState(): Promise<NavigationPreloadState>;
setHeaderValue(value: string): Promise<void>;
}
declare global {
interface ServiceWorkerRegistration {
readonly navigationPreload: NavigationPreloadManager;
}
}
/**

@@ -20,6 +38,2 @@ * @module workbox-navigation-preload

export {
disable,
enable,
isSupported,
};
export {disable, enable, isSupported};

@@ -11,3 +11,2 @@ /*

// Give TypeScript the correct global.

@@ -14,0 +13,0 @@ declare let self: ServiceWorkerGlobalScope;

@@ -8,8 +8,4 @@ {

},
"include": [
"src/**/*.ts"
],
"references": [
{ "path": "../workbox-core/" }
]
"include": ["src/**/*.ts"],
"references": [{"path": "../workbox-core/"}]
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc