Skip to content

Commit

Permalink
release: v10.0.1
Browse files Browse the repository at this point in the history
Merge pull request #7270 from google/rc/v10.0.1
  • Loading branch information
ericblackmonGoogle authored Jul 10, 2023
2 parents d832085 + 82e8697 commit 2042334
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 5 deletions.
74 changes: 72 additions & 2 deletions core/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,79 @@

goog.module('Blockly.main');

/** @suppress {extraRequire} */
goog.require('Blockly');
const Blockly = goog.require('Blockly');
const Msg = goog.require('Blockly.Msg');
const colour = goog.require('Blockly.utils.colour');
const deprecation = goog.require('Blockly.utils.deprecation');

/*
* Aliased functions and properties that used to be on the Blockly namespace.
* Everything in this section is deprecated. Both external and internal code
* should avoid using these functions and use the designated replacements.
* Everything in this section will be removed in a future version of Blockly.
*/

// Add accessors for properties on Blockly that have now been deprecated.
Object.defineProperties(Blockly, {
/**
* The richness of block colours, regardless of the hue.
* Must be in the range of 0 (inclusive) to 1 (exclusive).
* @name Blockly.HSV_SATURATION
* @type {number}
* @deprecated Use Blockly.colour.getHsvSaturation() / .setHsvSaturation(
* instead. (July 2023)
* @suppress {checkTypes}
*/
HSV_SATURATION: {
get: function () {
deprecation.warn(
'Blockly.HSV_SATURATION',
'version 10',
'version 11',
'Blockly.colour.getHsvSaturation()'
);
return colour.getHsvSaturation();
},
set: function (newValue) {
deprecation.warn(
'Blockly.HSV_SATURATION',
'version 10',
'version 11',
'Blockly.colour.setHsvSaturation()'
);
colour.setHsvSaturation(newValue);
},
},
/**
* The intensity of block colours, regardless of the hue.
* Must be in the range of 0 (inclusive) to 1 (exclusive).
* @name Blockly.HSV_VALUE
* @type {number}
* @deprecated Use Blockly.colour.getHsvValue() / .setHsvValue instead.
* (July 2023)
* @suppress {checkTypes}
*/
HSV_VALUE: {
get: function () {
deprecation.warn(
'Blockly.HSV_VALUE',
'version 10',
'version 11',
'Blockly.colour.getHsvValue()'
);
return colour.getHsvValue();
},
set: function (newValue) {
deprecation.warn(
'Blockly.HSV_VALUE',
'version 10',
'version 11',
'Blockly.colour.setHsvValue()'
);
colour.setHsvValue(newValue);
},
},
});

// If Blockly is compiled with ADVANCED_COMPILATION and/or loaded as a
// CJS or ES module there will not be a Blockly global variable
Expand Down
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": "10.0.0",
"version": "10.0.1",
"description": "Blockly is a library for building visual programming editors.",
"keywords": [
"blockly"
Expand Down

0 comments on commit 2042334

Please sign in to comment.