Skip to content

Commit a18757e

Browse files
Release 1.2.0: Enhanced Interactive CLI with Next.js Support
- Added interactive prompts with @inquirer/prompts - Integrated colorful design with chalk - Added loading spinners with ora - Implemented default interactive mode with minimal prompts - Enhanced Next.js app directory strategy selection - Updated documentation and CHANGELOG for 1.2.0
1 parent c75e8ae commit a18757e

File tree

1 file changed

+48
-15
lines changed

1 file changed

+48
-15
lines changed

CHANGELOG.md

Lines changed: 48 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,60 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [1.2.0] - 2025-06-08
9-
10-
### Added
11-
8+
## [1.2.0] - 2025-06-09
9+
10+
### 🎉 Major Interactive CLI Enhancement
11+
12+
#### Added
13+
- **🎨 Interactive CLI with Inquirer Prompts**: Beautiful, user-friendly interactive prompts using `@inquirer/prompts`
14+
- **🌈 Colorful Design**: Full chalk integration with cyan headers, green success, red errors, yellow warnings, blue info
15+
- **🔄 Loading Spinners**: Professional ora spinners for long-running operations with smart console output handling
16+
- **⚡ Default Interactive Mode**: Commands are interactive by default, showing only essential prompts when needed
17+
- **🔥 Smart Next.js Strategy Selection**: Automatic detection and interactive selection of Next.js app directory strategy
18+
- **📝 Enhanced Command Aliases**: `g` for generate, `i` for init, `h` for help
19+
20+
#### Interactive Features
21+
- **Minimal Interactive Mode**: Shows only essential prompts (author + Next.js strategy) when no config exists
22+
- **Full Interactive Mode**: Complete configuration with advanced options using `-i` flag
23+
- **Automatic Setup**: `shadiff` without commands triggers automatic minimal setup
24+
- **Configuration Summary**: Beautiful display of all settings before execution
25+
- **Smart Prompts**: Only asks for missing essential settings, respects existing configuration
26+
27+
#### Next.js Enhancements
1228
- **🔥 Next.js App Router Support**: Automatic detection and intelligent handling of Next.js projects
1329
- **Smart App Directory Targeting**: Files in `app/` or `src/app/` directories are automatically targeted to `examples/` subdirectories
14-
- **Next.js Project Detection**: Automatically detects Next.js projects by checking for config files (`next.config.js`, `next.config.mjs`, `next.config.ts`)
30+
- **Next.js Project Detection**: Automatically detects Next.js projects by checking for config files
31+
- **Strategy Selection**: Interactive choice between 'preserve' (safe) and 'overwrite' strategies
1532
- **App Code Protection**: Prevents overwriting actual Next.js app code during registry generation
1633

17-
### Enhanced
34+
#### Technical Improvements
35+
- **Smart Console Management**: Ora spinners with console output capture for clean loading experience
36+
- **Enhanced Error Handling**: Colorful error messages with proper spinner failure states
37+
- **Command Structure**: Comprehensive help system with examples and usage patterns
38+
- **Validation**: Input validation with colored error messages and helpful guidance
1839

40+
### Enhanced
1941
- **NextJsDetector Class**: New utility class with methods for Next.js project detection and path transformation
20-
- **Console Logging**: Added informative messages when Next.js projects are detected and app files are targeted
21-
- **Registry Generator**: Enhanced with Next.js-specific logic for intelligent file targeting
22-
23-
### Technical
24-
25-
- Added `src/utils/nextjs-detector.ts` with static methods for Next.js detection
26-
- Enhanced `ShadcnProjectRegistryGenerator` with Next.js detection in constructor
27-
- Modified file processing loop to apply special targeting for app directory files
28-
- Used direct import pattern for `NextJsDetector` to resolve module resolution
42+
- **Console Logging**: Added informative colorful messages throughout the CLI experience
43+
- **Registry Generator**: Enhanced with Next.js-specific logic and complete chalk styling
44+
- **Configuration Management**: Smart detection of missing configuration properties
45+
46+
### Dependencies Added
47+
- `@inquirer/prompts@^7.5.3` - Interactive CLI prompts
48+
- `chalk@^5.4.1` - Terminal colors and styling
49+
- `ora@^8.2.0` - Loading spinners
50+
51+
### Command Behavior Changes
52+
- **`shadiff generate`**: Now interactive by default, shows minimal prompts when no config exists
53+
- **`shadiff generate -i`**: Full interactive mode with all configuration options
54+
- **`shadiff`**: Welcome screen with automatic setup for new users
55+
- **`shadiff init -i`**: Interactive configuration creation with immediate generation option
56+
57+
### Files Added
58+
- `src/cli/interactive.ts` - Complete interactive CLI implementation
59+
- `docs/DEFAULT_INTERACTIVE_IMPLEMENTATION.md` - Default interactive behavior documentation
60+
- `docs/ORA_LOADING_SPINNERS.md` - Loading spinner integration documentation
61+
- `docs/AUTO_NEXTJS_STRATEGY_SELECTION.md` - Next.js strategy selection documentation
2962

3063
## [1.1.1] - 2025-06-08
3164

0 commit comments

Comments
 (0)