Commit Graph

16 Commits

Author SHA1 Message Date
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
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
Dmitriy Mozgovoy
fed1a4b2d7
fix(core): fix ReferenceError: navigator is not defined for custom environments; (#6567) 2024-08-23 15:16:42 +03:00
Dmitriy Mozgovoy
a3ff99b59d
feat(adapter): add fetch adapter; (#6371) 2024-04-28 22:33:49 +03:00
Dmitriy Mozgovoy
3dc8369e50
fix(platform): fixed emulated browser detection in node.js environment; (#6055) 2023-11-07 22:16:15 +02:00
lcysgsg
3772c8fe74
fix(blob): added a check to make sure the Blob class is available in the browser's global scope; (#5548) 2023-02-22 21:55:45 +02:00
Dmitriy Mozgovoy
a6dfa72010
fix(formdata): added a check to make sure the FormData class is available in the browser's global scope; (#5545) 2023-02-13 20:03:14 +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
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
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
Dmitriy Mozgovoy
934f390cc3
URL params serializer; (#4734)
* Refactored BuildURL helper to use URLSearchParams serializer;

* Updated typings;
Added TS test;
2022-05-25 08:16:38 +02:00
Dmitriy Mozgovoy
c30252f685
Added data URL support for node.js; (#4725)
* Added data URL support for node.js;
Added missed data URL protocol for the browser environment;
Optimized JSON parsing in the default response transformer;
Refactored project structure;
Added `cause` prop for AxiosError instance that refers to the original error if it was wrapped with `AxiosError.from` method;
Added fromDataURI helper;
Added test for handling data:url as an `arraybuffer|text|stream`;

* Added throwing of 405 HTTP error if the method is not GET;
2022-05-20 08:04:36 +02:00
Dmitriy Mozgovoy
bd391247b4
Added the ability for the url-encoded-form serializer to respect the formSerializer config; (#4721)
Added test for `formSerializer` config in context of `url-encoded-form` serializer;
2022-05-17 08:26:35 +02:00
Dmitriy Mozgovoy
c05ad48952
Fixed toFormData regression bug (unreleased) with Array-like objects serialization; (#4714)
Added `toURLEncodedForm` helper;
Added automatic payload serialization to `application/x-www-form-urlencoded` to have parity with `multipart/form-data`;
Added test of handling `application/x-www-form-urlencoded` body by express.js;
Updated README.md;
Added missed param in JSDoc;
Fixed hrefs in README.md;

Co-authored-by: Jay <jasonsaayman@gmail.com>
2022-05-16 08:30:17 +02:00