Which Node-RED version starts to support node unittest?

I checked the github doc of node-red-node-test-helper. It doesn't say directly, but leaves a number in the package.json:

  "devDependencies": {
    "node-red":"^0.18.4",
    "node-red-node-test-helper": "^0.1.8"
  }

Just want to confirm with people whether or not 0.18.4 is the answer.
Thanks!

I think it should have a node-red section in the package.json that should say the minimum supported version?

@Steve-Mcl, is that something that should be added to the package?

I think the question is more when did node-red start supporting test-helper.

If I am correct then installing node-red-test-helper@0.1.2 will allow the OP to run tests on a node designed for node-red v0.18.3 or later (see here)

But that info should also go in the package.json file right?

Not 100% certain what you are asking Julian?

If you mean a custom nodes package.json then yes, there should be a node-red section (but it is not mandatory, just recommended & good authorship & scored against)

If you mean the node-red-node-test-helpers package should have a node-red section, then I am not certain it does since it is typically included as a dev dependency alongside the min supported node-red version in your custom node (see the readme)

Maybe Nick can answer that.

Correct. The test helper module isnt a Node-RED module that gets loaded by the runtime that requires the node-red section in package.json.

OK, but it would seem sensible to have a minimum node-red version listed somewhere? Unless there really isn't a minimum, in which case, it might be sensible to say so in the docs?

You are right.
My concerns

  • There are explicit Node-RED version numbers in the Getting Started doc: 1.1.0 and 1.3.5 in two sections as of today.
  • This leaves an impression that one of those versions should be the go-to version for beginners, although they might be random situational examples (?).
  • For this reason, our internal NR had been locked onto a recommended version by that page for a long time.
  • When I was following the test-helper node's tutorial, I forgot to link node-red executable, which brought me up all the way to 3.0.2. So I was a bit confused and was wondering if NR 3.x was required.

I just wanted to confirm that we can stay with a version older than 3.x, say 2.0.5, and introduce the test-helper node to our codebase at the same time.

Thanks, guys!

You are right, they are just example numbers from the time those docs were written.

Node-RED 1.x is no longer maintained and does not receive any fixes.

Node-RED 2.x is in maintenance mode and will receive occasional releases with backported fixes.

The main release stream is Node-RED 3.x

This is documented here Release Plan : Node-RED

This is super useful, Nick!
From the page you linked, where can I find the records of breaking changes?

  • Can I understand that the major versions all introduce some breaking changes? e.g., 4.x will break some part of 3.x?

Where can I find the comprehensive list of those changes?

  • I quickly scanned through NR's github releases section, but can't see the obvious breaking changes from a glimpse in e.g., 3.0.0.
    Thanks a lot!

The main breakage was dropping support for node 12 and earlier. That meant that users had to also update nodejs. And then recompile any nodes that had binary bindings etc. any other breakage would be noted in the release notes.

Thanks @dceejay
When you say

any other breakage would be noted in the release notes.

Do you mean it'll be a dedicated section like the ones I see in the typical release nodes of NR:

  • Editor
  • Runtime
  • Nodes

like this

  • "Breaking Changes"

Or should I really dig into the individual items?

The release blog posts will highlight any significant breaking changes.

1 Like

To clarify, the only releases that might contain breaking changes will be 2.0.0 and 3.0.0

1 Like

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