Skip to content

Commit

Permalink
chore: Bump google-closure-compiler from 20210601.0.0 to 20211006.0.0 (
Browse files Browse the repository at this point in the history
…#5592)

* Bump google-closure-compiler from 20210601.0.0 to 20211006.0.0

Bumps [google-closure-compiler](https://github.com/google/closure-compiler-npm) from 20210601.0.0 to 20211006.0.0.
- [Release notes](https://github.com/google/closure-compiler-npm/releases)
- [Commits](google/closure-compiler-npm@v20210601.0.0...v20211006.0.0)

---
updated-dependencies:
- dependency-name: google-closure-compiler
  dependency-type: direct:development
  update-type: version-update:semver-major
...

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

* Remove deleted option from Closure Compiler arguments

The closure compiler no longer supports the undefinedNames warning
group (and indeed even prior to deletion it didn't do anything for
some time).

Per @lauraharker, enabling checkVars, missingProperties and
strictMissingProperties gives about the same check coverage; we
already enable the first two, while the third was already listed
but commented out for the time being.

* Provide externs for base.js functions

Per comment: fixes compiler errors from build:debug.

* Fix erroneous import

Blockly.serialization.ISerializer uses named exports, so we need to
destructure the import.

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Christopher Allen <cpcallen+git@google.com>
  • Loading branch information
dependabot[bot] and cpcallen authored Oct 15, 2021
1 parent 56d4fbb commit 063c8ad
Show file tree
Hide file tree
Showing 5 changed files with 93 additions and 43 deletions.
2 changes: 1 addition & 1 deletion core/registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const Theme = goog.requireType('Blockly.Theme');
/* eslint-disable-next-line no-unused-vars */
const ToolboxItem = goog.requireType('Blockly.ToolboxItem');
/* eslint-disable-next-line no-unused-vars */
const ISerializer = goog.requireType('Blockly.serialization.ISerializer');
const {ISerializer} = goog.requireType('Blockly.serialization.ISerializer');
/* eslint-disable-next-line no-unused-vars */
const {Cursor} = goog.requireType('Blockly.Cursor');

Expand Down
53 changes: 52 additions & 1 deletion externs/goog-externs.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,62 @@
*/

/**
* @fileoverview Externs for goog.
* @fileoverview Externs for goog.*
*
* These are needed because we use goog.module, goog.require etc. to
* define our modules, but we don't actually include
* closure/goog/base.js as input to the compiler. Originally we only
* needed the extern for goog, but some time between Closure Compiler
* versions 20210601.0.0 and 20211006.0.0 we started getting
* JSC_POSSIBLE_INEXISTENT_PROPERTY errors for goog.module /
* goog.require / goog.requireType declarations involving modules
* which used goog.module.declareLegacyNamespace.
*
* @externs
*/

/**
* @type {!Object}
*/
var goog = {};

/**
* @param {string} name
* @return {void}
*/
goog.module = function(name) {};

/**
* @return{void}
*/
goog.module.declareLegacyNamespace = function() {};

/**
* @param {string} name
* @return {?}
*/
goog.module.get = function(name) {};

/**
* @param {string} name
* @return {void}
*/
goog.provide = function(name) {};

/**
* @param {string} namespace
* @return {?}
*/
goog.require = function(namespace) {};

/**
* @param {string} namespace
* @return {?}
*/
goog.requireType = function(namespace) {};

/**
* @param {string=} opt_message
* @return{void}
*/
goog.setTestOnly = function(opt_message) {};
78 changes: 39 additions & 39 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"clang-format": "^1.5.0",
"concurrently": "^6.0.0",
"eslint": "^7.28.0",
"google-closure-compiler": "^20210601.0.0",
"google-closure-compiler": "^20211006.0.0",
"google-closure-deps": "^20210601.0.0",
"gulp": "^4.0.2",
"gulp-concat": "^2.6.1",
Expand Down
1 change: 0 additions & 1 deletion scripts/gulpfiles/build_tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ var JSCOMP_ERROR = [
// 'strictPrimitiveOperators',
'suspiciousCode',
'typeInvalidation',
'undefinedNames',
'undefinedVars',
'underscore',
'unknownDefines',
Expand Down

0 comments on commit 063c8ad

Please sign in to comment.