@@ -31,10 +31,21 @@ function sourceFiles(dir: string): string[] {
3131 return out ;
3232}
3333
34+ /**
35+ * Historical release notes must keep describing the previous route accurately.
36+ * Changesets generates changelog Markdown and the distributable TS mirror;
37+ * neither is a live route or active developer guidance.
38+ */
39+ function isReleaseHistory ( file : string ) : boolean {
40+ return file . endsWith ( '/CHANGELOG.md' )
41+ || file === join ( ROOT , 'packages/svforge/src/changelog.ts' ) ;
42+ }
43+
3444describe ( 'showcase route convention (#586)' , ( ) => {
3545 it ( 'renamed the gallery to /showcase without leaving the old path behind' , ( ) => {
3646 const offenders = sourceFiles ( ROOT )
3747 . filter ( ( file ) => ! file . endsWith ( 'tests/showcase.test.ts' ) )
48+ . filter ( ( file ) => ! isReleaseHistory ( file ) )
3849 . filter ( ( file ) => readFileSync ( file , 'utf-8' ) . includes ( 'demo-ui' ) )
3950 . map ( ( file ) => file . slice ( ROOT . length + 1 ) ) ;
4051
@@ -43,6 +54,15 @@ describe('showcase route convention (#586)', () => {
4354 expect ( existsSync ( join ( BASE , 'src/routes/demo-ui' ) ) ) . toBe ( false ) ;
4455 } ) ;
4556
57+ it ( 'preserves historical route names in changelogs while checking active sources' , ( ) => {
58+ for ( const packageName of [ 'addon-kit' , 'dnd' , 'svforge' ] ) {
59+ expect ( isReleaseHistory ( join ( ROOT , `packages/${ packageName } /CHANGELOG.md` ) ) ) . toBe ( true ) ;
60+ }
61+ expect ( isReleaseHistory ( join ( ROOT , 'packages/svforge/src/changelog.ts' ) ) ) . toBe ( true ) ;
62+ expect ( isReleaseHistory ( join ( ROOT , 'packages/svforge/README.md' ) ) ) . toBe ( false ) ;
63+ expect ( isReleaseHistory ( INDEX ) ) . toBe ( false ) ;
64+ } ) ;
65+
4666 it ( 'keeps the design-system gallery and adds a module-demo section only when demos exist' , ( ) => {
4767 const index = readFileSync ( INDEX , 'utf-8' ) ;
4868
0 commit comments