lint-staged 15.0.0 → 15.0.2
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/makeCmdTasks.js +3 -1
- package/lib/runAll.js +1 -1
- package/package.json +6 -6
package/lib/makeCmdTasks.js
CHANGED
|
@@ -24,7 +24,9 @@ export const makeCmdTasks = async ({ commands, cwd, files, gitDir, shell, verbos
|
|
|
24
24
|
for (const cmd of commandArray) {
|
|
25
25
|
// command function may return array of commands that already include `stagedFiles`
|
|
26
26
|
const isFn = typeof cmd === 'function'
|
|
27
|
-
|
|
27
|
+
|
|
28
|
+
/** Pass copy of file list to prevent mutation by function from config file. */
|
|
29
|
+
const resolved = isFn ? await cmd([...files]) : cmd
|
|
28
30
|
|
|
29
31
|
const resolvedArray = Array.isArray(resolved) ? resolved : [resolved] // Wrap non-array command as array
|
|
30
32
|
|
package/lib/runAll.js
CHANGED
|
@@ -283,7 +283,7 @@ export const runAll = async (
|
|
|
283
283
|
enabled: hasPartiallyStagedFiles,
|
|
284
284
|
},
|
|
285
285
|
{
|
|
286
|
-
title: `Running tasks for staged files...`,
|
|
286
|
+
title: `Running tasks for ${diff ? 'changed' : 'staged'} files...`,
|
|
287
287
|
task: (ctx, task) => task.newListr(listrTasks, { concurrent }),
|
|
288
288
|
skip: () => listrTasks.every((task) => task.skip()),
|
|
289
289
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lint-staged",
|
|
3
|
-
"version": "15.0.
|
|
3
|
+
"version": "15.0.2",
|
|
4
4
|
"description": "Lint files staged by git",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "https://github.com/okonet/lint-staged",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"test:watch": "jest --watch",
|
|
34
34
|
"version": "npx changeset version",
|
|
35
35
|
"postversion": "npm i --package-lock-only && git commit -am \"chore(changeset): release\"",
|
|
36
|
-
"
|
|
36
|
+
"tag": "npx changeset tag"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"chalk": "5.3.0",
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
"debug": "4.3.4",
|
|
42
42
|
"execa": "8.0.1",
|
|
43
43
|
"lilconfig": "2.1.0",
|
|
44
|
-
"listr2": "7.0.
|
|
44
|
+
"listr2": "7.0.2",
|
|
45
45
|
"micromatch": "4.0.5",
|
|
46
46
|
"pidtree": "0.6.0",
|
|
47
47
|
"string-argv": "0.3.2",
|
|
48
|
-
"yaml": "2.3.
|
|
48
|
+
"yaml": "2.3.3"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@babel/core": "7.23.2",
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"@babel/preset-env": "7.23.2",
|
|
54
54
|
"@changesets/changelog-github": "0.4.8",
|
|
55
55
|
"@changesets/cli": "2.26.2",
|
|
56
|
-
"@commitlint/cli": "17.
|
|
57
|
-
"@commitlint/config-conventional": "17.
|
|
56
|
+
"@commitlint/cli": "17.8.0",
|
|
57
|
+
"@commitlint/config-conventional": "17.8.0",
|
|
58
58
|
"babel-jest": "29.7.0",
|
|
59
59
|
"babel-plugin-transform-imports": "2.0.0",
|
|
60
60
|
"consolemock": "1.1.0",
|