Skip to content

feat: add pnpm validation support to TypeScript workflows #331

@gandalf-at-lerian

Description

@gandalf-at-lerian

Request Type

New input / parameter for an existing workflow

Affected Workflow (if applicable)

TypeScript (ci, release, frontend-pr-analysis)

Problem / Motivation

The shared workflows already provide validation paths for TypeScript projects using npm, but there is no equivalent path for repositories that use pnpm. Projects with pnpm-lock.yaml currently need local workflow adaptations or cannot reuse the same validation behavior available for npm-based projects.

Proposed Solution

Add pnpm support to the existing TypeScript/npm validation flow, preferably by adapting the current npm implementation instead of creating a fully separate workflow.

Suggested behavior:

  • Keep npm as the default package manager to preserve current callers.
  • Add an explicit input such as package-manager with supported values like npm and pnpm.
  • Optionally auto-detect pnpm-lock.yaml when no package manager is provided.
  • Set up pnpm through Corepack or the repository's preferred pnpm setup action.
  • Use pnpm install --frozen-lockfile for dependency installation.
  • Run the same validation scripts currently executed for npm through the pnpm equivalent, for example pnpm run <script> where applicable.

Alternatives Considered

Create separate pnpm-specific workflows. That would work, but it would likely duplicate logic already present in the npm flow. A package-manager input or lockfile detection should be smaller and easier to maintain.

Example Usage

jobs:
  ci:
    uses: LerianStudio/github-actions-shared-workflows/.github/workflows/typescript-ci.yml@main
    with:
      package-manager: pnpm

Would This Be a Breaking Change?

No — fully backward compatible

Checklist

  • I searched existing issues and this is not a duplicate.
  • This feature aligns with the repository's goal of providing reusable, organization-wide workflows.

Additional Context

Request from Bedatty: create validations similar to the existing TypeScript/npm checks, but supporting pnpm as well. This can be implemented as an adaptation of the existing npm behavior by adding a way to select or detect pnpm.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or improvement request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions