@commitlint/read
Advanced tools
Comparing version 18.4.3 to 18.4.4
@@ -8,3 +8,3 @@ "use strict"; | ||
const top_level_1 = __importDefault(require("@commitlint/top-level")); | ||
const fs_extra_1 = __importDefault(require("fs-extra")); | ||
const promises_1 = __importDefault(require("fs/promises")); | ||
const get_edit_file_path_1 = require("./get-edit-file-path"); | ||
@@ -18,3 +18,3 @@ // Get recently edited commit message | ||
const editFilePath = await (0, get_edit_file_path_1.getEditFilePath)(top, edit); | ||
const editFile = await fs_extra_1.default.readFile(editFilePath); | ||
const editFile = await promises_1.default.readFile(editFilePath); | ||
return [`${editFile.toString('utf-8')}\n`]; | ||
@@ -21,0 +21,0 @@ } |
@@ -8,3 +8,3 @@ "use strict"; | ||
const path_1 = __importDefault(require("path")); | ||
const fs_extra_1 = __importDefault(require("fs-extra")); | ||
const promises_1 = __importDefault(require("fs/promises")); | ||
// Get path to recently edited commit message file | ||
@@ -16,7 +16,7 @@ async function getEditFilePath(top, edit) { | ||
const dotgitPath = path_1.default.join(top, '.git'); | ||
const dotgitStats = await fs_extra_1.default.lstat(dotgitPath); | ||
const dotgitStats = await promises_1.default.lstat(dotgitPath); | ||
if (dotgitStats.isDirectory()) { | ||
return path_1.default.join(top, '.git/COMMIT_EDITMSG'); | ||
} | ||
const gitFile = await fs_extra_1.default.readFile(dotgitPath, { | ||
const gitFile = await promises_1.default.readFile(dotgitPath, { | ||
encoding: 'utf-8', | ||
@@ -23,0 +23,0 @@ }); |
{ | ||
"name": "@commitlint/read", | ||
"version": "18.4.3", | ||
"version": "18.4.4", | ||
"description": "Read commit messages from a specified range or last edit", | ||
@@ -39,4 +39,3 @@ "main": "lib/read.js", | ||
"@commitlint/test": "^18.0.0", | ||
"@commitlint/utils": "^18.4.3", | ||
"@types/fs-extra": "^11.0.3", | ||
"@commitlint/utils": "^18.4.4", | ||
"@types/git-raw-commits": "^2.0.3", | ||
@@ -47,9 +46,8 @@ "@types/minimist": "^1.2.4", | ||
"dependencies": { | ||
"@commitlint/top-level": "^18.4.3", | ||
"@commitlint/types": "^18.4.3", | ||
"fs-extra": "^11.0.0", | ||
"@commitlint/top-level": "^18.4.4", | ||
"@commitlint/types": "^18.4.4", | ||
"git-raw-commits": "^2.0.11", | ||
"minimist": "^1.2.6" | ||
}, | ||
"gitHead": "970b806bdd338e8b3e4529f21f20e795e66cd48f" | ||
"gitHead": "ad2637f3cf23c5579e600950594e4d8d47d79864" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
4
5
12413
- Removedfs-extra@^11.0.0
- Removedfs-extra@11.2.0(transitive)
- Removedgraceful-fs@4.2.11(transitive)
- Removedjsonfile@6.1.0(transitive)
- Removeduniversalify@2.0.1(transitive)
Updated@commitlint/types@^18.4.4