I use Arboreal library in my new project, I am made some changes and now working to change it to npm module and use Grunt, because it not available from npm.

But I have a problem, when I start editing the package.json file. Here's what I get:

  "name": "arboreal.js",
  "description": "Javascript tree traversal and manipulation library",
  "author": "Andrea Fiore",
  "version": "0.0.2",
  "contributors": [
      "name": "Nenad V. Nikolić",
      "email": "me@shonzilla.com",
      "url": "http://shonzilla.com/"
      "name": "Vasiliy Altunin",
      "email": "skyr@altunin.online",
      "url": "https://github.com/vasiliyaltunin"
  "dependencies": {},
  "devDependencies": {
  "engines": {
    "node": ">= 4.0.0"
  "license": "MIT",
  "main": "./lib/arboreal",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/vasiliyaltunin/arboreal"
  "scripts": {
    "test": "jasmine-node test/specs"

Well I did not finish with it, yet.

But the main problem is author. Now it "author": "Andrea Fiore",, but i forked it from this repo. And the owner of that repo seems to do much work to improve and bugfix this code. But the problem is that I am going to put it inside npm under my account and in this case I am must set author to my name: "author": "Vasiliy Altunin",, but in this case the original author is never mentioned.

What is the best practice to solve this problem, so all authors respected and all npm descriptions will be right?


What is the best practice to solve this problem, so all authors respected and all npm descriptions will be right?

There is no absolute best practice but here is what I would do. This is the same I would expect someone to do with my code and I would consider this a good to great practice:

  1. ensure I change the name of the package, to avoid any confusion with the original upstream package and avoid "name squatting" their package name in the registry.

  2. Set my name as the author as the NPM registry demands it

  3. Update the contributors with the list of primary committers

  4. update the description to explain the provenance of the code who wrote it, who I forked it from and what are my additions

  5. add and update the same in the README.md file and eventually update accordingly the code file headers with similar information

  6. possibly add the copyright of the main authors beside the original one in the MIT-LICENSE.txt

  7. ping the authors to inform them about what I am doing as a courtesy

If possible I would try to avoid all of this stuff and instead work out with the upstream developers to get my patches included and work with them to release it all in the registry, making all of the above moot. This would be my first choice in most cases.

All this goes well above and beyond what would be essentially needed, but this is IMHO the right and courteous thing to do

| improve this answer | |
  • Thanks, i try to fillow. But i dont think it helps about push to mainstream, couse they did not use Grunt. – Vasilij Altunin Apr 11 '17 at 22:13
  • @VasilijAltunin You should ping them anyhow. They may be interested. Keeping one codebase is likely to best for you and everyone in the long run – Philippe Ombredanne Apr 11 '17 at 22:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.