chore: bump a lot of dependencies

This commit is contained in:
Thomas 2025-01-04 15:28:36 +00:00
parent f43b4bdc89
commit fcb16849f1
No known key found for this signature in database
10 changed files with 7457 additions and 1657 deletions

View file

@ -13,51 +13,51 @@
"test": "vitest" "test": "vitest"
}, },
"devDependencies": { "devDependencies": {
"@sveltejs/adapter-auto": "^3.0.0", "@sveltejs/adapter-auto": "^3.3.1",
"@sveltejs/adapter-netlify": "^4.1.0", "@sveltejs/adapter-netlify": "^4.4.0",
"@sveltejs/kit": "^2.0.0", "@sveltejs/kit": "^2.15.1",
"@sveltejs/vite-plugin-svelte": "^3.0.0", "@sveltejs/vite-plugin-svelte": "^3.1.2",
"@types/leaflet": "^1.7.11", "@types/leaflet": "^1.9.15",
"@types/sanitize-html": "^2.6.2", "@types/sanitize-html": "^2.13.0",
"@typescript-eslint/eslint-plugin": "^5.32.0", "@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.32.0", "@typescript-eslint/parser": "^5.62.0",
"eslint": "^7.32.0", "eslint": "^9.17.0",
"eslint-config-prettier": "^8.3.0", "eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte3": "^4.0.0", "eslint-plugin-svelte": "^2.46.1",
"prettier": "^2.5.1", "prettier": "^3.4.2",
"prettier-plugin-svelte": "^2.10.1", "prettier-plugin-svelte": "^3.3.2",
"sass": "^1.54.9", "sass": "^1.83.1",
"svelte": "^4.0.0", "svelte": "^4.2.19",
"svelte-check": "^3.4.3", "svelte-check": "^3.8.6",
"svelte-preprocess": "^5.0.3", "svelte-preprocess": "^5.1.4",
"tslib": "^2.3.1", "tslib": "^2.8.1",
"typescript": "^5.0.0", "typescript": "^5.7.2",
"vite": "^5.0.0", "vite": "^5.4.11",
"vitest": "^1.0.0" "vitest": "^1.6.0"
}, },
"type": "module", "type": "module",
"dependencies": { "dependencies": {
"@types/js-yaml": "^4.0.5", "@types/js-yaml": "^4.0.9",
"date-fns": "^2.29.2", "date-fns": "^2.30.0",
"feed": "^4.2.2", "feed": "^4.2.2",
"js-yaml": "^4.1.0", "js-yaml": "^4.1.0",
"just-shuffle": "^4.2.0", "just-shuffle": "^4.2.0",
"leaflet": "^1.8.0", "leaflet": "^1.9.4",
"mdsvex": "^0.10.5", "mdsvex": "^0.10.6",
"mongodb": "^4.8.1", "mongodb": "^4.17.2",
"nanoid": "3.3.4", "nanoid": "3.3.4",
"node-fetch": "^3.2.10", "node-fetch": "^3.3.2",
"rehype-stringify": "^9.0.3", "rehype-stringify": "^9.0.4",
"remark": "^14.0.2", "remark": "^14.0.3",
"remark-frontmatter": "^4.0.1", "remark-frontmatter": "^4.0.1",
"remark-parse": "^10.0.1", "remark-parse": "^10.0.2",
"remark-rehype": "^10.1.0", "remark-rehype": "^10.1.0",
"remark-stringify": "^10.0.2", "remark-stringify": "^10.0.3",
"sanitize-html": "^2.7.0", "sanitize-html": "^2.14.0",
"strip-markdown": "^5.0.0", "strip-markdown": "^5.0.1",
"to-vfile": "^7.2.3", "to-vfile": "^7.2.4",
"unified": "^10.1.2", "unified": "^10.1.2",
"zod": "^3.22.2" "zod": "^3.24.1"
}, },
"engines": { "engines": {
"node": ">= 20.11.1" "node": ">= 20.11.1"

5511
pnpm-lock.yaml Normal file

File diff suppressed because it is too large Load diff

View file

@ -44,6 +44,7 @@ export class MarkdownRepository {
readonly blogPosts: BlogPostSet; readonly blogPosts: BlogPostSet;
readonly bookReviews: BookReviewSet; readonly bookReviews: BookReviewSet;
readonly snoutStreetStudiosPosts: SnoutStreetStudiosPostSet; readonly snoutStreetStudiosPosts: SnoutStreetStudiosPostSet;
private static _singleton: MarkdownRepository;
private constructor( private constructor(
blogPosts: BlogPost[], blogPosts: BlogPost[],
@ -56,17 +57,21 @@ export class MarkdownRepository {
} }
public static async singleton(): Promise<MarkdownRepository> { public static async singleton(): Promise<MarkdownRepository> {
return await MarkdownRepository.fromViteGlobImport( if (!this._singleton) {
this._singleton = await MarkdownRepository.fromViteGlobImport(
blogPostMetaGlobImport, blogPostMetaGlobImport,
bookReviewsMetaGlobImport, bookReviewsMetaGlobImport,
snoutStreetStudiosPostMetaGlobImport snoutStreetStudiosPostMetaGlobImport
); );
} }
return this._singleton;
}
public static async fromViteGlobImport( public static async fromViteGlobImport(
blogGlobImport, blogGlobImport: any,
bookReviewGlobImport, bookReviewGlobImport: any,
snoutStreetPostGlobImport snoutStreetPostGlobImport: any
): Promise<MarkdownRepository> { ): Promise<MarkdownRepository> {
let fileImports: MarkdownFile<BlogPostFrontmatterValues>[] = []; let fileImports: MarkdownFile<BlogPostFrontmatterValues>[] = [];
let blogPosts: BlogPost[] = []; let blogPosts: BlogPost[] = [];

View file

@ -1,16 +1,16 @@
import { BlogController } from '../lib/blog/BlogController.js'; import { BlogController } from '../lib/blog/BlogController.js';
import type { PageServerLoad } from './$types'; import type { PageServerLoad } from './$types.js';
export const load: PageServerLoad = async () => { export const load: PageServerLoad = async () => {
try { try {
const controller = await BlogController.singleton(); const controller = await BlogController.singleton();
const latestBlogPosts = await controller.getAllBlogPosts(3); const latestBlogPosts = await controller.getAllBlogPosts(3);
return { latestBlogPosts } return { latestBlogPosts };
} catch (error) { } catch (error) {
console.error({ console.error({
message: `Caught error in GET /api/blog.json`, message: `Caught error in GET /api/blog.json`,
error: JSON.stringify(error), error: JSON.stringify(error),
}); });
return { latestBlogPosts: [] } return { latestBlogPosts: [] };
} }
}; };

View file

@ -8,6 +8,7 @@ export const GET = async ({ params }: LoadEvent) => {
const post = await controller.getAnyKindOfContentBySlug(slug); const post = await controller.getAnyKindOfContentBySlug(slug);
if (!post) { if (!post) {
console.error(`Could not find blog post with slug '${slug}'`);
error(404, `Could not find blog post with slug '${slug}'`); error(404, `Could not find blog post with slug '${slug}'`);
} }

View file

@ -2,7 +2,6 @@
import type { PageData } from "./$types.js"; import type { PageData } from "./$types.js";
import Navbar from "$lib/components/Navbar.svelte"; import Navbar from "$lib/components/Navbar.svelte";
import BlogPostListItem from "./BlogPostListItem.svelte"; import BlogPostListItem from "./BlogPostListItem.svelte";
import SummerHours2024 from "../../components/SummerHours2024.svelte";
export let data: PageData; export let data: PageData;
@ -45,8 +44,7 @@
<Navbar /> <Navbar />
<main class="thomaswilson-container"> <main class="thomaswilson-container">
<section class="thomaswilson-strapline section heading"> <section class="thomaswilson-strapline section heading">
<h1>Blog</h1> <h1 class="page-title">Blog</h1>
<SummerHours2024 isActive={false} />
<p class="heading__text"> <p class="heading__text">
It has been been It has been been
<span <span
@ -88,19 +86,33 @@
</main> </main>
<style lang="scss"> <style lang="scss">
.page-title {
font-size: 2.5rem;
margin: 0;
line-height: 100%;
}
.heading { .heading {
padding: 0;
gap: var(--spacing-base); gap: var(--spacing-base);
display: grid; display: grid;
grid-template-columns: 100%; grid-template-columns: 100%;
} }
.heading__text {
font-family: sans-serif;
margin: 0;
line-height: 150%;
font-size: 1.25rem;
}
.posts { .posts {
list-style: none; list-style: none;
margin: 0; margin: 0;
padding: 0; padding: 0;
display: grid; display: grid;
grid-template-columns: 100%; grid-template-columns: 100%;
gap: var(--spacing-base); gap: var(--spacing-xl);
max-width: 100%; max-width: 100%;
} }
@ -110,7 +122,9 @@
border: 1px solid var(--brand-orange); border: 1px solid var(--brand-orange);
border-radius: 4px; border-radius: 4px;
padding: 8px; padding: 8px;
margin: 0 4px;
font-family: monospace; font-family: monospace;
font-size: inherit;
} }
.days-since-success { .days-since-success {

View file

@ -6,23 +6,20 @@
export let book_review: boolean; export let book_review: boolean;
export let title: string; export let title: string;
export let preview: string; export let preview: string;
export let slug: string export let slug: string;
export let date: string; export let date: string;
export let content_type: "blog" | "book_review" | "snout_street_studios"; export let content_type: "blog" | "book_review" | "snout_street_studios";
$: formattedDate = formatDate( $: formattedDate = formatDate(new Date(date), "yyyy-MM-dd");
new Date(date),
'yyyy-MM-dd',
);
</script> </script>
<li <li
class="post" class="post"
role="article" role="article"
aria-posinset="{index + 1}" aria-posinset={index + 1}
aria-setsize="{numberOfPosts}" aria-setsize={numberOfPosts}
> >
<a href="{`/blog/${slug}`}"> <a href={`/blog/${slug}`}>
<div class="post__title"> <div class="post__title">
{#if content_type === "book_review"} {#if content_type === "book_review"}
📚 📚
@ -49,7 +46,7 @@
<style> <style>
.post { .post {
border: 1px solid var(--gray-200); border: 1px solid var(--gray-200);
padding: var(--spacing-md); padding: var(--spacing-lg);
transition: 0.2s; transition: 0.2s;
border-radius: 8px; border-radius: 8px;
max-width: 100%; max-width: 100%;
@ -72,18 +69,20 @@
text-decoration: underline; text-decoration: underline;
font-family: var(--font-family-title); font-family: var(--font-family-title);
font-weight: 600; font-weight: 600;
padding-bottom: 4px; padding-bottom: var(--spacing-md);
font-size: 1.1rem; font-size: var(--font-size);
letter-spacing: 0px;
}
.post__preview {
font-size: var(--font-size-sm);
letter-spacing: -0.5px;
line-height: 135%;
color: var(--gray-600);
padding-bottom: var(--spacing-md);
} }
.post__date { .post__date {
font-size: 0.9rem; font-size: 0.9rem;
} }
.post__preview {
font-size: 0.95rem;
line-height: 140%;
color: var(--gray-600);
padding-bottom: 2px;
}
</style> </style>

View file

@ -1,6 +1,6 @@
@font-face { @font-face {
font-family: "FivoSansModern-Regular"; font-family: 'FivoSansModern-Regular';
src: url("/FivoSansModern-Regular.otf"); src: url('/FivoSansModern-Regular.otf');
font-display: swap; font-display: swap;
} }
@ -22,11 +22,10 @@
--gray-950: #1a1e23; --gray-950: #1a1e23;
--gray-1000: #0a0c0e; --gray-1000: #0a0c0e;
--font-family-mono: monospace; --font-family-mono: monospace;
--font-family-title: "FivoSansModern-Regular", sans-serif; --font-family-title: 'FivoSansModern-Regular', sans-serif;
--font-family-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, --font-family-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans',
"Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
"Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; --font-family-serif: Georgia, Cambria, 'Times New Roman', Times, serif;
--font-family-serif: Georgia, Cambria, "Times New Roman", Times, serif;
--line-height: 120%; --line-height: 120%;
--line-height-sm: 120%; --line-height-sm: 120%;
@ -40,10 +39,10 @@
--font-size-xl: 1.5rem; --font-size-xl: 1.5rem;
--font-size-2xl: 2rem; --font-size-2xl: 2rem;
--spacing-base: 1rem; --spacing-base: 1rem;
--spacing-sm: 0.25rem; --spacing-sm: 4px;
--spacing-md: 0.5rem; --spacing-md: 8px;
--spacing-lg: 1rem; --spacing-lg: 12px;
--spacing-xl: 1.5rem; --spacing-xl: 16px;
--navbar-height: 75px; --navbar-height: 75px;
--font-size-sm: 0.875rem; --font-size-sm: 0.875rem;
@ -74,9 +73,7 @@ body {
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
min-height: calc( min-height: calc(100vh - var(--navbar-height) - calc(2 * var(--container-padding)));
100vh - var(--navbar-height) - calc(2 * var(--container-padding))
);
padding: var(--container-padding); padding: var(--container-padding);
} }

90
yarn-error.log Normal file
View file

@ -0,0 +1,90 @@
Arguments:
/Users/wilson/.nvm/versions/node/v22.12.0/bin/node /usr/local/bin/yarn
PATH:
/Users/wilson/.rvm/gems/ruby-3.0.0/bin:/Users/wilson/.rvm/gems/ruby-3.0.0@global/bin:/Users/wilson/.rvm/rubies/ruby-3.0.0/bin:/Users/wilson/.nvm/versions/node/v22.12.0/bin:/usr/local/opt/node@20/bin:/usr/local/opt/go@1.21/bin:/Users/wilson/.bun/bin:/Users/wilson/Library/Preferences/netlify/helper/bin:/Users/wilson/Library/pnpm:/Users/wilson/go/bin:/Users/wilson/.deno/bin:/usr/local/sbin:/Users/wilson/google-cloud-sdk/bin:/Users/wilson/.pyenv/shims:/Users/wilson/.cargo/env:/Users/wilson/development/flutter/bin:/Users/wilson/Library/Python/3.11/bin:/Users/wilson/.amplify/bin:/usr/local/opt/gawk/libexec/gnubin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/Library/TeX/texbin:/usr/local/share/dotnet:~/.dotnet/tools:/Users/wilson/.cargo/bin:/usr/local/bin:/Users/wilson/.rvm/bin
Yarn version:
1.22.17
Node version:
22.12.0
Platform:
darwin arm64
Trace:
Error: ENOENT: no such file or directory, copyfile '/Users/wilson/Library/Caches/Yarn/v6/npm-glob-parent-6.0.2-6d237d99083950c79290f24c7642a3de9a28f9e3-integrity/node_modules/glob-parent/package.json' -> '/Users/wilson/Documents/projects/thomaswilson-xyz/thomaswilson-sveltekit/node_modules/eslint/node_modules/glob-parent/package.json'
npm manifest:
{
"name": "thomaswilson-sveltekit",
"license": "UNLICENSED",
"version": "1.0.0",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --ignore-path .gitignore --check --plugin-search-dir=. . && eslint --ignore-path .gitignore .",
"format": "prettier --ignore-path .gitignore --write --plugin-search-dir=. .",
"test": "vitest"
},
"devDependencies": {
"@sveltejs/adapter-auto": "^3.3.1",
"@sveltejs/adapter-netlify": "^4.4.0",
"@sveltejs/kit": "^2.15.1",
"@sveltejs/vite-plugin-svelte": "^3.1.2",
"@types/leaflet": "^1.9.15",
"@types/sanitize-html": "^2.13.0",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"eslint": "^9.17.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.46.1",
"prettier": "^3.4.2",
"prettier-plugin-svelte": "^3.3.2",
"sass": "^1.83.1",
"svelte": "^4.2.19",
"svelte-check": "^3.8.6",
"svelte-preprocess": "^5.1.4",
"tslib": "^2.8.1",
"typescript": "^5.7.2",
"vite": "^5.4.11",
"vitest": "^1.6.0"
},
"type": "module",
"dependencies": {
"@types/js-yaml": "^4.0.9",
"date-fns": "^2.30.0",
"feed": "^4.2.2",
"js-yaml": "^4.1.0",
"just-shuffle": "^4.2.0",
"leaflet": "^1.9.4",
"mdsvex": "^0.10.6",
"mongodb": "^4.17.2",
"nanoid": "3.3.4",
"node-fetch": "^3.3.2",
"rehype-stringify": "^9.0.4",
"remark": "^14.0.3",
"remark-frontmatter": "^4.0.1",
"remark-parse": "^10.0.2",
"remark-rehype": "^10.1.0",
"remark-stringify": "^10.0.3",
"sanitize-html": "^2.14.0",
"strip-markdown": "^5.0.1",
"to-vfile": "^7.2.4",
"unified": "^10.1.2",
"zod": "^3.24.1"
},
"engines": {
"node": ">= 20.11.1"
}
}
yarn manifest:
No manifest
Lockfile:
No lockfile

3107
yarn.lock

File diff suppressed because it is too large Load diff