Skip to content

Commit 39c7489

Browse files
renovate[bot]43081jfisker
authored
Update dependency js-yaml to v5 (#102)
Co-authored-by: James Garbutt <43081j@users.noreply.github.com> Co-authored-by: fisker <lionkay@gmail.com>
1 parent 8cbbc5a commit 39c7489

3 files changed

Lines changed: 11 additions & 27 deletions

File tree

package-lock.json

Lines changed: 8 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"function-once": "^3.0.1",
4343
"import-meta-resolve": "^4.2.0",
4444
"is-binary-path": "^3.0.0",
45-
"js-yaml": "^4.2.0",
45+
"js-yaml": "^5.0.0",
4646
"json-sorted-stringify": "^1.0.2",
4747
"json5": "^2.2.3",
4848
"kasi": "^2.0.1",
@@ -62,7 +62,6 @@
6262
},
6363
"devDependencies": {
6464
"@types/jest": "^30.0.0",
65-
"@types/js-yaml": "^4.0.9",
6665
"@types/node": "^24.10.1",
6766
"cross-env": "^10.1.0",
6867
"jest": "^30.4.2",

src/config_prettier.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,9 @@ const Loaders = {
5050
return parse(fileContent);
5151
},
5252
yaml: async (filePath: string): Promise<unknown> => {
53-
const yaml = (await import("js-yaml")).default;
53+
const { load, JSON_SCHEMA } = await import("js-yaml");
5454
const fileContent = fs.readFileSync(filePath, "utf8");
55-
return yaml.load(fileContent, {
56-
schema: yaml.JSON_SCHEMA,
57-
});
55+
return load(fileContent, { schema: JSON_SCHEMA });
5856
},
5957
};
6058

0 commit comments

Comments
 (0)