From 7401bd2bd98555cbd6b4bca61530e2be8ab10d69 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Jul 2026 05:05:38 +0000 Subject: [PATCH 1/2] build(deps): bump js-yaml from 4.2.0 to 5.2.0 Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.2.0 to 5.2.0. - [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md) - [Commits](https://github.com/nodeca/js-yaml/compare/4.2.0...5.2.0) --- updated-dependencies: - dependency-name: js-yaml dependency-version: 5.2.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package-lock.json | 33 ++++++++++++++++++++++++++++----- package.json | 2 +- 2 files changed, 29 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 414c9325..6b0536ad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "axios-retry": "^4.5.0", "flat": "^6.0.1", "https-proxy-agent": "^9.0.0", - "js-yaml": "^4.2.0", + "js-yaml": "^5.2.0", "markup-js": "^1.5.21" }, "devDependencies": { @@ -464,6 +464,29 @@ "js-yaml": "^4.1.1" } }, + "node_modules/@changesets/parse/node_modules/js-yaml": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.0.tgz", + "integrity": "sha512-1td788aAnnZ5qs7V2QIRl1owjtYpbKt749Y3xauqQgwIIGF/xXWz1wMTEBx5O3LK3lXLVuqXPdPxj2BoFHaW9Q==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/nodeca" + } + ], + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/@changesets/pre": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/@changesets/pre/-/pre-2.0.2.tgz", @@ -1693,9 +1716,9 @@ "license": "ISC" }, "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.2.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-5.2.0.tgz", + "integrity": "sha512-YeLUMlvR4Ou1B119LIaM0r65JvbOBooJDc9yEu0dClb/uSC5P4FrLU8OCCz/HXWvtPoIrR0dRzABTjo1sTN9Bw==", "funding": [ { "type": "github", @@ -1711,7 +1734,7 @@ "argparse": "^2.0.1" }, "bin": { - "js-yaml": "bin/js-yaml.js" + "js-yaml": "bin/js-yaml.mjs" } }, "node_modules/jsonfile": { diff --git a/package.json b/package.json index 1faca836..ae1a0262 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "axios-retry": "^4.5.0", "flat": "^6.0.1", "https-proxy-agent": "^9.0.0", - "js-yaml": "^4.2.0", + "js-yaml": "^5.2.0", "markup-js": "^1.5.21" }, "devDependencies": { From db8217b45ebcf5e2a422b9177a7d6c88cce57965 Mon Sep 17 00:00:00 2001 From: Eden Zimbelman Date: Wed, 8 Jul 2026 14:19:59 -0700 Subject: [PATCH 2/2] build: migrate to js-yaml v5 named exports js-yaml v5 removes the default export and ships its own types. Switch src/content.js to named imports ({ JSON_SCHEMA, load }) and drop the now-redundant @types/js-yaml dev dependency. Co-Authored-By: Claude --- package-lock.json | 8 -------- package.json | 1 - src/content.js | 12 ++++++------ 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6b0536ad..d42a16d3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,7 +24,6 @@ "@biomejs/biome": "^2.5.1", "@changesets/cli": "^2.31.0", "@types/flat": "^5.0.5", - "@types/js-yaml": "^4.0.9", "@types/markup-js": "^1.5.0", "@types/node": "^24.13.2", "@types/sinon": "^21.0.0", @@ -901,13 +900,6 @@ "dev": true, "license": "MIT" }, - "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, - "license": "MIT" - }, "node_modules/@types/markup-js": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/@types/markup-js/-/markup-js-1.5.0.tgz", diff --git a/package.json b/package.json index ae1a0262..da6dc4db 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,6 @@ "@biomejs/biome": "^2.5.1", "@changesets/cli": "^2.31.0", "@types/flat": "^5.0.5", - "@types/js-yaml": "^4.0.9", "@types/markup-js": "^1.5.0", "@types/node": "^24.13.2", "@types/sinon": "^21.0.0", diff --git a/src/content.js b/src/content.js index 07377312..5519d6d2 100644 --- a/src/content.js +++ b/src/content.js @@ -2,7 +2,7 @@ import fs from "node:fs"; import path from "node:path"; import * as github from "@actions/github"; import { flatten } from "flat"; -import yaml from "js-yaml"; +import { JSON_SCHEMA, load } from "js-yaml"; import markup from "markup-js"; import Config from "./config.js"; import SlackError from "./errors.js"; @@ -67,8 +67,8 @@ export default class Content { } try { const content = /** @type {Content} */ ( - yaml.load(config.inputs.payload, { - schema: yaml.JSON_SCHEMA, + load(config.inputs.payload, { + schema: JSON_SCHEMA, }) ); return /** @type {Content} */ (content); @@ -125,10 +125,10 @@ export default class Content { config.inputs.payloadFilePath.endsWith("yaml") || config.inputs.payloadFilePath.endsWith("yml") ) { - const load = yaml.load(input, { - schema: yaml.JSON_SCHEMA, + const content = load(input, { + schema: JSON_SCHEMA, }); - return /** @type {Content} */ (load); + return /** @type {Content} */ (content); } if (config.inputs.payloadFilePath.endsWith("json")) { return JSON.parse(input);