Skip to content

Conversation

@NicolasGorga
Copy link
Contributor

Summary

What — What changes are introduced in this PR?

Fix pluralization for compound words ending in an uncountable word and make the runtime pluralization exactly match the typing pluralization in terms of uncountable words. Make both forms of pluralization share a single source of truth in terms of what we consider uncountable words.

Why — Why are these changes relevant or necessary?

We had a few issues:

  • For runtime pluralization, we were setting uncountable rules for far fewer words than we were for typing pluralization. Specifically, only for info word
  • No shared source of truth between the two forms of pluralization as per above
  • We weren't considering for either compound words ending in an uncountable word

How — How have these changes been implemented?

  • Created a single source of truth for uncountable words that is to be shared between both forms of pluralization.
  • Update both forms of pluralization to handle comound words ending in an uncountable word.

Testing — How have these changes been tested, or how can the reviewer test the feature?

Please provide answer here


Examples

Provide examples or code snippets that demonstrate how this feature works, or how it can be used in practice.
This helps with documentation and ensures maintainers can quickly understand and verify the change.

// Example usage

Checklist

Please ensure the following before requesting a review:

  • I have added a changeset for this PR
    • Every non-breaking change should be marked as a patch
    • To add a changeset, run yarn changeset and follow the prompts
  • The changes are covered by relevant tests
  • I have verified the code works as intended locally
  • I have linked the related issue(s) if applicable

Additional Context

Add any additional context, related issues, or references that might help the reviewer understand this PR.

fixes #14328

@NicolasGorga NicolasGorga requested a review from a team as a code owner January 7, 2026 23:03
@changeset-bot
Copy link

changeset-bot bot commented Jan 7, 2026

🦋 Changeset detected

Latest commit: 2178e6b

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

This PR includes changesets to release 76 packages
Name Type
@medusajs/types Major
@medusajs/utils Major
@medusajs/draft-order Major
@medusajs/framework Major
@medusajs/js-sdk Major
@medusajs/modules-sdk Major
@medusajs/orchestration Major
@medusajs/workflows-sdk Major
@medusajs/medusa-oas-cli Major
@medusajs/admin-bundler Major
@medusajs/dashboard Major
integration-tests-http Patch
@medusajs/cli Major
@medusajs/medusa Major
@medusajs/test-utils Major
@medusajs/analytics Major
@medusajs/api-key Major
@medusajs/auth Major
@medusajs/cache-inmemory Major
@medusajs/cache-redis Major
@medusajs/caching Major
@medusajs/cart Major
@medusajs/currency Major
@medusajs/customer Major
@medusajs/event-bus-local Major
@medusajs/event-bus-redis Major
@medusajs/file Major
@medusajs/fulfillment Major
@medusajs/index Major
@medusajs/inventory Major
@medusajs/link-modules Major
@medusajs/locking Major
@medusajs/notification Major
@medusajs/order Major
@medusajs/payment Major
@medusajs/pricing Major
@medusajs/product Major
@medusajs/promotion Major
@medusajs/rbac Major
@medusajs/region Major
@medusajs/sales-channel Major
@medusajs/settings Major
@medusajs/stock-location Major
@medusajs/store Major
@medusajs/tax Major
@medusajs/translation Major
@medusajs/user Major
@medusajs/workflow-engine-inmemory Major
@medusajs/workflow-engine-redis Major
@medusajs/analytics-local Major
@medusajs/analytics-posthog Major
@medusajs/auth-emailpass Major
@medusajs/auth-github Major
@medusajs/auth-google Major
@medusajs/caching-redis Major
@medusajs/file-local Major
@medusajs/file-s3 Major
@medusajs/fulfillment-manual Major
@medusajs/locking-postgres Major
@medusajs/locking-redis Major
@medusajs/notification-local Major
@medusajs/notification-sendgrid Major
@medusajs/payment-stripe Major
@medusajs/core-flows Major
@medusajs/oas-github-ci Major
@medusajs/deps Major
@medusajs/telemetry Major
@medusajs/admin-sdk Major
@medusajs/admin-shared Major
@medusajs/admin-vite-plugin Major
@medusajs/icons Major
@medusajs/toolbox Major
@medusajs/ui-preset Major
create-medusa-app Major
medusa-dev-cli Major
@medusajs/ui 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

@vercel
Copy link

vercel bot commented Jan 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

8 Skipped Deployments
Project Deployment Review Updated (UTC)
api-reference Ignored Ignored Jan 23, 2026 6:21pm
api-reference-v2 Ignored Ignored Preview Jan 23, 2026 6:21pm
cloud-docs Ignored Ignored Preview Jan 23, 2026 6:21pm
docs-ui Ignored Ignored Preview Jan 23, 2026 6:21pm
docs-v2 Ignored Ignored Preview Jan 23, 2026 6:21pm
medusa-docs Ignored Ignored Preview Jan 23, 2026 6:21pm
resources-docs Ignored Ignored Preview Jan 23, 2026 6:21pm
user-guide Ignored Ignored Preview Jan 23, 2026 6:21pm

Request Review

@adrien2p
Copy link
Member

ping, should we proceed?

@carlos-r-l-rodrigues
Copy link
Contributor

there is a typo in the filename packages/core/utils/src/common/plurailze.ts

should we aim to have all these types autogenerated, like we have for the module's methods? that way we have aligned the method name and the types

@adrien2p
Copy link
Member

there is a typo in the filename packages/core/utils/src/common/plurailze.ts

should we aim to have all these types autogenerated, like we have for the module's methods? that way we have aligned the method name and the types

do you mean the module services? we could but then you wont have them during the implementation, only after building and in the core we would not have them at all right?

@carlos-r-l-rodrigues
Copy link
Contributor

do you mean the module services? we could but then you wont have them during the implementation, only after building and in the core we would not have them at all right?

We keep this one as is, mostly for the core. But for a Medusa project it will override these with the auto generated. Which is fine as it only requires a medusa dev to have them

@adrien2p
Copy link
Member

do you mean the module services? we could but then you wont have them during the implementation, only after building and in the core we would not have them at all right?

We keep this one as is, mostly for the core. But for a Medusa project it will override these with the auto generated. Which is fine as it only requires a medusa dev to have them

yes we could imagine both and run build now :)

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.

[Bug]: Incorrect pluralization for custom service methods extended from MedusaService (type/actual function)

5 participants