Skip to content
This repository has been archived by the owner on Jan 3, 2019. It is now read-only.

Commit

Permalink
feat: replace fs-promise with fs-extra (#156)
Browse files Browse the repository at this point in the history
ISSUES CLOSED: #69
  • Loading branch information
clebert committed Apr 28, 2017
1 parent 20cd80c commit aa0c7e9
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
6 changes: 2 additions & 4 deletions package.json
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/browser.test.ts
Expand Up @@ -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}
});
Expand Down
2 changes: 1 addition & 1 deletion 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';
Expand Down
12 changes: 12 additions & 0 deletions 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<void>;
}
1 change: 1 addition & 0 deletions types/index.d.ts
@@ -1,6 +1,7 @@
/// <reference path="../types/ajv.d.ts" />
/// <reference path="../types/debug.d.ts" />
/// <reference path="../types/deep-strict-equal.d.ts" />
/// <reference path="../types/fs-extra.d.ts" />
/// <reference path="../types/glob.d.ts" />
/// <reference path="../types/selenium-webdriver.d.ts" />
/// <reference path="../types/sinon.d.ts" />
Expand Down

0 comments on commit aa0c7e9

Please sign in to comment.