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

8

lib/clone.js

@@ -23,5 +23,5 @@ // The goal here is to minimize both git workload and

const { parse } = require('url') // eslint-disable-line node/no-deprecated-api
const { basename, resolve } = require('path')
const path = require('path')
const revs = require('./revs.js')
const getRevs = require('./revs.js')
const spawn = require('./spawn.js')

@@ -35,3 +35,3 @@ const { isWindows } = require('./utils.js')

module.exports = (repo, ref = 'HEAD', target = null, opts = {}) =>
revs(repo, opts).then(revs => clone(
getRevs(repo, opts).then(revs => clone(
repo,

@@ -53,3 +53,3 @@ revs,

const defaultTarget = (repo, /* istanbul ignore next */ cwd = process.cwd()) =>
resolve(cwd, basename(repo.replace(/[/\\]?\.git$/, '')))
path.resolve(cwd, path.basename(repo.replace(/[/\\]?\.git$/, '')))

@@ -56,0 +56,0 @@ const clone = (repo, revs, ref, revDoc, target, opts) => {

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

// don't have peels, if they were not annotated.
const ref = rawRef.substr('refs/tags/'.length)
const ref = rawRef.slice('refs/tags/'.length)
return { sha, ref, rawRef, type }

@@ -107,3 +107,3 @@ }

if (type === 'branch') {
const ref = rawRef.substr('refs/heads/'.length)
const ref = rawRef.slice('refs/heads/'.length)
return { sha, ref, rawRef, type }

@@ -115,3 +115,3 @@ }

// for the merged pr, or #pull/123 for the PR head
const ref = rawRef.substr('refs/'.length).replace(/\/head$/, '')
const ref = rawRef.slice('refs/'.length).replace(/\/head$/, '')
return { sha, ref, rawRef, type }

@@ -118,0 +118,0 @@ }

@@ -20,5 +20,5 @@ const spawn = require('@npmcli/promise-spawn')

let retry = opts.retry
if (retry === null || retry === undefined) {
retry = {
let retryOpts = opts.retry
if (retryOpts === null || retryOpts === undefined) {
retryOpts = {
retries: opts.fetchRetries || 2,

@@ -30,3 +30,3 @@ factor: opts.fetchRetryFactor || 10,

}
return promiseRetry((retry, number) => {
return promiseRetry((retryFn, number) => {
if (number !== 1) {

@@ -43,5 +43,5 @@ log.silly('git', `Retrying git command: ${

}
retry(gitError)
retryFn(gitError)
})
}, retry)
}, retryOpts)
}
{
"name": "@npmcli/git",
"version": "3.0.0",
"version": "3.0.1",
"main": "lib/index.js",
"files": [
"bin",
"lib"
"bin/",
"lib/"
],

@@ -12,3 +12,3 @@ "description": "a util for spawning git from npm CLI contexts",

"type": "git",
"url": "git+https://github.com/npm/git"
"url": "https://github.com/npm/git.git"
},

@@ -18,4 +18,3 @@ "author": "GitHub Inc.",

"scripts": {
"lint": "eslint '**/*.js'",
"lint:fix": "standard --fix",
"lint": "eslint \"**/*.js\"",
"postversion": "npm publish",

@@ -27,5 +26,5 @@ "prepublishOnly": "git push origin --follow-tags",

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

@@ -37,10 +36,10 @@ "tap": {

"devDependencies": {
"@npmcli/template-oss": "^2.7.1",
"@npmcli/eslint-config": "^3.0.1",
"@npmcli/template-oss": "3.2.2",
"slash": "^3.0.0",
"standard": "^16.0.3",
"tap": "^15.1.6"
"tap": "^16.0.1"
},
"dependencies": {
"@npmcli/promise-spawn": "^1.3.2",
"lru-cache": "^7.3.1",
"@npmcli/promise-spawn": "^3.0.0",
"lru-cache": "^7.4.4",
"mkdirp": "^1.0.4",

@@ -55,8 +54,9 @@ "npm-pick-manifest": "^7.0.0",

"engines": {
"node": "^12.13.0 || ^14.15.0 || >=16"
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"windowsCI": false,
"version": "2.7.1"
"version": "3.2.2"
}
}
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