diff --git a/package.json b/package.json index 22cd697..5eb88b3 100644 --- a/package.json +++ b/package.json @@ -80,15 +80,12 @@ "watch:tsc": "tsc --project . --watch" }, "dependencies": { - "@types/fs-extra": "0.0.37", - "@types/mz": "0.0.31", "@types/node": "7.0.14", - "@types/proxyquire": "1.3.27", "ajv": "5.0.0", "chromedriver": "2.29.0", "debug": "2.6.5", "deep-strict-equal": "0.2.0", - "fs-promise": "2.0.2", + "fs-extra": "3.0.0", "geckodriver": "1.6.1", "glob": "7.1.1", "selenium-webdriver": "3.4.0", @@ -97,6 +94,7 @@ "uuid": "3.0.1" }, "devDependencies": { + "@types/proxyquire": "1.3.27", "ava": "0.19.1", "commitizen": "2.9.6", "conventional-changelog-lint": "1.1.9", diff --git a/src/__tests__/browser.test.ts b/src/__tests__/browser.test.ts index f00dda8..d26f070 100644 --- a/src/__tests__/browser.test.ts +++ b/src/__tests__/browser.test.ts @@ -11,7 +11,7 @@ proxyquire.noPreserveCache(); proxyquire.preserveCache(); proxyquire('../browser', { - 'fs-promise': {outputFile: stubs.outputFile}, + 'fs-extra': {outputFile: stubs.outputFile}, 'uuid/v4': stubs.uuidV4, './utils': {sleep: stubs.sleep} }); diff --git a/src/browser.ts b/src/browser.ts index 0006e20..a48f4a2 100644 --- a/src/browser.ts +++ b/src/browser.ts @@ -1,6 +1,6 @@ import uuidV4 = require('uuid/v4'); -import {outputFile} from 'fs-promise'; +import {outputFile} from 'fs-extra'; import {join} from 'path'; import {Accessor} from './accessor'; import {Action} from './action'; diff --git a/types/fs-extra.d.ts b/types/fs-extra.d.ts new file mode 100644 index 0000000..e62424e --- /dev/null +++ b/types/fs-extra.d.ts @@ -0,0 +1,12 @@ +// tslint:disable max-line-length promise-function-async + +declare module 'fs-extra' { + export interface Options { + readonly encoding?: string; + readonly flag?: string; + readonly mode?: number; + } + + // https://github.com/jprichardson/node-fs-extra/blob/master/docs/outputFile.md + export function outputFile(file: string, data: string | Buffer, options?: Options): Promise; +} diff --git a/types/index.d.ts b/types/index.d.ts index 29706df..02f3c55 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -1,6 +1,7 @@ /// /// /// +/// /// /// ///