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
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 24
node-version: 26
cache: npm

- run: npm ci
Expand All @@ -27,7 +27,7 @@ jobs:

- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 24
node-version: 26
cache: npm

- run: npm ci
Expand All @@ -41,7 +41,7 @@ jobs:

- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 24
node-version: 26
cache: npm

- run: npm ci
Expand All @@ -55,7 +55,7 @@ jobs:

- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 24
node-version: 26
cache: npm

- run: npm ci
Expand All @@ -77,7 +77,7 @@ jobs:

- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 24
node-version: 26
cache: npm

- run: npm ci
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 22
node-version: 26
cache: npm

- name: Install dependencies
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,4 @@ yarn-error.log*
# 開発用DBの実体ファイルは各自のローカル環境で prisma migrate によって作成する(Git管理しない)
/prisma/dev.db
/prisma/dev.db-journal
.vitest/
4 changes: 0 additions & 4 deletions .oxfmtrc.json

This file was deleted.

13 changes: 0 additions & 13 deletions .oxlintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ Pick the cheapest test that can catch the bug. E2E is slow and runs on every PR,

There are no component tests (no Testing Library / jsdom). UI behaviour that stays inside one screen is not tested; move logic worth testing into a pure function in `lib/shared` and unit-test that. Do not add a test that only confirms something obvious.

Run the Vitest tests with `npx vitest run`.
Run the Vitest tests with `npm test`.

- Before finishing, run `npm run lint`, `npm run typecheck` and the tests.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:24-slim
FROM node:26-slim

RUN apt-get update -y && apt-get install -y openssl && rm -rf /var/lib/apt/lists/*

Expand Down
2 changes: 1 addition & 1 deletion app/lib/server/auth.server.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { beforeAll, describe, expect, it, vi } from "vitest";
import { beforeAll, describe, expect, it, vi } from "vite-plus/test";

import { prisma } from "@/lib/server/prisma.server";
import { applyMigrations, createUser } from "@/lib/server/test/db";
Expand Down
2 changes: 1 addition & 1 deletion app/lib/server/drop-unused-personal-data.server.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { beforeAll, expect, it } from "vitest";
import { beforeAll, expect, it } from "vite-plus/test";

import { prisma } from "@/lib/server/prisma.server";
import { applyMigrations, runMigration } from "@/lib/server/test/db";
Expand Down
2 changes: 1 addition & 1 deletion app/lib/server/essay/actions.server.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { beforeEach, describe, expect, it, vi } from "vitest";
import { beforeEach, describe, expect, it, vi } from "vite-plus/test";

import { requireUser } from "@/lib/server/session.server";

Expand Down
2 changes: 1 addition & 1 deletion app/lib/server/my-notebooks/actions.server.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { beforeAll, beforeEach, describe, expect, it, vi } from "vite-plus/test";

import { prisma } from "@/lib/server/prisma.server";
import { sortNotebooks } from "@/lib/shared/notebook-order";
Expand Down
2 changes: 1 addition & 1 deletion app/lib/server/my-notebooks/sharing-actions.server.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { beforeAll, beforeEach, describe, expect, it, vi } from "vite-plus/test";

import { prisma } from "@/lib/server/prisma.server";
import { requireUser } from "@/lib/server/session.server";
Expand Down
2 changes: 1 addition & 1 deletion app/lib/server/notebook-access.server.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { beforeAll, describe, expect, it } from "vitest";
import { beforeAll, describe, expect, it } from "vite-plus/test";

import { getNotebookRole, requireNotebookRole } from "./notebook-access.server";
import { addEditor, applyMigrations, createNotebook, createUser } from "./test/db";
Expand Down
2 changes: 1 addition & 1 deletion app/lib/server/profile.server.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { beforeAll, describe, expect, it } from "vitest";
import { beforeAll, describe, expect, it } from "vite-plus/test";

import { prisma } from "@/lib/server/prisma.server";
import { updateDisplayName } from "@/lib/server/profile.server";
Expand Down
2 changes: 1 addition & 1 deletion app/lib/server/study-events.server.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { beforeAll, describe, expect, it, vi } from "vitest";
import { beforeAll, describe, expect, it, vi } from "vite-plus/test";

import { prisma } from "@/lib/server/prisma.server";
import { requireUser } from "@/lib/server/session.server";
Expand Down
2 changes: 1 addition & 1 deletion app/lib/server/translation/actions.server.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { beforeEach, describe, expect, it, vi } from "vitest";
import { beforeEach, describe, expect, it, vi } from "vite-plus/test";

import { requireUser } from "@/lib/server/session.server";

Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/accent.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import { buildAccentIndex, cycleAccent, cycleCharBeforeCaret, insertAtSelection } from "./accent";

Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/auth-redirect.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import { safeRedirectPath } from "./auth-redirect";

Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/book-page.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import { BOOK_PAGE_SHAPE, bookPagePath } from "./book-page";

Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/bulk-edit.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import { bulkCardFieldName, isBlankCardFields, pickCardFields } from "./bulk-edit";

Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/card-data.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import { normalizeCardData } from "./card-data";

Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/card-groups.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import {
compactRows,
Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/chinese-ime/dictionary.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import { getCharCandidates, getWordCandidates, lookupCandidates } from "./dictionary";

Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/chinese-ime/engine.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import { canCycleTone, commitAll, createImeState, handleImeAction } from "./engine";

Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/chinese-ime/key-actions.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import { imeKeyResult } from "./key-actions";

Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/chinese-ime/readings.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { pinyin } from "pinyin";
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import { CHAR_DICT } from "./dict/chars";
import { CHAR_READINGS } from "./dict/readings";
Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/chinese-ime/sentence-conversion.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import { convertSentence, lookupCandidates } from "./dictionary";
import { segmentPinyin } from "./syllables";
Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/chinese-ime/syllables.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import { isPinyinSyllable, normalizeSyllable, segmentPinyin } from "./syllables";

Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/conjugation/choices.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import { conjugationChoices } from "./choices";

Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/conjugation/de/engine.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import { buildConjugation } from "./engine";
import { formsFor, type RegularVerb, type VerbEntry } from "./types";
Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/conjugation/es/engine.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import { buildConjugation } from "./engine";
import { formsFor, type RegularVerb, type VerbEntry } from "./types";
Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/conjugation/fr/engine.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import { buildConjugation } from "./engine";
import type { VerbEntry } from "./types";
Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/conjugation/practice-verbs.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import { verbs as french } from "@/routes/learn._french.french.03/verbs";
import { verbs as german } from "@/routes/learn._german.german.03/verbs";
Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/conjugation/shared.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import { pickVerbs } from "./shared";

Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/conjugation/tense-options.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import { TENSE_OPTIONS as DE } from "./de/types";
import { TENSE_OPTIONS as ES } from "./es/types";
Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/content-disposition.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import { attachmentContentDisposition } from "./content-disposition";

Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/display-name-schema.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import { DISPLAY_NAME_MAX_LENGTH, parseDisplayName } from "./display-name-schema";

Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/essay/length.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import {
countEssayLength,
Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/essay/schema.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import { parseSubmitEssayInput } from "./schema";

Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/excel.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ExcelJS from "exceljs";
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import { createTemplateWorkbookBuffer, ExcelParseError, parseExcelWorkbook } from "./excel";

Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/learn/content.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import { getSections } from "./content";
import { LANGUAGES } from "./languages";
Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/learn/grammar-quiz.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import * as chinese from "@/routes/learn._chinese.chinese.05/quiz-data";
import * as french1 from "@/routes/learn._french.french.05/quiz-data";
Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/learn/pronunciation-quiz.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import {
pronunciationQuiz,
Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/learn/schema.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import { parseLearnAction, parseSectionKey } from "./schema";

Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/learn/section-progress.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import {
applyManualToggle,
Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/material-colors.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import { NOTEBOOK_CATEGORY } from "./study-events";
import { OTHER_MATERIAL_COLOR, materialColors } from "./material-colors";
Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/mdx-source.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import { unescapeMarkdown } from "./mdx-source";

Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/notebook-columns.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import { mergeImportedColumns, normalizeColumns } from "./notebook-columns";

Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/notebook-language.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import {
assistModeChoices,
Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/notebook-order.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import { clampToGroup, notebookGroup, sortNotebooks } from "./notebook-order";

Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/notebook-quiz.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import {
NOTEBOOK_TEMPLATE_COLUMNS,
Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/notebook-schema.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import {
CARD_HEAD_MAX_LENGTH,
Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/notebook-title.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import { NOTEBOOK_TITLE_MAX_LENGTH } from "./notebook-schema";
import { datedTitle, numberedTitle } from "./notebook-title";
Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/number-practice.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import {
buildNumberPracticeItems,
Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/personal-data.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import { googleProfileToUser, withoutClientInfo, withoutOAuthTokens } from "./personal-data";

Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/practice-data.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import {
loadFillInItems,
Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/practice-languages.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import { PRACTICE_LANGUAGES, getPracticeLanguage } from "./practice-languages";

Expand Down
2 changes: 1 addition & 1 deletion app/lib/shared/random-id.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it } from "vitest";
import { describe, expect, it } from "vite-plus/test";

import { createRandomId } from "./random-id";

Expand Down
Loading
Loading