All notable changes to "Mini TypeScript Hero" will be documented in this file.
This project continues the legacy of TypeScript Hero by Christoph Bühler. Version history prior to v4.0.0 is from the original extension.
Modernization release - rebuilding Mini TypeScript Hero with a modern technology stack.
- Organize imports command (
Ctrl+Alt+O/Cmd+Alt+O) - Automatic removal of unused imports
- Intelligent import sorting (by module path or first specifier)
- Configurable import grouping (Plains, Modules, Workspace, Regex patterns)
- Organize on save functionality (optional)
- Automatic settings migration from original TypeScript Hero extension (runs once on first startup)
- Support for TypeScript, JavaScript, TSX, and JSX files
- Comprehensive configuration options:
- Quote style (single/double)
- Semicolons (on/off)
- Space in braces
- Multiline threshold
- Trailing comma in multiline imports
- Remove trailing /index from paths
- Ignored imports (never removed)
- Exclude patterns (glob patterns to skip files)
- Disable sorting option
- Disable removal option
- Configuration Priority Order - Respects VS Code settings (which may come from
.editorconfigvia the EditorConfig extension) before extension settings - Commands:
Mini TS Hero: Organize imports- Sort and remove unused imports in current fileMini TS Hero: Organize imports in workspace- Organize all files in workspaceMini TS Hero: Organize imports in folder- Organize all files in selected folder (context menu)Mini TS Hero: Check for configuration conflicts- Detect if multiple tools would organize importsMini TS Hero: Toggle legacy mode- Switch between modern and legacy behavior
- Modern implementation using ts-morph
- Built with esbuild for optimal performance
TypeScript Hero by Christoph Bühler was well-known for its import organizer, but it went unmaintained. I picked it up, modernized everything, and added new features.
Technology improvements:
- Replaced deprecated
typescript-parserwith modern ts-morph - Replaced InversifyJS DI container with direct instantiation
- Native VSCode OutputChannel logging (replaced winston)
- Modern esbuild bundling
- Strict TypeScript
- Modern VS Code APIs
The following changelog documents the original TypeScript Hero extension by Christoph Bühler. Mini TypeScript Hero continues from v3.0.0.
Focused release: The original author streamlined TypeScript Hero to focus solely on import organization, as VS Code's built-in features now handle the rest.
- Bug fix for parser
- Bug fix for parser
- Code outline icons
- Code completion improvements
- Exported elements handling
- Shebang handling in files
- Merge imports from same package (via libraryAlreadyImported check)
- Logging improvements
- fs-extra package handling
- Logger improvements
- Add imports command
- Import under cursor command
BREAKING CHANGES: Major refactoring release
- Major internal refactoring
- Auto-import feature (recommended using VS Code built-in)
- Regex groups are processed after keyword groups for proper precedence
- First-specifier ordering option (
organizeSortsByFirstSpecifier)
- Multi-root workspace support (#325)
- Improved logging and error handling (#326)
- Default exports and indexer properties not removed when used (#328)
- File handler logging level
- TypeScript parsing improvements (#327, #311)
- Document outline: Show getters and setters (#314)
- Setting to disable removal of unused imports (
disableImportRemovalOnOrganize) (#315) - Default value for
organizeOnSavechanged to false
- Upgraded TypeScript parser with default import generation improvements (#313, #227, #305)
- Organize on save via workspace hook (#291)
- Respect file header comments and JSDoc (#296)
- Setting to disable prompting for aliases and default names (#298)
- Disable organize command when not in a code file (#295)
- Don't add empty newline on organize imports (#297)
- Fixed TypeScript version to 2.4.2 (#299, #292)
- JavaScript mode to support JavaScript files for importing (#263)
- Imports with no specifiers generated correctly (#264)
- TSX files are watched for indexing (#255)
- Long-running task for indexing (#247, #246)
- Code completion text edits calculated in later stage (#248, #231)
- Duplicate imports not generated anymore (#253, #226, #175)
- Ignore imports to remove configuration (#252, #250)
- Code outline window removal when disabled (#236)
- Parser package changed with refactoring (#237)
- Implement interface/abstract adds optionals (#233)
- Missing icons in code outline (#238)
- Code outline view in Explorer with jump-to-code on click
- Boolean settings returned correctly (#222)
- Code outline jumps to selected element (#219)
- References in namespaces/modules recognized and not removed (#214)
- Complex regex now possible in import groups (e.g.,
/@angular|regex/core/?.*/) (#218)
First stable release!
- Import grouping with sorting (Plains, Modules, Workspace) (#102)
- Trailing comma option for multiline imports (#100)
- Multiline import threshold default changed to 125 characters
newImportLocationsetting (obsolete with import grouping) (#102)
- Default imports removed regardless of usage (#149)
- Generic interfaces and abstract classes for implement elements (#158)
- Deprecation warnings during testing
Big refactoring release (#143)
- Setting
disableImportsSortingto disable sorting during organize
- Setting
pathStringDelimiterrenamed tostringQuoteStyle - Extension split into extension part and language-server part (performance improvement)
- Changed linting to airbnb style
- Imports from newly added TSX files (#169)
- Imports from modules with index file same name as folder (Angular)
- Files without exports no longer added to index
- Setting
insertSemicolonsto disable semicolon emit
- Default value of
ignorePatternsno longer contains node_modules - Upgraded to TypeScript 2.1.4 (#148)
- "Flame" error state shown correctly during indexing
- Duplicate declarations filtered (overloads) (#105)
- Only workspace files filtered by exclude pattern (#103)
- Variables sorted to top to reduce auto-import for
console(#99) - Extension no longer crashes with prototype methods (#79)
- Class manager for modifying classes in documents (#127)
- Light-bulb feature support in TSX files (#128)
- CodeFix for implementing missing methods/properties from interfaces and abstract classes (#114)
- JSDoc support
- Code action provider (light bulb) for importing missing imports (#11)
- Add all missing imports command (#106)
- Documents managed by controller that calculates edits before committing
- Extension and completion provider initialized for TSX files (#112)
- Template literal strings (backticks) considered in autocompletion
- TypeScript symbols know their positions
- Statusbar item for debug restarter state (#85)
- Default export import suggests a name (#71)
- Support for
@typesstyle definitions (TypeScript 2.0) (#77)
- Upgraded to TypeScript 2.0 (#88)
- Default value of
insertSpaceBeforeAndAfterImportBracesis nowtrue
- New imports placed below
"use strict"(#73) - Multiline imports respect
editor.tabSize(#74) - Index reloaded when ignore patterns change (#75)
- Autocomplete filters local file usages (#69)
- Default exports don't break extension (#79)
- Node paths correctly split (#76)
- Exports from root index.ts not empty
- Multiline import support (#60)
- Setting for multiline threshold
- Configurable new import location (top of file or cursor position) (#41)
- Alias prompt when specifier already present (#44)
- Autocomplete doesn't suggest already imported items (#64)
- Autocomplete doesn't suggest items from own file (#61)
- No duplicates with multiline imports (#43)
- Multiline imports work with multiple imports
- Autocomplete doesn't add other classes from file
- More tests (#8)
- CodeCompletionProvider with auto-import (#5)
- Support for
*.tsxfiles (#42)
- Import under cursor only imports exact matches (#35)
- Own imports (workspace) sorted to top (#37)
- Updated inversify to v2
- Forward slashes used on Windows (#19)
export xxx as yyycorrectly uses alias (#36)- Build directories ignored by default (#48)
- Substructures import parent index.ts correctly (#49)
- Command to add import from symbol under cursor (#22)
- Complete indexing/parsing engine rewritten
- Adding import doesn't auto-organize afterward (#22, #23)
- Exports recursively merged (#25)
- Imports added with forward slashes (#19)
- Imports not vanishing with PropertyAssignments (#27)
- Imports not vanishing on organize (#30)
- Output channel for logging with configurable verbosity
- Commands added to command GUI
- Tests on Travis CI
- Typos
Initial public release
- Organize imports
- Add new imports
- Debug restarter feature
- Command palette (
Ctrl+Alt+G)
- Various bugs in AST parsing