mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-21 14:55:43 +00:00
c7d71ea57c
* feat(whats-new): remote release notes with dev workspace mode Add WHATS_NEW.md, CI whats-new.md asset upload, and client fetch/cache with embedded fallbacks. Dev and -dev builds read the full file from the repo for debugging; RC/stable download the release asset on first use. * fix(whats-new): render ## headings and add changelog tab Parse h2 sections in release-notes markdown; load changelog alongside highlights and let users switch views on the What's New page. * fix(whats-new): prefetch on startup and fix CI typecheck prebuild Prefetch whats-new asset when the shell loads on RC/stable builds. Run prebuild:release-notes before tsc and coverage jobs so the gitignored generated bundle exists in CI. * docs: CHANGELOG and credits for What's New remote notes (PR #1058) * fix(whats-new): always slice embedded release notes to current line Drop full CHANGELOG embed for -dev bundles; tauri:dev still reads live markdown from the repo. Ignore all of src/generated/ in git. * fix(whats-new): fetch release asset via Rust to bypass CORS Route whats-new.md download through fetch_url_bytes; rename the technical tab label; add fetch unit tests (PR #1058 review).
27 lines
663 B
JavaScript
27 lines
663 B
JavaScript
import { describe, it } from 'node:test';
|
|
import assert from 'node:assert/strict';
|
|
import { findReleaseSection } from './extract-release-section.mjs';
|
|
|
|
const FIXTURE = `
|
|
## [1.48.0] - 2026-06-10
|
|
|
|
## Highlights
|
|
- One
|
|
|
|
## [1.47.0]
|
|
- Old
|
|
`;
|
|
|
|
describe('findReleaseSection', () => {
|
|
it('matches base line for -rc versions', () => {
|
|
const entry = findReleaseSection(FIXTURE, '1.48.0-rc.3');
|
|
assert.equal(entry.headerVersion, '1.48.0');
|
|
assert.match(entry.body, /Highlights/);
|
|
});
|
|
|
|
it('matches base line for -dev versions', () => {
|
|
const entry = findReleaseSection(FIXTURE, '1.48.0-dev');
|
|
assert.equal(entry.headerVersion, '1.48.0');
|
|
});
|
|
});
|