actions / actions/toolkit

The new @actions/cache missing @protobuf-ts/runtime

Open
#1,898 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
5.9k
Forks
1.8k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

New @actions/cache v4.0.0 contains generated protobuf typescript that depends on @protobuf-ts/runtime. However, it not defined on package.json file.

To Reproduce

  1. Install new @actions/cache v4.0.0
  2. Bundle using any bundlers (I used esbuild)
  3. Got Cannot find module '@protobuf-ts/runtime-rpc' from 'node_modules/.pnpm/@actions+cache@4.0.0/node_modules/@actions/cache/lib/generated/results/api/v1/cache.js' error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots

When I run build typescript:

CleanShot 2024-12-08 at 18 09 09@2x

When I run jest test:

CleanShot 2024-12-08 at 18 08 52@2x

Desktop (please complete the following information):

  • OS: MacOS
  • Browser: -
  • Version: -
  • NodeJS: v20.14.0
  • pnpm: v9.12.1

Additional context
Add any other context about the problem here.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect the @actions/cache package.json and the generated module at lib/generated/results/api/v1/cache.js to compare its imports with declared dependencies. Reproduce the issue by installing @actions/cache v4.0.0 and bundling it, then run the existing TypeScript build or Jest checks mentioned in the report. Done means the required protobuf runtime dependency is declared and bundling no longer reports a missing module.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.