Skip to content

Resolve Vite+ version from package.json / pnpm catalog #82

@jasonkuhrt

Description

@jasonkuhrt

Problem

setup-vp installs the global vp before workspace dependencies exist, so CI cannot safely use the workspace-local vite-plus package to decide which global version to install.

Today the action has:

version:
  description: "Version of Vite+ to install"
  default: "latest"

For pnpm catalog projects this means users must duplicate the Vite+ version in workflow YAML or add a custom resolver step:

// package.json
{
  "devDependencies": {
    "vite-plus": "catalog:"
  }
}
# pnpm-workspace.yaml
catalog:
  vite-plus: 0.2.0
- uses: voidzero-dev/setup-vp@v1
  with:
    version: 0.2.0 # duplicated from pnpm catalog

That duplication is drift-prone; latest is also not acceptable for reproducible CI because this global binary owns vp install before node_modules exists.

Suggested solution

Allow version to be resolved from the checked-out project, e.g. one of:

with:
  version-file: package.json

or:

with:
  version: package.json

When package.json#dependencies/devDependencies.vite-plus is catalog: / catalog:<name>, resolve it through pnpm-workspace.yaml using the action's working-directory.

This would let CI keep one source of truth for the Vite+ version while still installing the correct global shim before dependency install.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority

    None yet

    Start date

    None yet

    Target date

    None yet

    Effort

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions