diff options
| author | Fuwn <[email protected]> | 2026-01-22 20:09:42 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-01-22 20:09:42 -0800 |
| commit | 13c9d0f53c5a65b6e5f8f5c45343f1589521002b (patch) | |
| tree | fd6b89e442f79f9b1344fc197c07942ac61cfcd0 | |
| parent | refactor(configuration): Replace svelte-preprocess with vitePrepreocess (diff) | |
| download | due.moe-13c9d0f53c5a65b6e5f8f5c45343f1589521002b.tar.xz due.moe-13c9d0f53c5a65b6e5f8f5c45343f1589521002b.zip | |
deps(sveltekit): Migrate to SvelteKit 2
| -rwxr-xr-x | bun.lockb | bin | 368614 -> 396300 bytes | |||
| -rw-r--r-- | package.json | 8 | ||||
| -rw-r--r-- | src/lib/Utility/oauth.ts | 2 | ||||
| -rw-r--r-- | src/routes/api/authentication/log-out/+server.ts | 2 | ||||
| -rw-r--r-- | src/routes/api/oauth/refresh/+server.ts | 2 | ||||
| -rw-r--r-- | svelte.config.js | 2 |
6 files changed, 8 insertions, 8 deletions
| Binary files differ diff --git a/package.json b/package.json index b3e35c85..371f43ad 100644 --- a/package.json +++ b/package.json @@ -16,8 +16,9 @@ }, "devDependencies": { "@iconify/svelte": "^3.1.6", - "@sveltejs/adapter-vercel": "next", - "@sveltejs/kit": "^1.20.4", + "@sveltejs/adapter-vercel": "^5.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", "@types/fast-levenshtein": "^0.0.4", "@types/jsdom": "^21.1.6", "@types/string-similarity": "^4.0.2", @@ -33,12 +34,11 @@ "sass": "^1.69.7", "svelte": "^4.0.5", "svelte-check": "^3.4.3", - "svelte-preprocess": "^5.1.3", "sveltekit-graphql": "^0.4.3", "sveltekit-rate-limiter": "^0.4.2", "tslib": "^2.4.1", "typescript": "^5.0.0", - "vite": "^4.4.2" + "vite": "^5.0.0" }, "type": "module", "dependencies": { diff --git a/src/lib/Utility/oauth.ts b/src/lib/Utility/oauth.ts index 5c05bff9..c42739c3 100644 --- a/src/lib/Utility/oauth.ts +++ b/src/lib/Utility/oauth.ts @@ -47,5 +47,5 @@ export const callback = async (options: CallbackOptions) => { } ); - throw redirect(303, options.redirect ?? '/'); + redirect(303, options.redirect ?? '/'); }; diff --git a/src/routes/api/authentication/log-out/+server.ts b/src/routes/api/authentication/log-out/+server.ts index 305c846f..26b5dd2c 100644 --- a/src/routes/api/authentication/log-out/+server.ts +++ b/src/routes/api/authentication/log-out/+server.ts @@ -11,5 +11,5 @@ export const GET = ({ cookies }) => { secure: false }); - throw redirect(303, root('/')); + redirect(303, root('/')); }; diff --git a/src/routes/api/oauth/refresh/+server.ts b/src/routes/api/oauth/refresh/+server.ts index 66b4209c..13f4400c 100644 --- a/src/routes/api/oauth/refresh/+server.ts +++ b/src/routes/api/oauth/refresh/+server.ts @@ -25,6 +25,6 @@ export const GET = async ({ url, cookies }) => { secure: false }); - if (url.searchParams.get('redirect')) throw redirect(303, '/'); + if (url.searchParams.get('redirect')) redirect(303, '/'); else return Response.json(newUser); }; diff --git a/svelte.config.js b/svelte.config.js index 8ff35355..28d8ee98 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -1,5 +1,5 @@ import adapter from '@sveltejs/adapter-vercel'; -import { vitePreprocess } from '@sveltejs/kit/vite'; +import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'; // /** @type {import('@sveltejs/adapter-vercel').Config} */ /** @type {import('@sveltejs/kit').Config} */ |