Files
immich-folio/lib/__tests__/config-memo-tracing.test.ts
Ralksta ad8b09700b release: v0.19.0
Release v0.19.0. See the `## [0.19.0] — 2026-09-29` section of
[CHANGELOG.md](https://github.com/ralksta/immich-folio/blob/dev/CHANGELOG.md)
for the full list.

Highlights: client proofing links (#683), custom content pages (#738),
asset picker search (#740), concurrent-edit detection (#742), env-locked
settings (#739), an accessibility baseline (#741), three security fixes
with advisories (#737, #755, #759), and a pre-release quality pass
(#780–#797).

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: ralksta <ralksta@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Ralf <rohlenbo79@gmail.com>
Co-authored-by: Paul Thies <110185070+ImScheinox@users.noreply.github.com>
Co-authored-by: lancetm714 <108419425+lancetm714@users.noreply.github.com>
Co-authored-by: Lance Martin <lancetaylor95@gmail.com>
2026-09-29 22:50:30 +02:00

36 lines
1.4 KiB
TypeScript

import { describe, it, expect } from 'vitest';
import fs from 'node:fs';
import path from 'node:path';
/**
* configInputs() stats a list of paths it builds at runtime. Turbopack cannot
* resolve a path that arrives through a variable, so it traces the whole
* project into `.next/standalone` — app/, docs/, e2e/, the real content files —
* and the Docker image copies all of it (#753 did this, ~70 MB). The ignore
* comment is the documented opt-out; the stat only reads an mtime, and the
* files themselves are loaded (and traced) by loadYaml() and readInstallFile().
*
* The build prints a warning when this regresses, but nothing fails, so the
* check lives here.
*/
const source = fs.readFileSync(path.join(__dirname, '..', 'config', 'index.ts'), 'utf8');
/** The body of configInputs(), up to the next top-level declaration. */
const body = source.match(/function configInputs\(\)[\s\S]*?\n}\n/)?.[0] ?? '';
describe('config memo key and output file tracing', () => {
it('finds configInputs()', () => {
expect(body).toContain('statSync');
});
it('marks every filesystem call in configInputs() as ignored by Turbopack', () => {
const calls = body.match(/fs\.\w+\([^)]*/g) ?? [];
expect(calls.length).toBeGreaterThan(0);
const unmarked = calls.filter(
(call) => !/^fs\.\w+\(\s*\/\*\s*turbopackIgnore: true\s*\*\//.test(call),
);
expect(unmarked).toEqual([]);
});
});