Commit Graph

8445 Commits

Author SHA1 Message Date
Christopher Allen
4ab8d00099 refactor(generators): Migrate JavaScript generators to TypeScript (#7602)
* refactor(generators): Migrate javascript_generator.js to TypeScript

* refactor(generators): Simplify getAdjusted

  Slightly simplify the implementation of getAdjusted, in part to
  make it more readable.  Also improve its JSDoc comment.

* refactor(generators): Migrate generators/javascript/* to TypeScript

  First pass doing very mechanistic migration, not attempting to fix
  all the resulting type errors.

* fix(generators): Fix type errors in generator functions

  This consists almost entirely of adding casts, so the code output
  by tsc should be as similar as possible to the pre-migration .js
  source files.

* refactor(generators): Migrate generators/javascript.js to TypeScript

  The way the generator functions are added to
  javascriptGenerator.forBlock has been modified so that incorrect
  generator function signatures will cause tsc to generate a type
  error.

* chore(generator): Format

  One block protected with // prettier-ignore to preserve careful
  comment formatting.

  Where there are repeated concatenations prettier has made a pretty
  mess of things, but the correct fix is probably to use template
  literals instead (rather than just locally disabling prettier).
  This has been added to the to-do list in #7600.

* fix(generators): Fixes for PR #7602

* fix(generators): Fix syntax error
2023-10-30 08:16:13 +00:00
Beka Westberg
7d2c307fed fix: widget positioning (#7507)
* chore: delete dead code

* chore: moves location updating into the block

* chore: change dragging to use update component locations

* fix: field widgets not being moved when blocks are editted

* chore: remove unnecessary resizeEditor_ calls

* chore: format

* chore: fix build

* fix: tests

* chore: PR comments

* chore: format
2023-10-26 09:47:39 -07:00
dependabot[bot]
e7dec4ae1b chore(deps): Bump webdriverio from 8.18.2 to 8.20.0 (#7604)
Bumps [webdriverio](https://github.com/webdriverio/webdriverio/tree/HEAD/packages/webdriverio) from 8.18.2 to 8.20.0.
- [Release notes](https://github.com/webdriverio/webdriverio/releases)
- [Changelog](https://github.com/webdriverio/webdriverio/blob/main/CHANGELOG.md)
- [Commits](https://github.com/webdriverio/webdriverio/commits/v8.20.0/packages/webdriverio)

---
updated-dependencies:
- dependency-name: webdriverio
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-23 08:59:20 -07:00
Hady Bazzi
c8cc33a01a fix: text join block warning when using block-plus-minus plugin (#7598) 2023-10-20 10:18:33 -07:00
Christopher Allen
582e19a0f1 fix(generators): Modify type signature of forBlock (#7555)
Make two changes to the forBlock dictionary on CodeGenerator
objects:

- Change the type of the second argument to the special 'this'
  type (was CodeGenerator), so that e.g. JS block generator
  functions can call JavascriptGenerator.prototype.getAdjusted
  (not defined on CodeGenerator).
- Change the way forBlock is declared from using an index
  signature to using the Record<> template type.  The two
  should be equivalent but for some reason the former provokes
  type errors when used with the 'this' type.

Additionally, deprecate the now-unused (but exported)
BlockGenerator type alias.

Technically the change of signaure is a breaking chnage, but
it is unlikely to affect any developers in practice, since
any block generator function (Block, CodeGenerator) => ...
can be substituted in for (Block, C extends CodeGenerator) =>
..., so any existing generator functions can still be added
to any CodeGenerator or subclass instance's .forBlock.  The
only situation in which this would be breaking is if a
developer was obtaining block generator functions
FROM a subclass instance's .forBlock dictionary and assuming
they were (Block CodeGenerator) => ...
2023-10-20 15:59:30 +01:00
Beka Westberg
b2688441fa chore: fix shouldStartNewRow docs and param names (#7558) 2023-10-18 09:29:08 -07:00
dependabot[bot]
0e95e45fee chore(deps): Bump webdriverio from 8.16.22 to 8.18.2 (#7596)
Bumps [webdriverio](https://github.com/webdriverio/webdriverio/tree/HEAD/packages/webdriverio) from 8.16.22 to 8.18.2.
- [Release notes](https://github.com/webdriverio/webdriverio/releases)
- [Changelog](https://github.com/webdriverio/webdriverio/blob/main/CHANGELOG.md)
- [Commits](https://github.com/webdriverio/webdriverio/commits/v8.18.2/packages/webdriverio)

---
updated-dependencies:
- dependency-name: webdriverio
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-17 13:57:58 -07:00
Oscar
3a03f4d11b fix: block creation successful with undefined messages (#7591)
closes #7589

Signed-off-by: Oscar <71343264+0scvr@users.noreply.github.com>
2023-10-17 11:19:17 -07:00
dependabot[bot]
ec4e6a2d30 chore(deps-dev): Bump undici from 5.22.1 to 5.26.3 (#7597)
Bumps [undici](https://github.com/nodejs/undici) from 5.22.1 to 5.26.3.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v5.22.1...v5.26.3)

---
updated-dependencies:
- dependency-name: undici
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-17 09:35:01 -07:00
dependabot[bot]
85037b810c chore(deps): Bump @typescript-eslint/eslint-plugin from 6.7.3 to 6.7.5 (#7595)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 6.7.3 to 6.7.5.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.7.5/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-16 08:47:09 -07:00
dependabot[bot]
f3ce2f9e0b chore(deps): Bump chai from 4.3.8 to 4.3.10 (#7594)
Bumps [chai](https://github.com/chaijs/chai) from 4.3.8 to 4.3.10.
- [Release notes](https://github.com/chaijs/chai/releases)
- [Changelog](https://github.com/chaijs/chai/blob/4.x.x/History.md)
- [Commits](https://github.com/chaijs/chai/compare/v4.3.8...v4.3.10)

---
updated-dependencies:
- dependency-name: chai
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-16 08:45:52 -07:00
Oscar
072c5f768f fix: bring block to front when icon clicked (#7590)
Closes #7588

Signed-off-by: Oscar <71343264+0scvr@users.noreply.github.com>
2023-10-13 17:22:34 -07:00
potaracom
1e3b5b4c76 fix: recreate dropdown div (#7572)
* fix: recreate dropdown div

* fix: recreate tooltip div

* fix: recreate widget div

* fix: Stop using global variables and use getDiv()

* Revert "fix: Stop using global variables and use getDiv()"

This reverts commit 322c4d884b.

* fix: reset widget div
2023-10-10 09:19:44 -07:00
Beka Westberg
6c2fbc1e75 Merge pull request #7586 from google/master
chore: Merge master back into develop following v10.2.2 release
2023-10-09 10:54:34 -07:00
Beka Westberg
925a7b9723 Merge pull request #7585 from google/rc/v10.2.2
release: v10.2.2
blockly-v10.2.2
2023-10-09 10:42:13 -07:00
Beka Westberg
865c5931e9 release: Update version number to 10.2.2 2023-10-09 17:36:17 +00:00
Beka Westberg
f2fc71ab6f fix: colour from colour picker not being updated (#7584)
* fix: colour from colour picker not being updated

* chore: clarify what code is doing
2023-10-09 17:35:07 +00:00
Beka Westberg
ab3bc6c3d8 fix: colour from colour picker not being updated (#7584)
* fix: colour from colour picker not being updated

* chore: clarify what code is doing
2023-10-09 10:34:06 -07:00
Minh Seikel
ed3decbb37 fix: Corrected typo from 'codefor' to 'code for' (#7549) 2023-10-09 08:29:40 -07:00
dependabot[bot]
2747ded233 chore(deps): Bump webdriverio from 8.16.7 to 8.16.22 (#7581)
Bumps [webdriverio](https://github.com/webdriverio/webdriverio/tree/HEAD/packages/webdriverio) from 8.16.7 to 8.16.22.
- [Release notes](https://github.com/webdriverio/webdriverio/releases)
- [Changelog](https://github.com/webdriverio/webdriverio/blob/main/CHANGELOG.md)
- [Commits](https://github.com/webdriverio/webdriverio/commits/v8.16.22/packages/webdriverio)

---
updated-dependencies:
- dependency-name: webdriverio
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-09 08:18:06 -07:00
dependabot[bot]
8d7fc1365a chore(deps): Bump @blockly/dev-tools from 7.0.3 to 7.1.0 (#7580)
Bumps [@blockly/dev-tools](https://github.com/google/blockly-samples/tree/HEAD/plugins/dev-tools) from 7.0.3 to 7.1.0.
- [Release notes](https://github.com/google/blockly-samples/releases)
- [Changelog](https://github.com/google/blockly-samples/blob/master/plugins/dev-tools/CHANGELOG.md)
- [Commits](https://github.com/google/blockly-samples/commits/@blockly/dev-tools@7.1.0/plugins/dev-tools)

---
updated-dependencies:
- dependency-name: "@blockly/dev-tools"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-09 08:17:49 -07:00
dependabot[bot]
ea253a0542 chore(deps): Bump eslint from 8.48.0 to 8.51.0 (#7579)
Bumps [eslint](https://github.com/eslint/eslint) from 8.48.0 to 8.51.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.48.0...v8.51.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-09 08:17:36 -07:00
dependabot[bot]
5dbde561be chore(deps): Bump @microsoft/api-documenter from 7.22.33 to 7.23.9 (#7577)
Bumps [@microsoft/api-documenter](https://github.com/microsoft/rushstack/tree/HEAD/apps/api-documenter) from 7.22.33 to 7.23.9.
- [Changelog](https://github.com/microsoft/rushstack/blob/main/apps/api-documenter/CHANGELOG.md)
- [Commits](https://github.com/microsoft/rushstack/commits/@microsoft/api-documenter_v7.23.9/apps/api-documenter)

---
updated-dependencies:
- dependency-name: "@microsoft/api-documenter"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-09 08:17:11 -07:00
dependabot[bot]
5ad6a587ec chore(deps): Bump rimraf from 5.0.1 to 5.0.5 (#7578)
Bumps [rimraf](https://github.com/isaacs/rimraf) from 5.0.1 to 5.0.5.
- [Changelog](https://github.com/isaacs/rimraf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/rimraf/compare/v5.0.1...v5.0.5)

---
updated-dependencies:
- dependency-name: rimraf
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-09 08:11:18 -07:00
Rachel Fenichel
9c7c71ad87 chore: merge master back into develop following v10.2.1 release
Merge pull request #7568 from google/master
2023-10-02 13:40:33 -07:00
Rachel Fenichel
ead46e7403 release: v10.2.1
Merge pull request #7567 from google/rc/v10.2.1
blockly-v10.2.1
2023-10-02 13:27:07 -07:00
Rachel Fenichel
f380159e35 release: Update version number to 10.2.1 2023-10-02 13:20:11 -07:00
Beka Westberg
8c44d84980 fix: color field sizing being incorrect (#7566)
(cherry picked from commit 5151b28e7d)
2023-10-02 13:19:21 -07:00
Beka Westberg
5151b28e7d fix: color field sizing being incorrect (#7566) 2023-10-02 13:16:03 -07:00
Trey Pisano
6b023b3a32 fix: comment change event fires block change event (#7505)
* add fire event to comment change

* change variable names to make readable

* add oldtext field to commenticon

* remove debugger

* remove oldtext field

* add firing block change event to setText

* add fire to setText

* fix: setCommentText fire block change when icon removed

* remove whitespace

* NOT PASSING TESTS: fix block test fails

* fix: remove duplicate events so tests pass

* fix: remove whitespace

* fix: run format

* refactor: add early returns to onTextChange for readability

* remove console.log

* disable events temporarily when setText called in setCommentText

* refactor: move fire event to original position

* fix: run format

* fix: move fire event so it happpens after events are enabled and disabled
2023-10-02 13:14:12 -07:00
dependabot[bot]
c455e0c1e5 chore(deps): Bump eslint-plugin-jsdoc from 46.6.0 to 46.8.2 (#7512)
Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 46.6.0 to 46.8.2.
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Changelog](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/.releaserc)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v46.6.0...v46.8.2)

---
updated-dependencies:
- dependency-name: eslint-plugin-jsdoc
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-02 09:28:15 -07:00
dependabot[bot]
761c24c922 chore(deps): Bump @microsoft/api-extractor from 7.37.0 to 7.38.0 (#7564)
Bumps [@microsoft/api-extractor](https://github.com/microsoft/rushstack/tree/HEAD/apps/api-extractor) from 7.37.0 to 7.38.0.
- [Changelog](https://github.com/microsoft/rushstack/blob/main/apps/api-extractor/CHANGELOG.md)
- [Commits](https://github.com/microsoft/rushstack/commits/@microsoft/api-extractor_v7.38.0/apps/api-extractor)

---
updated-dependencies:
- dependency-name: "@microsoft/api-extractor"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-02 09:27:35 -07:00
dependabot[bot]
bf53b3a053 chore(deps): Bump glob from 10.3.4 to 10.3.10 (#7565)
Bumps [glob](https://github.com/isaacs/node-glob) from 10.3.4 to 10.3.10.
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/node-glob/compare/v10.3.4...v10.3.10)

---
updated-dependencies:
- dependency-name: glob
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-02 09:27:15 -07:00
dependabot[bot]
787ac1bc36 chore(deps): Bump @typescript-eslint/eslint-plugin from 6.6.0 to 6.7.3 (#7563)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 6.6.0 to 6.7.3.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.7.3/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-02 09:26:42 -07:00
Sanskar Mundhra
04fa799650 chore: remove bump script from package.json (#7548)
* Removed bump script from package.json #7543

* chore: remove bump script from package.json

* chore: remove bump script from package.json
2023-09-29 14:58:05 -07:00
Rachel Fenichel
971bc1107b fix: missing loaders for appengine deployment (#7560) 2023-09-29 10:57:58 -07:00
Rachel Fenichel
cf5d9985c7 fix: include loaders in gh-pages commits (#7559) 2023-09-29 10:29:41 -07:00
Maribeth Bottorff
ca4fa7e4fb fix: style attribute for xml in ws factory (#7554) 2023-09-28 15:21:26 -07:00
Christopher Allen
cc47c3a8af chore(tests): Fix whitespace inconsistency (#7553) 2023-09-28 19:19:04 +00:00
Rachel Fenichel
099abfe0e5 chore: merge master back into develop following v10.2.0 release
Merge pull request #7552 from google/master
2023-09-28 11:24:03 -07:00
dependabot[bot]
e50d4f9fb0 chore(deps): Bump @microsoft/api-extractor from 7.35.4 to 7.37.0 (#7510)
Bumps [@microsoft/api-extractor](https://github.com/microsoft/rushstack/tree/HEAD/apps/api-extractor) from 7.35.4 to 7.37.0.
- [Changelog](https://github.com/microsoft/rushstack/blob/main/apps/api-extractor/CHANGELOG.md)
- [Commits](https://github.com/microsoft/rushstack/commits/@microsoft/api-extractor_v7.37.0/apps/api-extractor)

---
updated-dependencies:
- dependency-name: "@microsoft/api-extractor"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-28 19:07:23 +01:00
Rachel Fenichel
2308da84b5 release: v10.2.0
Merge pull request #7542 from google/rc/v10.2.0
2023-09-28 11:03:51 -07:00
Christopher Allen
f8bd6bed53 fix(build): Fix sourcemaps, re-update metadata (#7550)
* fix(build): Revert "refactor: Remove $build$src infix from munged paths"

  This is a mostly-manual revert of commit
  06d78af6a4 to fix an issue where
  the generated sourcemaps are missing the inline copies of the
  original .ts source files.

* chore: Update metadata for 2020 Q3 release

  This is being done a second time as the revert of 06d78af causes a
  significant increase in the size of the build products.
2023-09-28 10:48:59 -07:00
Christopher Allen
cd6b14e994 fix(build): Fix sourcemaps, re-update metadata (#7550)
* fix(build): Revert "refactor: Remove $build$src infix from munged paths"

  This is a mostly-manual revert of commit
  06d78af6a4 to fix an issue where
  the generated sourcemaps are missing the inline copies of the
  original .ts source files.

* chore: Update metadata for 2020 Q3 release

  This is being done a second time as the revert of 06d78af causes a
  significant increase in the size of the build products.
2023-09-28 08:35:27 -07:00
Christopher Allen
c62f3350d8 fix(build): Fix broken npm install of Closure Compiler (#7547) 2023-09-27 10:35:33 -07:00
Christopher Allen
8b20f5321b fix(build): Fix broken npm install of Closure Compiler (#7547) 2023-09-27 09:52:06 -07:00
Maribeth Bottorff
57a691a821 chore: fix formatting for welcome action (#7545)
* chore: fix formatting for welcome action

* chore: format
2023-09-26 22:15:53 +00:00
Rachel Fenichel
3c99c38c07 release: Update version number to 10.2.0 2023-09-25 11:30:59 -07:00
Rachel Fenichel
13a05cf1ea release: Merge branch 'develop' into rc/v10.2.0 2023-09-25 11:30:06 -07:00
dependabot[bot]
fd873507eb chore(deps): Bump concurrently from 8.2.0 to 8.2.1 (#7509)
Bumps [concurrently](https://github.com/open-cli-tools/concurrently) from 8.2.0 to 8.2.1.
- [Release notes](https://github.com/open-cli-tools/concurrently/releases)
- [Commits](https://github.com/open-cli-tools/concurrently/compare/v8.2.0...v8.2.1)

---
updated-dependencies:
- dependency-name: concurrently
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-25 11:28:33 -07:00