@leancodepl/force-update 9.6.5 → 9.6.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +12 -12
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -59,17 +59,17 @@ Vite plugin that creates a `/version` endpoint serving the current app version.
59
59
  import { listenOnForceUpdate } from "@leancodepl/force-update"
60
60
 
61
61
  useEffect(() => {
62
- const cleanup = listenOnForceUpdate({
63
- onNewVersionAvailable: () => {
64
- // Show notification to user or force reload
65
- if (window.confirm("A new version is available. Reload now?")) {
66
- window.location.reload()
67
- }
68
- },
69
- versionCheckIntervalPeriod: 5 * 60 * 1000, // Check every 5 minutes (optional)
70
- })
71
-
72
- return cleanup
62
+ const cleanup = listenOnForceUpdate({
63
+ onNewVersionAvailable: () => {
64
+ // Show notification to user or force reload
65
+ if (window.confirm("A new version is available. Reload now?")) {
66
+ window.location.reload()
67
+ }
68
+ },
69
+ versionCheckIntervalPeriod: 5 * 60 * 1000, // Check every 5 minutes (optional)
70
+ })
71
+
72
+ return cleanup
73
73
  }, [])
74
74
  ```
75
75
 
@@ -92,7 +92,7 @@ import { defineConfig } from "vite"
92
92
  import { vitePluginForceUpdate } from "@leancodepl/force-update"
93
93
 
94
94
  export default defineConfig({
95
- plugins: [vitePluginForceUpdate()],
95
+ plugins: [vitePluginForceUpdate()],
96
96
  })
97
97
  ```
98
98
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leancodepl/force-update",
3
- "version": "9.6.5",
3
+ "version": "9.6.6",
4
4
  "license": "Apache-2.0",
5
5
  "dependencies": {
6
6
  "rxjs": ">=7.0.0"