Skip to content

Remove axios as a peer dependency #155

Closed

Description

@esitarz

Summary

The SDK still requires axios as a peer dependency. Every resource method cancels through an axios CancelToken, configuration exposes axiosAdapter, and the README tells callers to use global axios interceptors. A major version should send HTTP with the platform fetch and stop importing axios.

Requirements

  • The package manifest does not list axios as a dependency or a peer dependency, and SDK source does not import it.
  • Browser and Node calls use fetch. Callers who only set configuration and call resource methods keep the same URLs, query strings, bearer tokens, and refresh behavior.
  • requestOptions.cancelToken becomes requestOptions.signal (AbortSignal). A cancellation is distinguishable from OrderCloudError.
  • SdkConfiguration.axiosAdapter is removed. Callers can supply a custom fetch and a request/response hook for logging, rewriting, or retrying.
  • OrderCloudError keeps status, statusText, errorCode, errors, and isOrderCloudError. error.request is no longer an axios request object.
  • The README, migration guide, and generated cancelToken docs describe the replacements.
  • The default timeout stays the current configuration default (60 seconds).

This is a major-version break. It is specified separately from the open 14.0.0 release.

Spec: specs/001-remove-axios/spec.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions