Skip to content

Commit 0fdafaf

Browse files
committed
Fix esm module import and add typings
1 parent dac5542 commit 0fdafaf

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/download.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
declare module '@xhmikosr/downloader'
2+
{
3+
export { default, DownloadOptions } from '@types/download'
4+
}

src/launcher.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import fs from 'node:fs/promises'
22
import path from 'node:path'
33
import { format } from 'node:util'
44

5-
import type { DownloadOptions } from 'download'
5+
import downloadBundle, { DownloadOptions } from '@xhmikosr/downloader'
66
import logger from '@wdio/logger'
77
import { setGlobalDispatcher, request, ProxyAgent } from 'undici'
88
import { download } from '@vscode/test-electron'
@@ -21,9 +21,6 @@ import type {
2121
Bundle
2222
} from './types.js'
2323

24-
// eslint-disable-next-line @typescript-eslint/no-var-requires
25-
const downloadBundle: typeof import('download') = require('@xhmikosr/downloader')
26-
2724
interface BundleInformation {
2825
chromedriver: string
2926
vscode: string

0 commit comments

Comments
 (0)