From c7962f1019d7ff78450be71c6131f50bd41a20c3 Mon Sep 17 00:00:00 2001 From: Tanner Heffner Date: Mon, 18 Mar 2024 19:36:40 -0700 Subject: [PATCH 1/3] fix some ts+sveltekit warnings --- package-lock.json | 14 +++++++------- package.json | 2 +- tsconfig.json | 7 +------ 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/package-lock.json b/package-lock.json index 65a09f1..8971b5b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ }, "devDependencies": { "@resvg/resvg-js": "^2.4.1", - "@svelte-put/toc": "^4.0.0", + "@svelte-put/toc": "^5.0.1", "@sveltejs/adapter-auto": "^3.1.1", "@sveltejs/adapter-netlify": "^4.1.0", "@sveltejs/kit": "2.5.4", @@ -1179,9 +1179,9 @@ } }, "node_modules/@svelte-put/toc": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@svelte-put/toc/-/toc-4.0.0.tgz", - "integrity": "sha512-Z7iWtG1XMQXaeyzV1PZJ47STaBRGEhbW5EHBZOjcoqIrimBNKhtGMNhfecanFBQZZKblT1BCsq5OfOjf/vpFyQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@svelte-put/toc/-/toc-5.0.1.tgz", + "integrity": "sha512-oxDFPM2Y0XmhhXoNDhcPltf8RxhIvtiotFL0PX9NLossTumuAPiLVaDeEsGfBOn+nZK2J1oo9XqJU3NWHDROcw==", "dev": true, "peerDependencies": { "svelte": "^3.55.0 || ^4.0.0" @@ -9294,9 +9294,9 @@ } }, "@svelte-put/toc": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@svelte-put/toc/-/toc-4.0.0.tgz", - "integrity": "sha512-Z7iWtG1XMQXaeyzV1PZJ47STaBRGEhbW5EHBZOjcoqIrimBNKhtGMNhfecanFBQZZKblT1BCsq5OfOjf/vpFyQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@svelte-put/toc/-/toc-5.0.1.tgz", + "integrity": "sha512-oxDFPM2Y0XmhhXoNDhcPltf8RxhIvtiotFL0PX9NLossTumuAPiLVaDeEsGfBOn+nZK2J1oo9XqJU3NWHDROcw==", "dev": true, "requires": {} }, diff --git a/package.json b/package.json index be2bce2..81992dd 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ }, "devDependencies": { "@resvg/resvg-js": "^2.4.1", - "@svelte-put/toc": "^4.0.0", + "@svelte-put/toc": "^5.0.1", "@sveltejs/adapter-auto": "^3.1.1", "@sveltejs/adapter-netlify": "^4.1.0", "@sveltejs/kit": "2.5.4", diff --git a/tsconfig.json b/tsconfig.json index 2abb47e..3f73745 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -20,13 +20,8 @@ "esModuleInterop": true, "skipLibCheck": true, "forceConsistentCasingInFileNames": true, - "baseUrl": ".", "allowJs": true, - "checkJs": true, - "paths": { - "$lib/*": ["src/lib/*"], - "$lib": ["src/lib"] - } + "checkJs": true }, "include": [ "src/**/*.d.ts", From 31c694e03f5b29d3485d9fab1c162bc43bb3118e Mon Sep 17 00:00:00 2001 From: Tanner Heffner Date: Mon, 18 Mar 2024 19:40:57 -0700 Subject: [PATCH 2/3] update toc to version 5 syntax --- src/lib/components/Toc.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/components/Toc.svelte b/src/lib/components/Toc.svelte index 1795d90..fd80932 100644 --- a/src/lib/components/Toc.svelte +++ b/src/lib/components/Toc.svelte @@ -12,7 +12,7 @@ -{#if Object.values($tocStore.items).length && Object.values($tocStore.items).length > 1} +{#if $tocStore.items.size}