2
0
mirror of https://github.com/tenrok/axios.git synced 2026-05-24 14:04:14 +03:00
Commit Graph

525 Commits

Author SHA1 Message Date
github-actions[bot] 6600d51e6b [Release] v1.2.4 (#5487)
* chore(release): v1.2.4

* chore(changelog): update CHANGELOG;

Co-authored-by: DigitalBrainJS <DigitalBrainJS@users.noreply.github.com>
Co-authored-by: Dmitriy Mozgovoy <robotshara@gmail.com>
2023-01-24 19:20:59 +02:00
github-actions[bot] 484e0b6ed2 chore(release): v1.2.3 (#5459)
Co-authored-by: DigitalBrainJS <DigitalBrainJS@users.noreply.github.com>
Co-authored-by: Dmitriy Mozgovoy <robotshara@gmail.com>
2023-01-15 19:33:15 +02:00
Jay 45c4948416 chore: build new version 2022-12-29 08:21:12 +02:00
Dmitriy Mozgovoy 46085e6ffc chore(ci): fix release action;
* chore(ci): Add release-it script;
* fix(utils): redesigned logic for obtaining the global link;;
* chore(git): updated .gitignore;
chore(npm): updated .npmignore;
* chore(git): fix husky prepare script;
* chore(github): reworked npm release action step;
* chore(ci): add CHANGELOG.md contributors section generator;
* chore(deps): add `auto-changelog` to package.json;
2022-12-20 20:45:24 +02:00
Dmitriy Mozgovoy 1e58a659ec fix: fixed Brotli decompression; (#5353)
test: added decompression tests;
fix: added legacy `x-gzip` & `x-compress` encoding types;
2022-12-07 20:57:02 +02:00
Winnie 56e9ca1a86 fix: Add missing HttpStatusCode (#5345) 2022-12-06 22:34:48 +02:00
Jay 1fd79d3220 chore: release 1.2.1 2022-12-05 21:36:02 +02:00
Kevin Ennis 26874603b3 feat: export mergeConfig (#5151)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-12-01 20:41:57 +02:00
wenzheng e3d759491c fix: exception to sending formdata in webworker (#5139)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-12-01 19:15:23 +02:00
Dmitriy Mozgovoy 9041c7d272 Fixed decompression for responses without Content-Length header (#5306)
* Fixed decompression for responses without `content-length` header;

* Add Brotli encoding to the `Accept-Encoding` header only if it is supported.

* `content-length` header transformation moved up;

Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-12-01 16:22:20 +02:00
Ivan Barsukov 786b113a40 fix: removing multiple/trailing/leading whitespaces (#5022)
* fix: removing multiple/trailing/leading whitespaces

* Reverting changes in the dist directory

Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-11-25 15:56:31 +02:00
Arthur Fiorette cac6cfa6f6 fix: include config on new CancelledError (#4922)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-11-25 15:46:49 +02:00
Jay f92e167f76 chore(release): 1.2.0 2022-11-22 20:59:45 +02:00
Dmitriy Mozgovoy d032edda08 Refactored adapters loader; (#5277)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-11-22 20:53:56 +02:00
Dmitriy Mozgovoy a3d901777b Fixed Z_BUF_ERROR when content-encoding is set but the response body is empty; (#5250)
Fixed download progress capturing for compressed responses;

Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-11-22 20:49:26 +02:00
Dmitriy Mozgovoy b7ee49f637 Added toJSONObject util; (#5247)
Fixed AxiosError.toJSON method to avoid circular references;

Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-11-22 20:44:24 +02:00
Jay 3a7c363e54 chore: v1.2.0 pre-release 2022-11-10 20:59:51 +02:00
Jay bb59a737bb chore: release v1.2.0 2022-11-10 20:55:34 +02:00
Dmitriy Mozgovoy ab77a40e1c Fixed & Imporoved AxiosHeaders class (#5224)
* Refactored AxiosHeaders class;

* Added support for instances of AxiosHeaders as a value for the headers option;

Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-11-07 21:11:42 +02:00
Dmitriy Mozgovoy c0a723ab6c Added support for Axios to be loaded with require('axios').default; (#5225)
Added module import tests;

Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-11-07 20:32:24 +02:00
Dmitriy Mozgovoy 9452f06aa9 Force CI restart;
Force CI restart;
2022-11-07 20:24:23 +02:00
Dmitriy Mozgovoy 0c3a1e9fde Refactored module exports; (#5162)
* Refactored build pipeline;
Added module exports tests;
Added missing ESM export for parity with Axios factory;
Added `toFormData`, `formToJSON`, `isAxiosError`, `spread`, `isCancel`, `all` as named export to `index.d.ts`;

* Added ESM entry test;

* Updated README.md `installing` section;

* Added TypeScript importing test;
Added missed `CanceledError` & `AxiosHeaders` to `AxiosStatic` interface;

* Exclude `/test/module/` from tslint;
2022-10-30 18:46:17 +02:00
Jay 9bd53214f6 chore: release 1.1.3 2022-10-15 15:43:01 +02:00
ChronosMasterOfAllTime b0ebf9fcac Fix: Don't add null values to query string. (#5108)
* feat: add  boolean flag to mimic pre 1.x behavior for paramsSerializer custom function

* chore: update ParamsSerializer Readme

* fix: dont slice hash off URL if not appending params

* Omit nulls from formData serialization

* fix: dont add nulls or undefined values to arrays either

* readme update

* fix test

* chore: documentation

* chore: do TS properly

Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-10-15 15:01:59 +02:00
Dmitriy Mozgovoy 9d4b016dde feat: added custom params serializer support; (#5113)
* Added custom params serializer support;

* Added missed semicolon;
Fixed allowUnknown option;

Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-10-13 22:12:10 +02:00
Patrick Petrovic 717f476b0f fix: restore proxy config backwards compatibility with 0.x (#5097)
* fix: restore proxy config backwards compatibility with 0.x

* Formatting

Co-authored-by: Patrick Petrovic <patrick@Air-de-Patrick.lan>
Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-10-13 21:55:20 +02:00
Dmitriy Mozgovoy 110ae9ae61 fix: handling of array values for AxiosHeaders (#5085)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-10-13 21:11:01 +02:00
Jay 1b29f4e98e chore: release v1.1.2 2022-10-07 12:09:17 +02:00
Jay 1315e2282f chore: release v1.1.1 2022-10-07 11:08:35 +02:00
Jay 9fc94b7dcd fix: revert named exports 2022-10-07 10:43:43 +02:00
Jay a46beab152 fix: keep compatability with other changes 2022-10-07 10:24:18 +02:00
Jay 2149464bb4 fix: issue with exports not working correctly in common js scenarios 2022-10-07 10:19:25 +02:00
Jay 9c3dce366b chore: release v1.1.0 2022-10-06 21:17:46 +02:00
Richard Kořínek d701c7b591 Improved plain object checking (#5036) 2022-10-06 21:01:37 +02:00
Ivan Pepelko 7a06a3616f Fix commonjs & umd exports (#5030) 2022-10-06 10:59:47 +02:00
Dmitriy Mozgovoy 3e4d52171e Fixed query params composing; (#5018)
* Fixes #4999;

* Added regression test;
2022-10-05 21:29:50 +02:00
Trim21 d61dbede95 add missing export (#5003) 2022-10-05 08:02:35 +02:00
Jay ff34f6dd51 chore: release v1.0.0 2022-10-04 20:25:21 +02:00
C. T. Lin 7c60c6282a chore: simplify the import path of AxiosError (#4875)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-09-26 21:16:44 +02:00
WD daa426a01c fix: the error of calling extend to pass parameters #4844 (#4857)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-09-26 20:14:37 +02:00
felipedamin 738fa63661 Use WHATWG URL API instead of url.parse() (#4852)
* replace url.parse with new whatwg url api

* remove comments

* use const instead of var

Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-09-14 21:40:08 +02:00
Bassel Rachid 242c1d9782 fix(adapters/http): remove repeated compression algorithm (#4820)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-09-14 21:28:09 +02:00
Dmitriy Mozgovoy 379fdebc46 Fixed a regression bug with unsubscribing from cancel token; (#4819)
Reverts #4795;

Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-09-14 21:24:22 +02:00
Dmitriy Mozgovoy cd8989a987 Fixed missed minified builds; (#4805)
* Fixed missed minified builds;
Refactored utils.js;
Refactored `utils.isStandardBrowserEnv()` as a `platform/browser` property;
Added builds size log;

* Replaced `rollup-plugin-filesize` with `rollup-plugin-bundle-size`;

Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-08-01 19:13:14 +02:00
wenzheng d17d9a66c5 feat: brower platform add data protocol. (#4804)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-08-01 18:58:12 +02:00
Dmitriy Mozgovoy bdf493cf8b Axios ES2017 (#4787)
* Added AxiosHeaders class;

* Fixed README.md href;

* Fixed a potential bug with headers normalization;

* Fixed a potential bug with headers normalization;
Refactored accessor building routine;
Refactored default transforms;
Removed `normalizeHeaderName` helper;

* Added `Content-Length` accessor;
Added missed `has` accessor to TS types;

* Added `AxiosTransformStream` class;
Added progress capturing ability for node.js environment;
Added `maxRate` option to limit the data rate in node.js environment;
Refactored event handled by `onUploadProgress` && `onDownloadProgress` listeners in browser environment;
Added progress & data rate tests for the http adapter;
Added response stream aborting test;
Added a manual progress capture test for the browser;
Updated TS types;
Added TS tests;
Refactored request abort logic for the http adapter;
Added ability to abort the response stream;

* Remove `stream/promises` & `timers/promises` modules usage in tests;

* Use `abortcontroller-polyfill`;

* Fixed AxiosTransformStream dead-lock in legacy node versions;
Fixed CancelError emitting in streams;

* Reworked AxiosTransformStream internal logic to optimize memory consumption;
Added throwing an error if the request stream was silently destroying (without error) Refers to #3966;

* Treat the destruction of the request stream as a cancellation of the request;
Fixed tests;

* Emit `progress` event in the next tick;

* Initial refactoring;

* Refactored Mocha tests to use ESM;

* Refactored Karma tests to use rollup preprocessor & ESM;
Replaced grunt with gulp;
Improved dev scripts;
Added Babel for rollup build;

* Added default commonjs package export for Node build;
Added automatic contributors list generator for package.json;

Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-06-18 11:19:27 +02:00
visortelle 5ba3f787c4 Fix - Request ignores false, 0 and empty string as body values (#4785)
Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-06-14 21:56:17 +02:00
Jay 5db829d118 docs(adapters/http) 2022-06-02 20:57:16 +02:00
Jay 8a92772d16 docs(axios.js) 2022-06-02 20:56:53 +02:00
Jay 31fbee888f docs(cancel/CancelToken) 2022-06-02 20:56:32 +02:00