github-action-readme-generator 1.12.1 → 1.12.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [1.12.3](https://github.com/bitflight-devops/github-action-readme-generator/compare/v1.12.2...v1.12.3) (2026-08-15)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **cli:** parse sections as an array ([#665](https://github.com/bitflight-devops/github-action-readme-generator/issues/665)) ([9d6c0a2](https://github.com/bitflight-devops/github-action-readme-generator/commit/9d6c0a23a7f246f1e165df859e3c2c58d5772664))
7
+
8
+ ## [1.12.2](https://github.com/bitflight-devops/github-action-readme-generator/compare/v1.12.1...v1.12.2) (2026-08-15)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **versioning:** default disabled usage ref to main ([#662](https://github.com/bitflight-devops/github-action-readme-generator/issues/662)) ([93a624e](https://github.com/bitflight-devops/github-action-readme-generator/commit/93a624eb8f5071843dc1d82abd36ec18e586ed33)), closes [#637](https://github.com/bitflight-devops/github-action-readme-generator/issues/637)
14
+
1
15
  ## [1.12.1](https://github.com/bitflight-devops/github-action-readme-generator/compare/v1.12.0...v1.12.1) (2026-08-15)
2
16
 
3
17
 
package/README.md CHANGED
@@ -177,7 +177,7 @@ This configuration will automatically regenerate your README whenever `action.ym
177
177
  <!-- start usage -->
178
178
 
179
179
  ```yaml
180
- - uses: bitflight-devops/github-action-readme-generator@v1.12.0
180
+ - uses: bitflight-devops/github-action-readme-generator@v1.12.2
181
181
  with:
182
182
  # Description: The absolute or relative path to the `action.yml` file to read in
183
183
  # from.
package/dist/bin/index.js CHANGED
@@ -42613,6 +42613,15 @@ const unicodeWordMatch = /(?:[\dA-Za-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00
42613
42613
  //#endregion
42614
42614
  //#region src/helpers.ts
42615
42615
  /**
42616
+ * Returns the input value if it is not empty, otherwise returns undefined.
42617
+ * @param value - The input value to check.
42618
+ * @returns The input value if it is not empty, otherwise undefined.
42619
+ */
42620
+ function undefinedOnEmpty(value) {
42621
+ if (!value || value === "") return;
42622
+ return value;
42623
+ }
42624
+ /**
42616
42625
  * Converts the given text to title case.
42617
42626
  * @param text - The text to convert.
42618
42627
  * @returns The text converted to title case.
@@ -42902,7 +42911,7 @@ function getCurrentVersionString(inputs) {
42902
42911
  versionString = detectedVersion ?? "0.0.0";
42903
42912
  const prefix = inputs.config.get("versioning:prefix") ?? "v";
42904
42913
  if (versionSource !== "git-branch" && versionSource !== "git-sha" && versionString && !versionString.startsWith(prefix)) versionString = `${prefix}${versionString}`;
42905
- } else versionString = inputs.config.get("versioning:branch");
42914
+ } else versionString = undefinedOnEmpty(inputs.config.get("versioning:branch")) ?? "main";
42906
42915
  log.debug(`version to use in generated example is ${versionString}`);
42907
42916
  return versionString;
42908
42917
  }
@@ -171650,6 +171659,16 @@ argvOptions["debug:config"] = {
171650
171659
  type: "boolean"
171651
171660
  };
171652
171661
  /**
171662
+ * README sections option configuration.
171663
+ * Declaring this as an array keeps a single `--sections=usage` value consistent
171664
+ * with the array shape used by `.ghadocs.json` and repeated CLI arguments.
171665
+ */
171666
+ argvOptions.sections = {
171667
+ alias: "sections",
171668
+ describe: "Only generate the named README section (repeat for multiple sections)",
171669
+ type: "array"
171670
+ };
171671
+ /**
171653
171672
  * Configuration inputs from the github action don't
171654
171673
  * all match the input names when running on cli.
171655
171674
  * This maps the action inputs to the cli.
package/dist/mjs/index.js CHANGED
@@ -422,6 +422,15 @@ const unicodeWordMatch = /(?:[\dA-Za-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00
422
422
  //#endregion
423
423
  //#region src/helpers.ts
424
424
  /**
425
+ * Returns the input value if it is not empty, otherwise returns undefined.
426
+ * @param value - The input value to check.
427
+ * @returns The input value if it is not empty, otherwise undefined.
428
+ */
429
+ function undefinedOnEmpty(value) {
430
+ if (!value || value === "") return;
431
+ return value;
432
+ }
433
+ /**
425
434
  * Converts the given text to title case.
426
435
  * @param text - The text to convert.
427
436
  * @returns The text converted to title case.
@@ -711,7 +720,7 @@ function getCurrentVersionString(inputs) {
711
720
  versionString = detectedVersion ?? "0.0.0";
712
721
  const prefix = inputs.config.get("versioning:prefix") ?? "v";
713
722
  if (versionSource !== "git-branch" && versionSource !== "git-sha" && versionString && !versionString.startsWith(prefix)) versionString = `${prefix}${versionString}`;
714
- } else versionString = inputs.config.get("versioning:branch");
723
+ } else versionString = undefinedOnEmpty(inputs.config.get("versioning:branch")) ?? "main";
715
724
  log.debug(`version to use in generated example is ${versionString}`);
716
725
  return versionString;
717
726
  }
@@ -1102,6 +1111,16 @@ argvOptions["debug:config"] = {
1102
1111
  type: "boolean"
1103
1112
  };
1104
1113
  /**
1114
+ * README sections option configuration.
1115
+ * Declaring this as an array keeps a single `--sections=usage` value consistent
1116
+ * with the array shape used by `.ghadocs.json` and repeated CLI arguments.
1117
+ */
1118
+ argvOptions.sections = {
1119
+ alias: "sections",
1120
+ describe: "Only generate the named README section (repeat for multiple sections)",
1121
+ type: "array"
1122
+ };
1123
+ /**
1105
1124
  * Configuration inputs from the github action don't
1106
1125
  * all match the input names when running on cli.
1107
1126
  * This maps the action inputs to the cli.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "github-action-readme-generator",
3
3
  "displayName": "bitflight-devops/github-action-readme-generator",
4
- "version": "1.12.1",
4
+ "version": "1.12.3",
5
5
  "description": "The docs generator for GitHub Actions. Auto-syncs action.yml to README.md with 8 sections: inputs, outputs, usage, badges, branding & more. Works as CLI or GitHub Action.",
6
6
  "keywords": [
7
7
  "github-actions",