Commit Graph

2705 Commits

Author SHA1 Message Date
chemicalkosek ea4c6b8b18 [docs] Update gatsby occurance to vite (#2860) 2022-12-20 12:42:47 +00:00
Shahed Nasser 9ec6847941 chore: updated roadmap section in README (#2859)
Updated the Roadmap section in the README to link to the Discussion category.
2022-12-20 11:25:55 +00:00
Shahed Nasser 3fb9362d0e docs: added region-related documentation pages (#2845)
* docs: added region doc pages

* docs: small fixes
2022-12-19 18:54:26 +02:00
Shahed Nasser 4ddbde3594 docs: changed postgres plan using in heroku docs (#2827) 2022-12-19 10:53:27 +02:00
github-actions[bot] 990d234f8e chore(docs): Removed Docs Announcement Bar (automated) (#2824)
Co-authored-by: shahednasser <shahednasser@users.noreply.github.com>
2022-12-19 10:21:58 +02:00
Shahed Nasser f2cb0cf683 docs: added upgrade guide for admin (#2816) 2022-12-16 11:26:30 +02:00
Shahed Nasser e5e13cc40e docs: added order claim documentation (#2805) 2022-12-14 20:25:12 +02:00
Shahed Nasser c1659f81ac chore: cleanup typedoc plugin (#2801)
* chore: added gitignore for typedoc plugin

* remove unnecessary files

* docs: added a note about building the plugin

* chore: added .yarn to gitignore

Co-authored-by: olivermrbl <oliver@mrbltech.com>
2022-12-14 19:48:48 +02:00
Patrick 6b73d087b6 fix(medusa-js): missing devDependency was failing repo build task (#2804)
### What

Explicitly declare `@medusajs/medusa` as a devDependency for `@medusajs/medusa-js` client package.

### Why

With our latest version upgrade of `turbo`, peerDependencies aren't taken into account in the build graph. The recommendation is to also explicitly declare them in devDependencies.

### Test

* Run `yarn build --graph`
* Expect to see medusa-js having a dependency on medusa
```
"[root] @medusajs/medusa-js#build" -> "[root] @medusajs/medusa#build"
```
2022-12-14 17:55:34 +01:00
Shahed Nasser fef2d997b2 chore: removed reference directory (#2800) 2022-12-14 14:59:11 +02:00
Shahed Nasser e2b7f77ba9 docs: fix id used in endpoint path in OAS (#2795)
* docs: fix id used in endpoint path in OAS

* docs: small fixes to OAS comments

* revert changes in core package

* undo changes in core files
2022-12-14 11:54:31 +02:00
olivermrbl 01d521ed40 chore(medusa-js): Version package + add missing changeset 2022-12-14 09:37:20 +01:00
Shahed Nasser 319bcc71b0 docs: updated event reference (#2791)
* docs: updated events reference

* docs: added noCopy metadata option for code blocks
2022-12-13 18:14:53 +02:00
Shahed Nasser 0d788e73c4 chore: fix API ref generator to run on push to master (#2787) 2022-12-13 13:22:05 +02:00
Shahed Nasser 52a8e90aac chore(docs): Generated API reference (#2788) 2022-12-13 12:52:58 +02:00
Shahed Nasser a77b4a1b7e docs: changed the steps to run tests in local dev (#2786) 2022-12-13 12:47:21 +02:00
github-actions[bot] e174443ecf chore(docs): Generated JS Client Reference (automated) (#2780)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
2022-12-13 12:40:33 +02:00
Shahed Nasser 76d35a1350 docs: made changes to CORS usage/config (#2784) 2022-12-13 12:32:51 +02:00
github-actions[bot] 5fab104b35 chore(docs): Generated Docs Announcement Bar (automated) (#2781)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
2022-12-13 11:53:42 +02:00
Shahed Nasser 7227c1539b docs: added a note about using Yarn for installation (#2778)
* docs: added a note about yarn being faster

* docs: fixed env variable used in admin deployment guide

* docs: fixed the use of noReport with npm2yarn
2022-12-13 11:52:55 +02:00
Shahed Nasser 6c796bf582 docs: added a minimum Node.js version for admin (#2779)
* docs: added a note about min node version in admin

* docs: added a link to Vite documentation
2022-12-13 11:52:37 +02:00
Shahed Nasser beecd4947d docs: added an upgrade guide for 1.7.0 (#2750) 2022-12-13 10:36:52 +01:00
olivermrbl 29135c0519 chore(release): Publish 2022-12-13 10:34:07 +01:00
olivermrbl 98b91fe917 Merge branch 'master' into develop 2022-12-13 09:59:26 +01:00
Caleb Rogers 6b51dd0168 docs: update environment variable used in admin's deploy guides (#2748)
* docs: Update netlify deploy readme for clarity

It was unlcear why "Gatsby" was mentioned in the env name for the server URL. Also, the code shows precedence given to `MEDUSA_BACKEND_URL` now:

```
    __MEDUSA_BACKEND_URL__: JSON.stringify(
      env.MEDUSA_BACKEND_URL ||
        // Backwards-compat with Gatsby.
        env.GATSBY_MEDUSA_BACKEND_URL ||
        env.GATSBY_STORE_URL ||
        ""
    ),
```

Therefore, this should be indicated in the documentation.

* Update docs/content/deployments/admin/deploying-on-netlify.md

* Update deploying-on-netlify.md

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2022-12-13 10:16:01 +02:00
Caleb Rogers 9021037397 docs: use correct publish directory for netlify deploy (#2741)
* Use correct publish directory for netlify deploy

Netlify automatically sets the Publish directory as "dist," but the netlify admin app's `build` command outputs files to `public`.

* Update docs/content/deployments/admin/deploying-on-netlify.md

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>

* Netlify CLI instructions updated to match UI

* Update docs/content/deployments/admin/deploying-on-netlify.md

* Update docs/content/deployments/admin/deploying-on-netlify.md

* Update deploying-on-netlify.md

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2022-12-13 10:12:58 +02:00
olivermrbl bde50ade40 Merge branch 'master' into develop 2022-12-12 19:26:00 +01:00
Adrien de Peretti b5d6682db6 feat(medusa): Allow regexp in CORS configuration (#1935) 2022-12-12 19:24:37 +01:00
Kasper Fabricius Kristensen c2c38dd091 fix(medusa, medusa-react): Typing of optional fields on multiple product endpoints (#2771) 2022-12-12 19:10:06 +01:00
Frane Polić 3464617553 fix(medusa): Payment status on refunds (#2770) 2022-12-12 19:04:36 +01:00
Oliver Windall Juhl b2ea8b7d45 fix(medusa): Throw on flat rate shipping options with no amount (#2628) 2022-12-12 18:34:30 +01:00
Adrien de Peretti e63777e3c5 fix(medusa): Creating tax lines in cart completion strategy (#2761) 2022-12-12 18:28:41 +01:00
Adrien de Peretti 424efff919 feat(medusa): Allow to assign a Collection to a Product on import (#2764) 2022-12-12 17:10:03 +01:00
Kasper Fabricius Kristensen 33aa3edb80 fix(medusa): keep country_code when partially updating cart addresses (#2683)
**What**
- Fixes a bug where `country_code` was dropped when partially updating a shipping or billing address on a cart.
2022-12-12 14:03:54 +00:00
Sebastian Rindom ae290a395a chore: move to GitHub Discussions for feature requests (#2765) 2022-12-12 13:20:16 +01:00
Shahed Nasser 64a4dcc53b docs: fixed tabs in create-medusa-app (#2762) 2022-12-12 13:27:48 +02:00
Adrien de Peretti d68e81fb3d fix(medusa): Update line item adjustments upon cart discount removal (#2751)
**What**

When a discount is deleted from a cart, the line item adjustments must be refreshed. Now, the cart service `removeDiscount` includes updating the adjustments.

**Tests**

**Add a new integration test which:**
- create a cart with a discount 
- add a line item
- validate the adjustments
- remove the discount
- check that the adjustments are not present anymore

**Update unit tests**
The actual tests cases now check that the adjustments repository is called when needed

FIXES CORE-890
2022-12-12 09:53:40 +00:00
Kasper Fabricius Kristensen 72f70bc789 fix(medusa): Decorate order with totals in store domain (#2747) 2022-12-09 09:42:53 +01:00
Shahed Nasser 0d1e73f152 docs: added Klarna documentation (#2746) 2022-12-08 20:26:35 +02:00
Shahed Nasser a57177ded5 docs: redesigned code blocks (#2745)
* docs: redesigned code blocks to include titles

* docs: added a title where necessary
2022-12-08 18:52:54 +02:00
Philip Korsholm a6243618fe feat(medusa): Claim customer orders (#2710) 2022-12-08 17:48:49 +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: https://github.com/medusajs/medusa/blob/f0cc1b324c964680c26e0d5c1d45769cbd750176/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
Riqwan Thamir 34e405c492 Merge pull request #2729 from medusajs/fix/discount-regions-validation
fix(medusa): discounts service create validates against at-least 1 region
2022-12-08 11:34:51 +01:00
Riqwan Thamir dbe25245b5 Merge branch 'develop' into fix/discount-regions-validation 2022-12-08 10:50:20 +01:00
olivermrbl 2b2ea157a6 chore(workflows): Fix merge conflicts with master 2022-12-07 20:28:32 +01:00
Riqwan Thamir 5240972cef chore: remove expectations in callbacks 2022-12-07 17:03:51 +01:00
Riqwan Thamir c1cdb80436 chore: use splat instead of lodash to clone, remove unnecessary expectations 2022-12-07 16:42:32 +01:00
Riqwan Thamir 40694bd5d1 chore: add a validation in the service layer to conform to 1 region rule 2022-12-07 16:42:32 +01:00
Riqwan Thamir 7fcf2b86a9 chore: prevent adminSession variable from being mutated in the helpers 2022-12-07 16:42:32 +01:00
Riqwan Thamir 66bec2f54d test: add a case when regions only contain invalid region Ids 2022-12-07 16:42:32 +01:00