From 9ff2584da4258d2af7442f388cb0457b69b78294 Mon Sep 17 00:00:00 2001 From: AkiraFukushima Date: Sun, 2 Jan 2022 01:07:48 +0900 Subject: [PATCH] Update axios version to 0.24.0 --- package.json | 2 +- test/integration/mastodon.spec.ts | 4 ++-- test/integration/mastodon/api_client.spec.ts | 12 ++++++------ test/integration/misskey.spec.ts | 4 ++-- test/integration/pleroma.spec.ts | 4 ++-- yarn.lock | 18 +++++++++--------- 6 files changed, 22 insertions(+), 22 deletions(-) diff --git a/package.json b/package.json index b6be01a..a0bb776 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "dependencies": { "@types/oauth": "^0.9.0", "@types/ws": "^8.2.0", - "axios": "^0.21.0", + "axios": "^0.24.0", "dayjs": "^1.10.4", "form-data": "^4.0.0", "https-proxy-agent": "^5.0.0", diff --git a/test/integration/mastodon.spec.ts b/test/integration/mastodon.spec.ts index de1887b..2929b30 100644 --- a/test/integration/mastodon.spec.ts +++ b/test/integration/mastodon.spec.ts @@ -2,7 +2,7 @@ import MastodonEntity from '@/mastodon/entity' import MastodonNotificationType from '@/mastodon/notification' import Mastodon from '@/mastodon' import MegalodonNotificationType from '@/notification' -import axios, { AxiosResponse } from 'axios' +import axios, { AxiosResponse, AxiosResponseHeaders } from 'axios' jest.mock('axios') @@ -171,7 +171,7 @@ describe('getNotifications', () => { data: [c.event], status: 200, statusText: '200OK', - headers: [], + headers: {} as AxiosResponseHeaders, config: {} } ;(axios.get as any).mockResolvedValue(mockResponse) diff --git a/test/integration/mastodon/api_client.spec.ts b/test/integration/mastodon/api_client.spec.ts index e41ce1c..a708ac8 100644 --- a/test/integration/mastodon/api_client.spec.ts +++ b/test/integration/mastodon/api_client.spec.ts @@ -1,7 +1,7 @@ import MastodonAPI from '@/mastodon/api_client' import Entity from '@/entity' import Response from '@/response' -import axios, { AxiosResponse } from 'axios' +import axios, { AxiosResponse, AxiosResponseHeaders } from 'axios' jest.mock('axios') @@ -80,7 +80,7 @@ describe('get', () => { data: [status], status: 200, statusText: '200OK', - headers: [], + headers: {} as AxiosResponseHeaders, config: {} } it('should be responsed', async () => { @@ -96,7 +96,7 @@ describe('put', () => { data: account, status: 200, statusText: '200OK', - headers: [], + headers: {} as AxiosResponseHeaders, config: {} } it('should be responsed', async () => { @@ -114,7 +114,7 @@ describe('patch', () => { data: account, status: 200, statusText: '200OK', - headers: [], + headers: {} as AxiosResponseHeaders, config: {} } it('should be responsed', async () => { @@ -132,7 +132,7 @@ describe('post', () => { data: status, status: 200, statusText: '200OK', - headers: [], + headers: {} as AxiosResponseHeaders, config: {} } it('should be responsed', async () => { @@ -150,7 +150,7 @@ describe('del', () => { data: {}, status: 200, statusText: '200OK', - headers: [], + headers: {} as AxiosResponseHeaders, config: {} } it('should be responsed', async () => { diff --git a/test/integration/misskey.spec.ts b/test/integration/misskey.spec.ts index 58ec7a2..c75b12f 100644 --- a/test/integration/misskey.spec.ts +++ b/test/integration/misskey.spec.ts @@ -2,7 +2,7 @@ import MisskeyEntity from '@/misskey/entity' import MisskeyNotificationType from '@/misskey/notification' import Misskey from '@/misskey' import MegalodonNotificationType from '@/notification' -import axios, { AxiosResponse } from 'axios' +import axios, { AxiosResponse, AxiosResponseHeaders } from 'axios' jest.mock('axios') @@ -193,7 +193,7 @@ describe('getNotifications', () => { data: [c.event], status: 200, statusText: '200OK', - headers: [], + headers: {} as AxiosResponseHeaders, config: {} } ;(axios.post as any).mockResolvedValue(mockResponse) diff --git a/test/integration/pleroma.spec.ts b/test/integration/pleroma.spec.ts index b76cb51..3a10eb4 100644 --- a/test/integration/pleroma.spec.ts +++ b/test/integration/pleroma.spec.ts @@ -2,7 +2,7 @@ import PleromaEntity from '@/pleroma/entity' import Pleroma from '@/pleroma' import MegalodonNotificationType from '@/notification' import PleromaNotificationType from '@/pleroma/notification' -import axios, { AxiosResponse } from 'axios' +import axios, { AxiosResponse, AxiosResponseHeaders } from 'axios' jest.mock('axios') @@ -176,7 +176,7 @@ describe('getNotifications', () => { data: [c.event], status: 200, statusText: '200OK', - headers: [], + headers: {} as AxiosResponseHeaders, config: {} } ;(axios.get as any).mockResolvedValue(mockResponse) diff --git a/yarn.lock b/yarn.lock index 5ee573a..fddcacb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1240,12 +1240,12 @@ asynckit@^0.4.0: resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= -axios@^0.21.0: - version "0.21.2" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.2.tgz#21297d5084b2aeeb422f5d38e7be4fbb82239017" - integrity sha512-87otirqUw3e8CzHTMO+/9kh/FSgXt/eVDvipijwDtEuwbkySWZ9SBm6VEubmJ/kLKEoLQV/POhxXFb66bfekfg== +axios@^0.24.0: + version "0.24.0" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.24.0.tgz#804e6fa1e4b9c5288501dd9dff56a7a0940d20d6" + integrity sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA== dependencies: - follow-redirects "^1.14.0" + follow-redirects "^1.14.4" babel-jest@^27.4.5: version "27.4.5" @@ -2097,10 +2097,10 @@ flatted@^3.1.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.2.tgz#64bfed5cb68fe3ca78b3eb214ad97b63bedce561" integrity sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA== -follow-redirects@^1.14.0: - version "1.14.4" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.4.tgz#838fdf48a8bbdd79e52ee51fb1c94e3ed98b9379" - integrity sha512-zwGkiSXC1MUJG/qmeIFH2HBJx9u0V46QGUe3YR1fXG8bXQxq7fLj0RjLZQ5nubr9qNJUZrH+xUcwXEoXNpfS+g== +follow-redirects@^1.14.4: + version "1.14.6" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.6.tgz#8cfb281bbc035b3c067d6cd975b0f6ade6e855cd" + integrity sha512-fhUl5EwSJbbl8AR+uYL2KQDxLkdSjZGR36xy46AO7cOMTrCMON6Sa28FmAnC2tRTDbd/Uuzz3aJBv7EBN7JH8A== form-data@*, form-data@^4.0.0: version "4.0.0"