protocolbuffers / protocolbuffers/protobuf-javascript
Global scope pollution in google-protobuf npm library cause conflict between sub dependencies
Nobody has claimed this yet.
- 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.0as a dependency - Package B has
google-protobuf@3.1.0as 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
- 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 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