Bumped version of axios to 0.19.0

This commit is contained in:
Amar Zavery 2019-06-01 18:12:07 -07:00
Родитель 451f17e3e5
Коммит 0e1c327a8f
4 изменённых файлов: 19 добавлений и 18 удалений

Просмотреть файл

@ -1,37 +1,42 @@
# Changelog
# 1.8.7 - 2019-05-16
## 1.8.8 - 2019-06-03
- Fixed vulnerabilities by bumping `axios` to `^0.19.0`.
- New version of axios fixed some issues hence removed one of the workarounds of uppercasing method names while following redirects [axios PR](https://github.com/axios/axios/pull/1758).
## 1.8.7 - 2019-05-16
- Fixed issue [#347](https://github.com/Azure/ms-rest-js/issues/347), [#348](https://github.com/Azure/ms-rest-js/issues/348) in PR [#349](https://github.com/Azure/ms-rest-js/pull/349)
# 1.8.6 - 2019-05-10
## 1.8.6 - 2019-05-10
- Added script to run tests on dependent projects [#345](https://github.com/Azure/ms-rest-js/pull/345)
# 1.8.4 - 2019-05-07
## 1.8.4 - 2019-05-07
- Fixed incorrect undefined check in Axios client [62b65d](https://github.com/Azure/ms-rest-js/commit/ea7ceb86f1e6e6f7879e7e7ddfe791113762b65d#diff-b9cfc7f2cdf78a7f4b91a753d10865a2)
- Added TSLint check. Fix TSLint errors [#344](https://github.com/Azure/ms-rest-js/pull/344)
# 1.8.2 - 2019-04-25
## 1.8.2 - 2019-04-25
- Fixed http over https bug [#341](https://github.com/Azure/ms-rest-js/pull/341)
# 1.8.1 - 2019-04-01
## 1.8.1 - 2019-04-01
- Fixed serialization issue when required object is empty [#337](https://github.com/Azure/ms-rest-js/pull/337)
# 1.8.0 - 2019-03-18
## 1.8.0 - 2019-03-18
- Added exports to several request policy factory methods [#336](https://github.com/Azure/ms-rest-js/pull/336)
# 1.7.0 - 2019-02-11
## 1.7.0 - 2019-02-11
- Added userAgentHeaderName to ServiceClientOptions [#330](https://github.com/Azure/ms-rest-js/pull/330)
# 1.6.0 - 2019-01-30
## 1.6.0 - 2019-01-30
- Fixed including proxy policy in browser [0c552f](https://github.com/Azure/ms-rest-js/commit/fafa26180e591db43d43c9cf0c7e93c8030c552f#diff-b9cfc7f2cdf78a7f4b91a753d10865a2)
# 1.5.3 - 2019-01-25
- Brought Axios interceptors back [c33602](https://github.com/Azure/ms-rest-js/commit/c1742fe6a80ed9b794115362633e0a8307c33602#diff-b9cfc7f2cdf78a7f4b91a753d10865a2)
# 1.5.2 - 2019-01-25
## 1.5.2 - 2019-01-25
- Added HTTP(S) over HTTP(S) proxy support [2b1844](https://github.com/Azure/ms-rest-js/commit/1ee5a40d5016e286a7492c8cbd7b08d5c92b1844#diff-b9cfc7f2cdf78a7f4b91a753d10865a2)
- Added `@types/tunnel` [0865a2](https://github.com/Azure/ms-rest-js/commit/7a9b496d04294446f940f1549fb0a44dd9b94c01#diff-b9cfc7f2cdf78a7f4b91a753d10865a2)
# 1.5.1 - 2019-01-22
## 1.5.1 - 2019-01-22
- Fixed default HTTP client tests [c75b87](https://github.com/Azure/ms-rest-js/commit/4c2b1c5390deab989b5ec9cadb84891de9c75b87#diff-b9cfc7f2cdf78a7f4b91a753d10865a2)
## 1.5.0 - 2019-01-15

Просмотреть файл

@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
import axios, { AxiosError, AxiosRequestConfig, AxiosResponse } from "axios";
import axios, { AxiosError, AxiosRequestConfig, AxiosResponse, Method } from "axios";
import { Transform, Readable } from "stream";
import FormData from "form-data";
import * as tough from "tough-cookie";
@ -121,7 +121,7 @@ export class AxiosHttpClient implements HttpClient {
let res: AxiosResponse;
try {
const config: AxiosRequestConfig = {
method: httpRequest.method as string,
method: httpRequest.method as Method,
url: httpRequest.url,
headers: rawHeaders,
data: axiosBody,
@ -144,9 +144,6 @@ export class AxiosHttpClient implements HttpClient {
}
}
// Workaround for https://github.com/axios/axios/issues/1158
axios.interceptors.request.use((config: AxiosRequestConfig) => ({ ...config, method: config.method && config.method.toUpperCase() }));
res = await axios.request(config);
} catch (err) {
if (err instanceof axios.Cancel) {

Просмотреть файл

@ -5,7 +5,7 @@
"email": "azsdkteam@microsoft.com",
"url": "https://github.com/Azure/ms-rest-js"
},
"version": "1.8.7",
"version": "1.8.8",
"description": "Isomorphic client Runtime for Typescript/node.js/browser javascript client libraries generated using AutoRest",
"tags": [
"isomorphic",
@ -48,7 +48,7 @@
},
"license": "MIT",
"dependencies": {
"axios": "^0.18.0",
"axios": "^0.19.0",
"form-data": "^2.3.2",
"tough-cookie": "^2.4.3",
"tslib": "^1.9.2",

Просмотреть файл

@ -41,7 +41,6 @@ class NodeHttpMock implements HttpMockFacade {
throw new Error("Axios instance cannot be undefined");
}
this._mockAdapter = new MockAdapter(axiosInstance);
axiosInstance.interceptors.request.use((config: AxiosRequestConfig) => ({ ...config, method: config.method && config.method.toLowerCase() }));
}
setup(): void {