Skip to content

Commit

Permalink
chore: Update deps (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
LekoArts authored Feb 1, 2025
1 parent 420ad8b commit 265c954
Show file tree
Hide file tree
Showing 20 changed files with 800 additions and 1,465 deletions.
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,26 @@
"typecheck": "tsc --noEmit"
},
"devDependencies": {
"@antfu/eslint-config": "^3.12.1",
"@antfu/eslint-config": "^4.1.0",
"@auth/core": "^0.37.4",
"@auth/sveltekit": "^1.7.4",
"@csstools/postcss-global-data": "^3.0.0",
"@sveltejs/adapter-netlify": "^4.4.0",
"@sveltejs/adapter-netlify": "^4.4.1",
"@sveltejs/enhanced-img": "^0.4.4",
"@sveltejs/kit": "^2.12.0",
"@sveltejs/kit": "^2.16.1",
"@sveltejs/vite-plugin-svelte": "^5.0.3",
"@types/lodash-es": "^4.17.12",
"@vitest/coverage-v8": "^2.1.8",
"eslint": "^9.17.0",
"@vitest/coverage-v8": "^3.0.4",
"eslint": "^9.19.0",
"eslint-plugin-svelte": "^2.46.1",
"happy-dom": "^15.11.7",
"happy-dom": "^16.8.1",
"lodash-es": "^4.17.21",
"postcss-preset-env": "^10.1.2",
"svelte": "^5.0.0",
"svelte-check": "^4.0.0",
"postcss-preset-env": "^10.1.3",
"svelte": "^5.19.6",
"svelte-check": "^4.1.4",
"tslib": "^2.8.1",
"typescript": "^5.7.2",
"vite": "^6.0.5",
"vitest": "^2.1.8"
"typescript": "^5.7.3",
"vite": "^6.0.11",
"vitest": "^3.0.4"
}
}
2,187 changes: 760 additions & 1,427 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/auth.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { TraktProfile } from '$lib/types'
import type { DefaultSession } from '@auth/sveltekit'
import { PRIVATE_AUTH_SECRET, PRIVATE_TRAKT_CLIENT_ID, PRIVATE_TRAKT_CLIENT_SECRET } from '$env/static/private'
import { SvelteKitAuth } from '@auth/sveltekit'
import Trakt from '@auth/sveltekit/providers/trakt'
import { PRIVATE_AUTH_SECRET, PRIVATE_TRAKT_CLIENT_ID, PRIVATE_TRAKT_CLIENT_SECRET } from '$env/static/private'
import type { TraktProfile } from '$lib/types'

declare module '@auth/sveltekit' {
interface Session {
Expand Down
3 changes: 2 additions & 1 deletion src/hooks.server.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { type Handle, type MaybePromise, type RequestEvent, type ResolveOptions, redirect } from '@sveltejs/kit'
import type { Handle, MaybePromise, RequestEvent, ResolveOptions } from '@sveltejs/kit'
import { redirect } from '@sveltejs/kit'
import { sequence } from '@sveltejs/kit/hooks'
import { handle as authenticationHandle } from './auth'

Expand Down
2 changes: 1 addition & 1 deletion src/lib/Image.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang='ts'>
import type { TmdbImageUrlsWithDimensions } from '$lib/types'
import type { HTMLImgAttributes } from 'svelte/elements'
import { fade } from 'svelte/transition'
import type { TmdbImageUrlsWithDimensions } from '$lib/types'
interface Props {
alt: string
Expand Down
4 changes: 2 additions & 2 deletions src/lib/InfiniteLoading.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,10 @@
</script>

<script lang='ts'>
import { run } from 'svelte/legacy'
import { createEventDispatcher, onDestroy, onMount, tick } from 'svelte'
import { run } from 'svelte/legacy'
const dispatch = createEventDispatcher()
const STATUS = {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/PlausibleAnalytics.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
* LICENSE: MIT
*/
import { onMount } from 'svelte'
import { dev } from '$app/environment'
import { page } from '$app/state'
import { pa } from '$lib/store/plausible'
import { onMount } from 'svelte'
onMount(() => {
pa.subscribe((events) => {
Expand Down
3 changes: 2 additions & 1 deletion src/lib/store/persisted.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { type Writable, writable as internal } from 'svelte/store'
import type { Writable } from 'svelte/store'
import { writable as internal } from 'svelte/store'

// Adapted from https://github.com/joshnuss/svelte-persisted-store
// License: MIT
Expand Down
2 changes: 1 addition & 1 deletion src/lib/store/settings.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { persisted } from './persisted'
import type { Language } from '$lib/types'
import { persisted } from './persisted'

interface Settings {
hue: number
Expand Down
2 changes: 1 addition & 1 deletion src/lib/utils/tmdb.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { TmdbPosterSize, TraktMediaType } from '../types'
import { traktTmdbMediaMap } from './index'
import { TMDB_BASE_URL, TMDB_IMAGE_BASE_URL, TMDB_POSTER_SIZES } from '$const'
import { traktTmdbMediaMap } from './index'

export function tmdbItemDetailsUrl(type: TraktMediaType, tmdb_id: string) {
return `${TMDB_BASE_URL}${traktTmdbMediaMap[type]}/${tmdb_id}`
Expand Down
2 changes: 1 addition & 1 deletion src/lib/utils/trakt.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { uniqBy } from 'lodash-es'
import type { NormalizedItemResponse, TraktMediaType } from '../types'
import { uniqBy } from 'lodash-es'

export function traktUserUrl(id: string) {
return `/users/${id}`
Expand Down
4 changes: 2 additions & 2 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<script lang='ts'>
import Footer from './Footer.svelte'
import Header from './Header.svelte'
import { page } from '$app/state'
import Meta from '$lib/Meta.svelte'
import PlausibleAnalytics from '$lib/PlausibleAnalytics.svelte'
import Content from '$lib/skip-to-content/Content.svelte'
import SkipToContent from '$lib/skip-to-content/Nav.svelte'
import Footer from './Footer.svelte'
import Header from './Header.svelte'
import './style.css'
interface Props {
Expand Down
2 changes: 1 addition & 1 deletion src/routes/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<script lang='ts'>
import { signIn } from '@auth/sveltekit/client'
import { page } from '$app/state'
import { GITHUB_REPO_URL, TITLE } from '$const'
import { classList } from '$lib/actions'
import Primary from '$lib/button/Primary.svelte'
import Spacer from '$lib/Spacer.svelte'
import { pa } from '$lib/store/plausible'
import Svg from '$lib/Svg.svelte'
import { signIn } from '@auth/sveltekit/client'
</script>

<h1 class='visually-hidden'>{TITLE}</h1>
Expand Down
2 changes: 1 addition & 1 deletion src/routes/Header.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<script lang='ts'>
import { signIn, signOut } from '@auth/sveltekit/client'
import type { TraktStats } from '$lib/types'
import { page } from '$app/state'
import { CURRENT_YEAR, TITLE } from '$const'
Expand All @@ -8,6 +7,7 @@
import { pa } from '$lib/store/plausible'
import { stats } from '$lib/store/stats'
import Svg from '$lib/Svg.svelte'
import { signIn, signOut } from '@auth/sveltekit/client'
let traktStats = $derived(page.data?.stats as TraktStats | undefined)
let user = $derived(page.data?.session?.user)
Expand Down
4 changes: 2 additions & 2 deletions src/routes/api/history/[type]/+server.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { error, json } from '@sveltejs/kit'
import type { RequestHandler } from './$types'
import type { Item, Language, NormalizedItemResponse, TmdbImageUrlsWithDimensions, TraktHistoryItem, TraktMediaType } from '$lib/types'
import type { RequestHandler } from './$types'
import { DEFAULT_CACHE_HEADER, PAGINATION_LIMIT, TRAKT_BASE_URL } from '$const'
import { TRAKT_FETCH_DEFAULTS } from '$lib/server/const'
import { normalizeItem } from '$lib/utils'
import { filterUniqueShowsFromHistory, traktHistoryUrl } from '$lib/utils/trakt'
import { error, json } from '@sveltejs/kit'

async function fetchData(customFetch: typeof fetch, item: NormalizedItemResponse, lang: Language, type: TraktMediaType): Promise<Item | null> {
if (!item.tmdb_id) {
Expand Down
4 changes: 2 additions & 2 deletions src/routes/api/tmdb-image/+server.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { error, json } from '@sveltejs/kit'
import type { RequestHandler } from './$types'
import type { TmdbItemDetails, TraktMediaType } from '$lib/types'
import type { RequestHandler } from './$types'
import { TMDB_FETCH_DEFAULTS } from '$const'
import { TMDB_QUERY_DEFAULTS } from '$lib/server/const'
import { traktTmdbMediaMap } from '$lib/utils'
import { tmdbImageUrlsWithDimensions, tmdbItemDetailsUrl } from '$lib/utils/tmdb'
import { error, json } from '@sveltejs/kit'

export const GET: RequestHandler = async ({ url, locals, fetch, setHeaders }) => {
const session = await locals.auth()
Expand Down
4 changes: 2 additions & 2 deletions src/routes/api/user-stats/[id]/+server.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { error, json } from '@sveltejs/kit'
import type { RequestHandler } from './$types'
import type { TraktStats } from '$lib/types'
import type { RequestHandler } from './$types'
import { DEFAULT_CACHE_HEADER, TRAKT_BASE_URL } from '$const'
import { TRAKT_FETCH_DEFAULTS } from '$lib/server/const'
import { traktStatsUrl } from '$lib/utils/trakt'
import { error, json } from '@sveltejs/kit'

export const GET: RequestHandler = async ({ locals, params, fetch, setHeaders }) => {
const session = await locals.auth()
Expand Down
4 changes: 2 additions & 2 deletions src/routes/api/watched/[type]/+server.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { error, json } from '@sveltejs/kit'
import type { RequestHandler } from './$types'
import type { TraktMediaType, TraktWatchedItem } from '$lib/types'
import type { RequestHandler } from './$types'
import { DEFAULT_CACHE_HEADER, TRAKT_BASE_URL } from '$const'
import { TRAKT_FETCH_DEFAULTS } from '$lib/server/const'
import { filterForYear, normalizeItem } from '$lib/utils'
import { traktWatchedUrl } from '$lib/utils/trakt'
import { error, json } from '@sveltejs/kit'

export const GET: RequestHandler = async ({ url, locals, fetch, setHeaders, params }) => {
const session = await locals.auth()
Expand Down
2 changes: 1 addition & 1 deletion src/routes/dashboard/+layout.server.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { LayoutServerLoad } from './$types'
import type { TraktStats } from '$lib/types'
import type { LayoutServerLoad } from './$types'
import { DEFAULT_CACHE_HEADER } from '$const'

export const load: LayoutServerLoad = async ({ locals, fetch, setHeaders }) => {
Expand Down
4 changes: 2 additions & 2 deletions src/routes/dashboard/[type]/[year]/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<script lang='ts'>
import { slide } from 'svelte/transition'
import type { PageData } from './$types'
import type { ApiHistoryResponse, InfiniteEvent, Item } from '$lib/types'
import type { PageData } from './$types'
import { page } from '$app/state'
import { CURRENT_YEAR } from '$const'
import Secondary from '$lib/button/Secondary.svelte'
Expand All @@ -16,6 +15,7 @@
import Switch from '$lib/Switch.svelte'
import { capitalize, getStartAndEndOfYear, groupBy } from '$lib/utils'
import { filterUniqueShowsFromHistory } from '$lib/utils/trakt'
import { slide } from 'svelte/transition'
let infiniteLoading: { reset: () => Promise<void> }
Expand Down

0 comments on commit 265c954

Please sign in to comment.