fix: remove deprecated use of objectUtils from generators (#6499)

This commit is contained in:
Maribeth Bottorff
2022-10-06 13:05:00 -07:00
committed by GitHub
parent ce3ec78501
commit 224af0aa6b
3 changed files with 3 additions and 6 deletions

View File

@@ -13,7 +13,6 @@
goog.module('Blockly.JavaScript'); goog.module('Blockly.JavaScript');
const Variables = goog.require('Blockly.Variables'); const Variables = goog.require('Blockly.Variables');
const objectUtils = goog.require('Blockly.utils.object');
const stringUtils = goog.require('Blockly.utils.string'); const stringUtils = goog.require('Blockly.utils.string');
const {Block} = goog.requireType('Blockly.Block'); const {Block} = goog.requireType('Blockly.Block');
const {Generator} = goog.require('Blockly.Generator'); const {Generator} = goog.require('Blockly.Generator');
@@ -169,7 +168,7 @@ JavaScript.init = function(workspace) {
*/ */
JavaScript.finish = function(code) { JavaScript.finish = function(code) {
// Convert the definitions dictionary into a list. // Convert the definitions dictionary into a list.
const definitions = objectUtils.values(this.definitions_); const definitions = Object.values(this.definitions_);
// Call Blockly.Generator's finish. // Call Blockly.Generator's finish.
code = Object.getPrototypeOf(this).finish.call(this, code); code = Object.getPrototypeOf(this).finish.call(this, code);
this.isInitialized = false; this.isInitialized = false;

View File

@@ -13,7 +13,6 @@
goog.module('Blockly.Lua'); goog.module('Blockly.Lua');
const objectUtils = goog.require('Blockly.utils.object');
const stringUtils = goog.require('Blockly.utils.string'); const stringUtils = goog.require('Blockly.utils.string');
const {Block} = goog.requireType('Blockly.Block'); const {Block} = goog.requireType('Blockly.Block');
const {Generator} = goog.require('Blockly.Generator'); const {Generator} = goog.require('Blockly.Generator');
@@ -115,7 +114,7 @@ Lua.init = function(workspace) {
*/ */
Lua.finish = function(code) { Lua.finish = function(code) {
// Convert the definitions dictionary into a list. // Convert the definitions dictionary into a list.
const definitions = objectUtils.values(this.definitions_); const definitions = Object.values(this.definitions_);
// Call Blockly.Generator's finish. // Call Blockly.Generator's finish.
code = Object.getPrototypeOf(this).finish.call(this, code); code = Object.getPrototypeOf(this).finish.call(this, code);
this.isInitialized = false; this.isInitialized = false;

View File

@@ -12,7 +12,6 @@
goog.module('Blockly.PHP'); goog.module('Blockly.PHP');
const objectUtils = goog.require('Blockly.utils.object');
const stringUtils = goog.require('Blockly.utils.string'); const stringUtils = goog.require('Blockly.utils.string');
const {Block} = goog.requireType('Blockly.Block'); const {Block} = goog.requireType('Blockly.Block');
const {Generator} = goog.require('Blockly.Generator'); const {Generator} = goog.require('Blockly.Generator');
@@ -154,7 +153,7 @@ PHP.init = function(workspace) {
*/ */
PHP.finish = function(code) { PHP.finish = function(code) {
// Convert the definitions dictionary into a list. // Convert the definitions dictionary into a list.
const definitions = objectUtils.values(this.definitions_); const definitions = Object.values(this.definitions_);
// Call Blockly.Generator's finish. // Call Blockly.Generator's finish.
code = Object.getPrototypeOf(this).finish.call(this, code); code = Object.getPrototypeOf(this).finish.call(this, code);
this.isInitialized = false; this.isInitialized = false;