Visitar URL original
Merge branch 'v1.x' into create-typing · axios/axios@f727702 · GitHub
Skip to content

Commit f727702

Browse files
authored
Merge branch 'v1.x' into create-typing
2 parents 0a18b0a + 3f53eb6 commit f727702

60 files changed

Lines changed: 2726 additions & 832 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.eslintrc.cjs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
module.exports = {
22
"env": {
33
"browser": true,
4-
"es2017": true,
4+
"es2018": true,
55
"node": true
66
},
77
"extends": "eslint:recommended",
88
"parserOptions": {
9-
"ecmaVersion": 2017,
9+
"ecmaVersion": 2018,
1010
"sourceType": "module"
1111
},
1212
"rules": {

‎.github/ISSUE_TEMPLATE/BUG_REPORT.yml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ body:
2626
id: reproduce
2727
attributes:
2828
label: 'To Reproduce'
29-
description: Code snippet to reproduce, ideally that will work by pasting into something like https://npm.runkit.com/axios, a hosted solution, or a repository that illustrates the issue. **If your problem is not reproducible, please file under Support or Usage Question**
29+
description: |
30+
Code snippet to reproduce, ideally if you can provide a live example in https://codesandbox.io/ sandbox or a repository that illustrates the issue.
31+
(You can use https://codesandbox.io/p/sandbox/zen-knuth-9hvhzq as a node sandbox template, or https://codesandbox.io/s/axios-browser-issue-2l8jec as a browser template)
32+
**If your problem is not reproducible, please file under Support or Usage Question**
3033
validations:
3134
required: false
3235
- type: textarea

‎.github/workflows/ci.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ jobs:
2626
with:
2727
node-version: ${{ matrix.node-version }}
2828
cache: npm
29-
- run: npm install
29+
- run: npm ci
3030
- run: npm test

‎.github/workflows/pr.yml‎

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: Release PR
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
type:
6+
type: choice
7+
description: Choose release type
8+
options:
9+
- auto
10+
- patch
11+
- minor
12+
- major
13+
default: auto
14+
beta:
15+
type: boolean
16+
description: Prerelease
17+
default: false
18+
jobs:
19+
releaseIt:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v3
23+
with:
24+
fetch-depth: 0
25+
- name: git config
26+
run: |
27+
git config user.name "${GITHUB_ACTOR}"
28+
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
29+
- name: Setup node
30+
uses: actions/setup-node@v3
31+
with:
32+
node-version: 16
33+
cache: npm
34+
- run: npm ci
35+
- name: Prepare release
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
TYPE_ARG: ${{ fromJSON('{"auto":"", "patch":"--patch", "minor":"--minor", "major":"--major"}')[github.event.inputs.type] }}
39+
BETA_ARG: ${{ github.event.inputs.beta == 'true' && '--preRelease=beta' || '' }}
40+
run: npm run release -- --ci --verbose --no-git.push --no-git.commit --no-git.tag --no-github $TYPE_ARG $BETA_ARG $DRY_ARG
41+
- name: Show git status
42+
if: failure()
43+
run: git status && git diff
44+
- name: Add contributors list to CHANGELOG.md
45+
run: npm run release:changelog:fix
46+
env:
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+
- name: get-npm-version
49+
id: package-version
50+
uses: martinbeentjes/npm-get-version-action@main
51+
- name: Extract release notes
52+
id: extract-release-notes
53+
uses: ffurrer2/extract-release-notes@v1
54+
- name: Generate PR body
55+
id: body
56+
uses: mathiasvr/command-output@v1
57+
with:
58+
run: node ./bin/pr.js
59+
- name: Create pull request
60+
uses: peter-evans/create-pull-request@v4
61+
id: cpr
62+
with:
63+
branch: release
64+
delete-branch: true
65+
commit-message: 'chore(release): v${{ steps.package-version.outputs.current-version}}'
66+
title: '[Release] v${{ steps.package-version.outputs.current-version}}'
67+
body: |
68+
${{ steps.body.outputs.stdout }}
69+
## Release notes:
70+
${{ steps.extract-release-notes.outputs.release_notes }}
71+
labels: |
72+
release
73+
automated pr
74+
signoff: false
75+
#team-reviewers: |
76+
# owners
77+
# maintainers
78+
#assignees: jasonsaayman
79+
#reviewers: jasonsaayman
80+
draft: false
81+
- name: Show PR link
82+
if: ${{ steps.cpr.outputs.pull-request-url }}
83+
run: |
84+
echo "Axios Release v${{ steps.package-version.outputs.current-version}}' pull request - ${{ steps.cpr.outputs.pull-request-url }}"

‎.github/workflows/publish.yml‎

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Publish
2+
on:
3+
pull_request:
4+
types:
5+
- closed
6+
branches:
7+
- main
8+
- 'v**'
9+
workflow_dispatch:
10+
jobs:
11+
publish:
12+
if: github.event_name == 'workflow_dispatch' || (github.event.pull_request.merged == true && github.event.pull_request.head.label == 'axios:release')
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: "Release PR info"
16+
if: github.event_name != 'workflow_dispatch'
17+
run: echo "PR ${{ github.event.number }}"
18+
- uses: actions/checkout@v3
19+
- name: git config
20+
run: |
21+
git config user.name "${GITHUB_ACTOR}"
22+
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
23+
- uses: actions/setup-node@v3
24+
with:
25+
node-version: 16
26+
registry-url: https://registry.npmjs.org/
27+
- run: npm ci
28+
- name: get-npm-version
29+
id: package-version
30+
uses: martinbeentjes/npm-get-version-action@main
31+
- name: Extract release notes
32+
id: extract-release-notes
33+
uses: ffurrer2/extract-release-notes@v1
34+
- name: Check versions
35+
run: node ./bin/check-build-version.js
36+
############# TAG RELEASE ##############
37+
- name: "Push tag v${{ steps.package-version.outputs.current-version }}"
38+
uses: rickstaa/action-create-tag@v1
39+
id: tag_version
40+
with:
41+
tag: "v${{ steps.package-version.outputs.current-version }}"
42+
############# GITHUB RELEASE ##############
43+
- name: "Create a GitHub release v${{ steps.package-version.outputs.current-version }}"
44+
uses: ncipollo/release-action@v1
45+
with:
46+
tag: "v${{ steps.package-version.outputs.current-version }}"
47+
name: "Release v${{ steps.package-version.outputs.current-version }}"
48+
body: |
49+
## Release notes:
50+
${{ steps.extract-release-notes.outputs.release_notes }}
51+
############# NPM RELEASE ##############
52+
- name: Publish the release to NPM
53+
run: npm publish
54+
env:
55+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

‎CHANGELOG.md‎

Lines changed: 169 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,173 @@
11
# Changelog
22

3+
# [1.4.0](https://github.com/axios/axios/compare/v1.3.6...v1.4.0) (2023-04-27)
4+
5+
6+
### Bug Fixes
7+
8+
* **formdata:** add `multipart/form-data` content type for FormData payload on custom client environments; ([#5678](https://github.com/axios/axios/issues/5678)) ([bbb61e7](https://github.com/axios/axios/commit/bbb61e70cb1185adfb1cbbb86eaf6652c48d89d1))
9+
* **package:** export package internals with unsafe path prefix; ([#5677](https://github.com/axios/axios/issues/5677)) ([df38c94](https://github.com/axios/axios/commit/df38c949f26414d88ba29ec1e353c4d4f97eaf09))
10+
11+
12+
### Features
13+
14+
* **dns:** added support for a custom lookup function; ([#5339](https://github.com/axios/axios/issues/5339)) ([2701911](https://github.com/axios/axios/commit/2701911260a1faa5cc5e1afe437121b330a3b7bb))
15+
* **types:** export `AxiosHeaderValue` type. ([#5525](https://github.com/axios/axios/issues/5525)) ([726f1c8](https://github.com/axios/axios/commit/726f1c8e00cffa0461a8813a9bdcb8f8b9d762cf))
16+
17+
18+
### Performance Improvements
19+
20+
* **merge-config:** optimize mergeConfig performance by avoiding duplicate key visits; ([#5679](https://github.com/axios/axios/issues/5679)) ([e6f7053](https://github.com/axios/axios/commit/e6f7053bf1a3e87cf1f9da8677e12e3fe829d68e))
21+
22+
### Contributors to this release
23+
24+
- <img src="https://avatars.githubusercontent.com/u/12586868?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+151/-16 (#5684 #5339 #5679 #5678 #5677 )")
25+
- <img src="https://avatars.githubusercontent.com/u/47537704?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Arthur Fiorette](https://github.com/arthurfiorette "+19/-19 (#5525 )")
26+
- <img src="https://avatars.githubusercontent.com/u/43876655?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [PIYUSH NEGI](https://github.com/npiyush97 "+2/-18 (#5670 )")
27+
28+
## [1.3.6](https://github.com/axios/axios/compare/v1.3.5...v1.3.6) (2023-04-19)
29+
30+
31+
### Bug Fixes
32+
33+
* **types:** added transport to RawAxiosRequestConfig ([#5445](https://github.com/axios/axios/issues/5445)) ([6f360a2](https://github.com/axios/axios/commit/6f360a2531d8d70363fd9becef6a45a323f170e2))
34+
* **utils:** make isFormData detection logic stricter to avoid unnecessary calling of the `toString` method on the target; ([#5661](https://github.com/axios/axios/issues/5661)) ([aa372f7](https://github.com/axios/axios/commit/aa372f7306295dfd1100c1c2c77ce95c95808e76))
35+
36+
### Contributors to this release
37+
38+
- <img src="https://avatars.githubusercontent.com/u/12586868?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+48/-10 (#5665 #5661 #5663 )")
39+
- <img src="https://avatars.githubusercontent.com/u/5492927?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Michael Di Prisco](https://github.com/Cadienvan "+2/-0 (#5445 )")
40+
41+
## [1.3.5](https://github.com/axios/axios/compare/v1.3.4...v1.3.5) (2023-04-05)
42+
43+
44+
### Bug Fixes
45+
46+
* **headers:** fixed isValidHeaderName to support full list of allowed characters; ([#5584](https://github.com/axios/axios/issues/5584)) ([e7decef](https://github.com/axios/axios/commit/e7decef6a99f4627e27ed9ea5b00ce8e201c3841))
47+
* **params:** re-added the ability to set the function as `paramsSerializer` config; ([#5633](https://github.com/axios/axios/issues/5633)) ([a56c866](https://github.com/axios/axios/commit/a56c8661209d5ce5a645a05f294a0e08a6c1f6b3))
48+
49+
### Contributors to this release
50+
51+
- <img src="https://avatars.githubusercontent.com/u/12586868?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+28/-10 (#5633 #5584 )")
52+
53+
## [1.3.4](https://github.com/axios/axios/compare/v1.3.3...v1.3.4) (2023-02-22)
54+
55+
56+
### Bug Fixes
57+
58+
* **blob:** added a check to make sure the Blob class is available in the browser's global scope; ([#5548](https://github.com/axios/axios/issues/5548)) ([3772c8f](https://github.com/axios/axios/commit/3772c8fe74112a56e3e9551f894d899bc3a9443a))
59+
* **http:** fixed regression bug when handling synchronous errors inside the adapter; ([#5564](https://github.com/axios/axios/issues/5564)) ([a3b246c](https://github.com/axios/axios/commit/a3b246c9de5c3bc4b5a742e15add55b375479451))
60+
61+
### Contributors to this release
62+
63+
- <img src="https://avatars.githubusercontent.com/u/12586868?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+38/-26 (#5564 )")
64+
- <img src="https://avatars.githubusercontent.com/u/19550000?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [lcysgsg](https://github.com/lcysgsg "+4/-0 (#5548 )")
65+
- <img src="https://avatars.githubusercontent.com/u/5492927?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Michael Di Prisco](https://github.com/Cadienvan "+3/-0 (#5444 )")
66+
67+
## [1.3.3](https://github.com/axios/axios/compare/v1.3.2...v1.3.3) (2023-02-13)
68+
69+
70+
### Bug Fixes
71+
72+
* **formdata:** added a check to make sure the FormData class is available in the browser's global scope; ([#5545](https://github.com/axios/axios/issues/5545)) ([a6dfa72](https://github.com/axios/axios/commit/a6dfa72010db5ad52db8bd13c0f98e537e8fd05d))
73+
* **formdata:** fixed setting NaN as Content-Length for form payload in some cases; ([#5535](https://github.com/axios/axios/issues/5535)) ([c19f7bf](https://github.com/axios/axios/commit/c19f7bf770f90ae8307f4ea3104f227056912da1))
74+
* **headers:** fixed the filtering logic of the clear method; ([#5542](https://github.com/axios/axios/issues/5542)) ([ea87ebf](https://github.com/axios/axios/commit/ea87ebfe6d1699af072b9e7cd40faf8f14b0ab93))
75+
76+
### Contributors to this release
77+
78+
- <img src="https://avatars.githubusercontent.com/u/12586868?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+11/-7 (#5545 #5535 #5542 )")
79+
- <img src="https://avatars.githubusercontent.com/u/19842213?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [陈若枫](https://github.com/ruofee "+2/-2 (#5467 )")
80+
81+
## [1.3.2](https://github.com/axios/axios/compare/v1.3.1...v1.3.2) (2023-02-03)
82+
83+
84+
### Bug Fixes
85+
86+
* **http:** treat http://localhost as base URL for relative paths to avoid `ERR_INVALID_URL` error; ([#5528](https://github.com/axios/axios/issues/5528)) ([128d56f](https://github.com/axios/axios/commit/128d56f4a0fb8f5f2ed6e0dd80bc9225fee9538c))
87+
* **http:** use explicit import instead of TextEncoder global; ([#5530](https://github.com/axios/axios/issues/5530)) ([6b3c305](https://github.com/axios/axios/commit/6b3c305fc40c56428e0afabedc6f4d29c2830f6f))
88+
89+
### Contributors to this release
90+
91+
- <img src="https://avatars.githubusercontent.com/u/12586868?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+2/-1 (#5530 #5528 )")
92+
93+
## [1.3.1](https://github.com/axios/axios/compare/v1.3.0...v1.3.1) (2023-02-01)
94+
95+
96+
### Bug Fixes
97+
98+
* **formdata:** add hotfix to use the asynchronous API to compute the content-length header value; ([#5521](https://github.com/axios/axios/issues/5521)) ([96d336f](https://github.com/axios/axios/commit/96d336f527619f21da012fe1f117eeb53e5a2120))
99+
* **serializer:** fixed serialization of array-like objects; ([#5518](https://github.com/axios/axios/issues/5518)) ([08104c0](https://github.com/axios/axios/commit/08104c028c0f9353897b1b6691d74c440fd0c32d))
100+
101+
### Contributors to this release
102+
103+
- <img src="https://avatars.githubusercontent.com/u/12586868?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+27/-8 (#5521 #5518 )")
104+
105+
# [1.3.0](https://github.com/axios/axios/compare/v1.2.6...v1.3.0) (2023-01-31)
106+
107+
108+
### Bug Fixes
109+
110+
* **headers:** fixed & optimized clear method; ([#5507](https://github.com/axios/axios/issues/5507)) ([9915635](https://github.com/axios/axios/commit/9915635c69d0ab70daca5738488421f67ca60959))
111+
* **http:** add zlib headers if missing ([#5497](https://github.com/axios/axios/issues/5497)) ([65e8d1e](https://github.com/axios/axios/commit/65e8d1e28ce829f47a837e45129730e541950d3c))
112+
113+
114+
### Features
115+
116+
* **fomdata:** added support for spec-compliant FormData & Blob types; ([#5316](https://github.com/axios/axios/issues/5316)) ([6ac574e](https://github.com/axios/axios/commit/6ac574e00a06731288347acea1e8246091196953))
117+
118+
### Contributors to this release
119+
120+
- <img src="https://avatars.githubusercontent.com/u/12586868?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+352/-67 (#5514 #5512 #5510 #5509 #5508 #5316 #5507 )")
121+
- <img src="https://avatars.githubusercontent.com/u/35015993?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [ItsNotGoodName](https://github.com/ItsNotGoodName "+43/-2 (#5497 )")
122+
123+
## [1.2.6](https://github.com/axios/axios/compare/v1.2.5...v1.2.6) (2023-01-28)
124+
125+
126+
### Bug Fixes
127+
128+
* **headers:** added missed Authorization accessor; ([#5502](https://github.com/axios/axios/issues/5502)) ([342c0ba](https://github.com/axios/axios/commit/342c0ba9a16ea50f5ed7d2366c5c1a2c877e3f26))
129+
* **types:** fixed `CommonRequestHeadersList` & `CommonResponseHeadersList` types to be private in commonJS; ([#5503](https://github.com/axios/axios/issues/5503)) ([5a3d0a3](https://github.com/axios/axios/commit/5a3d0a3234d77361a1bc7cedee2da1e11df08e2c))
130+
131+
### Contributors to this release
132+
133+
- ![avatar](https://avatars.githubusercontent.com/u/12586868?v&#x3D;4&amp;s&#x3D;16) [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+24/-9 (#5503 #5502 )")
134+
135+
## [1.2.5](https://github.com/axios/axios/compare/v1.2.4...v1.2.5) (2023-01-26)
136+
137+
138+
### Bug Fixes
139+
140+
* **types:** fixed AxiosHeaders to handle spread syntax by making all methods non-enumerable; ([#5499](https://github.com/axios/axios/issues/5499)) ([580f1e8](https://github.com/axios/axios/commit/580f1e8033a61baa38149d59fd16019de3932c22))
141+
142+
### Contributors to this release
143+
144+
- ![avatar](https://avatars.githubusercontent.com/u/12586868?v&#x3D;4&amp;s&#x3D;16) [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+82/-54 (#5499 )")
145+
- ![avatar](https://avatars.githubusercontent.com/u/20516159?v&#x3D;4&amp;s&#x3D;16) [Elliot Ford](https://github.com/EFord36 "+1/-1 (#5462 )")
146+
147+
## [1.2.4](https://github.com/axios/axios/compare/v1.2.3...v1.2.4) (2023-01-22)
148+
149+
150+
### Bug Fixes
151+
152+
* **types:** renamed `RawAxiosRequestConfig` back to `AxiosRequestConfig`; ([#5486](https://github.com/axios/axios/issues/5486)) ([2a71f49](https://github.com/axios/axios/commit/2a71f49bc6c68495fa419003a3107ed8bd703ad0))
153+
* **types:** fix `AxiosRequestConfig` generic; ([#5478](https://github.com/axios/axios/issues/5478)) ([9bce81b](https://github.com/axios/axios/commit/186ea062da8b7d578ae78b1a5c220986b9bce81b))
154+
155+
### Contributors to this release
156+
157+
- ![avatar](https://avatars.githubusercontent.com/u/12586868?v&#x3D;4&amp;s&#x3D;16) [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+242/-108 (#5486 #5482 )")
158+
- ![avatar](https://avatars.githubusercontent.com/u/9430821?v&#x3D;4&amp;s&#x3D;16) [Daniel Hillmann](https://github.com/hilleer "+1/-1 (#5478 )")
159+
160+
## [1.2.3](https://github.com/axios/axios/compare/1.2.2...1.2.3) (2023-01-10)
161+
162+
163+
### Bug Fixes
164+
165+
* **types:** fixed AxiosRequestConfig header interface by refactoring it to RawAxiosRequestConfig; ([#5420](https://github.com/axios/axios/issues/5420)) ([0811963](https://github.com/axios/axios/commit/08119634a22f1d5b19f5c9ea0adccb6d3eebc3bc))
166+
167+
### Contributors to this release
168+
169+
- ![avatar](https://avatars.githubusercontent.com/u/12586868?v&#x3D;4&amp;s&#x3D;16) [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+938/-442 (#5456 #5455 #5453 #5451 #5449 #5447 #5446 #5443 #5442 #5439 #5420 )")
170+
3171
## [1.2.2] - 2022-12-29
4172

5173
### Fixed
@@ -371,4 +539,4 @@
371539
- [Marco Weber](https://github.com/mrcwbr)
372540
- [Luca Pizzini](https://github.com/lpizzinidev)
373541
- [Willian Agostini](https://github.com/WillianAgostini)
374-
- [Huyen Nguyen](https://github.com/huyenltnguyen)
542+
- [Huyen Nguyen](https://github.com/huyenltnguyen)

0 commit comments

Comments
 (0)