Skip to content

Pass the compatibility_date and compatibility_flags to the unenv preset#10482

Merged
jamesopstad merged 5 commits intomainfrom
james/variable-nodejs-compat
Aug 28, 2025
Merged

Pass the compatibility_date and compatibility_flags to the unenv preset#10482
jamesopstad merged 5 commits intomainfrom
james/variable-nodejs-compat

Conversation

@jamesopstad
Copy link
Copy Markdown
Contributor

@jamesopstad jamesopstad commented Aug 28, 2025

Fixes #10079.
Fixes #3820.

Pass the compatibility_date and compatibility_flags to the unenv preset. This enables support for the node:http and node:https modules.


  • Tests
    • Tests included
    • Tests not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: already documented
  • Wrangler V3 Backport
    • Wrangler PR:
    • Not necessary because: not a Wrangler change

@jamesopstad jamesopstad requested a review from a team as a code owner August 28, 2025 09:16
@jamesopstad jamesopstad requested a review from a team August 28, 2025 09:16
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Aug 28, 2025

🦋 Changeset detected

Latest commit: e43e7db

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

This PR includes changesets to release 1 package
Name Type
@cloudflare/vite-plugin Patch

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

@jamesopstad jamesopstad added the vite-plugin Relating to the `@cloudflare/vite-plugin` package label Aug 28, 2025
@github-project-automation github-project-automation Bot moved this to Untriaged in workers-sdk Aug 28, 2025
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Aug 28, 2025

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@10482

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@10482

miniflare

npm i https://pkg.pr.new/miniflare@10482

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@10482

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@10482

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@10482

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@10482

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@10482

wrangler

npm i https://pkg.pr.new/wrangler@10482

commit: e43e7db

Comment thread packages/vite-plugin-cloudflare/src/index.ts Outdated
Comment thread packages/vite-plugin-cloudflare/src/index.ts Outdated
Copy link
Copy Markdown
Contributor

@vicb vicb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not understand all of the code but the test makes me confident that this work as expected.

Thanks for implementing this!

@github-project-automation github-project-automation Bot moved this from Untriaged to Approved in workers-sdk Aug 28, 2025
@jamesopstad jamesopstad force-pushed the james/variable-nodejs-compat branch from f19bbf0 to e43e7db Compare August 28, 2025 10:20
@jamesopstad jamesopstad merged commit aec77cc into main Aug 28, 2025
35 checks passed
@github-project-automation github-project-automation Bot moved this from Approved to Done in workers-sdk Aug 28, 2025
@jamesopstad jamesopstad deleted the james/variable-nodejs-compat branch August 28, 2025 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

vite-plugin Relating to the `@cloudflare/vite-plugin` package

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

[Feature] The vite plugin should pass the compatibility date and flags to the preset Feature: [unenv] https.request is not implemented yet!

3 participants