refactor(tests): Update bootstrap.js to better support generator chunks (#7171)

Refactor bootstrap.js and bootstrap_helper.js to be able to deal
with generator chunks.  In particular for each chunk, specify:

- The goog.module ID to goog.require() in uncompressed mode.
- The script filename to load in compressed mode.
- Where the chunk's UMD wrapper will save the export object when
  loaded as a script.
- What global variable the chunk's export object should be saved in
  (if desired).
- Any individual named exports to destructure to global variables.

This allows the bootstrap scripts to be slightly simpler while
also being more flexible.
This commit is contained in:
Christopher Allen
2023-06-15 21:03:04 +01:00
committed by GitHub
parent 2d97e5aaf1
commit 817ffab754
8 changed files with 88 additions and 96 deletions

View File

@@ -293,8 +293,8 @@ function buildJavaScript(done) {
}
/**
* This task updates DEPS_FILE (deps.js), used by
* bootstrap.js when loading Blockly in uncompiled mode.
* This task updates DEPS_FILE (deps.js), used by the debug module
* loader (via bootstrap.js) when loading Blockly in uncompiled mode.
*
* Also updates TEST_DEPS_FILE (deps.mocha.js), used by the mocha test
* suite.