jest-changed-files
Advanced tools
Comparing version 14.2.2-alpha.22bd3c33 to 14.3.0-alpha.d13c163e
@@ -18,7 +18,13 @@ /** | ||
function findChangedFiles(cwd) { | ||
function findChangedFiles(cwd, options) { | ||
return new Promise((resolve, reject) => { | ||
const args = ['ls-files', '--other', '--modified', '--exclude-standard']; | ||
const args = options.lastCommit ? | ||
['show', '--name-only', '--pretty=%b', 'HEAD'] : | ||
['ls-files', '--other', '--modified', '--exclude-standard']; | ||
const child = childProcess.spawn('git', args, { cwd }); | ||
let stdout = ''; | ||
@@ -25,0 +31,0 @@ let stderr = ''; |
@@ -26,7 +26,10 @@ /** | ||
function findChangedFiles(cwd, options) { | ||
return new Promise((resolve, reject) => { | ||
const args = ['status', '-amn']; | ||
let args = ['status', '-amn']; | ||
if (options && options.withAncestor) { | ||
args.push('--rev', 'ancestor(.^)'); | ||
} else if (options && options.lastCommit === true) { | ||
args = ['tip', '--template', '{files%"{file}\n"}']; | ||
} | ||
@@ -33,0 +36,0 @@ const child = childProcess.spawn('hg', args, { cwd, env }); |
{ | ||
"name": "jest-changed-files", | ||
"version": "14.2.2-alpha.22bd3c33", | ||
"version": "14.3.0-alpha.d13c163e", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
5564
122