mirror of
https://github.com/immich-app/static-pages.git
synced 2026-09-30 13:23:05 +08:00
* fix(survey): import Migrator from kysely/migration
kysely 0.29 moved Migrator, Migration and MigrationProvider out of the
package root and into the kysely/migration subpath export, so the
self-hosted Node entrypoint died at startup with "Migrator is not a
constructor" and served every request against an unmigrated database.
packages/sql-tools already imports from the subpath; this brings the
survey backend in line.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014aAfftndexMEN2j2os6yEv
* chore(deps): update survey.immich.app dependencies to latest
Brings every dependency of the survey app and its backend up to the
newest release published on npm, and aligns the app with the TypeScript
setup the rest of the monorepo already uses.
Majors:
- vite 7 -> 8 with @sveltejs/vite-plugin-svelte 6 -> 7 (the plugin's
peer range requires vite 8 and svelte >= 5.46.4); every other app in
the workspace was already on this pair
- typescript ^5.9.2 -> the workspace convention of
typescript -> npm:@typescript/typescript6 plus @typescript/native ->
npm:typescript@7. @sveltejs/kit, svelte-check and typescript-eslint
all cap their typescript peer below 7, so TS 6 stays the tooling
compiler and TS 7 native is installed alongside it
- @types/node 24 -> 26
- backend: @hono/node-server 1 -> 2 (drops Node 18, removes the Vercel
adapter; neither is used here), better-sqlite3 12 -> 13 (Node-API
rewrite, same JS API) and @types/better-sqlite3 7 -> 9
Everything else is a minor or patch bump: @sveltejs/kit 2.70.3, svelte
5.56.9, vitest 4.1.11, eslint 10.8.1, tailwindcss 4.3.3, wrangler
4.124.0, hono 4.13.3, playwright 1.62.1, and the rest.
@cloudflare/workers-types and @sveltejs/kit were published inside pnpm's
minimumReleaseAge window, so they need an explicit exemption for
`pnpm install --frozen-lockfile` to accept the lockfile. The entries can
be dropped once those versions age out.
Only the two survey importers changed in the lockfile; the other 15
workspace projects resolve identically.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014aAfftndexMEN2j2os6yEv
* chore(survey): build the Docker image on node 24
better-sqlite3 13 declares engines node >= 22 and the repo sets
engine-strict, so `pnpm install` in the image no longer resolves on
node:20-slim. node 24 matches the version .mise/config.toml pins for
CI and local development.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014aAfftndexMEN2j2os6yEv
* chore(deps): keep survey deps inside pnpm's minimumReleaseAge window
@sveltejs/kit 2.70.3 and @cloudflare/workers-types 5.20260819.1 were
published within pnpm's minimum release age, so accepting them required
a minimumReleaseAgeExclude entry for `pnpm install --frozen-lockfile` to
pass. Step both back one release instead and drop the exemption, leaving
pnpm-workspace.yaml untouched. 2.70.2 is also what the other apps in the
workspace resolve to.
Also declares kysely and @immich/kysely-adapter-cloudflare on the
backend. Both are imported by backend/src but were only ever resolved
through the frontend's node_modules, so any install that did not also
include the frontend could not resolve them.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014aAfftndexMEN2j2os6yEv
* fix(survey): repair the Docker build
The image had not been buildable for a while. Each of these failed the
build on its own:
- `--filter survey...` matches no project; the app is survey.immich.app,
so the frontend stage installed nothing and the build that followed
had no node_modules
- the manifest for futo-backups-survey was still copied in, but that app
was removed in 7d9d2d3, so COPY aborted on a missing path. Neither it
nor the datasets manifest is needed: pnpm --filter installs fine
without unrelated workspace manifests, so both are gone along with the
comment that justified them
- the backend stage never received apps/survey.immich.app/shared, which
backend/src imports, so esbuild could not resolve it
- the esbuild bundle is ESM but inlines CommonJS dependencies, and
esbuild's ESM output replaces require with a stub that throws. ws hit
it on `require("events")` and the server died on startup. build:node
now restores a real require via createRequire, and the Dockerfile
calls that script instead of repeating the flags
Adds a .dockerignore so COPY stops dragging the host's pnpm symlink farm
and stale build output into the context, and marks the backend package
as ESM, which is what it already is and what its bundle needs to avoid
being reparsed at every start.
Verified by replaying every stage's COPY and RUN outside Docker: both
builders complete, and the resulting payload boots, applies migrations,
serves the built frontend and records a survey response through
better-sqlite3.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014aAfftndexMEN2j2os6yEv
* fix(lint): pin tsconfigRootDir in both eslint configs
The survey app is the only workspace project with its own flat config,
and ESLint 10 resolves a config per linted file, so a root `pnpm lint`
loads that config alongside this one. typescript-eslint records a
candidate tsconfigRootDir for every config file it is loaded from and
throws rather than guess once there is more than one, failing 215 files
across the survey app, ui.immich.app, bin and packages with "No
tsconfigRootDir was set, and multiple candidate TSConfigRootDirs are
present".
Aliasing the survey app's typescript to @typescript/typescript6 is what
surfaced it: the app used to resolve its own typescript-eslint instance
against typescript 5.9, so the two configs registered their candidates
in separate module state. Now both configs share one instance and see
each other's candidate.
Pinning tsconfigRootDir explicitly in each config is what the error
asks for and keeps each config anchored to its own directory.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014aAfftndexMEN2j2os6yEv
---------
Co-authored-by: Claude <noreply@anthropic.com>
41 lines
1.4 KiB
JSON
41 lines
1.4 KiB
JSON
{
|
|
"name": "survey-backend",
|
|
"version": "0.0.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "wrangler dev",
|
|
"deploy": "wrangler deploy",
|
|
"cf-typegen": "wrangler types",
|
|
"build": "pnpm build:workers",
|
|
"build:workers": "wrangler build --config wrangler-do.jsonc && mv dist/index.js dist/sessions.js && wrangler build",
|
|
"start": "tsx src/server.ts",
|
|
"build:node": "esbuild src/server.ts --bundle --platform=node --format=esm --outdir=dist --external:better-sqlite3 --external:pg --banner:js=\"import { createRequire as topLevelCreateRequire } from 'node:module'; const require = topLevelCreateRequire(import.meta.url);\"",
|
|
"load-test": "tsx scripts/load-test.ts",
|
|
"test:integration": "vitest run",
|
|
"test:integration:watch": "vitest"
|
|
},
|
|
"devDependencies": {
|
|
"@cloudflare/workers-types": "^5.20260818.1",
|
|
"@hono/node-server": "^2.1.1",
|
|
"@types/better-sqlite3": "^9.6.0",
|
|
"@types/pg": "^8.23.1",
|
|
"@types/ws": "^8.18.1",
|
|
"esbuild": "^0.28.2",
|
|
"hono": "^4.13.3",
|
|
"tsx": "^4.23.12",
|
|
"@typescript/native": "npm:typescript@^7.0.2",
|
|
"typescript": "npm:@typescript/typescript6@^6.0.2",
|
|
"vitest": "^4.1.11",
|
|
"wrangler": "^4.124.0",
|
|
"ws": "^8.21.3"
|
|
},
|
|
"dependencies": {
|
|
"@immich/kysely-adapter-cloudflare": "^0.1.0",
|
|
"itty-router": "^5.0.24",
|
|
"kysely": "^0.29.5",
|
|
"better-sqlite3": "^13.0.3",
|
|
"pg": "^8.23.0"
|
|
}
|
|
}
|