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

@commitlint/top-level

Package Overview
Dependencies
Maintainers
4
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@commitlint/top-level - npm Package Compare versions

Comparing version 8.3.0 to 8.3.2

24

lib/index.js
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());

@@ -52,3 +53,3 @@ });

switch (_a.label) {
case 0: return [4 /*yield*/, find_up_1["default"]('.git', { cwd: cwd, type: 'directory' })];
case 0: return [4 /*yield*/, searchDotGit(cwd)];
case 1:

@@ -64,2 +65,21 @@ found = _a.sent();

}
/**
* Search .git, the '.git' can be a file(submodule), also can be a directory(normal)
*/
function searchDotGit(cwd) {
return __awaiter(this, void 0, void 0, function () {
var foundFile, foundDir;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, find_up_1["default"]('.git', { cwd: cwd, type: 'file' })];
case 1:
foundFile = _a.sent();
return [4 /*yield*/, find_up_1["default"]('.git', { cwd: cwd, type: 'directory' })];
case 2:
foundDir = _a.sent();
return [2 /*return*/, foundFile || foundDir];
}
});
});
}
//# sourceMappingURL=index.js.map

6

package.json
{
"name": "@commitlint/top-level",
"version": "8.3.0",
"version": "8.3.2",
"description": "Lint your commit messages",

@@ -44,3 +44,3 @@ "main": "lib/index.js",

"@types/find-up": "2.1.1",
"@types/node": "12.7.8"
"@types/node": "12.11.2"
},

@@ -50,3 +50,3 @@ "dependencies": {

},
"gitHead": "e2edc43219f5005cee5222133859bb0e839c4a05"
"gitHead": "0382070379cfc841da8dc57718d232d1649dac6f"
}

Sorry, the diff of this file is not supported yet

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