Prewind v2.1.0
Prewind Changelog
v2.1.0 — 2026-02-26
🚀 New Features
-
Verbose Logging:
- Added
-v, --verboseoption to log detailed file processing information. - Prints
Changed/Unchangedfiles along with their output path for all modes (dry-run,write,out).
- Added
-
Colored Console Output:
- Integrated
picocolorsfor cleaner CLI display. - Spinner and summary messages now use colors for better readability (
greenfor success,redfor errors,dimfor informational messages).
- Integrated
-
Safe
--outHandling:- CLI now fully supports
--outfor single files or directories. - File targets are type-safe and guaranteed to be strings (
targetvariable).
- CLI now fully supports
-
Dry-Run Default:
- CLI defaults to
--dry-runif no mode is specified. - Shows preview of transformed files without modifying them.
- CLI defaults to
-
Concurrency Support:
- File processing now uses concurrent workers (default 8) for faster performance on large projects.
-
Prettier-Plugin Friendly Imports:
- Added
prettier-plugin-organize-importssupport. - Improves import order and code formatting automatically.
- Added
⚡ CLI Updates
-
New Options:
--dry-run # Preview changes without writing (default) -w, --write # Overwrite files in place -o, --out <dir># Output directory or file for transformed files -v, --verbose # Show detailed file processing logs --ignore <patterns...> # Glob patterns to ignore
-
Behavior Improvements:
-
--writenow prompts confirmation before destructive file changes. -
Summary now includes:
Files scannedFiles changedUnchangedReplacementsModeTime (ms)
-
🛠 Under-the-Hood Improvements
-
ProcessFiles Refactor:
queuenow usesArray#toSorted()instead ofsort()for immutability and ESLintunicorn/no-array-sortcompliance.countReplacements()moved to outer scope to satisfyunicorn/consistent-function-scoping.targettype is fully safe (string) for all modes.
-
Error Handling Enhancements:
- Improved dry-run and out mode error messages.
- CLI now exits gracefully with informative messages for invalid combinations (
--write+--out, no matched files, etc.).
-
Spinner Integration:
- Processing uses
@clack/promptsspinner for visual feedback. - Spinner stops on success, failure, or cancellation.
- Processing uses
📝 Usage Examples
# Preview files in dry-run mode (default)
pw "src/**/*.jsx" --dry-run
# Overwrite files in place
pw src --write
# Output to a folder
pw src --out dist
# Preview with verbose logging
pw "src/**/*.jsx" --dry-run -v
# Overwrite with verbose logging
pw src --write --verbose
# Ignore files matching glob
pw "src/**/*.jsx" --ignore "**/*.test.jsx"