jest-changed-files
Advanced tools
Comparing version 12.0.2 to 12.1.0
{ | ||
"name": "jest-changed-files", | ||
"version": "12.0.2", | ||
"version": "12.1.0", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
@@ -35,9 +35,9 @@ /** | ||
pit('returns null for non hg repo folder', () => { | ||
return hg.isHGRepository(tmpdir).then(res => { | ||
it('returns null for non hg repo folder', () => | ||
hg.isHGRepository(tmpdir).then(res => { | ||
expect(res).toBeNull(); | ||
}); | ||
}); | ||
}) | ||
); | ||
pit('returns dirname for hg repo folder', () => { | ||
it('returns dirname for hg repo folder', () => { | ||
childProcess.spawnSync('hg', ['init', tmpdir]); | ||
@@ -57,9 +57,9 @@ | ||
pit('returns an empty array for hg repo folder without modified files', () => { | ||
return hg.findChangedFiles(tmpdir).then(res => { | ||
it('returns an empty array for hg repo folder without modified files', () => | ||
hg.findChangedFiles(tmpdir).then(res => { | ||
expect(res).toEqual([]); | ||
}); | ||
}); | ||
}) | ||
); | ||
pit('returns an array of modified files for hg repo folder', () => { | ||
it('returns an array of modified files for hg repo folder', () => { | ||
fs.writeFileSync(tmpfile); | ||
@@ -66,0 +66,0 @@ fs.writeFileSync(tmpfileNested); |
@@ -23,2 +23,3 @@ /** | ||
child.stderr.on('data', data => stderr += data); | ||
child.on('error', e => reject(e)); | ||
child.on('close', code => { | ||
@@ -25,0 +26,0 @@ if (code === 0) { |
@@ -14,10 +14,13 @@ /** | ||
const env = Object.assign({}, process.env, { | ||
HGPLAIN: 1, | ||
}); | ||
function findChangedFiles(cwd, options) { | ||
return new Promise((resolve, reject) => { | ||
const args = ['status', '--root-relative', '-amn']; | ||
const args = ['status', '-amn']; | ||
if (options && options.withAncestor) { | ||
args.push('--rev', 'ancestor(.^)'); | ||
} | ||
const child = childProcess.spawn('hg', args, {cwd}); | ||
const child = childProcess.spawn('hg', args, {cwd, env}); | ||
let stdout = ''; | ||
@@ -27,2 +30,3 @@ let stderr = ''; | ||
child.stderr.on('data', data => stderr += data); | ||
child.on('error', e => reject(e)); | ||
child.on('close', code => { | ||
@@ -49,3 +53,3 @@ if (code === 0) { | ||
let stdout = ''; | ||
const child = childProcess.spawn('hg', ['root'], {cwd}); | ||
const child = childProcess.spawn('hg', ['root'], {cwd, env}); | ||
child.stdout.on('data', data => stdout += data); | ||
@@ -52,0 +56,0 @@ child.on('error', () => resolve(null)); |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
8206
236
4
3