If version is not semver version, use it "as is"
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.9k
- Forks
- 1.8k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the enhancement
I just spent a day figuring out why tool-cache find function does not find my item in the cache. It was because my version in cacheFile was v1.0.3 (named after release branch name), but find used semver.clean("v1.0.3") (which is equal 1.0.3) - this resulted in cache miss.
Please change this behavior.
If a version is semver, use semver.clean in both cases.
Otherwise, use version "as is" in the cache.
This allows to use git commits as cache keys.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the TypeScript implementation of the tool-cache find function and its uses of semver.clean. Check the existing cache tests, then cover semver versions and non-semver values such as git commits; done means both lookup and storage use cleaned semver values when applicable and preserve other versions as-is.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100