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

1782 Commits

Author SHA1 Message Date
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
dependabot[bot] f7bdcd1b6c chore(deps-dev): bump tar-fs from 2.1.1 to 2.1.4 (#7244)
Bumps [tar-fs](https://github.com/mafintosh/tar-fs) from 2.1.1 to 2.1.4.
- [Commits](https://github.com/mafintosh/tar-fs/compare/v2.1.1...v2.1.4)

---
updated-dependencies:
- dependency-name: tar-fs
  dependency-version: 2.1.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-12-08 08:03:45 +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
Nikunj Mochi ec9d94e9f8 feat: add Node.js coverage script using c8 (closes #7289) (#7294)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-12-06 10:37:24 +02:00
dependabot[bot] 7764844686 chore(deps): bump the github-actions group across 1 directory with 2 updates (#7282)
Bumps the github-actions group with 2 updates in the / directory: [actions/checkout](https://github.com/actions/checkout) and [ffurrer2/extract-release-notes](https://github.com/ffurrer2/extract-release-notes).


Updates `actions/checkout` from 5 to 6
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

Updates `ffurrer2/extract-release-notes` from 2 to 3
- [Release notes](https://github.com/ffurrer2/extract-release-notes/releases)
- [Changelog](https://github.com/ffurrer2/extract-release-notes/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ffurrer2/extract-release-notes/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: ffurrer2/extract-release-notes
  dependency-version: '3'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-12-06 10:14:04 +02:00
dependabot[bot] 5c7a5cced2 chore(deps-dev): bump js-yaml from 3.14.1 to 3.14.2 (#7296)
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 3.14.1 to 3.14.2.
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/3.14.1...3.14.2)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 3.14.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-06 10:02:25 +02:00
dependabot[bot] 2979a9414b chore(deps-dev): bump node-forge from 1.3.1 to 1.3.3 (#7293)
Bumps [node-forge](https://github.com/digitalbazaar/forge) from 1.3.1 to 1.3.3.
- [Changelog](https://github.com/digitalbazaar/forge/blob/main/CHANGELOG.md)
- [Commits](https://github.com/digitalbazaar/forge/compare/v1.3.1...v1.3.3)

---
updated-dependencies:
- dependency-name: node-forge
  dependency-version: 1.3.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-06 09:47:38 +02:00
Anchal Singh 88d7884254 feat: enhance pipeFileToResponse with error handling (#7169)
* Enhance pipeFileToResponse with error handling

Added error handling for file streaming in pipeFileToResponse function.

* Security: Fix path traversal vulnerability in pipeFileToResponse with input validation and error handling

Security: Enhance file streaming with comprehensive path validation

- Add path traversal protection in pipeFileToResponse function
- Implement input validation to prevent directory traversal attacks
- Improve error handling for file read operations with proper status codes
- Ensure resolved paths stay within intended directory boundaries
- Add security checks using path.resolve() and startsWith() methods
- Fix CodeQL "Uncontrolled data in path expression" vulnerability
- Maintain backward compatibility while enhancing security

---------

Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-12-05 09:12:15 +02:00
github-actions[bot] 86b2423597 chore(sponsor): update sponsor block (#7285)
Co-authored-by: DigitalBrainJS <12586868+DigitalBrainJS@users.noreply.github.com>
2025-12-05 09:08:26 +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 4d06112452 style: turn '()=>' into '() =>' (#6324)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-11-12 21:49:37 +02:00
svihpinc f73474d02c feat(types): Intellisense for string literals in a widened union (#6134)
- see: https://github.com/microsoft/TypeScript/issues/33471#issuecomment-1376364329

Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-11-12 21:17:57 +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
JohnTitor 15bf9563f6 test: correct relationship between filename and test codes (#6155)
Co-authored-by: zhangh-cs <zhangh-cs@glodon.com>
Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-11-12 08:16:59 +02:00
Wilson Mun 65a7584eda feat: add automatic minor and patch upgrades to dependabot (#6053)
* feat: add automatic minor and patch upgrades for npm packages used in axios

* feat: bump up pr limit to 5 for dependency upgrades

---------

Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-11-11 20:55:10 +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
Jarred Sumner b89217e3e9 fix(package.json): add 'bun' package.json 'exports' condition. Load the Node.js build in Bun instead of the browser build (#5754)
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-11-11 20:02:35 +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
Ashvin Tiwari 5b5c196892 docs: add comprehensive migration guide for 0.x to 1.x upgrade (#7218)
Fill empty MIGRATION_GUIDE.md with detailed documentation addressing issue #7208.

This documentation-only change provides solutions for centralized error handling
in Axios 1.x and comprehensive migration guidance.

Addresses maintainer feedback by excluding all TypeScript modifications.

Fixes #7208
2025-11-11 16:42:13 +02:00
WuMingDao 7f1fe57250 docs: grammar issue in *.md (#7215)
* fix readme.md

* fix ECOSYSTEM.md

* fix CONTRIBUTING.md
2025-11-11 08:34:36 +02:00
dependabot[bot] e6d71017d3 chore(deps): bump the github-actions group across 1 directory with 6 updates (#7148)
Bumps the github-actions group with 6 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [actions/checkout](https://github.com/actions/checkout) | `4` | `5` |
| [tj-actions/changed-files](https://github.com/tj-actions/changed-files) | `46` | `47` |
| [actions/setup-node](https://github.com/actions/setup-node) | `4` | `5` |
| [github/codeql-action](https://github.com/github/codeql-action) | `3` | `4` |
| [actions/labeler](https://github.com/actions/labeler) | `5` | `6` |
| [actions/stale](https://github.com/actions/stale) | `9` | `10` |



Updates `actions/checkout` from 4 to 5
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

Updates `tj-actions/changed-files` from 46 to 47
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v46...v47)

Updates `actions/setup-node` from 4 to 5
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v4...v5)

Updates `github/codeql-action` from 3 to 4
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v3...v4)

Updates `actions/labeler` from 5 to 6
- [Release notes](https://github.com/actions/labeler/releases)
- [Commits](https://github.com/actions/labeler/compare/v5...v6)

Updates `actions/stale` from 9 to 10
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v9...v10)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: tj-actions/changed-files
  dependency-version: '47'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/setup-node
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: github/codeql-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/labeler
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/stale
  dependency-version: '10'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-10 16:45:57 +02:00
Albie 095033c626 feat: add undefined as a value in AxiosRequestConfig (#5560)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-11-06 21:15:33 +02:00
Eric Dubé d8bbebf4a4 docs: readme changes (#7042)
* doc: remove note about require and intellisense

This node about using `require()` appears above an example using ES6
imports, which doesn't follow. I suspect this example was updated and
removal of the note was overlooked.

* doc: modernize README.md examples with async/await

Many of the examples use `.then()` and `.catch()` when an `await`
with `try ... catch` would be more concise. This commit does not
change all examples in recognition of the fact that sometimes
`.then()` and `.catch()` are more sensible depending on the context.

---------

Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-11-06 20:39:03 +02:00
jasonsaayman 3f83143bfe feat: added copilot instructions 2025-11-06 20:38:28 +02:00
jasonsaayman 92acd4043d chore: exclude vscode file 2025-11-06 20:32:37 +02:00
Madhumita c497c4b2c3 docs: improved formatting and readability in Code of Conduct (#7198)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-11-06 20:29:13 +02:00
Anchal Singh 38fee81c80 chore: enhance form styling and input placeholders in examples (#7185)
* Enhance form styling and input placeholders

* Refactor HTML for multipart form data example

Updated the title and improved styling for better aesthetics. Enhanced the form layout and added theme toggle functionality.

---------

Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-11-06 20:20:31 +02:00
codenomnom 293a5aecfd docs: clarify interceptors execution order (#7201)
- Add 'Interceptor Execution Order' subsection
- Document reverse order for request interceptors
- Document normal order for response interceptors
- Add examples

Fixes #7200

Co-authored-by: Andrey <codenomnom@users.noreply.github.com>
2025-11-06 20:18:14 +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
Dmitriy Mozgovoy 12c314b603 perf(http): fix early loop exit; (#7202) 2025-11-04 00:43:10 +02:00
github-actions[bot] f6d79e773b chore(sponsor): update sponsor block (#7203)
Co-authored-by: DigitalBrainJS <12586868+DigitalBrainJS@users.noreply.github.com>
2025-11-03 14:35:24 +02:00
Kasper Isager Dalsgarð 0588880ac7 fix(http): use default export for http2 module to support stubs; (#7196) 2025-10-29 21:10:29 +02:00
github-actions[bot] 1ef8e7218b chore(release): v1.13.1 (#7194)
Co-authored-by: DigitalBrainJS <12586868+DigitalBrainJS@users.noreply.github.com>
2025-10-28 20:54:35 +02:00
Dmitriy Mozgovoy bcd5581d20 fix(http): fixed a regression that caused the data stream to be interrupted for responses with non-OK HTTP statuses; (#7193) 2025-10-28 20:44:08 +02:00
Anchal Singh c9b33712aa chore: enhance styling and responsiveness in client.html (#7173)
Updated CSS variables for light and dark modes, improved styling for various elements, and added responsive design features.

Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-10-27 21:08:09 +02:00
github-actions[bot] 9ead04d8ab [Release] v1.13.0 (#7189) 2025-10-27 18:07:18 +02:00
Dmitriy Mozgovoy d000fbfd07 fix(http2): fix possible race condition when handling http2 stream on almost timed out session by improving timeout out algorithm; (#7186) 2025-10-27 00:46:40 +02:00
Samyak Dandge 08db960d9f docs: added example for improved network error handling (with Wrapper/Middleware approach) (#7171)
* Added enhanced network error handling with wrapper approach

This file enhances error handling for network issues in Axios requests, providing detailed messages for various error scenarios.

* Added documentation for my approach to network errors

This document explains how to enhance Axios network error messages to be more descriptive and human-readable. It details the wrapper function and provides examples of usage.

* Update examples/improved-network-errors.md

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

* fix: md

---------

Co-authored-by: Jay <jasonsaayman@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-23 15:20:22 +02:00
Anchal Singh 46e1981d0f refactor: form data handling in index.html (#7170)
* Refactor form data handling in index.html

* Update examples/postMultipartFormData/index.html

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

* Update examples/postMultipartFormData/index.html

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-10-23 15:10:03 +02:00
Nikhil Simon Toppo 889f8ef8be docs: fix mismatched return type (#7172)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-10-23 14:39:30 +02:00
Dhvani Maktuporia 7b197ef6ce fix: sandbox ui updated (#7175) 2025-10-23 14:33:51 +02:00
ikuy1203 6dff629ee7 chore: fix typos in examples (#7166)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-10-20 09:23:22 +02:00
Dmitriy Mozgovoy d676df7722 feat(http): add HTTP2 support; (#7150) 2025-10-19 15:06:36 +03:00
Jane Wangari 015faeca9f fix(fetch): prevent TypeError when config.env is undefined (#7155) 2025-10-16 18:20:26 +03:00
Aviraj2929 c2911ccc6a docs: update Features section for clarity and readability (#7136)
* add contributors and documentation

* docs(adapters): add JSDoc for adapters module

* docs: add JSDoc comments to server.js

* docs: update Features section for clarity and readability

---------

Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-10-13 14:21:24 +02:00
Aviraj2929 e1f8ae627c docs: add JSDoc comments to server.js (#7135)
* add contributors and documentation

* docs(adapters): add JSDoc for adapters module

* docs: add JSDoc comments to server.js

---------

Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-10-12 16:49:35 +02:00
Usama Ayoub 9b9ec98548 fix: resolve issue #7131 (added spacing in mergeConfig.js) (#7133)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2025-10-12 16:47:04 +02:00