Skip to content

Commit

Permalink
Switch to fs-extra (#828)
Browse files Browse the repository at this point in the history
This avoids a loud deprecation warning during installation.

fs-extra 3.x now provides the Promise API we were using fs-promise for.
  • Loading branch information
evocateur committed May 19, 2017
1 parent ce95a26 commit 64203e5
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 49 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -40,7 +40,7 @@
"dedent": "^0.7.0",
"execa": "^0.6.3",
"find-up": "^2.1.0",
"fs-promise": "^2.0.2",
"fs-extra": "^3.0.1",
"get-port": "^3.1.0",
"glob": "^7.0.6",
"globby": "^6.1.0",
Expand Down
2 changes: 1 addition & 1 deletion src/FileSystemUtilities.js
@@ -1,5 +1,5 @@
import cmdShim from "cmd-shim";
import fs from "fs-promise";
import fs from "fs-extra";
import log from "npmlog";
import path from "path";
import pathExists from "path-exists";
Expand Down
4 changes: 2 additions & 2 deletions test/FileSystemUtilities.js
@@ -1,7 +1,7 @@
import path from "path";

// mocked modules
import fs from "fs-promise";
import fs from "fs-extra";
import pathExists from "path-exists";
import cmdShim from "cmd-shim";
import readCmdShim from "read-cmd-shim";
Expand All @@ -13,7 +13,7 @@ import callsBack from "./helpers/callsBack";
// file under test
import FileSystemUtilities from "../src/FileSystemUtilities";

jest.mock("fs-promise");
jest.mock("fs-extra");
jest.mock("path-exists");
jest.mock("cmd-shim");
jest.mock("read-cmd-shim");
Expand Down
2 changes: 1 addition & 1 deletion test/ImportCommand.js
@@ -1,5 +1,5 @@
import execa from "execa";
import fs from "fs-promise";
import fs from "fs-extra";
import log from "npmlog";
import path from "path";
import pathExists from "path-exists";
Expand Down
2 changes: 1 addition & 1 deletion test/PublishCommand.js
@@ -1,5 +1,5 @@
import chalk from "chalk";
import fs from "fs-promise";
import fs from "fs-extra";
import log from "npmlog";
import normalizeNewline from "normalize-newline";
import path from "path";
Expand Down
2 changes: 1 addition & 1 deletion test/helpers/copyFixture.js
@@ -1,4 +1,4 @@
import fs from "fs-promise";
import fs from "fs-extra";
import path from "path";
import replaceStream from "replacestream";
import * as constants from "./constants";
Expand Down
2 changes: 1 addition & 1 deletion test/helpers/updateLernaConfig.js
@@ -1,4 +1,4 @@
import fs from "fs-promise";
import fs from "fs-extra";
import path from "path";

/**
Expand Down
2 changes: 1 addition & 1 deletion test/integration/lerna-publish.test.js
@@ -1,5 +1,5 @@
import execa from "execa";
import fs from "fs-promise";
import fs from "fs-extra";
import globby from "globby";
import normalizeNewline from "normalize-newline";

Expand Down
52 changes: 12 additions & 40 deletions yarn.lock
Expand Up @@ -86,10 +86,6 @@ ansi-styles@^3.0.0:
dependencies:
color-convert "^1.0.0"

any-promise@^1.0.0, any-promise@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f"

anymatch@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.0.tgz#a3e52fa39168c825ff57b0248126ce5a8ff95507"
Expand Down Expand Up @@ -1696,21 +1692,13 @@ form-data@~2.1.1:
combined-stream "^1.0.5"
mime-types "^2.1.12"

fs-extra@^2.0.0:
version "2.1.2"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-2.1.2.tgz#046c70163cef9aad46b0e4a7fa467fb22d71de35"
fs-extra@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-3.0.1.tgz#3794f378c58b342ea7dbbb23095109c4b3b62291"
dependencies:
graceful-fs "^4.1.2"
jsonfile "^2.1.0"

fs-promise@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/fs-promise/-/fs-promise-2.0.2.tgz#cfea45c80f46480a3fd176213fa22abc8c159521"
dependencies:
any-promise "^1.3.0"
fs-extra "^2.0.0"
mz "^2.6.0"
thenify-all "^1.6.0"
jsonfile "^3.0.0"
universalify "^0.1.0"

fs-readdir-recursive@^1.0.0:
version "1.0.0"
Expand Down Expand Up @@ -2559,9 +2547,9 @@ json5@^0.5.0:
version "0.5.1"
resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821"

jsonfile@^2.1.0:
version "2.4.0"
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8"
jsonfile@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-3.0.0.tgz#92e7c7444e5ffd5fa32e6a9ae8b85034df8347d0"
optionalDependencies:
graceful-fs "^4.1.6"

Expand Down Expand Up @@ -2804,14 +2792,6 @@ mute-stream@0.0.7:
version "0.0.7"
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab"

mz@^2.6.0:
version "2.6.0"
resolved "https://registry.yarnpkg.com/mz/-/mz-2.6.0.tgz#c8b8521d958df0a4f2768025db69c719ee4ef1ce"
dependencies:
any-promise "^1.0.0"
object-assign "^4.0.1"
thenify-all "^1.0.0"

nan@^2.3.0:
version "2.5.1"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.5.1.tgz#d5b01691253326a97a2bbee9e61c55d8d60351e2"
Expand Down Expand Up @@ -3716,18 +3696,6 @@ text-table@~0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"

thenify-all@^1.0.0, thenify-all@^1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726"
dependencies:
thenify ">= 3.1.0 < 4"

"thenify@>= 3.1.0 < 4":
version "3.2.1"
resolved "https://registry.yarnpkg.com/thenify/-/thenify-3.2.1.tgz#251fd1c80aff6e5cf57cb179ab1fcb724269bd11"
dependencies:
any-promise "^1.0.0"

throat@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/throat/-/throat-3.0.0.tgz#e7c64c867cbb3845f10877642f7b60055b8ec0d6"
Expand Down Expand Up @@ -3824,6 +3792,10 @@ unique-string@^1.0.0:
dependencies:
crypto-random-string "^1.0.0"

universalify@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.0.tgz#9eb1c4651debcc670cc94f1a75762332bb967778"

user-home@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190"
Expand Down

0 comments on commit 64203e5

Please sign in to comment.