Skip to content

[create-cloudflare] Enable nodejs_compat by default for new projects#12399

Closed
petebacondarwin wants to merge 1 commit intomainfrom
devin/1770158149-nodejs-compat-via-c3
Closed

[create-cloudflare] Enable nodejs_compat by default for new projects#12399
petebacondarwin wants to merge 1 commit intomainfrom
devin/1770158149-nodejs-compat-via-c3

Conversation

@petebacondarwin
Copy link
Copy Markdown
Contributor

Refs #8310

This PR implements @penalosa's suggestion from PR #8310 to automatically add nodejs_compat via C3 rather than manually adding it to each template.

Instead of modifying every template's wrangler.jsonc file, this change adds the nodejs_compat flag automatically in C3's updateWranglerConfig function when creating new projects. This approach:

  • Centralizes the logic in one place rather than duplicating across templates
  • Handles both JSON/JSONC and TOML config formats
  • Preserves any existing compatibility flags
  • Skips adding nodejs_compat if it or nodejs_compat_v2 is already present

Devin PR requested by @petebacondarwin

Link to Devin run: https://app.devin.ai/sessions/7a606cdbe6d148a48d02975f027bf808


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: This is a sensible default change that doesn't require user action or documentation updates

Human review checklist:

Co-Authored-By: pbacondarwin@cloudflare.com <pete@bacondarwin.com>
@devin-ai-integration
Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Feb 3, 2026

🦋 Changeset detected

Latest commit: 66c441e

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Feb 3, 2026

Claude finished @petebacondarwin's task —— View job


Changeset Review

✅ All changesets look good

The changeset .changeset/nodejs-compat-default.md follows all guidelines:

  1. Version Type: minor is correct - this is a new default behavior that changes what new projects get out of the box
  2. Changelog Quality: Clear description with helpful context about why this matters and how to opt-out
  3. Markdown Headers: No h1/h2/h3 headers used (only code blocks)
  4. Analytics: No analytics changes in this PR
  5. Not Dependabot: This is a feature change, not a dependency update
  6. Experimental Features: Not an experimental feature, this is a sensible default for all new projects

The changeset properly explains the change, provides context on why it's helpful ("many npm packages require Node.js compatibility"), and includes a clear example of how users can opt-out if needed.


@github-project-automation github-project-automation Bot moved this from Untriaged to Done in workers-sdk Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants