Commit Graph

5930 Commits

Author SHA1 Message Date
kozbial
de2cff80fd clang-format core/utils/rect.js 2021-07-14 16:13:58 -07:00
kozbial
466a0db809 Migrate core/utils/rect.js to goog.module 2021-07-14 16:13:58 -07:00
Aaron Dodson
0ac3994343 Merge pull request #5062 from gonfunko/svg
Migrate core/utils/svg_paths.js to goog.module syntax
2021-07-14 15:59:43 -07:00
alschmiedt
38324a1f63 Updates eslint rules to work while converting to goog.module (#5063) 2021-07-14 15:59:30 -07:00
kozbial
7cc85d9c4a clang-format core/utils/math.js 2021-07-14 15:06:03 -07:00
kozbial
06cbde1dba Migrate core/utils/math.js to goog.module 2021-07-14 15:06:03 -07:00
kozbial
5fbf5fe40d Migrate core/utils/math.js to ES6 const/let 2021-07-14 15:06:03 -07:00
Aaron Dodson
916b49a2e5 clang-format core/utils/svg_paths.js 2021-07-14 14:44:17 -07:00
Aaron Dodson
72a0761312 Migrate core/utils/svg_paths.js to goog.module 2021-07-14 14:43:15 -07:00
alschmiedt
92bc3bba0f Merge pull request #5056 from alschmiedt/migrate_idgenerator
Migrate core/utils/idgenerator.js to goog.module syntax
2021-07-14 13:29:50 -07:00
alschmiedt
08911510d2 Migrate core/utils/idgenerator.js to goog.module 2021-07-14 13:23:57 -07:00
Aaron Dodson
bad4b7036f Merge pull request #5057 from gonfunko/object
Migrate object.js to goog.module syntax
2021-07-14 11:19:47 -07:00
kozbial
819a0f1596 clang-format core/utils/deprecation.js 2021-07-14 11:16:32 -07:00
kozbial
2bf717019f Migrate core/utils/deprecation.js to goog.module 2021-07-14 11:16:32 -07:00
kozbial
cd4831537e Migrate core/utils/deprecation.js to ES6 const/let 2021-07-14 11:16:32 -07:00
Aaron Dodson
b92fba1a5a Fixed missing semicolon. 2021-07-14 10:55:10 -07:00
kozbial
632ef12ed5 Migrate core/utils/keycodes.js to goog.module 2021-07-14 09:48:23 -07:00
Aaron Dodson
42ec71a023 Merge branch 'goog_module' of https://github.com/gonfunko/blockly into object 2021-07-14 08:32:59 -07:00
Monica Kozbial
937c0e5bd7 Merge pull request #5046 from cpcallen/allow-es6
Configure eslint and Closure Compiler to accept ES6
2021-07-13 18:21:06 -07:00
Christopher Allen
2bdf2627af Configure eslint and Closure Compiler to accept ES6 2021-07-13 23:54:36 +01:00
Aaron Dodson
d224a2341d Migrate object.js to goog.module 2021-07-13 15:30:56 -07:00
Aaron Dodson
78b8e2fa85 Migrate object.js to ES6 const/let 2021-07-13 14:42:56 -07:00
Christopher Allen
8b81043a54 Merge pull request #5019 from cpcallen/goog.module-prep
Preparation for goog.module transition: base.js, deps.js
2021-07-13 22:21:34 +01:00
Christopher Allen
d313ec804a Merge branch 'develop' into goog.module-prep
This resolves a conflict in `blockly_uncompressed.js`, and missing
updates to `test/deps.js`, caused by PR #5041.
2021-07-13 22:16:35 +01:00
jschanker
de1b3214be Enforce connection preconditions for setParent (#4999)
* Fix error conditions for setParent #4989

* Error now thrown when calling `a.setParent(b)` on non-null b if the output/previous connection of a is not connected to an input/next connection of b without removing block from old parent's child list.
* Commented out error for when calling `a.setParent(null)` if a is connected to superior block.
* Adjusted comment to reflect that blocks were no longer being disconnected in this method.
* Also changed == to === per #4924 (`newParent` and `this.parentBlock_` must both be instances of `Blockly.Block`).

* Fix error conditions for setParent #4989

* Error now thrown when calling `a.setParent(b)` on non-null b if the output/previous connection of a is not connected to an input/next connection of b without removing block from old parent's child list.
* Error now thrown when calling `a.setParent(null)` if a is connected to a superior block.
* Adjusted comment to reflect that blocks were no longer being disconnected in this method.
* Also changed == to === per #4924 (`newParent` and `this.parentBlock_` must both be instances of `Blockly.Block`).

* Fix error conditions for setParent #4989

* Error now thrown when calling `a.setParent(b)` on non-null b if the output/previous connection of a is not connected to an input/next connection of b without removing block from old parent's child list.
* Commented out error for when calling `a.setParent(null)` if a is connected to superior block.
* Adjusted comment to reflect that blocks were no longer being disconnected in this method.
* Also changed == to === per google#4924 (`newParent` and `this.parentBlock_` must both be instances of `Blockly.Block`).
* Fixed lint errors.

* Fix error conditions for setParent google#4989

* Error now thrown when calling `a.setParent(b)` on non-null b if the output/previous connection of a is not connected to an input/next connection of b without removing block from old parent's child list.
* Commented out error for when calling `a.setParent(null)` if a is connected to superior block.
* Adjusted comment to reflect that blocks were no longer being disconnected in this method.
* Also changed == to === per google#4924 (`newParent` and `this.parentBlock_` must both be instances of `Blockly.Block`).
* Fixed lint errors.
* Adjusted comment.

* Removed unnecessary set to null/added tests

* One is failing (commented out), will investigate later

* Lint fix

* Removed failing test that correctly fails

* Update comments to conform to style guide

Capitalize first letter, period at end
2021-07-13 13:56:42 -07:00
alschmiedt
2b6b89dc54 Remove themes that were moved to blockly samples (#5041) 2021-07-13 13:31:27 -07:00
Monica Kozbial
0af6bc4b01 Remove unused parameters from test helpers (#5032) 2021-07-13 13:13:06 -07:00
Christopher Allen
ec3da1e415 Update package-lock.json to lockfileVersion 2 2021-07-13 21:08:47 +01:00
Monica Kozbial
e2d0498db2 Add flag to webdriverio options (#5035)
* Add flag to webdriverio options

* update indentation of code
2021-07-13 09:31:21 -07:00
Christopher Allen
c42c5e72b4 Remove obsolete TODO
No more `execSync('mkdir -p')` so no more need to check if it works on
Windows.
2021-07-13 16:11:54 +01:00
Christopher Allen
ebd6559822 Fix incorrectly-reverted change to mkdirSync call
An intermediate version of this code read:

    fs.mkdir(demoStaticTmpDir, {recursive: true}), done);

but apparently `fs.mkdir` doesn't honour the recursive option, so I
tried to revert the change but munged it instead.

This commit cleans up the mess I made.
2021-07-13 16:11:54 +01:00
Christopher Allen
7d306f4089 Don't lint build output
npm test has been failing if previous build output was present,
because the generated build/msg/??.msg files are missing a trailing
newline and the line to exclude build/* from being linted was
inadvertently omitted from commit 9e72378.

(Much of the rest of the build output would also fail lint checks but
was already excluded by the *_compressed*.js exclusion.)
2021-07-13 16:11:54 +01:00
Christopher Allen
85b50fcb73 Use fs.mkdirSync instead of execSync('mkdir -p ...')
Also consistently use {recursive: true} in case directory is nested
in an also-not-yet-existent directory.
2021-07-13 16:11:54 +01:00
Christopher Allen
948fade7c5 Only disable eslint indent check on one line
For whatever reason eslint was rejecting the (styleguide-correct)
indentation of the line beginning with "/** @type ...", and in my
naïvete I got a little more zealous than I intended in suppressing
the error.
2021-07-13 12:08:35 +01:00
Monica Kozbial
2c83652733 Add missing whitespace to test files (#5031)
* Add missing spaces

* undo incorrect replaces in utils tests
2021-07-12 15:11:33 -07:00
Neil Fraser
783956d4cd Remove undesirable \n from sv.json
Resolves #5017
2021-07-12 10:12:31 -07:00
dependabot[bot]
6484a7e735 Bump @blockly/dev-tools from 2.4.0 to 2.5.1 (#5023)
Bumps [@blockly/dev-tools](https://github.com/google/blockly-samples/tree/HEAD/plugins/dev-tools) from 2.4.0 to 2.5.1.
- [Release notes](https://github.com/google/blockly-samples/releases)
- [Commits](https://github.com/google/blockly-samples/commits/@blockly/dev-tools@2.5.1/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>
2021-07-12 09:43:38 -07:00
dependabot[bot]
26d2920fb6 Bump @blockly/theme-modern from 2.1.18 to 2.1.19 (#5024)
Bumps [@blockly/theme-modern](https://github.com/google/blockly-samples/tree/HEAD/plugins/theme-modern) from 2.1.18 to 2.1.19.
- [Release notes](https://github.com/google/blockly-samples/releases)
- [Commits](https://github.com/google/blockly-samples/commits/@blockly/theme-modern@2.1.19/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>
2021-07-12 09:41:43 -07:00
Neil Fraser
b3c94db951 Revert "Revert "Group field edits together for undo/redo""
This reverts commit 344ebcfd02.
2021-07-12 09:38:04 -07:00
dependabot[bot]
34ed6bc9ca Bump concurrently from 6.1.0 to 6.2.0 (#4867)
Bumps [concurrently](https://github.com/kimmobrunfeldt/concurrently) from 6.1.0 to 6.2.0.
- [Release notes](https://github.com/kimmobrunfeldt/concurrently/releases)
- [Commits](https://github.com/kimmobrunfeldt/concurrently/compare/v6.1.0...v6.2.0)

---
updated-dependencies:
- dependency-name: concurrently
  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>
2021-07-12 09:10:35 -07:00
Monica Kozbial
afa051ac18 update turtle mask placing and remove s (#4962) 2021-07-12 09:09:32 -07:00
Aaron Dodson
0b66af2e84 Merge pull request #5020 from hpnrep6/flyout-button
Fix vertical button padding in horizontal flyout
2021-07-12 08:28:28 -07:00
Neil Fraser
8a3c701026 Enable static method inheritance. 2021-07-11 23:20:20 -07:00
Neil Fraser
2c6d044c40 Review updates 2021-07-11 23:19:01 -07:00
Neil Fraser
02fd8cf7a4 Linting 2021-07-11 23:19:01 -07:00
Neil Fraser
cba7a68207 Allow inheriting of fromJson in fields 2021-07-11 23:19:01 -07:00
hpnrep6
048e77dc9a Include button heights in flyout height calculation 2021-07-12 01:26:03 -04:00
Christopher Allen
603755f250 Suppress spurious eslint error
eslint appears to be confused by the leading JSDoc comment on the
continuation line and suggests it should be indented only 4 rather
than 8 spaces.
2021-07-12 03:51:17 +01:00
Christopher Allen
1197afcee7 Fix JSDoc type annotations causing closure-make-deps warnings
Some type annotations were missing curly brackets, which makes
closure-make-deps emit uninteresting warnings.  Now any output
from the command will be informative and related to whatever
one is presently working on.
2021-07-12 03:17:14 +01:00
Christopher Allen
173ea2bc79 Have eslint ignore undefined variable "exports"
Modules defined using goog.module declare their exported functions
by assigning them to properties on an object which is the value of
the variable "exports" (e.g., "exports.MyClass = class { ... };").

Normally eslint would complain about this variable being undefined,
but this commit suppresses these errors.
2021-07-12 02:54:59 +01:00