You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Conducted comprehensive code audit that identified and fixed critical bugs,
restored CI/CD infrastructure, and improved cross-platform compatibility.
Critical bug fixes:
- Fixed readonly property mutation in removeTrailingIndex logic that was
directly mutating imp.libraryName (readonly property)
- Created removeTrailingIndexFromImports() helper method that creates new
Import objects instead of mutating existing ones
- Fixed comment indentation loss during import reorganization (was using
trim() which removed all indentation)
- Now preserves original text with indentation, only trims for checking
Testing improvements:
- Added Test 90: Verifies comment indentation preservation in main tests
- Added Test 123: Proves both old and new extensions preserve indentation
- Fixed TC-400 test failing on Windows due to hardcoded LF line endings
- Now respects document.eol property (CRLF on Windows, LF on macOS/Linux)
- All 531 tests passing (398 main + 133 comparison)
CI/CD restoration:
- Restored .github/workflows/test.yml from git history (commit 40f0a4b^)
- Updated for current structure with both main and comparison tests
- Tests on all 3 platforms: macOS-latest, ubuntu-latest, windows-latest
- Uses submodules: true to checkout pinned old-typescript-hero commit
Build improvements:
- Fixed TypeScript compilation creating JS files next to source files
- Added "rootDir": ".." to comparison-test-harness/tsconfig.json
- All compiled files now properly centralized in out/ directory
- Verified no JS artifacts next to source files
Documentation updates:
- Updated CLAUDE.md from "13 config options" to "15 config options"
- Added organizeOnSave and legacyMode to documentation
Code cleanup:
- Deleted 3 orphaned debug files (get-actual-output.ts, debug-test.js,
debug-parser.ts) with no automated usage
- Extracted duplicate removeTrailingIndex logic into helper method
Technical notes:
- ImportManager already respected document.eol for output generation
- Only test expectations needed fixing for cross-platform compatibility
- rootDir setting allows TypeScript to correctly mirror source structure
when including files from multiple parent directories
Copy file name to clipboardExpand all lines: CLAUDE_TODO.md
+212Lines changed: 212 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3255,3 +3255,215 @@ This session proves the importance of:
3255
3255
3256
3256
**Credit**: User was RIGHT to question the initial audit. The grep-based approach was insufficient. Manual reading was required and revealed the hidden issue.
3257
3257
3258
+
3259
+
---
3260
+
3261
+
## Session: 2025-10-25 - Dead Code Audit, Bug Fixes, and CI/CD Restoration
The `submodules: true` option automatically checks out the pinned commit from the repository's `.gitmodules` file. No need for manual commit hash specification in workflow - it's already tracked by git!
3430
+
3431
+
**Session Discovery: VSCode EOL Detection**
3432
+
VSCode's `document.eol` property respects user preferences and file content:
3433
+
- Detects existing line endings in file
3434
+
- Falls back to `files.eol` setting ("auto", "\n", "\r\n")
3435
+
- Our code already respected this via `document.eol` - only tests needed fixing
Without `rootDir`, TypeScript can't determine the common ancestor of included files from multiple directories (`**/*.ts`, `../src/**/*.ts`). Adding `rootDir` tells TypeScript where the root is, allowing it to mirror the source directory structure in `outDir`.
0 commit comments