mapbox / mapbox/node-pre-gyp

Best practice: document 'prepublish' step to validate bundling

Open
#117 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.2k
Forks
271
Avg merge
23h 40m
Merged PRs (30d)
2

Description

Because node-pre-gyp modules need to bundle node-pre-gyp itself an easy mistake is to miss this when a developer packages.

Putting npm ls as the prepublish command will catch and prevent this error ensuring that no module gets published without node-pre-gyp properly bundled. I've not yet added this recommendation to the readme because npm ls had serious bugs with node v0.8.x, but now that node v0.8.x is in less common usage I should move on this again (https://github.com/mapbox/node-pre-gyp/commit/54076875c34e1f3aa8e46fc14566e8658f6ca1ce#diff-04c6e90faac2675aa89e2176d2eec7d8) Creating as a ticket as a reminder to test once more before recommending in the readme guide.

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

Review the README guide and the referenced commit, then test the proposed npm ls prepublish check against the node-pre-gyp packaging scenario, including the stated Node v0.8 concern. Done means documenting the recommendation in the README if validation supports it.

Written by the indexing model from the issue text.

Assessment

Tech stack
nodejs
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.