From adfffcc98188f38efcc9c9fd239a756f5de45db2 Mon Sep 17 00:00:00 2001 From: David Sharp Date: Mon, 13 Jan 2020 16:41:09 -0500 Subject: [PATCH] ffmpeg-static-3.0.0-export path as default instead of module.path (#41322) * export path instead of module.path * update name to match package docs * update test to catch invalid import * header version bump * fix common mistake for spacing * removing `ffprobe-static` typings these typings no longer seem relevant to to ffmpeg-static * Revert "removing `ffprobe-static` typings" This reverts commit 268fcc7c6d0703483aed41550dd2570916a44d0f. * fix ffprobe-static import * fix dtslint test --- types/ffmpeg-static/ffmpeg-static-tests.ts | 4 ++-- types/ffmpeg-static/index.d.ts | 5 +++-- types/ffprobe-static/ffprobe-static-tests.ts | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/types/ffmpeg-static/ffmpeg-static-tests.ts b/types/ffmpeg-static/ffmpeg-static-tests.ts index 319a5e27f8..721ae192eb 100644 --- a/types/ffmpeg-static/ffmpeg-static-tests.ts +++ b/types/ffmpeg-static/ffmpeg-static-tests.ts @@ -1,3 +1,3 @@ -import * as ffmpegStatic from 'ffmpeg-static'; +import * as pathToFfmpeg from 'ffmpeg-static'; -ffmpegStatic.path; +pathToFfmpeg; // $ExpectType string diff --git a/types/ffmpeg-static/index.d.ts b/types/ffmpeg-static/index.d.ts index dfd9ce0906..f5fbd73298 100644 --- a/types/ffmpeg-static/index.d.ts +++ b/types/ffmpeg-static/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for ffmpeg-static 2.0 +// Type definitions for ffmpeg-static 3.0 // Project: https://github.com/eugeneware/ffmpeg-static#readme // Definitions by: Steve Tran // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -7,4 +7,5 @@ /** * Binary location */ -export const path: string; +declare const pathToFfmpeg: string; +export = pathToFfmpeg; diff --git a/types/ffprobe-static/ffprobe-static-tests.ts b/types/ffprobe-static/ffprobe-static-tests.ts index 6565fd2ae1..3d230f52ed 100644 --- a/types/ffprobe-static/ffprobe-static-tests.ts +++ b/types/ffprobe-static/ffprobe-static-tests.ts @@ -1,3 +1,3 @@ -import * as ffprobeStatic from 'ffmpeg-static'; +import * as ffprobeStatic from 'ffprobe-static'; ffprobeStatic.path;