Commit Graph

116 Commits

Author SHA1 Message Date
alschmiedt 5515afc708 chore: Remove declareLegacyNamespace from serialization folder (#5757) 2021-12-02 10:21:58 -08:00
Neil Fraser 341dba5965 fix: Prevent error when maxTrashcanContents is 0 (#5739)
* fix: Prevent error when maxTrashcanContents is 0

Resolves #5729.

* Eliminate ’smart’ quotes.
2021-11-30 10:25:16 -08:00
Rachel Fenichel 5deed5a194 chore: fix or ignore remaining lint (#5709)
* chore: fix or ignore remaining lint

* chore: fix bad annotations

* chore: use push for array concatenation

* chore: revert use of spread for array operations
2021-11-17 08:39:00 -08:00
Rachel Fenichel f14a1c8034 chore: fix more lint (#5676)
* chore: fix assorted lint

* chore: clang-format

* chore: clang-format
2021-11-08 16:41:52 -08:00
Aaron Dodson 3851b14627 refactor: Migrate to named exports (#5623)
* refactor: Migrate to named exports

* fix: Sort requires

* fix: Remove duplicate deps
2021-10-20 15:53:23 -07:00
Neil Fraser 90b3f75d82 Remove @author tags (#5601)
Our files are up to a decade old, and have churned so much, that the initial author of the file no longer has much meaning.

Furthermore, this will encourage developers to post to the developer group, rather than emailing Googlers (usually me) directly.
2021-10-15 09:50:46 -07:00
Christopher Allen d2d5dc4b71 fix: Use require instead of requireType for interfaces (#5568)
But only if the interface is used in an @implements or @extends
declaration.

Fixes #5450
2021-09-29 17:44:21 +01:00
Monica Kozbial cd5ea681f1 Add missing alias annotations (#5561) 2021-09-28 11:08:51 -07:00
Monica Kozbial d8fbe1b05b Add namespace and alias annotations to jsdoc (#5550)
* Add annotations to files under core/events

* Add annotations to files under core/interfaces

* Add annotations to files under core/keyboard_nav

* Add annotations to files under core/renderers

* Add annotations to files under core/serialization

* Add annotations to files under core/theme

* Add annotations to files under core/toolbox

* Add annotations to files under core/utils

* Add annotations to files under core
2021-09-27 14:42:54 -07:00
kozbial 757878c646 chore: Remove declareLegacyNamespace() from files under interfaces/* 2021-09-24 09:05:17 -07:00
Rachel Fenichel 3adfaaf6d9 chore: named exports for block* files (#5512)
* chore: named export for block.js

* chore: named export for block_drag_surface.js

* chore: named export for block_dragger.js

* chore: named export for block_svg.js

* Fix import ordering

* chore: fix imports using requireType

* Remove extra require
2021-09-22 08:46:19 -07:00
Rachel Fenichel d83eb1364b fix: enable missingRequire in build_tasks (#5510) 2021-09-21 13:19:55 -07:00
Beka Westberg e954193009 fix: project cereal cleanup (#5398)
* fix: make exception constructors package

* fix: rename blocks.load to blocks.append

* fix: inline docs

* fix: consistency in block serialization

* fix: remove unexported functions

* fix: interface requires

* fix: tag TODO with issue number
2021-09-20 13:08:35 -07:00
Beka Westberg e7541cb315 fix: copy paste with json system (#5423)
* fix: copy paste w/ json system

* fix: pr comments
2021-09-20 13:08:35 -07:00
Beka Westberg 07057d087c feat: adds hooks for serializing plugins (#5276)
* Reformat registry tests

* Add tests for plugin hooks

* Add plugin hooks for serialization

* Switch PluginSerializer to IPluginSerializer

* fix: types

* fix: PR comments

* fix: tests

* cleanup: formatting

* fix: types

* feat: add respecting case in registry

* feat: add separate registry for serializers

* fix: rename serialiation registry alias

* fix: move serializer interface into interface dir
2021-09-20 13:08:35 -07:00
Aaron Dodson 6a4a359f7b Migrate hideChaff() from Blockly to WorkspaceSvg (#5460)
* Add hideChaff() to core/workspace_svg.js

* Mark Blockly.hideChaff as deprecated

* Update uses of Blockly.hideChaff() to WorkspaceSvg.hideChaff() in core

* Update uses of Blockly.hideChaff() to WorkspaceSvg.hideChaff() in demos

* Style and formatting fixes

* Switch from accessor to stub wrapper for Blockly.hideChaff

Co-authored-by: Christopher Allen <cpcallen+github@gmail.com>

Co-authored-by: Christopher Allen <cpcallen+github@gmail.com>
2021-09-15 13:41:20 -07:00
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
Monica Kozbial bec82da358 Remove require destructuring (#5294) 2021-08-03 15:07:14 -07:00
Aaron Dodson 69b900aa46 Migrate core/shortcut_registry.js to goog.module 2021-07-26 11:25:30 -07:00
kozbial b72c07ad8d Add eslint disable for no-unused-vars to core/interfaces/i_metrics_manager.js 2021-07-23 09:19:28 -07:00
kozbial f3a0c6414f Migrate core/interfaces/i_metrics_manager.js named requires 2021-07-23 09:19:28 -07:00
kozbial f0a3c7214d Migrate core/interfaces/i_metrics_manager.js to goog.module 2021-07-23 09:19:28 -07:00
Aaron Dodson ee565f16d6 Silence unused variable warnings for requires used in JSDoc 2021-07-22 10:41:55 -07:00
Aaron Dodson 83ff0ea09e Merge pull request #5148 from gonfunko/rerefactor
Update goog.module-migrated files to fix style issues
2021-07-22 08:09:53 -07:00
kozbial 7d946afb4e Migrate core/interfaces/i_registrable_field.js named requires 2021-07-21 11:28:04 -07:00
kozbial 00a74e9d37 Migrate core/interfaces/i_registrable_field.js to goog.module 2021-07-21 11:28:04 -07:00
Aaron Dodson 0e6258ca1a Migrated to inline exports 2021-07-21 08:17:13 -07:00
kozbial 3c77ff1fb2 Migrate core/interfaces/i_collapsible_toolbox_item.js, core/interfaces/i_selectable_toolbox_item.js, and core/interfaces/i_toolbox_item.js named requires 2021-07-20 18:26:05 -07:00
kozbial 1b09c8d8b7 Migrate core/interfaces/i_collapsible_toolbox_item.js, core/interfaces/i_selectable_toolbox_item.js, and core/interfaces/i_toolbox_item.js to goog.module 2021-07-20 18:26:05 -07:00
kozbial 599385891a Break up interfaces in core/i_toolbox_item.js into separate files 2021-07-20 18:26:05 -07:00
kozbial 6b10f9545c Migrate core/interfaces/i_registrable.js to goog.module 2021-07-20 18:25:19 -07:00
kozbial 9eee886925 Migrate core/interfaces/i_connection_checker.js named requires 2021-07-20 10:57:50 -07:00
kozbial 77aaab0e1f Migrate core/interfaces/i_connection_checker.js to goog.module 2021-07-20 10:57:50 -07:00
kozbial 514f744a6f Migrate core/interfaces/i_autohideable.js named requires 2021-07-19 15:20:10 -07:00
kozbial e43c82d9bb Migrate core/interfaces/i_autohideable.js to goog.module 2021-07-19 15:20:10 -07:00
kozbial 867c6cb140 Migrate core/interfaces/i_toolbox.js named requires 2021-07-19 15:14:54 -07:00
kozbial c72805b48a Migrate core/interfaces/i_toolbox.js to goog.module 2021-07-19 15:14:54 -07:00
kozbial d55ce59224 Migrate core/interfaces/i_flyout.js named requires 2021-07-19 15:14:28 -07:00
kozbial 583e321647 Migrate core/interfaces/i_flyout.js to goog.module 2021-07-19 15:14:28 -07:00
kozbial bdede7c1ab Migrate core/interfaces/i_contextmenu.js to goog.module 2021-07-19 10:29:21 -07:00
kozbial 94e36dba31 Migrate core/interfaces/i_keyboard_accessible.js named requires 2021-07-19 10:28:07 -07:00
kozbial 3d174ae058 Migrate core/interfaces/i_keyboard_accessible.js to goog.module 2021-07-19 10:28:07 -07:00
kozbial 04ef2705d1 Migrate core/interfaces/i_ast_node_location_with_block.js named requires 2021-07-19 10:28:07 -07:00
kozbial 794e4554fe Migrate core/interfaces/i_ast_node_location_with_block.js to goog.module 2021-07-19 10:28:07 -07:00
kozbial cdea0789dd Migrate core/interfaces/i_ast_node_location_svg.js named requires 2021-07-19 10:28:07 -07:00
kozbial 1c72055e4f Migrate core/interfaces/i_ast_node_location_svg.js to goog.module 2021-07-19 10:28:07 -07:00
kozbial 81b067f83a Migrate core/interfaces/i_ast_node_location.js to goog.module 2021-07-19 10:28:07 -07:00
kozbial e722097c1b Break up interfaces in core/i_accessibility.js into separate files 2021-07-19 10:28:07 -07:00
kozbial 456969767b Migrate core/interfaces/i_selectable.js to goog.module 2021-07-19 10:26:10 -07:00
kozbial bac62dc9be Update jsdoc annotation in core/interfaces/i_bubble.js 2021-07-19 10:13:45 -07:00