Socket
Socket
Sign inDemoInstall

@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 2.0.7 to 2.0.8

8

lib/clone.js

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

const spawn = require('./spawn.js')
const { isWindows, escapePath } = require('./utils.js')
const { isWindows } = require('./utils.js')

@@ -116,3 +116,3 @@ const pickManifest = require('npm-pick-manifest')

repo,
escapePath(target, opts),
target,
'--recurse-submodules'

@@ -130,3 +130,3 @@ ]

repo,
escapePath(target, opts),
target,
'--recurse-submodules'

@@ -157,3 +157,3 @@ ]

const lp = isWindows(opts) ? ['--config', 'core.longpaths=true'] : []
const cloneArgs = ['clone', '--mirror', '-q', repo, escapePath(target + '/.git', opts)]
const cloneArgs = ['clone', '--mirror', '-q', repo, target + '/.git']
const git = (args) => spawn(args, { ...opts, cwd: target })

@@ -160,0 +160,0 @@ return mkdirp(target)

@@ -10,3 +10,4 @@ // Values we want to set if they're not already defined by the end user

...opts,
shell: false,
env: opts.env || { ...gitEnv, ...process.env }
})

@@ -1,16 +0,3 @@

const { basename } = require('path')
const isWindows = opts => (opts.fakePlatform || process.platform) === 'win32'
// wrap the target in quotes for Windows when using cmd(.exe) as a shell to
// avoid clone failures for paths with spaces
const escapePath = (gitPath, opts) => {
const isCmd = opts.shell && (basename(opts.shell.toLowerCase(), '.exe') === 'cmd')
if (isWindows(opts) && isCmd && !gitPath.startsWith('"')) {
return `"${gitPath}"`
}
return gitPath
}
exports.escapePath = escapePath
exports.isWindows = isWindows

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

const { escapePath } = require('./utils.js')
const which = require('which')

@@ -16,3 +15,3 @@

}
return escapePath(gitPath, opts)
return gitPath
}
{
"name": "@npmcli/git",
"version": "2.0.7",
"version": "2.0.8",
"main": "lib/index.js",

@@ -22,3 +22,4 @@ "files": [

"snap": "tap",
"test": "tap"
"test": "tap",
"posttest": "npm run lint"
},

@@ -25,0 +26,0 @@ "tap": {

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