Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Package manager caching strategy for pnpm and Yarn Modern #1366

@MikeMcC399

Description

@MikeMcC399

Situation

cypress-io/github-action caches package manager dependencies for:

and offers no equivalent built-in functionality for:

Background

The variety of package managers has expanded sincecypress-io/github-action was originally developed when onlynpm andYarn v1 Classic were available and in common use.

The action is set up to recognize the following lockfiles and use GitHub's@actions/cache to cache the related path:

LockfileLinux path
package-lock.json~/.npm
yarn.lock~/.cache/yarn

The above set of path settings does not however cover all currently used package managers:

Package managerCommandLinux default example
npmnpm config get cache~/.npm
pnpm v10pnpm store path~/.local/share/pnpm/store/v10
Yarn v1yarn cache dir~/.cache/yarn/v6
Yarn Modernnode-modulesyarn config get cacheFolder~/.yarn/berry/cache
Yarn Modernpnpyarn config get cacheFolder~/.yarn/berry/cache

This causes the action to attempt to cache unused paths:

  • ~/.npm (unused) for pnpm
  • ~/.cache/yarn (non-existent) for Yarn Modern

Assessment

GitHub Actions offers afull suite ofsetup-* actions to cache dependencies of commonly-used package managers.

For Cypress, the relevant caching action isactions/setup-node which offers caching for npm, Yarn (v1 and Modern) and pnpm.

Duplicating the capability fromactions/setup-node intocypress-io/github-action for pnpm and Yarn would involve a significant effort and on-going maintenance for the Cypress team.

Recommendations

Related

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp