How do upgrade node from palette that uses git repo?

With v1.1.0, we can now install nodes that sit on a git repo using catalog.json. ref: https://github.com/node-red/designs/blob/master/designs/node-installation/README.md

The installation works perfectly. However, I can't figure out how does the 'upgrade' feature will work? i.e. If I update my git repo and bump the package.json from 1.0.1 to 1.0.2, I want that reflected in the nodered palette to say "upgrade" ref: https://nodered.org/docs/user-guide/editor/palette/manager.

EDIT1:

  • catalog.json at the start
...
{
            "id": "schemaValidator",
            "version": "1.0.1",
            "description": "schemaValidator",
            "updated_at": "2020-07-03T00:00:00.000Z",
            "url": ".....",
            "pkg_url": "git+https://..........schemaValidator#v1.0.1"
 },
  • On the browser then I installed this node from the palette
  • Then on the git repo of the node, I bumped the version to v1.0.2 both in package.json and as the repo tag
  • I then edited the catalog.json to reflect the new version as:
...
{
            "id": "schemaValidator",
            "version": "1.0.2",
            "description": "schemaValidator",
            "updated_at": "2020-07-03T00:00:00.000Z",
            "url": ".....",
            "pkg_url": "git+https://..........schemaValidator#v1.0.2"
 },

After restarting node-red, I then go to the palette and against schemaValidator it says "1.0.2" but rather than showing "upgrade" it shows the "installed" status

Good question. I don't think the original design note fully considered that.

The upgrade button will be shown in the palette manager if the version you have installed doesn't match the version listed in the catalog.json. You say you updated the module's package.json, but you don't say if you also updated the catalog.json to match.

I added some more info to the question under "EDIT1".

Ok, this needs investigating properly. Please raise an issue with the details you've added.

Raised https://github.com/node-red/node-red/issues/2634
Thank you.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.