fix!(blocks): Rename Blockly.Blocks.* modules to Blockly.blocks.* (#5696)

Use Blockly.blocks.* for blocks modules, leaving the Blockly.Blocks
name for the block dictionary object.

This resolves a problem with advanced compilation of Blockly Games,
 where, in the compressed output, (the minified name of)
 Blockly.Blocks gets overwritten, with the dictionary object defined in
 core/blocks.js being replaced by an empty namespace object
 created by the provides of Blockly.Blocks.* in blocks/*.js. Without
 this fix, some block definitions end up being created in the
 dictionary and some on the namespace object—with chaos
 predictably ensuing.
This commit is contained in:
Christopher Allen
2021-11-08 18:35:38 +00:00
committed by GitHub
parent eca5ee26d7
commit beefe361a3
14 changed files with 39 additions and 28 deletions

View File

@@ -9,7 +9,7 @@
*/
'use strict';
goog.provide('Blockly.Blocks.math'); // Deprecated
goog.provide('Blockly.blocks.math');
goog.provide('Blockly.Constants.Math');
goog.require('Blockly');