lint-staged 16.2.3 → 16.2.4
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/loadConfig.js +1 -3
- package/package.json +10 -10
package/lib/loadConfig.js
CHANGED
|
@@ -4,8 +4,6 @@ import fs from 'node:fs/promises'
|
|
|
4
4
|
import path from 'node:path'
|
|
5
5
|
import { pathToFileURL } from 'node:url'
|
|
6
6
|
|
|
7
|
-
import YAML from 'yaml'
|
|
8
|
-
|
|
9
7
|
import { CONFIG_NAME, PACKAGE_JSON_FILE, PACKAGE_YAML_FILES } from './configFiles.js'
|
|
10
8
|
import { createDebug } from './debug.js'
|
|
11
9
|
import { failedToLoadConfig } from './messages.js'
|
|
@@ -34,7 +32,7 @@ const jsonParse = async (filename) => {
|
|
|
34
32
|
const yamlParse = async (filename) => {
|
|
35
33
|
const isPackageFile = PACKAGE_YAML_FILES.includes(path.basename(filename))
|
|
36
34
|
try {
|
|
37
|
-
const content = await readFile(filename)
|
|
35
|
+
const [YAML, content] = await Promise.all([import('yaml'), readFile(filename)])
|
|
38
36
|
const yaml = YAML.parse(content)
|
|
39
37
|
return isPackageFile ? yaml[CONFIG_NAME] : yaml
|
|
40
38
|
} catch (error) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lint-staged",
|
|
3
|
-
"version": "16.2.
|
|
3
|
+
"version": "16.2.4",
|
|
4
4
|
"description": "Lint files staged by git",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"commander": "^14.0.1",
|
|
52
52
|
"listr2": "^9.0.4",
|
|
53
53
|
"micromatch": "^4.0.8",
|
|
54
|
-
"nano-spawn": "^
|
|
54
|
+
"nano-spawn": "^2.0.0",
|
|
55
55
|
"pidtree": "^0.6.0",
|
|
56
56
|
"string-argv": "^0.3.2",
|
|
57
57
|
"yaml": "^2.8.1"
|
|
@@ -59,14 +59,14 @@
|
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@changesets/changelog-github": "0.5.1",
|
|
61
61
|
"@changesets/cli": "2.29.7",
|
|
62
|
-
"@commitlint/cli": "
|
|
63
|
-
"@commitlint/config-conventional": "
|
|
64
|
-
"@eslint/js": "9.
|
|
62
|
+
"@commitlint/cli": "20.1.0",
|
|
63
|
+
"@commitlint/config-conventional": "20.0.0",
|
|
64
|
+
"@eslint/js": "9.37.0",
|
|
65
65
|
"@vitest/coverage-v8": "3.2.4",
|
|
66
|
-
"@vitest/eslint-plugin": "1.3.
|
|
66
|
+
"@vitest/eslint-plugin": "1.3.16",
|
|
67
67
|
"consolemock": "1.1.0",
|
|
68
|
-
"cross-env": "10.
|
|
69
|
-
"eslint": "9.
|
|
68
|
+
"cross-env": "10.1.0",
|
|
69
|
+
"eslint": "9.37.0",
|
|
70
70
|
"eslint-config-prettier": "10.1.8",
|
|
71
71
|
"eslint-plugin-n": "17.23.1",
|
|
72
72
|
"eslint-plugin-prettier": "5.5.4",
|
|
@@ -74,8 +74,8 @@
|
|
|
74
74
|
"husky": "9.1.7",
|
|
75
75
|
"mock-stdin": "1.0.0",
|
|
76
76
|
"prettier": "3.6.2",
|
|
77
|
-
"semver": "7.7.
|
|
78
|
-
"typescript": "5.9.
|
|
77
|
+
"semver": "7.7.3",
|
|
78
|
+
"typescript": "5.9.3",
|
|
79
79
|
"vitest": "3.2.4"
|
|
80
80
|
},
|
|
81
81
|
"keywords": [
|