Skip to content

Remove axios and call the API with fetch - #156

Closed
esitarz wants to merge 1 commit into
masterfrom
feat/155-remove-axios
Closed

esitarz wants to merge 1 commit into
masterfrom
feat/155-remove-axios

Conversation

@esitarz

@esitarz esitarz commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Closes Remove axios as a peer dependency #155. Axios is no longer a dependency or a peer dependency. The SDK sends HTTP with the platform fetch.
  • requestOptions.cancelToken is now requestOptions.signal. Cancelled calls reject with CancellationError, which isCancellation identifies. Timeouts reject with TimeoutError.
  • axiosAdapter and global axios interceptors are replaced by Configuration.Set({ fetch, onRequest, onResponse }). OrderCloudError keeps its API error fields. error.request is now { url, method }.
  • package.json stays at 13.0.0, so merging this does not publish. The changelog entry is under Unreleased. This is a major-version break and is separate from the open 14.0.0 release.
  • src/configuration.ts is renamed to src/Configuration.ts so the filename matches the imports and the codegen template. That overlaps with #93 - Generate docs source links in one build #150.

Test plan

  • npx jest --config tests/config/server.config.js — 10 suites, 52 tests
  • npx jest --config tests/config/browser.config.js — 11 suites, 66 tests
  • Confirm a project with no axios installed can import the SDK and complete a resource call
  • Confirm cancelToken and axiosAdapter fail to compile, and the migration guide replacements work

Callers should not have to install axios to use the SDK. Requests now use fetch, cancellation uses AbortSignal, and hooks replace axios interceptors and adapters.
@esitarz esitarz mentioned this pull request Oct 15, 2026
6 of 7 tasks
@esitarz esitarz closed this Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove axios as a peer dependency

1 participant