Sebastian Rindom
66413d094e
feat: move create inventory to @medusajs/workflows ( #5301 )
...
**Why**
- We have some workflow-like flows in @medusajs/medusa. These should be moved over to the workflows package.
- Inventory Items <> Variant currently assume a 1-1 mapping. There should be support for a many-to-many mapping.
**What**
- PR introduces a feature flag for supporting many-to-many mappings for inventory and variants.
- Deletes legacy transaction handler in @medusajs/medusa.
- Adjusts existing createInventoryItems handler to remove dependency on variant data.
**Unkowns**
~~1. Couldn't find an existing test for the CreateProduct workflow. It should be tested that this still works as expected.~~
2. Have removed transaction managers as we should move to handling consistency through orchestration tooling. Are we ready for that?
2023-10-11 18:01:56 +00:00
Adrien de Peretti
d2a8cf0378
feat(medusa): Continue create product workflow changes ( #4473 )
2023-07-24 13:30:24 +02:00
Adrien de Peretti
30d89044f1
fix(product): The bin scripts should include a shebang and import in the body ( #4296 )
2023-06-15 19:42:49 +02:00
Oliver Windall Juhl
afd1b67f1c
chore: Clean up deps, devDeps, and peerDeps across all packages ( #4276 )
...
* chore: Use caret for all Medusa deps
* Create wild-balloons-push.md
* Address PR feedback
* force build order
* add missing dep
* add missing dev deps
* addresses last comments
2023-06-14 15:18:11 +02:00
github-actions[bot]
8f8f6332b7
chore: Version Packages ( #4114 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-30 12:11:45 +02:00
github-actions[bot]
0be70113f9
chore: Version Packages ( #4074 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-16 11:03:47 +02:00
Oliver Windall Juhl
6511959e23
chore: Revert to official Typeorm package ( #4072 )
2023-05-11 13:08:38 +02:00
github-actions[bot]
a8f43055db
chore: Version Packages ( #4020 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-09 15:49:04 +02:00
github-actions[bot]
6b2bcc1a36
chore: Version Packages ( #3942 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-04 10:51:13 +02:00
Oliver Windall Juhl
d539c6feeb
chore: Bump Typeorm to Medusa fork ( #3981 )
...
* chore: Bump typeorm to medusa fork
* Update types + utils
* Bump integration test suites
* Create good-parents-prove.md
2023-05-02 14:37:19 +02:00
github-actions[bot]
b41b6303cc
chore: Release ( #3856 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-04-26 19:09:01 +02:00
github-actions[bot]
0f51e3a400
chore: Release ( #3818 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com >
2023-04-14 11:18:39 +02:00
github-actions[bot]
3efe13eefd
chore: Release ( #3782 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com >
2023-04-12 11:32:05 +02:00
Oliver Windall Juhl
654a546223
chore: Bump Typeorm ( #3778 )
2023-04-11 18:43:40 +02:00
olivermrbl
4c268238a4
Merge branch 'master' into develop
2023-04-05 09:18:48 +02:00
olivermrbl
66c59d54ff
chore(release): v1.8.0
2023-04-04 18:35:27 +02:00
olivermrbl
f0d37b4d2d
chore(release): v1.8.0-rc.8
2023-04-04 17:37:13 +02:00
olivermrbl
7a3194c313
chore(release): v1.8.0-rc.7
2023-04-04 16:07:48 +02:00
Patrick
089f1eb19e
feat(tests): harmonize and clean-up yarn test commands convention ( #3695 )
...
## What
Harmonize and clean-up yarn test commands convention.
## Why
Current strategy to filter integration tests from unit tests was cumbersome to maintain. Also, some packages declared `test:unit` which ended up being an alias to `test`.
## How
* Remove all occurrences of `test:unit`
* Rename all `test` commands under `/integration-tests/**/package.json` to `test:integration`
* In the root `package.json`, rewrite `test:integration` command to run `turbo run test:integration`
* In the root `package.json`, remove filtering on the `test` command
* Introduce a new `test:integration` task in the Turborepo config.
2023-04-04 13:47:54 +00:00
olivermrbl
bb9df09e37
chore(release): v1.8.0-rc.6
2023-04-03 18:05:12 +02:00
olivermrbl
6f85a3d366
chore(release): v1.8.0-rc.5
2023-03-31 13:27:14 +02:00
olivermrbl
89d4d84666
chore(release): v1.8.0-rc.4
2023-03-30 17:12:37 +02:00
olivermrbl
15a43c1cc0
chore(release): v1.8.0-rc.3
2023-03-29 13:42:11 +02:00
olivermrbl
8ddb3952c0
chore(release): v1.8.0-rc.2
2023-03-28 21:04:57 +02:00
olivermrbl
990c79d2d5
chore(release): v1.8.0-rc.1
2023-03-28 19:32:36 +02:00
olivermrbl
b57ea22461
chore: Enter pre-release mode and version packages
2023-03-24 10:16:11 +01:00
Oliver Windall Juhl
ef5ef9f5a2
feat(medusa,event-bus-local,event-bus-redis): Event Bus modules ( #2599 )
2023-03-22 10:26:21 +01:00
Frane Polić
f97b3d7cce
feat(medusa): Cache modules ( #3187 )
2023-03-10 15:09:26 +01:00
Kasper Fabricius Kristensen
40de54b010
feat(admin,admin-ui,medusa): Add Medusa Admin plugin ( #3334 )
2023-03-03 10:09:16 +01:00
Riqwan Thamir
121b42acfe
chore(medusa): Typeorm upgrade to 0.3.11 ( #3041 )
2023-02-15 16:25:30 +01:00
Patrick
86f9455d00
test: allow integration-tests to leverage workspaces optimizations ( #2727 )
...
### What
Leverage yarn workspaces and Turborepo for integration-tests in order to accelerate development and reduce DevX complexity.
### Why
The current solution for running integration tests requires using `medusa-dev-cli` in order to publish packages to a local npm repository. The package where the command is executed will have its package.json altered for any known medusa dependency in order to install from the local npm. The process is taxing on the host machine resources and prevents rapid iterations when working with integration tests.
For more information, see documentation: f0cc1b324c/docs/content/usage/local-development.md (run-api-integration-tests)
### How
By declaring `integeration-tests/**/*` as a workspace, Turborepo can now be leveraged to build and run integration test as if there were packages. The build process will take care of interdependency between package in order to ensure local dependency are met.
In addition, within each integration-tests "packages", we can declare local dependencies as "*" which will translate to using the one that is part of the current build, regardless of the dependency's version number. No more fiddling with version numbers.
Github actions pertaining to integration-tests have been streamlined to use the new behavior.
The integration-tests packages have been marked as `private:true` in order to avoid publishing them to the public npm registry.
### Testing
```
cd root-of-medusajs-medusa-repo/
yarn install
yarn build
yarn test:integration:api
yarn test:integration:plugins
```
After a code change, `yarn build` must be run before re-running an integration test, which is the same procedure as for unit tests.
Resolves: CORE-845
2022-12-08 14:57:16 +00:00
Sebastian Rindom
3d255302b0
fix(medusa): Optimize Cart totals calculation ( #2372 )
...
**What**
The existing totals calculations are extremely heavy and perform an enormous amount of duplicate work. The changes here remove large parts of the overhead and improves response times for cart endpoints up to 30x.
2022-10-07 08:44:06 +00:00
Carlos R. L. Rodrigues
690ca9e89a
chore(integration-tests): Normalize DB config + use single process ( #2077 )
2022-08-24 12:29:53 +02:00
Zakaria El Asri
1cfeb5dbd8
feat: line item adjustments ( #1319 )
...
* add: crud services + model + totals
* fix: enforce unique constraint on line item adjustment model and update service (#1241 )
* add: unique constraint on model + fix service
* fix: unique constraint
* fix: add cascade on delete + fix discount relation
* fix: remove optional unique prop
* add: tests for ensuring line item adjustment db constraints (#1279 )
* add: tests for ensuring db constraints
* fix: use given when then
* feat: adjust cart to include line item adjustments (#1242 )
* fix: cart service + cart tests
* fix: remaining tests
* fix: swap tests
* fix: add relationship + fix oas
* refactor: applyDiscount
* fix: refactor applyDiscount and fix + add unit tests
* fix: plugins tests
* feat: line item adjustments draft orders (#1243 )
* fix: draft order tests
* fix: constraint
* fix: wrong variable name
* fix: unique constraint
* progress: add tests
* fix: add cascade on delete + fix discount relation
* fix: remove optional unique prop
* fix: cart removeLineItem + tests
* fix: cart unit tests
* fix: update snapshot
* remove: verbose option
* rename arg
Co-authored-by: Sebastian Rindom <skrindom@gmail.com >
* add: create adjustments for swap additional_items
* add: create adjustments for return lines
* fix: unit test for creating adjustment for additional_items
* fix: create adjustments only for non return items + no deletion when item is a return item
* add: integration tests
* refactor: use refreshAdjustments method
* refactor test
Co-authored-by: Sebastian Rindom <skrindom@gmail.com >
Co-authored-by: Sebastian Rindom <skrindom@gmail.com >
Co-authored-by: Sebastian Rindom <skrindom@gmail.com >
2022-04-12 15:49:31 +02:00
Sebastian Rindom
c56660fca9
feat: new tax api ( #979 )
...
* feat: add tax calculation strategy (#885 )
* feat: add tax calculation strategy
* fix: adds strategy loader
* fix: eslint ignore
* chore: cleanup
* fix: allow plugin overwrites
* fix: allow plugin overwrites
* fix: fake region
* Update packages/medusa/src/loaders/strategies.ts
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com >
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com >
* feat: adds tax related db entities + tax provider (#896 )
* feat: adds tax related db entities + tax provider
* fix: add tax provider tests
* fix: add tax service unit tests
* fix: tests + migrations
* fix: add inherited tax lines
* chore: rm tax-line repo
* fix: test
* fix: pr comments
* fix: unit test
* feat: totals service to ts (#911 )
* feat: adds tax related db entities + tax provider
* fix: add tax provider tests
* fix: add tax service unit tests
* fix: tests + migrations
* feat: totals service to ts
* fix: remove totals.js
* fix: add shipping methods
* fix: add inherited tax lines
* chore: rm tax-line repo
* fix: test
* fix: tests
* fix: tests
* fix: unit test
* fix: adds TotalsServiceProps
* feat: adds integration tests for automatic tax calculation + shipping tax rates (#945 )
* feat: adds tax related db entities + tax provider
* fix: add tax provider tests
* fix: add tax service unit tests
* fix: tests + migrations
* feat: totals service to ts
* fix: remove totals.js
* fix: add shipping methods
* fix: add inherited tax lines
* chore: rm tax-line repo
* fix: test
* fix: tests
* fix: tests
* fix: unit test
* fix: integration test helpers
* fix: adds factories + tests automatic tax rates
* fix: remove verbose
* fix: adds TotalsServiceProps
* fix: add shipping tax lines
* fix: add migration for shipping taxes
* fix: integration tests for shipping taxes
* fix: integration tests for shipping taxes
* fix: jsdoc types
* Feat/manual taxes (#950 )
* feat: adds tax related db entities + tax provider
* fix: add tax provider tests
* fix: add tax service unit tests
* fix: tests + migrations
* feat: totals service to ts
* fix: remove totals.js
* fix: add shipping methods
* fix: add inherited tax lines
* chore: rm tax-line repo
* fix: test
* fix: tests
* fix: tests
* fix: unit test
* fix: integration test helpers
* fix: adds factories + tests automatic tax rates
* fix: remove verbose
* fix: adds TotalsServiceProps
* fix: add shipping tax lines
* fix: add migration for shipping taxes
* fix: integration tests for shipping taxes
* fix: integration tests for shipping taxes
* fix: add integration tests for manual taxes
* fix: cart service - cleanup jsdoc
* feat: add /carts/id/taxes to manually calculate taxes
* feat: add integration tests for order tax calculations
* fix: unit tests
* fix: merge
* fix: rm verbose
* fix: unit tests
* fix: object -> cartOrOrder
* fix: rounding
* Feat/complete order w tax lines (#951 )
* feat: adds tax related db entities + tax provider
* fix: add tax provider tests
* fix: add tax service unit tests
* fix: tests + migrations
* feat: totals service to ts
* fix: remove totals.js
* fix: add shipping methods
* fix: add inherited tax lines
* chore: rm tax-line repo
* fix: test
* fix: tests
* fix: tests
* fix: unit test
* fix: integration test helpers
* fix: adds factories + tests automatic tax rates
* fix: remove verbose
* fix: adds TotalsServiceProps
* fix: add shipping tax lines
* fix: add migration for shipping taxes
* fix: integration tests for shipping taxes
* fix: integration tests for shipping taxes
* fix: add integration tests for manual taxes
* fix: cart service - cleanup jsdoc
* feat: add /carts/id/taxes to manually calculate taxes
* feat: add integration tests for order tax calculations
* feat: adds cart completion strategy + create order w. tax lines
* fix: unit tests
* fix: merge
* fix: rm verbose
* fix: unit tests
* fix: unit tests
* fix: unit tests
* fix: ensure calculation for list orders
* fix: unit tests
* fix: integration tests
* fix: adds cart order type gaurds
* Docs/tax api (#954 )
* feat: adds tax related db entities + tax provider
* fix: add tax provider tests
* fix: add tax service unit tests
* fix: tests + migrations
* feat: totals service to ts
* fix: remove totals.js
* fix: add shipping methods
* fix: add inherited tax lines
* chore: rm tax-line repo
* fix: test
* fix: tests
* fix: tests
* fix: unit test
* fix: integration test helpers
* fix: adds factories + tests automatic tax rates
* fix: remove verbose
* fix: adds TotalsServiceProps
* fix: add shipping tax lines
* fix: add migration for shipping taxes
* fix: integration tests for shipping taxes
* fix: integration tests for shipping taxes
* fix: add integration tests for manual taxes
* fix: cart service - cleanup jsdoc
* feat: add /carts/id/taxes to manually calculate taxes
* feat: add integration tests for order tax calculations
* feat: adds cart completion strategy + create order w. tax lines
* fix: unit tests
* fix: merge
* fix: rm verbose
* fix: unit tests
* fix: unit tests
* fix: unit tests
* fix: ensure calculation for list orders
* fix: unit tests
* fix: integration tests
* docs: documents tax related methods and types
* fix: require either item_id or shipping_method_id
* feat: product type tax rate (#969 )
* feat: adds tax related db entities + tax provider
* fix: add tax provider tests
* fix: add tax service unit tests
* fix: tests + migrations
* feat: totals service to ts
* fix: remove totals.js
* fix: add shipping methods
* fix: add inherited tax lines
* chore: rm tax-line repo
* fix: test
* fix: tests
* fix: tests
* fix: unit test
* fix: integration test helpers
* fix: adds factories + tests automatic tax rates
* fix: remove verbose
* fix: adds TotalsServiceProps
* fix: add shipping tax lines
* fix: add migration for shipping taxes
* fix: integration tests for shipping taxes
* fix: integration tests for shipping taxes
* fix: add integration tests for manual taxes
* fix: cart service - cleanup jsdoc
* feat: add /carts/id/taxes to manually calculate taxes
* feat: add integration tests for order tax calculations
* feat: adds cart completion strategy + create order w. tax lines
* fix: unit tests
* fix: merge
* fix: rm verbose
* fix: unit tests
* fix: unit tests
* fix: unit tests
* fix: ensure calculation for list orders
* fix: unit tests
* fix: integration tests
* docs: documents tax related methods and types
* fix: require either item_id or shipping_method_id
* feat: adds returns tests for new tax system
* feat: adds return lines + integration tests for swaps
* feat: return integration tests
* feat: adds product type tax rates
* feat: add tax management endpoints
* fix: create single migration
* fix: adds tax rates to js client
* fix: strats
* Fix/plugin tests (#998 )
* plugin testing setup
* fix: test sendgrid plugin
* fix: test sendgrid plugin
* chore: clean
* chore: clean
* fix: clean up tests
* fix: remove dirty import
* fix: sendgrid + brightpearl
* fix: plugin integration tests
* fix: klarna
* fix: shipping method tax
* fix: remove taxrates
* fix: unit tests
* fix: integration
* fix: integration
* fix: plugins tests
* fix: ignore plugins
* fix: tests
* fix: taxes (#1017 )
* fix: taxes
* fix: taxes
* fix: faulty ref
* fix: create tax-lines with claim items
* fix: snapshot tax-liens
* fix: allows integration test teardown to force deleting tables
* fix: tests
* fix: merge
* fix: adds tax-rates to client
* fix: adds tax-rates to medusa-react
* fix: tests
* fix: tests
* fix: add product types
* fix: adds tax provider endpoint + cascaded deletes on tax rate relations
* fix: move errors to service layer
* fix: cleanup api
* fix: unit tests
* fix: error handler in base-service
* fix: Add order region to swap on createFulfillment (#1110 )
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com >
2022-02-24 20:14:09 +01:00