Skip to content

Commit 3bb7844

Browse files
authored
chore: update dependencies (#563)
1 parent 92f7959 commit 3bb7844

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+2088
-1365
lines changed

client.d.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import './vue'
2-
import './preact'
3-
import './react'
4-
import './svelte'
5-
import './solid'
6-
import './vanillajs'
1+
import './vue.d.ts'
2+
import './preact.d.ts'
3+
import './react.d.ts'
4+
import './svelte.d.ts'
5+
import './solid.d.ts'
6+
import './vanillajs.d.ts'

docs/.vitepress/contributors.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export interface CoreTeam {
1616
links?: SocialEntry[]
1717
}
1818

19-
const createLinks = (tm: CoreTeam): CoreTeam => {
19+
function createLinks(tm: CoreTeam): CoreTeam {
2020
tm.links = [
2121
{ icon: 'github', link: `https://github.com/${tm.github}` },
2222
{ icon: 'twitter', link: `https://twitter.com/${tm.twitter}` },

docs/.vitepress/theme/components/GenerateSWCleanupOutdatedCaches.md

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ We strongly recommend you to **NOT** deactivate the option. If you are curious,
66

77
```ts
88
import { VitePWA } from 'vite-plugin-pwa'
9+
910
export default defineConfig({
1011
plugins: [
1112
VitePWA({

docs/.vitepress/theme/components/GenerateSWSourceMap.md

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ If you want to generate the source map of your service worker, you can use this
66

77
```ts
88
import { VitePWA } from 'vite-plugin-pwa'
9+
910
export default defineConfig({
1011
plugins: [
1112
VitePWA({

docs/.vitepress/theme/components/ReloadPrompt.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ const needRefresh = ref(false)
55
66
let updateServiceWorker: (() => Promise<void>) | undefined
77
8-
const onNeedRefresh = () => {
8+
function onNeedRefresh() {
99
needRefresh.value = true
1010
}
11-
const close = async () => {
11+
async function close() {
1212
needRefresh.value = false
1313
}
1414

docs/frameworks/sveltekit.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ As an example, when using [@sveltejs/adapter-static](https://github.com/sveltejs
6464

6565
::: details 1) add pwa.js script
6666
```js
67-
import { copyFileSync } from 'fs'
67+
import { copyFileSync } from 'node:fs'
6868
import { resolveConfig } from 'vite'
6969
import { VitePWA } from 'vite-plugin-pwa'
7070
import { pwaConfiguration } from './pwa-configuration.js'
@@ -78,7 +78,7 @@ const swDestinations = [
7878
'./build/',
7979
]
8080

81-
const buildPwa = async () => {
81+
async function buildPwa() {
8282
const config = await resolveConfig({ plugins: [VitePWA({ ...pwaConfiguration })] }, 'build', 'production')
8383
// when `vite-plugin-pwa` is present, use it to regenerate SW after rendering
8484
const pwaPlugin = config.plugins.find(i => i.name === 'vite-plugin-pwa')?.api

docs/frameworks/vue.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const {
6363
updateServiceWorker,
6464
} = useRegisterSW()
6565
66-
const close = async () => {
66+
async function close() {
6767
offlineReady.value = false
6868
needRefresh.value = false
6969
}

docs/guide/development.md

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ To enable the service worker on development, you only need to add the following
2020

2121
```ts
2222
import { VitePWA } from 'vite-plugin-pwa'
23+
2324
export default defineConfig({
2425
plugins: [
2526
VitePWA({

docs/guide/faq.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ For example, using `vue-router`, you can register the service worker for `autoUp
9191

9292
```ts
9393
import type { Router } from 'vue-router'
94-
export const registerPWA = (router: Router) => {
94+
95+
export function registerPWA(router: Router) {
9596
router.isReady().then(async () => {
9697
const { registerSW } = await import('virtual:pwa-register')
9798
registerSW({ immediate: true })
@@ -107,6 +108,7 @@ If you are using `prompt` strategy, you will need to load the `ReloadPrompt` com
107108
// src/App.vue
108109
<script setup lang='ts'>
109110
import { defineAsyncComponent } from 'vue'
111+
110112
const ClientReloadPrompt = typeof window !== 'undefined'
111113
? defineAsyncComponent(() => import('./ReloadPrompt.vue'))
112114
: null
@@ -160,10 +162,10 @@ const needRefresh = ref(false)
160162
161163
let updateServiceWorker: (() => Promise<void>) | undefined
162164
163-
const onNeedRefresh = () => {
165+
function onNeedRefresh() {
164166
needRefresh.value = true
165167
}
166-
const close = async () => {
168+
async function close() {
167169
needRefresh.value = false
168170
}
169171

docs/guide/index.md

+3
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ Edit your `vite.config.js / vite.config.ts` file and add the `vite-plugin-pwa`:
5757

5858
```ts
5959
import { VitePWA } from 'vite-plugin-pwa'
60+
6061
export default defineConfig({
6162
plugins: [
6263
VitePWA({ registerType: 'autoUpdate' })
@@ -74,6 +75,7 @@ If you are **NOT** using `vite-plugin-pwa` version `0.12.2+`, there is a bug han
7475
If you're using a `vite-plugin-pwa` plugin version prior to `0.12.2`, you can fix the bug using this plugin configuration:
7576
```ts
7677
import { VitePWA } from 'vite-plugin-pwa'
78+
7779
export default defineConfig({
7880
plugins: [
7981
VitePWA({
@@ -91,6 +93,7 @@ export default defineConfig({
9193
If you want to check it in `dev`, add the `devOptions` option to the plugin configuration (you will have the [Web App Manifest](https://developer.mozilla.org/en-US/docs/Web/Manifest) and the generated service worker):
9294
```ts
9395
import { VitePWA } from 'vite-plugin-pwa'
96+
9497
export default defineConfig({
9598
plugins: [
9699
VitePWA({

docs/guide/inject-manifest.md

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ If you want to change the location and/or the service worker name, you will need
1717
For example, if your service worker is located at `/src/my-sw.js` you must configure it using:
1818
```ts
1919
import { VitePWA } from 'vite-plugin-pwa'
20+
2021
export default defineConfig({
2122
plugins: [
2223
VitePWA({

docs/guide/pwa-minimal-requirements.md

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ To configure the [Web App Manifest](https://developer.mozilla.org/en-US/docs/Web
5050
Following with the example, here a minimal configuration (you must provide all the icons and images):
5151
```ts
5252
import { VitePWA } from 'vite-plugin-pwa'
53+
5354
export default defineConfig({
5455
plugins: [
5556
VitePWA({

docs/guide/register-service-worker.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ title: Register Service Worker | Guide
99
If you want to configure the `injectRegister` plugin option:
1010
```ts
1111
import { VitePWA } from 'vite-plugin-pwa'
12+
1213
export default defineConfig({
1314
plugins: [
1415
VitePWA({

docs/guide/service-worker-precache.md

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ You can find more information in the [Static assets handling](/guide/static-asse
3737
For example, if you need to add `ico`, `png` and `svg` resources in the example from the [Configuring vite-plugin-pwa - Guide](/guide/#configuring-vite-plugin-pwa) section, you will need to add `globPatterns` under `workbox` entry, since we're using the default `vite-plugin-pwa` strategy (`generateSW`):
3838
```ts
3939
import { VitePWA } from 'vite-plugin-pwa'
40+
4041
export default defineConfig({
4142
plugins: [
4243
VitePWA({

docs/scripts/assets.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import fg from 'fast-glob'
22
import fs from 'fs-extra'
3-
// import critical from 'critical'
43

54
const firaFont = 'https://fonts.googleapis.com/css2?family=Fira+Code&display=swap'
65

docs/scripts/build.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { VitePluginPWAAPI } from 'vite-plugin-pwa'
33
import { optimizePages } from './assets'
44
import { pwa } from './pwa'
55

6-
export const buildEnd = async () => {
6+
export async function buildEnd() {
77
await optimizePages()
88
const config = await resolveConfig({ plugins: [pwa()] }, 'build', 'production')
99
// when `vite-plugin-pwa` is presented, use it to regenerate SW after rendering

docs/scripts/pwa.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { VitePWA } from 'vite-plugin-pwa'
22

3-
export const pwa = () => {
3+
export function pwa() {
44
return VitePWA({
55
outDir: '.vitepress/dist',
66
registerType: 'prompt',

docs/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"esModuleInterop": true,
1010
"incremental": false,
1111
"skipLibCheck": true,
12-
"moduleResolution": "node",
12+
"moduleResolution": "bundler",
1313
"resolveJsonModule": true,
1414
"noUnusedLocals": true,
1515
"strictNullChecks": true,

docs/workbox/inject-manifest.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ const data = {
8585

8686
const cacheName = cacheNames.runtime
8787

88-
const buildStrategy = (): Strategy => {
88+
function buildStrategy(): Strategy {
8989
if (race) {
9090
class CacheNetworkRace extends Strategy {
9191
_handle(request: Request, handler: StrategyHandler): Promise<Response | undefined> {

examples/preact-router/client-test/sw.spec.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import process from 'node:process'
12
import { expect, test } from '@playwright/test'
23

34
const injectManifest = process.env.SW === 'true'

examples/preact-router/package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@
4747
"test": "nr test-build-claims && nr test-build-sw-claims"
4848
},
4949
"dependencies": {
50-
"preact": "^10.10.6",
51-
"preact-router": "^4.1.0"
50+
"preact": "^10.17.1",
51+
"preact-router": "^4.1.2"
5252
},
5353
"devDependencies": {
54-
"@preact/preset-vite": "^2.4.0",
55-
"@rollup/plugin-replace": "^5.0.1",
54+
"@preact/preset-vite": "^2.5.0",
55+
"@rollup/plugin-replace": "^5.0.2",
5656
"https-localhost": "^4.7.1",
57-
"rimraf": "^3.0.2",
58-
"typescript": "^5.0.4",
57+
"rimraf": "^5.0.1",
58+
"typescript": "^5.2.2",
5959
"vite": "^4.0.0",
6060
"vite-plugin-pwa": "workspace:*",
6161
"workbox-core": "^7.0.0",

examples/preact-router/playwright.config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import process from 'node:process'
12
import { defineConfig, devices } from '@playwright/test'
23

34
const url = 'http://localhost:4173'

examples/preact-router/test/build.test.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { existsSync, readFileSync } from 'node:fs'
22
import { dirname, resolve } from 'node:path'
33
import { fileURLToPath } from 'node:url'
4+
import process from 'node:process'
5+
46
import { describe, expect, it } from 'vitest'
57

68
const _dirname = typeof __dirname !== 'undefined'
@@ -10,7 +12,7 @@ const _dirname = typeof __dirname !== 'undefined'
1012
const injectManifest = process.env.SW === 'true'
1113
const swName = `${injectManifest ? 'claims-sw.js' : 'sw.js'}`
1214

13-
const resolvePath = (...paths: string[]) => {
15+
function resolvePath(...paths: string[]) {
1416
return resolve(_dirname, ...paths).replace(/\\/g, '/')
1517
}
1618

examples/preact-router/vite.config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import process from 'node:process'
12
import { defineConfig } from 'vite'
23
import preact from '@preact/preset-vite'
34
import { VitePWA } from 'vite-plugin-pwa'

examples/react-router/client-test/sw.spec.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import process from 'node:process'
12
import { expect, test } from '@playwright/test'
23

34
const injectManifest = process.env.SW === 'true'

examples/react-router/package.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,20 @@
4949
"dependencies": {
5050
"react": "^18.2.0",
5151
"react-dom": "^18.2.0",
52-
"react-router": "^6.4.5",
52+
"react-router": "^6.15.0",
5353
"react-router-config": "^5.1.1",
54-
"react-router-dom": "^6.4.5"
54+
"react-router-dom": "^6.15.0"
5555
},
5656
"devDependencies": {
57-
"@rollup/plugin-replace": "^5.0.1",
58-
"@types/react": "^18.0.26",
59-
"@types/react-dom": "^18.0.9",
60-
"@types/react-router-config": "^5.0.6",
57+
"@rollup/plugin-replace": "^5.0.2",
58+
"@types/react": "^18.2.21",
59+
"@types/react-dom": "^18.2.7",
60+
"@types/react-router-config": "^5.0.7",
6161
"@types/react-router-dom": "^5.3.3",
62-
"@vitejs/plugin-react": "^4.0.0",
62+
"@vitejs/plugin-react": "^4.0.4",
6363
"https-localhost": "^4.7.1",
64-
"rimraf": "^3.0.2",
65-
"typescript": "^5.0.4",
64+
"rimraf": "^5.0.1",
65+
"typescript": "^5.2.2",
6666
"vite": "^4.0.0",
6767
"vite-plugin-pwa": "workspace:*",
6868
"workbox-core": "^7.0.0",

examples/react-router/playwright.config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import process from 'node:process'
12
import { defineConfig, devices } from '@playwright/test'
23

34
const url = 'http://localhost:4173'

examples/react-router/src/pages/About.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React from 'react'
2+
23
function About() {
34
// replaced dyanmicaly
45
const date = '__DATE__'

examples/react-router/test/build.test.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { existsSync, readFileSync } from 'node:fs'
22
import { dirname, resolve } from 'node:path'
33
import { fileURLToPath } from 'node:url'
4+
import process from 'node:process'
45
import { describe, expect, it } from 'vitest'
56

67
const _dirname = typeof __dirname !== 'undefined'
@@ -10,7 +11,7 @@ const _dirname = typeof __dirname !== 'undefined'
1011
const injectManifest = process.env.SW === 'true'
1112
const swName = `${injectManifest ? 'claims-sw.js' : 'sw.js'}`
1213

13-
const resolvePath = (...paths: string[]) => {
14+
function resolvePath(...paths: string[]) {
1415
return resolve(_dirname, ...paths).replace(/\\/g, '/')
1516
}
1617

examples/react-router/vite.config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import process from 'node:process'
12
import { defineConfig } from 'vite'
23
import react from '@vitejs/plugin-react'
34
import type { ManifestOptions, VitePWAOptions } from 'vite-plugin-pwa'

examples/solid-router/client-test/sw.spec.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import process from 'node:process'
12
import { expect, test } from '@playwright/test'
23

34
const injectManifest = process.env.SW === 'true'

examples/solid-router/package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,17 @@
4747
"test": "nr test-build-claims && nr test-build-sw-claims"
4848
},
4949
"dependencies": {
50-
"solid-app-router": "^0.4.2",
51-
"solid-js": "^1.6.4"
50+
"@solidjs/router": "^0.8.3",
51+
"solid-js": "^1.7.11"
5252
},
5353
"devDependencies": {
54-
"@rollup/plugin-replace": "^5.0.1",
54+
"@rollup/plugin-replace": "^5.0.2",
5555
"https-localhost": "^4.7.1",
56-
"rimraf": "^3.0.2",
57-
"typescript": "^5.0.4",
56+
"rimraf": "^5.0.1",
57+
"typescript": "^5.2.2",
5858
"vite": "^4.0.0",
5959
"vite-plugin-pwa": "workspace:*",
60-
"vite-plugin-solid": "^2.5.0",
60+
"vite-plugin-solid": "^2.7.0",
6161
"workbox-core": "^7.0.0",
6262
"workbox-precaching": "^7.0.0",
6363
"workbox-routing": "^7.0.0",

examples/solid-router/playwright.config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import process from 'node:process'
12
import { defineConfig, devices } from '@playwright/test'
23

34
const url = 'http://localhost:4173'

examples/solid-router/src/app.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
/* eslint-disable react/no-unknown-property */
21
import type { Component } from 'solid-js'
3-
import { useRoutes } from 'solid-app-router'
2+
import { useRoutes } from '@solidjs/router'
43
import { routes } from './routes'
54
import styles from './app.module.css'
65
import ReloadPrompt from './ReloadPrompt'

examples/solid-router/src/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { render } from 'solid-js/web'
2-
import { Router } from 'solid-app-router'
2+
import { Router } from '@solidjs/router'
33
import App from './app'
44

55
render(

examples/solid-router/src/pages/about.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Link } from 'solid-app-router'
1+
import { Link } from '@solidjs/router'
22

33
export default function About() {
44
// replaced dyanmicaly

examples/solid-router/src/pages/hi/[name].data.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { RouteDataFunc } from 'solid-app-router'
1+
import type { RouteDataFunc } from '@solidjs/router'
22

33
const HiData: RouteDataFunc = (args) => {
44
const name = args.params.name || ''

0 commit comments

Comments
 (0)