Skip to content

Commit

Permalink
chore: downgrade axios version
Browse files Browse the repository at this point in the history
  • Loading branch information
xernobyl committed Nov 9, 2023
1 parent 74f258a commit cfec986
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
"@babel/runtime": "^7.16.7",
"@types/jsonwebtoken": "^9.0.1",
"@types/qs": "^6.9.7",
"axios": "^1.4.0",
"axios": "0.x",
"faye": "^1.4.0",
"follow-redirects": "1.15.2",
"form-data": "^4.0.0",
Expand Down
3 changes: 2 additions & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import * as https from 'https';
import * as axios from 'axios';
import * as Faye from 'faye';
import jwtDecode from 'jwt-decode';
import AxiosProgressEvent from 'axios';

import { Personalization } from './personalization';
import { Collections } from './collections';
Expand Down Expand Up @@ -671,7 +672,7 @@ export class StreamClient<StreamFeedGenerics extends DefaultGenerics = DefaultGe
uri: string | File | Buffer | NodeJS.ReadStream,
name?: string,
contentType?: string,
onUploadProgress?: (progressEvent: axios.AxiosProgressEvent) => void,
onUploadProgress?: (progressEvent: typeof AxiosProgressEvent) => void,
) {
const fd = utils.addFileToFormData(uri, name, contentType);
return this.doAxiosRequest<FileUploadAPIResponse>('POST', {
Expand Down
4 changes: 2 additions & 2 deletions src/files.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AxiosProgressEvent } from 'axios';
import AxiosProgressEvent from 'axios';
import { StreamClient } from './client';

export class StreamFileStore {
Expand All @@ -25,7 +25,7 @@ export class StreamFileStore {
uri: string | File | Buffer | NodeJS.ReadStream,
name?: string,
contentType?: string,
onUploadProgress?: (progressEvent: AxiosProgressEvent) => void,
onUploadProgress?: (progressEvent: typeof AxiosProgressEvent) => void,
) {
return this.client.upload('files/', uri, name, contentType, onUploadProgress);
}
Expand Down
4 changes: 2 additions & 2 deletions src/images.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AxiosProgressEvent } from 'axios';
import AxiosProgressEvent from 'axios';
import { StreamClient, FileUploadAPIResponse } from './client';

export type ImageProcessOptions = {
Expand Down Expand Up @@ -33,7 +33,7 @@ export class StreamImageStore {
uri: string | File | Buffer | NodeJS.ReadStream,
name?: string,
contentType?: string,
onUploadProgress?: (progressEvent: AxiosProgressEvent) => void,
onUploadProgress?: (progressEvent: typeof AxiosProgressEvent) => void,
) {
return this.client.upload('images/', uri, name, contentType, onUploadProgress);
}
Expand Down
18 changes: 11 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2349,14 +2349,13 @@ aws4@^1.8.0:
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.12.0.tgz#ce1c9d143389679e253b314241ea9aa5cec980d3"
integrity sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==

axios@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/axios/-/axios-1.4.0.tgz#38a7bf1224cd308de271146038b551d725f0be1f"
integrity sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==
axios@0.x:
version "0.27.2"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.27.2.tgz#207658cc8621606e586c85db4b41a750e756d972"
integrity sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==
dependencies:
follow-redirects "^1.15.0"
follow-redirects "^1.14.9"
form-data "^4.0.0"
proxy-from-env "^1.1.0"

b4a@^1.6.4:
version "1.6.4"
Expand Down Expand Up @@ -4459,11 +4458,16 @@ flatted@^3.1.0, flatted@^3.2.7:
resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787"
integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==

follow-redirects@1.15.2, follow-redirects@^1.0.0, follow-redirects@^1.15.0:
follow-redirects@1.15.2, follow-redirects@^1.0.0:
version "1.15.2"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13"
integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==

follow-redirects@^1.14.9:
version "1.15.3"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.3.tgz#fe2f3ef2690afce7e82ed0b44db08165b207123a"
integrity sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==

for-each@^0.3.3:
version "0.3.3"
resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e"
Expand Down

0 comments on commit cfec986

Please sign in to comment.