Skip to content

Update nextjs-contentful-store project setup - #48

Merged
pfferrari merged 4 commits into
mainfrom
feat/710-update-setup
Sep 10, 2026
Merged

Update nextjs-contentful-store project setup#48
pfferrari merged 4 commits into
mainfrom
feat/710-update-setup

Conversation

@pfferrari

@pfferrari pfferrari commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Closes commercelayer/issues-app/issues/710

What I did

Updated packages

Package From To
next 13.1.6 16.3.4
react / react-dom 18.2.0 19.2.8
@commercelayer/react-components 4.2.2 5.0.1
contentful 9.3.3 11.12.10
tailwindcss 3.4.7 4.3.3
@headlessui/react 1.5.0 2.2.10
eslint 8.34 9.39.1
typescript 4.5.5 5.9.3
prettier 2.5.1 3.9.6

ESLint stays on 9 (eslint-config-next@16 pulls typescript-eslint@^8); TypeScript on 5.9 by choice.

Migrations

  • ContentfulEntry<Fields> no longer exists; typings rewritten as 7 EntrySkeletonTypes, images retyped as Asset, withoutUnresolvableLinks modifier. Also fixed getProduct, which queried a non-existent key.
  • CL v5<CommerceLayer> dropped endpoint, <OrderContainer><Order>, subpath exports removed.
  • Cartiframe-resizer v5 is GPL-3.0, so the dependency was removed rather than upgraded: the custom iframe is now CL's <HostedCart />, plus a container min-height and an SSR token guard it requires.
  • Tailwind 4 — CSS-first config; caught 2 silent visual regressions (shadow-sm remapped, colourless border-2).
  • ESLint / React 19 — flat config, formatting left to Prettier; 2 setState-in-effect violations fixed by deriving state.
  • Pages Router kept deliberately; App Router migration not done.

Security

  • pnpm audit: 14 → 1, all 14 dev-only (pnpm audit --prod clean).
  • Fixed with same-major transitive overrides in pnpm-workspace.yaml.
  • uuid@9 left knowingly: the advisory needs a buf argument, the only call site is v4() with none.

Cleanup & fixes

  • Removed 12 unused deps; added lodash, imported in 8 files but never declared.
  • Removed NEXT_PUBLIC_CL_ENDPOINT — unused after v5. Changes the deploy button URLs.
  • Fixed a pre-existing bug: unknown country codes returned 500 instead of 404.

Verification

  • typecheck, lint, build clean. All routes exercised against a live Contentful space — 200s with zero runtime errors, /xx/en-us → 404.
  • Known non-issue: /fr/fr-fr returns 500 because the space has only it-IT and en-US enabled.

Checklist (general changes)

  • Make sure your changes are tested (stories and/or unit, integration, or end-to-end tests).
  • Make sure to add/update documentation regarding your changes.
  • You are NOT deprecating/removing a feature.

@pfferrari pfferrari self-assigned this Sep 9, 2026
@pfferrari pfferrari added the enhancement New feature or request label Sep 9, 2026
@pfferrari
pfferrari force-pushed the feat/710-update-setup branch from 2dafad3 to eee6b6e Compare September 9, 2026 14:12
@pfferrari
pfferrari requested a review from malessani September 9, 2026 14:13
@pfferrari pfferrari changed the title Update project setup Update nextjs-contentful-store project setup Sep 9, 2026
@pfferrari
pfferrari merged commit 7844ebb into main Sep 10, 2026
1 check passed
@pfferrari
pfferrari deleted the feat/710-update-setup branch September 10, 2026 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants