Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Node-RED 2.1 & Beyond

Node-RED 2.1 & Beyond

My talk from Node-RED Con 2021, looking at what the project has achieved in 2021, what was in the new 2.1 release and what priorities we have moving forward.

Nick O'Leary

October 26, 2021
Tweet

More Decks by Nick O'Leary

Other Decks in Programming

Transcript

  1. @knolleary • Monaco Text Editor (optional) • Function node external

    module handling • Inject node ‘quick inject’ button • node-red admin init command • Dropped support for Node 8.x and 10.x • HTTP Request node reimplemented with got module • HTML node - major version change of underlying Cheerio module • Major version updates of lots of internal modules - without any external changes Node-RED 2.0
  2. @knolleary request module • Deprecated in Feb 2020 • Still

    being downloaded 23m times a week 18 months later • Generates warnings when npm installed that causes uncertainty for our users
  3. @knolleary • Actively maintained and well adopted module • Opinionated

    API design which made migration harder • Missing some built-in functionality of request got module
  4. @knolleary • Monaco Text Editor (optional) • Function node external

    module handling • Inject node ‘quick inject’ button • node-red admin init command • Dropped support for Node 8.x and 10.x • HTTP Request node reimplemented with got module • HTML node - major version change of underlying Cheerio module • Major version updates of lots of internal modules - without any external changes Node-RED 2.0
  5. @knolleary Node-RED Flow Debugger • Set breakpoints on node ports

    • Pause runtime or individual nodes when triggered • Show queued messages • Allow step-by-step execution of the flow npm install node-red-debugger
  6. @knolleary RED.hooks API • Hooks API lets plugins add custom

    code to the message path at certain key points • Also available for the Node Install path - useful for integrating build tools like electron-build
  7. @knolleary Node-RED Flow Linter • Checks the flow for potential

    problems • Rule can be customised to personal preference • New rules can be added via additional plugins • Runs on the command-line or integrated in the editor npm install nrlint
  8. @knolleary • Simply way to package and share custom Node-RED

    editor themes • Install a theme plugin then make a one-line change in your settings file to enabled it • Some great community-created themes available Node-RED Theme Plugins npm install @node-red-contrib-themes/theme-collection
  9. @knolleary • Add new library sources to the Import/Export dialog

    • Use the File Store plugin to create additional libraries on the local file-system • Combine with a file-sharing utility, such as Dropbox, and create an easy way to share flows with teammates. Node-RED Library Store Plugins npm install @node-red/library-file-store
  10. @knolleary node-red Auth Plugins • node-red-auth-twitter • node-red-auth-github Node Collections

    • node-red-nodes (74 nodes) • node-red-web-nodes (18 nodes) • node-red-ui-nodes (8 nodes) • node-red-dashboard • node-red-node-swagger CLI Tools • node-red-admin • node-red-nodegen • node-red-dev-cli Context Stores • node-red-context-redis • node-red-context-pouchdb Web Sites • flow-library • node-red.github.io • cookbook.nodered.org • i18n-viewer Packaging • node-red-docker • linux-installers Others • designs • nr-monaco-build • node-red-node-test-helper • flow-parser • jsdoc-nr-template Plugins • node-red-debugger • nrlint • node-red-flow-tester • node-red-library-file-store
  11. @knolleary • Still being developed - not for general use

    yet • Runs a series of checks against a node - either locally or on npm - to ensure it follows best practices • Looks at package and node naming, licensing, git repository (if provided), example flows and more • Provides a report back - either as text or JSON • Will generate a scorecard for use on flows.nodered.org node-red-dev CLI for node developers coming soon
  12. @knolleary • Create tests for your flows within the editor

    • Testing Sidebar lets you define test suites and test cases • Individual node behaviour can then be customised per-test case, letting you simulate different behaviours - for example, faking the response of an HTTP Request to test edge cases • Run tests from the sidebar, or on the command-line Node-RED Flow Testing Framework coming soon-ish Initial design sketches from January 2020