Skip to content

fix: add pnpm build approvals for sharp and workerd in Cloudflare deployment add-on#485

Open
dario-piotrowicz wants to merge 1 commit into
TanStack:mainfrom
dario-piotrowicz:dario/484-fix
Open

fix: add pnpm build approvals for sharp and workerd in Cloudflare deployment add-on#485
dario-piotrowicz wants to merge 1 commit into
TanStack:mainfrom
dario-piotrowicz:dario/484-fix

Conversation

@dario-piotrowicz

@dario-piotrowicz dario-piotrowicz commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Fixes #484

When using pnpm v11, creating a Cloudflare-deployed project fails because wrangler transitively depends on sharp and workerd, which have build scripts that are not listed in pnpm.onlyBuiltDependencies.

Add these entries to both the React and Solid Cloudflare host package.json.ejs templates so they are merged with the base approvals at project creation time.

Summary by CodeRabbit

  • Chores
    • Updated Cloudflare React and Solid project templates to limit dependency build steps during installation.
    • Improved installation consistency and security by allowing build scripts only for required packages.

… deployment add-on

When using pnpm v11, creating a Cloudflare-deployed project fails because
`wrangler` transitively depends on `sharp` and `workerd`, which have build
scripts that are not listed in `pnpm.onlyBuiltDependencies`.

Add these entries to both the React and Solid Cloudflare host `package.json.ejs`
templates so they are merged with the base approvals at project creation time.
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 88a11c33-45ce-4666-9bcb-15a577d2efba

📥 Commits

Reviewing files that changed from the base of the PR and between 12c31df and 49f63c7.

📒 Files selected for processing (2)
  • packages/create/src/frameworks/react/hosts/cloudflare/package.json.ejs
  • packages/create/src/frameworks/solid/hosts/cloudflare/package.json.ejs

📝 Walkthrough

Walkthrough

The React and Solid Cloudflare templates now configure pnpm to allow build steps for sharp and workerd.

Changes

Cloudflare pnpm build configuration

Layer / File(s) Summary
Allowed dependency builds
packages/create/src/frameworks/react/hosts/cloudflare/package.json.ejs, packages/create/src/frameworks/solid/hosts/cloudflare/package.json.ejs
Both Cloudflare templates add pnpm.onlyBuiltDependencies entries for sharp and workerd.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding pnpm build approvals for Cloudflare templates.
Linked Issues check ✅ Passed The template updates satisfy #484 by adding the required pnpm build approvals in the Cloudflare host templates.
Out of Scope Changes check ✅ Passed The changes are limited to the Cloudflare template updates needed for the reported pnpm v11 build issue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

Creating a Cloudflare project via pnpm v11 fails out of the box

1 participant