|
| 1 | +--- |
| 2 | +layout: blog |
| 3 | +title: Version 1.2 released |
| 4 | +author: nick |
| 5 | +--- |
| 6 | + |
| 7 | +Node-RED 1.2 is now available to [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 | +--- |
| 12 | + |
| 13 | +<iframe width="560" height="315" src="https://www.youtube.com/embed/rnM5sfb2qoY" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> |
| 14 | + |
| 15 | +--- |
| 16 | +- [Editor Updates](#editor-updates) |
| 17 | + - [Importing duplicate nodes](#importing-duplicate-nodes) |
| 18 | + - [Simplified Git Workflow](#simplified-git-workflow) |
| 19 | + - [Handling 'lost' nodes](#handling-lost-nodes) |
| 20 | + - [Other editor features](#other-editor-features) |
| 21 | +- [Runtime features](#runtime-features) |
| 22 | + - [Splitting `.config.json` into multiple files](#splitting-configjson-into-multiple-files) |
| 23 | + - [Introducing `RED.hooks` api](#introducing-redhooks-api) |
| 24 | +- [Node updates](#node-updates) |
| 25 | + |
| 26 | + |
| 27 | +## Editor Updates |
| 28 | + |
| 29 | +### Importing duplicate nodes |
| 30 | + |
| 31 | +In previous releases, when you import a flow, all of its nodes are assigned new |
| 32 | +identifiers. This meant that if you imported the flow again, you'd get a second |
| 33 | +copy. If that flow included configuration nodes or subflows that were identical |
| 34 | +to ones you already had, the editor would avoid importing a duplicate copy and |
| 35 | +reuse the existing one. |
| 36 | + |
| 37 | +That has generally worked well, but on some occasions it wasn't ideal. In particular, |
| 38 | +if you wanted to import an *update* to a subflow you are using, there was no easy |
| 39 | +way to do it - it would be imported as a new subflow and you'd have to manually |
| 40 | +update all the instances to the new subflow. |
| 41 | + |
| 42 | +With this release, when you import a flow that contains nodes you already have, |
| 43 | +the editor will now ask you what to do. In the case of Subflows and Configuration |
| 44 | +nodes, it gives you the option of *replacing* the instances you already have, |
| 45 | +rather than importing a copy. |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | +[More details](https://github.com/node-red/node-red/pull/2698) |
| 50 | + |
| 51 | +### Simplified Git Workflow |
| 52 | + |
| 53 | +The projects feature now provides an option for a simplified git workflow. The |
| 54 | +option, under User Settings, lets you enable an 'automatic' mode where changes |
| 55 | +will be automatically committed with every deploy. |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | +[More details](https://github.com/node-red/node-red/pull/2035) |
| 60 | + |
| 61 | +Other project enhancements include: |
| 62 | + - the project settings dialog also now lets you edit the project's version string. |
| 63 | + - the `flowFilePretty` option is now automatically enabled for projects unless explicitly set to `false` |
| 64 | + |
| 65 | +### Handling 'lost' nodes |
| 66 | + |
| 67 | +We've seen a very small number of instances where a node forgets what tab it is |
| 68 | +on and its `z` property is set to `0` or `""` - causing the node to disappear |
| 69 | +from the editor. We've never managed to recreate this issue to get to the bottom |
| 70 | +of it - something to do with deleting flows. But with this release, the editor |
| 71 | +will now help recover those lost nodes by added a 'recovery' tab to add them to. |
| 72 | + |
| 73 | +[More details](https://github.com/node-red/node-red/pull/2691) |
| 74 | + |
| 75 | +### Other editor features |
| 76 | + |
| 77 | + - Sidebar tabs can now be reordered ([details](https://github.com/node-red/node-red/pull/2655)) |
| 78 | + - The palette manager has an option to upload a node module tgz file rather than install from the catalog. This can be disabled in the settings. ([details](https://github.com/node-red/node-red/pull/2682)) |
| 79 | + - The ACE edit component has been updated to the latest version which brings much better support for ES6 JavaScript syntax |
| 80 | + - Fixes issues around copy/paste of nodes within groups causing lockups. |
| 81 | + - When merging groups, the style options of the first selected group is used for the combined group. |
| 82 | + |
| 83 | +## Runtime features |
| 84 | + |
| 85 | +### Splitting `.config.json` into multiple files |
| 86 | + |
| 87 | +The runtime settings file, `.config.json` has been split in to four separate |
| 88 | +files to better organise the content and allow the user to be more selective over |
| 89 | +what they version control. |
| 90 | + |
| 91 | +**If you have a backup script that includes `.config.json` you will need to update |
| 92 | +it to backup these other files instead**. |
| 93 | + |
| 94 | +The runtime will leave the existing `.config.json` in place in case you chose to |
| 95 | +downgrade, but it will no longer be updated. |
| 96 | + |
| 97 | +[More details](https://github.com/node-red/node-red/pull/2704) |
| 98 | + |
| 99 | +### Introducing `RED.hooks` api |
| 100 | + |
| 101 | +This is part of the pluggable message routing work that has been in our roadmap |
| 102 | +for a long time now. It is less relevant to end users at this point in time, |
| 103 | +but will underpin a lot of exciting features in the future, such as a proper |
| 104 | +flow debugger, distributed node-red runtimes and integrated flow testing. |
| 105 | + |
| 106 | +[More details](https://github.com/node-red/node-red/pull/2665) |
| 107 | + |
| 108 | +## Node Features |
| 109 | + |
| 110 | + - The Trigger node can now be configured to set its delay/repeat-interval by `msg.delay` |
| 111 | + - The Function node's "setup" code can now log and send messages ([details](https://github.com/node-red/node-red/pull/2644)) |
| 112 | + - More of the core nodes now implement the 'done' api so can be used with the Complete node - yaml, xml, json, html, http, template, range, link, status, catch , complete, inject. Work continues on the remaining nodes. |
0 commit comments