* Renamed Blockly.connectionTypes to Blockly.ConnectionType
* Renamed core/connection_types.js to connection_type.js
* Add entry to renamings.js for renaming of Blockly.connectionTypes
Co-authored-by: Christopher Allen <cpcallen+git@google.com>
* Add getSelected/setSelected to core/common.js
* Migrate core to use Blockly.common.getSelected/setSelected instead of Blockly.selected
* Migrate demos to use Blockly.common.getSelected/setSelected instead of Blockly.selected
* Remove Blockly.selected
* Use variable instead of calling common.getSelected() multiple times
* Add accessor for selected on Blockly
* Add renaming record for Blockly.selected -> Blockly.common.getSelected/setSelected
* Use Object.defineProperties instead of .defineProperty when
installing get and set accessors for previously-mutable exports.
* Add entries to renamings.js where feasible (i.e., for static rather
than instance properties).
(Don't do blockly.js yet, to avoid merge conflicts.)
This is part of #5153 but is being prioritised because we want remove
the declareLegacyNamespace calls from the core/utils/*.js modules and
then reexport them explicitly via utils.js, and it turns out that
doing so results in the exports object of this module being passed to
Object.freeze - which fails on the global object, which can't be made
non-extensible!
The new name chosen for the former default export is globalThis, since
it is intended to have the same value as the global variable of that
name; see:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis
Create a file scripts/migration/renamings.js to collect information about renamed API entries. Start by filling it with the renamings already done to blockly.js.