protocolbuffers / protocolbuffers/protobuf-javascript

Global scope pollution in google-protobuf npm library cause conflict between sub dependencies

Open
#76 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help wanted javascript triaged
Dominant language
JavaScript
Stars
471
Forks
91
Avg merge
3h 57m
Merged PRs (30d)
2

Description

The google-protobuf npm library pollutes the global scope through the global.proto variable.
This pollution causes conflict between different versions of google-protobuf in the same node process as they overwrites each other.

Reproduce:

  • Package A has google-protobuf@3.3.0 as a dependency
  • Package B has google-protobuf@3.1.0 as a dependency

If dependency B is required after A, the older version of google-protobuf owervrites the new versions global.proto in the process.

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 by inspecting the google-protobuf npm package entry points and the initialization of the global.proto variable. Reproduce the conflict by loading two versions in one Node process, then verify that both dependency versions can coexist without overwriting shared global state.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.