Remove "--disable-global-cache" from the internal CLI

Reviewed By: davidaurelio

Differential Revision: D7774252

fbshipit-source-id: c398aed714365f1f1010ae76b06dc5ad0fa78c22
This commit is contained in:
Miguel Jimenez Esun 2018-04-26 12:04:00 -07:00 committed by Facebook Github Bot
parent fc9bd150e3
commit b6494d8f81
3 changed files with 4 additions and 7 deletions

View File

@ -16,6 +16,8 @@ const HttpStore = require('./stores/HttpStore');
const stableHash = require('./stableHash');
export type {Options as FileOptions} from './stores/FileStore';
export type {Options as HttpOptions} from './stores/HttpStore';
export type {CacheStore} from './types.flow';
module.exports.Cache = Cache;

View File

@ -12,7 +12,6 @@
jest.useRealTimers();
jest
.mock('../../lib/TransformCaching')
// It's noticeably faster to prevent running watchman from FileWatcher.
.mock('child_process', () => ({}))
.mock('os', () => ({
@ -128,11 +127,11 @@ describe('traverseDependencies', function() {
assetExts: ['png', 'jpg'],
// This pattern is not expected to match anything.
blacklistRE: /.^/,
cacheStores: [],
providesModuleNodeModules: ['haste-fbjs', 'react-haste', 'react-native'],
platforms: new Set(['ios', 'android']),
maxWorkers: 1,
resetCache: true,
transformCache: require('TransformCaching').mocked(),
transformCode: (module, sourceCode, transformOptions) => {
return new Promise(resolve => {
// require call must stay inline, so the latest defined mock is used!

View File

@ -10,14 +10,11 @@
'use strict';
jest
.mock('fs', () => new (require('metro-memory-fs'))())
.mock('../../lib/TransformCaching');
jest.mock('fs', () => new (require('metro-memory-fs'))());
const AssetModule = require('../AssetModule');
const DependencyGraphHelpers = require('../DependencyGraph/DependencyGraphHelpers');
const ModuleCache = require('../ModuleCache');
const TransformCaching = require('../../lib/TransformCaching');
const fs = require('fs');
describe('AssetModule:', () => {
@ -43,7 +40,6 @@ describe('AssetModule:', () => {
getTransformCacheKey: () => 'foo',
localPath: 'image.png',
moduleCache: new ModuleCache({}),
options: {transformCache: TransformCaching.mocked()},
transformCode: () => {
return Promise.resolve({code: 'module.exports = "asset";'});
},