Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

depsync

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

depsync - npm Package Compare versions

Comparing version 1.3.2 to 1.3.5

src/tasks/SubRepoTask.js

2

package.json
{
"name": "depsync",
"version": "1.3.2",
"version": "1.3.5",
"author": "Dom Chen",

@@ -5,0 +5,0 @@ "homepage": "http://www.idom.me/",

@@ -33,2 +33,3 @@ //////////////////////////////////////////////////////////////////////////////////////

const ActionTask = require("./ActionTask");
const SubRepoTask = require("./SubRepoTask");
const TaskRunner = require("./TaskRunner");

@@ -63,7 +64,9 @@ const path = require("path");

tasks.push(new RepoTask(item));
if (!this.nonRecursive) {
let depsFile = path.join(item.dir, "DEPS");
tasks.push(new DepsTask(depsFile, this.version, this.platform, this.nonRecursive));
}
}
let subRepoTask = new SubRepoTask(item);
tasks.push(subRepoTask);
if (!this.nonRecursive) {
let depsFile = path.join(item.dir, "DEPS");
tasks.push(new DepsTask(depsFile, this.version, this.platform, this.nonRecursive));
}
}

@@ -79,3 +82,5 @@ for (let item of config.files) {

}
let item = {dir: path.dirname(this.configFile)};
let subRepoTask = new SubRepoTask(item);
tasks.push(subRepoTask);
TaskRunner.runTasks(tasks, () => {

@@ -82,0 +87,0 @@ callback && callback();

@@ -81,8 +81,6 @@ //////////////////////////////////////////////////////////////////////////////////////

Utils.exec("git fetch --depth 1 origin " + item.commit, item.dir);
Utils.exec("git reset --hard FETCH_HEAD -q", item.dir);
Utils.exec("git submodule update --quiet --init --recursive --depth=1", item.dir, false);
Utils.exec("GIT_LFS_SKIP_SMUDGE=1 git reset --hard FETCH_HEAD", item.dir);
} else {
Utils.exec("git fetch origin " + item.commit, item.dir);
Utils.exec("git reset --hard FETCH_HEAD -q", item.dir);
Utils.exec("git submodule update --quiet --init --recursive", item.dir, false);
Utils.exec("GIT_LFS_SKIP_SMUDGE=1 git reset --hard FETCH_HEAD", item.dir);
}

@@ -89,0 +87,0 @@ callback && callback();

@@ -168,4 +168,11 @@ //////////////////////////////////////////////////////////////////////////////////////

function exec(cmd, dir, quiet) {
if (!dir) {
dir = process.cwd();
} else {
dir = path.resolve(dir);
}
let options = {
shell: os.platform() === "win32" ? "cmd.exe" : true, cwd: dir, env: process.env
shell: os.platform() === "win32" ? "cmd.exe" : true,
cwd: dir,
env: process.env
}

@@ -187,2 +194,22 @@

function execSafe(cmd, dir) {
if (!dir) {
dir = process.cwd();
} else {
dir = path.resolve(dir);
}
let options = {
shell: os.platform() === "win32" ? "cmd.exe" : true,
cwd: dir,
env: process.env
}
try {
let result = childProcess.spawnSync(cmd, options);
return result.stdout.toString();
} catch (e) {
return "";
}
}
function addLineBreaker() {

@@ -198,4 +225,5 @@ hasLineBreaker = true;

exports.exec = exec;
exports.execSafe = execSafe;
exports.log = log;
exports.error = error;
exports.addLineBreaker = addLineBreaker;
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