From abd3d752f521a6fad712f1598abcd75d078873d5 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Mon, 22 Sep 2014 15:57:16 +0100 Subject: [PATCH] Add deprecation warnings to nodes --- nodes/core/deprecated/61-imap.js | 1 + nodes/core/deprecated/73-parsexml.js | 1 + nodes/core/deprecated/74-js2xml.js | 1 + nodes/core/deprecated/90-httpget.js | 1 + 4 files changed, 4 insertions(+) diff --git a/nodes/core/deprecated/61-imap.js b/nodes/core/deprecated/61-imap.js index cc636513a..aa2b4bebf 100644 --- a/nodes/core/deprecated/61-imap.js +++ b/nodes/core/deprecated/61-imap.js @@ -41,6 +41,7 @@ if (emailkey) { function ImapNode(n) { RED.nodes.createNode(this,n); + this.warn("This node has been deprecated and will be deleted in a future release. Please update your flow to use the 'e-mail in' node."); this.name = n.name; this.repeat = n.repeat * 1000 || 300000; var node = this; diff --git a/nodes/core/deprecated/73-parsexml.js b/nodes/core/deprecated/73-parsexml.js index e2fed3396..92850cb63 100644 --- a/nodes/core/deprecated/73-parsexml.js +++ b/nodes/core/deprecated/73-parsexml.js @@ -23,6 +23,7 @@ module.exports = function(RED) { function Xml2jsNode(n) { RED.nodes.createNode(this,n); + this.warn("This node has been deprecated and will be deleted in a future release. Please update your flow to use the 'xml' node."); this.useEyes = n.useEyes||false; var node = this; this.on("input", function(msg) { diff --git a/nodes/core/deprecated/74-js2xml.js b/nodes/core/deprecated/74-js2xml.js index e93120c3d..164bafadc 100644 --- a/nodes/core/deprecated/74-js2xml.js +++ b/nodes/core/deprecated/74-js2xml.js @@ -20,6 +20,7 @@ module.exports = function(RED) { function Js2XmlNode(n) { RED.nodes.createNode(this,n); + this.warn("This node has been deprecated and will be deleted in a future release. Please update your flow to use the 'xml' node."); this.root = n.root; var node = this; diff --git a/nodes/core/deprecated/90-httpget.js b/nodes/core/deprecated/90-httpget.js index 1415bb7c6..63e16b93f 100644 --- a/nodes/core/deprecated/90-httpget.js +++ b/nodes/core/deprecated/90-httpget.js @@ -18,6 +18,7 @@ var RED = require(process.env.NODE_RED_HOME+"/red/red"); function HttpGet(n) { RED.nodes.createNode(this,n); + this.warn("This node has been deprecated and will be deleted in a future release. Please update your flow to use the 'http request' node."); this.baseurl = n.baseurl || ""; this.append = n.append || ""; var node = this;