jest-changed-files
Advanced tools
Comparing version 27.5.0 to 27.5.1
@@ -102,9 +102,13 @@ 'use strict'; | ||
findChangedFiles: async (cwd, options) => { | ||
const changedSince = | ||
options && (options.withAncestor ? 'HEAD^' : options.changedSince); | ||
const includePaths = ((options && options.includePaths) || []).map( | ||
absoluteRoot => path().normalize(path().relative(cwd, absoluteRoot)) | ||
); | ||
var _options$includePaths; | ||
if (options && options.lastCommit) { | ||
const changedSince = options.withAncestor ? 'HEAD^' : options.changedSince; | ||
const includePaths = ( | ||
(_options$includePaths = options.includePaths) !== null && | ||
_options$includePaths !== void 0 | ||
? _options$includePaths | ||
: [] | ||
).map(absoluteRoot => path().normalize(path().relative(cwd, absoluteRoot))); | ||
if (options.lastCommit) { | ||
return findChangedFilesUsingCommand( | ||
@@ -111,0 +115,0 @@ ['show', '--name-only', '--pretty=format:', 'HEAD', '--'].concat( |
@@ -84,10 +84,16 @@ 'use strict'; | ||
findChangedFiles: async (cwd, options) => { | ||
const includePaths = (options && options.includePaths) || []; | ||
var _options$includePaths; | ||
const includePaths = | ||
(_options$includePaths = options.includePaths) !== null && | ||
_options$includePaths !== void 0 | ||
? _options$includePaths | ||
: []; | ||
const args = ['status', '-amnu']; | ||
if (options && options.withAncestor) { | ||
args.push('--rev', `min((!public() & ::.)+.)^`); | ||
} else if (options && options.changedSince) { | ||
if (options.withAncestor) { | ||
args.push('--rev', 'min((!public() & ::.)+.)^'); | ||
} else if (options.changedSince) { | ||
args.push('--rev', `ancestor(., ${options.changedSince})`); | ||
} else if (options && options.lastCommit === true) { | ||
} else if (options.lastCommit === true) { | ||
args.push('--change', '.'); | ||
@@ -94,0 +100,0 @@ } |
{ | ||
"name": "jest-changed-files", | ||
"version": "27.5.0", | ||
"version": "27.5.1", | ||
"repository": { | ||
@@ -20,3 +20,3 @@ "type": "git", | ||
"dependencies": { | ||
"@jest/types": "^27.5.0", | ||
"@jest/types": "^27.5.1", | ||
"execa": "^5.0.0", | ||
@@ -31,3 +31,3 @@ "throat": "^6.0.1" | ||
}, | ||
"gitHead": "247cbe6026a590deaf0d23edecc7b2779a4aace9" | ||
"gitHead": "67c1aa20c5fec31366d733e901fee2b981cb1850" | ||
} |
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
15095
408
Updated@jest/types@^27.5.1