You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@npmcli/git

Package Overview
Dependencies
Maintainers
6
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.0.4 to 4.1.0

14

lib/find.js
const is = require('./is.js')
const { dirname } = require('path')
module.exports = async ({ cwd = process.cwd() } = {}) => {
if (await is({ cwd })) {
return cwd
}
while (cwd !== dirname(cwd)) {
cwd = dirname(cwd)
module.exports = async ({ cwd = process.cwd(), root } = {}) => {
while (true) {
if (await is({ cwd })) {
return cwd
}
const next = dirname(cwd)
if (cwd === root || cwd === next) {
return null
}
cwd = next
}
return null
}
{
"name": "@npmcli/git",
"version": "4.0.4",
"version": "4.1.0",
"main": "lib/index.js",

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

"tap": {
"check-coverage": true,
"coverage-map": "map.js",
"timeout": 600,
"nyc-arg": [

@@ -36,3 +35,3 @@ "--exclude",

"@npmcli/eslint-config": "^4.0.0",
"@npmcli/template-oss": "4.12.0",
"@npmcli/template-oss": "4.15.1",
"npm-package-arg": "^10.0.0",

@@ -57,5 +56,5 @@ "slash": "^3.0.0",

"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"windowsCI": false,
"version": "4.12.0"
"version": "4.15.1",
"publish": true
}
}

@@ -127,3 +127,4 @@ # @npmcli/git

probably best to only call it if you're reasonably sure you're likely to be
in a git project somewhere.
in a git project somewhere. Pass in `opts.root` to stop checking at that
directory.

@@ -130,0 +131,0 @@ Resolves to `null` if not in a git project.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc