* Add deprecation warnings and reorganize blockly.js
* Update usages of deprecated properties
* chore: make dates consistent, remove extra function
* chore: run clang-format and fix lint
* chore: add more tags
* chore: fix updated location of Align types
* chore: fix deprecated usages in tests
* chore: rebuild deps
* chore: fix moved Align types in demos and tests
* chore: update which properties are actually deprecated
* chore: don't deprecate Blockly.selected.
* Bump ws from 7.4.4 to 7.5.1
Bumps [ws](https://github.com/websockets/ws) from 7.4.4 to 7.5.1.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/7.4.4...7.5.1)
---
updated-dependencies:
- dependency-name: ws
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
* Bump lodash from 4.17.19 to 4.17.21
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.19 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.19...4.17.21)
---
updated-dependencies:
- dependency-name: lodash
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
* Initial commit for appengine deploy action
* Update comments to be more descriptive
* Get deploy files from the correct directory
Previous path was `_deploy/`. New path is `../_deploy`.
* Create Github Action to comment on PR while develop is frozen (#5006)
* Create develop_freeze_comment.yml
* Update comments
* Fix typo and update uses
* Add test message
* Revert "Create Github Action to comment on PR while develop is frozen (#5006)" (#5013)
This reverts commit 8c635b5fbc.
* Revert "Get deploy files from the correct directory"
* Bump hosted-git-info from 2.8.4 to 2.8.9 (#4980)
Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.4 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.4...v2.8.9)
---
updated-dependencies:
- dependency-name: hosted-git-info
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Pull Request template for goog.module PRs
Provide a standard pull request template more suited to PRs doing
goog.module conversions.
There's no way to pick a non-default template when creating a PR
manually, but this one can be used by adding
"&?template=goog_module.md" to the
https://github.com/cpcallen/bugs/compare/ URL.
* Update goog_module.md with suggested fixes
* Fix typos.
* Reinstate "Proposed Changes" section.
* Mark text that should be edit with ALL CAPS.
* Bump normalize-url from 4.5.0 to 4.5.1
Bumps [normalize-url](https://github.com/sindresorhus/normalize-url) from 4.5.0 to 4.5.1.
- [Release notes](https://github.com/sindresorhus/normalize-url/releases)
- [Commits](https://github.com/sindresorhus/normalize-url/commits)
---
updated-dependencies:
- dependency-name: normalize-url
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
* Bump trim-newlines from 3.0.0 to 3.0.1
Bumps [trim-newlines](https://github.com/sindresorhus/trim-newlines) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/sindresorhus/trim-newlines/releases)
- [Commits](https://github.com/sindresorhus/trim-newlines/commits)
---
updated-dependencies:
- dependency-name: trim-newlines
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
* Bump path-parse from 1.0.6 to 1.0.7
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)
---
updated-dependencies:
- dependency-name: path-parse
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
* Bump postcss from 7.0.35 to 7.0.36 (#4928)
Bumps [postcss](https://github.com/postcss/postcss) from 7.0.35 to 7.0.36.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/7.0.35...7.0.36)
---
updated-dependencies:
- dependency-name: postcss
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Rollup of all Q3 message changes (#5565)
Courtesy of Translatewiki
* Add Croatian to Code demo (#5583) (#5611)
Contributed courtesy of Lidija Kralj.
* chore: create release.yml (#5588)
* Create release.yml
* chore: update release.yml
* chore: update dependabot messages and labels (#5653)
The same as #5618, but against master because dependabot ignores changes on develop.
* chore: Create separate report_clang_format workflow in master branch (#5670)
The initial version of this workflow just uses `console.log` to report
the context of the `context` object. It is hoped that there will
be enough information in this context to identify the PR to comment on,
without the `check_clang_format` workflow having to upload a
'build artefact' of some kind - see example of what I hoe to avoid
starting at `ReceivePR.yml` here:
https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
A follow-up PR will (if possible) add the code to create comments
when `check_clang_format` fails.
Part of #5659.
* chore: Remove spurious extra `on` clause in report_clang_format.yml (#5671)
Removes an unwanted `on` clause that was overlooked in #5670 by author and reviewer.
* chore: More spelunking in GitHub Action data (#5673)
Looking for information about PR that triggered original
check_clang_format run.
* chore: revert github action (#5675)
* fix: Don't try to set text fields to null on cancel (#5692)
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.
Caused errors in the custom note field which inherits from FieldTextInput. Detected in Blockly Games Music.
This PR is for the master branch and includes a recompile. The develop branch has changed enough that a cherrypick from develop to master won't work. The bug in question represents a significant number of the errors being reported from Blockly Games.
* Update dependabot.yml (#5705)
* chore: run clang-format
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Monica Kozbial <6621618+moniika@users.noreply.github.com>
Co-authored-by: Christopher Allen <cpcallen+git@google.com>
Co-authored-by: Neil Fraser <fraser@google.com>
Co-authored-by: alschmiedt <aschmiedt@google.com>
* chore: Remove requires that duplicate those in blockly.js
* refactor: Remove core/requires.js, make blockly.js be entry point
It sort of makes sense, doesn't it?
The only remaining require not duplicated in `blockly.js` was that for
`Blockly.themes.Classic`, but it is already required by
`Blockly.themes` (itself required by `Blockly`).
* fix(test): Fix advanced compilation test
- Fix loading of blocks in `tests/compile/main.js` caused by
recent `goog.module`-ification work.
- Fix problem caused by ADVANCED_OPTIMISATIONS renaming the Msg
property on the fake Blockly object created by the
translation-loading hack in `blockly.js`.
* chore(build): Reenable advanced compilation test
Fixes#5602.
* chore: Fix inadvertent block migration inconsistencies
- Reinstate `goog.require`s-for-side-effects that were inadvertently
removed.
- Always use a destructuring import for `defineBlocksWithJsonArray`.
- Consistently use `CONSTANT_CASE` names for block-common objects.
(We could alternatively always use `camelCase` names, but since
all the `MIXIN`s and `EXTENSIONS` remain all-uppercase this seems
the more consistent.)
* chore: Fix import ordering
* chore: Clean up NPM package module wrappers
- Slightly improve documentation for each file based on helpful
explanations given by @samelhusseini.
- Removed redundant code---e.g., loading `javascript_compressed.js`
creates and sets Blockly.JavaScript as a side effect, so there is
no need to set `Blockly.JavaScript = BlocklyJavaScript` in
`dist/javascript.js` (generated from `scripts/package/javascript.js`).
- Remove possibly harmful code---e.g., `Blockly.Msg` is initialised
with a null-prototype object in `blockly_compressed.js` and that
initial object should under no circumstances be replaced.
- Remvoe downright misleading code---e.g., `dist/blocks.js` previously
_appeared_ to replace Blockly.Blocks with an empty object, but in
fact the `Blockly` name referred at that point to the exports object
from `blocks_compressed.js`, which would randomly get a useless
`{}`-valued `.Blocks` property tacked on to it; similarly, code in
`dist/browser.js` (generated from `scripts/package/browser/index.js`)
appeared to copy definitions from `BlocklyBlocks` to `Blockly.Blocks`,
but the former would always be (the aforementioned) empty object,
making this code ineffective.
* chore: Improve chunk definition / UMD generation
Make several improvements to the chunks global and chunkWrapper
function:
- Document chunk definition format (and improve the names of
of the documented properties).
- Replace the chunk `.namespace` property with two others:
- `.exports` names the variable/property to be returned by the
factory function, and which will be set on the global object if
the module is loaded in a browser.
- `.importAs` names the parameter that this chunk's exports value
is to be passed to the factory function of other chunks which
depend on this one. (This needs to be different because e.g.
`Blockly.blocks` is not a valid parameter name.)
- Change the definition for the blocks chunk to export Blockly.Blocks
(i.e., the block definition dictionary) as blocks_compressed.js
did previous to PR #5721 (chunked compilation), rather than the
(empty and soon to vanish) Blockly.blocks namespace object.
This is a win for backwards compatibility, though it does mean that
if we want to expose the `loopTypes` export from `blocks/loops.js`
we will need to find a different way to do so.
* refactor: convert generators/python/colour.js to goog.module
* refactor: convert generators/python/colour.js to named requires
* chore: run clang-format
* refactor: convert generators/python/lists.js to goog.module
* refactor: convert generators/python/lists.js to named requires
* chore: run clang-format
* refactor: convert generators/python/logic.js to goog.module
* refactor: convert generators/python/logic.js to named requires
* chore: run clang-format
* refactor: convert generators/python/loops.js to goog.module
* refactor: convert generators/python/loops.js to named requires
* chore: run clang-format
* refactor: convert generators/python/math.js to goog.module
* refactor: convert generators/python/math.js to named requires
* chore: run clang-format
* refactor: convert generators/python/procedures.js to goog.module
* refactor: convert generators/python/procedures.js to named requires
* chore: run clang-format
* refactor: convert generators/python/text.js to goog.module
* refactor: convert generators/python/text.js to named requires
* chore: run clang-format
* refactor: convert generators/python/variables_dynamic.js to named requires
* refactor: convert generators/python/variables.js to named requires
* chore: run clang-format
* refactor: convert generators/python.js to goog.module
* refactor: convert generators/python.js to named requires
* chore: run clang-format
* chore: remove spurious @private annotations
* chore: rebuild
* refactor: convert generators/lua.js to goog.module
* refactor: convert generator/lua.js to named requires
* chore: run clang-format
* refactor: convert generators/php/colour.js to goog.module
* refactor: convert generators/php/colour.js to named requires
* chore: run clang-format
* refactor: convert generators/php/lists.js to goog.module
* refactor: convert generators/php/lists.js to named requires
* chore: run clang-format
* refactor: convert generators/php/logic.js to goog.module
* refactor: convert generators/php/logic.js to named requires
* chore: run clang-format
* refactor: convert generators/php/loops.js to goog.module
* refactor: convert generators/php/loops.js to named requires
* chore: run clang-format
* refactor: convert generators/php/math.js to goog.module
* refactor: convert generators/php/math.js to named requires
* chore: run clang-format
* refactor: convert generators/php/procedures.js to goog.module
* refactor: convert generators/php/procedures.js to named requires
* chore: run clang-format
* refactor: convert generators/php/text.js to goog.module
* refactor: convert generators/php/text.js to named requires
* chore: run clang-format
* refactor: convert generators/php/variables.js to goog.module
* refactor: convert generators/php/variables.js to named requires
* chore: run clang-format
* refactor: convert generators/php/variables_dynamic.js to goog.module
* refactor: convert generators/php/variables_dynamic.js to named requires
* refactor: convert generators/php.js to goog.module
* refactor: convert generators/php.js to named requires
* chore: run clang-format
* chore: rebuild deps.js
* refactor: convert generators/lua/colour.js to goog.module
* refactor: convert generators/lua/colour.js to named requires
* chore: run clang-format
* refactor: convert generators/lua/lists.js to goog.module
* refactor: convert generators/lua/lists.js to named requires
* chore: run clang-format
* fix: use getListIndex helper function in lua list generators
* refactor: convert generators/lua/logic.js to goog.module
* refactor: convert generators/lua/logic.js to named requires
* chore: run clang-format
* refactor: convert generators/lua/loops.js to goog.module
* refactor: convert generators/lua/loops.js to named requires
* chore: run clang-format
* refactor: convert generators/lua/math.js to goog.module
* refactor: convert generators/lua/math.js to named requires
* chore: run clang-format
* refcator: convert generators/lua/procedures.js to goog.module
* refactor: convert generators/lua/procedures.js to named requires
* chore: run clang-format
* chore: rebuild deps.js
* refactor: convert generators/lua/text.js to goog.module
* refactor: convert generators/lua/text.js to named requires
* refactor: convert generators/lua/variables_dynamic.js to goog.module
* refactor: convert generators/lua/variables_dynamic.js to named requires
* chore: run clang-format on text.js
* refactor: convert generators/lua/variables.js to goog.module
* refactor: convert generators/lua/variables.js to named requires
* chore: run clang-format
* chore: make a lua generator function internal
* chore: rebuild deps.js
* refactor: convert generators/javascript.js to goog.module
* refactor: convert generators/javascript.js to named requires
* chore: run clang-format
* refactor: convert generators/dart/variables.js to goog.module
* refactor: convert generators/dart/variables.js to named requires
* chore: run clang-format
* refactor: convert generators/dart/variables_dynamic.js to goog.module
* refactor: convert generators/dart/variables_dynamic.js to named requires
* refactor: convert generators/dart/text.js to goog.module
* refactor: convert generators/dart/text.js to named requires
* chore: run clang-format
* refactor: convert generators/dart/procedures.js to goog.module
* refactor: convert generators/dart/procedures.js to named requires
* chore: run clang-format
* refactor: convert generators/dart/math.js to goog.module
* refactor: convert generators/dart/math.js to named requires
* chore: run clang-format
* refactor: convert generators/dart/loops.js to goog.module
* refactor: convert generators/dart/loops.js to named requires
* chore: run clang-format
* refactor: convert generators/dart/logic.js to goog.module
* refactor: convert generators/dart/logic.js to named requires
* chore: run clang-format
* refactor: convert generators/dart/lists.js to goog.module
* refactor: convert generators/dart/lists.js to named requires
* chore: run clang-format
* refactor: convert generators/dart/colour.js to goog.module
* refactor: convert generators/dart/colour.js to named requires
* chore: rebuild deps.js
* chore: lint
* refactor: convert generators/javascript/colour.js to goog.module
* refactor: convert generators/javascript/colour.js to named requires
* chore: run clang-format
* refactor: convert generators/javascript/lists.js to goog.module
* refactor: convert generators/javascript/lists.js to named requires
* chore: run clang-format
* refactor: convert generators/javascript/logic.js to goog.module
* refactor: convert generators/javascript/logic.js to named requires
* chore: run clang-format
* refactor: convert genereators/javascript/math.js to goog.module
* refactor: convert generators/javascript/math.js to named requires
* chore: rebuild deps.js
* refactor: convert generators/javascript/procedures.js to goog.module
* refactor: convert generators/javascript/procedures.js to named requires
* chore: run clang-format
* refactor: Turn .getSurroundLoop into a (Block) method
This considerably simplifies the code in the genrators, obviating
the need for generators to import Blockly.Constants.Loops, and
allowing the compiler to remove blocks/loops.js from the first
(Blockly) chunk of the compilation.
(The latter could and should have been arranged by making the
generator chunks depend on the blocks chunk, but that is no longer
necessary.)
* refactor: Migrate blocks/loops.js to goog.module
* refactor: Migrate blocks/loops.js named requires
* chore: clang-format blocks/loops.js
* chore: migrate generators/javascript/text.js to goog.module
* chore: convert generators/javascript/text.js to named requires
* refactor: convert generators/javascript/variables.js to goog.module
* refactor: convert generators/javascript/variables_dynamic to goog.module
* chore: revert #5730
* fix: Fix compile failure due to incorrect visibility
The CONTROL_FLOW_IN_LOOP_CHECK_MIXIN is intended to be used outside of
blocks/ (it is, in particular, used in generators/) so it should have
been marked @public from the beginning.
* chore: migrate generators/dart.js to goog.module
* chore: migrate generators/dart.js to named requires
* chore: Update generators/dart.js to alphabetize imports
Co-authored-by: Christopher Allen <cpcallen+github@gmail.com>
Co-authored-by: Christopher Allen <cpcallen+github@gmail.com>
* chore: fix some missing requires in generators
* chore: fix missing requires in dart block generators
* chore: replace Blockly.isNumber with Blockly.utils.string.isNumber in generators
* chore: fix more missing requires in block generators
* Migrate blocks/procedures.js to goog.module
* Migrate blocks/procedures.js named requires
* clang-format blocks/procedures.js
* chore: Factor common methods out of block definitions
Addressing comments on PR #5736.
Also:
- Ensure that the `comma-dangle` rule will not be applied to
function parameter lists (even when multi-line).
- Update tests/node/.eslintrc.json to make the environment
node-specific and not pinned to es6.
* Migrate blocks/colour.js to goog.module
* Migrate blocks/colour.js named requires
This causes an apparently harmless reordering of the files for the
first chunk.
* clang-format blocks/colour.js
This constant is used to specify the alignment of
an Input, so it should live in the same file as the Input class.
I've done this as a separate named export, but it could alternatively
be made a static member of Input (i.e., Input.Align with only Input
being exported by name).
Where mocha tests were referring to Blockly.constants.ALIGN.*
without actually requiring Blockly.constants, I have reverted
them to refer to Blockly.ALIGN_* instead (pending conversion
to named requries).
Part of #5073.