lint-staged 15.5.1 → 15.5.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/getStagedFiles.js +1 -1
- package/lib/searchConfigs.js +1 -1
- package/lib/validateConfig.js +1 -1
- package/package.json +1 -1
package/lib/getStagedFiles.js
CHANGED
|
@@ -31,8 +31,8 @@ export const getStagedFiles = async ({ cwd = process.cwd(), diff, diffFilter } =
|
|
|
31
31
|
* roots and get the filename.
|
|
32
32
|
*/
|
|
33
33
|
return output
|
|
34
|
-
.split(':')
|
|
35
34
|
.slice(1)
|
|
35
|
+
.split('\u0000:')
|
|
36
36
|
.map(parseGitZOutput)
|
|
37
37
|
.flatMap(([info, src, dst]) => {
|
|
38
38
|
const [, dstMode, , , ,] = info.split(' ')
|
package/lib/searchConfigs.js
CHANGED
|
@@ -106,7 +106,7 @@ export const searchConfigs = async (
|
|
|
106
106
|
/** Get validated configs from the above object, without any `null` values (not found) */
|
|
107
107
|
const foundConfigs = Object.entries(configs)
|
|
108
108
|
.filter(([, value]) => !!value)
|
|
109
|
-
.reduce((acc, [key, value]) => (
|
|
109
|
+
.reduce((acc, [key, value]) => Object.assign(acc, { [key]: value }), {})
|
|
110
110
|
|
|
111
111
|
/**
|
|
112
112
|
* Try to find a single config from parent directories
|
package/lib/validateConfig.js
CHANGED
|
@@ -87,7 +87,7 @@ export const validateConfigLogic = (config, configPath, logger) => {
|
|
|
87
87
|
*/
|
|
88
88
|
const fixedPattern = validateBraces(pattern, logger)
|
|
89
89
|
|
|
90
|
-
return
|
|
90
|
+
return Object.assign(collection, { [fixedPattern]: task })
|
|
91
91
|
}, {})
|
|
92
92
|
|
|
93
93
|
if (errors.length) {
|