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
This commit is contained in:
Christopher Allen
2023-08-31 01:24:47 +02:00
committed by GitHub
parent be809d9d98
commit b0a7c004a9
323 changed files with 367 additions and 4782 deletions

View File

@@ -8,8 +8,7 @@
* @fileoverview Generating Lua for colour blocks.
*/
import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.Lua.colour');
// Former goog.module ID: Blockly.Lua.colour
import {Order} from './lua_generator.js';

View File

@@ -8,8 +8,7 @@
* @fileoverview Generating Lua for list blocks.
*/
import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.Lua.lists');
// Former goog.module ID: Blockly.Lua.lists
import {NameType} from '../../core/names.js';
import {Order} from './lua_generator.js';

View File

@@ -8,8 +8,7 @@
* @fileoverview Generating Lua for logic blocks.
*/
import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.Lua.logic');
// Former goog.module ID: Blockly.Lua.logic
import {Order} from './lua_generator.js';

View File

@@ -8,8 +8,7 @@
* @fileoverview Generating Lua for loop blocks.
*/
import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.Lua.loops');
// Former goog.module ID: Blockly.Lua.loops
import * as stringUtils from '../../core/utils/string.js';
import {NameType} from '../../core/names.js';

View File

@@ -10,8 +10,7 @@
* @suppress {checkTypes|globalThis}
*/
import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.Lua');
// Former goog.module ID: Blockly.Lua
import * as stringUtils from '../../core/utils/string.js';
// import type {Block} from '../../core/block.js';

View File

@@ -8,8 +8,7 @@
* @fileoverview Generating Lua for math blocks.
*/
import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.Lua.math');
// Former goog.module ID: Blockly.Lua.math
import {NameType} from '../../core/names.js';
import {Order} from './lua_generator.js';

View File

@@ -8,8 +8,7 @@
* @fileoverview Generating Lua for procedure blocks.
*/
import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.Lua.procedures');
// Former goog.module ID: Blockly.Lua.procedures
import {NameType} from '../../core/names.js';
import {Order} from './lua_generator.js';

View File

@@ -8,8 +8,7 @@
* @fileoverview Generating Lua for text blocks.
*/
import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.Lua.texts');
// Former goog.module ID: Blockly.Lua.texts
import {NameType} from '../../core/names.js';
import {Order} from './lua_generator.js';

View File

@@ -8,8 +8,7 @@
* @fileoverview Generating Lua for variable blocks.
*/
import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.Lua.variables');
// Former goog.module ID: Blockly.Lua.variables
import {NameType} from '../../core/names.js';
import {Order} from './lua_generator.js';

View File

@@ -8,8 +8,7 @@
* @fileoverview Generating Lua for dynamic variable blocks.
*/
import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.Lua.variablesDynamic');
// Former goog.module ID: Blockly.Lua.variablesDynamic
// Lua is dynamically typed.