Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,693 changes: 1,074 additions & 619 deletions package-lock.json

Large diffs are not rendered by default.

14 changes: 8 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,12 @@
},
"devDependencies": {
"@neoconfetti/svelte": "^1.0.0",
"@sveltejs/adapter-static": "^2.0.3",
"@sveltejs/kit": "^1.20.4",
"@sveltejs/adapter-static": "^3.0.10",
"@sveltejs/kit": "^2.70.3",
"@sveltejs/vite-plugin-svelte": "^3.1.2",
"@types/cookie": "^0.5.1",
"@types/dateformat": "^5.0.1",
"@types/node": "^20.19.43",
"@types/prismjs": "^1.26.2",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
Expand All @@ -67,12 +69,12 @@
"sass": "^1.69.4",
"striptags": "^3.2.0",
"svelte": "^4.0.5",
"svelte-check": "^3.4.3",
"svelte-check": "^3.8.6",
"svelte-sitemap": "^2.6.0",
"tslib": "^2.4.1",
"typescript": "^5.0.0",
"vite": "^4.5.3",
"vitest": "^0.32.2"
"typescript": "^5.9.3",
"vite": "^5.4.21",
"vitest": "^3.2.7"
},
"type": "module",
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function entries() {
export function load({ params }) {
const lang = WORD_LISTS.find((l) => l.slug === params.language);
const alphabet = ALPHABETS.find((a) => a.code === lang?.code);
if (!lang || !alphabet) throw error(404, 'No alphabet page for that language');
if (!lang || !alphabet) error(404, 'No alphabet page for that language');

/** Other languages using the same script — the letters mostly carry over. */
const cousins = ALPHABETS.filter((a) => a.script === alphabet.script && a.code !== alphabet.code)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function entries() {

export async function load({ params }) {
const meta = WORD_LISTS.find((l) => l.slug === params.language);
if (!meta) throw error(404, 'No quiz for that language');
if (!meta) error(404, 'No quiz for that language');

const rows = (
await readFile(
Expand All @@ -42,7 +42,7 @@ export async function load({ params }) {
return true;
});

if (usable.length < ROUNDS * OPTIONS) throw error(404, 'Not enough usable words for a quiz');
if (usable.length < ROUNDS * OPTIONS) error(404, 'Not enough usable words for a quiz');

return { meta, pool: usable, rounds: ROUNDS, options: OPTIONS };
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function entries() {

export async function load({ params }) {
const meta = WORD_LISTS.find((l) => l.slug === params.language);
if (!meta) throw error(404, 'No word list for that language');
if (!meta) error(404, 'No word list for that language');

const file = path.join(process.cwd(), 'static/data/most-common-words', `${meta.slug}.tsv`);
const rows = (await readFile(file, 'utf8'))
Expand Down
2 changes: 1 addition & 1 deletion src/routes/(site)/tools/say/[word]/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function entries() {

export async function load({ params }) {
const entry = SAY_WORDS.find((w) => w.slug === params.word);
if (!entry) throw error(404, 'No page for that word');
if (!entry) error(404, 'No page for that word');

const byCode = new Map(WORD_LISTS.map((l) => [l.code, l]));
// Where each language's word sits in this page's audio file, for the
Expand Down
4 changes: 2 additions & 2 deletions src/routes/(site)/tools/similar/[pair]/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ export function entries() {

export async function load({ params }) {
const pair = LANGUAGE_PAIRS.find((p) => p.slug === params.pair);
if (!pair) throw error(404, 'No page for that pair');
if (!pair) error(404, 'No page for that pair');

const a = WORD_LISTS.find((l) => l.code === pair.a);
const b = WORD_LISTS.find((l) => l.code === pair.b);
if (!a || !b) throw error(404, 'Unknown language in that pair');
if (!a || !b) error(404, 'Unknown language in that pair');

const rows = (
await readFile(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function entries() {

export async function load({ params }) {
const meta = WORD_LISTS.find((l) => l.slug === params.language);
if (!meta) throw error(404, 'No word list for that language');
if (!meta) error(404, 'No word list for that language');

const file = path.join(process.cwd(), 'static/data/most-common-words', `${meta.slug}.tsv`);
const rows = (await readFile(file, 'utf8'))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export function entries() {
export function load({ params }) {
const game = WORD_GAME_LANGUAGES.find((l) => l.slug === params.language);
const meta = WORD_LISTS.find((l) => l.slug === params.language);
if (!game || !meta) throw error(404, 'No word game for that language');
if (!game || !meta) error(404, 'No word game for that language');

const others = WORD_GAME_LANGUAGES.filter((l) => l.slug !== game.slug);
return { game, meta, others };
Expand Down
4 changes: 3 additions & 1 deletion svelte.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import adapter from '@sveltejs/adapter-static';
import { vitePreprocess } from '@sveltejs/kit/vite';
// Kit 2 no longer re-exports it; it comes from the Vite plugin, a direct
// dependency since the upgrade.
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
import { mdsvex } from 'mdsvex';
import rehypeExternalLinks from 'rehype-external-links';
import rehypeSlug from 'rehype-slug';
Expand Down
Loading