Update nextjs-signature-verification setup - #49
Merged
Conversation
✅ Deploy Preview for cl-nextjs-contentful-store canceled.
|
nextjs-signature-verification setup
pfferrari
force-pushed
the
feat/714-update-setup
branch
from
September 10, 2026 08:29
fc6b3f3 to
c8f93b6
Compare
malessani
approved these changes
Sep 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes commercelayer/issues-app/issues/714
Update: webhooks/nextjs-signature-verification
Modernized the example and aligned it with the conventions of the recently updated
cms/nextjs-contentful-storeproject. Pages Router is kept.Dependencies
14.2.5→16.3.4, React18.3.1→19.2.85.5.4→5.9.3,@types/*bumped,@types/react-domaddedTooling
.eslintrc.jsonwith a flateslint.config.mjs(eslint-config-next16 +eslint-config-prettier).prettierrc,.prettierignore),.npmrc,pnpm-workspace.yamland a project-level.gitignorenext.config.js→next.config.mjs(ESM)tsconfig.json:es2022target/lib,moduleResolution: bundler,jsx: react-jsx,noUnusedLocals/noUnusedParameterspackage.json: full metadata (repository, homepage, keywords, bugs),engines: node >=22, newtypecheck,formatandlint:fixscripts,preinstallguard for pnpmCode
pages/_app.page.tsx→pages/_app.tsx— with the.page.tsxextension Next never picked the file up, soglobals.csswas never appliedpages/api/verify.ts:async/awaitraw-body read instead of manually wrapping stream event listeners in aPromisetimingSafeEqualinstead of===405with anAllow: POSTheader for non-POST requests500whenCL_SHARED_SECRETis missingpages/index.tsx: dropped the unusedImageimport (would break the typecheck undernoUnusedLocals) and replaced the leftoverCreate Next ApptitleHome.module.css, added dark-mode support, removedpublic/vercel.svgDocumentation
openssltest snippet, and a scripts tableVerification
typecheck,lint,prettier --checkandbuildall clean200401(confirms the raw body reaches the HMAC untouched)401401GETinstead ofPOST→405withAllow: POST200, now loading the global stylesheetOpen point
next devauto-generatesAGENTS.mdandCLAUDE.mdin the project folder (Next 16 rewrites them on every start). They are committed incms/nextjs-contentful-store; decide whether to commit them here too or disable them withagentRules: false.Checklist (general changes)