Migrate core/utils/deprecation.js to goog.module

This commit is contained in:
kozbial
2021-07-13 18:12:10 -07:00
committed by Monica Kozbial
parent cd4831537e
commit 2bf717019f
2 changed files with 6 additions and 3 deletions

View File

@@ -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};

View File

@@ -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'], []);