Skip to content

feat: make deco-migrate runnable via npx - #62

Merged
JonasJesus42 merged 2 commits into
mainfrom
JonasJesus42/fix-migrate-readme
Mar 31, 2026
Merged

JonasJesus42 merged 2 commits into
mainfrom
JonasJesus42/fix-migrate-readme

Conversation

@JonasJesus42

@JonasJesus42 JonasJesus42 commented Mar 31, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add bin entry (deco-migrate) and tsx dependency so the migration script can be run directly with npx -p @decocms/start deco-migrate — no prior install needed
  • Update README with the new command and a table documenting all CLI options (--source, --dry-run, --verbose, --help)
  • Update usage comments inside scripts/migrate.ts to match

Test plan

  • Publish a canary and verify npx -p @decocms/start deco-migrate --help works from an empty directory

🤖 Generated with Claude Code


Summary by cubic

Make the migration script runnable via npx -p @decocms/start so users can run deco-migrate from a Fresh site without prior install. Improves onboarding and documents all CLI options.

  • New Features

    • Added bin entry to expose deco-migrate (points to scripts/migrate.ts)
    • Updated README with the new command and an options table
    • Synced CLI usage/help text and examples in scripts/migrate.ts
  • Dependencies

    • Added tsx as a dependency to run the TS entrypoint via npx

Written for commit e86ce67. Summary will update on new commits.

Add bin entry and tsx dependency so users can run `npx -p @decocms/start deco-migrate`
directly from their Fresh site directory. Update README with CLI options table.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 3 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="scripts/migrate.ts">

<violation number="1" location="scripts/migrate.ts:74">
P3: `showHelp()` now advertises `deco-migrate`, but the examples still show the old `npx tsx node_modules/.../migrate.ts` command. Update examples to the new executable form so help output is consistent.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread scripts/migrate.ts Resolved
@JonasJesus42
JonasJesus42 merged commit a5ea30f into main Mar 31, 2026
1 check passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 0.42.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant