lint-staged 16.1.3 → 16.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/resolveGitRepo.js +6 -6
- package/package.json +5 -4
package/lib/resolveGitRepo.js
CHANGED
|
@@ -39,18 +39,18 @@ export const resolveGitRepo = async (cwd = process.cwd()) => {
|
|
|
39
39
|
try {
|
|
40
40
|
debugLog('Resolving git repo from `%s`', cwd)
|
|
41
41
|
|
|
42
|
-
/** Git rev-parse returns all three flag values on separate lines */
|
|
43
|
-
const revParseOutput = await execGit(['rev-parse', CDUP, TOPLEVEL, ABSOLUTE_GIT_DIR], {
|
|
44
|
-
cwd,
|
|
45
|
-
})
|
|
46
|
-
const [relativeTopLevelDir, topLevel, absoluteGitDir] = revParseOutput.split('\n')
|
|
47
|
-
|
|
48
42
|
// Unset GIT_DIR before running any git operations in case it's pointing to an incorrect location
|
|
49
43
|
debugLog('Unset GIT_DIR (was `%s`)', process.env.GIT_DIR)
|
|
50
44
|
delete process.env.GIT_DIR
|
|
51
45
|
debugLog('Unset GIT_WORK_TREE (was `%s`)', process.env.GIT_WORK_TREE)
|
|
52
46
|
delete process.env.GIT_WORK_TREE
|
|
53
47
|
|
|
48
|
+
/** Git rev-parse returns all three flag values on separate lines */
|
|
49
|
+
const revParseOutput = await execGit(['rev-parse', CDUP, TOPLEVEL, ABSOLUTE_GIT_DIR], {
|
|
50
|
+
cwd,
|
|
51
|
+
})
|
|
52
|
+
const [relativeTopLevelDir, topLevel, absoluteGitDir] = revParseOutput.split('\n')
|
|
53
|
+
|
|
54
54
|
const topLevelDir = normalizePath(path.join(cwd, relativeTopLevelDir))
|
|
55
55
|
debugLog('Resolved git repository top-level directory to be `%s`', topLevelDir)
|
|
56
56
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lint-staged",
|
|
3
|
-
"version": "16.1.
|
|
3
|
+
"version": "16.1.5",
|
|
4
4
|
"description": "Lint files staged by git",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"./bin": "./bin/lint-staged.js",
|
|
36
36
|
"./package.json": "./package.json"
|
|
37
37
|
},
|
|
38
|
+
"types": "./lib/index.d.ts",
|
|
38
39
|
"files": [
|
|
39
40
|
"bin/",
|
|
40
41
|
"lib/",
|
|
@@ -50,7 +51,7 @@
|
|
|
50
51
|
"tag": "npx changeset tag"
|
|
51
52
|
},
|
|
52
53
|
"dependencies": {
|
|
53
|
-
"chalk": "^5.
|
|
54
|
+
"chalk": "^5.5.0",
|
|
54
55
|
"commander": "^14.0.0",
|
|
55
56
|
"debug": "^4.4.1",
|
|
56
57
|
"lilconfig": "^3.1.3",
|
|
@@ -59,7 +60,7 @@
|
|
|
59
60
|
"nano-spawn": "^1.0.2",
|
|
60
61
|
"pidtree": "^0.6.0",
|
|
61
62
|
"string-argv": "^0.3.2",
|
|
62
|
-
"yaml": "^2.8.
|
|
63
|
+
"yaml": "^2.8.1"
|
|
63
64
|
},
|
|
64
65
|
"devDependencies": {
|
|
65
66
|
"@changesets/changelog-github": "0.5.1",
|
|
@@ -73,7 +74,7 @@
|
|
|
73
74
|
"eslint-config-prettier": "10.1.8",
|
|
74
75
|
"eslint-plugin-jest": "29.0.1",
|
|
75
76
|
"eslint-plugin-n": "17.21.3",
|
|
76
|
-
"eslint-plugin-prettier": "5.5.
|
|
77
|
+
"eslint-plugin-prettier": "5.5.4",
|
|
77
78
|
"eslint-plugin-simple-import-sort": "12.1.1",
|
|
78
79
|
"husky": "9.1.7",
|
|
79
80
|
"jest": "30.0.5",
|