blockly

The web-based visual programming editor.

APACHE-2.0 License

Downloads
139.9K
Stars
12.4K
Committers
233

Bot releases are hidden (Show)

blockly - blockly-v11.1.1 Latest Release

Published by maribethb 4 months ago

What's Changed

Bug Fixes

  • fix: statement input blocks disappearing #8203

Full Changelog: https://github.com/google/blockly/compare/blockly-v11.1.0...blockly-v11.1.1

blockly - blockly-v11.1.0

Published by BeksOmega 5 months ago

What's Changed

New features ✨

Bug fixes 🐛

Reverted changes ⎌

Other changes

New Contributors

Full Changelog: https://github.com/google/blockly/compare/blockly-v11.0.0...blockly-v11.1.0

blockly - blockly-v11.0.0

Published by maribethb 5 months ago

Blockly v11 is here and it includes many new features and bug fixes!

For the full list of breaking changes, see the release notes below. You can click on each PR to learn why it's a breaking change, how to tell if you will be affected by it, and what to do if you are. There are a few major changes to be aware of:

  • The colour, multiline input, and angle fields and their associated blocks have been removed from core. They are now available as plugins. If you use these blocks or fields, follow the instructions in the plugin READMEs to install them.
  • If you install Blockly through npm, we now provide an exports clause to explicitly declare what you can import from our package.
    • Your build tooling may now throw an error if you deep import from our package such as import 'blockly/core/some/file/name.js', which has never been supported by Blockly but may have been made possible by your build tools.
  • We now provide Blockly as an esmodule if you use Blockly through import statements in JS.
    • import Blockly from 'blockly/core' has never been supported by Blockly, but your build tool may have "helpfully" made this work previously. Due to this change, your build tooling may no longer behave that way.
    • You should import * as Blockly from 'blockly/core' instead, as described in our documentation.
    • Note that <script type="module"> in HTML files is not yet a supported method to load Blockly.
  • Calling statementToCode or valueToCode on inputs that don't exist will now throw an error instead of returning an empty string.
    • This will make it easier to spot errors due to incorrect input names in block-code generator functions, but may expose previously silent issues with existing code.

This release also comes with many new features and bug fixes! A few notable ones include:

What's Changed

Breaking changes 🛠

New features ✨

Bug fixes 🐛

Cleanup ♻️

New Contributors

Full Changelog: https://github.com/google/blockly/compare/blockly-v10.4.3...blockly-v11.0.0

blockly - blockly-v11.0.0.-beta.6

Published by cpcallen 7 months ago

This is the fourth fifth in an ongoing series of beta releases for the future v11 of Blockly. See information about the Blockly v11 Beta Program.

Due to errors in the publication process, the contents of the [email protected] package were not as intended (and did not correspond with the release notes), and that version has been withdrawn. This version, -beta.6, supersedes it.

Highlights in v11.0.0-beta.6 (was beta.5)

This release was created to publish the fix in PR #7955 for issue #7952, which caused errors when importing langfiles (e.g. blockly/msg/en) in TypeScript modules. Thanks to @clementcontet for reporting this issue in -beta.4 so promptly—and sorry that we didn't catch it despite the extensive testing carried out on the offending PR, #7822!

It also contains unrelated ongoing work on refactoring workspace comments.

What's Changed

New features ✨

Bug fixes 🐛

Full Changelog: https://github.com/google/blockly/compare/blockly-v11.0.0-beta.4...blockly-v11.0.0.-beta.6

blockly - blockly-v11.0.0-beta.5

Published by cpcallen 7 months ago

This is the fourth in an ongoing series of beta releases for the future v11 of Blockly. See information about the Blockly v11 Beta Program.

Highlights in v11.0.0-beta.5

This release was created to publish the fix in PR #7955 for issue #7952, which caused errors when importing langfiles (e.g. blockly/msg/en) in TypeScript modules. Thanks to @clementcontet for reporting this issue in -beta.4 so promptly—and sorry that we didn't catch it despite the extensive testing carried out on the offending PR, #7822!

It also contains unrelated ongoing work on refactoring workspace comments.

What's Changed

New features ✨

Bug fixes 🐛

Full Changelog: https://github.com/google/blockly/compare/blockly-v11.0.0-beta.4...blockly-v11.0.0-beta.5

blockly - blockly-v11.0.0-beta.4

Published by cpcallen 7 months ago

This is the third in an ongoing series of beta releases for the future v11 of Blockly. See information about the Blockly v11 Beta Program.

Wait, -beta.4? What happened to .2 and .3?

The keen npmjs.com watches amongst you (hi, @dependabot!) will have noted that, since the last publicly-announce beta, v11.0.0-beta.1, there have been two additional betas published to npmjs.com. These were created to facilitate development and testing of work in the blockly-samples repository, and all the changes from those two unpublicised releases are rolled into the changelist below.

Highlights in v11.0.0-beta.4

Valid entrypoints specified by exports directive in package.json

The most important change in v11.0.0-beta.4 is actually a change to the packaging, rather than the contents of the package.

Specifically, we have added an exports directive, to the package.json file, which definitively enumerates the valid entrypoints for the package. The purpose of this change is to prepare for the publication of ES module entrypoints, that will supplement (and ultimately supplant) the existing CommonJS module entrypoints, in future versions of Blockly.

Adding an exports section:

  • Allows us to definitively enumerate the permitted entrypoints for the package, disallowing direct importation of any other files.
  • Allows us to change which file each individual entrypoint actually loads without it necessarily being a breaking change.
  • Allows us to specify separate ESM entrypoints for subpaths (like blockly/javascript); without exports all subpath entrypoints must be either ESM or CJS and it is not possible to provide both.

Aside: module resolution

Module resolution is ultimately at the discretion of each JS runtime or build tool. Browsers, node.js, Webpack, Closure Compiler, etc. each have their own module resolution and loading implementations. The package.json file was originally for the benefit of npm in its role of installing packages and their dependencies, but now contains additional information (like the browser, exports, main, umd, and unpkg directives) that are honoured to varying degrees by different tools. It is therefore hard to say categorically what file(s) will be loaded by which tools without consulting each tool's documentation (and/or implementation), but amongst tools that have some kind of support for NPM packages, the exports directive appears to be widely and consistently supported.

Here is some of the relevant documentation for tools we expect Blockly developers are likely to use:

Valid entrypoints and what they provide

BREAKING CHANGE: The introduction of an exports directive means that correctly-behaved tools (node.js, bundlers like webpack, etc.) will only allow importing of the specified entrypoints. Here is the full list of permitted entrypoints that can be imported or required:

  • blockly
  • blockly/core
  • blockly/blocks
  • blockly/dart
  • blockly/lua
  • blockly/javascript
  • blockly/php
  • blockly/python
  • blockly/msg/<lang>, for all supported language codes <lang> (e.g blockly/msg/en, blockly/msg/fr, blockly/msg/de, etc.)

If you previously imported any other paths from the blockly package you will need to update your imports. Here are the most common paths that may have been used, and their correct replacements:

If you previously imported: Import instead:
blockly/index.js blockly
blockly/node.js blockly
blockly/browser.js blockly
blockly/blockly.min This file should only be loaded as a <script>.
blockly/core.js blockly/core
blockly/core-browser.js blockly/core
blockly/blockly_compressed.js blockly/core
blockly/blocks.js blockly/blocks
blockly/blocks_compressed.js blockly/blocks
blockly/dart.js blockly/dart
blockly/dart_compressed.js blockly/dart
blockly/lua.js blockly/lua
blockly/lua_compressed.js blockly/lua
blockly/javascript.js blockly/javascript
blockly/javascript_compressed.js blockly/javascript
blockly/php.js blockly/php
blockly/php_compressed.js blockly/php
blockly/python.js blockly/python
blockly/python_compressed.js blockly/python
blockly/msg/en.js blockly/msg/en

If you are loading Blockly as a script you should continue to load the compiled chunks (blockly_compressed.js, blocks_compressed.js, javascript_compressed.js, etc.) directly, or load blockly.min.js which is just a concatenation of blockly_compressed.js, msg/en.js, blocks_compressed.js, and javascript_generator.js.

(Prior to v11 there were various entrypoint wrappers provided in the form of UMD modules (e.g. blockly.js, javascript.js, etc.) but loading these as as scripts never did anything useful and, as they are no longer needed, they have been deleted.)

BREAKING CHANGE: Prior to v11, importing the main blockly package would import blockly/core, blockly/blocks, blockly/msg/en and blockly/javascript—and additionally, in node.js, also blockly/dart, blockly/lua, blockly/php and blockly/python.

Now the main blockly package entrypoint never loads any of the generators.

This change has been made because of changes to generator exports made in blockly v9.0.0 that make necessary to always separately import generator modules in order to use them.

Note that this change does not affect loading the blockly package via <script src="https://unpkg.com/blockly">; that continues to load to blockly.min.js, which continues to include javascript_compressed.js which (when loaded as a script) makes itself available via Blockly.JavaScript for backwards compatibility.

Field, block and generator changes

BREAKING CHANGE: The angle, colour and multiline input fields (FieldAngle, FieldColour and FieldMultilineInput respectively) have been deleted from Blockly. All three are now provided as plugins. The blocks associated with the colour field and multiline text field have been moved to the field plugins, which now provide documentation on how to install the blocks.

BREAKING CHANGE: Code emitted by the LuaGenerator now uses nil instead of None. This may break some user's downstream block programs if they are assigning to a variable called None and then initializing lists with empty inputs expecting them to contain the value assigned to None.

Other changes

There were also breaking changes to block disposal and to certain CSS classes, as well as other changes made for v11 and/or rolled up from v10; see below for the complete list.

What's Changed

Breaking changes 🛠

New features ✨

Bug fixes 🐛

Other changes

New Contributors

Full Changelog: https://github.com/google/blockly/compare/blockly-v11.0.0-beta.1...blockly-v11.0.0-beta.4
All changes to date in v11:: https://github.com/google/blockly/compare/blockly-v10.4.3...blockly-v11.0.0-beta.4

blockly - blockly-v10.4.3

Published by BeksOmega 7 months ago

What's Changed

Other changes

Full Changelog: https://github.com/google/blockly/compare/blockly-v10.4.2...blockly-v10.4.3

blockly - blockly-v10.4.2

Published by maribethb 8 months ago

This is a patch release that addresses minor issues with dragging that were introduced in v10.4.0.

What's Changed

Bug fixes 🐛

Full Changelog: https://github.com/google/blockly/compare/blockly-v10.4.1...blockly-v10.4.2

blockly - blockly-v10.4.1

Published by maribethb 8 months ago

What's Changed

Bug Fixes

Other changes

Full Changelog: https://github.com/google/blockly/compare/blockly-v10.4.0...blockly-v10.4.1

blockly - blockly-v10.4.0

Published by maribethb 8 months ago

Blockly v10.4.0

  • This release contains mostly bug fixes and improvements!
  • New feature: custom connection previewers allow you to change how pending connections are visualized to users. Check out the documentation to learn more.
  • Note if you use TypeScript: we now export the JavascriptGenerator (and similiar for other languages) class in TypeScript, complete with its accurate typings. We were not previously exporting this class in our TS definition files, so it wasn't accessible from TS code at all. Do note that we are still exporting the instance of those classes (javascriptGenerator and friends) typed as any so as not to introduce breaking type changes. You'll get accurate typings for the instances as well coming in v11!

What's Changed

New features ✨

Bug fixes 🐛

New Contributors

Full Changelog: https://github.com/google/blockly/compare/blockly-v10.3.1...blockly-v10.4.0

blockly - blockly-v10.3.1

Published by maribethb 9 months ago

What's Changed

Bug fixes 🐛

Full Changelog: https://github.com/google/blockly/compare/blockly-v10.3.0...blockly-v10.3.1

blockly - blockly-v11.0.0-beta.1

Published by cpcallen 9 months ago

This is the second in what we expect will be a series of beta releases for the future v11 of Blockly. See information about the Blockly v11 Beta Program.

Highlights in v11.0.0-beta.1

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!

What's Changed

Bug fixes 🐛

Full Changelog: https://github.com/google/blockly/compare/blockly-v11.0.0-beta.0...blockly-v11.0.0-beta.1

blockly - blockly-v11.0.0-beta.0

Published by cpcallen 10 months ago

This is the first in what we expect will be a series of beta releases for the future v11 of Blockly.

Blockly v11 Beta Program

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:

  • So that you can prepare modifications to your projects as required in response to the breaking changes we're planning to include in v11.
  • So that you can give us early feedback about issues you encounter. We're interested in reports of any kind of bug, of course, but we're especially interested in hearing if a breaking change we're planning for v11 turns out to create intractable difficulties in upgrading your project(s).

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.

Highlights in v11.0.0-beta.0

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).

What's Changed

Breaking changes 🛠

Bug fixes 🐛

New Contributors

Full Changelog: https://github.com/google/blockly/compare/blockly-v10.3.0...blockly-v11.0.0-beta.0

blockly - blockly-v10.3.0

Published by BeksOmega 11 months ago

What's Changed

New features ✨

Bug fixes 🐛

Cleanup ♻️

Reverted changes ⎌

Other changes

New Contributors

Full Changelog: https://github.com/google/blockly/compare/blockly-v10.2.2...blockly-v10.3.0

blockly - blockly-v10.2.2

Published by BeksOmega about 1 year ago

What's Changed

Other changes

Full Changelog: https://github.com/google/blockly/compare/blockly-v10.2.1...blockly-v10.2.2

blockly - blockly-v10.2.1

Published by rachel-fenichel about 1 year ago

What's Changed

Other changes

Full Changelog: https://github.com/google/blockly/compare/blockly-v10.2.0...blockly-v10.2.1

blockly - blockly-v10.2.0

Published by rachel-fenichel about 1 year ago

What's Changed

This was a minor release!

Deprecations 🧹 - APIs that may be removed in future releases

New features ✨

Bug fixes 🐛

Cleanup ♻️

Other changes

New Contributors

Full Changelog: https://github.com/google/blockly/compare/blockly-v10.1.3...blockly-v10.2.0

blockly - blockly-v10.1.3

Published by rachel-fenichel about 1 year ago

This patch release rolls back a change to the serialization of insertion markers. The change set blocks to be insertion markers after their extra state was loaded, rather than before.

The issue was reported in https://github.com/google/blockly-samples/issues/1856 and this release rolls back the change. We will roll this change forward at our next breaking release.

What's Changed

Other changes

Revert "fix: insertion marker's next blocks become real block (https://github.com/google/blockly/pull/7384)"

Revert "feat: Insertion marker json deserialization 7316 ( https://github.com/google/blockly/pull/7364 )" "

Full Changelog: https://github.com/google/blockly/compare/blockly-v10.1.0...blockly-v10.1.3

blockly - blockly-v10.1.2

Published by ericblackmonGoogle about 1 year ago

What's Changed

Bug fixes 🐛

New Contributors

Full Changelog: https://github.com/google/blockly/compare/blockly-v10.1.1...blockly-v10.1.2

blockly - blockly-v10.1.1

Published by ericblackmonGoogle about 1 year ago

What's Changed

Other changes

Full Changelog: https://github.com/google/blockly/compare/blockly-v10.1.0...blockly-v10.1.1