Skip to content

Commit

Permalink
feat: update pwa plugin to 0.16.5 (#64)
Browse files Browse the repository at this point in the history
* feat: update pwa plugin to 0.16.5

* chore: cleanup + update example dependencies
  • Loading branch information
userquin committed Sep 8, 2023
1 parent 2286b7a commit df5dce6
Show file tree
Hide file tree
Showing 8 changed files with 1,599 additions and 1,192 deletions.
1 change: 1 addition & 0 deletions examples/sveltekit-ts/adapter.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import process from 'node:process'
import AdapterNode from '@sveltejs/adapter-node';
import AdpaterStatic from '@sveltejs/adapter-static';

Expand Down
30 changes: 14 additions & 16 deletions examples/sveltekit-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,23 @@
"test": "nr test-generate-sw && nr test-generate-sw-node && nr test-inject-manifest && nr test-inject-manifest-node"
},
"devDependencies": {
"@playwright/test": "^1.35.0",
"@sveltejs/adapter-static": "^2.0.2",
"@sveltejs/adapter-node": "^1.2.4",
"@sveltejs/kit": "^1.20.2",
"@types/cookie": "^0.5.1",
"@typescript-eslint/eslint-plugin": "^5.59.9",
"@typescript-eslint/parser": "^5.59.9",
"@playwright/test": "^1.37.1",
"@sveltejs/adapter-static": "^2.0.3",
"@sveltejs/adapter-node": "^1.3.1",
"@sveltejs/kit": "^1.24.1",
"@types/cookie": "^0.5.2",
"@typescript-eslint/eslint-plugin": "^6.6.0",
"@typescript-eslint/parser": "^6.6.0",
"@vite-pwa/sveltekit": "workspace:*",
"eslint": "^8.42.0",
"eslint-plugin-svelte3": "^4.0.0",
"svelte": "^3.59.1",
"svelte-check": "^3.4.3",
"svelte-preprocess": "^5.0.4",
"tslib": "^2.5.3",
"typescript": "^5.1.3",
"vitest": "^0.31.1"
"eslint": "^8.49.0",
"svelte": "^4.2.0",
"svelte-check": "^3.5.1",
"tslib": "^2.6.2",
"typescript": "^5.2.2",
"vitest": "^0.34.4"
},
"type": "module",
"dependencies": {
"@fontsource/fira-mono": "^4.5.10"
"@fontsource/fira-mono": "^5.0.8"
}
}
2 changes: 2 additions & 0 deletions examples/sveltekit-ts/pwa.mjs
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
import process from 'node:process'

export const generateSW = process.env.GENERATE_SW === 'true'
6 changes: 4 additions & 2 deletions examples/sveltekit-ts/src/app.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// <reference types="vite-plugin-pwa/svelte" />
/// <reference types="vite-plugin-pwa/info" />
import 'vite-plugin-pwa/svelte';
import 'vite-plugin-pwa/info';

declare const __DATE__: string
declare const __RELOAD_SW__: boolean
Expand All @@ -18,3 +18,5 @@ declare namespace App {

// interface Platform {}
}

export {};
2 changes: 1 addition & 1 deletion examples/sveltekit-ts/src/lib/ReloadPrompt.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import { useRegisterSW } from 'virtual:pwa-register/svelte';
// replaced dynamically
// replaced dynamically: TODO figure out how to declare this using vite.define and dts
let buildDate = __DATE__
let reloadSW = __RELOAD_SW__
Expand Down
4 changes: 2 additions & 2 deletions examples/sveltekit-ts/svelte.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import preprocess from 'svelte-preprocess';
import { vitePreprocess } from '@sveltejs/kit/vite';
// you don't need to do this if you're using generateSW strategy in your app
import { generateSW } from './pwa.mjs'
import { adapter } from './adapter.mjs'
Expand All @@ -7,7 +7,7 @@ import { adapter } from './adapter.mjs'
const config = {
// Consult https://github.com/sveltejs/svelte-preprocess
// for more information about preprocessors
preprocess: preprocess(),
preprocess: vitePreprocess(),

kit: {
adapter,
Expand Down
25 changes: 12 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@vite-pwa/sveltekit",
"type": "module",
"version": "0.2.5",
"packageManager": "pnpm@8.6.1",
"packageManager": "pnpm@8.7.4",
"description": "Zero-config PWA for SvelteKit",
"author": "antfu <anthonyfu117@hotmail.com>",
"license": "MIT",
Expand Down Expand Up @@ -51,22 +51,21 @@
},
"peerDependencies": {
"@sveltejs/kit": "^1.3.1",
"vite-plugin-pwa": ">=0.16.3 <1"
"vite-plugin-pwa": ">=0.16.5 <1"
},
"devDependencies": {
"@antfu/eslint-config": "^0.39.5",
"@antfu/ni": "^0.21.4",
"@antfu/eslint-config": "^0.41.0",
"@antfu/ni": "^0.21.8",
"@types/debug": "^4.1.8",
"@types/node": "^18.16.16",
"@typescript-eslint/eslint-plugin": "^5.59.9",
"@types/node": "^18.17.15",
"@typescript-eslint/eslint-plugin": "^6.6.0",
"@vite-pwa/sveltekit": "workspace:*",
"bumpp": "^9.1.1",
"eslint": "^8.42.0",
"bumpp": "^9.2.0",
"eslint": "^8.49.0",
"kolorist": "^1.8.0",
"svelte": "^3.59.1",
"typescript": "^5.1.3",
"unbuild": "^1.2.1",
"vite": "^4.3.9",
"vite-plugin-pwa": ">=0.16.3 <1"
"typescript": "^5.2.2",
"unbuild": "^2.0.0",
"vite": "^4.4.9",
"vite-plugin-pwa": ">=0.16.5 <1"
}
}
Loading

0 comments on commit df5dce6

Please sign in to comment.