Skip to content

Commit 1b4aea6

Browse files
authored
Merge pull request #77 from lambda-curry/codex/medusa-2-13-1-upgrade
2 parents 924654d + ba352aa commit 1b4aea6

14 files changed

Lines changed: 7190 additions & 7875 deletions

File tree

.github/workflows/pr-checks.yaml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ env:
1313

1414
jobs:
1515
lint:
16-
runs-on: warp-ubuntu-2404-x64-2x
16+
runs-on: ubuntu-latest
1717
steps:
1818
- name: Checkout code
1919
uses: actions/checkout@v4
@@ -25,24 +25,23 @@ jobs:
2525
run: biome ci .
2626

2727
typecheck:
28-
runs-on: warp-ubuntu-2404-x64-2x
28+
runs-on: ubuntu-latest
2929
timeout-minutes: 15
3030
steps:
3131
- uses: actions/checkout@v4
3232
with:
3333
fetch-depth: 0
3434

3535
- name: Cache turbo build setup
36-
if: env.skip == 'false'
37-
uses: WarpBuilds/cache@v1
36+
uses: actions/cache@v4
3837
with:
3938
path: .turbo
4039
key: ${{ runner.os }}-turbo-${{ github.sha }}
4140
restore-keys: |
4241
${{ runner.os }}-turbo-
4342
4443
- name: Setup Node.js environment
45-
uses: WarpBuilds/setup-node@v4
44+
uses: actions/setup-node@v4
4645
with:
4746
node-version-file: '.nvmrc'
4847
cache: 'yarn'
@@ -51,9 +50,7 @@ jobs:
5150
run: yarn install --immutable
5251

5352
- name: Type-check
54-
if: ${{ needs.detect-changes.outputs.e2e == 'true' }}
5553
run: yarn typecheck
5654

5755
- name: Build
5856
run: yarn build
59-

.yarn/releases/yarn-4.5.0.cjs

Lines changed: 0 additions & 925 deletions
This file was deleted.

.yarn/releases/yarn-4.9.1.cjs

Lines changed: 948 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
nodeLinker: node-modules
22

3-
yarnPath: .yarn/releases/yarn-4.5.0.cjs
3+
yarnPath: .yarn/releases/yarn-4.9.1.cjs

apps/medusa/package.json

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -32,34 +32,29 @@
3232
"typecheck": "tsc --noEmit"
3333
},
3434
"dependencies": {
35-
"@lambdacurry/medusa-product-reviews": "1.2.0",
36-
"@medusajs/admin-sdk": "2.7.0",
37-
"@medusajs/cli": "2.7.0",
38-
"@medusajs/framework": "2.7.0",
39-
"@medusajs/js-sdk": "2.7.0",
40-
"@medusajs/medusa": "2.7.0",
41-
"@medusajs/types": "2.7.0",
42-
"@mikro-orm/core": "6.4.3",
43-
"@mikro-orm/knex": "6.4.3",
44-
"@mikro-orm/migrations": "6.4.3",
45-
"@mikro-orm/postgresql": "6.4.3",
46-
"awilix": "^8.0.1",
47-
"pg": "^8.13.0"
35+
"@lambdacurry/medusa-product-reviews": "1.3.1",
36+
"@medusajs/admin-sdk": "2.13.1",
37+
"@medusajs/cli": "2.13.1",
38+
"@medusajs/framework": "2.13.1",
39+
"@medusajs/icons": "2.13.1",
40+
"@medusajs/js-sdk": "2.13.1",
41+
"@medusajs/medusa": "2.13.1",
42+
"@medusajs/types": "2.13.1",
43+
"@medusajs/ui": "4.1.1",
44+
"posthog-node": "5.11.0",
45+
"react": "18.3.1",
46+
"react-dom": "18.3.1"
4847
},
4948
"devDependencies": {
50-
"@medusajs/test-utils": "2.7.0",
51-
"@mikro-orm/cli": "6.4.3",
52-
"@mikro-orm/core": "6.4.3",
53-
"@mikro-orm/migrations": "6.4.3",
54-
"@mikro-orm/postgresql": "6.4.3",
55-
"@stdlib/number-float64-base-normalize": "0.0.8",
56-
"@swc/core": "1.5.7",
49+
"@medusajs/test-utils": "2.13.1",
50+
"@swc/core": "^1.7.28",
5751
"@swc/jest": "^0.2.36",
5852
"@types/express": "^4.17.13",
5953
"@types/jest": "^29.5.12",
6054
"@types/mime": "1.3.5",
6155
"@types/node": "^17.0.8",
6256
"@types/react": "^18.3.2",
57+
"@types/react-dom": "^18",
6358
"jest": "^29.7.0",
6459
"prop-types": "^15.8.1",
6560
"ts-node": "^10.9.2",

apps/storefront/app/components/layout/footer/Footer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const Footer = () => {
2323
const { region } = useRegion();
2424

2525
const regionOptions = useMemo(() => {
26-
return regions.map((region) => ({
26+
return (regions ?? []).map((region) => ({
2727
label: `${region.name} (${region.currency_code})`,
2828
value: region.id,
2929
}));
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
import type { SiteDetailsRootData } from '@libs/types';
12
import { useRootLoaderData } from './useRootLoaderData';
23

34
export const useSiteDetails = () => {
45
const data = useRootLoaderData();
56

6-
return data.siteDetails || {};
7+
return data?.siteDetails ?? ({} as SiteDetailsRootData);
78
};

apps/storefront/libs/util/products.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ export const getProductMeta: MetaFunction = ({ data, matches }) => {
284284
const ogDescription = description;
285285
const ogImage = product.thumbnail || product.images?.[0]?.url;
286286
const ogImageAlt = !!ogImage ? `${title} product thumbnail` : undefined;
287+
const currencyCode = region?.currency_code ?? 'usd';
287288

288289
return [
289290
{ title },
@@ -293,11 +294,11 @@ export const getProductMeta: MetaFunction = ({ data, matches }) => {
293294
{ property: 'og:image', content: ogImage },
294295
{ property: 'og:image:alt', content: ogImageAlt },
295296
{ property: 'og:type', content: 'product' },
296-
{ property: 'product:price:currency', content: region.currency_code },
297+
{ property: 'product:price:currency', content: currencyCode },
297298
{
298299
property: 'product:price:amount',
299300
content: formatPrice(getVariantFinalPrice(defaultVariant), {
300-
currency: region.currency_code,
301+
currency: currencyCode,
301302
}),
302303
},
303304
];

apps/storefront/libs/util/server/data/cart.server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ export const deleteLineItem = withAuthHeaders(async (request, authHeaders, lineI
144144
throw new Error('Missing cart ID when deleting line item');
145145
}
146146

147-
return await sdk.store.cart.deleteLineItem(cartId, lineId, authHeaders).catch(medusaError);
147+
return await sdk.store.cart.deleteLineItem(cartId, lineId, {}, authHeaders).catch(medusaError);
148148
});
149149

150150
export async function enrichLineItems(

apps/storefront/libs/util/server/data/product-reviews.server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export const reviewsFileUploadHandler = async (fileUpload: FileUpload) => {
5858

5959
// FileUpload objects are not meant to stick around for very long (they are
6060
// streaming data from the request.body); store them as soon as possible.
61-
await memoryStorage.set(storageKey, fileUpload);
61+
await memoryStorage.set(storageKey, fileUpload as unknown as File);
6262

6363
// Return a File for the FormData object. This is a LazyFile that knows how
6464
// to access the file's content if needed (using e.g. file.stream()) but

0 commit comments

Comments
 (0)