Commit Graph

9167 Commits

Author SHA1 Message Date
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
Aaron Dodson
80d0314ca2 Added script and workflow to automatically update build artifact sizes in check_metadata.sh 2021-07-12 13:37:25 -07:00
Rachel Fenichel
e53168925d Merge pull request #5014 from google/revert-5010-rachel-fenichel-patch-1
Revert "Get deploy files from the correct directory"
2021-07-12 10:17:43 -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]
bd46d8a0b3 Bump hosted-git-info from 2.8.4 to 2.8.9 (#4980)
Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.4 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.4...v2.8.9)

---
updated-dependencies:
- dependency-name: hosted-git-info
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-07-12 09:17:19 -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
Christopher Allen
f5a9f2cf2b Load dependency graph from tests/deps.js in uncompiled mode
* New gulp task buildDeps (npm run build:deps) to create tests/deps.js.
* Old gulp task buildUncompressed is deleted.
* blockly_uncompressed.js is now handwritten.
  * And simplified; in particular, BLOCKLY_BOOT is gone.
  * And linted!
* For consistency with the Closure documentation and base.js,
  consistently refer to what blockly_uncompressed.js is used for as
  "uncompiled mode" rather than "uncompressed mode" (but don't yet
  rename it to blockly_uncompiled.js)
2021-07-12 02:28:09 +01:00
Christopher Allen
214492cd08 Use the current standard Closure base.js
The version of base.js we have been using is a cut-down copy of an older
version, stripped of everything that wasn't strictly needed for Blockly.

We now need things that were previously stripped out, so restore the
current version from
https://github.com/google/closure-library/blob/master/closure/goog/base.js
as of commit 5cb5e81 (2021-06-04).

We can always strip out unused sections again in future - once we know
which sections those are.
2021-07-10 13:04:19 +01:00
Christopher Allen
6ccff4431d Fix line lengths
Including by using the node_modules/.bin/closure2ts wrapper provided by
typescript-closure-tools instead of running the source .js directly.
2021-07-10 13:02:47 +01:00
Sam El-Husseini
6136d93cdf Fix msg typings script and move to typings build directory 2021-07-10 13:02:47 +01:00
Rachel Fenichel
89cf049e74 Merge pull request #4995 from BeksOmega/fix/jsdoc
Updates JSDoc in Block and BlockSvg
2021-07-09 15:57:38 -07:00
Rachel Fenichel
61e2d4caee Merge pull request #4985 from maribethb/typo
fix doc typo
2021-07-09 15:31:15 -07:00
Rachel Fenichel
16ca378678 Revert "Get deploy files from the correct directory" 2021-07-09 15:26:39 -07:00
Christopher Allen
899493e36d Merge pull request #4968 from cpcallen/build-elsewhere
Build in a temporary directory
2021-07-09 23:16:38 +01:00
Christopher Allen
1306e41d3b Load playground.html etc. from local http server
Unlike goog.provide packages, goog.module modules are loaded using
XMLHttpRequest in uncompiled mode.  Because browsers treat file: URLs
as each being a separate, unique origin, this means that CORS rules
prevent goog.module modules being loaded from a file URL.

To work around this, use the http-server npm to serve the repository
root directory on localhost:8080.

Provide a script so that you can type `npm start` to start the local
http server and automatically open a browser window pointing at
tests/playground.html.

Modify the setBackgroundColour function in the playgrounds to provide
the usual lilac background on locahost URLs and a sickly green one
if using a file: URL, all of which will soon stop working.

(The background doesn't actually appear to be visible in the advanced
playground.)
2021-07-09 23:11:19 +01:00
Monica Kozbial
b2490c57b8 Create develop_freeze.yml (#5012)
* Create develop_freeze.yml

* Remove test message
2021-07-09 15:10:35 -07:00
Christopher Allen
c45929db22 Rename internal recompile function to rebuildAll 2021-07-09 23:08:59 +01:00
Monica Kozbial
f259143827 Revert "Create Github Action to comment on PR while develop is frozen (#5006)" (#5013)
This reverts commit 8c635b5fbc.
2021-07-09 15:08:52 -07:00
Monica Kozbial
8c635b5fbc Create Github Action to comment on PR while develop is frozen (#5006)
* Create develop_freeze_comment.yml

* Update comments

* Fix typo and update uses

* Add test message
2021-07-09 13:21:22 -07:00
Rachel Fenichel
3738098153 Merge pull request #5010 from google/rachel-fenichel-patch-1
Get deploy files from the correct directory
2021-07-09 13:00:30 -07:00
Rachel Fenichel
615abab1ae Get deploy files from the correct directory
Previous path was `_deploy/`. New path is `../_deploy`.
2021-07-09 12:32:51 -07:00
Rachel Fenichel
7bf024e58f Merge pull request #5005 from rachel-fenichel/appengine_demos_master
Appengine deploy workflow on master for testing
2021-07-09 12:23:49 -07:00
Christopher Allen
ffd0252947 Merge branch 'develop' into build-elsewhere
Fix conflict in package.json.
2021-07-09 14:13:23 +01:00
Christopher Allen
9e72378b69 Finish renaming BUILD_DIR; make tests more error-prone
I had forgotten that I needed to change the value of BUILD_DIR
in several different places.

Added comments warning future editors about this as well as filing
issue #5007 to track fixing this properly.

Despite being misconfigured and therefore failing, the typescript
and metadata test scripts were exiting with status 0, indicating
successful completion.  These have been fixed so they should fail
on any error, including misconfiguration.
2021-07-09 14:06:59 +01:00
Rachel Fenichel
8a14d66996 Merge pull request #4979 from google/dependabot/npm_and_yarn/lodash-4.17.21
Bump lodash from 4.17.19 to 4.17.21
2021-07-08 19:22:43 -07:00
Rachel Fenichel
c89d0c517e Update comments to be more descriptive 2021-07-08 19:18:45 -07:00
Rachel Fenichel
ade970f016 Initial commit for appengine deploy action 2021-07-08 19:18:23 -07:00
Rachel Fenichel
fa1d186ade Merge pull request #4978 from google/dependabot/npm_and_yarn/ws-7.5.1
Bump ws from 7.4.4 to 7.5.1
2021-07-08 19:15:36 -07:00
Rachel Fenichel
f5e4022407 Merge pull request #4998 from rachel-fenichel/deploy_appengine_workflow
Initial commit for appengine deploy action
2021-07-08 19:11:37 -07:00
Rachel Fenichel
16a11e419a Update comments to be more descriptive 2021-07-08 19:05:56 -07:00
Aaron Dodson
b562242614 Merge pull request #5003 from gonfunko/owners
Added @google/blockly-eng as the owner of the entire repo
2021-07-08 14:34:14 -07:00
Aaron Dodson
fa95a3a332 Added @google/blockly-eng as the owner of the entire repo 2021-07-08 14:23:52 -07:00
Christopher Allen
1e4fa8005a Fix comment TODO formatting. 2021-07-08 17:29:26 +01:00