We have a fairly large backlog of breaking changes that we've been holding on to, and we are planning to publish a series of betas ad hoc as those changes are finished and ready for you to test. We want to get these out to you as soon as possible, for two reasons:
It is quite likely that work on Blockly v10, including backwards-compatible bug fixes and/or new features, will continue in parallel with work on the less backwards-compatible changes we're planning for v11. We expect that in most cases each v11 beta will be up-to-date with all the latest v10 updates, but we can't make any such guarantees. As such, you should continue using v10 in production, since bugs will get fixed in v10 first, and v11 will probably introduce exciting new bugs—though with your help we hope to fix most of them before v11.0.0 is officially released.
The only breaking change in this release is that we're finally publishing accurate TypeScript typings for the generators! 🎉
The generators were migrated to TypeScript in v10.3.0, concluding our work to migrate the core Blockly codebase from JavaScript to TypeScript. The new TypeScript implementation is (intended to be) functionally the same but a change in published typings is likely to break existing projects; to avoid this we opted to continued to publish the same hand-written .d.ts
files for the generator entrypoints (e.g. blockly/javascript
) that we have been using until now.
Previously the dartGenerator
, luaGenerator
, javascriptGenerator
, phpGenerator
, and pythonGenerator
exports (from the blockly/dart
, blockly/lua
, blockly/javascript
, blockly/php
and blockly/python
entrypoints respectively) were being typed any
.
(In hindsight we should probably have declared them as unknown
, obliging TS developers to use explicit casts.) Now their types are correct. There is no change to their runtime behaviour, but developers who have written code in TypeScript that manipulates generators (adding custom block generator functions, for example) may find they need to correct type errors in their code in order for it to compile correctly with Blockly v11.
Notably, block generator functions to be installed in the javascriptGenerator.forBlock
dictionary should be typed
(block: Blockly.Block, generator: javascript.JavascriptGenerator) => [string, javascript.Order] | string | null
—and similarly for each of the other four languages we support.
Note that in most cases the return type for any particular generator function can be either [string, javascriptOrder]
(for expression blocks), string
(for statement blocks), or null
(for blocks that do not directly emit code).
Full Changelog: blockly-v10.3.0...blockly-v11.0.0-beta.0
The only new change in -beta.1
is a fix for an issue reported about the new generator type declarations in -beta.0
. Thanks to @clementcontet for spotting and reporting this error!
Full Changelog: blockly-v11.0.0-beta.0...blockly-v11.0.0-beta.1