Skip to content

Conversation

@piotr-cz
Copy link
Contributor

@piotr-cz piotr-cz commented Dec 2, 2024

Description

The reloadPage parameter of updateServiceWorker has been deprecated in v0.13.3...v0.14.0 and has no effect.

This adds the @deprecated jsdoc tag which shows in VScode

Linked Issues

none

Additional Context

To test, open examples/preact-router/src/ReloadPrompt.tsx#L53 in VSCode and point over updateServiceWorker(true):

image

@netlify
Copy link

netlify bot commented Dec 2, 2024

Deploy Preview for vite-plugin-pwa-legacy ready!

Name Link
🔨 Latest commit 5213c1c
🔍 Latest deploy log https://app.netlify.com/sites/vite-plugin-pwa-legacy/deploys/674d97fef25cbc0008b0f5d2
😎 Deploy Preview https://deploy-preview-802--vite-plugin-pwa-legacy.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@userquin
Copy link
Member

FYI: In a few weeks I want to release v1.0.0, all the deprecations will be removed.

@piotr-cz
Copy link
Contributor Author

piotr-cz commented Apr 8, 2025

Codebase for v1.0.0 still contains the deprecated reloadPage parameter (which has no effect).
I think you can merge this PR and remove that parameter in next minor version

/**
* Registers the service worker returning a callback to reload the current page when an update is found.
*
* @param options the options to register the service worker.
* @return (reloadPage?: boolean) => Promise<void> From version 0.13.2+ `reloadPage` param is not used anymore.
*/
export function registerSW(options?: RegisterSWOptions): (reloadPage?: boolean) => Promise<void>
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants