mirror of https://github.com/status-im/metro.git
Use graceful-fs directly
Reviewed By: davidaurelio Differential Revision: D2811784 fb-gh-sync-id: 95e4fd1538f4cd468288dc65e83f1d6ca98ce791
This commit is contained in:
parent
87e8086937
commit
4501181cc9
|
@ -21,7 +21,7 @@ jest
|
|||
});
|
||||
|
||||
var Promise = require('promise');
|
||||
var fs = require('fs');
|
||||
var fs = require('graceful-fs');
|
||||
|
||||
var Cache = require('../');
|
||||
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*/
|
||||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
const fs = require('graceful-fs');
|
||||
|
||||
function loadCacheSync(cachePath) {
|
||||
if (!fs.existsSync(cachePath)) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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');
|
Loading…
Reference in New Issue