File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,11 +71,14 @@ export function mergeConfig(
7171 }
7272
7373 // CLI options override file config
74- return {
75- externals : {
76- include : cliOptions . externals ?. include ?? fileConfig . externals ?. include ,
77- exclude : cliOptions . externals ?. exclude ?? fileConfig . externals ?. exclude ,
78- depth : cliOptions . externals ?. depth ?? fileConfig . externals ?. depth ,
79- } ,
74+ const externals = {
75+ include : cliOptions . externals ?. include ?? fileConfig . externals ?. include ,
76+ exclude : cliOptions . externals ?. exclude ?? fileConfig . externals ?. exclude ,
77+ depth : cliOptions . externals ?. depth ?? fileConfig . externals ?. depth ,
8078 } ;
79+
80+ // Only include externals if at least one field is defined
81+ const hasExternals = externals . include || externals . exclude || externals . depth !== undefined ;
82+
83+ return hasExternals ? { externals } : { } ;
8184}
Original file line number Diff line number Diff line change 1- import type {
2- OpenPkg ,
3- SpecExport ,
4- SpecExportKind ,
5- SpecMember ,
6- SpecSchema ,
7- SpecSignature ,
8- SpecType ,
9- SpecTypeParameter ,
1+ import {
2+ DISPLAY_KIND_ORDER ,
3+ type OpenPkg ,
4+ type SpecExport ,
5+ type SpecExportKind ,
6+ type SpecMember ,
7+ type SpecSchema ,
8+ type SpecSignature ,
9+ type SpecType ,
10+ type SpecTypeParameter ,
1011} from '@openpkg-ts/spec' ;
1112
1213/**
@@ -394,12 +395,7 @@ export function sortByName<T extends { name: string }>(items: T[]): T[] {
394395
395396/** Canonical kind ordering for rendering grouped exports. */
396397export const KIND_ORDER : SpecExportKind [ ] = [
397- 'function' ,
398- 'class' ,
399- 'interface' ,
400- 'type' ,
401- 'enum' ,
402- 'variable' ,
398+ ...DISPLAY_KIND_ORDER ,
403399 'namespace' ,
404400 'module' ,
405401 'reference' ,
Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ function extractExportItem(
131131 const description = getDescriptionPreview ( targetSymbol , checker ) ;
132132
133133 // Check deprecated
134- const deprecated = isSymbolDeprecated ( targetSymbol ) ;
134+ const { deprecated } = isSymbolDeprecated ( targetSymbol ) ;
135135
136136 // Check if from different file (re-export)
137137 const reexport = isReexport || sourceFile !== entrySourceFile ;
Original file line number Diff line number Diff line change 1- import type ts from 'typescript' ;
1+ import ts from 'typescript' ;
22
33export function isExported ( node : ts . Node ) : boolean {
44 const modifiers = ( node as ts . HasModifiers ) . modifiers ;
55 if ( ! modifiers ) return false ;
6- return modifiers . some ( ( m ) => m . kind === 95 /* ExportKeyword */ ) ;
6+ return modifiers . some ( ( m ) => m . kind === ts . SyntaxKind . ExportKeyword ) ;
77}
88
99export function getNodeName ( node : ts . Node ) : string | undefined {
You can’t perform that action at this time.
0 commit comments