Commit Graph

5880 Commits

Author SHA1 Message Date
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
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
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
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
Christopher Allen
311b2c16d8 Rename BUILD_DIR to "build" (was "built")
Per discussion in PR #4968, the dirname "build" is widely used for
this purpose.
2021-07-08 16:55:15 +01:00
Christopher Allen
ec14cc3ed8 Package build output; fix node tests.
- Reconfigure package_tasks.js to use BUILD_DIR from config.js
  (i.e., build/) rather than repository root as source of files to
  package.

  - Add check to packageTasks.package to ensure that certain required
    files exist in BUILD_DIR, to verify that buildTasks.build and
    typings.typings have been run.

  - Fix packageUMDBundle to use generated, rather than checked-in
    version of en.js.

  - Fix packageDTS to use the generated (rather than checked-in)
    versions of blockly.d.ts and msg/*.d.ts.

- Modify run_all_tests.sh to run packageTasks.package before running
  node tests, since they depend on it.  Previously this was only
  working because 'npm install' runs the 'prepare' script, which would
  run the 'package' script - so the code being tested by the node tests
  was not the current source but whatever precomipled code had
  previously been checked in.

- Remove the 'prepare' script from package.json, since it is no longer
  needed (and is now broken, since it requires that build and typings
  have been done first.)  Note that no scripts at all are included in
  the version of package.json that is created in dist/ and subsequently
  included in the published npms, so this deletion does not affect what
  happens when the Blockly npm in installed - it only affects what
  happens when 'npm install' is run after the blockly repo is cloned.

- Factor out the actual recompilation steps from releaseTasks.recompile.

- Rename releaseTasks.recomple to recompileDevelop, since it deals
  specifically with the develop branch.  (The npm script name is
  unchanged.)

- Ensure that a full recompile and repackage is done before publishing
  (beta and non-beta) npms.
2021-07-08 16:34:50 +01:00
Aaron Dodson
3f55ca59ad Merge pull request #4969 from gonfunko/scrollin-safari
Work around WebKit bug that prevents scrolling/zooming the workspace.
2021-07-08 08:25:29 -07:00
translatewiki.net
fd93e312b1 Localisation updates from https://translatewiki.net. 2021-07-08 13:00:37 +02:00
Rachel Fenichel
23602bb177 Initial commit for appengine deploy action 2021-07-07 17:57:48 -07:00
Aaron Dodson
49a4fa7898 Merge pull request #4938 from gonfunko/flyout-zoom
Reflow flyouts when zoom level changes to keep block zoom level in sync.
2021-07-07 10:29:44 -07:00
Beka Westberg
a589cd6923 Update jsdoc 2021-07-07 14:42:18 +00:00
Christopher Allen
e6929decde Also check in sourcemaps
The .js.map files generated by buildCompressed, buildBlocks etc. were
not being copied back by checkinBuilt.
2021-07-07 15:36:39 +01:00
translatewiki.net
0cb4fe1d3a Localisation updates from https://translatewiki.net. 2021-07-05 13:00:46 +02:00
Christopher Allen
c265eb87b5 Update metadata sizes for Q2 2021 release
Transcribed (with tweaks) from PR #4986.
2021-07-02 10:23:10 +01:00
Maribeth Bottorff
74f1926b6a fix doc typo 2021-07-01 19:11:06 -07:00
Beka Westberg
ae840202ec Merge pull request #4981 from google/master
Merge master into develop. July 2021 Release
2021-07-01 09:05:52 -07:00
Beka Westberg
64188ae272 Merge pull request #4976 from google/rc_2021_7
Rc 2021 7
6.20210701.0
2021-07-01 08:57:19 -07:00
Beka Westberg
bff1c042fe Resolve conflicts? 2021-07-01 15:44:58 +00:00
Beka Westberg
c83ff6ca06 Bump README release date. 2021-07-01 15:20:16 +00:00
Beka Westberg
30d7f0914e Rebuild (#4975) 2021-07-01 08:17:08 -07:00
translatewiki.net
fbf03fb561 Localisation updates from https://translatewiki.net. 2021-07-01 13:40:00 +02:00
Maribeth Bottorff
d102cbfab4 Fix Jsdoc by removing trailing comma (#4974) 2021-06-30 16:45:02 -07:00
Aaron Dodson
c163a76807 Removed unused event argument. 2021-06-30 17:52:17 +00:00
Aaron Dodson
5aa8bab22f Work around WebKit bug that prevents scrolling/zooming the workspace. 2021-06-30 17:40:00 +00:00
Christopher Allen
5410ba6ab3 Do trivial gulp tasks in parallel where possible
N.B. can't run typings.typings and typings.msgTypings in parallel
yet because the latter depends on the existence of an output directory
created by the former.
2021-06-30 16:12:10 +01:00
Christopher Allen
37ecce8d80 Have npm run typings use built directory; fix typescript tests
* Modify scripts/gulpfiles/typings.js to write typings to BUILD_DIR.
* Modify tests/scripts/compile_typings.sh to check compilability of
  resulting output from BUILD_DIR.
* Rename checkin script to checkin:built, add a checkin:typings script
  to do the same for .d.ts files, and a new checkin script to do both.
* Have recompile run checkin:typings.
2021-06-30 15:34:54 +01:00
Neil Fraser
344ebcfd02 Revert "Group field edits together for undo/redo"
This reverts commit 33ad2448b8.
2021-06-29 11:35:21 -07:00
Neil Fraser
33ad2448b8 Group field edits together for undo/redo
Fixes #4189.
Also use 0 instead of 0px, in accordance with the rest of Blockly and Google’s CSS style guide.
2021-06-29 09:57:25 -07:00
Christopher Allen
1aa35ef438 Merge branch 'develop' into build-elsewhere 2021-06-29 16:22:13 +01:00
Rachel Fenichel
5412adf7e5 Merge pull request #4951 from rachel-fenichel/remove_build_py
Remove deprecated build.py script
2021-06-28 11:13:05 -07:00
Rachel Fenichel
5c48bfc188 Tweak comment 2021-06-28 11:09:01 -07:00
Aaron Dodson
627647c7f2 Reflow workspace- and toolbox-owned flyouts when workspace zoom changes. 2021-06-28 11:08:03 -07:00
Aaron Dodson
0d44d22629 Revert "Reflow flyouts when zoom level changes to keep block zoom level in sync."
This reverts commit 1f6c8f0206.
2021-06-28 10:48:36 -07:00
Neil Fraser
9ad50ea98a Fix escape key on all fields. (#4934)
Currently the escape key fails to revert the value.  This is the inherited root of all type-in fields, including number, angle, and note.

Fixes #4910
2021-06-27 23:51:46 -07:00
Rachel Fenichel
2fcdd846be Remove deprecated build.py script 2021-06-24 16:58:28 -07:00
dependabot[bot]
18a27a2613 Bump eslint from 7.28.0 to 7.29.0 (#4949)
Bumps [eslint](https://github.com/eslint/eslint) from 7.28.0 to 7.29.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.28.0...v7.29.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>
2021-06-24 13:23:28 -07:00
Christopher Allen
96da5ed014 Fix metadata tests
- Do not run npm install.
- Do not re-run build that has already been run by a previous test.
- Check files in built/ instead repo root.
- Fix formatting, styleguide issues.
2021-06-24 12:09:06 +01:00