Skip to content
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

chore(utils, product): Attempt to simplify module scripts export #6021

Merged
merged 10 commits into from
Jan 9, 2024

Conversation

adrien2p
Copy link
Member

@adrien2p adrien2p commented Jan 8, 2024

What
In an attempt to simplify new module scaffolding, some utils have been created to generate the different scripts a module needs

  • run migration script can now be exported directly from the util in the index
  • revert migration script can now be exported directly from the util in the index
  • seed can be directly exported from the scripts/bin directory

Copy link

vercel bot commented Jan 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
medusa-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 9, 2024 7:21pm
3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
api-reference ⬜️ Ignored (Inspect) Visit Preview Jan 9, 2024 7:21pm
docs-ui ⬜️ Ignored (Inspect) Visit Preview Jan 9, 2024 7:21pm
medusa-docs ⬜️ Ignored (Inspect) Visit Preview Jan 9, 2024 7:21pm

Copy link

changeset-bot bot commented Jan 8, 2024

🦋 Changeset detected

Latest commit: 1124583

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@medusajs/product Patch
@medusajs/utils Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@adrien2p
Copy link
Member Author

adrien2p commented Jan 8, 2024

@olivermrbl here is my attempt to centralize the modules scripts part. Let me know what is your thinking around it

Copy link
Contributor

@olivermrbl olivermrbl left a comment

Choose a reason for hiding this comment

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

Think this is a great addition!

packages/product/src/scripts/bin/run-seed.ts Outdated Show resolved Hide resolved
packages/product/package.json Show resolved Hide resolved
@olivermrbl
Copy link
Contributor

@pKorsholm @fPolic @riqwan, what do you think?

@adrien2p
Copy link
Member Author

adrien2p commented Jan 9, 2024

If we agree on that, I can migrate the other modules too as part of that pr, wdyt guys?

Copy link
Contributor

@riqwan riqwan left a comment

Choose a reason for hiding this comment

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

nnoice! 🔥

packages/utils/src/modules-sdk/migration-scripts/seed.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@pKorsholm pKorsholm left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@fPolic fPolic left a comment

Choose a reason for hiding this comment

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

LGTM 💪

@adrien2p
Copy link
Member Author

adrien2p commented Jan 9, 2024

@olivermrbl should we proceed with this one? In that case I ll add the automerge label

@olivermrbl olivermrbl merged commit a9b4214 into develop Jan 9, 2024
8 of 11 checks passed
@olivermrbl olivermrbl deleted the chore/extract-modules-script branch January 9, 2024 19:20
@github-actions github-actions bot mentioned this pull request Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants