Full semver comparison of module versions and private registry

We are developing a module with fourteen nodes, which we want to share with our QA colleagues through an in-company package repository before publishing them to NPM. We also provide a catalog.json file with the relevant releases on our intranet, so the colleagues can use the standard Manage Palette menu option of Node-RED.

We had chosen to use SemVer versioning with pre-release appendix at the patch level, to prevent future version gaps when we go public with those nodes.

We face two issues:

  1. The Palette editor (node-red/editor-client/src/js/ui/pallette-editor.js) form only checks the major.minor.patch numbers of versions to determine if a module can be updated,
  2. In our catalog.json we can point to a private npm registry (Verdaccio), but the installer (node-red/registry/lib/installer.js) does not support npm's --registry command line option

I would suggest to make a pull request to add full support for semver comparison in palette-editor.js and one for adding optional support for configuring a private registry url in the settings.js, which installer.js will use as an extra argument to the npm command line.

Happy to look at the improved semver comparison.

On the registry side, we rely on the user's .npmrc to be properly configured so that npm knows which registry to use for any given module - rather than us having to duplicate the same logic you can do there within node-red itself. Does that satisfy your requirement?

1 Like

Thank you Nick for the extremely quick reply. I will create the pull request for the change on the SemVerFullCompare branch.

Humbly apologise for overlooking the .npmrc path and instead focusing on the logged npm command line.
I will take a closer look on the npm configuration options to accomplish

npm.cmd install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production node-red-contrib-ol-connect@0.1.120 --registry https://leonard.ca.objectiflune.com:4873
1 Like

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