# Semantic Versioning and Node-RED

**URL:** <https://discourse.nodered.org/t/semantic-versioning-and-node-red/35386>\
**Category:** General\
**Created:** [5 November 2020 17:02 UTC](https://discourse.nodered.org/t/semantic-versioning-and-node-red/35386 "2020-11-05T17:02:12Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![drmibell](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/drmibell/32/8424_2.png) [@drmibell](https://discourse.nodered.org/u/drmibell)\
**Post date:** [5 November 2020 17:02 UTC](https://discourse.nodered.org/t/semantic-versioning-and-node-red/35386/1 "2020-11-05T17:02:12Z")

</div>

Not strictly a Node-RED question, but I would be curious to hear opinions on how semver is or should be used in the NR environment. While revising nodes that I contributed a few years ago, I started thinking about some specific issues, so with apologies to any "old hands" who find them trivial, these are my first thoughts.

When should I release version 1.0.0?  
The classic semver question, but I noticed that about 2/3 of the contributed nodes in my pallet are at major version zero (0.y.z). Do the authors really mean that these nodes are still under (rapid?) development and may change, even in breaking ways, without warning? (I tend to doubt that.) Some of these nodes may actually have been abandoned at version zero, but I hesitate to think of 0.x.y as a red flag telling me to avoid using a node until it is stable. On the other hand, do NR users expect a certain level of support (bug fixes, at least) once a node is at version 1.0.0? If so, are developers discouraged, perhaps subconsciously, from releasing 1.0.0? Should there be some discussion of this in the Creating Nodes section of the documentation?

Can I start with version 0.0.1?  
Many developers, including myself, have done this at times. Technically, this is a patch version, and development should start with 0.1.0. Does anyone care?

Do I need to worry about (or document) which versions of Node-RED or node.js my node has been tested against? Do I need to be concerned that my node might be broken by new major versions of libraries that are loaded by NR or other nodes and that I am using implicitly, without a dependency declared in the package.json?

Other tiny questions are not worth listing, but may appear if anyone responds.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [5 November 2020 17:29 UTC](https://discourse.nodered.org/t/semantic-versioning-and-node-red/35386/2 "2020-11-05T17:29:56Z")

</div>

> [@drmibell](#):
>
> When should I release version 1.0.0

My take would be to go to 1.0.0 once you think you have it working with a stable spec and are reasonably confident you won't have to introduce any breaking changes for some time.

As for why so many nodes are still 0.x.x I suspect that is mostly because the author just never got round to saying ok, that's it, release v1.

> [@drmibell](#):
>
> Can I start with version 0.0.1

It doesn't matter really. Strictly I suppose it should be 0.0.0, but I must confess I tend to start with 0.1.0, just because it sounds better I think 🙂

> [@drmibell](#):
>
> other nodes and that I am using implicitly, without a dependency declared in the package.json

Don't they all have to be declared in package.json. I think you should use there entries like  
`"fs-extra": "^4.0.2"`  
which means at least 4.0.2 but less than 5.0.0 so you allow non-breaking updates to the module.

Don't know about the node-red/nodejs question, will be interested in the answers.

---

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [5 November 2020 17:38 UTC](https://discourse.nodered.org/t/semantic-versioning-and-node-red/35386/3 "2020-11-05T17:38:14Z")

</div>

Hi Mike,

> [@drmibell](#):
>
> I hesitate to think of 0.x.y as a red flag telling me to avoid using a node until it is stable

Then you will need to ignore a bunch of my nodes, because in the beginning I wasn't aware that semantic versioning was so important for some folks. First time I heard about it, was Nick explaining at the time being why he wanted to get the 1.x version ready. So lots of my nodes still have a 0.x version...

> [@drmibell](#):
>
> Do I need to worry about (or document) which versions of Node-RED or node.js my node has been tested against

Testing my nodes on multiple Node-RED/Nodejs versions is not a service that I can offer for my nodes in my limited spare time. If somebody has a problem with one of my nodes, I expect them to report it clearly, and I will try to fix it. That is the least that I expect from users that are allowed to use my developments and support for free. After all, it is only a hobby for lots of us. So no compatibility charts for my nodes...

Bart

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [5 November 2020 20:56 UTC](https://discourse.nodered.org/t/semantic-versioning-and-node-red/35386/4 "2020-11-05T20:56:48Z")

</div>

> [@drmibell](#):
>
> On the other hand, do NR users expect a certain level of support (bug fixes, at least) once a node is at version 1.0.0? If so, are developers discouraged, perhaps subconsciously, from releasing 1.0.0?

I would tend not to release a v1 until I'm sure that it really is a sensible node and reasonably stable. But I think I tend to get to a point where I've put in a lot of work and content to a node and end up thinking - Hmm, if I change to v1 now, people will expect a breaking change. So a bit self-defeating all round 😃

> [@drmibell](#):
>
> Technically, this is a patch version, and development should start with 0.1.0. Does anyone care?

Nope 🤣 It just feels wrong to start with v0.0.0! But now you've mentioned in, perhaps I'll start my next node with 0.1.0.

> [@drmibell](#):
>
> Do I need to worry about (or document) which versions of Node-RED or node.js my node has been tested against?

Yes. But probably not as much as some other platforms. At the very least, you need to say the minimum supported version of node.js and Node-RED. The package.json file is used for that of course.

> [@drmibell](#):
>
> Do I need to be concerned that my node might be broken by new major versions of libraries that are loaded by NR

Of course, that is always a concern and the reason for having major versions in semver of course. But, any node you write should have explicit entries for dependencies so generally, npm will sort that out for you.

> [@drmibell](#):
>
> that I am using implicitly, without a dependency declared in the package.json?

No, no, no! Don't do that. Ever.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [5 November 2020 21:08 UTC](https://discourse.nodered.org/t/semantic-versioning-and-node-red/35386/5 "2020-11-05T21:08:11Z")

</div>

> [@drmibell](#):
>
> Do I need to worry about (or document) which versions of Node-RED or node.js my node has been tested against

Currently Node-RED still supports back to node8. So yes you should probably note if you require a minimum level higher than that or add a minimum engines level in your package.json.

---

<div class="post-metadata">

**Author:** ![Nodi.Rubrum](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nodi.rubrum/32/107482_2.png) [@Nodi.Rubrum](https://discourse.nodered.org/u/Nodi.Rubrum)\
**Post date:** [5 November 2020 22:07 UTC](https://discourse.nodered.org/t/semantic-versioning-and-node-red/35386/6 "2020-11-05T22:07:36Z")

</div>

You could always use a versioning qualification established by someone else as a model. [https://en.wikipedia.org/wiki/Software\_versioning](https://en.wikipedia.org/wiki/Software_versioning). On the wiki, Microsoft method versus Apple method is compared for example.

---

<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:** [4 January 2021 22:07 UTC](https://discourse.nodered.org/t/semantic-versioning-and-node-red/35386/7 "2021-01-04T22:07:47Z")

</div>

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