Skip to content

Releases: keyamasabaya/codepack

v5.0 - Working release: content extraction & publishing restored

Choose a tag to compare

@keyamasabaya keyamasabaya released this 01 Jul 09:30
b0de835

🚀 codepack v5.0.0

The first fully working, publishable release after the broken v4.2 line.
codepack again extracts real file contents and the package publishes correctly
to GitHub Packages.

⚠️ If you were on v4.2, upgrade now, that release produced output with an
empty body (directory tree only, no file contents).

🩹 Fixed

  • File content extraction restored, v4.2 generated the directory tree but
    reported every file as empty (Processed 0 files), producing an unusable
    output file. Contents are now extracted correctly again.
  • --include / --exclude filtering, extensions with or without a leading
    dot (py and .py) are now treated identically.
  • Files without an extension are handled correctly in both include and
    exclude modes.
  • Robust file listing, filenames containing spaces are handled safely
    (NUL-delimited paths).
  • Bash 3.2 compatibility (macOS default Bash) restored, replaced mapfile
    with a portable read loop.
  • Package publishing fixed, GitHub Packages auth was failing on every run
    with 401 Unauthorized because .npmrc pinned an empty ${NPM_TOKEN}. CI now
    authenticates via the built-in GITHUB_TOKEN, so releases actually publish.

🔧 Changed

  • Version bumped to 5.0.0 to mark the clean, working baseline.
  • Workflow Node.js runtime bumped 2022 (Node 20 is deprecated on runners).
  • package.json repository URL normalized to git+https.

✅ Verified

  • File extraction works across normal, --include, --exclude, and
    --minify modes.
  • Test suites test_basic.sh and test_features.sh pass.
  • bash -n codepack.sh syntax check passes.

No breaking changes. All flags (--include, --exclude, --minify,
--compress, --copy, --minify-info, --install-minifiers) and the output
format are unchanged — the major bump reflects the fresh working baseline.

📦 Installation

# npm (GitHub Packages)
npm install -g @w3spi5/codepack

# or download the script directly
curl -O https://raw.githubusercontent.com/w3spi5/codepack/main/codepack.sh
chmod +x codepack.sh

v4.1

Choose a tag to compare

@keyamasabaya keyamasabaya released this 22 Jun 22:48

v4.1 (2025-06-22)

  • NEW: Default current directory processing - run ./codepack without specifying a path
  • 🔧 IMPROVED: Simplified usage - directory path is now optional
  • 📚 ENHANCED: Updated documentation with current directory examples
  • 🎯 OPTIMIZED: Better argument parsing for optional directory

v4 codepack

Choose a tag to compare

@keyamasabaya keyamasabaya released this 22 Jun 14:12

v4 codepack : new logo, new package name

v3

v3

Choose a tag to compare

@keyamasabaya keyamasabaya released this 28 May 22:38

Changelog

Version 3.2.1 (3.2.0)

🚀 New Features

  • Debug Mode: Added optional --debug flag for detailed processing information and troubleshooting
  • Enhanced Progress Tracking: Improved progress bar with file count display (current/total)
  • Intelligent File Processing: Smart detection and skipping of empty files to reduce output pollution
  • External Tool Timeout Protection: Added 10-second timeout for external minifiers to prevent hanging
  • Large File Handling: Automatic fallback for HTML files over 30KB to prevent html-minifier-terser crashes

🔧 Improvements

  • Robust Error Handling: All sed operations now include fallback mechanisms and error protection
  • Memory Management: Better cleanup of temporary files and resources
  • Processing Statistics: Detailed reports on processed vs skipped files
  • Minification Reliability: Enhanced minification functions with comprehensive error handling for edge cases
  • Tool Detection: Improved external minifier detection and configuration

🛠️ Bug Fixes

  • Fixed Progress Bar: Progress now correctly displays 0-100% instead of stopping at intermediate percentages
  • Fixed Argument Parsing: Resolved issues with corrupted command-line arguments
  • Fixed Empty Content Handling: All minification functions now properly handle empty or whitespace-only content
  • Fixed External Tool Integration: Improved stability when using terser, pyminify, csso, html-minifier-terser, and jq
  • Fixed Resource Cleanup: Proper cleanup of temporary files and moviepy resources

Version 3.1.0

🚀 New Features

  • Ultra-Aggressive Minification: Complete rewrite of minification engine with 50-70% size reduction
  • External Tool Integration: Support for terser, pyminify, csso-cli, html-minifier-terser, and jq
  • Intelligent Fallback System: Automatic fallback to bash minification when external tools unavailable
  • Multi-Language Support: Enhanced support for 20+ file types including Python, JavaScript, CSS, HTML, JSON, YAML, XML, and more
  • Tool Management Commands: Added --install-minifiers and --minify-info commands

🔧 Improvements

  • Advanced File Type Detection: Intelligent detection of file types based on content and extensions
  • Modular Architecture: Completely refactored codebase with separate functions for each file type
  • Enhanced Configuration: Improved handling of special files like Dockerfile, .gitignore, Makefile
  • Better Resource Management: Optimized memory usage and file handling

🛠️ Bug Fixes

  • Fixed Minification Stability: Resolved crashes with complex file contents
  • Fixed Character Encoding: Better handling of non-ASCII characters
  • Fixed Large File Processing: Improved performance with files over 10MB

Version 3.0.0

🚀 New Features

  • Compression Support: Added --compress option for gzip compression of output files
  • File Filtering System: Added --include and --exclude options for fine-grained file selection
  • Progress Indicators: Added visual progress bars with percentage completion
  • Processing Statistics: Comprehensive reporting of processed files, sizes, and compression ratios
  • Minification Framework: Initial implementation of code minification capabilities

🔧 Improvements

  • Enhanced Directory Tree: Improved tree visualization with better formatting and excluded item marking
  • File Size Reporting: Added file size calculations and formatting (bytes, KB, MB, GB)
  • Error Handling: Comprehensive error handling and validation
  • User Experience: Better command-line interface with detailed help and examples

🛠️ Bug Fixes

  • Fixed Directory Exclusion: Proper handling of nested excluded directories
  • Fixed File Permissions: Better handling of read-only and protected files
  • Fixed Output Formatting: Consistent formatting across different file types

Version 2.5.0

🚀 New Features

  • Automatic Directory Exclusion: Smart exclusion of common build/cache directories (.git, node_modules, venv, pycache, .next, dist, build)
  • Sensitive File Protection: Automatic exclusion of sensitive files (.env, .DS_Store)
  • Enhanced Output Format: Improved output structure with clear file headers and separators
  • Timestamped Output: Output files include timestamp for version control

🔧 Improvements

  • Better File Detection: Improved file type detection and handling
  • Enhanced Tree Generation: More accurate directory tree representation
  • Cleaner Output: Reduced noise in output files by filtering irrelevant content

🛠️ Bug Fixes

  • Fixed Tree Structure: Corrected issues with nested directory visualization
  • Fixed File Reading: Better handling of binary and special files
  • Fixed Path Resolution: Improved path handling across different operating systems

Version 2.0.0

🚀 New Features

  • Directory Structure Visualization: Added comprehensive tree-like directory structure generation
  • Dual-Section Output: Separated directory structure and file contents into distinct sections
  • File Content Extraction: Complete file content extraction with proper formatting
  • Command-Line Interface: Professional CLI with argument parsing and validation

🔧 Improvements

  • Modular Code Structure: Refactored codebase into logical functions and sections
  • Better Documentation: Comprehensive inline documentation and comments
  • Enhanced Error Messages: More descriptive error messages and validation

🛠️ Bug Fixes

  • Fixed File Reading: Resolved issues with special characters and encoding
  • Fixed Directory Traversal: Improved handling of symlinks and special directories
  • Fixed Output Generation: Consistent output formatting across all file types

Version 1.8.0

🚀 New Features

  • Recursive Directory Processing: Full recursive traversal of directory structures
  • Multiple File Support: Ability to process multiple files in a single operation
  • Basic File Filtering: Initial implementation of file type filtering

🔧 Improvements

  • Performance Optimization: Faster file processing and reduced memory usage
  • Better File Handling: Improved handling of large files and directories

🛠️ Bug Fixes

  • Fixed Memory Issues: Resolved memory leaks with large directory structures
  • Fixed File Encoding: Better handling of different character encodings

Version 1.5.0

🚀 New Features

  • Initial Release: Basic file extraction functionality
  • Single File Processing: Extract content from individual files
  • Simple Output Format: Basic text output with file names and content
  • Cross-Platform Support: Compatible with Unix-like systems (Linux, macOS, BSD)

🔧 Core Features

  • File Content Reading: Basic file reading capabilities
  • Text Output: Simple text-based output format
  • Error Handling: Basic error detection and reporting
  • Shell Script Foundation: Robust bash script architecture

Migration Notes

From v3.1.x to v3.2.x

  • No breaking changes
  • New --debug flag is optional and does not affect existing workflows

From v3.0.x to v3.1.x

  • No breaking changes
  • New minification features are optional and activated only with --minify flag
  • External tools are optional; script works with built-in fallbacks

From v2.x to v3.0.x

  • Output format enhanced but remains backward compatible
  • New filtering options are optional
  • Existing scripts will continue to work without modifications

From v1.x to v2.x

  • Significant output format changes
  • Directory structure section added
  • May require updates to scripts that parse output

v1

v1

Choose a tag to compare

@keyamasabaya keyamasabaya released this 03 Jan 23:28
16992f8

Release version 1