diff --git a/README.md b/README.md index cded9cdd..7567b87c 100644 --- a/README.md +++ b/README.md @@ -133,34 +133,34 @@ This configuration will automatically regenerate your README whenever `action.ym # from. # # Default: action.yml - action: "" + action: '' # Description: The absolute or relative path to the markdown output file that # contains the formatting tokens within it. # # Default: README.md - readme: "" + readme: '' # Description: The GitHub Action repository owner, this field is autodetected by # default. Example: `bitflight-devops` or `your-gh-username` # - owner: "" + owner: '' # Description: The GitHub Action repository name, this field is autodetected by # default. Example: `github-action-readme-generator` # - repo: "" + repo: '' # Description: Save the provided values in a `.ghadocs.json` file. This will # update any existing `.ghadocs.json` file that is in place. # # Default: false - save: "" + save: '' # Description: Use `prettier` to pretty print the new README.md file # # Default: true - pretty: "" + pretty: '' # Description: Enable the update of the usage version to match the latest version # in the `package.json` file Output if your action repo is @@ -168,24 +168,24 @@ This configuration will automatically regenerate your README whenever `action.ym # `uses: reviewdog/action-eslint@1.0.1` # # Default: true - versioning_enabled: "" + versioning_enabled: '' # Description: Set a specific version to display in the README.md, maybe you want # to use a major or minor version # - version_override: "" + version_override: '' # Description: Prefix the version with this value, if it isn't already prefixed # # Default: v - version_prefix: "" + version_prefix: '' # Description: If versioning is disabled, use this branch in the usage example, # where the default is `main` Output if your action repo is # `reviewdog/action-eslint`: `uses: reviewdog/action-eslint@main` # # Default: main - versioning_default_branch: "" + versioning_default_branch: '' # Description: Add a prefix to the README title. The title template looks like # this: @@ -193,12 +193,12 @@ This configuration will automatically regenerate your README whenever `action.ym # # {brand}{prefix}{title} # # Default: GitHub Action: - title_prefix: "" + title_prefix: '' # Description: Include additional badge showing latest tag # # Default: true - include_github_version_badge: "" + include_github_version_badge: '' # Description: Create the branding svg image from the branding object in # `action.yml` then save it to this path. Then update the `README.md` file to @@ -210,7 +210,7 @@ This configuration will automatically regenerate your README whenever `action.ym # # {brand}{prefix}{title} # # Default: .github/ghadocs/branding.svg - branding_svg_path: "" + branding_svg_path: '' # Description: Prefix the title in the `` section with the svg # branding image The title template looks like this: @@ -218,7 +218,7 @@ This configuration will automatically regenerate your README whenever `action.ym # # {brand}{prefix}{title} # # Default: true - branding_as_title_prefix: "" + branding_as_title_prefix: '' ``` diff --git a/package-lock.json b/package-lock.json index 9a089879..7b3e9d01 100644 --- a/package-lock.json +++ b/package-lock.json @@ -44,7 +44,7 @@ "@types/babel__preset-env": "^7", "@types/esm": "^3", "@types/nconf": "^0.10.5", - "@types/node": "^20.8.10", + "@types/node": "^25.0.3", "@types/node-emoji": "^2.1.0", "@typescript-eslint/eslint-plugin": "^6.9.1", "@typescript-eslint/parser": "^6.9.1", @@ -54,7 +54,7 @@ "cz-conventional-changelog": "^3.3.0", "dotenv": "^16.3.1", "esbuild": "^0.27.2", - "esbuild-node-externals": "^1.9.0", + "esbuild-node-externals": "^1.20.1", "eslint": "^8.52.0", "eslint-config-airbnb-base": "^15.0.0", "eslint-config-prettier": "^9.0.0", @@ -86,7 +86,7 @@ "vitest": "^4.0.6" }, "engines": { - "node": ">=20.0.0 <25.0.0", + "node": ">=20.0.0 <26.0.0", "npm": ">=10.0.0" } }, @@ -185,7 +185,6 @@ "version": "7.23.2", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.22.13", @@ -1934,7 +1933,6 @@ "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "env-paths": "^2.2.1", "import-fresh": "^3.3.0", @@ -3040,7 +3038,6 @@ "node_modules/@octokit/core": { "version": "5.0.1", "license": "MIT", - "peer": true, "dependencies": { "@octokit/auth-token": "^4.0.0", "@octokit/graphql": "^7.0.0", @@ -4544,13 +4541,13 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "20.8.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.10.tgz", - "integrity": "sha512-TlgT8JntpcbmKUFzjhsyhGfP2fsiz1Mv56im6enJ905xG1DAYesxJaeSbGqQmAw8OWPdhyJGhGSQGKRNJ45u9w==", + "version": "25.0.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-25.0.3.tgz", + "integrity": "sha512-W609buLVRVmeW693xKfzHeIV6nJGGz98uCPfeXI1ELMLXVeKYZ9m15fAMSaUPBHYLGFsVRcMmSCksQOrZV9BYA==", "dev": true, - "peer": true, + "license": "MIT", "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~7.16.0" } }, "node_modules/@types/node-emoji": { @@ -4648,7 +4645,6 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.9.1.tgz", "integrity": "sha512-C7AK2wn43GSaCUZ9do6Ksgi2g3mwFkMO3Cis96kzmgudoVaKyt62yNzJOktP0HDLb/iO2O0n2lBOzJgr6Q/cyg==", "dev": true, - "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "6.9.1", "@typescript-eslint/types": "6.9.1", @@ -4998,7 +4994,6 @@ "version": "8.10.0", "dev": true, "license": "MIT", - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -5480,7 +5475,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "caniuse-lite": "^1.0.30001541", "electron-to-chromium": "^1.4.535", @@ -7029,7 +7023,6 @@ "dev": true, "hasInstallScript": true, "license": "MIT", - "peer": true, "bin": { "esbuild": "bin/esbuild" }, @@ -7066,9 +7059,9 @@ } }, "node_modules/esbuild-node-externals": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/esbuild-node-externals/-/esbuild-node-externals-1.18.0.tgz", - "integrity": "sha512-suFVX3SzZlXrGIS9Yqx+ZaHL4w1p0e/j7dQbOM9zk8SfFpnAGnDplHUKXIf9kcPEAfZRL66JuYeVSVlsSEQ5Eg==", + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/esbuild-node-externals/-/esbuild-node-externals-1.20.1.tgz", + "integrity": "sha512-uVs+TC+PBiav2LoTz8WZT/ootINw9Rns5JJyVznlfZH1qOyZxWCPzeXklY04UtZut5qUeFFaEWtcH7XoMwiTTQ==", "dev": true, "license": "MIT", "dependencies": { @@ -7078,7 +7071,7 @@ "node": ">=12" }, "peerDependencies": { - "esbuild": "0.12 - 0.25" + "esbuild": "0.12 - 0.27" } }, "node_modules/escalade": { @@ -7103,7 +7096,6 @@ "version": "8.52.0", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", @@ -7306,7 +7298,6 @@ "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.0.tgz", "integrity": "sha512-QPOO5NO6Odv5lpoTkddtutccQjysJuFxoPS7fAHO+9m9udNHvTCPSAMW9zGAYj8lAIdr40I8yPCdUYrncXtrwg==", "dev": true, - "peer": true, "dependencies": { "array-includes": "^3.1.7", "array.prototype.findlastindex": "^1.2.3", @@ -10477,7 +10468,6 @@ "version": "9.1.2", "dev": true, "license": "MIT", - "peer": true, "bin": { "marked": "bin/marked.js" }, @@ -13227,7 +13217,6 @@ "dev": true, "inBundle": true, "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -14109,7 +14098,6 @@ "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", "license": "MIT", - "peer": true, "bin": { "prettier": "bin/prettier.cjs" }, @@ -14798,7 +14786,6 @@ "resolved": "https://registry.npmjs.org/semantic-release/-/semantic-release-22.0.6.tgz", "integrity": "sha512-SxgpGR6b52gaKrb42nnaZWa2h5ig06XlloS3NjUN4W/lRBB8SId4JMaZaxN6Ncb+Ii2Uxd8WO6uvshTSSf8XRg==", "dev": true, - "peer": true, "dependencies": { "@semantic-release/commit-analyzer": "^11.0.0", "@semantic-release/error": "^4.0.0", @@ -15965,7 +15952,6 @@ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -16203,7 +16189,6 @@ "version": "5.2.2", "dev": true, "license": "Apache-2.0", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -16256,10 +16241,11 @@ } }, "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "dev": true + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", + "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", + "dev": true, + "license": "MIT" }, "node_modules/unicode-canonical-property-names-ecmascript": { "version": "2.0.0", @@ -16442,7 +16428,6 @@ "integrity": "sha512-gR7INfiVRwnEOkCk47faros/9McCZMp5LM+OMNWGLaDBSvJxIzwjgNFufkuePBNaesGRnLmNfW+ddbUJRZn0nQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@vitest/expect": "4.0.6", "@vitest/mocker": "4.0.6", @@ -17050,7 +17035,6 @@ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -17064,7 +17048,6 @@ "integrity": "sha512-ZWyE8YXEXqJrrSLvYgrRP7p62OziLW7xI5HYGWFzOvupfAlrLvURSzv/FyGyy0eidogEM3ujU+kUG1zuHgb6Ug==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "esbuild": "^0.25.0", "fdir": "^6.5.0", diff --git a/package.json b/package.json index 873528a6..1897a352 100644 --- a/package.json +++ b/package.json @@ -168,7 +168,7 @@ "@types/babel__preset-env": "^7", "@types/esm": "^3", "@types/nconf": "^0.10.5", - "@types/node": "^20.8.10", + "@types/node": "^25.0.3", "@types/node-emoji": "^2.1.0", "@typescript-eslint/eslint-plugin": "^6.9.1", "@typescript-eslint/parser": "^6.9.1", @@ -178,7 +178,7 @@ "cz-conventional-changelog": "^3.3.0", "dotenv": "^16.3.1", "esbuild": "^0.27.2", - "esbuild-node-externals": "^1.9.0", + "esbuild-node-externals": "^1.20.1", "eslint": "^8.52.0", "eslint-config-airbnb-base": "^15.0.0", "eslint-config-prettier": "^9.0.0", @@ -210,7 +210,7 @@ "vitest": "^4.0.6" }, "engines": { - "node": ">=20.0.0 <25.0.0", + "node": ">=20.0.0 <26.0.0", "npm": ">=10.0.0" }, "os": [ diff --git a/src/helpers.ts b/src/helpers.ts index 24ce30d7..c2a9fafb 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -320,7 +320,7 @@ export function getCurrentVersionString(inputs: Inputs): string { log.debug(`version string in package.json:version is ${packageVersion ?? 'not found'}`); } - versionString = oRide && oRide.length > 0 ? oRide : packageVersion ?? '0.0.0'; + versionString = oRide && oRide.length > 0 ? oRide : (packageVersion ?? '0.0.0'); if ( versionString && diff --git a/src/readme-editor.ts b/src/readme-editor.ts index b7f43db8..65f152b3 100644 --- a/src/readme-editor.ts +++ b/src/readme-editor.ts @@ -85,7 +85,7 @@ export default class ReadmeEditor { updateSection(name: string, providedContent: string | string[], addNewlines = true): void { const log = new LogTask(name); const content = ( - Array.isArray(providedContent) ? providedContent.join(EOL) : providedContent ?? '' + Array.isArray(providedContent) ? providedContent.join(EOL) : (providedContent ?? '') ).trim(); log.info(`Looking for the ${name} token in ${this.filePath}`);