Skip to content

Commit

Permalink
Merge pull request #209 from axios/v1.x
Browse files Browse the repository at this point in the history
Create a new pull request by comparing changes across two branches
  • Loading branch information
GulajavaMinistudio committed Jan 24, 2024
2 parents 62afb94 + 6d4c421 commit a0e7399
Show file tree
Hide file tree
Showing 22 changed files with 85 additions and 28 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/notify.yml
Expand Up @@ -12,12 +12,12 @@ on:
# branches:
# - main
# - 'v**'
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
branches:
- main
- 'v**'
#push:
# tags:
# - 'v[0-9]+.[0-9]+.[0-9]+'
# branches:
# - main
# - 'v**'

workflow_dispatch:
inputs:
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/publish.yml
Expand Up @@ -56,3 +56,25 @@ jobs:
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
notify:
needs: [publish]
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: 18
cache: npm
- run: npm ci
############# Add release comments and tags to published PRs ##############
- name: Notify published PRs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: node ./bin/actions/notify_published.js --tag ${{ github.event.inputs.tag || github.event.release.tag_name }}
13 changes: 13 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,18 @@
# Changelog

## [1.6.5](https://github.com/axios/axios/compare/v1.6.4...v1.6.5) (2024-01-05)


### Bug Fixes

* **ci:** refactor notify action as a job of publish action; ([#6176](https://github.com/axios/axios/issues/6176)) ([0736f95](https://github.com/axios/axios/commit/0736f95ce8776366dc9ca569f49ba505feb6373c))
* **dns:** fixed lookup error handling; ([#6175](https://github.com/axios/axios/issues/6175)) ([f4f2b03](https://github.com/axios/axios/commit/f4f2b039dd38eb4829e8583caede4ed6d2dd59be))

### Contributors to this release

- <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 "+41/-6 (#6176 #6175 )")
- <img src="https://avatars.githubusercontent.com/u/4814473?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Jay](https://github.com/jasonsaayman "+6/-1 ()")

## [1.6.4](https://github.com/axios/axios/compare/v1.6.3...v1.6.4) (2024-01-03)


Expand Down
7 changes: 6 additions & 1 deletion README.md
Expand Up @@ -11,7 +11,12 @@
<img width="400px" src="https://github.com/axios/axios/assets/4814473/75c37f4d-36e6-44f5-a068-3edd77c00a10" />
</picture>
</a>
<p>Alloy is the integration development platform that makes it simple and <br>fast for SaaS companies to launch critical user-facing integrations.</p>

<p align="center">Alloy is the integration development platform that makes it simple and <br>fast for SaaS companies to launch critical user-facing integrations.</p>
<p align="center">
<a href="https://runalloy.com/signup?utm_source=github&utm_medium=referral&utm_campaign=11823_axios"><b>Sign up free</b></a> •
<a href="https://docs.runalloy.com/docs?utm_source=github&utm_medium=referral&utm_campaign=11823_axios"><b>Documentation</b></a>
</p>
<br><br>
</div>

Expand Down
2 changes: 1 addition & 1 deletion bower.json
@@ -1,7 +1,7 @@
{
"name": "axios",
"main": "./dist/axios.js",
"version": "1.6.4",
"version": "1.6.5",
"homepage": "https://axios-http.com",
"authors": [
"Matt Zabriskie"
Expand Down
4 changes: 2 additions & 2 deletions dist/axios.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/axios.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/axios.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/axios.min.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/browser/axios.cjs
@@ -1,4 +1,4 @@
// Axios v1.6.4 Copyright (c) 2024 Matt Zabriskie and contributors
// Axios v1.6.5 Copyright (c) 2024 Matt Zabriskie and contributors
'use strict';

function bind(fn, thisArg) {
Expand Down Expand Up @@ -2658,7 +2658,7 @@ function mergeConfig(config1, config2) {
return config;
}

const VERSION = "1.6.4";
const VERSION = "1.6.5";

const validators$1 = {};

Expand Down
2 changes: 1 addition & 1 deletion dist/browser/axios.cjs.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/esm/axios.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/esm/axios.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/esm/axios.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/esm/axios.min.js.map

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions dist/node/axios.cjs
@@ -1,4 +1,4 @@
// Axios v1.6.4 Copyright (c) 2024 Matt Zabriskie and contributors
// Axios v1.6.5 Copyright (c) 2024 Matt Zabriskie and contributors
'use strict';

const FormData$1 = require('form-data');
Expand Down Expand Up @@ -2022,7 +2022,7 @@ function buildFullPath(baseURL, requestedURL) {
return requestedURL;
}

const VERSION = "1.6.4";
const VERSION = "1.6.5";

function parseProtocol(url) {
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
Expand Down Expand Up @@ -2653,6 +2653,10 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
// hotfix to support opt.all option which is required for node 20.x
lookup = (hostname, opt, cb) => {
_lookup(hostname, opt, (err, arg0, arg1) => {
if (err) {
return cb(err);
}

const addresses = utils$1.isArray(arg0) ? arg0.map(addr => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];

opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
Expand Down
2 changes: 1 addition & 1 deletion dist/node/axios.cjs.map

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions lib/adapters/http.js
Expand Up @@ -171,6 +171,10 @@ export default isHttpAdapterSupported && function httpAdapter(config) {
// hotfix to support opt.all option which is required for node 20.x
lookup = (hostname, opt, cb) => {
_lookup(hostname, opt, (err, arg0, arg1) => {
if (err) {
return cb(err);
}

const addresses = utils.isArray(arg0) ? arg0.map(addr => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)];

opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
Expand Down
2 changes: 1 addition & 1 deletion lib/env/data.js
@@ -1 +1 @@
export const VERSION = "1.6.4";
export const VERSION = "1.6.5";
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "axios",
"version": "1.6.4",
"version": "1.6.5",
"description": "Promise based HTTP client for the browser and node.js",
"main": "index.js",
"exports": {
Expand Down
9 changes: 9 additions & 0 deletions test/unit/adapters/http.js
Expand Up @@ -9,6 +9,7 @@ import util from 'util';
import assert from 'assert';
import fs from 'fs';
import path from 'path';
import {lookup} from 'dns';
let server, proxy;
import AxiosError from '../../../lib/core/AxiosError.js';
import FormDataLegacy from 'form-data';
Expand Down Expand Up @@ -2216,5 +2217,13 @@ describe('supports http with nodejs', function () {

assert.strictEqual(data, payload);
});

it('should handle errors', () => {
return assert.rejects(async () => {
await axios.get('https://no-such-domain-987654.com', {
lookup
});
}, /ENOTFOUND/);
});
});
});

0 comments on commit a0e7399

Please sign in to comment.