Commit Graph

154 Commits

Author SHA1 Message Date
github-actions[bot]
2c807df99d chore: Version Packages (#6839)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-01 09:48:24 +02:00
Shahed Nasser
c3efac5a0d fix(medusa-core-utils): add missing awilix dependency (#7003)
`medusa-core-utils` has a missing dependency `awilix` which sometimes result in errors as reported in issue #6884

This PR adds the missing dependency
2024-04-15 07:56:40 +00:00
Adrien de Peretti
d4d1f9b2f2 fix: integration tests modules expectations (#6848)
**What**
- fix tests
- cleanup deprecated jest conf
2024-03-27 15:39:20 +00:00
github-actions[bot]
47272bf2b9 chore: Version Packages (#5880) 2024-01-09 18:41:35 +01:00
Kasper Fabricius Kristensen
f868775861 chore: move next admin packages to core repo (#5983)
**What**
- Move packages for `next` version of admin to core repo

**Other**
- Since this PR introduces packages that depend on Vite 5, it also introduces @types/node@^20. We have never had a direct dependency on the types package for Node, and as far as I can see that has resulted in us using the types from Node.js@8, as those are a dependency of one of our dependencies. With the introduction of @types/node@^20, two of our packages had TS errors because they were using the NodeJS.Timer type, which was deprecated in Node.js@14. We should add specific @types/node packages to all our packages, but I haven't done so in this PR to keep it as clean as possible.
- Q: @olivermrbl I've added the new packages to the ignore list for changeset, is this enough to prevent them from being published?
2024-01-08 09:26:46 +00:00
Mohamed Abusaid
46d610bc55 feat(admin): Add Libya admin region and set Libya to formal name (#6001) 2024-01-07 14:33:40 +01:00
Adrien de Peretti
946db51a9b chore(): Add engines to all package.json if needed (#5812) 2023-12-07 17:03:50 +01:00
Adrien de Peretti
154c9b43bd feat(medusa, modules-sdk, types, utils): Re work modules loading and remove legacy functions (#5496) 2023-11-02 17:59:13 +01:00
Oli Juhl
1d2637572b chore: Remove rimraf from prepare (#4741) 2023-08-11 22:55:59 +02:00
Adrien de Peretti
58d4c230e2 chore: include rimraf as part of the build for most of the packages (#4615)
* chore: include rimraf as part of the build for most of the packages

* cleanup

* revert medusa interface

* missing script update
2023-07-31 09:23:27 +02:00
Adrien de Peretti
6f1fa244fa chore(medusa-cli): Cleanup plugin setup (#4420)
* chore(medusa-cli): Cleanup plugin setup

* fix: logger types

* fix event bus local

* fix event bus redis

* Create late-dragons-collect.md

* move to ts

* remove unused command

* env

* fix
2023-06-28 16:37:25 +02:00
olivermrbl
66c59d54ff chore(release): v1.8.0 2023-04-04 18:35:27 +02:00
olivermrbl
b57ea22461 chore: Enter pre-release mode and version packages 2023-03-24 10:16:11 +01:00
Kasper Fabricius Kristensen
9ad15d3a88 feat(admin-ui): Implements redesign of public pages (#3504)
* redesign public pages

* rm build files

* fix size of button
2023-03-17 10:17:47 +01:00
Carlos R. L. Rodrigues
77d46220c2 Feat(modules-sdk,inventory,stock-location): modules isolated connection (#3329)
* feat: scoped container for modules
2023-03-15 12:09:45 -03:00
Carlos R. L. Rodrigues
54dcc1871c feat(medusa,medusa-core-utils): graceful shutdown server (#3408)
* feat: graceful shutdown
2023-03-10 09:11:45 -03:00
Patrick
1c40346e9e feat(codegen): openapi-typescript-codegen fork (#3272)
## What

Allow `medusa-oas` CLI to generate API client code from an OAS json file.

## Why

Manually maintaining API clients is time consuming and error prone. We wish to automate the process by using code generation strategies.

We also wish to eliminate direct import from `@medusajs/medusa` in clients which can lead to unwanted side effects like importing unnecessary dependencies.

## How

Fork and customize an OAS code generator library that is TypeScript friendly.

Attempt to match the interface and signature of our current client packages: `@medusajs/medusa-js`, `medusa-react`

Add a new `client` command to the `medusa-oas` CLI as the main interface to interact with the code generation tooling.

## Test

### Prerequisites 
* From the root of the monorepo:
* `yarn install`
* `yarn build`

### Case - all in one build
* From the root of the monorepo:
* Run `yarn medusa-oas oas --out-dir ~/tmp/oas --type store`
* Run `yarn medusa-oas client --src-file ~/tmp/oas/store.oas.json --out-dir ~/tmp/client-store --type store`
* Expect `~/tmp/client-store` to contain the following files and directories:
```
core/
hooks/
models/
services/
index.ts
MedusaStore.ts
useMedusaStore.tsx
```

### Case - types only
* From the root of the monorepo:
* Run `yarn medusa-oas oas --out-dir ~/tmp/oas --type store`
* Run `yarn medusa-oas client --src-file ~/tmp/oas/store.oas.json --out-dir ~/tmp/client-types --type store --component types`
* Expect `~/tmp/client-types` to contain the following files and directories:
```
models/
index.ts
```

### Case - client only
* From the root of the monorepo:
* Run `yarn medusa-oas oas --out-dir ~/tmp/oas --type store`
* Run `yarn medusa-oas client --src-file ~/tmp/oas/store.oas.json --out-dir ~/tmp/client-only --type store --component client --types-package @medusajs/client-types`
* Expect `~/tmp/client-only` to contain the following files and directories:
```
core/
services/
index.ts
MedusaStore.ts
```
2023-02-20 20:50:39 +00:00
Riqwan Thamir
121b42acfe chore(medusa): Typeorm upgrade to 0.3.11 (#3041) 2023-02-15 16:25:30 +01:00
olivermrbl
1bfbe27b9b chore(release): Publish 2023-02-14 17:30:40 +01:00
olivermrbl
da9fb4aaa8 chore: Lint package.json 2023-02-14 17:27:43 +01:00
Adrien de Peretti
8c5219a31e chore: Update ignored files for npm (#3217) 2023-02-09 17:25:14 +01:00
olivermrbl
3b474ec35c chore(release): Publish 2023-02-08 19:35:44 +01:00
Oliver Windall Juhl
08324355a4 chore: Patch bump all dependencies + minor bumps winston (#3185) 2023-02-07 19:15:29 +01:00
olivermrbl
233d6904f8 chore(release): Publish 2022-12-22 15:54:20 +01:00
Adrien de Peretti
c8724da503 feat(medusa,medusa-payment-stripe): Move database mutation from plugin to core (#2743)
**what**
The goal of that PR is to first refactor the payment provider and payment plugin to support the new API that removes the data mutation from within the plugin to be done by the core instead. In any case, this pr does not include the steps of the deeper refactoring. The last part will come in later pr.

**How**
- The payment plugin is now capable to handle both the deprecated and new API and the plugin works the same as it use to works.
- The mutation made by the plugin have been moved into the core as well as the subscriber
- The tests have been updated to reflect the changed
- Remove all new methods introduced by the payment collections
  - Mutualise types
  - Update provider and payment collection services
  - cleanup around all those refactoring including cleanup of the payment collection
  - refactor stripe payment plugin

FIXES CORE-887
2022-12-19 14:37:35 +00:00
Adrien de Peretti
7cced6006a fix(medusa-core-utils): getConfigFile typings (#2783)
* fix: getConfigFile typeings

* Create brave-apes-carry.md

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2022-12-14 19:35:16 +01:00
olivermrbl
29135c0519 chore(release): Publish 2022-12-13 10:34:07 +01:00
Adrien de Peretti
b5d6682db6 feat(medusa): Allow regexp in CORS configuration (#1935) 2022-12-12 19:24:37 +01:00
Carlos R. L. Rodrigues
15c667fbd3 feat(medusa,medusa-react): PaymentCollection support (#2659)
* chore: medusa react, order edit complete fix and single payment session
2022-12-07 12:39:35 -03:00
Adrien de Peretti
1b21af87ab chore(medusa-core-utils): Migrate to TS (#2670) 2022-12-05 10:21:04 +01:00
olivermrbl
ade898d434 chore(release): Publish 2022-11-22 13:35:50 +01:00
Philip Korsholm
e7c4cc3751 fix(medusa): Separate JWT auth strategies per domain (#2646)
**What**
Separate JWT auth strategies per domain

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
Co-authored-by: Adrien de Peretti <25098370+adrien2p@users.noreply.github.com>
2022-11-22 12:30:05 +00:00
olivermrbl
4542906619 chore(release): Publish 2022-11-04 11:37:56 +01:00
Philip Korsholm
ea3d738823 Feat(medusa): config error handling in loaders (#2514)
**What**
- add error handling when loading project config

**How**
- Add error parameter to get-medusa-config result if an error was thrown (previously we returned an empty config)
- Discussion: 
A different, but equally valid approach could be just throwing the error rather than creating an error parameter. This causes a more ugly output without warnings and changes the api a bit but it would force error handling. wdyt?

**Why**
- cli would fail with database error `databaseMissingDriverError` if config was invalid, ex. missing a comma


### example (missing `,` in config)
**old output**
```
Successfully compiled 2 files with Babel (143ms).
[medusa-config] ⚠️ redis_url not found. A fake redis instance will be used.
[medusa-config] ⚠️ database_type not found. fallback to default sqlite.
info:    Using flag MEDUSA_FF_ORDER_EDITING from environment with value true
info:    Using flag MEDUSA_FF_SALES_CHANNELS from environment with value true
info:    Using flag MEDUSA_FF_TAX_INCLUSIVE_PRICING from environment with value true
info:    Using fake Redis
✔ Models initialized – 13ms
✔ Plugin models initialized – 0ms
✔ Repositories initialized – 17ms
⠋ Initializing databaseMissingDriverError: Wrong driver: "undefined" given. Supported drivers are: "aurora-data-api", "aurora-data-api-pg", "better-sqlite3", "capacitor", "cockroachdb", "cordova", "expo", "mariadb", "mongodb", "mssql", "mysql", "nativescript", "oracle", "postgres", "react-native", "sap", "sqlite", "sqljs".
```

**new output** 
```
Successfully compiled 2 files with Babel (185ms).
error:    Error in loading config: Unexpected identifier
error:    /Users/phko/projects/community/my-medusa-store/medusa-config.js:129
  plugins,
  ^^^^^^^

SyntaxError: Unexpected identifier
    at compileFunction (<anonymous>)
    at Object.compileFunction (node:vm:352:18)
    at wrapSafe (node:internal/modules/cjs/loader:1033:15)
    at Module._compile (node:internal/modules/cjs/loader:1069:27)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at getConfigFile (/Users/phko/projects/community/my-medusa-store/node_modules/medusa-core-utils/dist/get-config-file.js:26:20)
```
2022-11-02 18:58:02 +00:00
olivermrbl
93bf1118eb chore(release): Publish 2022-10-12 09:29:39 +02:00
olivermrbl
35df4962f8 chore(release): Publish 2022-10-10 18:02:50 +02:00
Sebastian Rindom
7dc8d3a0c9 feat(medusa): PriceList import strategy (#2210) 2022-09-28 15:30:15 +02:00
Carlos R. L. Rodrigues
a94d9816fe chore: Centralise ESLint rules (#2162)
* chore: centrilize eslint rules
2022-09-13 07:42:33 -03:00
Adrien de Peretti
aaebb38eae feat(medusa): Convert IdempotencyKeyService to TypeScript (#1995)
* feat(medusa): Migrate the idempotency key service to ts + fix

* feat(medusa): Finalise idempotency migration

* Create late-owls-pump.md

* feat(medusa): Polish

* feat(medusa): Add case to the error handler

* feat(medusa): Add case to the error handler

Co-authored-by: olivermrbl <oliver@mrbltech.com>
2022-08-09 08:08:07 +02:00
Zakaria El Asri
9fa4238ee4 chore: improve ci pipeline (#1764)
* 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
2022-07-10 12:11:11 +02:00
Sebastian Rindom
36c0f468f9 chore(release): Publish
- babel-preset-medusa-package@1.1.19
 - @medusajs/medusa-cli@1.1.24
 - medusa-core-utils@1.1.31
 - medusa-dev-cli@0.0.24
 - medusa-file-minio@1.0.1
 - medusa-file-s3@1.0.9
 - medusa-file-spaces@1.1.34
 - medusa-fulfillment-manual@1.1.31
 - medusa-fulfillment-webshipper@1.1.35
 - medusa-interfaces@1.1.32
 - @medusajs/medusa-js@1.0.6
 - medusa-payment-adyen@1.1.36
 - medusa-payment-klarna@1.1.36
 - medusa-payment-manual@1.0.13
 - medusa-payment-paypal@1.0.35
 - medusa-payment-stripe@1.1.35
 - medusa-plugin-add-ons@1.1.34
 - medusa-plugin-algolia@0.0.6
 - medusa-plugin-brightpearl@1.1.40
 - medusa-plugin-contentful@1.1.37
 - medusa-plugin-economic@1.1.34
 - medusa-plugin-mailchimp@1.1.34
 - medusa-plugin-meilisearch@0.0.12
 - medusa-plugin-permissions@1.1.34
 - medusa-plugin-restock-notification@0.0.27
 - medusa-plugin-segment@1.1.37
 - medusa-plugin-sendgrid@1.1.35
 - medusa-plugin-slack-notification@1.1.34
 - medusa-plugin-twilio-sms@1.1.34
 - medusa-plugin-wishlist@1.1.34
 - medusa-source-shopify@1.0.0
 - medusa-telemetry@0.0.11
 - medusa-test-utils@1.1.34
 - @medusajs/medusa@1.1.58
2021-12-08 13:21:54 +01:00
Kasper Fabricius Kristensen
577bcc23d4 feat: medusa-source-shopify loader (#563)
* added statuses to product + unit test for updating status

* add update to product model

* added integration tests

* added integration test to validate that updating status to null results in invalid_data error

* removed comment

* update GET /store/products integration test

* fixed unit test with IdMap

* init plugin

* changed dbehaviour on invalid status input on admin list products

* mprices

* updated migration to add status = published on all existing products + added integration test on GET /admin/products when status null is provided

* merged product status

* init ShopifyService

* made requested changes to migration and GET /store/products

* fixed test

* made requested changes to migration

* push progress on source plugin

* add webhook product/create handler

* fixed normalization of variant weight

* removed weight func

* work on events

* finished product hooks (error on new variant needs to be fixed)

* fixed order status

* create fulfillments

* update fulfillment on cancel

* refactored services, handle returns though medusa, helper methods

* order updates

* removed dist

* update gitignore

* emit cahnges to product

* added redis ignore check to prevent update loops

* fixed product-variant.deleted event

* fix more events

* fix test

* fix: order taxes

* added refund with no items

* fixes to hooks

* fixed handling refunds and returns issued from Shopify

* added unit tests to ShopifyProductService and ShopifyCollectionService

* linting fix

* prepared loader PR

* fix: jsDocs

* fix: pager

* fix: build output and babelrc

* chore: linting

* fix: address type

* fix: migration clean up

* fix: update snapshots with ext_ids

Co-authored-by: Sebastian Rindom <skrindom@gmail.com>
2021-12-08 10:09:21 +01:00
Sebastian Rindom
ed04132533 fix(medusa): migrate cart service to typescript (#884)
* fix: migrate cart service to typescript

* fix: jsdoc inventory service

* fix: revert route unit test change

* fix: typo

* fix: revert integration test packages

* fix: cleanup

* fix: tests

* fix: integration tests

* fix: create props type guards

* fix: move total field to common types
2021-12-07 19:26:00 +01:00
Sebastian Rindom
4fcf9c1ee5 chore(release): Publish
- medusa-core-utils@1.1.30
 - medusa-file-s3@1.0.8
 - medusa-file-spaces@1.1.33
 - medusa-fulfillment-manual@1.1.30
 - medusa-fulfillment-webshipper@1.1.34
 - medusa-interfaces@1.1.31
 - @medusajs/medusa-js@1.0.5
 - medusa-payment-adyen@1.1.35
 - medusa-payment-klarna@1.1.35
 - medusa-payment-manual@1.0.12
 - medusa-payment-paypal@1.0.34
 - medusa-payment-stripe@1.1.34
 - medusa-plugin-add-ons@1.1.33
 - medusa-plugin-algolia@0.0.5
 - medusa-plugin-brightpearl@1.1.39
 - medusa-plugin-contentful@1.1.36
 - medusa-plugin-economic@1.1.33
 - medusa-plugin-mailchimp@1.1.33
 - medusa-plugin-meilisearch@0.0.11
 - medusa-plugin-permissions@1.1.33
 - medusa-plugin-restock-notification@0.0.26
 - medusa-plugin-segment@1.1.36
 - medusa-plugin-sendgrid@1.1.34
 - medusa-plugin-slack-notification@1.1.33
 - medusa-plugin-twilio-sms@1.1.33
 - medusa-plugin-wishlist@1.1.33
 - medusa-test-utils@1.1.33
 - @medusajs/medusa@1.1.57
2021-11-23 09:49:33 +01:00
Sebastian Rindom
38b0e295b2 fix: bumps class-transformer to 0.5.1 (#837)
* fix: bumps class transformer to 0.5.1

* fix(medusa): bumps class transformer to 0.5.1
2021-11-23 09:47:16 +01:00
Oliver Juhl
7770046479 chore(release): Publish
- medusa-core-utils@1.1.29
 - medusa-file-s3@1.0.7
 - medusa-file-spaces@1.1.32
 - medusa-fulfillment-manual@1.1.29
 - medusa-fulfillment-webshipper@1.1.33
 - medusa-interfaces@1.1.30
 - @medusajs/medusa-js@1.0.4
 - medusa-payment-adyen@1.1.34
 - medusa-payment-klarna@1.1.34
 - medusa-payment-manual@1.0.11
 - medusa-payment-paypal@1.0.33
 - medusa-payment-stripe@1.1.33
 - medusa-plugin-add-ons@1.1.32
 - medusa-plugin-algolia@0.0.4
 - medusa-plugin-brightpearl@1.1.38
 - medusa-plugin-contentful@1.1.35
 - medusa-plugin-economic@1.1.32
 - medusa-plugin-mailchimp@1.1.32
 - medusa-plugin-meilisearch@0.0.10
 - medusa-plugin-permissions@1.1.32
 - medusa-plugin-restock-notification@0.0.25
 - medusa-plugin-segment@1.1.35
 - medusa-plugin-sendgrid@1.1.33
 - medusa-plugin-slack-notification@1.1.32
 - medusa-plugin-twilio-sms@1.1.32
 - medusa-plugin-wishlist@1.1.32
 - medusa-test-utils@1.1.32
 - @medusajs/medusa@1.1.56
2021-11-22 17:10:54 +01:00
Sebastian Rindom
322466bc99 chore(release): Publish
- medusa-core-utils@1.1.28
 - medusa-file-s3@1.0.6
 - medusa-file-spaces@1.1.31
 - medusa-fulfillment-manual@1.1.28
 - medusa-fulfillment-webshipper@1.1.32
 - medusa-interfaces@1.1.29
 - @medusajs/medusa-js@1.0.2
 - medusa-payment-adyen@1.1.33
 - medusa-payment-klarna@1.1.33
 - medusa-payment-manual@1.0.10
 - medusa-payment-paypal@1.0.32
 - medusa-payment-stripe@1.1.32
 - medusa-plugin-add-ons@1.1.31
 - medusa-plugin-algolia@0.0.3
 - medusa-plugin-brightpearl@1.1.37
 - medusa-plugin-contentful@1.1.34
 - medusa-plugin-economic@1.1.31
 - medusa-plugin-mailchimp@1.1.31
 - medusa-plugin-meilisearch@0.0.9
 - medusa-plugin-permissions@1.1.31
 - medusa-plugin-restock-notification@0.0.24
 - medusa-plugin-segment@1.1.34
 - medusa-plugin-sendgrid@1.1.32
 - medusa-plugin-slack-notification@1.1.31
 - medusa-plugin-twilio-sms@1.1.31
 - medusa-plugin-wishlist@1.1.31
 - medusa-test-utils@1.1.31
 - @medusajs/medusa@1.1.54
2021-11-19 10:30:35 +01:00
Sebastian Rindom
aa460f6359 chore: release assist 2021-11-19 10:29:02 +01:00
Sebastian Rindom
a69b1e85be chore(release): Publish
- medusa-core-utils@1.1.27
 - medusa-file-s3@1.0.5
 - medusa-file-spaces@1.1.30
 - medusa-fulfillment-manual@1.1.27
 - medusa-fulfillment-webshipper@1.1.31
 - medusa-interfaces@1.1.28
 - @medusajs/medusa-js@1.0.1
 - medusa-payment-adyen@1.1.32
 - medusa-payment-klarna@1.1.32
 - medusa-payment-manual@1.0.9
 - medusa-payment-paypal@1.0.31
 - medusa-payment-stripe@1.1.31
 - medusa-plugin-add-ons@1.1.30
 - medusa-plugin-algolia@0.0.2
 - medusa-plugin-brightpearl@1.1.36
 - medusa-plugin-contentful@1.1.33
 - medusa-plugin-economic@1.1.30
 - medusa-plugin-mailchimp@1.1.30
 - medusa-plugin-meilisearch@0.0.8
 - medusa-plugin-permissions@1.1.30
 - medusa-plugin-restock-notification@0.0.23
 - medusa-plugin-segment@1.1.33
 - medusa-plugin-sendgrid@1.1.31
 - medusa-plugin-slack-notification@1.1.30
 - medusa-plugin-twilio-sms@1.1.30
 - medusa-plugin-wishlist@1.1.30
 - medusa-test-utils@1.1.30
 - @medusajs/medusa@1.1.53
2021-11-19 10:26:29 +01:00
Oliver Windall Juhl
373532ecbc feat: Typescript for API layer (#817)
Co-authored-by: Philip Korsholm <88927411+pKorsholm@users.noreply.github.com>
Co-authored-by: Zakaria El Asri <33696020+zakariaelas@users.noreply.github.com>
Co-authored-by: Kasper Fabricius Kristensen <45367945+kasperkristensen@users.noreply.github.com>
Co-authored-by: Philip Korsholm <philip.korsholm@hotmail.com>
Co-authored-by: Sebastian Rindom <seb@medusa-commerce.com>
2021-11-18 15:19:17 +01:00