* chore(): Cleanup and organize deps
* chore(): Cleanup and organize deps
* chore(): Cleanup and organize deps
* chore(): Cleanup and organize deps
* chore(): Cleanup and organize deps
* chore(): Cleanup and organize deps
* Create lucky-poets-scream.md
* chore(): Cleanup and organize deps
* chore(): Cleanup and organize deps
* chore(): Cleanup and organize deps
* chore(): Cleanup and organize deps
* dedupe snapshot this build
* split into 4 shard
* re configure packages integration tests
* re configure packages integration tests
* re configure packages integration tests
* re configure packages integration tests
* update scripts
* update scripts
* update scripts
* update scripts
* update scripts
* update scripts
* update scripts
* update scripts
* reduce shard for packages
* chore(): Shard unit tests jobs
* pass with no tests
* try artifacts
* Revert "try artifacts"
This reverts commit 43663b46ea1fb2d3131182b733ab6e202ea83f1d.
* test(): test dynamic max workers
* test(): test dynamic max workers
* test(): test dynamic max workers
* test(): test dynamic max workers
* test(): test dynamic max workers
* test(): test dynamic max workers
* test(): test dynamic max workers
* test(): test dynamic max workers
* test(): test dynamic max workers
* test(): test dynamic max workers
* test(): test dynamic max workers
* test(): test dynamic max workers
* test(): test dynamic max workers
* test(): test dynamic max workers
* test(): test dynamic max workers
* test(): test dynamic max workers
* Clarify test description and improve CI
what:
- runs module and api integration tests in matrix strategy
- v28 of jest comes with sharding support, which we can utilize when we upgrade
- splits the tests by number of matrix jobs and run them in parallel
- This introduced some flakiness in some specs, but couldn't reproduce locally. Those have been skipped for now.
- uses swc/jest for added performance
- Locally, a chunk took 90 seconds with babel and 30 seconds with swc.
- This translated to 2 mins saved per shard in CI, but haven't tested this enough.
**What**
- Fix issues with update-variant workflow:
- other variants than the updated variant are no longer removed
- options are updated properly
Co-authored-by: Riqwan Thamir <5105988+riqwan@users.noreply.github.com>
* Feat: create product with product module
* feat: create product wip
* feat: create product wip
* feat: update product relation and generate image migration
* lint
* conitnue implementation
* continue implementation and add integration tests for produceService.create
* Add integration tests for product creation at the module level for the complete flow
* only use persist since write operations are always wrapped in a transaction which will be committed and flushed
* simplify the transaction wrapper to make future changes easier
* feat: move some utils to the utils package to simplify its usage
* tests: fix unit tests
* feat: create variants along side the product
* Add more integration tests an update migrations
* chore: Update actions workflow to include packages integration tests
* small types and utils cleanup
* chore: Add support for database debug option
* chore: Add missing types in package.json from types and util, validate that all the models are sync with medusa
* expose retrieve method
* fix types issues
* fix unit tests and move integration tests workflow with the plugins integration tests
* chore: remove migration function export from the definition to prevent them to be ran by the medusa cli just in case
* fix package.json script
* chore: workflows
* feat: start creating the create product workflow
* feat: add empty step for prices and sales channel
* tests: update scripts and action envs
* fix imports
* feat: Add proper soft deleted support + add product deletion service public api
* chore: update migrations
* chore: update migrations
* chore: update todo
* feat: Add product deletion to the create-product workflow as compensation
* chore: cleanup product utils
* feat: Add support for cascade soft-remove
* feat: refactor repository to take into account withDeleted
* fix integration tests
* Add support for force delete -> delete, cleanup repositories and improvements
* Add support for restoring a product and add integration tests
* cleaup + tests
* types
* fix integration tests
* remove unnecessary comments
* move specific mikro orm usage to the DAL
* Cleanup workflow functions
* Make deleted_at optional at the property level and add url index for the images
* address feedback + cleanup
* fix export
* merge migrations into one
* feat(product, types): added missing product variant methods (#4475)
* chore: added missing product variant methods
* chore: address PR feedback
* chore: catch undefined case for retrieve + specs for variant service
* chore: align TEntity + add changeset
* chore: revert changeset, TEntity to ProductVariant
* chore: write tests for pagination, unskip the test
* Create chilled-mice-deliver.md
* update integration fixtuers
* update pipeline node version
* rename github action
* fix pipeline
* feat(medusa, types): added missing category tests and service methods (#4499)
* chore: added missing category tests and service methods
* chore: added type changes to module service
* chore: address pr feedback
* update repositories manager usage and serialisation from the write public API
* move serializisation to the DAL
* rename template args
* chore: added collection methods for module and collection service (#4505)
* chore: added collection methods for module and collection service
* Create fresh-islands-teach.md
* chore: move retrieve entity to utils package
* chore: make products optional in DTO type
---------
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
* feat(product): Apply transaction decorators to the services (#4512)
---------
Co-authored-by: Riqwan Thamir <rmthamir@gmail.com>
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
**What:**
Introduces a new folder under which repository specs will be placed.
Why:
We don't currently have a good place to test ORM logic or custom queries against the database. The repository folder tests are a place for just exactly that.
How:
Creates an internal package similar to other integration tests - api and plugins.
CORE-965
### 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
**What**
Sometimes the some integration tests that are depending on external services are failing due to timeout.
One of the reason is that the health check is done every 10 sec with a timeout of 5sec, which can lead to long waiting time before continuing
FIXED CORE-326
* fix: caching deps + add true parallelization to integration tests api
* fix: github action
* chore: upgrade to yarn berry (#1762)
* init migration
* remove: yarn.lock from all pkgs
* fix: build script in pkgs
* adjust yarn config
* fix: yarn.lock and yarnrc.yml
* fix: github actions
* fix: wrong type
* fix (medusa-react): use dts-cli instead of tsdx
* fix: yarn.lock
* fix: yarn v
* fix: prepare script
* add: comment on why we need to downgrade yarn before medusa-dev
* chore: move to Turborepo (#1763)
* increase number of parallel nodes
* fix (medusa-fulfillment-webshipper): build script
* fix: use new version of medusa-dev
* fix: rename cache-bootstrap to cache-deps
* fix: make plugin tests run with integration test suites"
* add: plugins to test pipeline
* add: run integration tests on different jobs + fix failing test command
* fix: typo
* fix: pipeline