Merge pull request #3739 from thelounge/renovate/file-type-14.x

Update dependency file-type to v14
This commit is contained in:
Pavel Djundik 2020-02-06 14:07:27 +02:00 committed by GitHub
commit 1b9040deed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 11 deletions

View File

@ -47,7 +47,7 @@
"cheerio": "1.0.0-rc.3",
"commander": "4.1.0",
"express": "4.17.1",
"file-type": "13.1.2",
"file-type": "14.1.1",
"filenamify": "4.1.0",
"fs-extra": "8.1.0",
"got": "10.4.0",

View File

@ -234,7 +234,7 @@ class Uploader {
// Returns a string with the type otherwise
static async getFileType(filePath) {
try {
const buffer = readChunk.sync(filePath, 0, fileType.minimumBytes);
const buffer = await readChunk(filePath, 0, 5120);
// returns {ext, mime} if found, null if not.
const file = await fileType.fromBuffer(buffer);

View File

@ -1011,6 +1011,11 @@
resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0"
integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==
"@types/debug@^4.1.5":
version "4.1.5"
resolved "https://registry.yarnpkg.com/@types/debug/-/debug-4.1.5.tgz#b14efa8852b7768d898906613c23f688713e02cd"
integrity sha512-Q1y515GcOdTHgagaVFhHnIFQ38ygs/kmxdNpvpou+raI9UO3YZcHDngBSYKQklcKlvA7iuQlmIKbzvmxcOE9CQ==
"@types/events@*":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7"
@ -3706,13 +3711,13 @@ file-entry-cache@^5.0.1:
dependencies:
flat-cache "^2.0.1"
file-type@13.1.2:
version "13.1.2"
resolved "https://registry.yarnpkg.com/file-type/-/file-type-13.1.2.tgz#0e5b72bca7569c152e2d5a84ece07e94f77f833f"
integrity sha512-NiHXbmclwHN38eHZfRklosbm7/W+1yacDzRCyddd0NiyuJUArQDmzJ8GPSFJGl82+I59u7sNGfcAVnJsfXJb8A==
file-type@14.1.1:
version "14.1.1"
resolved "https://registry.yarnpkg.com/file-type/-/file-type-14.1.1.tgz#d624d512da648cf8916d1416303297493a97011b"
integrity sha512-fGmNwmRgDi3uMDNbJfRRKaOUGN/uzeWRl2Ti9RJdvLpzFMKbl5cBGP3ngHYKiBSbHPB8wzMckP9x9SixJDFftg==
dependencies:
readable-web-to-node-stream "^2.0.0"
strtok3 "^5.0.2"
strtok3 "^6.0.0"
token-types "^2.0.0"
typedarray-to-buffer "^3.1.5"
@ -8790,12 +8795,13 @@ strip-outer@^1.0.1:
dependencies:
escape-string-regexp "^1.0.2"
strtok3@^5.0.2:
version "5.0.2"
resolved "https://registry.yarnpkg.com/strtok3/-/strtok3-5.0.2.tgz#bb81f1f56742e16f1a30ccce5dc3d9498aa5475a"
integrity sha512-EFeVpFC5qDsqPEJSrIYyS/ueFBknGhgSK9cW+YAJF/cgJG/KSjoK7X6rK5xnpcLe7y1LVkVFCXWbAb+ClNKzKQ==
strtok3@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/strtok3/-/strtok3-6.0.0.tgz#d6b900863daeacfe6c1724c6e7bb36d7a58e83c8"
integrity sha512-ZXlmE22LZnIBvEU3n/kZGdh770fYFie65u5+2hLK9s74DoFtpkQIdBZVeYEzlolpGa+52G5IkzjUWn+iXynOEQ==
dependencies:
"@tokenizer/token" "^0.1.1"
"@types/debug" "^4.1.5"
debug "^4.1.1"
peek-readable "^3.1.0"