diff --git a/core/utils/deprecation.js b/core/utils/deprecation.js index b849c2a1a..a361f563d 100644 --- a/core/utils/deprecation.js +++ b/core/utils/deprecation.js @@ -15,7 +15,8 @@ * @name Blockly.utils.deprecation * @namespace */ -goog.provide('Blockly.utils.deprecation'); +goog.module('Blockly.utils.deprecation'); +goog.module.declareLegacyNamespace(); /** @@ -29,7 +30,7 @@ goog.provide('Blockly.utils.deprecation'); * if any. * @package */ -Blockly.utils.deprecation.warn = function( +const warn = function( name, deprecationDate, deletionDate, opt_use) { let msg = name + ' was deprecated on ' + deprecationDate + ' and will be deleted on ' + deletionDate + '.'; @@ -38,3 +39,5 @@ Blockly.utils.deprecation.warn = function( } console.warn(msg); }; + +exports = {warn}; diff --git a/tests/deps.js b/tests/deps.js index 45860bd0c..daed787d5 100644 --- a/tests/deps.js +++ b/tests/deps.js @@ -172,7 +172,7 @@ goog.addDependency('../../core/utils.js', ['Blockly.utils'], ['Blockly.Msg', 'Bl goog.addDependency('../../core/utils/aria.js', ['Blockly.utils.aria'], []); goog.addDependency('../../core/utils/colour.js', ['Blockly.utils.colour'], []); goog.addDependency('../../core/utils/coordinate.js', ['Blockly.utils.Coordinate'], []); -goog.addDependency('../../core/utils/deprecation.js', ['Blockly.utils.deprecation'], []); +goog.addDependency('../../core/utils/deprecation.js', ['Blockly.utils.deprecation'], [], {'lang': 'es6', 'module': 'goog'}); goog.addDependency('../../core/utils/dom.js', ['Blockly.utils.dom'], ['Blockly.utils.Svg', 'Blockly.utils.userAgent']); goog.addDependency('../../core/utils/global.js', ['Blockly.utils.global'], []); goog.addDependency('../../core/utils/idgenerator.js', ['Blockly.utils.IdGenerator'], []);