* chore: fix or ignore remaining lint
* chore: fix bad annotations
* chore: use push for array concatenation
* chore: revert use of spread for array operations
* chore: rename module Blockly.blocks.Lists to ....lists
All the other Blockly.blocks modules have lower-case names. This
one being named with an upper-case initial appears to have been a
typo on my part.
This module name is not mentioned anywhere else in the source code
(though it will be soon!) so no other files need to be edited.
Further, it does not appear anywhere in the last release (which
before PR #5696) so it is not necessary to add an entry in
renamings.js for this change.
* chore(build): Rationalise deps.js, deps.mocha.js
* Include blocks/*.js (Blockly.blocks.*) in tests/deps.js, since
these modules are used in the playground. (They are goog.provide
modules loaded via <script> tags, so their absence from deps.js
does not cause errors - but it will when they are migrated to
goog.module and must be loaded via goog.require.)
* Filter the entries in deps.mocha.js so that it includes only the
additional mocha test modules (i.e. those not mentioned in deps.js
already).
* refactor: Load blocks and generators using goog.require
* chore: move arrayRemove to a new utils.array namespace
* chore: move getBlockTypeCounts out of utils.js
* chore: remove last functions from utils.js
* chore: reorder imports
* chore: add re-export for runAfterPageLoad
* chore: move functions from utils to more specific files
* chore: use new names for utils functions
* chore: run clang-format
* chore: add deprecation warnings back to utils.js
Use Blockly.blocks.* for blocks modules, leaving the Blockly.Blocks
name for the block dictionary object.
This resolves a problem with advanced compilation of Blockly Games,
where, in the compressed output, (the minified name of)
Blockly.Blocks gets overwritten, with the dictionary object defined in
core/blocks.js being replaced by an empty namespace object
created by the provides of Blockly.Blocks.* in blocks/*.js. Without
this fix, some block definitions end up being created in the
dictionary and some on the namespace object—with chaos
predictably ensuing.
Mobile users get a window.prompt as an input, if they press the cancel button the return value is null. Don't attempt to set the value of the field to null.
Causes errors in the custom note field which inherits from FieldTextInput. Detected in Blockly Games Music.
There are small typos in:
- closure/goog/base.js
- core/contextmenu_items.js
- core/insertion_marker_manager.js
- core/toolbox/collapsible_category.js
- demos/blockfactory/workspacefactory/wfactory_controller.js
- demos/blockfactory/workspacefactory/wfactory_view.js
- tests/mocha/field_colour_test.js
Fixes:
- Should read `updates` rather than `udpates`.
- Should read `unhighlighting` rather than `unhiglighting`.
- Should read `then` rather than `tehn`.
- Should read `modified` rather than `modifed`.
- Should read `different` rather than `diffferent`.
- Should read `currently` rather than `currenly`.
- Should read `browser` rather than `broswer`.
... by not ever posting such comments from this workflow.
There will be a separate PR for the other workflow that does post
comments, because it needs to be in the master branch.
Part of #5659.
There are only 10 instances of ++x in our codebase, compared with over 500 instances of x++. The stlye guide has no opinion on which to use, nor do I. But the lack of consistency was making regex searches for bugs more difficult.
* refactor: Inline assign_reviewers script to avoid checkout
Per https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
it is not safe to do a checkout of the submitter-supplied code
AND THEN RUN IT (via require). This is pretty bad.
We want to give this script more permissions by running it
`on: [pull_request_target]` (instead of `pull_request`); this would
give it permission to modify the PR (e.g. add comments, change
assignment). While it would be OK to do a checkout with default
parameters (which in `pull_request_target` would check out *our*
branch rather than the submitted one) it simplest just to inline
this small script and thereby obviate the need to do a checkout at all.
* chore: Give assign_reviewers action required permissions
Changing it from `on: [pull_request]` to `on: [pull_request_review]`
will give the action write access to our repository, allowing it to
change the assignment of the PR.
This is now safe as the script does not ever check out any
submitter-supplied code.
* docs: Comment tweaks for assign_reviewers.yml
* chore: update generators/javascript.js to const and let
* chore: update generators/lua.js to const and let
* chore: update generators/php.js to const and let
* chore: update generators/python.js to const and let
* chore: fix uses of var in core/block_dragger
* chore: fix uses of var in core/extensions.js
* chore: fix uses of var in core/field_multilineinput.js
* chore: fix uses of var in assorted core files
* chore: fix uses of var in node test runner and playground screenshot code
* fix: undefined return from measureFontMetrics
* fix: violations of no-const-assign
* chore: only one variable declaration per line
* chore: use const and let in blocks/lists.js
* chore: use const and let in blocks/logic.js
* chore: use const and let in blocks/loops.js
* chore: use const and let in blocks/math.js
* chore: use const and let in blocks/procedures.js
* chore: use const and let in blocks/text.js
* chore: use const and let in blocks/variables_dynamic.js
* chore: use const and let in blocks/variables.js
* fix: updateShape_ variable scoping
* fix: declarations in switch clauses
* other: change while loops to for loops
* fix: fix violation of no-cond-assign