Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(api): add duplex configuration to fetch (#19)
Node sneakily introduced a change to the fetch API that now requires that the `duplex` option be set on all requests with contain a payload body: nodejs/node#46221 , which means that the CLI now fails on node >18.13, >19.1, 20, and running the CLI on those versions will cause the following exception: ``` RequestInit: duplex option is required when sending a body. Exited with code exit status 1 ``` This configures all fetch requests with bodies to set the duplex option to the only value that is allowed by the spec for now, which is `"half"`. This should have no impact on older node versions since it's the only option available, but will allow the CLI to run on those newer versions without throwing an error.
- Loading branch information