@shopbite-de/storefront 2.2.1 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/.github/workflows/build.yaml +2 -2
  2. package/.github/workflows/ci.yaml +11 -11
  3. package/.nuxtrc +1 -1
  4. package/CLAUDE.md +13 -7
  5. package/app/app.vue +10 -7
  6. package/app/components/Address/Fields.vue +1 -2
  7. package/app/components/Category/Breadcrumb.vue +9 -10
  8. package/app/components/Checkout/Summary.vue +27 -2
  9. package/app/components/Header.vue +6 -2
  10. package/app/components/Menu/BonCard.vue +1 -2
  11. package/app/components/Order/Confirmation.vue +1 -2
  12. package/app/components/Product/QuickView.vue +1 -2
  13. package/app/composables/useBusinessHours.ts +35 -14
  14. package/app/composables/useHolidays.ts +31 -11
  15. package/app/composables/useHomeMenuCategories.ts +6 -34
  16. package/app/composables/useLiveShopData.ts +17 -0
  17. package/app/composables/useNavigation.ts +14 -66
  18. package/app/composables/useNavigationSearch.ts +8 -31
  19. package/app/composables/useRestaurantSchema.ts +2 -13
  20. package/app/composables/useSeoUrlRoute.ts +21 -0
  21. package/app/composables/useShopBiteConfig.ts +50 -6
  22. package/app/composables/useTopSellers.ts +2 -43
  23. package/app/error.vue +4 -0
  24. package/docs/notes/2026-09-10-issue-275-accessibility.md +2 -2
  25. package/docs/notes/2026-09-12-issue-327-home-hero.md +1 -1
  26. package/docs/notes/2026-09-13-issue-332-home-info-cards.md +1 -3
  27. package/docs/notes/2026-09-21-issue-273-cache-and-demo-video.md +1 -1
  28. package/docs/notes/2026-09-21-issue-363-non-fatal-404.md +1 -1
  29. package/docs/notes/2026-09-23-issue-388-home-sections.md +2 -2
  30. package/docs/notes/2026-10-05-issue-401-restaurant-schema-ordering.md +1 -1
  31. package/docs/notes/2026-11-18-dependency-update.md +118 -0
  32. package/modules/theme.ts +1 -1
  33. package/node.dockerfile +7 -7
  34. package/nuxt.config.ts +22 -1
  35. package/package.json +40 -40
  36. package/pnpm-workspace.yaml +0 -2
  37. package/server/api/_cache/purge.post.ts +6 -3
  38. package/server/api/breadcrumb/[categoryId].get.ts +31 -0
  39. package/server/api/navigation/[type].get.ts +97 -0
  40. package/server/api/payment-methods.get.ts +29 -0
  41. package/server/api/seo-url/index.get.ts +17 -0
  42. package/server/api/seo-url/known.get.ts +33 -0
  43. package/server/api/shopbite/business-hours.get.ts +22 -0
  44. package/server/api/shopbite/config.get.ts +6 -0
  45. package/server/api/shopbite/holidays.get.ts +20 -0
  46. package/server/api/top-sellers.get.ts +59 -0
  47. package/server/plugins/ai-crawlers.ts +1 -1
  48. package/server/plugins/site-url.ts +2 -2
  49. package/server/routes/llms.txt.ts +6 -2
  50. package/server/utils/backoff.ts +67 -0
  51. package/server/utils/cachePurge.ts +45 -12
  52. package/server/utils/menuRoot.ts +24 -18
  53. package/server/utils/seoPaths.ts +130 -0
  54. package/server/utils/seoUrlCache.ts +98 -0
  55. package/server/utils/shopBiteConfig.ts +30 -0
  56. package/server/utils/storeApi.ts +25 -1
  57. package/test/a11y/presets.test.ts +3 -1
  58. package/test/layer/nuxt.config.ts +1 -1
  59. package/test/nuxt/CheckoutOnePage.test.ts +2 -0
  60. package/test/nuxt/CheckoutSummary.test.ts +38 -2
  61. package/test/nuxt/HeaderFooterPreset.test.ts +13 -4
  62. package/test/nuxt/liveShopData.test.ts +114 -0
  63. package/test/nuxt/useShopBiteConfig.test.ts +22 -0
  64. package/test/nuxt/useTopSellers.test.ts +10 -27
  65. package/test/unit/cachePurge.spec.ts +41 -0
  66. package/test/unit/layoutCacheRoutes.spec.ts +566 -0
  67. package/test/unit/nitroStubs.ts +99 -0
  68. package/test/unit/seoPaths.spec.ts +117 -0
  69. package/patches/@shopware__nuxt-module@1.5.2.patch +0 -13
@@ -9,41 +9,16 @@ export interface NavigationMenuItem {
9
9
  children?: NavigationMenuItem[];
10
10
  }
11
11
 
12
- export function useNavigation(withChildren: boolean | undefined) {
13
- const { apiClient } = useShopwareContext();
14
- const menuRootId = useMenuRootId();
15
-
16
- // Sent as a POST body: as `_criteria` query parameters the projection is
17
- // ignored and every category arrives with media, translations, cms page
18
- // and more (#312).
19
- const criteria = {
20
- includes: {
21
- category: [
22
- "id",
23
- "name",
24
- "translated",
25
- "seoUrl",
26
- "customFields",
27
- "children",
28
- "linkNewTab",
29
- ],
30
- },
31
- };
12
+ /** Loads a navigation from the server cache (server/api/navigation). */
13
+ const fetchNavigation = (type: "main" | "footer" | "menu") =>
14
+ $fetch<Schemas["Category"][]>(`/api/navigation/${type}`);
32
15
 
33
- const { data: mainNavigation } = useAsyncData("main-navigation", async () => {
34
- const response = await apiClient.invoke(
35
- "readNavigation post /navigation/{activeId}/{rootId}",
36
- {
37
- body: criteria,
38
- pathParams: {
39
- activeId: "main-navigation",
40
- rootId: "main-navigation",
41
- },
42
- },
43
- );
44
-
45
- return response.data;
46
- });
16
+ export function useNavigation(withChildren: boolean | undefined) {
17
+ // Every page renders these, a 404 too: the server keeps them
18
+ // (server/api/navigation) instead of asking Shopware per request.
19
+ const { data: mainNavigation } = useAsyncData("main-navigation", () =>
20
+ fetchNavigation("main"),
21
+ );
47
22
 
48
23
  const mapCategoryToMenuItem = (
49
24
  category: Schemas["Category"],
@@ -65,22 +40,8 @@ export function useNavigation(withChildren: boolean | undefined) {
65
40
  return mainNavigation.value?.map(mapCategoryToMenuItem);
66
41
  });
67
42
 
68
- const { data: footerNavigation } = useAsyncData(
69
- "footer-navigation",
70
- async () => {
71
- const response = await apiClient.invoke(
72
- "readNavigation post /navigation/{activeId}/{rootId}",
73
- {
74
- body: criteria,
75
- pathParams: {
76
- activeId: "footer-navigation",
77
- rootId: "footer-navigation",
78
- },
79
- },
80
- );
81
-
82
- return response.data;
83
- },
43
+ const { data: footerNavigation } = useAsyncData("footer-navigation", () =>
44
+ fetchNavigation("footer"),
84
45
  );
85
46
 
86
47
  const footerMenu = computed<NavigationMenuItem[]>(() => {
@@ -89,22 +50,9 @@ export function useNavigation(withChildren: boolean | undefined) {
89
50
  return footerNavigation.value?.map(mapCategoryToMenuItem);
90
51
  });
91
52
 
92
- const { data: menuCardNavigation } = useAsyncData(
93
- "menu-category",
94
- async () => {
95
- const response = await apiClient.invoke(
96
- "readNavigation post /navigation/{activeId}/{rootId}",
97
- {
98
- body: criteria,
99
- pathParams: {
100
- activeId: "main-navigation",
101
- rootId: await menuRootId(),
102
- },
103
- },
104
- );
105
-
106
- return response.data;
107
- },
53
+ // The menu sections below the menu root (#486, resolved on the server).
54
+ const { data: menuCardNavigation } = useAsyncData("menu-category", () =>
55
+ fetchNavigation("menu"),
108
56
  );
109
57
 
110
58
  const menuCardMenu = computed<NavigationMenuItem[]>(() => {
@@ -1,6 +1,5 @@
1
- import { useSessionContext, useShopwareContext } from "#imports";
1
+ import { useSessionContext } from "#imports";
2
2
  import type { Schemas } from "#shopware";
3
- import { encodeForQuery } from "@shopware/api-client/helpers";
4
3
 
5
4
  export type UseNavigationSearchReturn = {
6
5
  /**
@@ -16,7 +15,6 @@ export type UseNavigationSearchReturn = {
16
15
  * @category Navigation & Routing
17
16
  */
18
17
  export function useNavigationSearch(): UseNavigationSearchReturn {
19
- const { apiClient } = useShopwareContext();
20
18
  const { sessionContext } = useSessionContext();
21
19
 
22
20
  async function resolvePath(path: string): Promise<Schemas["SeoUrl"] | null> {
@@ -31,35 +29,14 @@ export function useNavigationSearch(): UseNavigationSearchReturn {
31
29
  } as Schemas["SeoUrl"];
32
30
  }
33
31
 
34
- const isTechnicalUrl =
35
- path.startsWith("/navigation/") ||
36
- path.startsWith("/detail/") ||
37
- path.startsWith("/landingPage/");
32
+ // Matches are cached on the server (server/api/seo-url), so a menu
33
+ // section does not ask Shopware for its SEO URL on every request.
34
+ const { seoUrl } = await $fetch<{ seoUrl: Schemas["SeoUrl"] | null }>(
35
+ "/api/seo-url",
36
+ { query: { path } },
37
+ );
38
38
 
39
- // remove leading slash in case of seo url or remove trailing slash in case of technical url
40
- const normalizedPath = isTechnicalUrl
41
- ? path.endsWith("/")
42
- ? path.slice(0, -1)
43
- : path
44
- : path.substring(1);
45
-
46
- const criteria = encodeForQuery({
47
- filter: [
48
- {
49
- type: "equals",
50
- field: isTechnicalUrl ? "pathInfo" : "seoPathInfo",
51
- value: normalizedPath,
52
- },
53
- ],
54
- });
55
-
56
- const seoResult = await apiClient.invoke("readSeoUrlGet get /seo-url", {
57
- query: {
58
- _criteria: criteria,
59
- },
60
- });
61
-
62
- return seoResult.data.elements?.[0] ?? null;
39
+ return seoUrl;
63
40
  }
64
41
 
65
42
  return {
@@ -18,24 +18,13 @@ export function useRestaurantSchema() {
18
18
  const { menuCardMenu } = useNavigation(true);
19
19
  const { isCheckoutEnabled } = useShopBiteConfig();
20
20
  const { currencyCode } = useCommercePrice();
21
- const { apiClient } = useShopwareContext();
22
21
 
22
+ // Cached on the server (server/api/payment-methods).
23
23
  const { data: paymentMethods } = useAsyncData(
24
24
  "restaurant-schema-payment-methods",
25
25
  async () => {
26
26
  try {
27
- const { data } = await apiClient.invoke(
28
- "readPaymentMethod post /payment-method",
29
- {
30
- body: {
31
- onlyAvailable: true,
32
- includes: { payment_method: ["name", "translated"] },
33
- },
34
- },
35
- );
36
- return (data.elements ?? []).map(
37
- (method) => method.translated?.name ?? method.name,
38
- );
27
+ return await $fetch<string[]>("/api/payment-methods");
39
28
  } catch (error) {
40
29
  console.error("Failed to load payment methods", error);
41
30
  return [];
@@ -29,6 +29,15 @@ export async function useSeoUrlRoute() {
29
29
  };
30
30
  }
31
31
 
32
+ // A path no category ever had (a scanner probing `/wp-admin/`) is
33
+ // answered from the server's list of SEO paths, not by four lookups.
34
+ if (import.meta.server && !(await mayBeSeoPath(routePath))) {
35
+ throw createError({
36
+ statusCode: 404,
37
+ statusMessage: `No data fetched from API for ${routePath}`,
38
+ });
39
+ }
40
+
32
41
  const { match, redirectPath } = await resolveSeoPath(
33
42
  routePath,
34
43
  resolveCategoryPath,
@@ -57,6 +66,18 @@ export async function useSeoUrlRoute() {
57
66
  );
58
67
  }
59
68
 
69
+ async function mayBeSeoPath(path: string): Promise<boolean> {
70
+ if (path === "/") return true;
71
+ try {
72
+ const { known } = await $fetch<{ known: boolean }>("/api/seo-url/known", {
73
+ query: { path },
74
+ });
75
+ return known;
76
+ } catch {
77
+ return true;
78
+ }
79
+ }
80
+
60
81
  async function resolveCategoryPath(
61
82
  path: string,
62
83
  ): Promise<Schemas["SeoUrl"] | null> {
@@ -1,14 +1,58 @@
1
+ import type { Schemas } from "#shopware";
2
+
3
+ export const SHOPBITE_CONFIG_KEY = "shopbite-config";
4
+
5
+ type ApiClient = ReturnType<typeof useShopwareContext>["apiClient"];
6
+
7
+ /**
8
+ * The plugin configuration: from the server's short-lived cache
9
+ * (`/api/shopbite/config`, `cacheTtl.config`) for server-side rendering,
10
+ * from Shopware in the browser. The plugin does not enforce the checkout
11
+ * switch itself, so the browser's value must be fresh: app.vue reloads it
12
+ * after hydration (useLiveShopData), the checkout every 10 s.
13
+ */
14
+ export async function loadShopBiteConfig(
15
+ apiClient: ApiClient,
16
+ fromServerCache: boolean,
17
+ retryDelays: readonly number[] = OPENING_HOURS_RETRY_DELAYS,
18
+ ): Promise<Schemas["ShopBiteConfig"]> {
19
+ if (fromServerCache) {
20
+ return await $fetch<Schemas["ShopBiteConfig"]>("/api/shopbite/config");
21
+ }
22
+ // retried in the browser like the opening hours (#355)
23
+ const { data } = await withRetries(
24
+ () => apiClient.invoke("shopbite.config.get get /shopbite/config"),
25
+ retryDelays,
26
+ );
27
+ return data;
28
+ }
29
+
1
30
  export function useShopBiteConfig() {
2
31
  const { apiClient } = useShopwareContext();
3
32
 
4
- const { data, refresh } = useAsyncData("shopbite-config", async () => {
5
- const { data } = await apiClient.invoke(
6
- "shopbite.config.get get /shopbite/config",
7
- );
8
- return data;
9
- });
33
+ const { data, refresh } = useAsyncData(SHOPBITE_CONFIG_KEY, () =>
34
+ loadShopBiteConfig(apiClient, import.meta.server),
35
+ );
36
+
37
+ /**
38
+ * Asks Shopware (never the server cache) right before an order: the
39
+ * plugin does not refuse orders itself, so the checkout must not act on
40
+ * a value from the server render. `null` when it cannot be checked.
41
+ */
42
+ async function checkCheckoutEnabled(
43
+ retryDelays?: readonly number[],
44
+ ): Promise<boolean | null> {
45
+ try {
46
+ data.value = await loadShopBiteConfig(apiClient, false, retryDelays);
47
+ } catch (error) {
48
+ console.error("[checkout][checkCheckoutEnabled]", error);
49
+ return null;
50
+ }
51
+ return data.value?.isCheckoutEnabled ?? false;
52
+ }
10
53
 
11
54
  return {
55
+ checkCheckoutEnabled,
12
56
  deliveryTime: computed(() => data.value?.deliveryTime ?? 30),
13
57
  isCheckoutEnabled: computed(() => data.value?.isCheckoutEnabled ?? false),
14
58
  refresh,
@@ -4,52 +4,11 @@ export type useTopSellersReturn = {
4
4
  loadTopSellers(): Promise<Schemas["Product"][]>;
5
5
  };
6
6
 
7
- const TOP_SELLERS_LIMIT = 8;
8
-
9
7
  export function useTopSellers(): useTopSellersReturn {
10
- const { apiClient } = useShopwareContext();
11
8
  async function loadTopSellers() {
12
9
  try {
13
- const result = await apiClient.invoke("readProduct post /product", {
14
- // Variants marked as top sellers inherit name, cover and properties.
15
-
16
- // @ts-expect-error sw-inheritance is missing from the generated header type
17
- headers: { "sw-inheritance": "true", "sw-include-seo-urls": "true" },
18
- body: {
19
- filter: [{ type: "equals", field: "markAsTopseller", value: true }],
20
- limit: TOP_SELLERS_LIMIT,
21
- // What the compact card and the quick view need (#327).
22
- includes: {
23
- product: [
24
- "id",
25
- "productNumber",
26
- "name",
27
- "translated",
28
- "description",
29
- "calculatedPrice",
30
- "available",
31
- "cover",
32
- "sortedProperties",
33
- // Allergens checked (#485); includes filter `translated` as well,
34
- // so custom fields only come back when listed here.
35
- "customFields",
36
- // Card link to the quick view deep link (#289).
37
- "seoUrls",
38
- ],
39
- seo_url: ["seoPathInfo", "isCanonical"],
40
- product_media: ["media"],
41
- media: ["url", "thumbnails"],
42
- media_thumbnail: ["width", "url"],
43
- property_group: ["id", "name", "translated", "options"],
44
- property_group_option: ["id", "name", "translated", "customFields"],
45
- },
46
- associations: {
47
- cover: { associations: { media: {} } },
48
- properties: { associations: { group: {} } },
49
- },
50
- },
51
- });
52
- return result.data.elements;
10
+ // Cached on the server like the listings (server/api/top-sellers).
11
+ return await $fetch<Schemas["Product"][]>("/api/top-sellers");
53
12
  } catch (e) {
54
13
  console.error("[useTopSellers][loadTopSellers]", e);
55
14
  return [];
package/app/error.vue CHANGED
@@ -13,6 +13,10 @@ const pageTitle = computed(() => `${statusCode} | ${site?.name}`);
13
13
 
14
14
  console.error(props.error);
15
15
 
16
+ // error.vue replaces app.vue: load the checkout switch, hours and closing
17
+ // days from Shopware after hydration here as well (useLiveShopData).
18
+ useLiveShopData();
19
+
16
20
  const statusCode = props.error.statusCode;
17
21
 
18
22
  useSeoMeta({
@@ -25,7 +25,7 @@ So the storefront default and both demos fail in light mode as well; nobody had
25
25
  - Contrast: Nuxt UI convention. `--ui-primary` is `brand-600` in light mode and `brand-400` in dark mode; the storefront's own `brand-600` becomes `#c23d00` (5.30 on white, 4.59 on its tint). `--ui-success` is `green-800` light / `green-400` dark. Rule for demos: `brand-600` ≥ 5:1 on white (covers the tint), `brand-400` ≥ 4.5:1 on `#171717`.
26
26
  - Toast proxies: instead of patching `reka-ui` (tried first: a pnpm patch of `dist/Toast/FocusProxy.{js,cjs}` without `aria-hidden` cleared the audit), the **status toasts are gone**. A permanent "closed" toast was a misuse of a transient notification; the status is now a line above the opening hours in the footer (`components/Footer/StoreStatus.vue`, `useStoreStatus`). A chip next to the logo was tried first: on phones only the dot fit, on the desktop the text ran into the navigation, and inside the logo link it broke the link's accessible name. Transient toasts stay on Nuxt UI; their proxies only exist for seconds. Upstream issue for the proxy still worth filing.
27
27
  - The status line is client only (`ClientOnly` with a placeholder of the same size): the open/closed state depends on the current time, and the server's clock/time zone is not the shop's. Server-rendered status would need a configured time zone; separate issue if wanted.
28
- - La Fattoria keeps its own `main.css`; the same `--ui-primary` and `--ui-success` changes went there as veliu/pizzerialafattoria#346.
28
+ - La Fattoria keeps its own `main.css`; the same `--ui-primary` and `--ui-success` changes went there.
29
29
 
30
30
  ## Implementation
31
31
 
@@ -34,7 +34,7 @@ So the storefront default and both demos fail in light mode as well; nobody had
34
34
  - `useStoreStatus`: open → closing time of the current interval; closed → `getNextOpeningTime`. Refreshes the clock every minute. `app.vue` keeps loading business hours and holidays on mount but no longer shows toasts.
35
35
  - `Footer/StoreStatus.vue`: "Geöffnet bis 23:00 Uhr" or "Geschlossen, wir öffnen wieder …", no link (the old toast's "Zur Speisekarte" action was dropped on purpose). `role="status"`, placeholder of the same height while unknown.
36
36
  - `--ui-text-muted` in light mode is `#6b6b6b` (was `#737373`, 4.38:1 on `--ui-bg-elevated`, the header navigation background). `UHeader` gets `:title="site.name"`: Nuxt UI's default made the logo link read "Nuxt UI".
37
- - Docs: contrast rule in `homepage/content/{de,en}/docs/8.storefront/2.configuration.md` and the demo-shop checklist in the root `CLAUDE.md`.
37
+ - Docs: contrast rule in https://shopbite.de/docs/storefront/configuration (DE/EN) and the demo-shop checklist in the root `CLAUDE.md`.
38
38
 
39
39
  ## Not covered
40
40
 
@@ -40,7 +40,7 @@ top sellers as a horizontal scroller.
40
40
  sellers carry the parent's name and cover (La Fattoria marks both the
41
41
  parent "Cordon Bleu" and its three variants; the header type of the
42
42
  generated operation lacks `sw-inheritance`, hence the `@ts-expect-error`).
43
- - Homepage docs (`content/{de,en}/docs/8.storefront/3.content.md`)
43
+ - Docs (https://shopbite.de/docs/storefront/content, DE/EN)
44
44
  describe `hero.title`, the status line, the link order and the top
45
45
  sellers.
46
46
 
@@ -31,9 +31,7 @@ A (three cards with a bold lead, detail text and one action) vs. B
31
31
  - Demo content: the three entries carry `kind`, the hours description
32
32
  keeps only the exceptions (Saturday, closed Tuesday), the reservation
33
33
  card gets a call button.
34
- - Homepage docs (`content/{de,en}/docs/8.storefront/3.content.md`,
35
- branch `docs/storefront-info-cards` stacked on
36
- `docs/storefront-hero-title`).
34
+ - Docs: https://shopbite.de/docs/storefront/content (DE/EN).
37
35
 
38
36
  ## Verification
39
37
 
@@ -6,7 +6,7 @@ Follow-up to `2026-09-10-issue-273-performance-media.md` (PR #308).
6
6
 
7
7
  - Object storage media (demo and La Fattoria) send
8
8
  `public, max-age=31536000, immutable`: done on the buckets.
9
- - Homepage docs cover poster, video size, thumbnails and the bucket header.
9
+ - The docs on shopbite.de cover poster, video size, thumbnails and the bucket header.
10
10
  - Remaining requests without a useful cache lifetime on demo.shopbite.de:
11
11
  - files from `public/` (`/hero-poster.webp`, `/favicon.ico`, `/light/Logo.png`):
12
12
  no `Cache-Control` at all. Nitro only adds one for public asset dirs with
@@ -14,7 +14,7 @@ Container logs in OpenObserve (`docker_logs`, 2026-09-19 to 2026-09-21):
14
14
  | ----------------------- | ------------------------- |
15
15
  | `lafattoria-storefront` | ~2,500 |
16
16
  | `shopbite-storefront` | 565 |
17
- | `shopbite-homepage` | 423 (same pattern, own repo) |
17
+ | shopbite.de website | 423 (same pattern) |
18
18
 
19
19
  `fatal` cannot simply be dropped: Nuxt's root component
20
20
  (`nuxt/dist/app/components/nuxt-root.vue`, `onErrorCaptured`) shows the error
@@ -30,13 +30,13 @@ demos (`leads/demo_create.py` in the monorepo) made the sameness obvious.
30
30
  title, description; all optional, German defaults in the components),
31
31
  `gallery` optional. Existing `index.yml` files keep working; an old
32
32
  `marquee` block is ignored by Zod.
33
- - Homepage docs (`content/{de,en}/docs/8.storefront/3.content.md`).
33
+ - Docs: https://shopbite.de/docs/storefront/content (DE/EN).
34
34
 
35
35
  ## Verification
36
36
 
37
37
  - `HomeMenuCategories.test.ts`: tiles with photo/icon, cap and "all" tile,
38
38
  empty state. Prettier, ESLint, typecheck and the unit suite pass.
39
- - Production build against a lead demo channel (Da Piero): tiles show the
39
+ - Production build against a demo sales channel: tiles show the
40
40
  category photos, the grid the eight top sellers, quick view opens.
41
41
 
42
42
  ## Follow-ups
@@ -18,4 +18,4 @@ As of 2026-10-05, branch `feature/401-restaurant-schema-ordering`. Part of the A
18
18
 
19
19
  Production build against the demo backend with the new env variables: the home page `Restaurant` node carries `geo`, both delivery areas, `acceptsReservations: true`, `paymentAccepted: "Nachnahme"`, `currenciesAccepted: "EUR"` and the `OrderAction` with pickup and own delivery. Without the new variables only `paymentAccepted`, `currenciesAccepted` and `potentialAction` (without `deliveryMethod`) are added. Unit + nuxt tests, typecheck, ESLint green.
20
20
 
21
- Docs: homepage branch `docs/401-restaurant-schema-ordering` (configuration page, DE/EN), including the note that `NUXT_PUBLIC_SITE_CUISINE` is a cuisine name: La Fattoria sets `italienische`, which produces "italienische in Obertshausen" in its meta description.
21
+ Docs: https://shopbite.de/docs/storefront/configuration (DE/EN), including the note that `NUXT_PUBLIC_SITE_CUISINE` is a cuisine name: La Fattoria sets `italienische`, which produces "italienische in Obertshausen" in its meta description.
@@ -0,0 +1,118 @@
1
+ # Dependency update — 2026-11-18
2
+
3
+ Branch `deps-2026-11-18`. Previous round:
4
+ `2026-09-21-dependency-update.md`.
5
+
6
+ ## Packages
7
+
8
+ Minor and patch updates of every direct dependency (one commit), then each
9
+ major on its own:
10
+
11
+ | Package | From | To |
12
+ | --- | --- | --- |
13
+ | pnpm | 12.11.2 | 12.21.0 |
14
+ | nuxt | 4.6.2 | 4.6.4 |
15
+ | @nuxt/content | 3.16.2 | 3.17.0 |
16
+ | @shopware/api-client | 1.7.0 | 1.8.0 |
17
+ | @shopware/composables | 1.14.0 | 1.15.0 |
18
+ | @shopware/nuxt-module | 1.5.2 | 1.6.1 |
19
+ | eslint / typescript-eslint / vitest / prettier | | latest minor |
20
+ | happy-dom | 20.14.6 | 21.0.4 (major) |
21
+ | jsdom | 30.1.3 | 31.0.1 (major) |
22
+ | @nuxt/fonts | 0.14.0 | 1.2.0 (major) |
23
+ | @nuxtjs/sitemap | 8.6.2 | 9.1.0 (major) |
24
+ | @nuxtjs/robots | 6.2.4 | 7.0.2 (major) |
25
+ | nuxt-vitalizer | 3.0.0 | 4.0.0 (major) |
26
+ | @vite-pwa/nuxt | 1.1.1 | 2.0.1 (major) |
27
+ | Node (Docker image, CI) | 24 | 26 (LTS since 2026-10-28) |
28
+
29
+ Held back:
30
+
31
+ - **typescript 7**: typescript-eslint 8.73 still declares
32
+ `typescript >=4.8.4 <6.1.0`, and TypeScript 7 (the Go compiler) ships no
33
+ classic compiler API, which vue-tsc needs.
34
+ - **@nuxt/devtools-kit 4**: Nuxt 4.6 depends on `@nuxt/devtools` 3, and
35
+ `@nuxt/eslint`, `@nuxt/hints` and `@nuxt/test-utils` require the kit `^3`.
36
+ The kit is only listed to satisfy those peers.
37
+ - **pnpm 12.22.0, @vite-pwa/nuxt 2.0.2**: younger than `minimumReleaseAge`.
38
+
39
+ ## What needed changes
40
+
41
+ ### @shopware/nuxt-module 1.6: patch gone
42
+
43
+ The plugin imports `ShopwareNuxtOptions` from `@shopware/nuxt-module`
44
+ instead of the unshipped `./src`, so `patches/` and `patchedDependencies`
45
+ are gone, and `node.dockerfile` no longer copies `patches/`.
46
+
47
+ ### Prettier 3.10
48
+
49
+ Inline elements followed by punctuation stay on one line; four templates
50
+ were reformatted, the rendered text is unchanged.
51
+
52
+ ### @nuxt/fonts 1
53
+
54
+ Fonts are Vite build assets under `/_nuxt/fonts/` (was `/_fonts/`), so they
55
+ get the immutable cache of `/_nuxt/`. `throwOnError` now defaults to `true`:
56
+ a production build fails when Google Fonts cannot be reached. The theme
57
+ module pins the weights of every family, so the new `400 700` default
58
+ weight range does not add faces.
59
+
60
+ ### Nuxt SEO v6 (sitemap 9, robots 7, site config 5)
61
+
62
+ The three move together. Server functions and Nitro hooks take the
63
+ portable `RequestEvent` of `nuxt/server` instead of h3's `H3Event`:
64
+
65
+ - `server/routes/llms.txt.ts` uses `defineEventHandler` from
66
+ `nuxt/server`. On Nitro 2 only such handlers get the web-standard event
67
+ (`event.url`, `event.req.headers`) that `getPathRobotConfig()` reads; an
68
+ h3 handler's `event.req` is the Node request and the call would throw.
69
+ - The `robots:config` and `site-config:init` hooks call `useRuntimeConfig()`
70
+ without the event.
71
+ - The module types bring Nitro's typed `$fetch` into the server program;
72
+ `storeApiPost`/`storeApiGet` assert their generic response type.
73
+
74
+ `robots.txt` was compared before and after, for `NUXT_SITE_INDEXABLE=true`
75
+ and `false`: byte-identical. Site Config 5 warns at build time that no site
76
+ URL is set for prerendering; only the Nuxt Content dumps are prerendered and
77
+ the URL comes from `storeUrl` at runtime, so the warning is harmless.
78
+ `pnpm peers check` lists `zod ^4.6.5` (optional peer of sitemap and robots
79
+ for `defineSitemapSchema()`); `content.config.ts` passes the `z` of Nuxt
80
+ Content, so the peer is not used.
81
+
82
+ ### nuxt-vitalizer 4
83
+
84
+ Removes `disableStylesheets` (unused here); the defaults are unchanged.
85
+
86
+ ### @vite-pwa/nuxt 2
87
+
88
+ Built on unplugin-pwa instead of vite-plugin-pwa:
89
+
90
+ - `workbox` is deprecated, the same settings now live under `generateSW`.
91
+ - The `VitePwaManifest` component no longer exists: `app.vue` renders
92
+ `NuxtPwaManifest`. An unknown component only warns at runtime, so
93
+ without the rename the manifest link would silently disappear.
94
+ - The module adds a `**/_payload.json` precache pattern whenever something
95
+ is prerendered (the Nuxt Content dumps). No page payload exists, and an
96
+ empty pattern now fails the build: `globStrict: false` restores the
97
+ warning of 1.x. `cleanupOutdatedCaches` is no longer on by default and
98
+ is set explicitly.
99
+
100
+ The service worker precaches the same files as before, the web manifest is
101
+ byte-identical.
102
+
103
+ ### Node 26
104
+
105
+ Node 26 is LTS since 2026-10-28 and no longer bundles corepack:
106
+ `node.dockerfile` installs pnpm with `npm install -g`. CI sets up pnpm with
107
+ `pnpm/action-setup`, which does not need corepack.
108
+
109
+ ## Checks
110
+
111
+ After every step: eslint, prettier, typecheck, unit tests, `pnpm build` and
112
+ `pnpm nuxt build test/layer`. At the end, the quickstart storefront was
113
+ built against this branch as its layer (Node 26) and ran in the
114
+ quickstart stack: the smoke test passed (start page, menu section, pizza
115
+ with an extra, guest checkout, contact form, both mails), and the manifest
116
+ link, `/sw.js`, `/robots.txt`, `/sitemap.xml` (category URLs keep their
117
+ trailing slash) and `/llms.txt` (`text/markdown`, content pages listed)
118
+ answered as expected.
package/modules/theme.ts CHANGED
@@ -68,7 +68,7 @@ function registerFonts(preset: ThemePreset, nuxt: Nuxt) {
68
68
  * browsers download only the faces the active preset uses) and makes the
69
69
  * configured preset the default of `runtimeConfig.public.shopBite.themePreset`.
70
70
  * One build can so serve every preset: `NUXT_PUBLIC_SHOP_BITE_THEME_PRESET`
71
- * switches it at runtime (the lead demos run one image for all restaurants),
71
+ * switches it at runtime (one image can run several restaurants),
72
72
  * plugins/theme-preset.ts sets `data-preset` on `<html>`.
73
73
  */
74
74
  export default defineNuxtModule<ShopBiteThemeOptions>({
package/node.dockerfile CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
- FROM node:24-alpine AS build
2
+ FROM node:26-alpine AS build
3
3
 
4
- ARG PNPM_VERSION=12.5.1
4
+ ARG PNPM_VERSION=12.21.0
5
5
  ARG NUXT_PUBLIC_SHOPWARE_ENDPOINT='https://my.shop/store-api'
6
6
  ARG NUXT_PUBLIC_SHOPWARE_ACCESS_TOKEN='TOKEN'
7
7
 
@@ -12,20 +12,20 @@ ENV NODE_OPTIONS="--max-old-space-size=4096"
12
12
 
13
13
  WORKDIR /app
14
14
 
15
- RUN corepack enable && corepack prepare pnpm@${PNPM_VERSION} --activate
15
+ # Node 25+ no longer bundles corepack
16
+ RUN npm install -g pnpm@${PNPM_VERSION}
16
17
 
17
18
  # Copy manifests first so dependency layer is cached independently from source changes.
18
- # pnpm-workspace.yaml (settings, allowBuilds, patchedDependencies) and patches/ are part of the
19
- # lockfile contract; without them `--frozen-lockfile` fails.
19
+ # pnpm-workspace.yaml (settings, allowBuilds) is part of the lockfile contract; without it
20
+ # `--frozen-lockfile` fails. Copy patches/ as well if a pnpm patch is added again.
20
21
  COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
21
- COPY patches ./patches
22
22
  RUN pnpm install --frozen-lockfile --prefer-offline
23
23
 
24
24
  COPY . .
25
25
 
26
26
  RUN pnpm build
27
27
 
28
- FROM node:24-alpine AS production
28
+ FROM node:26-alpine AS production
29
29
 
30
30
  WORKDIR /app
31
31
 
package/nuxt.config.ts CHANGED
@@ -74,6 +74,19 @@ export default defineNuxtConfig({
74
74
  listing: 86400,
75
75
  variant: 3600,
76
76
  category: 86400,
77
+ // Layout data of every page (navigation, SEO URLs, breadcrumbs,
78
+ // plugin config, hours): the server renders it from these caches,
79
+ // so a request (also a 404) does not ask Shopware for it again.
80
+ navigation: 86400,
81
+ // SEO URL matches and the list of known category paths: a new or
82
+ // renamed section must not 404 for long without a purge.
83
+ seoUrl: 600,
84
+ paymentMethods: 3600,
85
+ // Carries the checkout switch, so short; the browser reloads it
86
+ // from Shopware after hydration (useLiveShopData).
87
+ config: 60,
88
+ businessHours: 300,
89
+ holidays: 300,
77
90
  },
78
91
  menuCategoryId: "",
79
92
  searchFallbackCategoryId: "",
@@ -275,9 +288,17 @@ export default defineNuxtConfig({
275
288
  },
276
289
  ],
277
290
  },
278
- workbox: {
291
+ // `workbox` before @vite-pwa/nuxt 2.
292
+ generateSW: {
279
293
  globPatterns: ["**/*.{js,css,html,png,svg,ico}"],
280
294
  globIgnores: ["**/_payload.json"],
295
+ // The module adds a `**/_payload.json` pattern because Nuxt Content
296
+ // prerenders its database dumps; no page payload exists, and since
297
+ // 2.0 an empty pattern fails the build unless globStrict is off (the
298
+ // warning of 1.x).
299
+ globStrict: false,
300
+ // default of 1.x, off by default since 2.0
301
+ cleanupOutdatedCaches: true,
281
302
  navigateFallback: null,
282
303
  runtimeCaching: [
283
304
  {