Commit Graph

8201 Commits

Author SHA1 Message Date
dependabot[bot]
4b81c23568 chore(deps): Bump @wdio/selenium-standalone-service (#7457)
Bumps [@wdio/selenium-standalone-service](https://github.com/webdriverio/webdriverio/tree/HEAD/packages/wdio-seleniun-standalone-service) from 8.11.0 to 8.15.0.
- [Release notes](https://github.com/webdriverio/webdriverio/releases)
- [Commits](https://github.com/webdriverio/webdriverio/commits/v8.15.0/packages/wdio-seleniun-standalone-service)

---
updated-dependencies:
- dependency-name: "@wdio/selenium-standalone-service"
  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-05 08:55:08 -07:00
Clément Contet
a2a9ab1da4 fix: insertion marker position when connection is resized (#7426) 2023-09-04 21:07:11 +02:00
Maribeth Bottorff
68261e5dd9 feat: add getVariableName and getProcedureName to CodeGenerator (#7445)
* feat: add getVariableName and getProcedureName to CodeGenerator

* feat: make nameDB_ public

* feat: update block code generators to use new APIs

* chore: fix build

* chore: remove unused imports
2023-08-31 10:49:17 -07:00
Christopher Allen
b0a7c004a9 refactor(build): Delete Closure Library (#7415)
* fix(build): Restore erroneously-deleted filter function

  This was deleted in PR #7406 as it was mainly being used to
  filter core/ vs. test/mocha/ deps into separate deps files -
  but it turns out also to be used for filtering error
  messages too.  Oops.

* refactor(tests): Migrate advanced compilation test to ES Modules

* refactor(build): Migrate main.js to TypeScript

  This turns out to be pretty straight forward, even if it would
  cause crashing if one actually tried to import this module
  instead of just feeding it to Closure Compiler.

* chore(build): Remove goog.declareModuleId calls

  Replace goog.declareModuleId calls with a comment recording the
  former module ID for posterity (or at least until we decide
  how to reformat the renamings file.

* chore(tests): Delete closure/goog/*

  For the moment we still need something to serve as base.js for
  the benefit of closure-make-deps, so we keep a vestigial
  base.js around, containing only the @provideGoog declaration.

* refactor(build): Remove vestigial base.js

  By changing slightly the command line arguments to
  closure-make-deps and closure-calculate-chunks the need to have
  any base.js is eliminated.

* chore: Typo fix for PR #7415
2023-08-31 00:24:47 +01:00
Christopher Allen
be809d9d98 refactor(tests): Migrate generator tests to import shims; delete bootstrap.js (#7414)
* refactor(tests): Use shims instead of bootstrap to load Blockly

  - Modify tests/generators/index.html to import the test shims
    instead of using bootstrap.js to load Blockly.

  - Modify test/generators/webdriver.js to have it wait for the
    workspace to exist before calling loadSelected().  There was
    previously a race which index.html had been winning, but
    now webdriver.js is winning (and the tests failing because
    there is no workspace yet when start() is called.

* chore(tests): Delete bootstrap.js etc.

  - Delete bootstrap.js, bootstrap_helper.js, and bootstrap_done.mjs.
  - Remove remaining references to bootstrap.js

* refactor(build): Remove deps npm script

  buildDeps is now only needed by buildCompiled, not ever for
  runnning in uncompressed mode, so:

  - Remove the deps gulp task (and the deps npm script.
  - Have the minify task run buildJavaScript and buildDeps directly.

  Additionally, the buildAdvanceCompilationTest target hasn't
  needed deps.js for some time (if ever), so skip having it run
  buildDeps entirely.

* refactor(build): Repatriate DEPS_FILE to build_tasks.js

  Since this is no longer used anywhere else it doesn't need to
  live in common.js.

* fix(scripts): Remove vestigial references to deps.mocha.js

* docs(tests): Add additional explanatory note
2023-08-31 00:02:58 +01:00
dependabot[bot]
7e9d1eb3ba chore(deps): Bump typescript from 5.1.3 to 5.2.2 (#7440)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.1.3 to 5.2.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.1.3...v5.2.2)

---
updated-dependencies:
- dependency-name: typescript
  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-08-30 08:59:12 -07:00
dependabot[bot]
7ddbb83e68 chore(deps): Bump eslint from 8.43.0 to 8.48.0 (#7436)
Bumps [eslint](https://github.com/eslint/eslint) from 8.43.0 to 8.48.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.43.0...v8.48.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-08-30 08:58:13 -07:00
Beka Westberg
8193cffe77 chore: clean up mutator tests (#7434)
* chore: work on cleaning up mutator tests

* chore: remove need for dragBlockSelector

* chore: add helpers to clean up tests

* chore: add issue link in TODO

* chore: format and add docs for new helpers

* Revert "chore: remove need for dragBlockSelector"

This reverts commit dfec88a6aa.

* chore: fixup connect helper
2023-08-28 22:01:10 +00:00
Neil Fraser
650e620e2b Prevent raw content being served from storage. (#7443)
TODO: Detailed description to be added once deployed.
2023-08-28 09:56:57 -07:00
dependabot[bot]
fb6c3dc8b2 chore(deps): Bump @blockly/theme-modern from 5.0.0 to 5.0.1 (#7438)
Bumps [@blockly/theme-modern](https://github.com/google/blockly-samples/tree/HEAD/plugins/theme-modern) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/google/blockly-samples/releases)
- [Changelog](https://github.com/google/blockly-samples/blob/master/plugins/theme-modern/CHANGELOG.md)
- [Commits](https://github.com/google/blockly-samples/commits/@blockly/theme-modern@5.0.1/plugins/theme-modern)

---
updated-dependencies:
- dependency-name: "@blockly/theme-modern"
  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-08-28 08:23:45 -07:00
Rachel Fenichel
8823abd8f0 chore: Merge master back into develop following v10.1.3 release
chore: Merge master back into develop following v10.1.3 release
Merge pull request #7433 from google/master
2023-08-24 11:43:42 -07:00
Rachel Fenichel
e459984239 release: v10.1.3
Merge pull request #7431 from google/rc/v10.1.3
blockly-v10.1.3
2023-08-24 11:16:19 -07:00
Rachel Fenichel
3b6f8be4b5 release: Update version number to 10.1.3 2023-08-24 10:53:14 -07:00
Rachel Fenichel
6b666bd4ca Revert "feat: Insertion marker json deserialization 7316 (#7364)" (#7430)
This reverts commit 84215386fb.

(cherry picked from commit 51651dffe8)
2023-08-24 10:52:24 -07:00
Rachel Fenichel
316571a524 Revert "fix: insertion marker's next blocks become real block (#7384)" (#7429)
This reverts commit 18ee0ec41b.

(cherry picked from commit 9db853db76)
2023-08-24 10:52:24 -07:00
Rachel Fenichel
51651dffe8 Revert "feat: Insertion marker json deserialization 7316 (#7364)" (#7430)
This reverts commit 84215386fb.
2023-08-24 10:46:46 -07:00
Rachel Fenichel
9db853db76 Revert "fix: insertion marker's next blocks become real block (#7384)" (#7429)
This reverts commit 18ee0ec41b.
2023-08-24 10:41:17 -07:00
Beka Westberg
7e3472c305 fix: dragging blocks within a zoomed mutator (#7423) 2023-08-24 08:34:45 -07:00
dependabot[bot]
2fce8ad100 chore(deps): Bump @blockly/dev-tools from 7.0.2 to 7.0.3 (#7418)
Bumps [@blockly/dev-tools](https://github.com/google/blockly-samples/tree/HEAD/plugins/dev-tools) from 7.0.2 to 7.0.3.
- [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.0.3/plugins/dev-tools)

---
updated-dependencies:
- dependency-name: "@blockly/dev-tools"
  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-08-23 16:26:46 -07:00
dependabot[bot]
c8c1d2653c chore(deps): Bump eslint-config-prettier from 8.8.0 to 9.0.0 (#7419)
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 8.8.0 to 9.0.0.
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v8.8.0...v9.0.0)

---
updated-dependencies:
- dependency-name: eslint-config-prettier
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-23 16:25:13 -07:00
dependabot[bot]
9d85afc506 chore(deps): Bump eslint-plugin-jsdoc from 46.2.6 to 46.5.0 (#7417)
Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 46.2.6 to 46.5.0.
- [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.2.6...v46.5.0)

---
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-08-23 16:23:19 -07:00
Maribeth Bottorff
b9a7a0c7ad fix: do not create extra shadow blocks when mirroring events (#7427) 2023-08-23 16:20:40 -07:00
Rachel Fenichel
d6d1074f51 chore: make ordered argument optional for workspace_svg functions (#7425) 2023-08-22 11:24:11 -07:00
randrei12
93106777b0 feat: make ordered argument optional for workspace functions (#7424) 2023-08-22 10:28:10 -07:00
Aaron Dodson
9909868435 fix: Always draw dragged blocks atop others in the workspace. (#6874)
* fix: Always draw dragged blocks atop others in the workspace.

* chore: format

---------

Co-authored-by: Beka Westberg <bwestberg@google.com>
2023-08-21 14:58:30 -07:00
Beka Westberg
a0301a217a feat: make generator quoting methods public (#7392)
* feat: make quoting methods public

* feat: add quote and multilineQuote methods

* fix: update code generators to use new methods

* chore: remove aliases

* chore: revert changes to generators
2023-08-21 09:05:23 -07:00
dependabot[bot]
eebf19ca39 chore(deps): Bump @typescript-eslint/eslint-plugin from 6.1.0 to 6.4.0 (#7420)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 6.1.0 to 6.4.0.
- [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.4.0/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-08-21 08:27:41 -07:00
Rachel Fenichel
a38340bfdf chore(tests): set browser pause time in one place and enable toolbox tests (#7402)
* chore(tests): add a PAUSE_TIME constant for all test pauses

* chore(tests): respond to PR feedback
2023-08-18 17:13:32 -07:00
Christopher Allen
6f20ac290d refactor(tests): Use import instead of goog.bootstrap to load Blockly in mocha tests (#7406)
* fix(build): Have buildShims clean up up after itself

  We need to create a build/package.json file to allow node.js to
  load build/src/core/blockly.js and the other chunk entry points
  as ES modules (it forcibly assumes .js means CJS even if one is
  trying to import, unless package.json says {"type": "module"}),
  but this interferes with scripts/migration/js2ts doing a
  require('build/deps.js'), which is _not_ an ES module.

  Specific error message was:

  /Users/cpcallen/src/blockly/scripts/migration/js2ts:56
  require(path.resolve(__dirname, '../../build/deps.js'));
  ^

  Error [ERR_REQUIRE_ESM]: require() of ES Module
  /Users/cpcallen/src/blockly/build/deps.js from /Users/cpcallen/src/blockly/scripts/migration/js2ts
  not supported.
  deps.js is treated as an ES module file as it is a .js file whose
  nearest parent package.json contains "type": "module" which
  declares all .js files in that package scope as ES modules.
  Instead rename deps.js to end in .cjs, change the requiring code
  to use dynamic import() which is available in all CommonJS
  modules, or change "type": "module" to "type": "commonjs" in
  /Users/cpcallen/src/blockly/build/package.json to treat all .js
  files as CommonJS (using .mjs for all ES modules instead).

      at Object.<anonymous> (/Users/cpcallen/src/blockly/scripts/migration/js2ts:56:1) {
    code: 'ERR_REQUIRE_ESM'
  }

* chore(tests): Reorder to put interesting script nearer top of file

* chore(tests): Add missing imports of closure/goog/goog.js

  These modules were depending on being loaded via the
  debug module loader, which cannot be used without first loading
  base.js as a script, and thereby defining goog.declareModuleId
  as a side effect—but if they are to be loaded via direct import
  statements then they need to actually import their own
  dependencies.

  This is a temporary measure as soon the goog.declareMouleId
  calls can themselves be deleted.

* refactor(tests): Use import instead of bootstrap to load Blockly

* chores(build): Stop generating deps.mocha.js

  This file was only needed by tests/mocha/index.html's use of
  the debug module loader (via bootstrap.js), which has now been
  removed.

* chore(tests): Remove unneeded goog.declareModuleId calls

  These were only needed because these modules were previously
  being loaded by goog.require and/or goog.bootstrap.

* chores(tests): Remove dead code

  We are fully committed to proper modules now.
2023-08-18 18:06:52 +01:00
Beka Westberg
cb0f7032fd feat: add custom context menu rendering (#7409) 2023-08-17 14:50:41 -07:00
Rachel Fenichel
60aa99af53 chore: clean up measurement code in mini workspace bubble (#7408) 2023-08-17 13:00:25 -07:00
Beka Westberg
82f6ca5766 fix: saveConnections listener not being disposed (#7407) 2023-08-17 11:39:09 -07:00
Maribeth Bottorff
0dd814dee8 chore: update PR template and add info for new contribs (#7405)
* chore: update PR template and add info for new contribs

* chore: format

* chore: typo
2023-08-17 18:31:22 +00:00
Rachel Fenichel
d87386e235 chore: Update README.md (#7404)
Remove out of date info from readme.
2023-08-17 00:15:27 +00:00
Beka Westberg
b602f2163b feat: add accessors for the workspace svg group and block canvas (#7394) 2023-08-16 16:56:54 -07:00
dependabot[bot]
d5c71050c4 chore(deps): Bump @microsoft/api-documenter from 7.22.20 to 7.22.33 (#7386)
Bumps [@microsoft/api-documenter](https://github.com/microsoft/rushstack/tree/HEAD/apps/api-documenter) from 7.22.20 to 7.22.33.
- [Changelog](https://github.com/microsoft/rushstack/blob/main/apps/api-documenter/CHANGELOG.md)
- [Commits](https://github.com/microsoft/rushstack/commits/@microsoft/api-documenter_v7.22.33/apps/api-documenter)

---
updated-dependencies:
- dependency-name: "@microsoft/api-documenter"
  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-08-16 16:33:29 -07:00
Rachel Fenichel
10ab8738af chore: fix docs in FieldImage (#7403) 2023-08-16 16:30:58 -07:00
Beka Westberg
9efd944de7 fix: block change serialization (#7400) 2023-08-16 15:05:08 -07:00
Rachel Fenichel
d32a13cf3f fix(tests): wait for the workspace to render before starting test actions (#7399) 2023-08-16 14:30:05 -07:00
Beka Westberg
b4ce6afd2a feat: add doFullSerialization support to blocks (#7363)
* feat: add doFullSerialization support to blocks

* chore: PR comments
2023-08-16 09:30:13 -07:00
Christopher Allen
51be0760c3 fix(build): Fix import of parent chunk's shim (#7398)
In PR #7380 it was suggested[1] that the shims be renamed from
(e.g.) blockly.mjs to blockly.loader.mjs, and in commit 6f930f5
this was duly done, but alas one place was overlooked.

The problem was not spotted in local testing because the
blockly.mjs module that the blocks and generators chunks were
attempting to import did still exist on disk, left over from
before the change was made.

Running npm run clean would have revealed the issue but alas
that was not done.

[1] https://github.com/google/blockly/pull/7380#discussion_r1291667037
2023-08-16 08:29:48 -07:00
Beka Westberg
bb33531854 deprecate: workspace paste (#7356)
* fix: deprecate paste

* chore: add deprecation tag

* fix: add import lost in rebase

* chore: PR feedback

* chore: fix @deprecated tag
2023-08-15 13:12:12 -07:00
dependabot[bot]
754448a1df chore(deps): Bump patch-package from 7.0.0 to 8.0.0 (#7388)
Bumps [patch-package](https://github.com/ds300/patch-package) from 7.0.0 to 8.0.0.
- [Release notes](https://github.com/ds300/patch-package/releases)
- [Changelog](https://github.com/ds300/patch-package/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ds300/patch-package/compare/v7.0.0...v8.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-14 22:52:35 +01:00
Christopher Allen
5b5a56586c refactor(tests): Introduce loading shims, use in playgrounds (#7380)
* refactor(build): Simplify implementation of posixPath

* fix(closure): Make safe to import in node.js

  Make the implementation declareModlueId safe to import and
  execute in node.js, which does not provide a window global.

  (N.B. because this is an ESM and therefore automatically
  strict, using window?.goog?.declareModuleId doesn't work
  because window being undefined is an early error.)

* feat(tests): Introduce chunk loading shims

  - Add a buildShims task to build_tasks.js that, for each chunk,
    creates a correspondingly-named build/<chunk>.mjs that will
    either (in uncompressed mode) import and reexport that chunk's
    entry point module (e.g. core/blockly.js) or (in compressed
    mode) load dist/<chunk>_compressed.js using a <script> tag
    and then export the corresponding properties on the chunk's
    exports object.

  - Provide helper methods used by these shims in
    tests/scripts/loading.mjs, including code to detect whether
    to load in compressed or uncompressed mode.

  - Add a quote() function to scripts/helpers.js, used by
    buildShims.  This is copied from tests/bootstrap_helper.js,
    which will be removed in a later commit.

* refactor(tests): Update playground.html to use new loading shims

* refactor(tests): Update advanced_playground.html to use new loading shims

* refactor(tests): Update multi_playground.html to use new loading shims

* chore(tests): Delete playgrounds/shared_procedures.html

  Shared procedure support was moved to a plugin and this should
  have been removed from core along with it.

* docs(tests): Typo corrections.

* chore(tests): Add ".loader" infix to shim filenames.

  Per suggestion on PR #7380, have buildShims name the shims
  ${chunk.name}.loader.mjs instead of just `${chunk.name}.mjs`.
2023-08-14 22:47:19 +01:00
ericblackmonGoogle
86f3182b46 Merge pull request #7393 from google/master
chore: merge master back into develop for 10.1.2
2023-08-14 13:26:47 -04:00
ericblackmonGoogle
36dfc34e3d Merge pull request #7391 from google/rc/v10.1.2
release: Rc/v10.1.2
2023-08-14 13:14:47 -04:00
Eric Blackmon
4457e575ae release: Update version number to 10.1.2 2023-08-14 12:54:22 -04:00
Hollow Man
5e85cdefaa fix: insertion marker's next blocks become real block (#7384)
Don't add next block to the insertion marker when we do
an insertion marker json serialization.

Also, to keep consistent with the old behavior, we don't
need to add input blocks for the insertion marker.

And we don't need to do a full serialization here as it
will just become an insertion marker.

Resolves #7383

Address issues in PR #7364

Signed-off-by: Hollow Man <hollowman@opensuse.org>
(cherry picked from commit 18ee0ec41b)
2023-08-14 12:52:52 -04:00
Hollow Man
18ee0ec41b fix: insertion marker's next blocks become real block (#7384)
Don't add next block to the insertion marker when we do
an insertion marker json serialization.

Also, to keep consistent with the old behavior, we don't
need to add input blocks for the insertion marker.

And we don't need to do a full serialization here as it
will just become an insertion marker.

Resolves #7383

Address issues in PR #7364

Signed-off-by: Hollow Man <hollowman@opensuse.org>
blockly-v10.1.2
2023-08-14 09:19:42 -07:00
dependabot[bot]
cd9b0c1f83 chore(deps): Bump google-closure-compiler (#7389)
Bumps [google-closure-compiler](https://github.com/google/closure-compiler-npm) from 20230502.0.0 to 20230802.0.0.
- [Release notes](https://github.com/google/closure-compiler-npm/releases)
- [Commits](https://github.com/google/closure-compiler-npm/compare/v20230502.0.0...v20230802.0.0)

---
updated-dependencies:
- dependency-name: google-closure-compiler
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-14 08:34:44 -07:00