Npm package to auto generate jsdocs and push to github - node.js

I found this great npm package called Wicked that will auto-generate jsdocs for you and push them to github. However it's so old that in order to use it you have to be running Node version 0.10, so you have to change your node version, run it, and then change it back to the current version. This version is not going to be maintained after October of this year, so it's not really a viable solution.
Does anyone know of an npm package/combination of packages that is still being updated that will do the same thing?

Related

What exactly is the relation between the versions of npm and node when installing them with nvm

tl;dr
Is there is a reason that I shouldn't do the following; Install and manage packages with a version of npm that is different (much newer) from the npm version that comes with the node version I am going to be using to run my app.
longer
Some context why I am asking. I have to work with a service that supports only node 0.10.32 (I know, don't ask) and an app that was written some time ago. We need to add some functionality and unfortunately when I try to run the codebase locally it does not because some dependency of some dependency updated the minor version and they introduced const or fat arrow notation (=>). We had used shrinkwrap to lock down the versions but something must have slipped.
I have spent days on this and at some point it came to me that the problem lies with the package manager not doing what I want. So I managed to install the packages I wanted and shrinkwrapped it using npm#3.10.10 which is what I get when I use node#6.12.3 (nvm use 6.12.3). And when I want to run the app I just switch to the node#0.10.32 to make sure that is going to work on the service.
Can anyone think of any problems with this solution or a reason I shouldn't do that?
Side question
I noticed that when installing node versions using nvm, they usually come with a specific version of npm? What is the relation of those versions? How are they decided? Was it the latest npm version along with that node version when it was released? Is it the latest version of npm that can run with that specific version of node?

Possible to "npm install" code changes added since last version number change?

This is a n00b npm question, as I'm just getting started here. Apologies.
I'm using the node-dbus npm module, whose latest version is 0.2.0. But I see that there have been code changes (one of which I want) added since the last version number change.
Do I need to ask the author of the package to update the version number so I can easily get the new stuff? Is it permissible/possible for me to go in and update the version number myself in the github repo? Or is there some clean way to set up the dependencies line in my package.json to get the stuff that has been added since the last version number change?
I see that it's supposed to be possible to use a "git remote url," but so far I'm unable to make that work. Is that what I should be doing? Is getting the version number updated the right direction?
Thanks for your help.
Steve
According to the official NPM documentation, you can install a package by:
npm install <githubname>/<githubrepo>[#<commit-ish>]
In your case, it should be:
npm install sidorares/node-dbus#<the-commit-that-contains-your-wanted-code>
You can add --save to the command to update package.json on the fly.
Please be aware that it is not a good practice to install modules from source code directly as it might not be a stable version.

How to safely rollout new npm package version with engine requirement change

As node is deprecating old Buffer usages, and unfortunately I'm using it in one of my packages. I'd love to rollout a new version to fix this before too late.
I rolled out a version that drops node < 4 support with patch version number increment, and someone complaints the breakage a few hours later.
As npm install --save always includes full semver in package.json. Which makes it impossible for deployment machines that runs a different version of node to resolve the package to an earlier version.
If I increase minor version or major version, the users will face the same issue after using npm install --save.
I know that the user should use the same version for dev and production, and npm will do the right thing for them. But this is not a perfect world. Is there a way to make this rollout transparent to end users by using some npm features?

NodeJS version number confusion

I installed Node JS several months ago and played around a bit. Today, I wanted to start learning more about node and before coding, I decided I wanted to make sure I had the latest version.
I checked the version and it was something like v0.10.3x. I looked on the NodeJS website and it shows the latest version as v4.1.0. So I thought Woahhh! I better upgrade and I couldn't believe it moved that fast to a 4.x version in only a few months.
I spent quite some time trying to figure out how to completely uninstall node and npm because I couldn't seem to upgrade it.
Finally I got it all ripped out, then installed in on CentOS 7 using yum. I know I won't get the latest version through yum but, I figured it would be close enough.
After install, I am at v0.10.40.
I have a feeling I just don't understand something about NodeJS version numbers.
Yeah if you only used the official node.js runtime then it would have appeared to jump from 0.12.x all the way to 4.0.0 in one fell swoop. What you may not have known was that node devs that were sick of how much the node repository was stagnating made a fork of the project and called it io.js. Under the io.js name the project marched forward over the last six months or so; it started at v1.x and iterated all the way through 2.x and 3.x in that time. Old node.js used a different versioning system wherein the odd versions were unstable and even versions were stable. Io.js switched to using semver versioning semantics like packages on npm already use.
After a lot of deliberation Joyent (original maintainers of node.js) finally caved in and helped form a proper open committee around node in an effort to push the project forward in much the same way io.js was already doing. A few months ago they agreed to merge io.js back into node.js (which was the goal of those who created io.js in the first place). They finally finished merging the two projects recently. The name io.js is no more and node.js lives on starting at v4.0. It will continue to use semver semantics like io.js did :)
Going forward things with node will be MUCH simpler. I'm excited to see where the project goes from here.
That is because since v4.0, the Node.js project and the io.js project that are now combined.
As for the io.js project, the version numbers were like v3.x, v2.x and v1.x.
Reference https://nodejs.org/en/blog/release/v4.0.0/
You can use NVM(Node Versioning manager) for avoiding confusion.
Benefit of this package is you can switch b/w two versions according to your convenient. Its a very easy to use tool.
https://www.liquidweb.com/kb/how-to-install-nvm-node-version-manager-for-node-js-on-ubuntu-12-04-lts/
if you use npm you can upgrade with
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
once done try node -v to see what you got
see more at http://davidwalsh.name/upgrade-nodejs
You can update node or npm using command line. You need to have a version of node or npm installed in your machine.
Use the following command in you terminal.
npm install node -g
npm install npm
You can also install the specific version of node, Like this.
npm install node#8.1.3
npm install npm#4.1.2
Here 8.1.3 is a version number. Use any of the version you want to install.

applying updates for authored yeoman generator to npm global install/update

I have authored my own yeoman generator for the inuit.css framework and published it to npm. The repo lives here on github.
I've since noticed a bug in my generator (thanks to another user) which has been fixed, tested and committed back to the generators github repo with a new version tag, however I can not figure out how to apply that update for when someone runs npm install -g generator-inuit or npm update -g generator-inuit
Do I need to republish the yeoman generator back to npm? Also, how do I alert people who are using the generator that an update is available?
Yes, you need to republish your new version to NPM using npm publish. Note that you'll need to bump the version inside your package.json file (npm doesn't uses git tag for versioning).
After that, there's no direct way to let your user know an update is available. You can blog about it, talk on twitter, etc... Note that yo will notify user after a while if they're using an outdated version of a generator. This process is done automatically.
Also, lots of node.js folks uses david package to checkout when updates are available for their packages.

Resources