MetaMask / MetaMask/create-release-branch

create-release-branch fails immediately when encountering a `patch:` dependency

Open Beginner friendly
#205 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

team-core-platform
Dominant language
TypeScript
Stars
9
Forks
7
Avg merge
51m
Merged PRs (30d)
2

Description

If the repo on which this tool is run has a dependency that uses the `patch:` protocol — this is common when using Yarn's patch feature — then the tool will fail immediately, without presenting the user with a spec. This happens because when parsing `package.json` we need to validate the shape of the manifest data. When we encounter `dependencies` [we only allow `npm:` and `workspace:` dependencies](https://github.com/MetaMask/create-release-branch/blob/c80c69b084d12221b053e67f26db691830ff8b55/src/package-manifest.ts#L158-L190) and we reject the rest. We should investigate whether this is necessary and allow everything if possible.

Contributor guide

No contributing guide indexed for this repository

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

Start in src/package-manifest.ts at the dependency validation around lines 158-190, then reproduce the failure with a package.json containing a patch: dependency. Determine whether the manifest validation can accept this protocol without rejecting other supported shapes. Done means create-release-branch no longer fails immediately and presents the user with a spec.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.