Skip to content

Commit

Permalink
### 4.6.15 (2020-05-23)
Browse files Browse the repository at this point in the history
* (bluefox) BREAKING: Please check "stopTimeout" blocks in your blockly scripts that the correct timeout name is listed there and correct after the update!
  • Loading branch information
GermanBluefox committed May 23, 2020
1 parent 13b2328 commit 0b115fe
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ And then call "npm run build".
- ...

## Changelog
### 4.6.15 (2020-05-22)
### 4.6.15 (2020-05-23)
* (bluefox) BREAKING: Please check "stopTimeout" blocks in your blockly scripts that the correct timeout name is listed there and correct after the update!

### 4.6.14 (2020-05-19)
Expand Down
14 changes: 13 additions & 1 deletion io-package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"common": {
"name": "javascript",
"version": "4.6.14",
"version": "4.6.15",
"title": "Script Engine",
"titleLang": {
"en": "Script Engine",
Expand All @@ -22,6 +22,18 @@
"AlCalzone"
],
"news": {
"4.6.15": {
"en": "BREAKING CHANGE: Please check \"stopTimeout\" blocks in your blockly scripts that the correct timeout name is listed there and correct after the update!",
"de": "BREAKING CHANGE: Bitte überprüfen Sie \"stopTimeout\" -Blöcke in Ihren Block-Skripten, ob der richtige Timeout-Name dort aufgeführt ist und korrigieren Sie ihn nach dem Update!",
"ru": "BREAKING CHANGE: Пожалуйста, проверьте блоки \"stopTimeout\" в ваших блочных скриптах, чтобы там было указано правильное имя тайм-аута и правильное после обновления!",
"pt": "BREAKING CHANGE: Verifique os blocos \"stopTimeout\" em seus scripts blockly para que o nome do tempo limite correto esteja listado lá e corrija após a atualização!",
"nl": "BREAKING CHANGE: Controleer de \"stopTimeout\" -blokken in je blockly-scripts om te zien of de juiste time-outnaam daar staat en corrigeer na de update!",
"fr": "RUPTURE DU CHANGEMENT: Veuillez vérifier les blocs \"stopTimeout\" dans vos scripts bloqués que le nom de timeout correct y est répertorié et corriger après la mise à jour!",
"it": "CAMBIAMENTO DI ROTTURA: Controlla i blocchi \"stopTimeout\" nei tuoi script di blocco che il nome di timeout corretto sia elencato lì e corretto dopo l'aggiornamento!",
"es": "CAMBIO DE INTERRUPCIÓN: ¡Compruebe los bloques \"stopTimeout\" en sus secuencias de comandos en bloque que el nombre de tiempo de espera correcto aparece allí y es correcto después de la actualización!",
"pl": "ZŁAMANIE ZMIANY: Sprawdź bloki „stopTimeout” w swoich skryptach blokowych, czy podana jest tam poprawna nazwa limitu czasu i poprawna po aktualizacji!",
"zh-cn": "突破性更改:请检查您的脚本块中的“ stopTimeout”块,其中列出了正确的超时名称,并在更新后正确!"
},
"4.6.14": {
"en": "Names for scripts can not have dots anymore. They will be replaced by \"_\"\n\"schedule\" name is not allowed for CRON\nConvert strings to Date by formatDate",
"de": "Namen für Skripte können keine Punkte mehr haben. Sie werden durch \"_\" ersetzt.\nDer Name \"Zeitplan\" ist für CRON nicht zulässig\nKonvertieren Sie Zeichenfolgen nach FormatDate in Datum",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iobroker.javascript",
"version": "4.6.14",
"version": "4.6.15",
"description": "Javascript/Coffescript Script Engine for ioBroker",
"author": "bluefox <[email protected]>",
"contributors": [
Expand Down
9 changes: 5 additions & 4 deletions src/public/google-blockly/own/blocks_timeout.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ Blockly.Blocks['timeouts_settimeout'] = {

Blockly.JavaScript['timeouts_settimeout'] = function(block) {
var delay = block.getFieldValue('DELAY');
var name = block.getFieldValue('NAME');
var name = Blockly.JavaScript.variableDB_.safeName_(block.getFieldValue('NAME'));
var unit = block.getFieldValue('UNIT');
if (unit === 'min') {
delay *= 60000;
Expand Down Expand Up @@ -198,7 +198,7 @@ Blockly.Blocks['timeouts_cleartimeout'] = {
};

Blockly.JavaScript['timeouts_cleartimeout'] = function(block) {
var name = block.getFieldValue('NAME');
var name = Blockly.JavaScript.variableDB_.safeName_(block.getFieldValue('NAME'));
return '(function () {if (' + name + ') {clearTimeout(' + name + '); ' + name + ' = null;}})();\n';
};

Expand Down Expand Up @@ -257,7 +257,7 @@ Blockly.Blocks['timeouts_setinterval'] = {

Blockly.JavaScript['timeouts_setinterval'] = function(block) {
var delay = block.getFieldValue('INTERVAL');
var name = block.getFieldValue('NAME');
var name = Blockly.JavaScript.variableDB_.safeName_(block.getFieldValue('NAME'));
var unit = block.getFieldValue('UNIT');
if (unit === 'min') {
delay *= 60000;
Expand Down Expand Up @@ -319,6 +319,7 @@ Blockly.Blocks['timeouts_clearinterval'] = {
};

Blockly.JavaScript['timeouts_clearinterval'] = function(block) {
var name = block.getFieldValue('NAME');
var name = Blockly.JavaScript.variableDB_.safeName_(block.getFieldValue('NAME'));

return '(function () {if (' + name + ') {clearInterval(' + name + '); ' + name + ' = null;}})();\n';
};
2 changes: 1 addition & 1 deletion src/public/google-blockly/own/blocks_trigger.js
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ Blockly.Blocks['schedule_create'] = {
};

Blockly.JavaScript['schedule_create'] = function (block) {
var name = block.getFieldValue('NAME');
var name = Blockly.JavaScript.variableDB_.safeName_(block.getFieldValue('NAME'));
var schedule = Blockly.JavaScript.valueToCode(block, 'SCHEDULE', Blockly.JavaScript.ORDER_ATOMIC);
var statements_name = Blockly.JavaScript.statementToCode(block, 'STATEMENT');

Expand Down

0 comments on commit 0b115fe

Please sign in to comment.