Switch from `request` to `axios` is a breaking change?

Đang mở
#678 11 bình luận 8 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
15/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
nodejs, typescript
Lĩnh vực
api

Hướng nghiên cứu

The issue compares the return type of SDK API methods before and after the request to axios switch, using the linked request and Axios type definitions. Start by checking what the public methods return in version 5.0.0 and what its release notes say about the change. Done means a maintainer decision on whether the response shape is restored or the change is documented as breaking, with the decision reflected in the changelog or docs.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

SDK you're using (please complete the following information):

  • Version >=5.0.0

Describe the bug
Release notes for version 5.0.0 list a bug fix:

https://github.com/XeroAPI/xero-node/issues/579 | Get rid of deprecated "request" dependency

Switching out the request package for axios changes the response shape for the SDK API methods. Previously they returned a request response whereas now they return an AxiosResponse.

As you can see these responses have a different shape. IMHO changing the response shape of the SDK should be explicitly called out as a breaking change. We didn't pick this up until we noticed runtime errors in production.

Ngôn ngữ chính
TypeScript
Star
264
Fork
177
Merge trung bình
10 giờ 5 phút
Pull request đã merge (30 ngày)
5

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của XeroAPI/xero-node

Tất cả issue của XeroAPI/xero-node

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.