Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 28 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,13 @@
"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": {
"@biomejs/biome": "^2.5.1",
"@changesets/cli": "^2.31.0",
"@types/flat": "^5.0.5",
"@types/js-yaml": "^4.0.9",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🫡 praise: Farewell separate @types/js-yaml package and thank you!

"@types/markup-js": "^1.5.0",
"@types/node": "^24.13.2",
"@types/sinon": "^21.0.0",
Expand Down
12 changes: 6 additions & 6 deletions src/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
Loading