-
Notifications
You must be signed in to change notification settings - Fork 0
fixes #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
fixes #2
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…-v3) Refactored transform naming from 'automock-to-suites' to follow the industry-standard Codemod Registry pattern: <framework>/<version>/<transform> BREAKING CHANGE: Transform argument now required. Users must specify: npx @suites/codemod automock/2/to-suites-v3 <path> Changes: - Transform registry: Updated to automock/2/to-suites-v3 - Directory structure: Created hierarchical namespace src/transforms/automock/2/ - CLI: Removed default transform, require explicit specification - File processor: Renamed to generic naming (filterSourceFiles) - Runner: Updated variable naming (automockFiles → sourceFiles) - Tests: Updated imports, all 207 tests passing - Documentation: Updated README with new usage examples Benefits: - Follows React codemod and Codemod Registry patterns - Future-proof for v3-to-v4, v4-to-v5 migrations - Support for multiple transforms per version - Extensible to other frameworks (jest, vitest, etc.)
Changed success() and fileTransformed() methods to use heavy check mark (✔) to match ora spinner's succeed() symbol for visual consistency.
- Add coverage workflow for master branch pushes with Codecov integration - Update publishConfig to use public npm registry with provenance enabled - Remove [skip ci] from semantic-release commit message format
- Add publish.yml workflow for manual npm publishing with dist-tag selection - Add coverage.yml workflow for automatic coverage reporting on master pushes - Support latest, next, rc, dev, alpha, and beta dist-tags - Include provenance attestations for supply chain security - Add job summaries for publish success/failure feedback
Added comprehensive documentation for: - Codemod Registry pattern and architecture explanation - Hierarchical transform structure (framework/version/transform) - Updated 'Adding New Transforms' with new directory structure - Updated Project Structure to reflect automock/2/ organization - New 'Local Development' section with: - Running locally with node dist/cli.js - npm link for testing - Running tests This helps contributors understand the versioned approach and provides clear instructions for local testing and development.
Updated CLI flags to match Next.js @next/codemod patterns: - Changed --dry-run to --dry (with -d short flag) - Changed --print to have -p short flag - Configured -v for --version (was -V by default) - Kept --verbose without short flag (matching Next.js) - Updated all option descriptions to match Next.js style This provides a consistent experience for users familiar with other codemods in the ecosystem. References: - @next/codemod CLI conventions - Commander.js version/help customization
Changed argument names to match @next/codemod exactly: - 'transform' → 'codemod' (codemod slug to run) - 'path' → 'source' (path to source files or directory) Updated help text to reference GitHub repo: https://github.com/suites-dev/codemod This provides consistent terminology with Next.js and other popular codemods in the ecosystem.
Removed hardcoded symbols that were duplicating logger's built-in symbols: - git-safety.ts: Removed⚠️ and ❌ (logger.error/warn already add symbols) - runner.ts: Removed hardcoded ✗ and ✓ (logger.error/success already add symbols) Now all output uses consistent single symbols: - ✔ for success (from logger.success()) - ✗ for errors (from logger.error()) - ⚠ for warnings (from logger.warn()) - ℹ for info (from logger.info()) No duplicate symbols in any output.
Added Arguments section to README to match Next.js codemod documentation: - codemod: Codemod slug to run - source: Path to source files or directory (with glob patterns) Renamed 'CLI Options' to 'CLI Reference' with subsections for Arguments and Options, providing clearer documentation structure.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2 +/- ##
==========================================
+ Coverage 61.50% 61.57% +0.07%
==========================================
Files 23 23
Lines 969 963 -6
Branches 266 262 -4
==========================================
- Hits 596 593 -3
+ Misses 332 329 -3
Partials 41 41
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Changed flag and terminology for consistency: - CLI flag: --list-transforms → --list-codemods - Usage: <transform> <path> → <codemod> <source> - Section heading: 'Available Transforms' → 'Available Codemods' - Error messages updated to reference --list-codemods This aligns all terminology with the 'codemod' naming convention used throughout the CLI and matches Next.js codemod patterns.
…ptions) Removed options to match Next.js simplicity: - Removed --extensions (hardcoded to .ts, .tsx) - Removed --ignore (hardcoded ignorePatterns: node_modules, dist, .d.ts) - Removed --skip-validation (validation always runs for safety) - Removed --list-codemods (show list in error messages instead) Final CLI options (matching Next.js): - -v, --version - -d, --dry - -f, --force - -p, --print - --verbose - --parser (our equivalent to Next.js -j, --jscodeshift) - -h, --help Benefits: - Simpler, cleaner CLI matching industry standard - Validation always runs (catches critical errors) - Hardcoded sensible defaults for extensions and ignore patterns - List of codemods shown automatically on errors
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.