Commit Graph

740 Commits

Author SHA1 Message Date
eason
f372f07ec5
Merge 05d15386a7 into c7a76ddbf2 2026-04-09 16:02:30 -07:00
Eve
914bc2605a
fix(progress): clamp loaded to total for computable upload/download events (#7458)
* fix(progress): clamp loaded value to total in progress reducer

* test(progress): cover out-of-order events in reducer clamp case

* fix(progress): keep bytesNotified monotonic for out-of-order events

---------

Co-authored-by: Jay <jasonsaayman@gmail.com>
2026-04-09 17:40:50 +02:00
Jay
0912bde937
fix: support multiselect in form data (#10676) 2026-04-09 17:31:39 +02:00
Raashish Aggarwal
8b68491d04
fix(http): handle socket-only request errors without leaking keep-alive listeners (#10576)
* fix(http): handle request socket-only errors

* test(http): cover socket-only error handling cleanup

---------

Co-authored-by: Jason Saayman <jasonsaayman@gmail.com>
2026-04-08 22:03:30 +02:00
Darwin ❤️❤️❤️
62f6281660
fix(fetch): remove Content-Type without boundary for FormData (#7314)
* fix(fetch): remove Content-Type without boundary for FormData

When using the fetch adapter with FormData and manually setting
Content-Type to 'multipart/form-data' (without boundary), the
request would fail because the boundary is required.

This fix detects when Content-Type is set to multipart/form-data
without a boundary and removes it, allowing fetch to automatically
set the correct Content-Type header with the proper boundary.

Fixes #7054

* chore: update fixes

---------

Co-authored-by: Jason Saayman <jasonsaayman@gmail.com>
2026-04-08 21:07:51 +02:00
Nitya Jain
f53ebf2198
fix(core): use strict equality in buildFullPath check (#7252)
Replace loose equality (==) with strict equality (===)

Co-authored-by: Jay <jasonsaayman@gmail.com>
2026-04-07 19:48:21 +02:00
github-actions[bot]
772a4e54ec
chore(release): prepare release 1.15.0 (#10671)
* 1.15.0

* chore(release): prepare release 1.15.0

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: jasonsaayman <4814473+jasonsaayman@users.noreply.github.com>
2026-04-07 18:03:51 +02:00
Jay
363185461b
fix: unrestricted cloud metadata exfiltration via header injection chain (#10660)
* fix: unrestricted cloud metadata exfiltration via header injection chain

* fix: address pattern issue highlighted by cubic

* fix: code ql feedback

* fix: code ql feedback
2026-04-06 14:01:54 +02:00
Jay
fb3befb6da
fix: no_proxy hostname normalization bypass leads to ssrf (#10661) 2026-04-06 13:47:03 +02:00
Kai Lee
947f7091d8
Fixes #10610 Deprecation Warning : url.parse() is deprecated in Node.… (#10625)
* Fixes #10610 Deprecation Warning : url.parse() is deprecated in Node.js v22 (via follow-redirects)

* Fixes #10610 Deprecation Warning : fixed again

* Apply suggestion from @cubic-dev-ai[bot]

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>

---------

Co-authored-by: tona jose <tona00jose@gmail.com>
Co-authored-by: Jay <jasonsaayman@gmail.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2026-04-02 09:02:58 +02:00
github-actions[bot]
46bee3dea7
chore(release): prepare release 1.14.0 (#10563)
* 1.14.0

* chore(release): prepare release 1.14.0

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: jasonsaayman <4814473+jasonsaayman@users.noreply.github.com>
Co-authored-by: Jay <jasonsaayman@gmail.com>
2026-03-27 20:54:05 +02:00
easonysliu
05d15386a7 fix: make AxiosError.cause non-enumerable to prevent circular reference in JSON.stringify 2026-03-17 17:11:47 +08:00
Old Autumn
94e1543576
fix(fetch): cancel ReadableStream body after request stream capability probe (#7515)
The module-level capability probe in the fetch adapter creates a
ReadableStream as a Request body to test for streaming support, but
never cancels it.  The Request constructor sets up an internal pull
pipeline on the stream; since the stream is never consumed or
cancelled, the [[pullAlgorithm]] Promise remains pending indefinitely,
causing an async resource leak detectable by Node.js async_hooks and
Vitest --detect-async-leaks.

Extract the ReadableStream to a variable and call body.cancel() after
the probe completes to properly tear down the stream's internal
pipeline.
2026-03-16 09:12:42 +02:00
Jay
8077435407
refactor: update eslint to v10 (#7509)
* refactor: update eslint to v10

* chore: fix cubic feedback
2026-03-15 19:08:58 +02:00
Jay
e943f6c545
fix: proxy from env v2 fix (#7499)
* chore: remove mise

* chore: update proxy from env

* chore: fix issues with package

* chore: fix esm and cjs

* chore: bump lock
2026-03-14 19:10:06 +02:00
nthbotast
042e776335
docs(buildURL): fix outdated encode() comment (#7478)
Co-authored-by: Nathanael BOT <nathanaelbot@minidenathanael.home>
Co-authored-by: Jay <jasonsaayman@gmail.com>
2026-03-12 15:29:27 +02:00
Dmitriy Fedotov
f7a4ee21d5
fix(http): closing detached http2 session on timeout (#7457)
Co-authored-by: Dmitriy Mozgovoy <robotshara@gmail.com>
2026-03-06 23:50:51 +02:00
Eve
688826facd
fix(headers): trim trailing CRLF in normalized header values (#7456) 2026-03-01 17:48:03 +02:00
github-actions[bot]
7108c8877f
chore(release): prepare release 1.13.6 (#7446)
* 1.13.6

* chore(release): prepare release 1.13.6

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: jasonsaayman <4814473+jasonsaayman@users.noreply.github.com>
2026-02-27 17:28:22 +02:00
Mohsen
885b4af6f5
feat: support react native blob objects (#5764)
* feat: support react native blob objects

* test: cover react native blob objects detection

* fix: improve isReactNativeBlob and isReactNative checks for better validation

* feat: support appending React Native blob objects to FormData without recursion

---------

Co-authored-by: Jay <jasonsaayman@gmail.com>
2026-02-24 20:36:32 +02:00
Janaka66
00d97b9730
docs(utils): add missing JSDoc comments (#7427)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2026-02-23 20:29:55 +02:00
Denis Frenademetz
d51accbea1
fix(core): copy status from source error in AxiosError.from (#7403)
When creating an AxiosError from an existing error without a response object,
the status property from the source error is now preserved. This ensures error
status information is not lost during error conversion.

Fixes #7364

Co-authored-by: Jay <jasonsaayman@gmail.com>
2026-02-18 19:33:28 +02:00
Shiwaangee
672491db34
fix: safe FormData detection for WeChat Mini Program (#7306) (#7324)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2026-02-14 17:42:56 +02:00
Alexander Gehres
822e3e40b4
fix: make AxiosError.message property enumerable (#7392)
* fix: make AxiosError.message property enumerable

Restores backward compatibility by making the message property
enumerable. In v1.13.3, the refactoring to extend native Error
made message non-enumerable, breaking code that uses Object.keys(),
Object.entries(), or spread operator on AxiosError instances.

This fix uses Object.defineProperty to explicitly make the message
property enumerable while maintaining the benefits of extending
the native Error class.

Breaking change introduced in: v1.13.3 (commit 1c6a86d)
Affects: Object.keys(), Object.entries(), spread operator, for...in loops

* chore: build fix

---------

Co-authored-by: Alexander Gehres <alexander.gehres@sap.com>
Co-authored-by: Jay <jasonsaayman@gmail.com>
2026-02-14 17:31:52 +02:00
Jay
ef3711d1b3
feat: implement prettier and fix all issues (#7385)
* feat: implement prettier and fix all issues

* fix: failing tests

* fix: implement feedback from codel, ai etc

* chore: dont throw in trim function

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>

* fix: incorrect fix

---------

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2026-02-14 16:59:48 +02:00
github-actions[bot]
29f75425f0
chore(release): prepare release 1.13.5 (#7379)
* 1.13.5

* chore(release): prepare release 1.13.5

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: jasonsaayman <4814473+jasonsaayman@users.noreply.github.com>
2026-02-08 12:53:34 +02:00
asmitha-16
475e75a260
feat: add input validation to isAbsoluteURL (#7326)
* Add input validation to isAbsoluteURL

* chore: add removed doc block

---------

Co-authored-by: Asmitha B <youremail@example.com>
Co-authored-by: Jay <jasonsaayman@gmail.com>
2026-02-05 15:58:40 +02:00
Jay
28c721588c
fix: Denial of Service via __proto__ Key in mergeConfig (#7369)
* fix: sec issue as per advisory

* chore: expand and add tests
2026-02-04 20:25:06 +02:00
Sachin
04cf01969e
docs: clarify object check comment (#7323)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2026-02-04 19:21:44 +02:00
Willian Agostini
696fa753c5
fix: status is missing in AxiosError on and after v1.13.3 (#7368)
* test: add error handling tests for fetch and http adapters with status code

* fix: improve error handling in fetch adapter by including request and response in AxiosError

* fix: skip fetch test if fetch is not supported

* Update lib/adapters/fetch.js

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>

* fix: improve error handling in fetch adapter by using the correct request object

---------

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2026-02-04 09:47:12 +02:00
Willian Agostini
569f028a58
fix: added a option to choose between legacy and the new request/response interceptor ordering
* test: add request interceptor tests for legacy and ordered execution

* feat: add legacy interceptor request/response ordering option

---------

Co-authored-by: Jay <jasonsaayman@gmail.com>
2026-01-30 08:12:04 +02:00
github-actions[bot]
9336cf9a33
chore(release): prepare release 1.13.4 (#7353)
* 1.13.4

* chore: codegen and some updates to workflows

* chore: add github token

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: jasonsaayman <jasonsaayman@gmail.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2026-01-27 20:13:03 +02:00
Jay
ee90dfc28a
fix: issues with version 1.13.3 (#7352) 2026-01-27 08:04:06 +02:00
Jay
ab06109b40
chore(release): v1.13.3 (#7335) 2026-01-20 19:47:13 +02:00
Tackoil
5945e40bb1
fix(interceptor): handle the error in the same interceptor (#6269)
* fix(interceptor): handle the error in the same interceptor

* fix(interceptor): pass the config and data in promise chain

* fix(interceptor): filter out unexpected config and data in promise chain

---------

Co-authored-by: Jay <jasonsaayman@gmail.com>
2026-01-08 21:11:34 +02:00
techcodie
f8694341de
docs: refresh CDN URLs and example JSON headers (#7236)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-12-30 13:30:43 +02:00
SANDESH LENDVE
46db3316ac
doc: update deprecated var usage in documentation examples (#7246)
* test(http): fix HTTPS protocol test by using local HTTPS server instead of external request

* docs: update var usage in documentation examples

* docs: updated var to const

---------

Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-12-30 13:16:52 +02:00
Ved Vadnere
3141c319c2
chore: remove unnecessary eslint-disable directive (#7283)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-12-30 13:11:30 +02:00
Subhan Kumar Rai
d7e6065346
fix(http2): Use port 443 for HTTPS connections by default. (#7256)
Co-authored-by: Dmitriy Mozgovoy <robotshara@gmail.com>
2025-12-19 02:22:38 +02:00
Jay
a4230f5581
Revert "fix: silentJSONParsing=false should throw on invalid JSON (#7253) (#7…" (#7298)
This reverts commit 7d19335e43.
2025-12-08 14:19:20 +02:00
Nandan Acharya
e0a120620e
test: add Node unit tests for toFormData and refactor buildURL to avoid param reassignment (#7272)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-12-08 08:22:30 +02:00
Rudransh
7d19335e43
fix: silentJSONParsing=false should throw on invalid JSON (#7253) (#7257)
Co-authored-by: Rudransh Gupta <rudranshgupta@Rudranshs-MacBook-Pro.local>
Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-12-06 10:45:54 +02:00
KT0803
8092aee724
chore: remove TODO comment and dead code from http adapter error handler (#7229)
Remove commented-out code marked with @todo remove in the request error
handler. The code was already disabled and no longer needed.
2025-11-18 08:40:53 +02:00
Turadg Aleahmad
860e03396a
feat: compatibility with frozen prototypes (#6265)
* fix(types): some JSDoc param defs

* fix: compatibility with HardenedJS

* Update lib/utils.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Jay <jasonsaayman@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-14 14:26:43 +02:00
Justin Dhillon
d5b76d4af7
style: get rid of redundency in imports (#6315)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-11-12 21:11:56 +02:00
Gabriel Quaresma
6ef867e684
fix: unclear error message is thrown when specifying an empty proxy authorization (#6314)
* fix: add AxiosError to Invalid proxy authorization

* fix: minor update

* Update test/unit/adapters/http.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* chore: remove redundant check

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* chore: code style

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* chore: style

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* chore: correct assert

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: João Gabriel Quaresma de Almeida <joaoGabriel55>
Co-authored-by: Jay <jasonsaayman@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-12 21:04:39 +02:00
Jake Hayes
d6682b2035
chore: add options object to docstring so IDE's indicate it's available (#5999)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-11-11 20:51:46 +02:00
Julian Dax
1c6a86dd2c
fix: turn AxiosError into a native error (#5394) (#5558)
* fix: turn AxiosError into a native error (#5394)

Being an object returned by the 'Error' constructor turns something into a 'native error'.

* fix: simplify code in AxiosError

* fix: simplify code in AxiosError

* refactor: implement AxiosError as a class

* refactor: implement CanceledError as a class

This turns CanceledError into a native error.

* refactor: simplify AxiosError.toJSON

* fix: improve error code handling in `AxiosError.from`

If no error code is provided, use the code from the underlying error.

* fix: set error status in `AxiosError.constructor`

If a response is passed to the constructor, set the response status as a property.

* fix: remove unnecessary async

---------

Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-11-11 19:06:10 +02:00
github-actions[bot]
08b84b52d5
chore(release): v1.13.2 (#7207)
Co-authored-by: DigitalBrainJS <12586868+DigitalBrainJS@users.noreply.github.com>
2025-11-04 22:00:13 +02:00
Dmitriy Mozgovoy
8d372335f5
fix(http): fix 'socket hang up' bug for keep-alive requests when using timeouts; (#7206) 2025-11-04 01:08:35 +02:00