cloudflare / workers-sdk

⛅️ Home to Wrangler, the CLI for Cloudflare Workers®
https://developers.cloudflare.com/workers/
Apache License 2.0
2.41k stars 592 forks source link

🐛 BUG: d1 execute --file does not return results since Wrangler CLI 3.56 #6088

Open smcstewart opened 1 week ago

smcstewart commented 1 week ago

Which Cloudflare product(s) does this pertain to?

D1, Wrangler core

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

3.57+ [Wrangler]

What version of Node are you using?

20.11.1

What operating system and version are you using?

Mac Sonoma 14.5

Describe the Bug

Observed behavior

Since 3.57 running a d1 execute from Wrangler will return metadata of the results, rather than the results as per 3.56 backwards.

e.g. wrangler d1 execute mydb --file sql/xy.sql --yes --remote --env myenv

Expected behavior

I expect to get the results returned, not the metadata. Unless I have missed something in the documentation for the release.

Steps to reproduce

Minimal repro repo link is included. But, if you've already got a D1 database, you can just use wrangler 3.56 with a SQL file and then wrangler 3.57+ with a SQL file and see the difference.

Please provide a link to a minimal reproduction

https://github.com/smcstewart/wrangler-d1-execute-potential-defect

Please provide any relevant error logs

No response