From ba08ab52c2bc9f8bbec6a3c4f4c2dbaf0f73a8b7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 22 Jun 2026 09:18:37 +0000 Subject: [PATCH 1/3] Update dependency js-yaml to v5 --- package-lock.json | 16 ++++++++-------- package.json | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index fd15890..3818393 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,7 @@ "function-once": "^3.0.1", "import-meta-resolve": "^4.2.0", "is-binary-path": "^3.0.0", - "js-yaml": "^4.2.0", + "js-yaml": "^5.0.0", "json-sorted-stringify": "^1.0.2", "json5": "^2.2.3", "kasi": "^2.0.1", @@ -4307,9 +4307,9 @@ "dev": true }, "node_modules/js-yaml": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.2.0.tgz", - "integrity": "sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-5.0.0.tgz", + "integrity": "sha512-GSvaPUbk1U+FMZ7rJzF+F8e5YVtu7KnD40et/5rBXXRBv2jCO9L3qCewvIDDdudC0QycTFlf6EAA+h3kxBsuUw==", "funding": [ { "type": "github", @@ -4324,7 +4324,7 @@ "argparse": "^2.0.1" }, "bin": { - "js-yaml": "bin/js-yaml.js" + "js-yaml": "bin/js-yaml.mjs" } }, "node_modules/jsesc": { @@ -9584,9 +9584,9 @@ "dev": true }, "js-yaml": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.2.0.tgz", - "integrity": "sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-5.0.0.tgz", + "integrity": "sha512-GSvaPUbk1U+FMZ7rJzF+F8e5YVtu7KnD40et/5rBXXRBv2jCO9L3qCewvIDDdudC0QycTFlf6EAA+h3kxBsuUw==", "requires": { "argparse": "^2.0.1" } diff --git a/package.json b/package.json index ddcf829..93fca36 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "function-once": "^3.0.1", "import-meta-resolve": "^4.2.0", "is-binary-path": "^3.0.0", - "js-yaml": "^4.2.0", + "js-yaml": "^5.0.0", "json-sorted-stringify": "^1.0.2", "json5": "^2.2.3", "kasi": "^2.0.1", From 80d28d6f44c5a18fc5e04169ca5f646673a8d53c Mon Sep 17 00:00:00 2001 From: James Garbutt <43081j@users.noreply.github.com> Date: Mon, 22 Jun 2026 10:21:13 +0100 Subject: [PATCH 2/3] fix: use named yaml exports --- src/config_prettier.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config_prettier.ts b/src/config_prettier.ts index 8ee18c7..8a2d62d 100644 --- a/src/config_prettier.ts +++ b/src/config_prettier.ts @@ -50,10 +50,10 @@ const Loaders = { return parse(fileContent); }, yaml: async (filePath: string): Promise => { - const yaml = (await import("js-yaml")).default; + const { load, JSON_SCHEMA } = await import("js-yaml"); const fileContent = fs.readFileSync(filePath, "utf8"); - return yaml.load(fileContent, { - schema: yaml.JSON_SCHEMA, + return load(fileContent, { + schema: JSON_SCHEMA, }); }, }; From e6af8ed1679bb4f5480a80258ee9db16eb18eb98 Mon Sep 17 00:00:00 2001 From: fisker Date: Mon, 22 Jun 2026 17:22:33 +0800 Subject: [PATCH 3/3] Update --- package-lock.json | 13 ------------- package.json | 1 - src/config_prettier.ts | 4 +--- 3 files changed, 1 insertion(+), 17 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3818393..de9f0cc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -38,7 +38,6 @@ }, "devDependencies": { "@types/jest": "^30.0.0", - "@types/js-yaml": "^4.0.9", "@types/node": "^24.10.1", "cross-env": "^10.1.0", "jest": "^30.4.2", @@ -1632,12 +1631,6 @@ "pretty-format": "^30.0.0" } }, - "node_modules/@types/js-yaml": { - "version": "4.0.9", - "resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.9.tgz", - "integrity": "sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg==", - "dev": true - }, "node_modules/@types/node": { "version": "24.10.1", "resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.1.tgz", @@ -7682,12 +7675,6 @@ "pretty-format": "^30.0.0" } }, - "@types/js-yaml": { - "version": "4.0.9", - "resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.9.tgz", - "integrity": "sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg==", - "dev": true - }, "@types/node": { "version": "24.10.1", "resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.1.tgz", diff --git a/package.json b/package.json index 93fca36..fbfc6ee 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,6 @@ }, "devDependencies": { "@types/jest": "^30.0.0", - "@types/js-yaml": "^4.0.9", "@types/node": "^24.10.1", "cross-env": "^10.1.0", "jest": "^30.4.2", diff --git a/src/config_prettier.ts b/src/config_prettier.ts index 8a2d62d..8f66284 100644 --- a/src/config_prettier.ts +++ b/src/config_prettier.ts @@ -52,9 +52,7 @@ const Loaders = { yaml: async (filePath: string): Promise => { const { load, JSON_SCHEMA } = await import("js-yaml"); const fileContent = fs.readFileSync(filePath, "utf8"); - return load(fileContent, { - schema: JSON_SCHEMA, - }); + return load(fileContent, { schema: JSON_SCHEMA }); }, };