Skip to content

Plan VSCode extension version 2.0 revamp#734

Merged
andi1984 merged 2 commits into
developfrom
claude/plan-vscode-extension-v2-011hxhTJ6Noc2Pi1ioKF5yMm
Nov 22, 2025
Merged

Plan VSCode extension version 2.0 revamp#734
andi1984 merged 2 commits into
developfrom
claude/plan-vscode-extension-v2-011hxhTJ6Noc2Pi1ioKF5yMm

Conversation

@andi1984

Copy link
Copy Markdown
Owner

Restructured the extension from a single-file architecture to a modular, maintainable codebase. This refactoring is the foundation for v2.0.0.

Changes:

  • Created new src/ directory structure with organized modules
  • Extracted services: CompressionService, ConfigService
  • Extracted utilities: errorHandler, fileUtils
  • Created dedicated command handlers for each command
  • Defined TypeScript interfaces for type safety
  • Updated tsconfig.json to compile from src/ directory
  • Preserved all existing functionality (no breaking changes)

Directory structure:
src/
├── commands/ - Command handlers
├── services/ - Core business logic
├── utils/ - Helper functions
├── types/ - TypeScript interfaces
└── extension.ts - Main entry point

Benefits:

  • Better code organization and maintainability
  • Improved testability with separated concerns
  • Clear separation between UI, business logic, and utilities
  • Foundation for adding new features (queue system, progress tracking, etc.)
  • Type safety with proper TypeScript interfaces

All existing commands work exactly as before:

  • Compress single file
  • Compress folder
  • Compress git staged files
  • Get compression count

Restructured the extension from a single-file architecture to a modular,
maintainable codebase. This refactoring is the foundation for v2.0.0.

Changes:
- Created new src/ directory structure with organized modules
- Extracted services: CompressionService, ConfigService
- Extracted utilities: errorHandler, fileUtils
- Created dedicated command handlers for each command
- Defined TypeScript interfaces for type safety
- Updated tsconfig.json to compile from src/ directory
- Preserved all existing functionality (no breaking changes)

Directory structure:
  src/
  ├── commands/       - Command handlers
  ├── services/       - Core business logic
  ├── utils/          - Helper functions
  ├── types/          - TypeScript interfaces
  └── extension.ts    - Main entry point

Benefits:
- Better code organization and maintainability
- Improved testability with separated concerns
- Clear separation between UI, business logic, and utilities
- Foundation for adding new features (queue system, progress tracking, etc.)
- Type safety with proper TypeScript interfaces

All existing commands work exactly as before:
- Compress single file
- Compress folder
- Compress git staged files
- Get compression count
The refactored code is now in src/ directory, which compiles to
out/src/extension.js instead of out/extension.js. Updated package.json
to point to the correct entry point.

This fixes the test failures where VSCode couldn't find the extension
module because it was looking at the old path.

Changes:
- Updated "main" in package.json from "./out/extension.js" to "./out/src/extension.js"

Fixes #6 test failures related to extension activation and command registration.
@andi1984
andi1984 merged commit c282936 into develop Nov 22, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants