Skip to content

Commit

Permalink
Upgrading to Sveltekit v2 (Vite 5) REA-53 (#771)
Browse files Browse the repository at this point in the history
* Migration to SvelteKit 2 (auto)

* Updated dependencies, fixed peer dependencies

* Map cleanup
  • Loading branch information
smakhtin authored Dec 20, 2023
1 parent 0f3ae54 commit 409dea0
Show file tree
Hide file tree
Showing 7 changed files with 204 additions and 471 deletions.
19 changes: 10 additions & 9 deletions apps/verification-portal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@
"@sni/address-utils": "workspace:*",
"@sni/clients": "workspace:*",
"@sni/constants": "workspace:*",
"@sveltejs/adapter-auto": "2.1.1",
"@sveltejs/adapter-vercel": "^3.0.3",
"@sveltejs/kit": "1.30.3",
"@sveltejs/adapter-auto": "3.0.1",
"@sveltejs/adapter-vercel": "4.0.3",
"@sveltejs/kit": "2.0.4",
"@types/leaflet": "1.9.8",
"@vite-pwa/sveltekit": "0.2.10",
"@sveltejs/vite-plugin-svelte": "3.0.1",
"@vite-pwa/sveltekit": "0.3.0",
"@vercel/analytics": "1.1.1",
"@vercel/og": "0.6.1",
"autoprefixer": "10.4.16",
Expand All @@ -41,20 +42,20 @@
"graphql-request": "^6.1.0",
"leaflet": "1.9.4",
"postcss": "8.4.32",
"postcss-load-config": "5.0.2",
"postcss-load-config": "^4.0.0",
"satori": "0.10.11",
"satori-html": "0.3.2",
"svelte": "^4.0.5",
"svelte": "4.2.8",
"svelte-check": "3.6.2",
"siwe": "2.1.4",
"tailwind-merge": "2.1.0",
"tailwindcss": "3.3.7",
"tailwindcss": "3.4.0",
"tslib": "2.6.2",
"typescript": "5.3.3",
"typesafe-i18n": "5.26.2",
"vite": "4.5.1",
"vite": "5.0.10",
"vitest": "1.1.0",
"@sentry/sveltekit": "7.88.0",
"@sentry/sveltekit": "7.89.0",
"@web3modal/ethers5": "3.5.0",
"@web3modal/siwe": "3.5.0",
"@web3inbox/core": "0.0.25"
Expand Down
2 changes: 1 addition & 1 deletion apps/verification-portal/src/lib/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ export const formSearch = {

const assetAddress = isMatch ? search : `${prefix}${search}`;

throw redirect(307, `/assets/${assetAddress}`);
redirect(307, `/assets/${assetAddress}`);
},
};
5 changes: 1 addition & 4 deletions apps/verification-portal/src/lib/components/SimpleMap.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import type { Map as LeafletMap, GeoJSON } from 'leaflet';
import { onDestroy, onMount } from 'svelte';
export let geoJSONData: GeoJsonObject | undefined;
import 'leaflet/dist/leaflet.css';
let mapElement: HTMLDivElement;
let map: LeafletMap;
Expand Down Expand Up @@ -48,7 +49,3 @@
</script>

<div bind:this={mapElement} class="min-h-inherit h-full" />

<style>
@import 'leaflet/dist/leaflet.css';
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export async function load(event) {
assetData = fetchedAsset;
addressDetails = parseAddress(assetAddress);
} catch (e) {
throw error(404, notFoundMessage);
error(404, notFoundMessage);
}

//Fetch verified data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { PageServerLoad } from './$types';

export const load: PageServerLoad = async ({ url }) => {
if (!url.searchParams.has('dev')) {
throw redirect(302, '/');
redirect(302, '/');
}

return {};
Expand Down
2 changes: 1 addition & 1 deletion apps/verification-portal/svelte.config.js
Original file line number Diff line number Diff line change
@@ -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/kit').Config} */
const config = {
Expand Down
Loading

0 comments on commit 409dea0

Please sign in to comment.