|
| 1 | +--- |
| 2 | +layout: blog |
| 3 | +title: Version 0.19 released |
| 4 | +author: nick |
| 5 | +--- |
| 6 | + |
| 7 | +Node-RED 0.19 is now available to [download](https://github.com/node-red/node-red/releases/download/0.19.0/node-red-0.19.0.zip) or [npm install](https://npmjs.org/package/node-red). |
| 8 | + |
| 9 | +If upgrading, please read the [upgrade instructions](http://nodered.org/docs/getting-started/upgrading.html). |
| 10 | + |
| 11 | +For the Raspberry Pi users, please see the [Raspberry Pi documentation](https://nodered.org/docs/hardware/raspberrypi#upgrading) |
| 12 | +for how to upgrade if you are still on the pre-installed version. |
| 13 | + |
| 14 | +--- |
| 15 | + |
| 16 | +<iframe width="560" height="315" src="https://www.youtube.com/embed/_G_lCXoABO0?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe> |
| 17 | + |
| 18 | +--- |
| 19 | + |
| 20 | +### Node.js version support |
| 21 | + |
| 22 | +Node.js 4 reached its end-of-life back in April and is no longer receiving fixes |
| 23 | +of any sort. The current Node.js LTS release is 8.x with 10.x coming in October. |
| 24 | + |
| 25 | +As the node ecosystem continues to move forward we are seeing an increasing number |
| 26 | +of modules we depend on dropping support for older node.js versions. |
| 27 | + |
| 28 | +We are taking this opportunity to announce that this will be the **last release** |
| 29 | +of Node-RED that supports anything **earlier than Node 8.x**. |
| 30 | + |
| 31 | +As we approach Node-RED 1.0 we will establish our own LTS policy that aligns as |
| 32 | +closely as possible with the [Node.JS schedule](https://github.com/nodejs/Release). |
| 33 | + |
| 34 | +### Persistent Context |
| 35 | + |
| 36 | +This release brings the next step on our roadmap to 1.0; the ability to store |
| 37 | +context data outside of the runtime. |
| 38 | + |
| 39 | +Context data is state held within a flow outside of the individual messages flowing |
| 40 | +through it. Previously, this data was only held in memory, so would be lost whenever |
| 41 | +the runtime restarted. |
| 42 | + |
| 43 | +With 0.19, this state can now be held outside of the runtime. The runtime provides |
| 44 | +a new API for creating context stores and 0.19 provides two implementations ready to use. |
| 45 | + |
| 46 | +The default store remains an in-memory store - so nothing will change for existing flows. |
| 47 | +The second implementation provided is a file-based store - where the context data gets |
| 48 | +written to files under your user directory. |
| 49 | + |
| 50 | +It also supports having more than one store configured in the runtime, so you can choose |
| 51 | +where each piece of context data is stored. For example, you may want a non-persistent |
| 52 | +store for some values and a persistent store for others. |
| 53 | + |
| 54 | +In time we plan to have other implementations available, such as for Redis, to allow |
| 55 | +a more scalable approach when running at scale. |
| 56 | + |
| 57 | +Documentation on the how to enable the new context features is available [here](https://nodered.org/docs/user-guide/context). |
| 58 | + |
| 59 | +#### Context browser |
| 60 | + |
| 61 | +<div style="float: right; width: 200px; margin-left: 10px"> |
| 62 | +<img src="/blog/content/images/2018/08/editor-sidebar-context.png" /> |
| 63 | +</div> |
| 64 | + |
| 65 | +To compliment the new persistent context feature, we've added a new sidebar that allows |
| 66 | +you to view context data within the editor. Inspired by the existing [node-red-contrib-contextbrowser](https://flows.nodered.org/node/node-red-contrib-contextbrowser) |
| 67 | +plugin, the new sidebar has been built around the new underlying context apis and |
| 68 | +fully supports multiple context stores. |
| 69 | + |
| 70 | +As with the Debug sidebar, if you hover over any value a <i style="font-size: 0.8em; border-radius: 2px; display:inline-block;text-align:center; width: 20px; color: #777; border: 1px solid #777; padding: 3px;" class="fa fa-clipboard"></i> button appears to copy |
| 71 | +that value to your clipboard. Note that only values that can be JSON-encoded can |
| 72 | +be copied. |
| 73 | + |
| 74 | + |
| 75 | +<br style="clear:both;" /> |
| 76 | + |
| 77 | + |
| 78 | +### Editor updates |
| 79 | + |
| 80 | +#### Redesigned Sidebar tabs |
| 81 | + |
| 82 | +With the new context sidebar, it was time to redesign how the sidebar tabs were |
| 83 | +displayed as they were getting squashed. |
| 84 | + |
| 85 | +The tabs now collapse down to just an icon for the tab, with a drop-down to select |
| 86 | +any tabs not currently visible. |
| 87 | + |
| 88 | + |
| 89 | + |
| 90 | +#### Changing node icons |
| 91 | + |
| 92 | +It is now possible to customise the icon of any node in your flow. This can help |
| 93 | +distinguish between multiple nodes of the same type that perform different roles. |
| 94 | + |
| 95 | + |
| 96 | + |
| 97 | +The icon option is on the 'node settings' section of each node's edit dialog. It |
| 98 | +allows you to browse and pick from all of the available icons. Note we do not |
| 99 | +yet support using the Font Awesome icons for the node. |
| 100 | + |
| 101 | +#### Changing subflow category |
| 102 | + |
| 103 | +You can also now choose what palette category a subflow appears in. This makes |
| 104 | +it easier to organise your subflows rather than having them all in a single |
| 105 | +category at the top of the palette. |
| 106 | + |
| 107 | +#### Flow navigator widget |
| 108 | + |
| 109 | +We've added a flow navigator widget in the footer of the main workspace that can |
| 110 | +be enabled with the new <i style="font-size: 0.8em; border-radius: 2px; display:inline-block;text-align:center; width: 20px; color: #777; border: 1px solid #777; padding: 3px;" class="fa fa-map-o"></i> button. This |
| 111 | +gives you a scaled down view of the entire workspace, and shows you which bit |
| 112 | +you are currently looking at. You can drag the view around to quickly reach |
| 113 | +any corner of the workspace and should make it easier to find the odd nodes you |
| 114 | +had dragged to the furthers corners and forgotten about. |
| 115 | + |
| 116 | + |
| 117 | + |
| 118 | + |
| 119 | +### Better handling of environment variables |
| 120 | + |
| 121 | +It is now possible to access environment variables directly within a flow. |
| 122 | + |
| 123 | +The Inject, Switch and Change nodes have all been updated to add the 'env variable' |
| 124 | +option to the standard TypedInput widget: |
| 125 | + |
| 126 | + |
| 127 | + |
| 128 | +We've also added the `$env()` function to the JSONata expression language to allow |
| 129 | +environment variables to be accessed from within an expression. |
| 130 | + |
| 131 | + |
| 132 | +### Node Updates |
| 133 | + |
| 134 | + - the `File Out` node now has an output so a flow can continue once the file has been written. |
| 135 | + - the `Function` node can now access its own `id` and `name` properties. The documentation |
| 136 | + has been updated with a full [reference](/docs/writing-functions#api-reference) of the |
| 137 | + available objects and functions. The node's JavaScript editor can now also be expanded |
| 138 | + to a larger editor view. |
| 139 | + - the `JSON` node can do schema validation if the message it receives has `msg.schema` property. |
| 140 | + - the Pi-specific GPIO nodes are now available on all platforms - however they |
| 141 | + only do something when running on a Pi. This makes it easier to view/edit flows |
| 142 | + on your laptop that are destined for a Pi. |
| 143 | + - the `Switch` node has a new 'isEmpty' rule. It matches on Strings, Arrays and Buffers |
| 144 | + that are empty. There is also the corresponding 'isNotEmpty' rule. |
| 145 | + - the common `TLS` node now accepts the `servername` config option - necessary when using SNI. |
0 commit comments