jest-changed-files
Advanced tools
Comparing version 14.0.0 to 14.2.0-alpha.ca8bfb6e
@@ -32,15 +32,15 @@ /** | ||
if (stdout === '') { | ||
resolve([]);} else | ||
{ | ||
resolve([]); | ||
} else { | ||
resolve(stdout.split('\n').map( | ||
changedPath => path.resolve(cwd, changedPath)));}} else | ||
changedPath => path.resolve(cwd, changedPath))); | ||
} | ||
} else { | ||
reject(code + ': ' + stderr); | ||
} | ||
}); | ||
}); | ||
} | ||
{ | ||
reject(code + ': ' + stderr);}});});} | ||
function isGitRepository(cwd) { | ||
@@ -54,11 +54,11 @@ return new Promise(resolve => { | ||
child.on('error', () => resolve(null)); | ||
child.on('close', code => resolve(code === 0 ? stdout.trim() : null));} | ||
catch (e) { | ||
resolve(null);}});} | ||
child.on('close', code => resolve(code === 0 ? stdout.trim() : null)); | ||
} catch (e) { | ||
resolve(null); | ||
} | ||
}); | ||
} | ||
module.exports = { | ||
isGitRepository, | ||
module.exports = { | ||
isGitRepository, | ||
findChangedFiles }; |
@@ -18,3 +18,3 @@ /** | ||
const env = Object.assign({}, process.env, { | ||
const env = Object.assign({}, process.env, { | ||
HGPLAIN: 1 }); | ||
@@ -31,4 +31,4 @@ | ||
if (options && options.withAncestor) { | ||
args.push('--rev', 'ancestor(.^)');} | ||
args.push('--rev', 'ancestor(.^)'); | ||
} | ||
const child = childProcess.spawn('hg', args, { cwd, env }); | ||
@@ -44,15 +44,15 @@ let stdout = ''; | ||
if (stdout === '') { | ||
resolve([]);} else | ||
{ | ||
resolve([]); | ||
} else { | ||
resolve(stdout.split('\n').map( | ||
changedPath => path.resolve(cwd, changedPath)));}} else | ||
changedPath => path.resolve(cwd, changedPath))); | ||
} | ||
} else { | ||
reject(code + ': ' + stderr); | ||
} | ||
}); | ||
}); | ||
} | ||
{ | ||
reject(code + ': ' + stderr);}});});} | ||
function isHGRepository(cwd) { | ||
@@ -65,11 +65,11 @@ return new Promise(resolve => { | ||
child.on('error', () => resolve(null)); | ||
child.on('close', code => resolve(code === 0 ? stdout.trim() : null));} | ||
catch (e) { | ||
resolve(null);}});} | ||
child.on('close', code => resolve(code === 0 ? stdout.trim() : null)); | ||
} catch (e) { | ||
resolve(null); | ||
} | ||
}); | ||
} | ||
module.exports = { | ||
isHGRepository, | ||
module.exports = { | ||
isHGRepository, | ||
findChangedFiles }; |
@@ -11,4 +11,4 @@ /** | ||
module.exports = { | ||
git: require('./git'), | ||
module.exports = { | ||
git: require('./git'), | ||
hg: require('./hg') }; |
{ | ||
"name": "jest-changed-files", | ||
"version": "14.0.0", | ||
"version": "14.2.0-alpha.ca8bfb6e", | ||
"repository": { | ||
@@ -13,7 +13,2 @@ "type": "git", | ||
}, | ||
"jest": { | ||
"rootDir": "./src", | ||
"scriptPreprocessor": "../../babel-jest", | ||
"testEnvironment": "node" | ||
}, | ||
"scripts": { | ||
@@ -20,0 +15,0 @@ "test": "../../packages/jest-cli/bin/jest.js" |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
5359
6
118
0
49
2