refactor(build): Delete Closure Library (#7415)

* fix(build): Restore erroneously-deleted filter function

  This was deleted in PR #7406 as it was mainly being used to
  filter core/ vs. test/mocha/ deps into separate deps files -
  but it turns out also to be used for filtering error
  messages too.  Oops.

* refactor(tests): Migrate advanced compilation test to ES Modules

* refactor(build): Migrate main.js to TypeScript

  This turns out to be pretty straight forward, even if it would
  cause crashing if one actually tried to import this module
  instead of just feeding it to Closure Compiler.

* chore(build): Remove goog.declareModuleId calls

  Replace goog.declareModuleId calls with a comment recording the
  former module ID for posterity (or at least until we decide
  how to reformat the renamings file.

* chore(tests): Delete closure/goog/*

  For the moment we still need something to serve as base.js for
  the benefit of closure-make-deps, so we keep a vestigial
  base.js around, containing only the @provideGoog declaration.

* refactor(build): Remove vestigial base.js

  By changing slightly the command line arguments to
  closure-make-deps and closure-calculate-chunks the need to have
  any base.js is eliminated.

* chore: Typo fix for PR #7415
This commit is contained in:
Christopher Allen
2023-08-31 01:24:47 +02:00
committed by GitHub
parent be809d9d98
commit b0a7c004a9
323 changed files with 367 additions and 4782 deletions

View File

@@ -4,8 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.Events');
// Former goog.module ID: Blockly.Events
import {Abstract, AbstractEventJson} from './events_abstract.js';
import {BlockBase, BlockBaseJson} from './events_block_base.js';

View File

@@ -10,8 +10,7 @@
*
* @class
*/
import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.Events.Abstract');
// Former goog.module ID: Blockly.Events.Abstract
import * as common from '../common.js';
import type {Workspace} from '../workspace.js';

View File

@@ -9,8 +9,7 @@
*
* @class
*/
import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.Events.BlockBase');
// Former goog.module ID: Blockly.Events.BlockBase
import type {Block} from '../block.js';
import type {Workspace} from '../workspace.js';

View File

@@ -9,8 +9,7 @@
*
* @class
*/
import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.Events.BlockChange');
// Former goog.module ID: Blockly.Events.BlockChange
import type {Block} from '../block.js';
import type {BlockSvg} from '../block_svg.js';

View File

@@ -9,8 +9,7 @@
*
* @class
*/
import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.Events.BlockCreate');
// Former goog.module ID: Blockly.Events.BlockCreate
import type {Block} from '../block.js';
import * as registry from '../registry.js';

View File

@@ -9,8 +9,7 @@
*
* @class
*/
import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.Events.BlockDelete');
// Former goog.module ID: Blockly.Events.BlockDelete
import type {Block} from '../block.js';
import * as registry from '../registry.js';

View File

@@ -9,8 +9,7 @@
*
* @class
*/
import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.Events.BlockDrag');
// Former goog.module ID: Blockly.Events.BlockDrag
import type {Block} from '../block.js';
import * as registry from '../registry.js';

View File

@@ -10,8 +10,7 @@
*
* @class
*/
import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.Events.BlockFieldIntermediateChange');
// Former goog.module ID: Blockly.Events.BlockFieldIntermediateChange
import type {Block} from '../block.js';
import * as registry from '../registry.js';

View File

@@ -9,8 +9,7 @@
*
* @class
*/
import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.Events.BlockMove');
// Former goog.module ID: Blockly.Events.BlockMove
import type {Block} from '../block.js';
import {ConnectionType} from '../connection_type.js';

View File

@@ -9,8 +9,7 @@
*
* @class
*/
import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.Events.BubbleOpen');
// Former goog.module ID: Blockly.Events.BubbleOpen
import type {AbstractEventJson} from './events_abstract.js';
import type {BlockSvg} from '../block_svg.js';

View File

@@ -9,8 +9,7 @@
*
* @class
*/
import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.Events.Click');
// Former goog.module ID: Blockly.Events.Click
import type {Block} from '../block.js';
import * as registry from '../registry.js';

View File

@@ -9,8 +9,7 @@
*
* @class
*/
import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.Events.CommentBase');
// Former goog.module ID: Blockly.Events.CommentBase
import * as utilsXml from '../utils/xml.js';
import type {WorkspaceComment} from '../workspace_comment.js';

View File

@@ -9,8 +9,7 @@
*
* @class
*/
import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.Events.CommentChange');
// Former goog.module ID: Blockly.Events.CommentChange
import * as registry from '../registry.js';
import type {WorkspaceComment} from '../workspace_comment.js';

View File

@@ -9,8 +9,7 @@
*
* @class
*/
import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.Events.CommentCreate');
// Former goog.module ID: Blockly.Events.CommentCreate
import * as registry from '../registry.js';
import type {WorkspaceComment} from '../workspace_comment.js';

View File

@@ -9,8 +9,7 @@
*
* @class
*/
import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.Events.CommentDelete');
// Former goog.module ID: Blockly.Events.CommentDelete
import * as registry from '../registry.js';
import type {WorkspaceComment} from '../workspace_comment.js';

View File

@@ -9,8 +9,7 @@
*
* @class
*/
import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.Events.CommentMove');
// Former goog.module ID: Blockly.Events.CommentMove
import * as registry from '../registry.js';
import {Coordinate} from '../utils/coordinate.js';

View File

@@ -9,8 +9,7 @@
*
* @class
*/
import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.Events.MarkerMove');
// Former goog.module ID: Blockly.Events.MarkerMove
import type {Block} from '../block.js';
import {ASTNode} from '../keyboard_nav/ast_node.js';

View File

@@ -9,8 +9,7 @@
*
* @class
*/
import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.Events.Selected');
// Former goog.module ID: Blockly.Events.Selected
import * as registry from '../registry.js';
import {AbstractEventJson} from './events_abstract.js';

View File

@@ -9,8 +9,7 @@
*
* @class
*/
import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.Events.ThemeChange');
// Former goog.module ID: Blockly.Events.ThemeChange
import * as registry from '../registry.js';
import {AbstractEventJson} from './events_abstract.js';

View File

@@ -9,8 +9,7 @@
*
* @class
*/
import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.Events.ToolboxItemSelect');
// Former goog.module ID: Blockly.Events.ToolboxItemSelect
import * as registry from '../registry.js';
import {AbstractEventJson} from './events_abstract.js';

View File

@@ -9,8 +9,7 @@
*
* @class
*/
import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.Events.TrashcanOpen');
// Former goog.module ID: Blockly.Events.TrashcanOpen
import * as registry from '../registry.js';
import {AbstractEventJson} from './events_abstract.js';

View File

@@ -10,8 +10,7 @@
*
* @class
*/
import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.Events.UiBase');
// Former goog.module ID: Blockly.Events.UiBase
import {Abstract as AbstractEvent} from './events_abstract.js';

View File

@@ -9,8 +9,7 @@
*
* @class
*/
import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.Events.VarBase');
// Former goog.module ID: Blockly.Events.VarBase
import type {VariableModel} from '../variable_model.js';

View File

@@ -9,8 +9,7 @@
*
* @class
*/
import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.Events.VarCreate');
// Former goog.module ID: Blockly.Events.VarCreate
import * as registry from '../registry.js';
import type {VariableModel} from '../variable_model.js';

View File

@@ -4,8 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.Events.VarDelete');
// Former goog.module ID: Blockly.Events.VarDelete
import * as registry from '../registry.js';
import type {VariableModel} from '../variable_model.js';

View File

@@ -4,8 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.Events.VarRename');
// Former goog.module ID: Blockly.Events.VarRename
import * as registry from '../registry.js';
import type {VariableModel} from '../variable_model.js';

View File

@@ -9,8 +9,7 @@
*
* @class
*/
import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.Events.ViewportChange');
// Former goog.module ID: Blockly.Events.ViewportChange
import * as registry from '../registry.js';
import {AbstractEventJson} from './events_abstract.js';

View File

@@ -4,8 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.Events.utils');
// Former goog.module ID: Blockly.Events.utils
import type {Block} from '../block.js';
import * as common from '../common.js';

View File

@@ -9,8 +9,7 @@
*
* @class
*/
import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.Events.FinishedLoading');
// Former goog.module ID: Blockly.Events.FinishedLoading
import * as registry from '../registry.js';
import type {Workspace} from '../workspace.js';