Change8

Migrating to Axios v1.8.0

Version v1.8.0 introduces 4 breaking changes. This guide details how to update your code.

Released: 2/26/2025

4
Breaking Changes
4
Migration Steps
4
Affected Symbols

⚠️ Check Your Code

If you use any of these symbols, you need to read this guide:

buildFullPathallowAbsoluteUrlsutils.getRandomValuesfromDataToStream

Breaking Changes

Issue #1

URL handling logic changed: code that previously preferred the request URL now combines the base URL and request URL; update code or set the new `allowAbsoluteUrls` config to false to retain prior behavior.

Issue #2

Introduced `allowAbsoluteUrls` config option which alters how absolute URLs are processed; existing code may need to explicitly set this option to match previous expectations.

Issue #3

Added a default value for `allowAbsoluteUrls` in the `buildFullPath` function, potentially affecting custom overrides of this function.

Issue #4

Fixed a typo in the flow‑control logic when setting `allowAbsoluteUrls`, which may change the execution path for URL handling.

Migration Steps

  1. 1
    Review any code that relied on the previous URL combination behavior and set the `allowAbsoluteUrls` config accordingly.
  2. 2
    If you have custom overrides of `buildFullPath`, ensure they handle the new default value for `allowAbsoluteUrls`.
  3. 3
    Replace direct calls to `utils.getRandomValues` with the new `crypto`‑based implementation if your code accessed it directly.
  4. 4
    Remove or adjust imports of the reverted `fromDataToStream` export, as it is no longer exposed.

Release Summary

This release adds a new `allowAbsoluteUrls` config for URL handling, updates utils to use the crypto module, and includes several bug fixes, but introduces breaking changes to how URLs are combined.

Need More Details?

View the full release notes and all changes for Axios v1.8.0.

View Full Changelog