cloudflare / cloudflare/workerd

🐛 BUG: wrangler or miniflare turns on `--experimental` compatibility flag by default

Open
#2,518 6 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
8.7k
Forks
739
Avg merge
2d 20h
Merged PRs (30d)
174

Description

### Which Cloudflare product(s) does this pertain to?

Wrangler core

### What version(s) of the tool(s) are you using?

https://github.com/cloudflare/workers-sdk/pull/5878

### What version of Node are you using?

22

### What operating system and version are you using?

Mac

### Describe the Bug

### Observed behavior

I'm able to use the `nodejs_compat_v2` experimental flag without having to turn on the `experimental` flag.

When logging the args ([at this location](https://github.com/cloudflare/workers-sdk/blob/069d84ab71e369d44154c813f7884a2db04432d6/packages/miniflare/src/runtime/index.ts#L136)) that workerd is called with, I see:

```
[
'serve',
'--binary',
'--experimental',
'--socket-addr=entry=127.0.0.1:0',
'--external-addr=loopback=127.0.0.1:64059',
'--control-fd=3',
'-',
'--inspector-addr=localhost:64055'
]
```

### Expected behavior
The `experimental` mode should not be on by default and should require the application developer to opt into it.

### Steps to reproduce
Please provide the following:
- hello world app with workerd 1.20240529.0 and `nodejs_compat_v2` flag turned on in wrangler toml

This should fail because the `nodejs_compat_v2` flag is experimental. To fix this the user is expected to add `experimental` to the compatibility_flags array in wrangler.toml.

### Please provide a link to a minimal reproduction

_No response_

### Please provide any relevant error logs

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.