forked from google/blockly
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Create renamings.js to collect renamed API entries (google#5426)
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.
- Loading branch information
Showing
1 changed file
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
/** | ||
* @license | ||
* Copyright 2021 Google LLC | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/** | ||
* @fileoverview Collected information about modules and module | ||
* exports that have been renamed between versions. | ||
* | ||
* For now this is a node module, not a goog.module. | ||
*/ | ||
'use strict'; | ||
|
||
/** | ||
* Map from Blockly core version number to table of renamings made | ||
* *since* that version was released (since we don't know for sure | ||
* what the version number of the release that will incorporate those | ||
* renamings will be yet). | ||
* @type {Object<string, ?>} | ||
*/ | ||
const renamings = { | ||
'4.20201217.0': { | ||
Blockly: { | ||
exports: { | ||
// bind/unbind events functions. See PR #4642 | ||
EventData: {module: 'Blockly.eventHandling', export: 'Data'}, | ||
bindEvent_: {module: 'Blockly.browserEvents', export: 'bind'}, | ||
unbindEvent_: {module: 'Blockly.browserEvents', export: 'unbind'}, | ||
bindEventWithChecks_: { | ||
module: 'Blockly.browserEvents', | ||
export: 'conditionalBind', | ||
}, | ||
}, | ||
} | ||
}, | ||
'6.20210701.0': { | ||
Blockly: { | ||
exports: { | ||
// Clipboard. See PR #5237. | ||
clipboardXml_: {module: 'Blockly.clipboard', export: 'xml'}, | ||
clipboardSource_: {module: 'Blockly.clipboard', export: 'source'}, | ||
clipboardTypeCounts_: { | ||
module: 'Blockly.clipboard', | ||
export: 'typeCounts', | ||
}, | ||
copy: {module: 'Blockly.clipboard'}, | ||
paste: {module: 'Blockly.clipboard'}, | ||
duplicate: {module: 'Blockly.clipboard'}, | ||
|
||
// mainWorkspace. See PR #5244. | ||
mainWorkspace: { | ||
module: 'Blockly.common', | ||
get: 'getMainWorkspace', | ||
set: 'setMainWorkspace', | ||
}, | ||
getMainWorkspace: {module: 'Blockly.common'}, | ||
|
||
// parentContainer, draggingConnections. See PR #5262. | ||
parentContainer: { | ||
module: 'Blockly.common', | ||
get: 'getParentContainer', | ||
set: 'setParentContainer', | ||
}, | ||
setParentContainer: {module: 'Blockly.common'}, | ||
draggingConnections: {module: 'Blockly.common'}, | ||
|
||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
exports.renamings = renamings; |