2
0
mirror of https://github.com/tenrok/axios.git synced 2026-05-15 11:59:42 +03:00
Commit Graph

676 Commits

Author SHA1 Message Date
github-actions[bot] e5a33366d7 chore(release): v1.12.2 (#7031)
Co-authored-by: DigitalBrainJS <12586868+DigitalBrainJS@users.noreply.github.com>
2025-09-14 15:58:39 +03:00
Noritaka Kobayashi 38726c7586 refactor: change if in else to else if (#7028)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-09-14 11:53:01 +02:00
Dmitriy Mozgovoy cf78825e12 fix(fetch): use current global fetch instead of cached one when env fetch is not specified to keep MSW support; (#7030) 2025-09-13 23:24:16 +03:00
Noritaka Kobayashi c26d00f451 refactor: remove redundant assignment (#7029) 2025-09-13 22:10:51 +03:00
github-actions[bot] 3cac78c2de chore(release): v1.12.1 (#7021)
Co-authored-by: DigitalBrainJS <12586868+DigitalBrainJS@users.noreply.github.com>
2025-09-12 17:18:39 +03:00
github-actions[bot] 0d8ad6e1de chore(release): v1.12.0 (#7013)
Co-authored-by: jasonsaayman <4814473+jasonsaayman@users.noreply.github.com>
2025-09-11 21:32:15 +02:00
Ameer Assadi 945435fc51 fix(node): enforce maxContentLength for data: URLs (#7011)
* fix(node): enforce maxContentLength for data: URLs (pre-decode size check)- CVE-2025-58754

* feat(utils): add estimateDataURLDecodedBytes helper and fix duplicate condition in base64 padding check

* feat: add estimateDataURLDecodedBytes helper with tests
2025-09-10 15:08:43 +02:00
Dmitriy Mozgovoy c959ff2901 feat(fetch): add fetch, Request, Response env config variables for the adapter; (#7003)
* feat(fetch): add fetch, Request, Response env config variables for the adapter;

* feat(fetch): fixed design issue for environments without fetch API globals;
2025-08-30 22:02:24 +03:00
Emiedonmokumo Dick-Boro a9f47afbf3 fix(fetch-adapter): set correct Content-Type for Node FormData (#6998)
* fix(fetch-adapter): set correct Content-Type for Node FormData

* Update lib/helpers/resolveConfig.js

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

* test(fetch): replace chai expect with Node assert

* fix: define formHeaders for FormData to resolve no-undef error

* fix: filter headers to only update the target headers

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

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-08-25 20:46:53 +02:00
Willian Agostini 2a9763426e feat: support reviver on JSON.parse (#5926)
* test: test to support reviver on JSON.parse

* feat: support reviver for JSON.parse on parse response data

#5924

---------

Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-08-12 09:34:42 +02:00
최예찬 6d84189349 fix(params): removing '[' and ']' from URL encode exclude characters (#3316) (#5715)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-08-01 20:44:47 +02:00
khani 78b290c57c feat(adapter): surface low‑level network error details; attach original error via cause (#6982)
* feat(adapter): surface low‑level network error details; attach original error via `cause`

Node http adapter:
- Promote low-level `err.code` to `AxiosError.code`, prefixing message (e.g. `ECONNREFUSED – …`)
- Keep original error on standard `Error.cause`

XHR adapter:
- Preserve browser `ProgressEvent` on `error.event`
- Use event message when available

Tests:
- Add Node ESM tests under `test/unit/adapters` to assert `code` and `cause` behavior

Types:
- Ensure `AxiosError.cause?: unknown` and `event?: ProgressEvent` are present

* fix(adapter): use fs instead of fs/promises for sync file read in tests to fix GitHub Actions
2025-07-30 09:57:27 +02:00
github-actions[bot] b76c4ac6f8 chore(release): v1.11.0 (#6974)
Co-authored-by: jasonsaayman <4814473+jasonsaayman@users.noreply.github.com>
2025-07-23 08:04:30 +02:00
Manish Sahani a2214ca1bc fix: prevent RangeError when using large Buffers (#6961) 2025-07-15 20:18:24 +02:00
Noritaka Kobayashi 6161947d9d refactor: use spread operator instead of '.apply()' (#6938)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-07-06 16:59:56 +02:00
Noritaka Kobayashi a1d16dd9c5 refactor: use an object spread instead of Object.assign (#6939)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-07-06 16:51:51 +02:00
github-actions[bot] 73a836dae7 chore(release): v1.10.0 (#6943)
Co-authored-by: DigitalBrainJS <12586868+DigitalBrainJS@users.noreply.github.com>
2025-06-14 15:11:07 +03:00
Uhyeon Park 0f50af8e07 fix(adapter): pass fetchOptions to fetch function (#6883)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-06-01 18:57:50 +02:00
Dimitrios Lazanas 5064b108de fix(form-data): convert boolean values to strings in FormData serialization (#6917) 2025-05-21 17:32:38 +02:00
github-actions[bot] cdcfd214c1 chore(release): v1.9.0 (#6891)
Co-authored-by: DigitalBrainJS <12586868+DigitalBrainJS@users.noreply.github.com>
2025-04-24 23:18:14 +03:00
Ionuț G. Stan 987d2e2dd3 fix(http): send minimal end multipart boundary (#6661) 2025-04-24 22:19:48 +03:00
Dmitriy Mozgovoy f7a3b5e0f7 fix(headers): fixed support for setting multiple header values from an iterated source; (#6885) 2025-04-23 19:24:08 +03:00
Dmitriy Mozgovoy 6c5d4cd692 fix(core): fix the Axios constructor implementation to treat the config argument as optional; (#6881) 2025-04-18 02:22:31 +03:00
Dmitriy Mozgovoy dfe8411c9a fix(fetch): fixed ERR_NETWORK mapping for Safari browsers; (#6767) 2025-04-15 01:52:53 +03:00
Dmitriy Mozgovoy d4f7df4b30 fix(headers): fix getSetCookie by using 'get' method for caseless access; (#6874) 2025-04-14 22:38:27 +03:00
Dmitriy Mozgovoy 1b1f9ccdc1 fix(headers): allow iterable objects to be a data source for the set method; (#6873) 2025-04-14 21:55:27 +03:00
Willian Agostini 80ea756e72 feat(AxiosHeaders): add getSetCookie method to retrieve set-cookie headers values (#5707)
* feat(AxiosHeaders): add getSetCookie method to retrieve set-cookie header values

* refactor(AxiosHeaders.js): use logical OR instead of nullish coalescing operator in getSetCookie method

---------

Co-authored-by: Willian Agostini <willian.agostini@gmail.com.br>
Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-03-25 21:30:23 +02:00
github-actions[bot] 9f6f97bcfb chore(release): v1.8.4 (#6844)
Co-authored-by: jasonsaayman <4814473+jasonsaayman@users.noreply.github.com>
2025-03-19 21:26:49 +02:00
Marc Hassan f10c2e0de7 fix(buildFullPath): handle allowAbsoluteUrls: false without baseURL (#6833)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-03-18 20:01:37 +02:00
github-actions[bot] 39ec206483 chore(release): v1.8.3 (#6819)
Co-authored-by: jasonsaayman <4814473+jasonsaayman@users.noreply.github.com>
2025-03-12 09:23:22 +02:00
Marc Hassan ec159e507b fix(xhr/fetch): pass allowAbsoluteUrls to buildFullPath in xhr and fetch adapters (#6814) 2025-03-10 14:29:41 +02:00
github-actions[bot] a9f7689b0c chore(release): v1.8.2 (#6812)
Co-authored-by: jasonsaayman <4814473+jasonsaayman@users.noreply.github.com>
2025-03-07 09:40:33 +02:00
Fasoro-Joseph Alexander fb8eec214c fix(http-adapter): add allowAbsoluteUrls to path building (#6810)
Co-authored-by: alex-paystack <alex@paystack.com>
2025-03-07 09:30:30 +02:00
github-actions[bot] 2e64afdff5 chore(release): v1.8.1 (#6800)
Co-authored-by: jasonsaayman <4814473+jasonsaayman@users.noreply.github.com>
2025-02-26 11:06:15 +02:00
Dmitriy Mozgovoy 36a5a620be fix(utils): move generateString to platform utils to avoid importing crypto module into client builds; (#6789)
* chore(ci): Add release-it script;

* fix(utils): move generateString util to platform utils to avoid importing crypto module into client build;

---------

Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-02-26 10:30:55 +02:00
github-actions[bot] cceb7b1e15 chore(release): v1.8.0 (#6795)
Co-authored-by: jasonsaayman <4814473+jasonsaayman@users.noreply.github.com>
2025-02-26 08:00:31 +02:00
Willian Agostini 23a25af068 fix(utils): replace getRandomValues with crypto module (#6788) 2025-02-18 14:36:51 +02:00
Michael Toscano 32c7bcc0f2 feat: Add config for ignoring absolute URLs (#5902) (#6192)
* fix: prevent request url override

prevent request URL from overriding preconfigured base URL

BREAKING CHANGE: code relying on the above will now combine the URLs instead of prefer request URL

* feat: add config option for allowing absolute URLs

* fix: add default value for allowAbsoluteUrls in buildFullPath

* fix: typo in flow control when setting allowAbsoluteUrls

* feat: update tests supporting issue #5902 functionality

* feat: update README.md with allowAbsoluteUrls

* fix: properly group conditions in buildFullPath.js to avoid undefined error when baseUrl undefined

* Update README.md fix typo

* fix: update build full path logic to address failing test case

* fix: update base URL test

* fix: remove problem test (works locally, will not work in the pipeline)

* fix: update https test to use github.com instead of google.com

* fix: revert previous commit

* fix: add back problem test

* chore: remove un-needed passed var to URL class instanciation

---------

Co-authored-by: Austin Ryan Lawson <ryan.lawson2@gmail.com>
Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-02-12 11:09:24 +02:00
Jay 1317261125 Revert "chore: expose fromDataToStream to be consumable (#6731)" (#6732)
This reverts commit 7aae04d292.
2024-12-06 11:30:15 +02:00
fancy45daddy 7aae04d292 chore: expose fromDataToStream to be consumable (#6731) 2024-12-05 16:27:34 +02:00
github-actions[bot] b2cb45d5a5 chore(release): v1.7.9 (#6730)
Co-authored-by: jasonsaayman <4814473+jasonsaayman@users.noreply.github.com>
2024-12-04 09:37:30 +02:00
github-actions[bot] 415ca94401 chore(release): v1.7.8 (#6715)
Co-authored-by: DigitalBrainJS <12586868+DigitalBrainJS@users.noreply.github.com>
2024-11-25 23:13:12 +02:00
Dmitriy Mozgovoy 0a8d6e19da fix: use URL API instead of DOM to fix a potential vulnerability warning; (#6714) 2024-11-25 22:02:07 +02:00
Tommaso Paulon eac4619fe2 fix: allow passing a callback as paramsSerializer to buildURL (#6680)
* fix: allow passing a callback as paramsSerializer to buildURL

* fix: add missing semicolon
2024-11-12 17:33:33 +02:00
Kasper Isager Dalsgarð df956d18fe fix(http): use globalThis.TextEncoder when available (#6634)
Co-authored-by: Dmitriy Mozgovoy <robotshara@gmail.com>
2024-11-12 16:00:26 +02:00
Pavan Welihinda 12b32957f1 fix(http): fixed proxy-from-env module import (#5222)
Co-authored-by: Pavan Welihinda <pavan@babyjourney.se>
Co-authored-by: Dmitriy Mozgovoy <robotshara@gmail.com>
2024-11-07 21:12:02 +02:00
Akki 5d99fe4491 fix(core): fixed config merging bug (#6668)
Co-authored-by: rana-aakash <aakash.rana@rooter.io>
Co-authored-by: Dmitriy Mozgovoy <robotshara@gmail.com>
2024-10-30 23:39:55 +02:00
Henco Appel 6841d8d18d fix(http): add support for File objects as payload in http adapter (#6588) (#6605)
Co-authored-by: Hendrik Appel <happel@europe.altair.com>
Co-authored-by: Jay <jasonsaayman@gmail.com>
Co-authored-by: Dmitriy Mozgovoy <robotshara@gmail.com>
2024-10-13 20:43:40 +03:00
Taylor Flatt cc3217a612 fix: updated stream aborted error message to be more clear (#6615) 2024-09-28 13:04:22 +02:00
Ell Bradshaw 8f3cde11d2 Warn about common option misspellings (#6489)
* chore(tests): add failing tests for baseUrl

* chore(tests): simplify to just warning

* feat: warn about likely-misspelled options

* chore: add semi-colon

* chore: add missing semi-colons

---------

Co-authored-by: Ell Bradshaw <ell@c9a.co>
Co-authored-by: Jay <jasonsaayman@gmail.com>
2024-09-26 21:31:24 +02:00