From 81ab2fe4973787de97bac5bf08ed14c1373e2e49 Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Thu, 20 May 2021 19:57:50 +0200 Subject: [PATCH] Remove loud deprecation warning for use of deprecation flag in package (#11442) * Remove loud deprecation warning for use of deprecation flag in package * Add history for http@1.4.4 --- History.md | 3 +++ packages/deprecated/http/httpcall_common.js | 9 --------- packages/deprecated/http/package.js | 6 +++--- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/History.md b/History.md index 0b69a9978c..b6c570eda9 100644 --- a/History.md +++ b/History.md @@ -14,6 +14,9 @@ * Released `id-map@1.1.1` removing unused dependencies and modernizing the code +* `http@1.4.4` + - Used the new deprecation package flag instead of loud console warning. + ## v2.2, 2021-04-15 #### Highlights diff --git a/packages/deprecated/http/httpcall_common.js b/packages/deprecated/http/httpcall_common.js index 2114b92257..c8462eb56b 100644 --- a/packages/deprecated/http/httpcall_common.js +++ b/packages/deprecated/http/httpcall_common.js @@ -1,10 +1,6 @@ var MAX_LENGTH = 500; // if you change this, also change the appropriate test var slice = Array.prototype.slice; -var deprecationMessage = function() { - Log.debug('The http package has been deprecated, please migrate to the fetch package and new web standards.'); -}; - exports.makeErrorByStatus = function(statusCode, content) { var message = "failed [" + statusCode + "]"; @@ -56,7 +52,6 @@ var HTTP = exports.HTTP = {}; * @deprecated */ HTTP.get = function (/* varargs */) { - deprecationMessage(); return HTTP.call.apply(this, ["GET"].concat(slice.call(arguments))); }; @@ -69,7 +64,6 @@ HTTP.get = function (/* varargs */) { * @deprecated */ HTTP.post = function (/* varargs */) { - deprecationMessage(); return HTTP.call.apply(this, ["POST"].concat(slice.call(arguments))); }; @@ -82,7 +76,6 @@ HTTP.post = function (/* varargs */) { * @deprecated */ HTTP.put = function (/* varargs */) { - deprecationMessage(); return HTTP.call.apply(this, ["PUT"].concat(slice.call(arguments))); }; @@ -95,7 +88,6 @@ HTTP.put = function (/* varargs */) { * @deprecated */ HTTP.del = function (/* varargs */) { - deprecationMessage(); return HTTP.call.apply(this, ["DELETE"].concat(slice.call(arguments))); }; @@ -108,6 +100,5 @@ HTTP.del = function (/* varargs */) { * @deprecated */ HTTP.patch = function (/* varargs */) { - deprecationMessage(); return HTTP.call.apply(this, ["PATCH"].concat(slice.call(arguments))); }; diff --git a/packages/deprecated/http/package.js b/packages/deprecated/http/package.js index fa72508abf..a1e4035474 100644 --- a/packages/deprecated/http/package.js +++ b/packages/deprecated/http/package.js @@ -1,6 +1,7 @@ Package.describe({ summary: "Make HTTP calls to remote servers", - version: '1.4.3' + version: '1.4.4', + deprecated: 'Please use fetch' }); Npm.depends({ @@ -14,8 +15,7 @@ Package.onUse(function (api) { // This package intentionally does not depend on ecmascript, so that // ecmascript and its dependencies can depend on http without creating // package dependency cycles. - 'modules', - 'logging' // For deprecation message + 'modules' ]); api.mainModule('httpcall_client.js', 'client');