Skip to content

Fixed default transitional config for custom Axios instance;#4052

Merged
jasonsaayman merged 3 commits intoaxios:release/v0.22.0from
DigitalBrainJS:fix/merge-transitional-config
Sep 17, 2021
Merged

Fixed default transitional config for custom Axios instance;#4052
jasonsaayman merged 3 commits intoaxios:release/v0.22.0from
DigitalBrainJS:fix/merge-transitional-config

Conversation

@DigitalBrainJS
Copy link
Copy Markdown
Collaborator

  • Fixed default transitional config for custom Axios instances. Probably refers to Version 0.21.4 is not applicable to 0.21.1 #4049. To my surprise, the default configuration is not merged with the config for custom Axios instances, so it is not accessible for the code if the user creates its own Axios instance.
  • Refactored core/mergeConfig helper

@jasonsaayman
Copy link
Copy Markdown
Member

@DigitalBrainJS awesome lets try get this out with 0.22, can you rebase onto that branch?

@DigitalBrainJS DigitalBrainJS changed the base branch from master to release/v0.22.0 September 15, 2021 10:44
@DigitalBrainJS
Copy link
Copy Markdown
Collaborator Author

DigitalBrainJS commented Sep 15, 2021

@jasonsaayman Done. It looks like we will need to refactor the merge logic a bit more in the future since I see no reason why we need to support special undefined behavior only for the validateStatus option, since it can be set to null as TS typings defines, and the code doesn't actually rely on undefined only on nullable. Also, IMHO using undefined as the relevant value is a bad idea.

@jasonsaayman
Copy link
Copy Markdown
Member

@DigitalBrainJS thats fine, can you please check conflicts? Please ping me when this is ready for me to finish up 0.22

… fix/merge-transitional-config

� Conflicts:
�	lib/adapters/http.js
�	lib/adapters/xhr.js
@DigitalBrainJS
Copy link
Copy Markdown
Collaborator Author

@jasonsaayman Done.

@jasonsaayman jasonsaayman modified the milestone: 4049 Sep 17, 2021
@jasonsaayman jasonsaayman linked an issue Sep 17, 2021 that may be closed by this pull request
@jasonsaayman jasonsaayman merged commit 6100f69 into axios:release/v0.22.0 Sep 17, 2021
@jasonsaayman jasonsaayman mentioned this pull request Oct 1, 2021
jasonsaayman added a commit that referenced this pull request Oct 1, 2021
* fix/Avoid package.json import; (#4041)

* Added auto-generated config module `env/data.js` for importing package environment vars without importing the whole `package.json`;
Refactored `http.js` to use `env/data.js` instead of package.json;

* Added `env/data.js`;
Added `env/README.md`;

* Feat/export package version constant (#4065)

* Added auto-generated config module `env/data.js` for importing package environment vars without importing the whole `package.json`;
Refactored `http.js` to use `env/data.js` instead of package.json;

* Added `env/data.js`;
Added `env/README.md`;

* Export package version constant;

* Fixed cancelToken leakage; Added AbortController support; (#3305)

* Fixed cancelToken leakage;
Added AbortController support;

* Fixed typings;

* Documented `signal` option;

* Added processing of early cancellation using AbortController without sending a request;

Co-authored-by: Jay <jasonsaayman@gmail.com>

* Updating CI to run on release branches

* Fixed default transitional config for custom Axios instance; (#4052)

Refactored `/core/mergeConfig`;

Co-authored-by: Jay <jasonsaayman@gmail.com>

* Prepping v0.22.0 for release

* Updated date

Co-authored-by: Dmitriy Mozgovoy <robotshara@gmail.com>
jasonsaayman added a commit that referenced this pull request Oct 6, 2021
* fix/Avoid package.json import; (#4041)

* Added auto-generated config module `env/data.js` for importing package environment vars without importing the whole `package.json`;
Refactored `http.js` to use `env/data.js` instead of package.json;

* Added `env/data.js`;
Added `env/README.md`;

* Feat/export package version constant (#4065)

* Added auto-generated config module `env/data.js` for importing package environment vars without importing the whole `package.json`;
Refactored `http.js` to use `env/data.js` instead of package.json;

* Added `env/data.js`;
Added `env/README.md`;

* Export package version constant;

* Fixed cancelToken leakage; Added AbortController support; (#3305)

* Fixed cancelToken leakage;
Added AbortController support;

* Fixed typings;

* Documented `signal` option;

* Added processing of early cancellation using AbortController without sending a request;

Co-authored-by: Jay <jasonsaayman@gmail.com>

* Updating CI to run on release branches

* Fixed default transitional config for custom Axios instance; (#4052)

Refactored `/core/mergeConfig`;

Co-authored-by: Jay <jasonsaayman@gmail.com>

* Prepping v0.22.0 for release

* Updated date

Co-authored-by: Dmitriy Mozgovoy <robotshara@gmail.com>
mbargiel pushed a commit to mbargiel/axios that referenced this pull request Jan 27, 2022
* fix/Avoid package.json import; (axios#4041)

* Added auto-generated config module `env/data.js` for importing package environment vars without importing the whole `package.json`;
Refactored `http.js` to use `env/data.js` instead of package.json;

* Added `env/data.js`;
Added `env/README.md`;

* Feat/export package version constant (axios#4065)

* Added auto-generated config module `env/data.js` for importing package environment vars without importing the whole `package.json`;
Refactored `http.js` to use `env/data.js` instead of package.json;

* Added `env/data.js`;
Added `env/README.md`;

* Export package version constant;

* Fixed cancelToken leakage; Added AbortController support; (axios#3305)

* Fixed cancelToken leakage;
Added AbortController support;

* Fixed typings;

* Documented `signal` option;

* Added processing of early cancellation using AbortController without sending a request;

Co-authored-by: Jay <jasonsaayman@gmail.com>

* Updating CI to run on release branches

* Fixed default transitional config for custom Axios instance; (axios#4052)

Refactored `/core/mergeConfig`;

Co-authored-by: Jay <jasonsaayman@gmail.com>

* Prepping v0.22.0 for release

* Updated date

Co-authored-by: Dmitriy Mozgovoy <robotshara@gmail.com>
mbargiel pushed a commit to mbargiel/axios that referenced this pull request Jan 27, 2022
* fix/Avoid package.json import; (axios#4041)

* Added auto-generated config module `env/data.js` for importing package environment vars without importing the whole `package.json`;
Refactored `http.js` to use `env/data.js` instead of package.json;

* Added `env/data.js`;
Added `env/README.md`;

* Feat/export package version constant (axios#4065)

* Added auto-generated config module `env/data.js` for importing package environment vars without importing the whole `package.json`;
Refactored `http.js` to use `env/data.js` instead of package.json;

* Added `env/data.js`;
Added `env/README.md`;

* Export package version constant;

* Fixed cancelToken leakage; Added AbortController support; (axios#3305)

* Fixed cancelToken leakage;
Added AbortController support;

* Fixed typings;

* Documented `signal` option;

* Added processing of early cancellation using AbortController without sending a request;

Co-authored-by: Jay <jasonsaayman@gmail.com>

* Updating CI to run on release branches

* Fixed default transitional config for custom Axios instance; (axios#4052)

Refactored `/core/mergeConfig`;

Co-authored-by: Jay <jasonsaayman@gmail.com>

* Prepping v0.22.0 for release

* Updated date

Co-authored-by: Dmitriy Mozgovoy <robotshara@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Version 0.21.4 is not applicable to 0.21.1

2 participants