What is the best way to upgrade Jsreport Studio?
-
It seems jsreport cli doesn't have an upgrade option. Is the best way to update the version from 1.5.1 to 1.6.0 in the package.json file and delete the node_modules directory?
-
@charlieknoll yes, the best way is to update
jsreport
inpackage.json
and runnpm install
(no need to deletenode_modules
entirely).The reason why there is no
upgrade
command is because updating a dependency is a standard feature ofnpm
, however we will watching if this is a common source of confusion and decide if we would need to implement the command.
-
OK, it would be nice to have. That way it would be possible to just run npm upgrade and it would automatically be updated to the latest version. I usually do this on other projects just to make sure I have the latest bits. I can see the case where I missed an announcement of the latest version release and neglected to upgrade.
With the method above, would it upgrade any additional packages such as jsreport-wkhtmltopdf?
-
hmm i guess that an
upgrade
command could update any jsreport extension found inpackage.json
, but at this point i don't know if this is something we would like to implement because there are options like npm-check that let you know easily if there are some updates available for your dependencies, andnpm-check
checks for all dependencies in your project so i think it is better to use something like that rather than an specific command mechanism for only jsreport extensions dependencies.
-
hmm i guess that an
upgrade
command could update any jsreport extension found inpackage.json
, but at this point i don't know if this is something we would like to implement because there are options like npm-check that let you know easily if there are some updates available for your dependencies, andnpm-check
checks for all dependencies in your project so i think it is better to use something like that rather than an specific command mechanism for only jsreport extensions dependencies.
-
Today I ran npm-check and it said "all your packages look amazing" or something like that. I checked jsreport-xslx and it was still at 1.3.0. I deleted jsreport-xlsx from node_modules and npm install jsreport-xslx and I got 1.3.1. Any other way to check if there are updates to jsreport studio or it's extensions?
-
not idea what is happening, i use
npm-check
everyday and it works, i triednpm-check
just now with a project withjsreport-xlsx
1.3.0 and i get 1.3.1 normally. maybe you have some problems with npm cache in your machine, sometimes i need to runnpm cache clean
in order to see latest updates of packages, note that this is a problem of npm cache itself, nothing to do withnpm-check
.To answer your question, right now there is no other way to check for jsreport extensions updates in a project, we recommend the usage of
npm
to do this.
-
I think I know the problem, npm-check works if I switch to node_modules\jsreport. I also tried the npm-check-updates package and it works only in the node_modules\jsreport directory. Thanks for your help.
-
I guess that both mentioned tools doesn't search on the nested dependencies. The
jsreport-xlsx
is nested dependency ofjsreport
so you don't see updates.
This is the expected behavior. You should follow updates only onjsreport
or not included extensions likejsreport-wkhtmltopdf
.
It can happen that currentjsreport
package doesn't reference the latest extension likejsreport-xlsx
, but it will shortly get to the finaljsreport
release after it is tested altogether. So it is better to wait for it.We will definitely add link to the update instructions to the jsreport download page, because many users are not familiar with npm or node. Thank you for opening this topic.
-
Ah, that makes sense. So once jsreport dependencies are verified then jsreport's package.json will be updated and it's version incremented and then jsreport-studio dependency on jsreport will be incremented. I will reinstall jsreport-wkhtmltopdf using npm install -save into jsreport-studio so that that dependency is tracked as well.