Monday 29 April 2019

Publishing on NPM Registry and GitHub, which Node version?

Let's say I wrote a NPM package in Node 12. I have a few questions about this process:Should I publish to NPM registry as Node 12? If I do, will users accidentally download it using npm install if their Node version is not 12?If I transpile my code (e.g. from Node 12 to Node 10) via TypeScript or Babel, what would happen?Do I publish both my Node 12 and Node 10 code to the NPM registry? How would users know which Node versions are available? How do they specify which Node version they want to download?How would users contribute to the codebase, if it is in Node 10? How would these changes done in Node 10 propagate upstream to my Node 12 codebase?​I am very confused about this compatibility and transpiling process. I suppose this confusion is true for all transpiled codebases, e.g. TypeScript -> JavaScript, or ESNext -> ES6 codebases. How do the developers specify or enforce compatible versions? How can the users download for their Node versions? And how can the community contribute back to transpiled codebases?

Submitted April 30, 2019 at 06:57AM by Roselia_Party

No comments:

Post a Comment