Socket
Socket
Sign inDemoInstall

jest-changed-files

Package Overview
Dependencies
Maintainers
5
Versions
175
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-changed-files - npm Package Compare versions

Comparing version 21.0.0-alpha.2 to 21.0.0-beta.1

28

build/git.js

@@ -1,2 +0,2 @@

'use strict';
'use strict';var _path;

@@ -14,12 +14,12 @@

var _path = require('path');var _path2 = _interopRequireDefault(_path);
var _child_process = require('child_process');var _child_process2 = _interopRequireDefault(_child_process);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function _asyncToGenerator(fn) {return function () {var gen = fn.apply(this, arguments);return new Promise(function (resolve, reject) {function step(key, arg) {try {var info = gen[key](arg);var value = info.value;} catch (error) {reject(error);return;}if (info.done) {resolve(value);} else {return Promise.resolve(value).then(function (value) {step("next", value);}, function (err) {step("throw", err);});}}return step("next");});};} /**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/const adapter = { findChangedFiles: (() => {var _ref = _asyncToGenerator(function* (cwd, options) {if (options && options.withAncestor) {throw new Error(
function _load_path() {return _path = _interopRequireDefault(require('path'));}var _child_process;
function _load_child_process() {return _child_process = _interopRequireDefault(require('child_process'));}function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function _asyncToGenerator(fn) {return function () {var gen = fn.apply(this, arguments);return new Promise(function (resolve, reject) {function step(key, arg) {try {var info = gen[key](arg);var value = info.value;} catch (error) {reject(error);return;}if (info.done) {resolve(value);} else {return Promise.resolve(value).then(function (value) {step("next", value);}, function (err) {step("throw", err);});}}return step("next");});};} /**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/const adapter = { findChangedFiles: (() => {var _ref = _asyncToGenerator(function* (cwd, options) {if (options && options.withAncestor) {throw new Error(
'`changedFilesWithAncestor` is not supported in git repos.');

@@ -33,3 +33,3 @@

['ls-files', '--other', '--modified', '--exclude-standard'];
const child = _child_process2.default.spawn('git', args, { cwd });
const child = (_child_process || _load_child_process()).default.spawn('git', args, { cwd });
let stdout = '';

@@ -49,3 +49,3 @@ let stderr = '';

split('\n').
map(function (changedPath) {return _path2.default.resolve(cwd, changedPath);}));
map(function (changedPath) {return (_path || _load_path()).default.resolve(cwd, changedPath);}));

@@ -65,3 +65,3 @@ }

const options = ['rev-parse', '--show-toplevel'];
const child = _child_process2.default.spawn('git', options, { cwd });
const child = (_child_process || _load_child_process()).default.spawn('git', options, { cwd });
child.stdout.on('data', function (data) {return stdout += data;});

@@ -68,0 +68,0 @@ child.on('error', function () {return resolve(null);});

@@ -1,2 +0,2 @@

'use strict';
'use strict';var _path;

@@ -14,12 +14,12 @@

var _path = require('path');var _path2 = _interopRequireDefault(_path);
var _child_process = require('child_process');var _child_process2 = _interopRequireDefault(_child_process);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function _asyncToGenerator(fn) {return function () {var gen = fn.apply(this, arguments);return new Promise(function (resolve, reject) {function step(key, arg) {try {var info = gen[key](arg);var value = info.value;} catch (error) {reject(error);return;}if (info.done) {resolve(value);} else {return Promise.resolve(value).then(function (value) {step("next", value);}, function (err) {step("throw", err);});}}return step("next");});};} /**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/const env = Object.assign({}, process.env, { HGPLAIN: 1 });const adapter = { findChangedFiles: (() => {var _ref = _asyncToGenerator(function* (cwd,
function _load_path() {return _path = _interopRequireDefault(require('path'));}var _child_process;
function _load_child_process() {return _child_process = _interopRequireDefault(require('child_process'));}function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function _asyncToGenerator(fn) {return function () {var gen = fn.apply(this, arguments);return new Promise(function (resolve, reject) {function step(key, arg) {try {var info = gen[key](arg);var value = info.value;} catch (error) {reject(error);return;}if (info.done) {resolve(value);} else {return Promise.resolve(value).then(function (value) {step("next", value);}, function (err) {step("throw", err);});}}return step("next");});};} /**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/const env = Object.assign({}, process.env, { HGPLAIN: 1 });const adapter = { findChangedFiles: (() => {var _ref = _asyncToGenerator(function* (cwd,
options)

@@ -34,3 +34,3 @@ {

}
const child = _child_process2.default.spawn('hg', args, { cwd, env });
const child = (_child_process || _load_child_process()).default.spawn('hg', args, { cwd, env });
let stdout = '';

@@ -50,3 +50,3 @@ let stderr = '';

split('\n').
map(function (changedPath) {return _path2.default.resolve(cwd, changedPath);}));
map(function (changedPath) {return (_path || _load_path()).default.resolve(cwd, changedPath);}));

@@ -65,3 +65,3 @@ }

let stdout = '';
const child = _child_process2.default.spawn('hg', ['root'], { cwd, env });
const child = (_child_process || _load_child_process()).default.spawn('hg', ['root'], { cwd, env });
child.stdout.on('data', function (data) {return stdout += data;});

@@ -68,0 +68,0 @@ child.on('error', function () {return resolve(null);});

@@ -1,2 +0,2 @@

'use strict';
'use strict';var _git;

@@ -14,15 +14,15 @@

var _git = require('./git');var _git2 = _interopRequireDefault(_git);
var _hg = require('./hg');var _hg2 = _interopRequireDefault(_hg);
var _throat = require('throat');var _throat2 = _interopRequireDefault(_throat);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function _asyncToGenerator(fn) {return function () {var gen = fn.apply(this, arguments);return new Promise(function (resolve, reject) {function step(key, arg) {try {var info = gen[key](arg);var value = info.value;} catch (error) {reject(error);return;}if (info.done) {resolve(value);} else {return Promise.resolve(value).then(function (value) {step("next", value);}, function (err) {step("throw", err);});}}return step("next");});};} /**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/ // This is an arbitrary number. The main goal is to prevent projects with
function _load_git() {return _git = _interopRequireDefault(require('./git'));}var _hg;
function _load_hg() {return _hg = _interopRequireDefault(require('./hg'));}var _throat;
function _load_throat() {return _throat = _interopRequireDefault(require('throat'));}function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function _asyncToGenerator(fn) {return function () {var gen = fn.apply(this, arguments);return new Promise(function (resolve, reject) {function step(key, arg) {try {var info = gen[key](arg);var value = info.value;} catch (error) {reject(error);return;}if (info.done) {resolve(value);} else {return Promise.resolve(value).then(function (value) {step("next", value);}, function (err) {step("throw", err);});}}return step("next");});};} /**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/ // This is an arbitrary number. The main goal is to prevent projects with
// many roots (50+) from spawning too many processes at once.
const mutex = (0, _throat2.default)(5);const findGitRoot = dir => mutex(() => _git2.default.getRoot(dir));const findHgRoot = dir => mutex(() => _hg2.default.getRoot(dir));const getChangedFilesForRoots = (() => {var _ref = _asyncToGenerator(function* (roots,
const mutex = (0, (_throat || _load_throat()).default)(5);const findGitRoot = dir => mutex(() => (_git || _load_git()).default.getRoot(dir));const findHgRoot = dir => mutex(() => (_hg || _load_hg()).default.getRoot(dir));const getChangedFilesForRoots = (() => {var _ref = _asyncToGenerator(function* (roots,
options)

@@ -33,7 +33,7 @@ {

const gitPromises = Array.from(repos.git).map(function (repo) {return (
_git2.default.findChangedFiles(repo, options));});
(_git || _load_git()).default.findChangedFiles(repo, options));});
const hgPromises = Array.from(repos.hg).map(function (repo) {return (
_hg2.default.findChangedFiles(repo, options));});
(_hg || _load_hg()).default.findChangedFiles(repo, options));});

@@ -40,0 +40,0 @@

{
"name": "jest-changed-files",
"version": "21.0.0-alpha.2",
"version": "21.0.0-beta.1",
"repository": {

@@ -5,0 +5,0 @@ "type": "git",

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc