Skip to content

Update deps and setup of giftcard-tutorial project - #51

Merged
pfferrari merged 1 commit into
mainfrom
feat/716-update-setup
Sep 10, 2026
Merged

Update deps and setup of giftcard-tutorial project#51
pfferrari merged 1 commit into
mainfrom
feat/716-update-setup

Conversation

@pfferrari

@pfferrari pfferrari commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Closes commercelayer/issues-app/issues/716

Summary

Resolved all pnpm audit vulnerabilities in solutions/giftcard-tutorial (4 high, 2 moderate) by upgrading Next.js 15 → 16.

Security fix

  • All 6 advisories were transitive dependencies of next@15.5.25, which pins postcss@8.4.31 (exact) and sharp@0.34.5.
  • No 15.x release patches them; next@16.3.4 is the first version pinning postcss@8.5.23 and sharp@^0.35.4.
  • Aligns the project with cms/nextjs-contentful-store and webhooks/nextjs-signature-verification, already on Next 16.

Dependency changes

  • next^16.3.4, eslint-config-next^16.3.4.
  • Removed @eslint/eslintrc (only needed for FlatCompat).

Next.js 16 breaking changes addressed

  • next.config.ts: images.domains (deprecated) → images.remotePatterns.
  • package.json: lint script next linteslint . (next lint was removed in Next 16).
  • eslint.config.mjs: migrated to the native flat config from eslint-config-next v16.
  • tsconfig.json / next-env.d.ts: mandatory changes applied by Next 16 (jsx: react-jsx, .next/dev/types).
  • Added AGENTS.md / CLAUDE.md, matching the other Next 16 projects, so next dev doesn't recreate them as uncommitted changes.

Configuration

  • Added .env.example documenting NEXT_PUBLIC_CL_CLIENT_ID and NEXT_PUBLIC_CL_ORG_SLUG.
  • Added optional NEXT_PUBLIC_CL_MARKET_CODE, falling back to us (the previously hardcodardcoded market:code:us scope in src/lib/commercelayer.ts.

Verification

  • pnpm audit — no known vulnerabilities.
  • pnpm lint — clean.
  • tsc --noEmit — clean.
  • pnpm build — passes with real credentials (4/4 static pages generated).
  • Not verified: the interactive browser flow (amount/design selection → gift card creation

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 10, 2026
@pfferrari pfferrari added the enhancement New feature or request label Sep 10, 2026
@netlify

netlify Bot commented Sep 10, 2026

Copy link
Copy Markdown

Deploy Preview for cl-nextjs-contentful-store canceled.

Name Link
🔨 Latest commit d5c3922
🔍 Latest deploy log https://app.netlify.com/projects/cl-nextjs-contentful-store/deploys/6aa27d14b91f5200080ad94f

@pfferrari
pfferrari merged commit a1c20ec into main Sep 10, 2026
5 checks passed
@pfferrari
pfferrari deleted the feat/716-update-setup branch September 10, 2026 09:51
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.

2 participants