Skip to content

Commit f353fc2

Browse files
authored
Merge branch 'develop' into feat/add-malawi-kwacha-currency
2 parents 76a00a8 + be7a5b8 commit f353fc2

1,930 files changed

Lines changed: 328392 additions & 254502 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/odd-apricots-marry.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@medusajs/link-modules": patch
3+
"@medusajs/core-flows": patch
4+
---
5+
6+
fix(link-modules,core-flows): Carry over cart promotions to order promotions

.github/teams.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@
1111
- "@thetutlage"
1212
- "@christiananese"
1313
- "@peterlgh7"
14+
- "@juanzgc"

.github/workflows/docs-test.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,63 @@ jobs:
334334
env:
335335
REVIEWDOG_GITHUB_API_TOKEN: ${{ github.token }}
336336

337+
vale-cloud:
338+
if: ${{ startsWith(github.head_ref, 'docs/') }}
339+
runs-on: ubuntu-latest
340+
steps:
341+
- name: Cancel Previous Runs
342+
uses: styfle/cancel-workflow-action@0.11.0
343+
with:
344+
access_token: ${{ github.token }}
345+
346+
- name: Checkout
347+
uses: actions/checkout@v3
348+
with:
349+
fetch-depth: 0
350+
351+
- name: Install Dependencies
352+
run: yarn
353+
354+
- name: Build Dependencies
355+
run: yarn build
356+
357+
- name: Install www/utils Dependencies
358+
run: yarn
359+
working-directory: www/utils
360+
361+
- name: Build packages
362+
run: yarn build
363+
working-directory: www/utils
364+
365+
# reviewdog throws an error when the number
366+
# of file changes in a PR is > 300, so
367+
# we retrieve the number of changed files
368+
# and only run the linter if the number is
369+
# less than 300. This is to avoid a PR hanging in
370+
# an error state
371+
- name: Get PR files number
372+
working-directory: www/utils/packages/scripts
373+
run: "yarn check:pr-files-count ${{ github.ref_name }}"
374+
id: pr-files
375+
376+
- name: Get Directories to Scan
377+
working-directory: www/vale
378+
run: ./get-files.sh cloud/app
379+
id: directories
380+
381+
- name: Vale Linter
382+
uses: errata-ai/vale-action@reviewdog
383+
if: ${{ steps.pr-files.outputs.files_lt_threshold == 'true' }}
384+
with:
385+
files: ${{ steps.directories.outputs.LIST }}
386+
fail_on_error: true
387+
vale_flags: "--minAlertLevel=error"
388+
reporter: github-pr-check
389+
token: ${{ github.token }}
390+
filter_mode: nofilter
391+
env:
392+
REVIEWDOG_GITHUB_API_TOKEN: ${{ github.token }}
393+
337394
content-eslint:
338395
if: ${{ startsWith(github.head_ref, 'docs/') }}
339396
runs-on: ubuntu-latest

integration-tests/api/jest.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ process.chdir(__dirname)
44
const defineJestConfig = require("../../define_jest_config")
55
module.exports = defineJestConfig({
66
testEnvironment: `node`,
7-
rootDir: "./",
87
testPathIgnorePatterns: [
98
`/examples/`,
109
`/www/`,

integration-tests/api/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"license": "MIT",
66
"private": true,
77
"scripts": {
8-
"test:integration": "NODE_OPTIONS=--experimental-vm-modules jest --silent=false --no-cache --maxWorkers=50% --bail --detectOpenHandles --forceExit --logHeapUsage",
9-
"test:integration:chunk": "NODE_OPTIONS=--experimental-vm-modules jest --silent --no-cache --bail --maxWorkers=50% --forceExit --detectOpenHandles --testPathPattern=$(echo $CHUNKS | jq -r \".[${CHUNK}] | .[]\")",
8+
"test:integration": "jest --silent=false --no-cache --maxWorkers=50% --bail --detectOpenHandles --forceExit --logHeapUsage",
9+
"test:integration:chunk": "jest --silent --no-cache --bail --maxWorkers=50% --forceExit --detectOpenHandles --testPathPattern=$(echo $CHUNKS | jq -r \".[${CHUNK}] | .[]\")",
1010
"build": "tsc ./src/* --allowJs --outDir ./dist"
1111
},
1212
"dependencies": {

integration-tests/helpers/create-admin-user.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
} from "@medusajs/framework/types"
88
import {
99
ApiKeyType,
10+
ContainerRegistrationKeys,
1011
Modules,
1112
PUBLISHABLE_KEY_HEADER,
1213
} from "@medusajs/framework/utils"
@@ -51,15 +52,19 @@ export const createAdminUser = async (
5152
},
5253
})
5354

55+
const config = container.resolve(ContainerRegistrationKeys.CONFIG_MODULE)
56+
const { projectConfig } = config
57+
const { jwtSecret, jwtOptions } = projectConfig.http
5458
const token = jwt.sign(
5559
{
5660
actor_id: user.id,
5761
actor_type: "user",
5862
auth_identity_id: authIdentity.id,
5963
},
60-
"test",
64+
jwtSecret,
6165
{
6266
expiresIn: "1d",
67+
...jwtOptions,
6368
}
6469
)
6570

integration-tests/http/CHANGELOG.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,93 @@
11
# integration-tests-http
22

3+
## 1.0.19
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`e9a33d0700c47c3d2357bb325791bc272a4d4569`](https://github.com/medusajs/medusa/commit/e9a33d0700c47c3d2357bb325791bc272a4d4569), [`46bf7ae7aead3f33485ce8adebb602eda305088c`](https://github.com/medusajs/medusa/commit/46bf7ae7aead3f33485ce8adebb602eda305088c), [`2f70f133511857b499a992b65a0a4d6170e03ab9`](https://github.com/medusajs/medusa/commit/2f70f133511857b499a992b65a0a4d6170e03ab9), [`fa76f85bba253528964bacf86c061fef6d3d0742`](https://github.com/medusajs/medusa/commit/fa76f85bba253528964bacf86c061fef6d3d0742), [`42be9a88d61a11db7aebde2d6f4d96d43f54ea79`](https://github.com/medusajs/medusa/commit/42be9a88d61a11db7aebde2d6f4d96d43f54ea79)]:
8+
- @medusajs/test-utils@2.8.7
9+
- @medusajs/core-flows@2.8.7
10+
- @medusajs/api-key@2.8.7
11+
- @medusajs/auth@2.8.7
12+
- @medusajs/fulfillment@2.8.7
13+
- @medusajs/inventory@2.8.7
14+
- @medusajs/pricing@2.8.7
15+
- @medusajs/product@2.8.7
16+
- @medusajs/promotion@2.8.7
17+
- @medusajs/region@2.8.7
18+
- @medusajs/stock-location@2.8.7
19+
- @medusajs/store@2.8.7
20+
- @medusajs/medusa@2.8.7
21+
- @medusajs/customer@2.8.7
22+
- @medusajs/tax@2.8.7
23+
- @medusajs/user@2.8.7
24+
- @medusajs/workflow-engine-inmemory@2.8.7
25+
- @medusajs/modules-sdk@2.8.7
26+
- @medusajs/utils@2.8.7
27+
- @medusajs/cache-inmemory@2.8.7
28+
- @medusajs/event-bus-local@2.8.7
29+
- @medusajs/fulfillment-manual@2.8.7
30+
31+
## 1.0.18
32+
33+
### Patch Changes
34+
35+
- Updated dependencies [[`9a62f359f1c954bcc09c57e4660f90d4b010e51c`](https://github.com/medusajs/medusa/commit/9a62f359f1c954bcc09c57e4660f90d4b010e51c), [`95d282e8ef8f2185737d493dea8b6f1677684543`](https://github.com/medusajs/medusa/commit/95d282e8ef8f2185737d493dea8b6f1677684543)]:
36+
- @medusajs/core-flows@2.8.6
37+
- @medusajs/utils@2.8.6
38+
- @medusajs/test-utils@2.8.6
39+
- @medusajs/workflow-engine-inmemory@2.8.6
40+
- @medusajs/medusa@2.8.6
41+
- @medusajs/modules-sdk@2.8.6
42+
- @medusajs/api-key@2.8.6
43+
- @medusajs/auth@2.8.6
44+
- @medusajs/customer@2.8.6
45+
- @medusajs/fulfillment@2.8.6
46+
- @medusajs/inventory@2.8.6
47+
- @medusajs/pricing@2.8.6
48+
- @medusajs/product@2.8.6
49+
- @medusajs/promotion@2.8.6
50+
- @medusajs/region@2.8.6
51+
- @medusajs/stock-location@2.8.6
52+
- @medusajs/store@2.8.6
53+
- @medusajs/tax@2.8.6
54+
- @medusajs/user@2.8.6
55+
- @medusajs/cache-inmemory@2.8.6
56+
- @medusajs/event-bus-local@2.8.6
57+
- @medusajs/fulfillment-manual@2.8.6
58+
59+
## 1.0.17
60+
61+
### Patch Changes
62+
63+
- [#12815](https://github.com/medusajs/medusa/pull/12815) [`6ca755ede7bfe3211464447412ca0d97e1207742`](https://github.com/medusajs/medusa/commit/6ca755ede7bfe3211464447412ca0d97e1207742) Thanks [@anteprimorac](https://github.com/anteprimorac)! - Enable filtering admin products API by variant EAN, UPC, and barcode
64+
65+
- [#12643](https://github.com/medusajs/medusa/pull/12643) [`f2cb528a5650fe112ca8eeb4bdffc5f0b217338a`](https://github.com/medusajs/medusa/commit/f2cb528a5650fe112ca8eeb4bdffc5f0b217338a) Thanks [@thetutlage](https://github.com/thetutlage)! - feat: wire up direct uploads with local file provider
66+
67+
- Updated dependencies [[`ab634a14ba709f1b1d12eb4cd5c7f3db6bfe6470`](https://github.com/medusajs/medusa/commit/ab634a14ba709f1b1d12eb4cd5c7f3db6bfe6470), [`6ca755ede7bfe3211464447412ca0d97e1207742`](https://github.com/medusajs/medusa/commit/6ca755ede7bfe3211464447412ca0d97e1207742), [`ba1e6595b74ae69f4ee066d545f8def8aff77dd3`](https://github.com/medusajs/medusa/commit/ba1e6595b74ae69f4ee066d545f8def8aff77dd3), [`f2cb528a5650fe112ca8eeb4bdffc5f0b217338a`](https://github.com/medusajs/medusa/commit/f2cb528a5650fe112ca8eeb4bdffc5f0b217338a), [`cbf3644eb7c8a24eaed879647b58c9ece3373c0e`](https://github.com/medusajs/medusa/commit/cbf3644eb7c8a24eaed879647b58c9ece3373c0e), [`d517dbd66a47817d1270c278b03add9a5c4244cb`](https://github.com/medusajs/medusa/commit/d517dbd66a47817d1270c278b03add9a5c4244cb), [`b316924572fc2cf529e0d91b84955da20b34248a`](https://github.com/medusajs/medusa/commit/b316924572fc2cf529e0d91b84955da20b34248a), [`2621f00bb035a6b909f9498a2bc98fdba8570ba9`](https://github.com/medusajs/medusa/commit/2621f00bb035a6b909f9498a2bc98fdba8570ba9), [`672871b733c6e82bd9e68cf90300ff78cf44727a`](https://github.com/medusajs/medusa/commit/672871b733c6e82bd9e68cf90300ff78cf44727a), [`bd6d9777c50d69115a20334a103a8ab9997b259d`](https://github.com/medusajs/medusa/commit/bd6d9777c50d69115a20334a103a8ab9997b259d), [`316a325b63e92003df25452faf88e577e9133064`](https://github.com/medusajs/medusa/commit/316a325b63e92003df25452faf88e577e9133064), [`94b62c67249d13ec6342411cf7efdedfd0ac47e1`](https://github.com/medusajs/medusa/commit/94b62c67249d13ec6342411cf7efdedfd0ac47e1), [`1a7847660890ae84648123567ce8dc4c9a0eca03`](https://github.com/medusajs/medusa/commit/1a7847660890ae84648123567ce8dc4c9a0eca03)]:
68+
- @medusajs/utils@2.8.5
69+
- @medusajs/auth@2.8.5
70+
- @medusajs/customer@2.8.5
71+
- @medusajs/fulfillment@2.8.5
72+
- @medusajs/inventory@2.8.5
73+
- @medusajs/medusa@2.8.5
74+
- @medusajs/core-flows@2.8.5
75+
- @medusajs/test-utils@2.8.5
76+
- @medusajs/user@2.8.5
77+
- @medusajs/modules-sdk@2.8.5
78+
- @medusajs/promotion@2.8.5
79+
- @medusajs/workflow-engine-inmemory@2.8.5
80+
- @medusajs/api-key@2.8.5
81+
- @medusajs/pricing@2.8.5
82+
- @medusajs/product@2.8.5
83+
- @medusajs/region@2.8.5
84+
- @medusajs/stock-location@2.8.5
85+
- @medusajs/store@2.8.5
86+
- @medusajs/tax@2.8.5
87+
- @medusajs/cache-inmemory@2.8.5
88+
- @medusajs/event-bus-local@2.8.5
89+
- @medusajs/fulfillment-manual@2.8.5
90+
391
## 1.0.16
492

593
### Patch Changes
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
const { defineConfig, Modules } = require("@medusajs/utils")
2+
const { generateKeyPairSync } = require("crypto")
3+
const os = require("os")
4+
5+
const passphrase = "secret"
6+
const { publicKey, privateKey } = generateKeyPairSync("rsa", {
7+
modulusLength: 4096,
8+
publicKeyEncoding: {
9+
type: "spki",
10+
format: "pem",
11+
},
12+
privateKeyEncoding: {
13+
type: "pkcs8",
14+
format: "pem",
15+
cipher: "aes-256-cbc",
16+
passphrase,
17+
},
18+
})
19+
20+
const DB_HOST = process.env.DB_HOST
21+
const DB_USERNAME = process.env.DB_USERNAME
22+
const DB_PASSWORD = process.env.DB_PASSWORD
23+
const DB_NAME = process.env.DB_TEMP_NAME
24+
const DB_URL = `postgres://${DB_USERNAME}:${DB_PASSWORD}@${DB_HOST}/${DB_NAME}`
25+
process.env.DATABASE_URL = DB_URL
26+
process.env.LOG_LEVEL = "error"
27+
28+
const jwtOptions = {
29+
algorithm: "RS256",
30+
expiresIn: "1h",
31+
issuer: "medusa",
32+
keyid: "medusa",
33+
}
34+
35+
module.exports = defineConfig({
36+
admin: {
37+
disable: true,
38+
},
39+
projectConfig: {
40+
http: {
41+
jwtSecret: {
42+
key: privateKey,
43+
passphrase,
44+
},
45+
jwtPublicKey: publicKey,
46+
jwtOptions: jwtOptions,
47+
},
48+
},
49+
modules: [
50+
{
51+
key: Modules.USER,
52+
options: {
53+
jwt_secret: {
54+
key: privateKey,
55+
passphrase,
56+
},
57+
jwt_public_key: publicKey,
58+
jwt_options: jwtOptions,
59+
},
60+
},
61+
],
62+
})

0 commit comments

Comments
 (0)