mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-03-24 00:11:27 -07:00
* fix: harden preload argv parsing for popup windows * fix: align youtube playback with shared overlay startup * fix: unwrap mpv youtube streams for anki media mining * docs: update docs for youtube subtitle and mining flow * refactor: unify cli and runtime wiring for startup and youtube flow * feat: update subtitle sidebar overlay behavior * chore: add shared log-file source for diagnostics * fix(ci): add changelog fragment for immersion changes * fix: address CodeRabbit review feedback * fix: persist canonical title from youtube metadata * style: format stats library tab * fix: address latest review feedback * style: format stats library files * test: stub launcher youtube deps in CI * test: isolate launcher youtube flow deps * test: stub launcher youtube deps in failing case * test: force x11 backend in launcher ci harness * test: address latest review feedback * fix(launcher): preserve user YouTube ytdl raw options * docs(backlog): update task tracking notes * fix(immersion): special-case youtube media paths in runtime and tracking * feat(stats): improve YouTube media metadata and picker key handling * fix(ci): format stats media library hook * fix: address latest CodeRabbit review items * docs: update youtube release notes and docs * feat: auto-load youtube subtitles before manual picker * fix: restore app-owned youtube subtitle flow * docs: update youtube playback docs and config copy * refactor: remove legacy youtube launcher mode plumbing * fix: refine youtube subtitle startup binding * docs: clarify youtube subtitle startup behavior * fix: address PR #31 latest review follow-ups * fix: address PR #31 follow-up review comments * test: harden youtube picker test harness * udpate backlog * fix: add timeout to youtube metadata probe * docs: refresh youtube and stats docs * update backlog * update backlog * chore: release v0.9.0
51 lines
2.7 KiB
TypeScript
51 lines
2.7 KiB
TypeScript
import { expect, test } from 'bun:test';
|
|
import { readFileSync } from 'node:fs';
|
|
|
|
const rootChangelogContents = readFileSync(new URL('../CHANGELOG.md', import.meta.url), 'utf8');
|
|
const readmeContents = readFileSync(new URL('./README.md', import.meta.url), 'utf8');
|
|
const usageContents = readFileSync(new URL('./usage.md', import.meta.url), 'utf8');
|
|
const installationContents = readFileSync(new URL('./installation.md', import.meta.url), 'utf8');
|
|
const mpvPluginContents = readFileSync(new URL('./mpv-plugin.md', import.meta.url), 'utf8');
|
|
const developmentContents = readFileSync(new URL('./development.md', import.meta.url), 'utf8');
|
|
const changelogContents = readFileSync(new URL('./changelog.md', import.meta.url), 'utf8');
|
|
const ankiIntegrationContents = readFileSync(new URL('./anki-integration.md', import.meta.url), 'utf8');
|
|
const configurationContents = readFileSync(new URL('./configuration.md', import.meta.url), 'utf8');
|
|
|
|
function extractReleaseHeadings(content: string, count: number): string[] {
|
|
return Array.from(content.matchAll(/^## v[^\n]+$/gm))
|
|
.map(([heading]) => heading)
|
|
.slice(0, count);
|
|
}
|
|
|
|
test('docs reflect current launcher and release surfaces', () => {
|
|
expect(usageContents).not.toContain('--mode preprocess');
|
|
expect(usageContents).not.toContain('"automatic" (default)');
|
|
expect(usageContents).toContain('during startup while mpv is paused');
|
|
|
|
expect(installationContents).toContain('bun run build:appimage');
|
|
expect(installationContents).toContain('bun run build:win');
|
|
|
|
expect(mpvPluginContents).toContain('\\\\.\\pipe\\subminer-socket');
|
|
|
|
expect(readmeContents).toContain('Root directory: `docs-site`');
|
|
expect(readmeContents).toContain('Build output directory: `.vitepress/dist`');
|
|
expect(readmeContents).toContain('Build watch paths: `docs-site/*`');
|
|
expect(developmentContents).not.toContain('../subminer-docs');
|
|
expect(developmentContents).toContain('bun run docs:build');
|
|
expect(developmentContents).toContain('bun run docs:test');
|
|
expect(developmentContents).toContain('Build watch paths: `docs-site/*`');
|
|
expect(developmentContents).not.toContain('test:subtitle:dist');
|
|
expect(developmentContents).toContain('bun run build:win');
|
|
|
|
expect(ankiIntegrationContents).not.toContain('alwaysUseAiTranslation');
|
|
expect(ankiIntegrationContents).not.toContain('targetLanguage');
|
|
expect(configurationContents).not.toContain('youtubeSubgen": {\n "mode"');
|
|
expect(configurationContents).toContain('### Shared AI Provider');
|
|
|
|
expect(changelogContents).toContain('## v0.5.1 (2026-03-09)');
|
|
});
|
|
|
|
test('docs changelog keeps the newest release headings aligned with the root changelog', () => {
|
|
expect(extractReleaseHeadings(changelogContents, 3)).toEqual(extractReleaseHeadings(rootChangelogContents, 3));
|
|
});
|