Skip to content

Upgrade Payload to 3.94.2 and add noopener to window.open - #16

Merged
celeroncoder merged 1 commit into
masterfrom
t3/fix-react-doctor-bugs
Dec 1, 2026
Merged

celeroncoder merged 1 commit into
masterfrom
t3/fix-react-doctor-bugs

Conversation

@celeroncoder

Copy link
Copy Markdown
Owner

What

  • Upgrade payload and every @payloadcms/* package from 3.75.0 to 3.94.2.
  • Pass noopener,noreferrer to window.open in lib/hooks.ts:3.
  • Ignore non-clipboard events in the markdown paste handler, features/markdown-paste/plugin.tsx:52.

Why

  • React Doctor scored the repo 39/100 on two findings: known advisories in payload@3.75.0, and a window.open call that left window.opener exposed to the opened page. Both are gone, score is 100.
  • The Payload bump is not isolated. 3.94.2 pins Lexical 0.50.0 and needs Next >= 16.4.5 and React >= 19.2.9, so those move too.
package before after
payload, @payloadcms/* 3.75.0 (email-resend 3.85.1) 3.94.2
lexical, @lexical/* 0.35.0 0.50.0
next 16.1.1 16.4.6
react, react-dom 19.2.3 19.3.1

Change

Lexical 0.50 types PASTE_COMMAND as ClipboardEvent | InputEvent | KeyboardEvent, so the handler narrows before reading the clipboard:

-    return editor.registerCommand<ClipboardEvent>(
+    return editor.registerCommand(
       PASTE_COMMAND,
       (event) => {
+        if (!(event instanceof ClipboardEvent)) return false;
         const clipboard = event.clipboardData;
-    window.open(url, target);
+    window.open(url, target, "noopener,noreferrer");

Review notes

  • Most of the diff is pnpm-lock.yaml. The hand-written changes are the three files above plus package.json.
  • Lexical jumps 15 minor versions under the admin editor. Worth pasting Markdown into a post in /admin on the preview deploy before merging.

Clears both React Doctor findings: known advisories in payload@3.75.0
and a window.open call that left window.opener exposed. The Payload
bump pulls Lexical 0.50.0, Next 16.4.6 and React 19.3.1 with it, and
the markdown paste handler now ignores non-clipboard paste events.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@vercel

vercel Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
celeroncoder-web Ready Ready Preview Dec 1, 2026 5:06pm UTC

@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

React Doctor found no new issues. 🎉

Reviewed by React Doctor for commit 4d81673.

@celeroncoder
celeroncoder merged commit 5b23201 into master Dec 1, 2026
4 checks passed

This branch was successfully deployed

1 active deployment
Preview — 4d816739 Deployed Dec 1, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant