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?


  • administrators

    @charlieknoll yes, the best way is to update jsreport in package.json and run npm install (no need to delete node_modules entirely).

    The reason why there is no upgrade command is because updating a dependency is a standard feature of npm, 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?


  • administrators

    hmm i guess that an upgrade command could update any jsreport extension found in package.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, and npm-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.


  • administrators

    hmm i guess that an upgrade command could update any jsreport extension found in package.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, and npm-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?


  • administrators

    not idea what is happening, i use npm-check everyday and it works, i tried npm-check just now with a project with jsreport-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 run npm cache clean in order to see latest updates of packages, note that this is a problem of npm cache itself, nothing to do with npm-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 of jsreport so you don't see updates.
    This is the expected behavior. You should follow updates only on jsreport or not included extensions like jsreport-wkhtmltopdf.
    It can happen that current jsreport package doesn't reference the latest extension like jsreport-xlsx, but it will shortly get to the final jsreport 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.


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.