Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix(deps): update dependency file-type to v19 #208

Merged
merged 2 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@
"packageManager": "yarn@4.2.1",
"dependencies": {
"axios": "^1.6.8",
"file-type": "^16.5.4"
"file-type": "^19.0.0"
}
}
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import axios, { AxiosError, AxiosHeaders, type AxiosRequestConfig, type AxiosRequestHeaders } from 'axios';
import fileType from 'file-type';
import { ReadStream } from 'fs';
import { fileTypeFromBuffer } from 'file-type';
import { createHash } from 'node:crypto';
import { ReadStream } from 'node:fs';
import { BunnyCdnStreamError } from './error';
import { BunnyCdnStreamVideo } from './structures/Video';
import { lowerObject } from './utils';
Expand Down Expand Up @@ -330,7 +330,7 @@ export class BunnyCdnStream {

if (typeof thumbnail !== 'string')
options.headers['Content-Type'] =
thumbnail instanceof ReadStream ? 'application/octet-stream' : (ct || (await fileType.fromBuffer(thumbnail)) || { mime: 'image/jpg' }).mime;
thumbnail instanceof ReadStream ? 'application/octet-stream' : (ct || (await fileTypeFromBuffer(thumbnail)) || { mime: 'image/jpg' }).mime;

options.url += `/library/${this.options.videoLibrary}/videos/${videoId}/thumbnail`;
options.method = 'POST';
Expand Down
44 changes: 22 additions & 22 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3269,7 +3269,7 @@ __metadata:
eslint: "npm:^8.57.0"
eslint-config-prettier: "npm:^9.1.0"
eslint-plugin-prettier: "npm:^4.2.1"
file-type: "npm:^16.5.4"
file-type: "npm:^19.0.0"
husky: "npm:^9.0.11"
jest: "npm:^29.7.0"
jest-circus: "npm:^29.7.0"
Expand Down Expand Up @@ -5017,14 +5017,14 @@ __metadata:
languageName: node
linkType: hard

"file-type@npm:^16.5.4":
version: 16.5.4
resolution: "file-type@npm:16.5.4"
"file-type@npm:^19.0.0":
version: 19.0.0
resolution: "file-type@npm:19.0.0"
dependencies:
readable-web-to-node-stream: "npm:^3.0.0"
strtok3: "npm:^6.2.4"
token-types: "npm:^4.1.1"
checksum: 10c0/a6c9ab8bc05bc9c212bec239fb0d5bf59ddc9b3912f00c4ef44622e67ae4e553a1cc8372e9e595e14859035188eb305d05d488fa3c5c2a2ad90bb7745b3004ef
readable-web-to-node-stream: "npm:^3.0.2"
strtok3: "npm:^7.0.0"
token-types: "npm:^5.0.1"
checksum: 10c0/1884c3627f5922365f86cb19f107850fe7b72d78bef5c2affc92aa098ba414c944e3763101068236345737f44a5b6da13bb0ba79de4c4e3b1b1c68e1958643d9
languageName: node
linkType: hard

Expand Down Expand Up @@ -8688,10 +8688,10 @@ __metadata:
languageName: node
linkType: hard

"peek-readable@npm:^4.1.0":
version: 4.1.0
resolution: "peek-readable@npm:4.1.0"
checksum: 10c0/f9b81ce3eed185cc9ebbf7dff0b6e130dd6da7b05f1802bbf726a78e4d84990b0a65f8e701959c50eb1124cc2ad352205147954bf39793faba29bb00ce742a44
"peek-readable@npm:^5.0.0":
version: 5.0.0
resolution: "peek-readable@npm:5.0.0"
checksum: 10c0/060aece3a907a157b4839aa923b61b664b59cac7296dc8d8e0ddcc39065a4f1e328dd2f171c8a49e869aabc6e076a1be59f939183fb0ababc81f3c870006d672
languageName: node
linkType: hard

Expand Down Expand Up @@ -9017,7 +9017,7 @@ __metadata:
languageName: node
linkType: hard

"readable-web-to-node-stream@npm:^3.0.0":
"readable-web-to-node-stream@npm:^3.0.2":
version: 3.0.2
resolution: "readable-web-to-node-stream@npm:3.0.2"
dependencies:
Expand Down Expand Up @@ -10025,13 +10025,13 @@ __metadata:
languageName: node
linkType: hard

"strtok3@npm:^6.2.4":
version: 6.3.0
resolution: "strtok3@npm:6.3.0"
"strtok3@npm:^7.0.0":
version: 7.0.0
resolution: "strtok3@npm:7.0.0"
dependencies:
"@tokenizer/token": "npm:^0.3.0"
peek-readable: "npm:^4.1.0"
checksum: 10c0/8f1483a2a6758404502f2fc431586fcf37d747b10b125596ab5ec92319c247dd1195f82ba0bc2eaa582db3d807b5cca4b67ff61411756fec6622d051f8e255c2
peek-readable: "npm:^5.0.0"
checksum: 10c0/63a72b10a302719242bfd31ca53955a06bb091dfec46ef14ca10c4b17ab15780ed8365cd5b270cfbde92d571f677539957add436e4bf9cccdf9977b40d762583
languageName: node
linkType: hard

Expand Down Expand Up @@ -10214,13 +10214,13 @@ __metadata:
languageName: node
linkType: hard

"token-types@npm:^4.1.1":
version: 4.2.1
resolution: "token-types@npm:4.2.1"
"token-types@npm:^5.0.1":
version: 5.0.1
resolution: "token-types@npm:5.0.1"
dependencies:
"@tokenizer/token": "npm:^0.3.0"
ieee754: "npm:^1.2.1"
checksum: 10c0/e9a4a139deba9515770cd7ac36a8f53f953b9d035d309e88a66d706760dba0df420753f2b8bdee6b9f3cbff8d66b24e69571e8dea27baa7b378229ab1bcca399
checksum: 10c0/cb671b2b52271362816d22b7a076082b0da033cd7807992b81ae53cfd8541bd013ac29e455c3c7a8bb4f88aa1c5315a12353c3599b7f568df238d3c1723f9d8d
languageName: node
linkType: hard

Expand Down