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 2.1.0 to 3.0.0

24

lib/clone.js

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

'bitbucket.com',
'bitbucket.org'
'bitbucket.org',
])

@@ -117,6 +117,10 @@ // we have to use url.parse until we add the same shim that hosted-git-info has

target,
'--recurse-submodules'
'--recurse-submodules',
]
if (maybeShallow(repo, opts)) { args.push('--depth=1') }
if (isWindows(opts)) { args.push('--config', 'core.longpaths=true') }
if (maybeShallow(repo, opts)) {
args.push('--depth=1')
}
if (isWindows(opts)) {
args.push('--config', 'core.longpaths=true')
}
return spawn(args, opts).then(() => revDoc.sha)

@@ -131,6 +135,10 @@ }

target,
'--recurse-submodules'
'--recurse-submodules',
]
if (maybeShallow(repo, opts)) { args.push('--depth=1') }
if (isWindows(opts)) { args.push('--config', 'core.longpaths=true') }
if (maybeShallow(repo, opts)) {
args.push('--depth=1')
}
if (isWindows(opts)) {
args.push('--config', 'core.longpaths=true')
}
return spawn(args, opts).then(() => revDoc.sha)

@@ -149,3 +157,3 @@ }

'--init',
'--recursive'
'--recursive',
], { ...opts, cwd: target }))

@@ -152,0 +160,0 @@ }))

@@ -35,3 +35,3 @@

GitPathspecError,
GitUnknownError
GitUnknownError,
}

@@ -8,3 +8,3 @@ module.exports = {

isClean: require('./is-clean.js'),
errors: require('./errors.js')
errors: require('./errors.js'),
}

@@ -10,3 +10,3 @@ // turn an array of lines from `git ls-remote` into a thing

refs: {},
shas: {}
shas: {},
}))

@@ -56,3 +56,5 @@

revs['dist-tags'].HEAD = v
if (!revs.refs.latest) { revs['dist-tags'].latest = v }
if (!revs.refs.latest) {
revs['dist-tags'].latest = v
}
}

@@ -84,3 +86,5 @@ })

const split = line.trim().split(/\s+/, 2)
if (split.length < 2) { return null }
if (split.length < 2) {
return null
}

@@ -128,3 +132,5 @@ const sha = split[0].trim()

if (!doc) { return revs }
if (!doc) {
return revs
}

@@ -131,0 +137,0 @@ revs.refs[doc.ref] = doc

const {
GitConnectionError,
GitPathspecError,
GitUnknownError
GitUnknownError,
} = require('./errors.js')

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

'SSL_ERROR_SYSCALL',
'The requested URL returned error: 503'
'The requested URL returned error: 503',
].join('|'))

@@ -18,0 +18,0 @@

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

GIT_ASKPASS: 'echo',
GIT_SSH_COMMAND: 'ssh -oStrictHostKeyChecking=accept-new'
GIT_SSH_COMMAND: 'ssh -oStrictHostKeyChecking=accept-new',
}

@@ -12,3 +12,3 @@ module.exports = (opts = {}) => ({

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

@@ -7,3 +7,3 @@ const pinflight = require('promise-inflight')

max: 100,
maxAge: 5 * 60 * 1000
ttl: 5 * 60 * 1000,
})

@@ -10,0 +10,0 @@

const spawn = require('@npmcli/promise-spawn')
const promiseRetry = require('promise-retry')
const log = require('proc-log')
const makeError = require('./make-error.js')
const whichGit = require('./which.js')
const makeOpts = require('./opts.js')
const procLog = require('./proc-log.js')

@@ -11,3 +11,5 @@ module.exports = (gitArgs, opts = {}) => {

if (gitPath instanceof Error) { return Promise.reject(gitPath) }
if (gitPath instanceof Error) {
return Promise.reject(gitPath)
}

@@ -19,3 +21,2 @@ // undocumented option, mostly only here for tests

const log = opts.log || procLog
let retry = opts.retry

@@ -27,3 +28,3 @@ if (retry === null || retry === undefined) {

maxTimeout: opts.fetchRetryMaxtimeout || 60000,
minTimeout: opts.fetchRetryMintimeout || 1000
minTimeout: opts.fetchRetryMintimeout || 1000,
}

@@ -30,0 +31,0 @@ }

{
"name": "@npmcli/git",
"version": "2.1.0",
"version": "3.0.0",
"main": "lib/index.js",
"files": [
"lib/*.js"
"bin",
"lib"
],

@@ -13,6 +14,6 @@ "description": "a util for spawning git from npm CLI contexts",

},
"author": "Isaac Z. Schlueter <i@izs.me> (https://izs.me)",
"author": "GitHub Inc.",
"license": "ISC",
"scripts": {
"lint": "standard",
"lint": "eslint '**/*.js'",
"lint:fix": "standard --fix",

@@ -24,3 +25,6 @@ "postversion": "npm publish",

"test": "tap",
"posttest": "npm run lint"
"posttest": "npm run lint",
"postlint": "npm-template-check",
"template-copy": "npm-template-copy --force",
"lintfix": "npm run lint -- --fix"
},

@@ -32,11 +36,13 @@ "tap": {

"devDependencies": {
"@npmcli/template-oss": "^2.7.1",
"slash": "^3.0.0",
"standard": "^16.0.3",
"tap": "^15.0.6"
"tap": "^15.1.6"
},
"dependencies": {
"@npmcli/promise-spawn": "^1.3.2",
"lru-cache": "^6.0.0",
"lru-cache": "^7.3.1",
"mkdirp": "^1.0.4",
"npm-pick-manifest": "^6.1.1",
"npm-pick-manifest": "^7.0.0",
"proc-log": "^2.0.0",
"promise-inflight": "^1.0.1",

@@ -46,3 +52,10 @@ "promise-retry": "^2.0.1",

"which": "^2.0.2"
},
"engines": {
"node": "^12.13.0 || ^14.15.0 || >=16"
},
"templateOSS": {
"windowsCI": false,
"version": "2.7.1"
}
}
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