Socket
Socket
Sign inDemoInstall

jest-changed-files

Package Overview
Dependencies
38
Maintainers
3
Versions
172
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 30.0.0-alpha.2 to 30.0.0-alpha.3

33

build/index.js

@@ -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"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc