Use graceful-fs directly

Reviewed By: davidaurelio

Differential Revision: D2811784

fb-gh-sync-id: 95e4fd1538f4cd468288dc65e83f1d6ca98ce791
This commit is contained in:
Christoph Pojer 2016-01-08 08:36:14 -08:00 committed by facebook-github-bot-7
parent 324493edae
commit 36dbe86208
8 changed files with 18 additions and 7 deletions

View File

@ -21,7 +21,7 @@ jest
});
var Promise = require('promise');
var fs = require('fs');
var fs = require('graceful-fs');
var Cache = require('../');

View File

@ -9,7 +9,7 @@
'use strict';
const Promise = require('promise');
const fs = require('fs');
const fs = require('graceful-fs');
const getCacheFilePath = require('./lib/getCacheFilePath');
const isAbsolutePath = require('absolute-path');
const loadCacheSync = require('./lib/loadCacheSync');

View File

@ -8,7 +8,7 @@
*/
'use strict';
const fs = require('fs');
const fs = require('graceful-fs');
function loadCacheSync(cachePath) {
if (!fs.existsSync(cachePath)) {

View File

@ -16,7 +16,7 @@ jest
.mock('fs');
var DependencyGraph = require('../index');
var fs = require('fs');
var fs = require('graceful-fs');
describe('DependencyGraph', function() {
let defaults;

View File

@ -24,7 +24,7 @@ const Module = require('../Module');
const ModuleCache = require('../ModuleCache');
const DependencyGraphHelpers = require('../DependencyGraph/DependencyGraphHelpers');
const Promise = require('promise');
const fs = require('fs');
const fs = require('graceful-fs');
describe('Module', () => {
const fileWatcher = {

View File

@ -2,7 +2,7 @@
const Promise = require('promise');
const debug = require('debug')('ReactNativePackager:DependencyGraph');
const fs = require('fs');
const fs = require('graceful-fs');
const path = require('path');
const readDir = Promise.denodeify(fs.readdir);

View File

@ -11,7 +11,7 @@
const Promise = require('promise');
const {EventEmitter} = require('events');
const fs = require('fs');
const fs = require('graceful-fs');
const path = require('path');
const readFile = Promise.denodeify(fs.readFile);

View File

@ -0,0 +1,11 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
'use strict';
module.exports = require('fs');