-
Notifications
You must be signed in to change notification settings - Fork 44
Upgrade Medusa to 2.13.1 and stabilize workspace #77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| nodeLinker: node-modules | ||
|
|
||
| yarnPath: .yarn/releases/yarn-4.5.0.cjs | ||
| yarnPath: .yarn/releases/yarn-4.9.1.cjs |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,8 @@ | ||
| import type { SiteDetailsRootData } from '@libs/types'; | ||
| import { useRootLoaderData } from './useRootLoaderData'; | ||
|
|
||
| export const useSiteDetails = () => { | ||
| const data = useRootLoaderData(); | ||
|
|
||
| return data.siteDetails || {}; | ||
| return data?.siteDetails ?? ({} as SiteDetailsRootData); | ||
| }; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,10 +22,67 @@ | |
| "node": ">=20" | ||
| }, | ||
| "resolutions": { | ||
| "@medusajs/js-sdk": "2.7.0", | ||
| "@medusajs/types": "2.7.0" | ||
| "@medusajs/admin-bundler": "2.13.1", | ||
| "@medusajs/admin-sdk": "2.13.1", | ||
| "@medusajs/admin-shared": "2.13.1", | ||
| "@medusajs/admin-vite-plugin": "2.13.1", | ||
| "@medusajs/api-key": "2.13.1", | ||
| "@medusajs/auth": "2.13.1", | ||
| "@medusajs/auth-emailpass": "2.13.1", | ||
| "@medusajs/auth-github": "2.13.1", | ||
| "@medusajs/auth-google": "2.13.1", | ||
| "@medusajs/cache-inmemory": "2.13.1", | ||
| "@medusajs/cache-redis": "2.13.1", | ||
| "@medusajs/caching-redis": "2.13.1", | ||
| "@medusajs/cart": "2.13.1", | ||
| "@medusajs/cli": "2.13.1", | ||
| "@medusajs/core-flows": "2.13.1", | ||
| "@medusajs/currency": "2.13.1", | ||
| "@medusajs/customer": "2.13.1", | ||
| "@medusajs/event-bus-local": "2.13.1", | ||
| "@medusajs/event-bus-redis": "2.13.1", | ||
| "@medusajs/file": "2.13.1", | ||
| "@medusajs/file-local": "2.13.1", | ||
| "@medusajs/file-s3": "2.13.1", | ||
| "@medusajs/framework": "2.13.1", | ||
| "@medusajs/fulfillment": "2.13.1", | ||
| "@medusajs/fulfillment-manual": "2.13.1", | ||
| "@medusajs/icons": "2.13.1", | ||
| "@medusajs/index": "2.13.1", | ||
| "@medusajs/inventory": "2.13.1", | ||
| "@medusajs/js-sdk": "2.13.1", | ||
| "@medusajs/link-modules": "2.13.1", | ||
| "@medusajs/locking": "2.13.1", | ||
| "@medusajs/locking-postgres": "2.13.1", | ||
| "@medusajs/locking-redis": "2.13.1", | ||
| "@medusajs/medusa": "2.13.1", | ||
| "@medusajs/modules-sdk": "2.13.1", | ||
| "@medusajs/notification": "2.13.1", | ||
| "@medusajs/notification-local": "2.13.1", | ||
| "@medusajs/notification-sendgrid": "2.13.1", | ||
| "@medusajs/orchestration": "2.13.1", | ||
| "@medusajs/order": "2.13.1", | ||
| "@medusajs/payment": "2.13.1", | ||
| "@medusajs/pricing": "2.13.1", | ||
| "@medusajs/product": "2.13.1", | ||
| "@medusajs/promotion": "2.13.1", | ||
| "@medusajs/region": "2.13.1", | ||
| "@medusajs/sales-channel": "2.13.1", | ||
| "@medusajs/stock-location": "2.13.1", | ||
| "@medusajs/store": "2.13.1", | ||
| "@medusajs/tax": "2.13.1", | ||
| "@medusajs/telemetry": "2.13.1", | ||
| "@medusajs/types": "2.13.1", | ||
| "@medusajs/user": "2.13.1", | ||
| "@medusajs/utils": "2.13.1", | ||
| "@medusajs/workflow-engine-inmemory": "2.13.1", | ||
| "@medusajs/workflow-engine-redis": "2.13.1", | ||
| "@medusajs/workflows-sdk": "2.13.1", | ||
| "zod": "3.25.76", | ||
| "react": "^19.2.3", | ||
| "react-dom": "^19.2.3" | ||
|
Comment on lines
+82
to
+83
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "=== Declared React versions in manifests ==="
for file in package.json apps/medusa/package.json apps/storefront/package.json; do
if [ -f "$file" ]; then
name=$(jq -r '.name' "$file" 2>/dev/null || echo "unknown")
react=$(jq -r '.dependencies.react // "n/a"' "$file" 2>/dev/null || echo "error")
react_dom=$(jq -r '.dependencies["react-dom"] // "n/a"' "$file" 2>/dev/null || echo "error")
echo "$file ($name): react=$react, react-dom=$react_dom"
fi
done
echo
echo "=== Root resolutions for React ==="
if [ -f package.json ]; then
jq -r '.resolutions | keys[] as $k | "\($k)=\(.[$k])"' package.json 2>/dev/null | grep -E "react"
fi
echo
echo "=== Resolved React entries in yarn.lock (first 20 matches) ==="
if [ -f yarn.lock ]; then
rg -n '^"(react|react-dom)@' yarn.lock -A 1 | head -40
fiRepository: lambda-curry/medusa2-starter Length of output: 543 Root React resolutions override workspace package declarations, forcing React 19.2.3+ on apps/medusa which explicitly requires React 18.3.1. The root-level Either align resolutions with workspace requirements, remove the global override, or upgrade apps/medusa to React 19 if compatible. 🤖 Prompt for AI Agents |
||
| }, | ||
| "packageManager": "yarn@4.5.0", | ||
| "packageManager": "yarn@4.9.1", | ||
| "workspaces": [ | ||
| "apps/*", | ||
| "packages/*" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: lambda-curry/medusa2-starter
Length of output: 117
🏁 Script executed:
Repository: lambda-curry/medusa2-starter
Length of output: 99
🏁 Script executed:
Repository: lambda-curry/medusa2-starter
Length of output: 99
🏁 Script executed:
Repository: lambda-curry/medusa2-starter
Length of output: 99
🏁 Script executed:
Repository: lambda-curry/medusa2-starter
Length of output: 378
🏁 Script executed:
Repository: lambda-curry/medusa2-starter
Length of output: 711
🏁 Script executed:
Repository: lambda-curry/medusa2-starter
Length of output: 5497
🏁 Script executed:
Repository: lambda-curry/medusa2-starter
Length of output: 2372
🏁 Script executed:
Repository: lambda-curry/medusa2-starter
Length of output: 152
🏁 Script executed:
Repository: lambda-curry/medusa2-starter
Length of output: 2275
Remove unsafe empty-object cast and return data?.siteDetails directly.
The cast
({} as SiteDetailsRootData)suppresses type checks. An empty object doesn't provide the required fields (store,settings,headerNavigationItems,footerNavigationItems), yet three of four consumers destructure these fields without null guards:HeaderSideNav.tsx: destructuresheaderNavigationItemsdirectlyHeader.tsx: destructuresheaderNavigationItemsdirectlyFooter.tsx: destructuresfooterNavigationItemsandsettingsdirectlyLogoStoreName.tsx: includes defensiveif (!store || !settings) return null;If the fallback is triggered, these consumers will attempt to use undefined values, causing runtime crashes. The root loader already guarantees
siteDetailsis populated, so the fallback is unnecessary. Returndata?.siteDetailsto fail fast if absent and let callers handle optional chaining where needed.🤖 Prompt for AI Agents