ZIm/crates/eval/examples/request_to_axios_migration/criteria.md
Thomas Mickley-Doyle d74f0735c2
Add more eval examples + filtering examples by language + fix git concurrent usage (#28719)
Release Notes:

- N/A

---------

Co-authored-by: michael <michael@zed.dev>
Co-authored-by: agus <agus@zed.dev>
2025-04-14 22:05:46 +00:00

1.1 KiB

  1. The first change replaces the request module import with axios in Tunnel.js. This is accompanied by modifications to the request parameters where path and json fields are removed and replaced with responseType: 'json'. The request URI construction is also slightly modified to separate the base URI from the parameters.
  2. The second chunk shows significant changes to the request handling logic in Tunnel.js. The callback-based request implementation is replaced with a promise-based axios.get approach. The error handling is restructured to use .catch() instead of checking for errors in the callback. The success case now extracts data from res.data instead of directly from the response body, and the status code check looks at res.status instead of res.statusCode.
  3. The third chunk shows changes to package.json where the request dependency is removed and replaced with axios at version 0.17.1. The dependencies are also reordered, with debug and openurl moved up and yargs moved to the end of the list, though their versions remain unchanged. The devDependencies section remains untouched.