jest-changed-files
Advanced tools
Comparing version 25.3.0 to 25.4.0
@@ -11,2 +11,1 @@ /** | ||
export default adapter; | ||
//# sourceMappingURL=git.d.ts.map |
@@ -116,18 +116,36 @@ 'use strict'; | ||
); | ||
} else if (changedSince) { | ||
const committed = await findChangedFilesUsingCommand( | ||
[ | ||
'log', | ||
'--name-only', | ||
'--pretty=format:', | ||
'HEAD', | ||
`^${changedSince}` | ||
].concat(includePaths), | ||
cwd | ||
); | ||
const staged = await findChangedFilesUsingCommand( | ||
} | ||
if (changedSince) { | ||
const [committed, staged, unstaged] = await Promise.all([ | ||
findChangedFilesUsingCommand( | ||
[ | ||
'log', | ||
'--name-only', | ||
'--pretty=format:', | ||
'HEAD', | ||
`^${changedSince}` | ||
].concat(includePaths), | ||
cwd | ||
), | ||
findChangedFilesUsingCommand( | ||
['diff', '--cached', '--name-only'].concat(includePaths), | ||
cwd | ||
), | ||
findChangedFilesUsingCommand( | ||
['ls-files', '--other', '--modified', '--exclude-standard'].concat( | ||
includePaths | ||
), | ||
cwd | ||
) | ||
]); | ||
return [...committed, ...staged, ...unstaged]; | ||
} | ||
const [staged, unstaged] = await Promise.all([ | ||
findChangedFilesUsingCommand( | ||
['diff', '--cached', '--name-only'].concat(includePaths), | ||
cwd | ||
); | ||
const unstaged = await findChangedFilesUsingCommand( | ||
), | ||
findChangedFilesUsingCommand( | ||
['ls-files', '--other', '--modified', '--exclude-standard'].concat( | ||
@@ -137,12 +155,5 @@ includePaths | ||
cwd | ||
); | ||
return [...committed, ...staged, ...unstaged]; | ||
} else { | ||
return findChangedFilesUsingCommand( | ||
['ls-files', '--other', '--modified', '--exclude-standard'].concat( | ||
includePaths | ||
), | ||
cwd | ||
); | ||
} | ||
) | ||
]); | ||
return [...staged, ...unstaged]; | ||
}, | ||
@@ -149,0 +160,0 @@ getRoot: async cwd => { |
@@ -11,2 +11,1 @@ /** | ||
export default adapter; | ||
//# sourceMappingURL=hg.d.ts.map |
@@ -74,55 +74,10 @@ 'use strict'; | ||
function ownKeys(object, enumerableOnly) { | ||
var keys = Object.keys(object); | ||
if (Object.getOwnPropertySymbols) { | ||
var symbols = Object.getOwnPropertySymbols(object); | ||
if (enumerableOnly) | ||
symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
}); | ||
keys.push.apply(keys, symbols); | ||
} | ||
return keys; | ||
} | ||
function _objectSpread(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i] != null ? arguments[i] : {}; | ||
if (i % 2) { | ||
ownKeys(Object(source), true).forEach(function (key) { | ||
_defineProperty(target, key, source[key]); | ||
}); | ||
} else if (Object.getOwnPropertyDescriptors) { | ||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); | ||
} else { | ||
ownKeys(Object(source)).forEach(function (key) { | ||
Object.defineProperty( | ||
target, | ||
key, | ||
Object.getOwnPropertyDescriptor(source, key) | ||
); | ||
}); | ||
} | ||
} | ||
return target; | ||
} | ||
function _defineProperty(obj, key, value) { | ||
if (key in obj) { | ||
Object.defineProperty(obj, key, { | ||
value: value, | ||
enumerable: true, | ||
configurable: true, | ||
writable: true | ||
}); | ||
} else { | ||
obj[key] = value; | ||
} | ||
return obj; | ||
} | ||
const env = _objectSpread({}, process.env, { | ||
HGPLAIN: '1' | ||
}); | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
*/ | ||
const env = {...process.env, HGPLAIN: '1'}; | ||
const adapter = { | ||
@@ -129,0 +84,0 @@ findChangedFiles: async (cwd, options) => { |
@@ -12,2 +12,1 @@ /** | ||
export declare const findRepos: (roots: string[]) => Promise<Repos>; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -26,51 +26,9 @@ 'use strict'; | ||
function ownKeys(object, enumerableOnly) { | ||
var keys = Object.keys(object); | ||
if (Object.getOwnPropertySymbols) { | ||
var symbols = Object.getOwnPropertySymbols(object); | ||
if (enumerableOnly) | ||
symbols = symbols.filter(function (sym) { | ||
return Object.getOwnPropertyDescriptor(object, sym).enumerable; | ||
}); | ||
keys.push.apply(keys, symbols); | ||
} | ||
return keys; | ||
} | ||
function _objectSpread(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i] != null ? arguments[i] : {}; | ||
if (i % 2) { | ||
ownKeys(Object(source), true).forEach(function (key) { | ||
_defineProperty(target, key, source[key]); | ||
}); | ||
} else if (Object.getOwnPropertyDescriptors) { | ||
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); | ||
} else { | ||
ownKeys(Object(source)).forEach(function (key) { | ||
Object.defineProperty( | ||
target, | ||
key, | ||
Object.getOwnPropertyDescriptor(source, key) | ||
); | ||
}); | ||
} | ||
} | ||
return target; | ||
} | ||
function _defineProperty(obj, key, value) { | ||
if (key in obj) { | ||
Object.defineProperty(obj, key, { | ||
value: value, | ||
enumerable: true, | ||
configurable: true, | ||
writable: true | ||
}); | ||
} else { | ||
obj[key] = value; | ||
} | ||
return obj; | ||
} | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
*/ | ||
function notEmpty(value) { | ||
@@ -89,10 +47,6 @@ return value != null; | ||
const repos = await findRepos(roots); | ||
const changedFilesOptions = _objectSpread( | ||
{ | ||
includePaths: roots | ||
}, | ||
options | ||
); | ||
const changedFilesOptions = { | ||
includePaths: roots, | ||
...options | ||
}; | ||
const gitPromises = Array.from(repos.git).map(repo => | ||
@@ -99,0 +53,0 @@ _git.default.findChangedFiles(repo, changedFilesOptions) |
@@ -11,2 +11,1 @@ /** | ||
export default adapter; | ||
//# sourceMappingURL=git.d.ts.map |
@@ -11,2 +11,1 @@ /** | ||
export default adapter; | ||
//# sourceMappingURL=hg.d.ts.map |
@@ -12,2 +12,1 @@ /** | ||
export declare const findRepos: (roots: string[]) => Promise<Repos>; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -29,2 +29,1 @@ /** | ||
export {}; | ||
//# sourceMappingURL=types.d.ts.map |
@@ -29,2 +29,1 @@ /** | ||
export {}; | ||
//# sourceMappingURL=types.d.ts.map |
{ | ||
"name": "jest-changed-files", | ||
"version": "25.3.0", | ||
"version": "25.4.0", | ||
"repository": { | ||
@@ -20,3 +20,3 @@ "type": "git", | ||
"dependencies": { | ||
"@jest/types": "^25.3.0", | ||
"@jest/types": "^25.4.0", | ||
"execa": "^3.2.0", | ||
@@ -31,3 +31,3 @@ "throat": "^5.0.0" | ||
}, | ||
"gitHead": "45a4936d96d74cdee6b91122a51a556e3ebe6dc8" | ||
"gitHead": "5b129d714cadb818be28afbe313cbeae8fbb1dde" | ||
} |
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
16372
15
455
Updated@jest/types@^25.4.0