Skip to content

Commit c300a85

Browse files
committed
Added changelog, and added fixes from PR's given credits, closes #119 and #139
1 parent 4c7ee2e commit c300a85

File tree

9 files changed

+231
-160
lines changed

9 files changed

+231
-160
lines changed

CHANGELOG.md

Lines changed: 137 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -5,193 +5,203 @@ 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-
## [2.0.0-beta.1] - 2024-12-16
8+
## [2.0.0] - 2024-12-16
99

10-
### 🎯 Major Changes
10+
### 🎯 Major Rewrite
1111

12-
#### Complete Codebase Modernization
12+
Version 2.0 represents a **complete rewrite** of the strapi-tool-dockerize from JavaScript to TypeScript with modern architecture and enhanced user experience.
1313

14-
- **TypeScript Migration**: Fully migrated from JavaScript to TypeScript with comprehensive type safety
15-
- **Modern Architecture**: Restructured with plugin-based system for extensibility
16-
- **Enhanced User Experience**: Complete UI/UX overhaul with improved wizard flow
14+
#### Complete TypeScript Migration
1715

18-
#### Plugin System Architecture
16+
- **Full TypeScript Rewrite**: Migrated entire codebase from JavaScript to TypeScript
17+
- **Type Safety**: Comprehensive type definitions and interfaces
18+
- **Modern Architecture**: Plugin-based system for database support
19+
- **Developer Experience**: Better IDE support, autocomplete, and error detection
1920

20-
- **Database Plugin System**: Modular plugin architecture for database support
21-
- **Plugin Discovery**: Automatic discovery and loading of built-in and custom plugins
22-
- **Extensible Framework**: Support for custom plugins and future extensions
21+
#### Enhanced User Experience
2322

24-
### ✨ New Features
25-
26-
#### Enhanced Database Support
23+
- **Interactive CLI**: Modern wizard-style interface with beautiful prompts
24+
- **Environment Selection**: Choose development, production, or both configurations
25+
- **Project Detection**: Auto-detects Strapi version, language, Node version, and package manager
26+
- **Streamlined Output**: Consolidated project information display
2727

28-
- **SQLite Support**: Added full support for SQLite databases
29-
- **Improved PostgreSQL**: Enhanced PostgreSQL configuration with better defaults
30-
- **Enhanced MySQL/MariaDB**: Improved MySQL and MariaDB integration
31-
- **Database Detection**: Automatic detection of existing database configurations
28+
### 🐛 Issues Resolved
3229

33-
#### Environment Management
30+
This release addresses real community-reported issues:
3431

35-
- **Environment Selection**: Choose between development, production, or both environments
36-
- **Smart .env Handling**: Intelligent .env file management that preserves existing variables
37-
- **Docker Section Management**: Automatic detection and replacement of Docker configuration sections
38-
- **Security Enhancements**: Secure random password and secret generation
32+
#### MySQL 8.4 Compatibility - **Thanks to [@koeppel](https://github.com/koeppel)**
3933

40-
#### Project Detection & Validation
34+
- **Fixed MySQL 8.4 Compatibility** - Resolves deprecated `--default-authentication-plugin` parameter
35+
- Addresses [PR #119](https://github.com/strapi-community/strapi-tool-dockerize/pull/119) and related MySQL 8.4+ compatibility issues
36+
- Replaces deprecated `--default-authentication-plugin=mysql_native_password` with `--mysql-native-password=ON`
37+
- Maintains character set, collation, and native password authentication functionality
4138

42-
- **Advanced Project Detection**: Comprehensive Strapi project validation
43-
- **Node Version Checking**: Automatic Node.js version compatibility checking
44-
- **TypeScript/JavaScript Detection**: Automatic project type detection
45-
- **Package Manager Detection**: Smart detection of npm, yarn, or pnpm
39+
#### Package Manager & Installation Issues
4640

47-
#### User Experience Improvements
41+
- **Better Package Manager Detection** - Addresses [#137](https://github.com/strapi-community/strapi-tool-dockerize/issues/137)
42+
- Improved detection of npm, yarn, pnpm
43+
- Better error handling during installation
44+
- Enhanced validation of project state
4845

49-
- **Modern CLI Interface**: Beautiful, interactive CLI using @clack/prompts
50-
- **Progress Indicators**: Real-time feedback during file generation
51-
- **Colored Output**: Enhanced readability with syntax highlighting
52-
- **Streamlined Workflow**: Simplified wizard with better question flow
46+
#### Database Configuration Problems
5347

54-
### 🔧 Technical Improvements
48+
- **MySQL Installation Improvements** - Helps with [#123](https://github.com/strapi-community/strapi-tool-dockerize/issues/123)
49+
- Better database client configuration
50+
- Improved connection string generation
51+
- Modern MySQL image usage
5552

56-
#### Code Quality & Testing
53+
#### Environment & Configuration
5754

58-
- **Comprehensive Test Suite**: 26 unit tests covering all major functionality
59-
- **Fast Test Execution**: Tests run in ~250ms (99% performance improvement)
60-
- **TypeScript Type Safety**: Full type coverage with strict TypeScript configuration
61-
- **Modern Build System**: Using tsup for optimized builds
55+
- **Environment Selection** - Addresses [#132](https://github.com/strapi-community/strapi-tool-dockerize/issues/132)
56+
- Clear development vs production environment selection
57+
- Better documentation of environment-specific configurations
58+
- Separate Dockerfile and docker-compose configurations
6259

63-
#### File Generation & Templates
60+
#### Project Creation & Validation
6461

65-
- **Liquid Templating**: Advanced templating system using LiquidJS
66-
- **Template Organization**: Better organized template structure
67-
- **File Writing System**: Enhanced file writing with conflict detection
68-
- **Debug Mode**: Comprehensive debugging capabilities
62+
- **Enhanced Project Validation** - Helps with [#131](https://github.com/strapi-community/strapi-tool-dockerize/issues/131)
63+
- Better Strapi project detection and validation
64+
- Improved error messages for invalid projects
65+
- Better handling of edge cases
6966

70-
#### Error Handling & Reliability
67+
### ✨ New Features
7168

72-
- **Robust Error Handling**: Comprehensive error catching and user-friendly messages
73-
- **Validation System**: Input validation with clear error feedback
74-
- **Graceful Degradation**: Better handling of edge cases and missing dependencies
75-
- **Async/Await**: Proper async handling throughout the application
69+
#### Database Support Expansion
7670

77-
### 🐛 Bug Fixes
71+
- **SQLite Support**: New database option for local development (file-based)
72+
- Proper directory bind mounting for data persistence (`.tmp` directory)
73+
- No separate database service needed (simplified docker-compose)
74+
- Correct filename handling matching Strapi defaults (`.tmp/data.db`)
75+
- Fixed path configuration to align with official Strapi documentation
76+
- **Enhanced PostgreSQL**: Improved configuration with alpine images
77+
- **Schema Permissions Fix**: Automatically grants required SCHEMA permissions to prevent Strapi admin 500 errors
78+
- Includes initialization script (`init-scripts/01-init-strapi-user.sql`) that runs on first container startup
79+
- Addresses PostgreSQL user permissions as documented in [Strapi's PostgreSQL guide](https://docs.strapi.io/cms/configurations/database#postgresql)
80+
- **MariaDB Support**: Alternative to MySQL with better defaults
81+
- **Database Plugins**: Modular plugin system for database configurations
7882

79-
#### Core Functionality
83+
#### Smart Configuration Management
8084

81-
- **Fixed Plugin Loading**: Resolved async/await issues in plugin loading system
82-
- **Fixed .env Duplication**: Eliminated duplicate Docker configuration sections
83-
- **Fixed Node Version Detection**: Proper handling of Node version checking failures
84-
- **Fixed Package Manager Detection**: Accurate detection across different lock file types
85+
- **Intelligent .env Management**:
86+
- Preserves existing environment variables
87+
- Updates only Docker-related sections with clear headers
88+
- Prevents duplication of configuration blocks
89+
- Organized section management
8590

86-
#### CLI & User Interface
91+
#### Environment Flexibility
8792

88-
- **Fixed Command Parsing**: Improved CLI argument parsing and validation
89-
- **Fixed Progress Display**: Proper progress indication during operations
90-
- **Fixed Error Messages**: More descriptive and actionable error messages
91-
- **Fixed Path Resolution**: Better handling of project path detection
93+
- **Multi-Environment Support**:
94+
- **Development only**: docker-compose + Dockerfile for local development
95+
- **Production only**: optimized Dockerfile.prod for deployment
96+
- **Both**: complete development + production setup (default)
9297

93-
### 🔄 Breaking Changes
98+
#### Security Enhancements
9499

95-
#### API Changes
100+
- **Auto-generated Secrets**: Secure random generation of:
101+
- Database passwords
102+
- APP_KEYS (4 random keys)
103+
- JWT secrets
104+
- API tokens
105+
- Transfer tokens
96106

97-
- **CLI Arguments**: Updated CLI argument names for consistency
98-
- `--dbtype``--database-type`
99-
- `--useCompose``--use-compose`
100-
- Added new `--environment` option
107+
### 🔧 Technical Improvements
101108

102-
#### Configuration Changes
109+
#### Modern Architecture
103110

104-
- **Database Configuration**: Updated database configuration format
105-
- **Template Structure**: Reorganized template directory structure
106-
- **Environment Variables**: Updated environment variable naming conventions
111+
- **Plugin System**: Extensible architecture for database plugins
112+
- **Template Engine**: LiquidJS-powered templating system
113+
- **Modular Design**: Separation of concerns with utility modules
114+
- **Comprehensive Error Handling**: User-friendly error messages
107115

108-
#### System Requirements
116+
#### Developer Experience
109117

110-
- **Node.js**: Minimum version updated to Node.js 18+
111-
- **Dependencies**: Updated to latest versions of all dependencies
112-
- **TypeScript**: Full TypeScript support required for development
118+
- **Comprehensive Testing**: 26 unit tests covering core functionality (v1.x had no tests)
119+
- **Fast Test Execution**: Complete test suite runs in ~250ms
120+
- **TypeScript Support**: Full type coverage for better maintainability
121+
- **Modern Build System**: Using tsup for optimized builds
113122

114-
### 📦 Dependencies
123+
#### Code Quality
115124

116-
#### Added
125+
- **Modern JavaScript**: ES2022+ features with proper async/await usage
126+
- **Organized Code Structure**: Clear separation of utilities, plugins, and core logic
127+
- **Documentation**: Comprehensive inline documentation
128+
- **Linting**: ESLint and Prettier configuration for consistent code style
117129

118-
- `@clack/prompts` - Modern CLI prompts
119-
- `liquidjs` - Advanced templating engine
120-
- `chalk` - Terminal string styling
121-
- `zod` - Runtime type validation
122-
- `vitest` - Fast unit testing framework
130+
### 🔄 Breaking Changes
123131

124-
#### Updated
132+
**⚠️ Important**: Version 2.0 is essentially a new tool. The usage pattern is different from v1.x.
125133

126-
- `typescript` - Updated to v5.3.3
127-
- `commander` - Updated to v11.1.0
128-
- `fs-extra` - Updated to v11.2.0
134+
#### New Usage Pattern
129135

130-
#### Removed
136+
- **Interactive Mode**: `npx @strapi-community/dockerize` (default)
137+
- **CLI Mode**: `npx @strapi-community/dockerize new [options]`
138+
- **Reset Command**: `npx @strapi-community/dockerize reset`
131139

132-
- Legacy JavaScript files
133-
- Outdated dependencies
134-
- Unused utility functions
140+
#### What Changed
135141

136-
### 🔒 Security
142+
- **Command Structure**: New interactive wizard instead of single command
143+
- **File Templates**: Completely new template system
144+
- **Environment Variables**: Updated .env variable organization
145+
- **Docker Configuration**: Enhanced Dockerfile and docker-compose.yml templates
137146

138-
#### Enhanced Security
147+
#### For Users Upgrading from v1.x
139148

140-
- **Secure Defaults**: Generated passwords use cryptographically secure random values
141-
- **Input Validation**: All user inputs are validated and sanitized
142-
- **Path Traversal Protection**: Safe file path handling
143-
- **Dependency Updates**: All dependencies updated to latest secure versions
149+
Since this is essentially a new tool with a different approach:
144150

145-
### 📚 Documentation
151+
1. **No migration needed** - v2.0 generates fresh Docker configurations
152+
2. **Remove old files** first (or use the `reset` command)
153+
3. **Run the new interactive wizard**: `npx @strapi-community/dockerize`
154+
4. **Review generated files** and customize as needed
146155

147-
#### Improved Documentation
156+
### 📋 Development Improvements
148157

149-
- **Updated README**: Comprehensive documentation for v2 features
150-
- **API Documentation**: Complete TypeScript interfaces and types
151-
- **Changelog**: Detailed changelog with migration guide
152-
- **Contributing Guide**: Updated contribution guidelines
158+
#### Testing Infrastructure (New!)
153159

154-
### 🚀 Performance
160+
- **Vitest Framework**: Modern testing framework with fast execution
161+
- **Comprehensive Test Coverage**: 26 tests covering core functionality
162+
- **Mocking Strategy**: File system and process mocking for reliable tests
163+
- **CI Integration**: Automated testing on pull requests
155164

156-
#### Performance Improvements
165+
#### Development Workflow
157166

158-
- **Faster Startup**: 50% faster CLI initialization
159-
- **Optimized File Operations**: Efficient file reading and writing
160-
- **Reduced Bundle Size**: Optimized build output
161-
- **Test Performance**: 99% faster test execution
167+
- **TypeScript Build**: Modern build process with tsup
168+
- **Development Mode**: Hot reload during development
169+
- **Package Management**: Support for npm, yarn, and pnpm
170+
- **Linting & Formatting**: ESLint and Prettier integration
162171

163172
---
164173

165-
## [1.x.x] - Previous Versions
174+
## [1.x.x] - Legacy JavaScript Versions
166175

167-
Previous versions were JavaScript-based with basic Docker support. See git history for detailed changes.
176+
### Historical Context
168177

169-
### Migration Guide from v1.x to v2.0
178+
The v1.x series was built in JavaScript and served the community well, but several foundational issues emerged:
170179

171-
#### For End Users
180+
- No automated testing (making maintenance and contributions difficult)
181+
- Limited error handling and validation
182+
- Package manager compatibility issues
183+
- Environment configuration confusion
184+
- Database setup problems (like the MySQL 8.4 compatibility issue)
172185

173-
1. **Node.js**: Ensure you're running Node.js 18+
174-
2. **CLI Usage**: Update any scripts using the new CLI argument names
175-
3. **Environment Files**: Review generated .env files for new structure
186+
Version 2.0 represents a complete ground-up rewrite addressing these foundational issues with modern tooling and architecture.
176187

177-
#### For Contributors
178-
179-
1. **TypeScript**: All development now requires TypeScript knowledge
180-
2. **Testing**: Use `npm test` for the new Vitest-based test suite
181-
3. **Build System**: Use `npm run build` with the new tsup build system
188+
---
182189

183-
#### Breaking Changes
190+
## Community Contributors
184191

185-
- CLI argument names have changed (see breaking changes section)
186-
- Template structure has been reorganized
187-
- Minimum Node.js version is now 18+
192+
### Special Thanks
188193

189-
For detailed migration help, please see the README or open an issue on GitHub.
194+
- **[@koeppel](https://github.com/koeppel)** - Identified and provided solution for MySQL 8.4 compatibility issue in [PR #119](https://github.com/strapi-community/strapi-tool-dockerize/pull/119)
195+
- **[@Simon-Dirks](https://github.com/Simon-Dirks)** - Grammar and documentation improvements in [PR #139](https://github.com/strapi-community/strapi-tool-dockerize/pull/139)
196+
- **[@Eventyret](https://github.com/Eventyret)** - Lead maintainer and v2.0 architect
197+
- All community members who reported issues and provided feedback
190198

191199
---
192200

193-
### Links
201+
## Links
194202

195-
- [GitHub Repository](https://github.com/strapi-community/strapi-tool-dockerize)
196-
- [NPM Package](https://www.npmjs.com/package/@strapi-community/dockerize)
197-
- [Issues & Bug Reports](https://github.com/strapi-community/strapi-tool-dockerize/issues)
203+
- **GitHub Repository**: https://github.com/strapi-community/strapi-tool-dockerize
204+
- **NPM Package**: https://www.npmjs.com/package/@strapi-community/dockerize
205+
- **Issue Tracker**: https://github.com/strapi-community/strapi-tool-dockerize/issues
206+
- **Discord**: https://discord.strapi.io/ (join the #tools channel)
207+
- **Support**: [Open Collective](https://opencollective.com/strapi/projects/strapi-tool-dockerize)

0 commit comments

Comments
 (0)