Commit Graph

6581 Commits

Author SHA1 Message Date
Christopher Allen
4c40378b9a Use goog.requireType when importing interfaces (etc.) (#5343)
* Use goog.requireType when importing I* interfaces

Interfaces have no code, so should never be referred to outside of
(JSDoc) comments, and so the modules that define only interfaces never
need to be goog.require'd - goog.requireType is always sufficient.

This commit fixes imports of all modules whose name matches
/(.*\.)?I[A-Z]*/ - i.e., the hungarian-notation named ones in
core/interfaces/.

* Use goog.requireType when only using import for type specifications

Where a module is imported only to used in JSDoc comments it can
(and should) be goog.requireType'd instead of goog.require'd.

* Remove spurious eslint-disable no-unused-vars

There were a few cases where modules were being imported with
goog.require (because they are referred to in code, not just JSDoc
comments) but were prefaced by a spurious eslint suppress.

Remove these, restoring the invariant that an import gets an eslint
if and only if it is a requireType.

* Remove obsolete Closure Compiler error group

stricterMissingRequire has been superceded by missingRequire, and now
causes a Java null pointer exception if supplied.
2021-08-11 18:50:45 +01:00
Aaron Dodson
a5729043c1 Migrate core/events/events_block_drag.js to goog.module syntax (#5286)
* Migrate core/events/events_block_drag.js to ES6 const/let

* Migrate core/events/events_block_drag.js to goog.module

* Migrate core/events/events_block_drag.js to named requires

* clang-format core/events/events_block_drag.js
2021-08-11 08:40:01 -07:00
Aaron Dodson
4b6ccf868c Migrate core/events/events_theme_change.js to goog.module syntax (#5279)
* Migrate core/events/events_theme_change.js to ES6 const/let

* Migrate core/events/events_theme_change.js to goog.module

* Migrate core/events/events_theme_change.js to named requires

* clang-format core/events/events_theme_change.js
2021-08-11 08:35:01 -07:00
Aaron Dodson
228ecb0f2d Migrate core/renderers/geras/renderer.js to goog.module syntax (#5307)
* Migrate core/renderers/geras/renderer.js to goog.module

* Migrate core/renderers/geras/renderer.js to named requires

* clang-format core/renderers/geras/renderer.js
2021-08-11 08:30:05 -07:00
Aaron Dodson
0f7f597758 Migrate core/renderers/geras/drawer.js to goog.module syntax (#5300)
* Migrate core/renderers/geras/drawer.js to ES6 const/let

* Migrate core/renderers/geras/drawer.js to goog.module

* Migrate core/renderers/geras/drawer.js to named requires

* clang-format core/renderers/geras/drawer.js

* Remove Blockly prefix on call to blockRendering in core/renderers/geras/drawer.js
2021-08-11 08:26:04 -07:00
Aaron Dodson
18283e816f Migrate core/renderers/measurables/base.js to goog.module syntax (#5308)
* Migrate core/renderers/measurables/base.js to goog.module

* Migrate core/renderers/measurables/base.js to named requires
2021-08-11 08:11:44 -07:00
Aaron Dodson
a04debf275 Fix issue that prevented Mocha and generator tests from running on certain configurations (#5344)
* Fix issue that prevented Mocha and generator tests from running on certain configurations

* Link to Blockly issue re: --disable-gpu flag
2021-08-10 15:11:56 -07:00
kozbial
a7fcf881fa Add missing eslint disable line for required interface 2021-08-10 11:20:03 -07:00
kozbial
ee53e8e812 Update optional requires 2021-08-10 11:18:38 -07:00
Aaron Dodson
6bae1ce9f9 Migrate core/workspace_svg.js to goog.module syntax (#5334)
* Migrate core/workspace_svg.js to ES6 const/let

* Migrate core/workspace_svg.js to goog.module

* Migrate core/workspace_svg.js to named requires

* clang-format core/workspace_svg.js
2021-08-10 08:09:46 -07:00
kozbial
6ad723afbc Add eslint disable 2021-08-09 18:53:11 -07:00
kozbial
6863d7fa08 clang-format core/toolbox/toolbox.js 2021-08-09 18:53:11 -07:00
kozbial
a2e9509542 Migrate core/toolbox/toolbox.js named requires 2021-08-09 18:53:11 -07:00
kozbial
ec1567020b Migrate core/toolbox/toolbox.js to goog.module 2021-08-09 18:53:11 -07:00
kozbial
8875dbd50c Migrate core/toolbox/toolbox.js to ES6 const/let 2021-08-09 18:53:11 -07:00
kozbial
d7840db736 clang-formant core/events/variable_events.js 2021-08-09 18:52:07 -07:00
kozbial
dc2438eb28 Migrate core/events/block_events.js named requires 2021-08-09 18:52:07 -07:00
kozbial
9ac531ba58 Migrate core/events/block_events.js to goog.module 2021-08-09 18:52:07 -07:00
kozbial
6e821fb9fc Migrate core/events/block_events.js to ES6 const/let 2021-08-09 18:52:07 -07:00
kozbial
d1ab960f0f Split classes from core/events/variable_events.js into multiple files 2021-08-09 18:52:07 -07:00
kozbial
2f71d18e8a Update jsdoc comment for classes 2021-08-09 18:26:43 -07:00
kozbial
5acdd5e4bc clang-format core/events/block_events.js 2021-08-09 18:26:43 -07:00
kozbial
7889b02d9b Migrate core/events/block_events.js named requires 2021-08-09 18:26:43 -07:00
kozbial
fd0385dd63 Migrate core/events/block_events.js to goog.module 2021-08-09 18:26:43 -07:00
kozbial
20dad54d38 Migrate core/events/block_events.js to ES6 const/let 2021-08-09 18:26:43 -07:00
kozbial
abbc1b3de3 Split classes from core/events/block_events.js into multiple files 2021-08-09 18:26:43 -07:00
kozbial
1487698343 Remove extra newline and remove unecessary package annotation 2021-08-09 18:23:07 -07:00
kozbial
70d8ca2a20 clang-format core/renderers/common/block_rendering.js 2021-08-09 18:23:07 -07:00
kozbial
f565120efb Migrate core/renderers/common/block_rendering.js named requires 2021-08-09 18:23:07 -07:00
kozbial
a4a3b6a068 Migrate core/renderers/common/block_rendering.js to goog.module 2021-08-09 18:23:07 -07:00
kozbial
440be28b4a Migrate core/renderers/common/block_rendering.js to ES6 const/let 2021-08-09 18:23:07 -07:00
Aaron Dodson
08a8c0be6d Migrate core/contextmenu_registry.js to goog.module syntax (#5149)
* Migrate core/contextmenu_registry.js to ES6 const/let

* Migrate core/contextmenu_registry.js to goog.module

* Migrate core/contextmenu_registry.js to named requires

* clang-format core/contextmenu_registry.js

* Make core/contextmenu_registry.js constructor private
2021-08-09 15:02:03 -07:00
kozbial
7eedf623d5 Change private static variable to local variable. 2021-08-09 14:59:22 -07:00
kozbial
e10be5444f clang-format core/workspace.js 2021-08-09 14:59:22 -07:00
kozbial
74b5a12c6d Migrate core/workspace.js named requires 2021-08-09 14:59:22 -07:00
kozbial
ac4fa41cb3 Migrate core/workspace.js to goog.module 2021-08-09 14:59:22 -07:00
kozbial
5f669a7607 Migrate core/workspace.js to ES6 const/let 2021-08-09 14:59:22 -07:00
Aaron Dodson
fbd7c8ab79 Migrate core/events/workspace_events.js to goog.module syntax (#5274)
* Migrate core/events/workspace_events.js to ES6 const/let

* Migrate core/events/workspace_events.js to goog.module

* Migrate core/events/workspace_events.js to named requires

* clang-format core/events/workspace_events.js

* Update build artifact sizes in check_metadata.sh

* Add comment about root cause of build artifact size change

* Migrate core/events/workspace_events.js to ES6 const/let

* Migrate core/events/workspace_events.js to goog.module

* Migrate core/events/workspace_events.js to named requires

* clang-format core/events/workspace_events.js

* Clarify require name for Blockly.Events.Abstract
2021-08-09 12:43:06 -07:00
Aaron Dodson
b5444b4e89 Migrate core/renderers/geras/path_object.js to goog.module syntax (#5306)
* Migrate core/renderers/geras/path_object.js to goog.module

* Migrate core/renderers/geras/path_object.js to named requires

* clang-format core/renderers/geras/path_object.js
2021-08-09 12:30:07 -07:00
Aaron Dodson
0ffdc6106d Migrate core/block_svg.js to goog.module syntax (#5323)
* Migrate core/block_svg.js to ES6 const/let

* Migrate core/block_svg.js to goog.module

* Migrate core/block_svg.js to named requires

* clang-format core/block_svg.js

* Migrate to goog.module.get for optional Comment/Warning in core/block_svg.js

* Lint changes in core/block_svg.js
2021-08-09 12:24:06 -07:00
kozbial
b636c79ac0 Add description and reorder requires 2021-08-06 18:05:53 -07:00
kozbial
b834d9026b Add requireType calls for Blockly.WorkspaceComment and Blockly.WorkspaceCommentSvg 2021-08-06 18:05:53 -07:00
kozbial
50a99ce515 clang-format core/events/events_abstract.js 2021-08-06 15:53:18 -07:00
kozbial
9fdc8bab15 Migrate core/events/events_abstract.js named requires 2021-08-06 15:53:18 -07:00
kozbial
bbc5ce4e89 Migrate core/events/events_abstract.js to goog.module 2021-08-06 15:53:18 -07:00
kozbial
0a9d7c3c79 Migrate core/events/events_abstract.js to ES6 const/let 2021-08-06 15:53:18 -07:00
Monica Kozbial
7974ff5159 Add labels instead of setting in github action (#5324)
Update `tag_module_cleanup.yml` logic to add labels instead of setting labels list.

Fixes: https://github.com/google/blockly/issues/5298
2021-08-06 15:46:21 -07:00
Aaron Dodson
23a0b89fc1 Migrate core/block.js to goog.module syntax (#5322)
* Migrate core/block.js to ES6 const/let

* Migrate core/block.js to goog.module

* Migrate core/block.js to ES6 const/let

* Migrate core/block.js to goog.module

* Migrate core/block.js to named requires

* clang-format core/block.js

* Add missing period to comment in core/block.js
2021-08-06 12:30:30 -07:00
alschmiedt
ac01b5cbcb Merge pull request #5295 from alschmiedt/fix_generator_tests
Remove extra output from generator and mocha tests (#5196)
2021-08-05 14:00:14 -07:00
Aaron Dodson
2b6d275440 Migrate core/renderers/measurables/types.js to goog.module syntax (#5309)
* Migrate core/renderers/measurables/types.js to goog.module

* Migrate core/renderers/measurables/types.js to named requires

* clang-format core/renderers/measurables/types.js
2021-08-05 13:57:16 -07:00