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 <[email protected]>
1 parent 67983ea commit caf802f

File tree

3 files changed

+2187
-14
lines changed

3 files changed

+2187
-14
lines changed

0 commit comments

Comments
 (0)