action-docs
Advanced tools
Comparing version 1.0.4 to 1.1.0
@@ -82,3 +82,3 @@ "use strict"; | ||
from: to, | ||
to: `<!-- action-docs-${section} -->${(0, linebreak_1.getLineBreak)(options.lineBreaks)}${text}${(0, linebreak_1.getLineBreak)(options.lineBreaks)}<!-- action-docs-${section} -->`, | ||
to: `<!-- action-docs-${section} -->${(0, linebreak_1.getLineBreak)(options.lineBreaks)}${text.trim()}${(0, linebreak_1.getLineBreak)(options.lineBreaks)}<!-- action-docs-${section} -->`, | ||
}); | ||
@@ -102,3 +102,3 @@ }); | ||
: ["parameter", "description"]; | ||
headers[1] = Array(headers[0].length).fill("-"); | ||
headers[1] = Array(headers[0].length).fill("---"); | ||
for (let i = 0; i < Object.keys(data).length; i++) { | ||
@@ -112,3 +112,8 @@ const key = Object.keys(data)[i]; | ||
rows[i].push(value.required ? `\`${String(value.required)}\`` : "`false`"); | ||
rows[i].push(value.default !== undefined ? value.default : ""); | ||
if (value.default !== undefined) { | ||
rows[i].push(value.default.toString().replace(/\r\n|\r|\n/g, " ")); | ||
} | ||
else { | ||
rows[i].push(""); | ||
} | ||
} | ||
@@ -115,0 +120,0 @@ } |
{ | ||
"name": "action-docs", | ||
"version": "1.0.4", | ||
"version": "1.1.0", | ||
"description": "Generate GitHub action docs based on action.yml", | ||
@@ -40,4 +40,4 @@ "main": "lib/index.js", | ||
"js-yaml": "^4.0.0", | ||
"replace-in-file": "^6.2.0", | ||
"yargs": "^17.0.1" | ||
"replace-in-file": "^6.3.5", | ||
"yargs": "^17.6.0" | ||
}, | ||
@@ -53,23 +53,23 @@ "files": [ | ||
"@semantic-release/git": "^10.0.0", | ||
"@semantic-release/github": "^8.0.1", | ||
"@semantic-release/github": "^8.0.6", | ||
"@semantic-release/npm": "^9.0.1", | ||
"@semantic-release/release-notes-generator": "^10.0.2", | ||
"@types/chalk": "^2.2.0", | ||
"@types/figlet": "^1.2.1", | ||
"@types/jest": "^27.0.2", | ||
"@types/figlet": "^1.5.5", | ||
"@types/jest": "^29.2.0", | ||
"@types/js-yaml": "^4.0.0", | ||
"@types/node": "^16.10.3", | ||
"@typescript-eslint/parser": "^5.0.0", | ||
"conventional-changelog-conventionalcommits": "^4.5.0", | ||
"eslint": "^8.16.0", | ||
"eslint-plugin-github": "^4.1.1", | ||
"eslint-plugin-jest": "^26.2.2", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"@types/node": "^18.11.2", | ||
"@typescript-eslint/parser": "^5.40.1", | ||
"conventional-changelog-conventionalcommits": "^5.0.0", | ||
"eslint": "^8.25.0", | ||
"eslint-plugin-github": "^4.4.0", | ||
"eslint-plugin-jest": "^27.1.3", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"jest": "^27.2.5", | ||
"nyc": "^15.1.0", | ||
"prettier": "2.4.1", | ||
"semantic-release": "^19.0.2", | ||
"prettier": "2.7.1", | ||
"semantic-release": "^19.0.5", | ||
"ts-jest": "^27.0.5", | ||
"ts-node-dev": "^1.1.1", | ||
"typescript": "^4.6.4" | ||
"ts-node-dev": "^2.0.0", | ||
"typescript": "^4.8.4" | ||
}, | ||
@@ -76,0 +76,0 @@ "bugs": { |
15960
240
Updatedreplace-in-file@^6.3.5
Updatedyargs@^17.6.0