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

breaking: remove deprecated commands and code #9521

Merged
merged 17 commits into from
Oct 14, 2024

Conversation

thetutlage
Copy link
Contributor

@thetutlage thetutlage commented Oct 10, 2024

Fixes: FRMW-2736

This PR removes deprecated commands and code from the Medusa monorepo. Here's a quick summary of it. Please, feel free to review this PR thoroughly to ensure I am not breaking something by mistake :)

Commands removal

  • seed: There was no implementation for the seed command in the first place.
  • migrations [action]: Removed in favor of db:migrate, db:rollback and db:generate.
  • links [action]: Removed in favor of db:sync-links.
  • start-cluster: Removed start-cluster command in favor of the --cluster flag on the start command.

Config options removal

  • Remove config option databaseType as it is not used anywhere.
  • Remove config option httpCompression in favor of compression property.
  • Remove allowedFields in favor of allowed property from the MedusaRequest.
  • Remove expand property in favor of allowed property from the RequestQueryFields.
  • Remove defaultFields and defaultRelations in favor of defaults property from the RequestQueryFields.
  • Remove allowedFields and allowedRelations in favor of allowed property from the RequestQueryFields.

Events build changes

  • Remove eventsEnum in favor of eventName property accepted by the moduleEventBuilderFactory. Also updated all the usages to use eventName.

ModelDTO changes

  • Remove unused properties singular and plural from ModelDTOConfig.

Models template changes

  • Remove unused properties create, update, singular, and plural from ModelsConfigTemplate.

Zod validator changes

  • Remove unused OptionalBooleanValidator in favor of booleanString.

Copy link

changeset-bot bot commented Oct 10, 2024

⚠️ No Changeset found

Latest commit: 451e0e8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

Copy link

vercel bot commented Oct 10, 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 Oct 14, 2024 1:32pm
6 Skipped Deployments
Name Status Preview Comments Updated (UTC)
api-reference ⬜️ Ignored (Inspect) Oct 14, 2024 1:32pm
api-reference-v2 ⬜️ Ignored (Inspect) Visit Preview Oct 14, 2024 1:32pm
docs-ui ⬜️ Ignored (Inspect) Visit Preview Oct 14, 2024 1:32pm
docs-v2 ⬜️ Ignored (Inspect) Visit Preview Oct 14, 2024 1:32pm
medusa-docs ⬜️ Ignored (Inspect) Visit Preview Oct 14, 2024 1:32pm
resources-docs ⬜️ Ignored (Inspect) Visit Preview Oct 14, 2024 1:32pm

@adrien2p
Copy link
Member

Should we include the following

  • packages/core/utils/src/modules-sdk/definition.ts

@thetutlage
Copy link
Contributor Author

Should we include the following

  • packages/core/utils/src/modules-sdk/definition.ts

@adrien2p Include where?

@adrien2p
Copy link
Member

Should we include the following

  • packages/core/utils/src/modules-sdk/definition.ts

@adrien2p Include where?

oh no worries I think you did it already to remove the deprecated inventory and stock

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.

Very, very nice

@@ -397,6 +336,12 @@ function buildLocalCommands(cli, isLocalProject) {
describe: process.env.PORT
? `Set port. Defaults to ${process.env.PORT} (set by env.PORT) (otherwise defaults ${defaultPort})`
: `Set port. Defaults to ${defaultPort}`,
})
.option(`cluster`, {
Copy link
Contributor

Choose a reason for hiding this comment

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

nice!

Copy link
Contributor

@carlos-r-l-rodrigues carlos-r-l-rodrigues left a comment

Choose a reason for hiding this comment

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

LGTM.

not related to this PR, but the singular plural properties at some point will have to be added somewhere, as we auto generate methods based on them, non english names won't work, and non standard english plurals won't work properly.

@thetutlage thetutlage merged commit ad322f2 into develop Oct 14, 2024
23 checks passed
@thetutlage thetutlage deleted the feat/deprecated-code-removal branch October 14, 2024 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants