Skip to content

Commit

Permalink
chore: Remove declareLegacyNamespace from serialization folder (#5757)
Browse files Browse the repository at this point in the history
  • Loading branch information
alschmiedt authored Dec 2, 2021
1 parent da16a66 commit 5515afc
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 13 deletions.
16 changes: 16 additions & 0 deletions core/blockly.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ const geras = goog.require('Blockly.geras');
const internalConstants = goog.require('Blockly.internalConstants');
const minimalist = goog.require('Blockly.minimalist');
const registry = goog.require('Blockly.registry');
const serializationBlocks = goog.require('Blockly.serialization.blocks');
const serializationExceptions = goog.require('Blockly.serialization.exceptions');
const serializationPriorities = goog.require('Blockly.serialization.priorities');
const serializationRegistry = goog.require('Blockly.serialization.registry');
const serializationVariables = goog.require('Blockly.serialization.variables');
const serializationWorkspaces = goog.require('Blockly.serialization.workspaces');
const svgMath = goog.require('Blockly.utils.svgMath');
const thrasos = goog.require('Blockly.thrasos');
const toolbox = goog.require('Blockly.utils.toolbox');
Expand Down Expand Up @@ -118,6 +124,7 @@ const {IRegistrableField} = goog.require('Blockly.IRegistrableField');
const {IRegistrable} = goog.require('Blockly.IRegistrable');
const {ISelectableToolboxItem} = goog.require('Blockly.ISelectableToolboxItem');
const {ISelectable} = goog.require('Blockly.ISelectable');
const {ISerializer} = goog.require('Blockly.serialization.ISerializer');
const {IStyleable} = goog.require('Blockly.IStyleable');
const {IToolboxItem} = goog.require('Blockly.IToolboxItem');
const {IToolbox} = goog.require('Blockly.IToolbox');
Expand Down Expand Up @@ -708,6 +715,15 @@ exports.inject = inject;
exports.inputTypes = inputTypes;
exports.minimalist = minimalist;
exports.registry = registry;
exports.serialization = {
blocks: serializationBlocks,
exceptions: serializationExceptions,
priorities: serializationPriorities,
registry: serializationRegistry,
variables: serializationVariables,
workspaces: serializationWorkspaces,
ISerializer: ISerializer,
};
exports.thrasos = thrasos;
exports.uiPosition = uiPosition;
exports.utils = utils;
Expand Down
1 change: 0 additions & 1 deletion core/interfaces/i_serializer.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
* @namespace Blockly.serialization.ISerializer
*/
goog.module('Blockly.serialization.ISerializer');
goog.module.declareLegacyNamespace();

// eslint-disable-next-line no-unused-vars
const {Workspace} = goog.requireType('Blockly.Workspace');
Expand Down
1 change: 0 additions & 1 deletion core/serialization/blocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
* @namespace Blockly.serialization.blocks
*/
goog.module('Blockly.serialization.blocks');
goog.module.declareLegacyNamespace();

const Xml = goog.require('Blockly.Xml');
const eventUtils = goog.require('Blockly.Events.utils');
Expand Down
2 changes: 1 addition & 1 deletion core/serialization/exceptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
* @namespace Blockly.serialization.exceptions
*/
goog.module('Blockly.serialization.exceptions');
goog.module.declareLegacyNamespace();

/* eslint-disable-next-line no-unused-vars */
const {Block} = goog.requireType('Blockly.Block');
// eslint-disable-next-line no-unused-vars
const {State} = goog.requireType('Blockly.serialization.blocks');


/**
* @alias Blockly.serialization.exceptions.DeserializationError
*/
Expand Down
1 change: 0 additions & 1 deletion core/serialization/priorities.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
* @namespace Blockly.serialization.priorities
*/
goog.module('Blockly.serialization.priorities');
goog.module.declareLegacyNamespace();


/**
Expand Down
2 changes: 0 additions & 2 deletions core/serialization/registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* @namespace Blockly.serialization.registry
*/
goog.module('Blockly.serialization.registry');
goog.module.declareLegacyNamespace();


const registry = goog.require('Blockly.registry');
// eslint-disable-next-line no-unused-vars
Expand Down
1 change: 0 additions & 1 deletion core/serialization/variables.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* @namespace Blockly.serialization.variables
*/
goog.module('Blockly.serialization.variables');
goog.module.declareLegacyNamespace();

const priorities = goog.require('Blockly.serialization.priorities');
const serializationRegistry = goog.require('Blockly.serialization.registry');
Expand Down
1 change: 0 additions & 1 deletion core/serialization/workspaces.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* @namespace Blockly.serialization.workspaces
*/
goog.module('Blockly.serialization.workspaces');
goog.module.declareLegacyNamespace();

const dom = goog.require('Blockly.utils.dom');
const eventUtils = goog.require('Blockly.Events.utils');
Expand Down
8 changes: 4 additions & 4 deletions scripts/gulpfiles/chunks.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
"all5:11:requires"
],
"js": [
"./core/serialization/workspaces.js",
"./core/serialization/variables.js",
"./core/contextmenu_items.js",
"./core/shortcut_items.js",
"./core/theme/zelos.js",
Expand All @@ -30,13 +28,14 @@
"./core/renderers/minimalist/info.js",
"./core/renderers/minimalist/drawer.js",
"./core/renderers/minimalist/minimalist.js",
"./core/serialization/variables.js",
"./core/serialization/workspaces.js",
"./core/renderers/thrasos/renderer.js",
"./core/renderers/thrasos/info.js",
"./core/renderers/thrasos/thrasos.js",
"./core/renderers/zelos/measurables/bottom_row.js",
"./core/renderers/zelos/constants.js",
"./core/renderers/zelos/path_object.js",
"./core/field_image.js",
"./core/renderers/zelos/marker_svg.js",
"./core/renderers/zelos/renderer.js",
"./core/renderers/zelos/measurables/row_elements.js",
Expand All @@ -49,7 +48,6 @@
"./core/field_angle.js",
"./core/field_colour.js",
"./core/field_label_serializable.js",
"./core/field_multilineinput.js",
"./core/flyout_metrics_manager.js",
"./core/flyout_base.js",
"./core/generator.js",
Expand All @@ -61,9 +59,11 @@
"./core/blockly.js",
"./core/field_variable.js",
"./core/field_number.js",
"./core/field_multilineinput.js",
"./core/field_dropdown.js",
"./core/field_checkbox.js",
"./core/field_textinput.js",
"./core/field_image.js",
"./core/events/workspace_events.js",
"./core/events/events_toolbox_item_select.js",
"./core/events/events_ui.js",
Expand Down
2 changes: 1 addition & 1 deletion tests/deps.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5515afc

Please sign in to comment.