Highlights
- Blockly core is now in TypeScript! If you use TypeScript, you should notice better type declarations for Blockly. There may still be some rough edges; please tell us about them or submit a fix.
- Blockly is transpiled to ES2015, no longer ES5. ES2015 is supported by all major browsers.
- Blockly is no longer guaranteed to be compatible with Internet Explorer, and some IE workarounds have been removed.
- If you're using modules, the way you import generators has changed. See the generators documentation for more information.
Migration
To help deal with breaking changes from this release:
- Run
npx @blockly/migrate rename --from <your version> <./path/to/my/files*>
- Run
npx @blockly/migrate fix-imports --from <your version> <./path/to/my/files*>
These commands will automatically modify your files so that they are compatible with version 9. The first command will automatically rename properties that have been renamed. And the second command will add/fix imports for blocks/generators that have been moved.
Some problems may still exist after running the migration scripts, but the majority of them should be fixed!
What's Changed
⚠ BREAKING CHANGES
Most are removing deprecated, unused, or outdated APIs. Each of the PRs listed below has information about what to do if you are affected by the change.
- Update deprecations for the new release. (#6470)
- remove unused functions in style.ts (#6386)
- Removed backwards compatibility for getDeveloperVars(). (#6385)
- remove checks for IE and EdgeHTML in core (#6336)
- allow blocks to receive their own delete events (#6337)
- build: compile to ES2015 instead of ES5 (#6335)
- Move backwards-compatibility hacks to main.js (#6260)
- Remove remaining use of
goog.module.declareLegacyNamespace
. (#6254) - properly add the removal of utils.global to the renamings file. (#6204)
- fix or silence type errors (#6105)
Deprecating Changes
These are changes which deprecate an API but do not remove it. APIs in this category will be removed at a future time. Each of the following PRs should provide guidance on an alternative.
- Fix blocks with mutators (#6440)
- stop using
is3dSupported
(#6400) - remove some IE-specific code in dom and style (#6396)
- deprecate functions in object.ts (#6387)
- remove AnyDuringMigration from the block drag surface (#6302)
Features
Bug Fixes
Miscellaneous Chores
- build: compile to ES2015 instead of ES5 (#6335) (f032151)
- properly add the removal of utils.global to the renamings file. (#6204) (2f734f7)
Code Refactoring
- Remove remaining use of
goog.module.declareLegacyNamespace
. (#6254) (f947b3f) - Removed backwards compatibility for getDeveloperVars(). (#6385) (3bc42c5)
New Contributors
Full Changelog: blockly-v8.0.5...blockly-v9.0.0