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

@@ -206,6 +206,17 @@ const renamings = {
},
},
},
'7.20211209.0-beta.0': {
'Blockly.Blocks.colour': {module: 'Blockly.blocks.colour'},
// Blockly.Blocks.lists not previously provided.
'Blockly.Blocks.logic': {module: 'Blockly.blocks.logic'},
'Blockly.Blocks.loops': {module: 'Blockly.blocks.loops'},
'Blockly.Blocks.math': {module: 'Blockly.blocks.math'},
'Blockly.Blocks.procedures': {module: 'Blockly.blocks.procedures'},
'Blockly.Blocks.texts': {module: 'Blockly.blocks.texts'},
'Blockly.Blocks.variables': {module: 'Blockly.blocks.variables'},
// Blockly.Blocks.variablesDynamic not previously provided.
}
};
exports.renamings = renamings;