When I run “nom outdated” three shows up as being ok.
Package Current Wanted Latest Location
three 0.92.0 0.92.0 0.108.0 Aetheres
But 0.92 is from a year ago. Is this still the best version to be using?
If not can the packaged be updated to pull the latest/wanted version?
The npm outdated
“Wanted” version will tell you if there’s a newer version "that satisfies the semver range specified in package.json
". Usually that semver range looks something like this:
"three": "^0.92.0"
That “^” means you want bug fixes (0.92.1, 0.92.2, 0.92.3, …) but not new features (0.93.0, 0.94.0, …). That’s the default in all NPM projects, because new features often introduce bugs. Most users want bugfixes to be downloaded automatically, but want to decide themselves when they “want” to update for new features and risk introducing bugs.
r108 is the latest and best version. If you want to update, you can change your package.json
dependency to show:
"three": "^0.108.0"
and then run npm install --save three
. Some changes in r108 may not be compatible with r92, so you may have to change a few things in your code. The threejs changelog describes those changes, or you’ll often see warnings in the console if you’re using an outdated feature.
5 Likes
I think if you modify the depency entry in package.json
you don’t need --save
on the npm install
. Also, you can just do npm install --save three@latest
, which will install the latest version and update package.json
. (I just tested it. )
3 Likes
Thanks. TIL.
Now I’m scared of how far behind all the other packages are.
1 Like