# Full semver comparison of module versions and private registry

**URL:** <https://discourse.nodered.org/t/full-semver-comparison-of-module-versions-and-private-registry/39177>\
**Category:** Developing Nodes\
**Created:** [15 January 2021 13:52 UTC](https://discourse.nodered.org/t/full-semver-comparison-of-module-versions-and-private-registry/39177 "2021-01-15T13:52:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![HaKr](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hakr/32/35414_2.png) [@HaKr](https://discourse.nodered.org/u/HaKr)\
**Post date:** [15 January 2021 13:52 UTC](https://discourse.nodered.org/t/full-semver-comparison-of-module-versions-and-private-registry/39177/1 "2021-01-15T13:52:07Z")

</div>

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](https://semver.org/) 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.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [15 January 2021 14:13 UTC](https://discourse.nodered.org/t/full-semver-comparison-of-module-versions-and-private-registry/39177/2 "2021-01-15T14:13:58Z")

</div>

> [@HaKr](#):
>
> 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?

---

<div class="post-metadata">

**Author:** ![HaKr](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hakr/32/35414_2.png) [@HaKr](https://discourse.nodered.org/u/HaKr)\
**Post date:** [15 January 2021 16:05 UTC](https://discourse.nodered.org/t/full-semver-comparison-of-module-versions-and-private-registry/39177/3 "2021-01-15T16:05:41Z")

</div>

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

```auto
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

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [16 March 2021 16:05 UTC](https://discourse.nodered.org/t/full-semver-comparison-of-module-versions-and-private-registry/39177/4 "2021-03-16T16:05:44Z")

</div>

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