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

fix(link-modules): Fix link module initialization #4990

Merged
merged 10 commits into from
Sep 11, 2023

Conversation

adrien2p
Copy link
Member

@adrien2p adrien2p commented Sep 8, 2023

What
Add a new configuration on the relationship to specify if the relation is consumed from an internal service (from medusa core). In that case do not check if the service is part of the loaded modules

@changeset-bot
Copy link

changeset-bot bot commented Sep 8, 2023

🦋 Changeset detected

Latest commit: c2f186d

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

This PR includes changesets to release 4 packages
Name Type
@medusajs/link-modules Patch
@medusajs/types Patch
@medusajs/medusa-oas-cli Patch
@medusajs/oas-github-ci 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 Sep 8, 2023

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

Name Status Preview Comments Updated (UTC)
api-reference ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 11, 2023 8:45am
medusa-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 11, 2023 8:45am

@adrien2p adrien2p marked this pull request as ready for review September 8, 2023 12:47
@adrien2p adrien2p requested a review from a team as a code owner September 8, 2023 12:47
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.

I guess this will eventually be deprecated and removed, so should we add a TODO?

@vercel vercel bot temporarily deployed to Preview – api-reference September 8, 2023 15:27 Inactive
@vercel vercel bot temporarily deployed to Preview – medusa-docs September 8, 2023 15:30 Inactive
@adrien2p
Copy link
Member Author

adrien2p commented Sep 8, 2023

I guess this will eventually be deprecated and removed, so should we add a TODO?

Yes definately

@vercel vercel bot temporarily deployed to Preview – api-reference September 10, 2023 12:57 Inactive
@vercel vercel bot temporarily deployed to Preview – medusa-docs September 10, 2023 13:03 Inactive
…com:medusajs/medusa into fix/remote-joiner-internal-services-loading
@vercel vercel bot temporarily deployed to Preview – api-reference September 10, 2023 18:34 Inactive
@vercel vercel bot temporarily deployed to Preview – medusa-docs September 10, 2023 18:38 Inactive
@vercel vercel bot temporarily deployed to Preview – api-reference September 11, 2023 08:05 Inactive
@vercel vercel bot temporarily deployed to Preview – medusa-docs September 11, 2023 08:06 Inactive
@vercel vercel bot temporarily deployed to Preview – api-reference September 11, 2023 08:23 Inactive
@vercel vercel bot temporarily deployed to Preview – medusa-docs September 11, 2023 08:29 Inactive
@vercel vercel bot temporarily deployed to Preview – api-reference September 11, 2023 08:44 Inactive
@vercel vercel bot temporarily deployed to Preview – medusa-docs September 11, 2023 08:45 Inactive
@kodiakhq kodiakhq bot merged commit a87d076 into develop Sep 11, 2023
@kodiakhq kodiakhq bot deleted the fix/remote-joiner-internal-services-loading branch September 11, 2023 08:49
@github-actions github-actions bot mentioned this pull request Sep 11, 2023
pKorsholm pushed a commit that referenced this pull request Sep 13, 2023
**What**
Add a new configuration on the relationship to specify if the relation is consumed from an internal service (from medusa core). In that case do not check if the service is part of the loaded modules
pKorsholm pushed a commit that referenced this pull request Sep 14, 2023
**What**
Add a new configuration on the relationship to specify if the relation is consumed from an internal service (from medusa core). In that case do not check if the service is part of the loaded modules
pKorsholm pushed a commit that referenced this pull request Sep 15, 2023
**What**
Add a new configuration on the relationship to specify if the relation is consumed from an internal service (from medusa core). In that case do not check if the service is part of the loaded modules
@github-actions github-actions bot mentioned this pull request Sep 15, 2023
riqwan added a commit that referenced this pull request Sep 29, 2023
…on rule priority if not (#5214)

* initial

* initial service

* update pricing module service

* add integration test for rule-type

* update pricing-module integration tests

* update pricing service interface

* feat(pricing): PriceSets as entry point to pricing module

* chore: add price set money amount

* chore: add price set money amount

* chore: change name of test

* chore: added changeset

* chore: use filterable props from money amount in price sets

* chore: update migrations

* test update integration test

* fix weird behavior

* Update packages/pricing/integration-tests/__fixtures__/rule-type/index.ts

Co-authored-by: Riqwan Thamir <[email protected]>

* Apply suggestions from code review

Co-authored-by: Riqwan Thamir <[email protected]>

* move rule-type to common

* chore: reset migration

* chore: remove incorrect conflicts

* chore: address review

* chore: remove ghost price list

* Apply suggestions from code review

Co-authored-by: Oli Juhl <[email protected]>

* update id prefix

* use persist not persistAndflush

* rename key_value to rule_attribute

* more renaming

* feat(types,pricing): add price set money amount rules to pricing module

* chore: cleanup + add test cases for relationship update

* chore: revert package json

* chore: cleanup

* initial

* update pricing module service

* update pricing-module integration tests

* update pricing service interface

* chore: update migrations

* fix weird behavior

* Apply suggestions from code review

Co-authored-by: Riqwan Thamir <[email protected]>

* move rule-type to common

* chore: delete duplicate migration files

* fix(link-modules): Fix link module initialization (#4990)

**What**
Add a new configuration on the relationship to specify if the relation is consumed from an internal service (from medusa core). In that case do not check if the service is part of the loaded modules

* initial price rule

* rebase develop

* save here

* final changes to create

* update price rule integration test

* add module integraiton tests for price rules

* fix merge

* redo wierd order change

* pr cleanup

* pr cleanup

* pr cleanup

* update pr

* sort out migrations

* [wip]

* wip

* chore: temporarily emulate mikroorm internals

* currency code hard filtering

* before creating subqueries

* chore: wip

* chore: wip

* chore: add exact match multiple contexts

* chore: add one more test

* chore: add query that works with exact match

* chore: qb the thingy

* chore: add some comments

* chore: removed extra filter

* chore: added some more comments + prettify

* chore: test with carlos

* chore: add fallbacks and exact match tests

* chore: cleanup

* feat(types,pricing): add price set money amount rules to pricing module (#5065)

* initial

* initial service

* update pricing module service

* add integration test for rule-type

* update pricing-module integration tests

* update pricing service interface

* feat(pricing): PriceSets as entry point to pricing module

* chore: add price set money amount

* chore: add price set money amount

* chore: change name of test

* chore: added changeset

* chore: use filterable props from money amount in price sets

* chore: update migrations

* test update integration test

* fix weird behavior

* Update packages/pricing/integration-tests/__fixtures__/rule-type/index.ts

Co-authored-by: Riqwan Thamir <[email protected]>

* Apply suggestions from code review

Co-authored-by: Riqwan Thamir <[email protected]>

* move rule-type to common

* chore: reset migration

* chore: remove incorrect conflicts

* chore: address review

* chore: remove ghost price list

* Apply suggestions from code review

Co-authored-by: Oli Juhl <[email protected]>

* update id prefix

* use persist not persistAndflush

* rename key_value to rule_attribute

* more renaming

* feat(types,pricing): add price set money amount rules to pricing module

* chore: cleanup + add test cases for relationship update

* chore: revert package json

* chore: cleanup

---------

Co-authored-by: Philip Korsholm <[email protected]>
Co-authored-by: Philip Korsholm <[email protected]>
Co-authored-by: Oli Juhl <[email protected]>

* chore: minor cleanup

* chore: added money amount scoping

* chore: added review comments

* chore: update changset and undo test scoping

* chore: introduce group by util + no queries on empty context

* Feat/pricing module methods (#5218)

chore: add removePrices to pricing module

* Revert "Feat/pricing module methods (#5218)" (#5236)

This reverts commit 95c8aaa.

* chore: review changes

* chore: update schema

* chore: reset migration

---------

Co-authored-by: Philip Korsholm <[email protected]>
Co-authored-by: Philip Korsholm <[email protected]>
Co-authored-by: Oli Juhl <[email protected]>
Co-authored-by: Adrien de Peretti <[email protected]>
riqwan added a commit that referenced this pull request Oct 2, 2023
* initial

* initial service

* update pricing module service

* add integration test for rule-type

* update pricing-module integration tests

* update pricing service interface

* feat(pricing): PriceSets as entry point to pricing module

* chore: add price set money amount

* chore: add price set money amount

* chore: change name of test

* chore: added changeset

* chore: use filterable props from money amount in price sets

* chore: update migrations

* test update integration test

* fix weird behavior

* Update packages/pricing/integration-tests/__fixtures__/rule-type/index.ts

Co-authored-by: Riqwan Thamir <[email protected]>

* Apply suggestions from code review

Co-authored-by: Riqwan Thamir <[email protected]>

* move rule-type to common

* chore: reset migration

* chore: remove incorrect conflicts

* chore: address review

* chore: remove ghost price list

* Apply suggestions from code review

Co-authored-by: Oli Juhl <[email protected]>

* update id prefix

* use persist not persistAndflush

* rename key_value to rule_attribute

* more renaming

* feat(types,pricing): add price set money amount rules to pricing module

* chore: cleanup + add test cases for relationship update

* chore: revert package json

* chore: cleanup

* initial

* update pricing module service

* update pricing-module integration tests

* update pricing service interface

* chore: update migrations

* fix weird behavior

* Apply suggestions from code review

Co-authored-by: Riqwan Thamir <[email protected]>

* move rule-type to common

* chore: delete duplicate migration files

* fix(link-modules): Fix link module initialization (#4990)

**What**
Add a new configuration on the relationship to specify if the relation is consumed from an internal service (from medusa core). In that case do not check if the service is part of the loaded modules

* initial price rule

* rebase develop

* save here

* final changes to create

* update price rule integration test

* add module integraiton tests for price rules

* fix merge

* redo wierd order change

* pr cleanup

* pr cleanup

* pr cleanup

* update pr

* sort out migrations

* [wip]

* wip

* chore: temporarily emulate mikroorm internals

* currency code hard filtering

* before creating subqueries

* chore: wip

* chore: wip

* chore: add exact match multiple contexts

* chore: add one more test

* chore: add query that works with exact match

* chore: qb the thingy

* chore: add some comments

* chore: removed extra filter

* chore: added some more comments + prettify

* chore: test with carlos

* chore: add fallbacks and exact match tests

* chore: cleanup

* feat(types,pricing): add price set money amount rules to pricing module (#5065)

* initial

* initial service

* update pricing module service

* add integration test for rule-type

* update pricing-module integration tests

* update pricing service interface

* feat(pricing): PriceSets as entry point to pricing module

* chore: add price set money amount

* chore: add price set money amount

* chore: change name of test

* chore: added changeset

* chore: use filterable props from money amount in price sets

* chore: update migrations

* test update integration test

* fix weird behavior

* Update packages/pricing/integration-tests/__fixtures__/rule-type/index.ts

Co-authored-by: Riqwan Thamir <[email protected]>

* Apply suggestions from code review

Co-authored-by: Riqwan Thamir <[email protected]>

* move rule-type to common

* chore: reset migration

* chore: remove incorrect conflicts

* chore: address review

* chore: remove ghost price list

* Apply suggestions from code review

Co-authored-by: Oli Juhl <[email protected]>

* update id prefix

* use persist not persistAndflush

* rename key_value to rule_attribute

* more renaming

* feat(types,pricing): add price set money amount rules to pricing module

* chore: cleanup + add test cases for relationship update

* chore: revert package json

* chore: cleanup

---------

Co-authored-by: Philip Korsholm <[email protected]>
Co-authored-by: Philip Korsholm <[email protected]>
Co-authored-by: Oli Juhl <[email protected]>

* chore: minor cleanup

* chore: added money amount scoping

* chore: added review comments

* chore: update changset and undo test scoping

* add migration for price_set_rule_type table

* update types

* initial add

* update tests

* working create with rule-types

* initial testing for money amount creation

* add price set money amount repo and service

* fix broken build

* create price list with prices and rule types

* create price set with info not being rules and money amounts

* create price set initial working implementation

* chore: introduce group by util + no queries on empty context

* addPrices

* remove comments

* Feat/pricing module methods (#5218)

chore: add removePrices to pricing module

* fix broken integration test

* Revert "Feat/pricing module methods (#5218)" (#5236)

This reverts commit 95c8aaa.

* feat(types,pricing): remove prices from a price set (#5235)

feat(types,pricing): remove prices from a price set

* add addRules

* typing

* add validation of price set ids for addRules

* add rule_attribute check for addRules method

* chore: review changes

* chore: update schema

* chore: first part of reviews

* chore: reset migration

* remove unnecessary init

* update interface

* use persist not persistAndflush

* chore: added money amount scoping

* chore: update schema

* fix

* fix 2

* add default pricing

* addPrices

* create

* update pricing service interface

* chore: rename money amounts to prices

* chore: cleanup + changelog

* chore: update package.json

* chore: cleanup persistAndFlushes from services

* jsdoc

* chore: add js docs for price rules

* chore: added js doc for psma and rule types

* chore: added jsdoc for currencies

* more jsdocs

* jsdoc money amounts

* chore: move jsdoc to interface

* chore: remove persist and flush to persist

* change overload

---------

Co-authored-by: Philip Korsholm <[email protected]>
Co-authored-by: Philip Korsholm <[email protected]>
Co-authored-by: Oli Juhl <[email protected]>
Co-authored-by: Adrien de Peretti <[email protected]>
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.

3 participants