Skip to content

The complete open source platform to run your entire marketplace. Storefront, vendor panel, admin console, and integrations in one enterprise-grade platform you own.

fix(storefront): bump @mercurjs deps to 2.3.0 to fix hoisted stale types (#1393)

Viktor Holik813f6281d058
diff --git a/RELEASING.md b/RELEASING.md
index 111f8f49e..a3ae00ad3 100644
--- a/RELEASING.md
+++ b/RELEASING.md
@@ -41,6 +41,14 @@ When bumping the release version, bump these internal specifiers to the same
value. Only the dev-only, never-published workspaces (the repo-root
`package.json` and `apps/*`) may keep `workspace:*`.
+`apps/storefront` is the one exception among the apps: it pins exact
+`@mercurjs/*` versions rather than `workspace:*`, so both its own `version` and
+those specifiers **must** be bumped to the release version on every release too.
+If the specifiers lag behind (e.g. storefront stays on an older
+`@mercurjs/types`), the package manager pulls the stale published copy from npm
+and hoists it to the repo root, where `@mercurjs/core` resolves it and
+`medusa build` fails (see issue #1374).
+
## How to Release
### Stable Release
@@ -60,6 +68,7 @@ value. Only the dev-only, never-published workspaces (the repo-root
- `templates/basic/packages/api/package.json` — `@mercurjs/core`, `@mercurjs/types`, `@mercurjs/cli`
- `templates/basic/apps/admin/package.json` — `@mercurjs/admin`
- `templates/basic/apps/vendor/package.json` — `@mercurjs/vendor`
+ - `apps/storefront/package.json` — its own `version`, plus `@mercurjs/client`, `@mercurjs/types`
3. Refresh the lockfile so workspace versions match `package.json`:
@@ -103,6 +112,7 @@ Where `Z` is the next incremental number (0, 1, 2, ...).
- `templates/basic/packages/api/package.json` — `@mercurjs/core`, `@mercurjs/types`, `@mercurjs/cli`
- `templates/basic/apps/admin/package.json` — `@mercurjs/admin`
- `templates/basic/apps/vendor/package.json` — `@mercurjs/vendor`
+ - `apps/storefront/package.json` — its own `version`, plus `@mercurjs/client`, `@mercurjs/types`
3. Refresh the lockfile so workspace versions match `package.json`:
@@ -148,6 +158,7 @@ Where `Z` is the next incremental number (0, 1, 2, ...).
- `templates/basic/packages/api/package.json` — `@mercurjs/core`, `@mercurjs/types`, `@mercurjs/cli`
- `templates/basic/apps/admin/package.json` — `@mercurjs/admin`
- `templates/basic/apps/vendor/package.json` — `@mercurjs/vendor`
+ - `apps/storefront/package.json` — its own `version`, plus `@mercurjs/client`, `@mercurjs/types`
3. Refresh the lockfile so workspace versions match `package.json`:
diff --git a/apps/storefront/package.json b/apps/storefront/package.json
index 7b584b639..d1f547c59 100644
--- a/apps/storefront/package.json
+++ b/apps/storefront/package.json
@@ -1,6 +1,6 @@
{
"name": "@mercurjs/storefront",
- "version": "2.1.1",
+ "version": "2.3.0",
"private": true,
"scripts": {
"dev": "next dev --turbopack",
@@ -15,8 +15,8 @@
"@medusajs/medusa": "2.18.0",
"@medusajs/types": "2.18.0",
"@medusajs/ui": "^4.0.33",
- "@mercurjs/client": "2.2.0",
- "@mercurjs/types": "2.2.0",
+ "@mercurjs/client": "2.3.0",
+ "@mercurjs/types": "2.3.0",
"@stripe/react-stripe-js": "^3.7.0",
"@stripe/stripe-js": "^7.1.0",
"@talkjs/react": "^0.1.11",
diff --git a/bun.lock b/bun.lock
index ec61a28b5..804c7ef98 100644
--- a/bun.lock
+++ b/bun.lock
@@ -98,8 +98,8 @@
"@medusajs/medusa": "2.18.0",
"@medusajs/types": "2.18.0",
"@medusajs/ui": "^4.0.33",
- "@mercurjs/client": "2.2.0",
- "@mercurjs/types": "2.2.0",
+ "@mercurjs/client": "2.3.0",
+ "@mercurjs/types": "2.3.0",
"@stripe/react-stripe-js": "^3.7.0",
"@stripe/stripe-js": "^7.1.0",
"@talkjs/react": "^0.1.11",
@@ -5026,10 +5026,6 @@
"@mercurjs/storefront/@hookform/resolvers": ["@hookform/[email protected]", "", { "peerDependencies": { "react-hook-form": "^7.0.0" } }, "sha512-79Dv+3mDF7i+2ajj7SkypSKHhl1cbln1OGavqrsF7p6mbUv11xpqpacPsGDCTRvCSjEEIez2ef1NveSVL3b0Ag=="],
- "@mercurjs/storefront/@mercurjs/client": ["@mercurjs/[email protected]", "", { "dependencies": { "@tanstack/react-query": "^5.64.2", "qs": "^6.12.1" }, "peerDependencies": { "typescript": ">=4.8.0" } }, "sha512-/Zz6qRmVJmTlE/fmNGK042nzXsSL0f+DzX95XTXCBKx1K43ghUNm8gHuuVf3xd2OqMK8IWeJ0fdCmOTQ3jB51A=="],
-
- "@mercurjs/storefront/@mercurjs/types": ["@mercurjs/[email protected]", "", { "dependencies": { "@medusajs/types": "2.17.2" } }, "sha512-R4MDx3yXbQb/iuU1qNTtqPi+0t5kOnuGUGnDrVExchQ3qkSLMvg4GZYzDN3U8ld554Ik7y2Kdn0rxiDeT7mxbw=="],
-
"@mercurjs/storefront/@types/node": ["@types/[email protected]", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-ECymXOukMnOoVkC2bb1Vc/w/836DXncOg5m8Xj1RH7xSHZJWNYY6Zh7EH477vcnD5egKNNfy2RpNOmuChhFPgQ=="],
"@mercurjs/storefront/date-fns": ["[email protected]", "", {}, "sha512-+1UMbeh68lH1SegH83CGWwpb6OHHbpSgr3+s5Eww5M4CAgswBpoWS0AjTOfEJ33HiYKz1hdj/KTFprzXHmq/6w=="],