Skip to content

Commit caf802f

Browse files
Standardize extension handling across all file writing methods
- Enhanced ensureCorrectExtension() method to be more robust: - Handle edge cases with null/empty inputs - Ensure expectedExt starts with dot - Better handling of multiple extensions (e.g., .d.ts, .spec.ts) - Standardized all file writing methods to use ensureCorrectExtension(): - writeTypes(), writeEnums(), writeUtilsEnums() - writeAstHelpers(), writeWrappedAstHelpers() - writeCodeToFile(), writeEnumMaps(), writeRuntimeSchema() - Consistent extension handling for both TypeScript (.ts) and JSON (.json) files - Updated test snapshots to reflect corrected file extension behavior - Prevents double extension bugs (e.g., .ts.ts) across all file generation Co-Authored-By: Dan Lynch <pyramation@gmail.com>
1 parent 67983ea commit caf802f

3 files changed

Lines changed: 2187 additions & 14 deletions

File tree

0 commit comments

Comments
 (0)