MetaMask / MetaMask/metamask-extension

Fix browser-specific manifest generation

Open
#12,532 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-buildSystem
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

Describe the bug
Code for merging _base.json manifest and some browser-specific manifest like chrome.json is not working properly when there is property which value is array defined in both manifests.

Steps to reproduce (REQUIRED)

  1. Define one additional permission in the browser-specific manifest, let's say in chrome.json
  2. Run yarn dist
  3. Check generated manifest for chrome, permission in chrome.json override first permissions from _base.json

Expected behavior
For upper example, generated manifest for chrome should have all permissions from _base.json and additionally permission defined in chrome.json.

In a broader sense, if the same property (array value) is defined in base and the browser-specific manifest resulting manifest should hold all array elements from both _base.json and browser-specific manifest (also should check for duplicates).

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

Start by running yarn dist and tracing how _base.json is merged with chrome.json during manifest generation. Verify the generated Chrome manifest when both files define an array property; done means retaining all elements from both manifests without duplicates.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.