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

@npmcli/git

Package Overview
Dependencies
Maintainers
6
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@npmcli/git - npm Package Compare versions

Comparing version 4.0.3 to 4.0.4

35

lib/clone.js

@@ -30,4 +30,3 @@ // The goal here is to minimize both git workload and

const pickManifest = require('npm-pick-manifest')
const fs = require('fs')
const mkdirp = require('mkdirp')
const fs = require('fs/promises')

@@ -97,3 +96,3 @@ module.exports = (repo, ref = 'HEAD', target = null, opts = {}) =>

const git = (args) => spawn(args, { ...opts, cwd: target })
return mkdirp(target)
return fs.mkdir(target, { recursive: true })
.then(() => git(['init']))

@@ -146,15 +145,17 @@ .then(() => isWindows(opts)

const updateSubmodules = (target, opts) => new Promise(resolve =>
fs.stat(target + '/.gitmodules', er => {
if (er) {
return resolve(null)
}
return resolve(spawn([
'submodule',
'update',
'-q',
'--init',
'--recursive',
], { ...opts, cwd: target }))
}))
const updateSubmodules = async (target, opts) => {
const hasSubmodules = await fs.stat(`${target}/.gitmodules`)
.then(() => true)
.catch(() => false)
if (!hasSubmodules) {
return null
}
return spawn([
'submodule',
'update',
'-q',
'--init',
'--recursive',
], { ...opts, cwd: target })
}

@@ -167,3 +168,3 @@ const unresolved = (repo, ref, target, opts) => {

const git = (args) => spawn(args, { ...opts, cwd: target })
return mkdirp(target)
return fs.mkdir(target, { recursive: true })
.then(() => git(cloneArgs.concat(lp)))

@@ -170,0 +171,0 @@ .then(() => git(['init']))

{
"name": "@npmcli/git",
"version": "4.0.3",
"version": "4.0.4",
"main": "lib/index.js",

@@ -35,5 +35,4 @@ "files": [

"@npmcli/eslint-config": "^4.0.0",
"@npmcli/template-oss": "4.8.0",
"@npmcli/template-oss": "4.12.0",
"npm-package-arg": "^10.0.0",
"rimraf": "^3.0.2",
"slash": "^3.0.0",

@@ -45,3 +44,2 @@ "tap": "^16.0.1"

"lru-cache": "^7.4.4",
"mkdirp": "^1.0.4",
"npm-pick-manifest": "^8.0.0",

@@ -60,4 +58,4 @@ "proc-log": "^3.0.0",

"windowsCI": false,
"version": "4.8.0"
"version": "4.12.0"
}
}
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