Comparing version 0.1.8 to 0.1.9
{ | ||
"name": "jest-cli", | ||
"description": "Painless JavaScript Unit Testing.", | ||
"version": "0.1.8", | ||
"version": "0.1.9", | ||
"dependencies": { | ||
@@ -26,2 +26,5 @@ "coffee-script": "1.7.1", | ||
}, | ||
"engines": { | ||
"node": "0.8.x || 0.10.x" | ||
}, | ||
"repository": { | ||
@@ -28,0 +31,0 @@ "type": "git", |
@@ -46,2 +46,3 @@ # [Jest](http://facebook.github.io/jest/) [![Build Status](https://travis-ci.org/facebook/jest.svg?branch=master)](https://travis-ci.org/facebook/jest) | ||
- [`config.cacheDirectory` [string]](http://facebook.github.io/jest/docs/api.html#config-cachedirectory-string) | ||
- [`config.collectCoverage` [boolean]](http://facebook.github.io/jest/docs/api.html#config-collectcoverage-boolean) | ||
@@ -48,0 +49,0 @@ - [`config.collectCoverageOnlyFrom` [object]](http://facebook.github.io/jest/docs/api.html#config-collectcoverageonlyfrom-object) |
@@ -29,4 +29,2 @@ /** | ||
var MAIN_DIR = path.resolve(__dirname + '/../'); | ||
var CACHE_DIR_PATH = MAIN_DIR + '/.haste_cache_dir'; | ||
var COVERAGE_STORAGE_VAR_NAME = '____JEST_COVERAGE_DATA____'; | ||
@@ -85,6 +83,2 @@ | ||
function _calculateCacheFilePath(config) { | ||
return CACHE_DIR_PATH + '/cache-' + config.name; | ||
} | ||
function _constructHasteInst(config, options) { | ||
@@ -97,4 +91,4 @@ var HASTE_IGNORE_REGEX = new RegExp( | ||
if (!fs.existsSync(CACHE_DIR_PATH)) { | ||
fs.mkdirSync(CACHE_DIR_PATH); | ||
if (!fs.existsSync(config.cacheDirectory)) { | ||
fs.mkdirSync(config.cacheDirectory); | ||
} | ||
@@ -117,2 +111,6 @@ | ||
function _getCacheFilePath(config) { | ||
return path.join(config.cacheDirectory, 'cache-' + config.name); | ||
} | ||
function Loader(config, environment, resourceMap) { | ||
@@ -166,3 +164,3 @@ this._config = config; | ||
_constructHasteInst(config, options).update( | ||
_calculateCacheFilePath(config), | ||
_getCacheFilePath(config), | ||
function(resourceMap) { | ||
@@ -185,9 +183,12 @@ deferred.resolve(resourceMap); | ||
var hasteInst = _constructHasteInst(config, options); | ||
hasteInst.loadMap(_calculateCacheFilePath(config), function(err, map) { | ||
if (err) { | ||
deferred.reject(err); | ||
} else { | ||
deferred.resolve(map); | ||
hasteInst.loadMap( | ||
_getCacheFilePath(config), | ||
function(err, map) { | ||
if (err) { | ||
deferred.reject(err); | ||
} else { | ||
deferred.resolve(map); | ||
} | ||
} | ||
}); | ||
); | ||
} catch (e) { | ||
@@ -194,0 +195,0 @@ deferred.reject(e); |
@@ -15,2 +15,3 @@ /** | ||
var DEFAULT_CONFIG_VALUES = { | ||
cacheDirectory: path.resolve(__dirname, '..', '..', '.haste_cache'), | ||
moduleLoader: require.resolve('../HasteModuleLoader/HasteModuleLoader'), | ||
@@ -177,2 +178,3 @@ modulePathIgnorePatterns: [], | ||
case 'cacheDirectory': | ||
case 'scriptPreprocessor': | ||
@@ -179,0 +181,0 @@ case 'setupEnvScriptFile': |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7547
95
286648
47