Surprise! The first beta release of Node-RED 3.1 is now available.
This is a long overdue release, but here it is at last.
Node-RED 3.x requires at least Node 14.x, but that reaches end-of-life in a couple months. These days you should really be using Node 16 at least or even 18.
Here are the highlights for this release.
The Change Log has the full list of changes.
Note: if any issues are reported against the beta, we'll update this post to list them here. If you hit a problem, please do check back here before adding a comment.
Updated Context Menu
We've massively expanded the usefulness of the Context Menu added in the last release. There are now lots more commonly used options available in the menu, which also provides better options related to what you clicked on to open the menu.
This includes right-clicking on the tab bar at the top of the workspace to get flow-specific options:
If you look closely at that image you'll see a new option that leads us on to...
You can now lock a flow (tab in the editor) to prevent it from being modified. Whilst locked you cannot edit the nodes, add new nodes, modify the wiring... anything.
Why is that useful? You may have a 'mission critical' flow that you want to be super careful not to change by accident. You may want to collaborate on some flows with others, but mark some of them as 'off limits'.
With this release anyone is able to lock and unlock flows, but it lays the ground work for a future release where particular users may not have permission to unlock flows - allowing them to only edit the flows they are allowed to.
The options to lock/unlock flows are available in the right-click context menu - as well as a new padlock button in the Info sidebar explorer.
Important note for the beta: to make this work, we've modified how 'nodes' are managed inside the editor to prevent them being modified on locked flows. No apis have changed, but it does mean certain calls might fail if they are attempted on a locked flow. This has had a fair amount of testing across all of the core features of the editor, but 3rd party node authors are a creative bunch and it is possible someone is doing something
We added the ability to hide flows a couple releases ago. This was done use the 'eye' icon that appeared when you hovered over the tab.
We got plenty of feedback, including our own experience, that it was way too easy to accidentally click that button and make things disappear without realising it.
So for this release we've gotten rid of that button on the tab. Flows can still be hidden, but you do so via the context menu option when you right-click on the tab bar. You can still use the eye button in the Info sidebar explorer.
Adding images to node/flow descriptions
All nodes and flows have a Description tab in their edit dialog. This lets you write docs (using markdown) that gets displayed in the Info sidebar when the thing is selected.
With this release you can now drag images directly into the markdown editor and they will get inlined. This is done by base64 url encoding the image directly into the description property.
We've also added support for Mermaid diagrams. These are diagrams that can be defined directly in the markdown and then rendered out as images when displaying in the sidebar. GitHub recently added support for them, and I've found them to be super-useful when documenting things when plain text isn't quite enough.
Global Environment Variables
We've supported defining environment variables scoped to individual flows, subflows or groups for a while. But the only way to define an environment variable available to all flows was to do it via your settings file. That wasn't very accessible or portable.
So with this release you can now define global env vars via the User Settings dialog:
Under the covers these get added to your flow as a new core configuration node type. That will mean importing a flow from 3.1 with global env vars into an earlier version of Node-RED will lead to an unrecognised node warning - something to be aware of.
There is a long list of node fixes, doc updates and minor enhancements in the changelog.
One in particular I want to highlight is a long awaited fix for the MQTT nodes that would fail, in some circumstances, to reconnect to a broker if you did a Modified Flows/Nodes type of deploy.
We've also updated the label of the Join and Batch nodes to provide a bit more of a hint in how they are configured - to save you opening the edit dialog to check.
Check the full changelog to see what else has been happening.
Be sure to read through the Change Log to see what else is in there.
Installing the beta
If you want to try out the beta, you will need specify node-red@next when you use npm to update. Without the
@next you'll still get 3.0.x
So on a Pi you'd do:
sudo npm install -g --unsafe-perm node-red@next
If you hit any problems, please report them either as a reply on this topic, or in the #core-dev slack channel. Please do not post new topics to the forum regarding the beta as that could confuse users who are not using the beta.
This release is long overdue, but that doesn't mean we want to rush it out of the beta phase.
We don't have any other major features we want to get into the release, so at this point it will be case of responding to any issues or feedback the beta generates.