Skip to content

docs(action): document stable input and fix output/cache descriptions#1543

Open
kranthipoturaju wants to merge 1 commit intoactions:mainfrom
kranthipoturaju:docs/document-stable-input-and-fix-output-descriptions
Open

docs(action): document stable input and fix output/cache descriptions#1543
kranthipoturaju wants to merge 1 commit intoactions:mainfrom
kranthipoturaju:docs/document-stable-input-and-fix-output-descriptions

Conversation

@kranthipoturaju
Copy link
Copy Markdown

Summary

Fixes several inaccuracies in action.yml input/output descriptions and documents the previously undiscoverable stable input that was already implemented but never exposed to users.

Changes

  • stable input (new) — Added to action.yml and the README usage block. Was already consumed by main.ts (core.getInput('stable'), default true) and passed to official_builds.ts for LTS alias resolution and manifest filtering. Without this entry, users had no way to know the input existed.
  • cache-hit output — Corrected from "A boolean value" to a string 'true'/'false'. cache-restore.ts calls core.setOutput('cache-hit', Boolean(cacheKey)) which GitHub Actions serialises as a string. Also added that it is only populated when caching is active.
  • node-version output — Added that it is always set. printEnvDetailsAndSetOutput() in util.ts runs unconditionally and calls core.setOutput('node-version', ...) even when no node-version input is provided.
  • cache input — Added "The package manager must be pre-installed." The restore logic throws immediately if the tool is not found on the runner.
  • package-manager-cache input — Appended that yarn and pnpm are not auto-detected; getNameFromPackageManagerField() only ever returns 'npm'.

Motivation

The stable input was silently accepted by the action for controlling whether pre-release builds satisfy LTS version specs, but was invisible in both action.yml and the README. Users who needed stable: false (e.g. to test against an RC build matching an LTS alias) had no documented way to know this was possible.

The output and cache description fixes close the gap between what the code actually does and what the documentation claims.

Impact

  • No behavior change — purely documentation.
  • Backward compatible — stable defaults to true, matching the existing hardcoded fallback in main.ts (core.getInput('stable') || 'true'), so existing workflows are unaffected.

Testing

Documentation-only change; no code paths were modified. Verified each description change against the corresponding source file (main.ts, cache-restore.ts, util.ts, official_builds.ts).

Notes

  • registry-url still incorrectly references "project level .npmrc and .yarnrc file" in both action.yml and README — the auth file is written to RUNNER_TEMP and no .yarnrc is touched. Left out of scope intentionally.

Related issue:
No issue is created as the change is related to documentation improvement only.

Check list:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

Copilot AI review requested due to automatic review settings May 7, 2026 08:01
@kranthipoturaju kranthipoturaju requested a review from a team as a code owner May 7, 2026 08:01
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request updates the action’s public documentation/metadata to accurately reflect existing behavior, including exposing the previously undocumented stable input and correcting input/output descriptions to match the implementation.

Changes:

  • Documented and exposed the existing stable input in both action.yml and the README usage example.
  • Clarified caching-related inputs (cache, package-manager-cache) to better match current cache behavior and limitations.
  • Corrected output descriptions for cache-hit (string semantics, only set when caching runs) and node-version (always set).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
README.md Adds stable to the usage snippet so users can discover and configure the existing input.
action.yml Exposes stable as an input and corrects/clarifies caching inputs and output descriptions to match runtime behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants