Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: Patch #3 for Q4 2021 release #5925

Merged
merged 2 commits into from
Feb 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions blockly_compressed.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion blockly_compressed.js.map

Large diffs are not rendered by default.

31 changes: 22 additions & 9 deletions blocks/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,26 @@
'use strict';

goog.module('Blockly.blocks.all');
goog.module.declareLegacyNamespace();

const colour = goog.require('Blockly.blocks.colour');
const lists = goog.require('Blockly.blocks.lists');
const logic = goog.require('Blockly.blocks.logic');
const loops = goog.require('Blockly.blocks.loops');
const math = goog.require('Blockly.blocks.math');
const procedures = goog.require('Blockly.blocks.procedures');
const texts = goog.require('Blockly.blocks.texts');
const variables = goog.require('Blockly.blocks.variables');
const variablesDynamic = goog.require('Blockly.blocks.variablesDynamic');


exports.colour = colour;
exports.lists = lists;
exports.logic = logic;
exports.loops = loops;
exports.math = math;
exports.procedures = procedures;
exports.texts = texts;
exports.variables = variables;
exports.variablesDynamic = variablesDynamic;

goog.require('Blockly.blocks.colour');
goog.require('Blockly.blocks.lists');
goog.require('Blockly.blocks.logic');
goog.require('Blockly.blocks.loops');
goog.require('Blockly.blocks.math');
goog.require('Blockly.blocks.procedures');
goog.require('Blockly.blocks.texts');
goog.require('Blockly.blocks.variables');
goog.require('Blockly.blocks.variablesDynamic');
12 changes: 6 additions & 6 deletions blocks/loops.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,21 +287,21 @@ Extensions.register(
*
* // If using the Blockly npm package and es6 import syntax:
* import {loopTypes} from 'blockly/blocks';
* loopTypes.push('custom_loop');
* loopTypes.add('custom_loop');
*
* // Else if using Closure Compiler and goog.modules:
* const {loopTypes} = goog.require('Blockly.blocks.loops');
* loopTypes.push('custom_loop');
* loopTypes.add('custom_loop');
*
* @type {!Array<string>}
* @type {!Set<string>}
*/
const loopTypes = [
const loopTypes = new Set([
'controls_repeat',
'controls_repeat_ext',
'controls_forEach',
'controls_for',
'controls_whileUntil',
];
]);
exports.loopTypes = loopTypes;

/**
Expand All @@ -321,7 +321,7 @@ const CONTROL_FLOW_IN_LOOP_CHECK_MIXIN = {
getSurroundLoop: function() {
let block = this;
do {
if (loopTypes.includes(block.type)) {
if (loopTypes.has(block.type)) {
return block;
}
block = block.getSurroundParent();
Expand Down
11 changes: 6 additions & 5 deletions blocks_compressed.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion blocks_compressed.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "blockly",
"version": "7.20211209.2",
"version": "7.20211209.3",
"description": "Blockly is a library for building visual programming editors.",
"keywords": [
"blockly"
Expand Down
6 changes: 3 additions & 3 deletions scripts/gulpfiles/build_tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ const chunks = [
}, {
name: 'blocks',
entry: 'blocks/all.js',
exports: 'Blockly.Blocks',
exports: 'Blockly.blocks.all',
importAs: 'BlocklyBlocks',
}, {
name: 'javascript',
Expand Down Expand Up @@ -314,7 +314,7 @@ function chunkWrapper(chunk) {
const cjsDeps = fileNames.map(f => `require(${f})`).join(', ');
const browserDeps =
chunk.dependencies.map(d => `root.${d.exports}`).join(', ');
const imports = chunk.dependencies.map(d => d.importAs).join(', ');
const factoryParams = chunk.dependencies.map(d => d.importAs).join(', ');
return `// Do not edit this file; automatically generated.

/* eslint-disable */
Expand All @@ -326,7 +326,7 @@ function chunkWrapper(chunk) {
} else { // Browser
root.${chunk.exports} = factory(${browserDeps});
}
}(this, function(${imports}) {
}(this, function(${factoryParams}) {
${chunk.factoryPreamble || FACTORY_PREAMBLE}
%output%
${chunk.factoryPostamble || FACTORY_POSTAMBLE}
Expand Down
2 changes: 1 addition & 1 deletion tests/deps.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.