Skip to content

Commit 3f61a49

Browse files
authored
Merge pull request #278 from node-red/300
Initial 3.0 release post
2 parents 44d0568 + 06c78af commit 3f61a49

File tree

11 files changed

+276
-0
lines changed

11 files changed

+276
-0
lines changed
Lines changed: 276 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,276 @@
1+
---
2+
layout: blog
3+
title: Version 3.0 released
4+
author: nick
5+
---
6+
7+
Node-RED 3.0 is now available to [install](https://npmjs.org/package/node-red). If upgrading, please read the [upgrade instructions](http://nodered.org/docs/getting-started/upgrading.html).
8+
9+
The [Change Log](https://github.com/node-red/node-red/blob/1b94cc3ac027bfc38a300867a0b0fd635bf273b8/CHANGELOG.md) has the full list of changes in this release, but here are the highlights.
10+
11+
---
12+
13+
<iframe width="560" height="315" src="https://www.youtube.com/embed/R9bV2MytHr0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
14+
15+
---
16+
- [Migrating from Node-RED 2.x](#migrating-from-node-red-2x)
17+
- [Editor Features](#editor-features)
18+
- [Context Menu](#context-menu)
19+
- [Junctions](#junctions)
20+
- [Debug Path Tooltip](#debug-path-tooltip)
21+
- [Continuous Search](#continuous-search)
22+
- [Default node names](#default-node-names)
23+
- [Monaco Text Editor](#monaco-text-editor)
24+
- [Remembering cursor position](#remembering-cursor-position)
25+
- [Accessing previous welcome tours](#accessing-previous-welcome-tours)
26+
- [Runtime Features](#runtime-features)
27+
- [Editing stopped flows](#editing-stopped-flows)
28+
- [Diagnostic Report](#diagnostic-report)
29+
- [Multiple static folders](#multiple-static-folders)
30+
- [Node updates](#node-updates)
31+
- [Dynamic Link Call node](#dynamic-link-call-node)
32+
- [Environment Variables in the Template node](#environment-variables-in-the-template-node)
33+
- [Debug node message count](#debug-node-message-count)
34+
- [Predefined HTTP Request headers](#predefined-http-request-headers)
35+
- [What's next?](#whats-next)
36+
37+
38+
## Migrating from Node-RED 2.x
39+
40+
Here are the key points you need to know when migrating to Node-RED 3.x.
41+
42+
- Node.js 14.x or later required
43+
- Internet Explorer no longer supported
44+
- Choose if you want to enable the [Stopping Flows](#editing-stopped-flows) feature
45+
- Choose if you want to *disable* the [Runtime Diagnostics](#diagnostic-report) feature
46+
- Choose if you want to switch to the [Monaco editor](#monaco-text-editor) (if you haven't already).
47+
48+
## Editor Features
49+
50+
### Context Menu
51+
52+
We have (finally) added a right-click context menu in the workspace. This gives
53+
you quick access to a lot of built-in actions in the editor and should help users
54+
discover more of the features available.
55+
56+
![](/blog/content/images/2022/07/context.png)
57+
58+
Picking what options should be in the menu hasn't been a simple task. There are
59+
a lot of things that could have been included - so we had to get the right balance
60+
between having the right options there and making it too long and hard to find.
61+
62+
### Junctions
63+
64+
We have introduced a new special node type called `junction` that can make it
65+
easier to route the wires in a flow.
66+
67+
Unlike the various 'no-op' nodes that have been published to the community to help
68+
achieve similar results, the Junctions are far more compact and less obtrusive
69+
in the flow.
70+
71+
When you hover over a Junction, it expands to show input and output ports. You can
72+
move the junction by dragging its body, or add a wire by click/dragging on one of
73+
its ports - just as you do with nodes.
74+
75+
![](/blog/content/images/2022/07/junctions.gif)
76+
77+
Junctions do not appear as regular nodes in the palette or flow outline, but can be
78+
added through the quick-add dialog (Ctrl-click in the workspace) or the new Context Menu.
79+
80+
![](/blog/content/images/2022/07/junction-quick-add.png)
81+
82+
You can also insert a Junction into an existing wire by slicing through it with the
83+
mouse by holding <kbd>alt-shift</kbd> when dragging across the wire. Note that some OS might
84+
use that same combination to move the active window, so this won't work there. We
85+
don't yet have a way to allow the mouse actions to be customised, so users affected
86+
by that would have to use the other methods to add Junctions.
87+
88+
89+
### Debug Path Tooltip
90+
91+
When hovering over a node name in the Debug sidebar, a new tooltip shows the full
92+
location of the node. This is useful when working with subflows, making it much
93+
easier to identify exactly which node generated the message.
94+
95+
Clicking on any item in the list will reveal it in the workspace.
96+
97+
![](/blog/content/images/2022/07/debug-tooltip.png)
98+
99+
### Continuous Search
100+
101+
When searching for things in the editor, a new toolbar in the workspace provides
102+
options to quickly jump between the search results.
103+
104+
![](/blog/content/images/2022/07/search.png)
105+
106+
We've added a pair of new actions to help navigate the results:
107+
108+
- `core:search-next` - shortcut: <kbd>f</kbd>
109+
- `core:search-previous` - shortcut: <kbd>shift-f</kbd>
110+
111+
We've also added some more predefined searches, including the ability to restrict
112+
the search to the current flow.
113+
114+
![](/blog/content/images/2022/07/search-options.png)
115+
116+
### Default node names
117+
118+
The `Debug`, `Function` and `Link` nodes are now given unique default names when
119+
they are added to the workspace.
120+
121+
![](/blog/content/images/2022/07/node-names.gif)
122+
123+
This capability could be added to any node, including contrib nodes, via their
124+
`onadd` function. We chose just this initial set as they were the ones that would
125+
most benefit from having a name applied.
126+
127+
A new action has also been added that will apply an appropriate default name to
128+
any selected nodes that don't currently have a name:
129+
130+
- `core:generate-node-names`
131+
132+
### Monaco Text Editor
133+
134+
We added the `monaco` editor component as an alternative to the default `ace`
135+
editor a year ago in the 2.x release. It has proven to be very stable and provides
136+
a much richer user experience.
137+
138+
With 3.0, we have switched over to monaco as the default editor. New installs of
139+
Node-RED will pickup the change - existing installs will need to update (or remove) the
140+
`codeEditor` entry in their settings file.
141+
142+
The ultimate goal will be to remove `ace` entirely in the 4.0 release next year.
143+
144+
### Remembering cursor position
145+
146+
The editor now tries to restore your cursor position when you reopen a node's
147+
edit dialog. This is super handy with the Function node, amongst others, where
148+
you don't want to have to scroll back to where you were working each time you
149+
open the edit dialog.
150+
151+
152+
### Accessing previous welcome tours
153+
154+
We introduced the Welcome Tour back in 2.1.0 and it has been updated for each
155+
release. With this release, we've added a way to access the tours of the previous
156+
releases in the Help sidebar:
157+
158+
![](/blog/content/images/2022/07/tours.png)
159+
160+
## Runtime Features
161+
162+
### Editing stopped flows
163+
164+
We've introduced the **optional** ability to run Node-RED without the flows
165+
themselves running. We already had Safe Mode that achieved a similar result, but
166+
with this new feature, you can stop and start the flows directly from the editor.
167+
The runtime will remember the state of the flows so when Node-RED starts up, the
168+
flows will stay in the same started/stopped state.
169+
170+
This feature is **not enabled by default**. To enable it, you need to add the
171+
following to your `settings.js` file:
172+
173+
```
174+
runtimeState: {
175+
enabled: true,
176+
ui: true
177+
}
178+
```
179+
180+
With that set, you get a new option in the Deploy menu:
181+
182+
![](/blog/content/images/2022/07/deploy-stop.png)
183+
184+
Clicking that option will stop the flows running, but you can continue editing
185+
them and deploy changes. Whilst stopped, the Inject/Debug node buttons will be
186+
disabled.
187+
188+
When the flows are stopped, the menu shows a start option instead:
189+
190+
![](/blog/content/images/2022/07/deploy-start.png)
191+
192+
### Diagnostic Report
193+
194+
We've added a new admin endpoint that returns information about the runtime and
195+
the system its running on. This can be used to quickly gather information when
196+
reporting an issue.
197+
198+
Within the editor you can see the information it returns by running the 'Show System Info'
199+
action.
200+
201+
We have taken care to ensure this does not return anything sensitive. In some cases
202+
it will indicate if a particular setting is set, but not what value it has been
203+
set to.
204+
205+
We realise that not everyone will want to have this exposed depending on how
206+
they use Node-RED. For that reason, the endpoint can be disabled by adding the
207+
following to `settings.js`:
208+
209+
```
210+
diagnostics: {
211+
enabled: false
212+
}
213+
```
214+
215+
216+
### Multiple static folders
217+
218+
The runtime has long-supported the ability to serve a folder of static content
219+
as part of its HTTP handling. Useful for providing static resources to webpages
220+
and the like.
221+
222+
With this release you can now specify multiple folders to serve from and, more
223+
importantly, to specify the http path each folder should be served from.
224+
225+
See [#3542](https://github.com/node-red/node-red/pull/3542) for details on how it
226+
can be used.
227+
228+
## Node updates
229+
230+
### Dynamic Link Call node
231+
232+
We added the Link Call node in Node-RED 2.1. It lets you create a flow that calls
233+
out to a Link In node and get a response back. The main limitation was you had
234+
to hardcode what Link In node you wanted it to call.
235+
236+
With this release you can now use `msg.target` to set the name of the Link In node
237+
it should call.
238+
239+
### Environment Variables in the Template node
240+
241+
The Template node can now access environment variables using the syntax:
242+
243+
```
244+
My favourite colour is {{env.COLOUR}}.
245+
```
246+
247+
### Debug node message count
248+
249+
The Debug node has a new option to report how many messages it has received in its
250+
status output.
251+
252+
### Predefined HTTP Request headers
253+
254+
The HTTP Request node now allows you to set request headers in the node's edit
255+
dialog - rather than having to always pass them in as message properties.
256+
257+
258+
## What's next?
259+
260+
As happened with 2.0, we've overrun our plan for getting 3.0 released in April. But
261+
the series of beta releases we have been doing have really helped improve the overall
262+
quality of this release.
263+
264+
The main challenge has always been getting enough time and attention dedicated
265+
to keep the release cadence going.
266+
267+
Our next scheduled main release will be 3.1 in late October/November. As ever,
268+
we have a healthy backlog of items to keep us busy - but ultimately it depends
269+
very much on the feedback from the community.
270+
271+
If you're interested in contributing to Node-RED, now is a good time to come over
272+
and chat with us in either the [forum](https://discourse.nodered.org) or [slack](https://nodered.org/slack).
273+
274+
Node-Red 2.x is now in maintenance mode - we won't be added any new features to it,
275+
but we will do maintenance releases with fixes as needed. In fact, we'll have a
276+
long overdue 2.2.3 release in the next couple of weeks.
26 KB
Loading
26.9 KB
Loading
4.19 KB
Loading
51.8 KB
Loading
26.3 KB
Loading
128 KB
Loading
36.8 KB
Loading
54.9 KB
Loading
2.97 KB
Loading

0 commit comments

Comments
 (0)