1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

fix: update mime library method signature to 2.X (#1078)

Co-authored-by: Ivar Conradi Østhus <ivarconr@gmail.com>
This commit is contained in:
Lennart 2021-11-02 23:43:16 +01:00 committed by GitHub
parent 35f89a5427
commit 759b592d90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 1 deletions

View File

@ -123,6 +123,7 @@
"@types/jest": "27.0.2",
"@types/js-yaml": "4.0.4",
"@types/memoizee": "0.4.6",
"@types/mime": "2.0.3",
"@types/node": "16.6.1",
"@types/node-fetch": "2.5.12",
"@types/nodemailer": "6.4.4",

View File

@ -12,7 +12,7 @@ export const readFile: (file: string) => Promise<string> = (file) =>
export const parseFile: (file: string, data: string) => any = (
file: string,
data: string,
) => (mime.lookup(file) === 'text/yaml' ? YAML.load(data) : JSON.parse(data));
) => (mime.getType(file) === 'text/yaml' ? YAML.load(data) : JSON.parse(data));
export const filterExisting: (
keepExisting: boolean,

View File

@ -807,6 +807,11 @@
resolved "https://registry.yarnpkg.com/@types/memoizee/-/memoizee-0.4.6.tgz#a4ba7a3ea61fa45be916f148763bec2ca38c34cf"
integrity sha512-qJezGqoi3pW9Pset2w1Gfv8jATvmHHHnpO9Dq8x8pJGyYIpiUZJqRU0NM7xenmN0AcXEe7vqshI8H98KeFLYcg==
"@types/mime@2.0.3":
version "2.0.3"
resolved "https://registry.yarnpkg.com/@types/mime/-/mime-2.0.3.tgz#c893b73721db73699943bfc3653b1deb7faa4a3a"
integrity sha512-Jus9s4CDbqwocc5pOAnh8ShfrnMcPHuJYzVcSUU7lrh8Ni5HuIqX3oilL86p3dlTrk0LzHRCgA/GQ7uNCw6l2Q==
"@types/mime@^1":
version "1.3.2"
resolved "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz"