Skip to content

Commit 735959d

Browse files
authored
chore(deps): Update blockly dev dependency to blockly@12.0.0-beta.4 (#2504)
* fix: Fix clean:node script This was inadvertently broken by a mistranscription in PR #2453. * chore(deps): Update blockly to v12.0.0-beta.4 * fix(FieldColour): Fix type of FieldColour.prototype.isFullBlockField Method on superclass became public in v12.0.0. * fix(FieldMultilineInput): Use string literal instead of Field.NBSP Workaround for removal of that constant in RaspberryPiFoundation/blockly#8738. * fix(FieldGridDropdown): Fix type error caused by separators
1 parent b79274d commit 735959d

7 files changed

Lines changed: 20 additions & 14 deletions

File tree

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"@eslint/js": "^8.49.0",
3737
"@typescript-eslint/eslint-plugin": "^6.7.2",
3838
"@typescript-eslint/parser": "^6.7.2",
39-
"blockly": "^12.0.0-beta.1",
39+
"blockly": "^12.0.0-beta.4",
4040
"conventional-changelog-conventionalcommits": "^5.0.0",
4141
"eslint": "^8.49.0",
4242
"eslint-config-google": "^0.14.0",

plugins/field-colour/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"typescript": "^5.4.5"
4949
},
5050
"peerDependencies": {
51-
"blockly": "^11.0.0"
51+
"blockly": "^12.0.0"
5252
},
5353
"publishConfig": {
5454
"access": "public",

plugins/field-colour/src/field_colour.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ export class FieldColour extends Blockly.Field<string> {
209209
*
210210
* @returns True if this field should take up the full block. False otherwise.
211211
*/
212-
protected isFullBlockField(): boolean {
212+
override isFullBlockField(): boolean {
213213
const block = this.getSourceBlock();
214214
if (!block) throw new Blockly.UnattachedFieldError();
215215

plugins/field-grid-dropdown/src/grid.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7-
import {utils, browserEvents, MenuOption} from 'blockly/core';
7+
import {utils, browserEvents, MenuOption, FieldDropdown} from 'blockly/core';
88
import {GridItem} from './grid_item';
99

1010
/**
@@ -88,6 +88,9 @@ export class Grid {
8888
private populateItems(options: MenuOption[]) {
8989
let row = document.createElement('div');
9090
for (const [index, item] of options.entries()) {
91+
// TODO(#2507): Don't just ignore separators.
92+
if (item === FieldDropdown.SEPARATOR) continue;
93+
9194
if (index % this.columns === 0) {
9295
row = document.createElement('div');
9396
row.className = 'blocklyFieldGridRow';

plugins/field-multilineinput/src/field_multilineinput.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,11 @@ export class FieldMultilineInput extends Blockly.FieldTextInput {
163163
);
164164
}
165165
let textLines = this.getText();
166+
// TODO(google/blockly#8738): Use minimum-width setting mechanism
167+
// to be introduced in PR #9011.
166168
if (!textLines) {
167169
// Prevent the field from disappearing if empty.
168-
return Blockly.Field.NBSP;
170+
return '\u00A0'; // Non-breaking space.
169171
}
170172
const lines = textLines.split('\n');
171173
textLines = '';
@@ -182,7 +184,8 @@ export class FieldMultilineInput extends Blockly.FieldTextInput {
182184
}
183185
// Replace whitespace with non-breaking spaces so the text doesn't
184186
// collapse.
185-
text = text.replace(/\s/g, Blockly.Field.NBSP);
187+
// TODO(google/blockly#8738): Use Blockly.Field.NBSP.
188+
text = text.replace(/\s/g, '\u00A0'); // Non-breaking space.
186189

187190
textLines += text;
188191
if (i !== displayLinesNumber - 1) {

plugins/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"boot": "lerna bootstrap",
88
"build": "lerna run build",
99
"clean": "lerna run clean",
10-
"clean:node": "lerna run clean --yes",
10+
"clean:node": "lerna clean --yes",
1111
"postinstall": "npm run boot",
1212
"predeploy": "lerna run predeploy",
1313
"test": "lerna run test"

0 commit comments

Comments
 (0)