jest-changed-files
Advanced tools
Comparing version 30.0.0-alpha.2 to 30.0.0-alpha.3
@@ -60,9 +60,9 @@ /*! | ||
}); | ||
} catch (e) { | ||
if (_util().types.isNativeError(e)) { | ||
const err = e; | ||
} catch (error) { | ||
if (_util().types.isNativeError(error)) { | ||
const err = error; | ||
// TODO: Should we keep the original `message`? | ||
err.message = err.stderr; | ||
} | ||
throw e; | ||
throw error; | ||
} | ||
@@ -76,9 +76,9 @@ return result.stdout.split('\n').filter(s => s !== '').map(changedPath => path().resolve(cwd, changedPath)); | ||
if (options.lastCommit === true) { | ||
return findChangedFilesUsingCommand(['show', '--name-only', '--pretty=format:', 'HEAD', '--'].concat(includePaths), cwd); | ||
return findChangedFilesUsingCommand(['show', '--name-only', '--pretty=format:', 'HEAD', '--', ...includePaths], cwd); | ||
} | ||
if (changedSince != null && changedSince.length > 0) { | ||
const [committed, staged, unstaged] = await Promise.all([findChangedFilesUsingCommand(['diff', '--name-only', `${changedSince}...HEAD`, '--'].concat(includePaths), cwd), findChangedFilesUsingCommand(['diff', '--cached', '--name-only', '--'].concat(includePaths), cwd), findChangedFilesUsingCommand(['ls-files', '--other', '--modified', '--exclude-standard', '--'].concat(includePaths), cwd)]); | ||
const [committed, staged, unstaged] = await Promise.all([findChangedFilesUsingCommand(['diff', '--name-only', `${changedSince}...HEAD`, '--', ...includePaths], cwd), findChangedFilesUsingCommand(['diff', '--cached', '--name-only', '--', ...includePaths], cwd), findChangedFilesUsingCommand(['ls-files', '--other', '--modified', '--exclude-standard', '--', ...includePaths], cwd)]); | ||
return [...committed, ...staged, ...unstaged]; | ||
} | ||
const [staged, unstaged] = await Promise.all([findChangedFilesUsingCommand(['diff', '--cached', '--name-only', '--'].concat(includePaths), cwd), findChangedFilesUsingCommand(['ls-files', '--other', '--modified', '--exclude-standard', '--'].concat(includePaths), cwd)]); | ||
const [staged, unstaged] = await Promise.all([findChangedFilesUsingCommand(['diff', '--cached', '--name-only', '--', ...includePaths], cwd), findChangedFilesUsingCommand(['ls-files', '--other', '--modified', '--exclude-standard', '--', ...includePaths], cwd)]); | ||
return [...staged, ...unstaged]; | ||
@@ -165,9 +165,9 @@ }, | ||
}); | ||
} catch (e) { | ||
if (_util().types.isNativeError(e)) { | ||
const err = e; | ||
} catch (error) { | ||
if (_util().types.isNativeError(error)) { | ||
const err = error; | ||
// TODO: Should we keep the original `message`? | ||
err.message = err.stderr; | ||
} | ||
throw e; | ||
throw error; | ||
} | ||
@@ -259,9 +259,9 @@ return result.stdout.split('\n').filter(s => s !== '').map(changedPath => path().resolve(cwd, changedPath)); | ||
}); | ||
} catch (e) { | ||
if (_util().types.isNativeError(e)) { | ||
const err = e; | ||
} catch (error) { | ||
if (_util().types.isNativeError(error)) { | ||
const err = error; | ||
// TODO: Should we keep the original `message`? | ||
err.message = err.stderr; | ||
} | ||
throw e; | ||
throw error; | ||
} | ||
@@ -364,3 +364,4 @@ return result.stdout.split('\n').filter(s => s !== '').map(changedPath => path().resolve(cwd, changedPath)); | ||
const slPromises = Array.from(repos.sl, repo => _sl.default.findChangedFiles(repo, changedFilesOptions)); | ||
const changedFiles = (await Promise.all([...gitPromises, ...hgPromises, ...slPromises])).reduce((allFiles, changedFilesInTheRepo) => { | ||
const allVcs = await Promise.all([...gitPromises, ...hgPromises, ...slPromises]); | ||
const changedFiles = allVcs.reduce((allFiles, changedFilesInTheRepo) => { | ||
for (const file of changedFilesInTheRepo) { | ||
@@ -367,0 +368,0 @@ allFiles.add(file); |
{ | ||
"name": "jest-changed-files", | ||
"version": "30.0.0-alpha.2", | ||
"version": "30.0.0-alpha.3", | ||
"repository": { | ||
@@ -23,3 +23,3 @@ "type": "git", | ||
"execa": "^5.0.0", | ||
"jest-util": "30.0.0-alpha.2", | ||
"jest-util": "30.0.0-alpha.3", | ||
"p-limit": "^3.1.0" | ||
@@ -33,3 +33,3 @@ }, | ||
}, | ||
"gitHead": "c04d13d7abd22e47b0997f6027886aed225c9ce4" | ||
"gitHead": "e267aff33d105399f2134bad7c8f82285104f3da" | ||
} |
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
18486
398
+ Added@jest/schemas@30.0.0-alpha.3(transitive)
+ Added@jest/types@30.0.0-alpha.3(transitive)
+ Added@sinclair/typebox@0.32.35(transitive)
+ Addedjest-util@30.0.0-alpha.3(transitive)
- Removed@jest/schemas@30.0.0-alpha.2(transitive)
- Removed@jest/types@30.0.0-alpha.2(transitive)
- Removed@sinclair/typebox@0.31.28(transitive)
- Removedjest-util@30.0.0-alpha.2(transitive)
Updatedjest-util@30.0.0-alpha.3