Skip to content

Commit

Permalink
Merge branch 'v1.x' of https://github.com/axios/axios into feat/http-…
Browse files Browse the repository at this point in the history
…adapter-family-lookup

� Conflicts:
�	lib/adapters/http.js
�	lib/utils.js
�	test/module/typings/esm/index.ts
�	test/unit/adapters/http.js
  • Loading branch information
DigitalBrainJS committed Apr 25, 2023
2 parents b6c089e + e6f7053 commit 0d0fbd7
Show file tree
Hide file tree
Showing 72 changed files with 14,209 additions and 1,381 deletions.
5 changes: 4 additions & 1 deletion .github/ISSUE_TEMPLATE/BUG_REPORT.yml
Expand Up @@ -26,7 +26,10 @@ body:
id: reproduce
attributes:
label: 'To Reproduce'
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**
description: |
Code snippet to reproduce, ideally if you can provide a live example in https://codesandbox.io/ sandbox or a repository that illustrates the issue.
(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)
**If your problem is not reproducible, please file under Support or Usage Question**
validations:
required: false
- type: textarea
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/SUPPORT_QUESTION.yml
@@ -1,4 +1,4 @@
name: '🤔 Support or Usage Questiont'
name: '🤔 Support or Usage Question'
description: Get help using Axios.
labels: ['question']
body:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Expand Up @@ -26,5 +26,5 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
cache: npm
- run: npm install
- run: npm ci
- run: npm test
84 changes: 84 additions & 0 deletions .github/workflows/pr.yml
@@ -0,0 +1,84 @@
name: Release PR
on:
workflow_dispatch:
inputs:
type:
type: choice
description: Choose release type
options:
- auto
- patch
- minor
- major
default: auto
beta:
type: boolean
description: Prerelease
default: false
jobs:
releaseIt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: git config
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
cache: npm
- run: npm ci
- name: Prepare release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TYPE_ARG: ${{ fromJSON('{"auto":"", "patch":"--patch", "minor":"--minor", "major":"--major"}')[github.event.inputs.type] }}
BETA_ARG: ${{ github.event.inputs.beta == 'true' && '--preRelease=beta' || '' }}
run: npm run release -- --ci --verbose --no-git.push --no-git.commit --no-git.tag --no-github $TYPE_ARG $BETA_ARG $DRY_ARG
- name: Show git status
if: failure()
run: git status && git diff
- name: Add contributors list to CHANGELOG.md
run: npm run release:changelog:fix
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: get-npm-version
id: package-version
uses: martinbeentjes/npm-get-version-action@main
- name: Extract release notes
id: extract-release-notes
uses: ffurrer2/extract-release-notes@v1
- name: Generate PR body
id: body
uses: mathiasvr/command-output@v1
with:
run: node ./bin/pr.js
- name: Create pull request
uses: peter-evans/create-pull-request@v4
id: cpr
with:
branch: release
delete-branch: true
commit-message: 'chore(release): v${{ steps.package-version.outputs.current-version}}'
title: '[Release] v${{ steps.package-version.outputs.current-version}}'
body: |
${{ steps.body.outputs.stdout }}
## Release notes:
${{ steps.extract-release-notes.outputs.release_notes }}
labels: |
release
automated pr
signoff: false
#team-reviewers: |
# owners
# maintainers
#assignees: jasonsaayman
#reviewers: jasonsaayman
draft: false
- name: Show PR link
if: ${{ steps.cpr.outputs.pull-request-url }}
run: |
echo "Axios Release v${{ steps.package-version.outputs.current-version}}' pull request - ${{ steps.cpr.outputs.pull-request-url }}"
55 changes: 55 additions & 0 deletions .github/workflows/publish.yml
@@ -0,0 +1,55 @@
name: Publish
on:
pull_request:
types:
- closed
branches:
- main
- 'v**'
workflow_dispatch:
jobs:
publish:
if: github.event_name == 'workflow_dispatch' || (github.event.pull_request.merged == true && github.event.pull_request.head.label == 'axios:release')
runs-on: ubuntu-latest
steps:
- name: "Release PR info"
if: github.event_name != 'workflow_dispatch'
run: echo "PR ${{ github.event.number }}"
- uses: actions/checkout@v3
- name: git config
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- run: npm ci
- name: get-npm-version
id: package-version
uses: martinbeentjes/npm-get-version-action@main
- name: Extract release notes
id: extract-release-notes
uses: ffurrer2/extract-release-notes@v1
- name: Check versions
run: node ./bin/check-build-version.js
############# TAG RELEASE ##############
- name: "Push tag v${{ steps.package-version.outputs.current-version }}"
uses: rickstaa/action-create-tag@v1
id: tag_version
with:
tag: "v${{ steps.package-version.outputs.current-version }}"
############# GITHUB RELEASE ##############
- name: "Create a GitHub release v${{ steps.package-version.outputs.current-version }}"
uses: ncipollo/release-action@v1
with:
tag: "v${{ steps.package-version.outputs.current-version }}"
name: "Release v${{ steps.package-version.outputs.current-version }}"
body: |
## Release notes:
${{ steps.extract-release-notes.outputs.release_notes }}
############# NPM RELEASE ##############
- name: Publish the release to NPM
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
57 changes: 57 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,57 @@
name: Release Axios
on:
workflow_dispatch:
inputs:
type:
type: choice
description: Choose release type
options:
- auto
- patch
- minor
- major
default: auto
beta:
type: boolean
description: Prerelease
default: false
npm:
type: boolean
description: NPM release
default: true
dry:
type: boolean
description: Dry release
default: false
jobs:
releaseIt:
runs-on: ubuntu-latest
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: git config
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
cache: npm
- name: npm credentials
run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
- run: npm install
- name: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TYPE_ARG: ${{ fromJSON('{"auto":"", "patch":"--patch", "minor":"--minor", "major":"--major"}')[github.event.inputs.type] }}
BETA_ARG: ${{ github.event.inputs.beta == 'true' && '--preRelease=beta' || '' }}
DRY_ARG: ${{ github.event.inputs.dry == 'true' && '--dry-run' || '' }}
run: npm run release -- --ci --verbose $TYPE_ARG $BETA_ARG $DRY_ARG
- name: npm-release
if: ${{ github.event.inputs.dry == 'false' && github.event.inputs.npm == 'true' }}
run: npm publish
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Close Stale Issues
uses: actions/stale@v6
uses: actions/stale@v7
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: |
Expand Down
7 changes: 4 additions & 3 deletions .gitignore
Expand Up @@ -3,10 +3,11 @@
.tscache
.DS_Store
node_modules/
typings/
coverage/
test/typescript/axios.js*
sauce_connect.log
test/module/cjs/node_modules/
test/module/cjs/package-lock.json
test/module/**/package-lock.json
backup/
/.husky/
.npmrc
.env
30 changes: 11 additions & 19 deletions .npmignore
@@ -1,19 +1,11 @@
**/.*
*.iml
coverage/
examples/
node_modules/
typings/
sandbox/
test/
bower.json
CODE_OF_CONDUCT.md
COLLABORATOR_GUIDE.md
CONTRIBUTING.md
COOKBOOK.md
ECOSYSTEM.md
Gruntfile.js
karma.conf.js
webpack.*.js
sauce_connect.log
backup/
**/*
!/dist/**
!/lib/**
!index.js
!index.d.ts
!index.d.cts
!CHANGELOG.md
!LICENSE
!MIGRATION_GUIDE.md
!README.md
!SECURITY.md

0 comments on commit 0d0fbd7

Please sign in to comment.