From fefe40f220c99560c02b5d97e55139f6f7cce395 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Oct 2021 09:01:38 +0000 Subject: [PATCH 1/4] 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](https://github.com/google/closure-compiler-npm/compare/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] --- package-lock.json | 78 +++++++++++++++++++++++------------------------ package.json | 2 +- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/package-lock.json b/package-lock.json index b38f6a59547..e962a4950f0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,7 +21,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", @@ -6137,13 +6137,13 @@ } }, "node_modules/google-closure-compiler": { - "version": "20210601.0.0", - "resolved": "https://registry.npmjs.org/google-closure-compiler/-/google-closure-compiler-20210601.0.0.tgz", - "integrity": "sha512-lzzEoG2VTB7uUjnWnMyeZMU163w69HJpM27yh8Up9Ha5McHZeESjt3NRwU8cWMbCRdY06nFbRCDIVCRcadHCiw==", + "version": "20211006.0.0", + "resolved": "https://registry.npmjs.org/google-closure-compiler/-/google-closure-compiler-20211006.0.0.tgz", + "integrity": "sha512-WrzPLGtNMtgPubcvSur8JzzpuNn4feS7OMF74Hsm00G0qpdNvBVCIkMpnLr9SPZnl2vZ8UVqt83XVXMpQRTkUw==", "dev": true, "dependencies": { "chalk": "2.x", - "google-closure-compiler-java": "^20210601.0.0", + "google-closure-compiler-java": "^20211006.0.0", "minimist": "1.x", "vinyl": "2.x", "vinyl-sourcemaps-apply": "^0.2.0" @@ -6155,21 +6155,21 @@ "node": ">=10" }, "optionalDependencies": { - "google-closure-compiler-linux": "^20210601.0.0", - "google-closure-compiler-osx": "^20210601.0.0", - "google-closure-compiler-windows": "^20210601.0.0" + "google-closure-compiler-linux": "^20211006.0.0", + "google-closure-compiler-osx": "^20211006.0.0", + "google-closure-compiler-windows": "^20211006.0.0" } }, "node_modules/google-closure-compiler-java": { - "version": "20210601.0.0", - "resolved": "https://registry.npmjs.org/google-closure-compiler-java/-/google-closure-compiler-java-20210601.0.0.tgz", - "integrity": "sha512-bH6nIwOmp4qDWvlbXx5/DE3XA2aDGQoCpmRYZJGONY1Sy6Xfbq0ioXRHH9eBDP9hxhCJ5Sd/K89A0NZ8Nz9RJA==", + "version": "20211006.0.0", + "resolved": "https://registry.npmjs.org/google-closure-compiler-java/-/google-closure-compiler-java-20211006.0.0.tgz", + "integrity": "sha512-ggvk48GuP5Y8TD1I9dcJTu50+BQ2AfroAAsTV7nnbKdEPCZ/XJmGqy5qrJk0ImdAvONUHZETc5DMHHgFI5WjMg==", "dev": true }, "node_modules/google-closure-compiler-linux": { - "version": "20210601.0.0", - "resolved": "https://registry.npmjs.org/google-closure-compiler-linux/-/google-closure-compiler-linux-20210601.0.0.tgz", - "integrity": "sha512-rnEQt7zz/1P1SfPhJiHQpfCgMPrsVVyEgDs09h67xn6+LXa9L0RP+hrJDEHqSWwjDPz0BkfUUv6zkqZvp1h/lw==", + "version": "20211006.0.0", + "resolved": "https://registry.npmjs.org/google-closure-compiler-linux/-/google-closure-compiler-linux-20211006.0.0.tgz", + "integrity": "sha512-7FclqwRDHcx9zvoy1JCQB3DC84T0anyOsb5kNIZgIf/oaUCvq27ElJK1X7W6IenOcwYyvDDWeDb38YkWl15ANw==", "cpu": [ "x64", "x86" @@ -6181,9 +6181,9 @@ ] }, "node_modules/google-closure-compiler-osx": { - "version": "20210601.0.0", - "resolved": "https://registry.npmjs.org/google-closure-compiler-osx/-/google-closure-compiler-osx-20210601.0.0.tgz", - "integrity": "sha512-A5r4s/WthR2iLMM0mxsluw8EW2AcOomC5ri/H6FjzpMq0RVEnLTgaGYdXolUAfEzH/7XtJJT2+JkYk3HSLCtrg==", + "version": "20211006.0.0", + "resolved": "https://registry.npmjs.org/google-closure-compiler-osx/-/google-closure-compiler-osx-20211006.0.0.tgz", + "integrity": "sha512-b0FGLvYZuMbDoLcu5z1lw0nWigpT8G29acuh4Yz6zO4NFq1aCpyR1X+BPhC2KCxb2eaMWPx2xoxbsekhkU0VzQ==", "cpu": [ "x64", "x86", @@ -6196,9 +6196,9 @@ ] }, "node_modules/google-closure-compiler-windows": { - "version": "20210601.0.0", - "resolved": "https://registry.npmjs.org/google-closure-compiler-windows/-/google-closure-compiler-windows-20210601.0.0.tgz", - "integrity": "sha512-6r94bPShnB0XXh9+5/qXGDHJN2PQGhF9yJPcgBZj+FAZlQGzlYkT0pkyp+loZT3lG+YRbjD28Lgo7xMcY4xgkA==", + "version": "20211006.0.0", + "resolved": "https://registry.npmjs.org/google-closure-compiler-windows/-/google-closure-compiler-windows-20211006.0.0.tgz", + "integrity": "sha512-7P13hA42LWIm4o+speQC5Yhs3D+3q9nvuItOxLCzess1sPDeBKi5dQi3w+C2MBTDyVN0CTKL86iClyyOnrbuRQ==", "cpu": [ "x64" ], @@ -18337,45 +18337,45 @@ } }, "google-closure-compiler": { - "version": "20210601.0.0", - "resolved": "https://registry.npmjs.org/google-closure-compiler/-/google-closure-compiler-20210601.0.0.tgz", - "integrity": "sha512-lzzEoG2VTB7uUjnWnMyeZMU163w69HJpM27yh8Up9Ha5McHZeESjt3NRwU8cWMbCRdY06nFbRCDIVCRcadHCiw==", + "version": "20211006.0.0", + "resolved": "https://registry.npmjs.org/google-closure-compiler/-/google-closure-compiler-20211006.0.0.tgz", + "integrity": "sha512-WrzPLGtNMtgPubcvSur8JzzpuNn4feS7OMF74Hsm00G0qpdNvBVCIkMpnLr9SPZnl2vZ8UVqt83XVXMpQRTkUw==", "dev": true, "requires": { "chalk": "2.x", - "google-closure-compiler-java": "^20210601.0.0", - "google-closure-compiler-linux": "^20210601.0.0", - "google-closure-compiler-osx": "^20210601.0.0", - "google-closure-compiler-windows": "^20210601.0.0", + "google-closure-compiler-java": "^20211006.0.0", + "google-closure-compiler-linux": "^20211006.0.0", + "google-closure-compiler-osx": "^20211006.0.0", + "google-closure-compiler-windows": "^20211006.0.0", "minimist": "1.x", "vinyl": "2.x", "vinyl-sourcemaps-apply": "^0.2.0" } }, "google-closure-compiler-java": { - "version": "20210601.0.0", - "resolved": "https://registry.npmjs.org/google-closure-compiler-java/-/google-closure-compiler-java-20210601.0.0.tgz", - "integrity": "sha512-bH6nIwOmp4qDWvlbXx5/DE3XA2aDGQoCpmRYZJGONY1Sy6Xfbq0ioXRHH9eBDP9hxhCJ5Sd/K89A0NZ8Nz9RJA==", + "version": "20211006.0.0", + "resolved": "https://registry.npmjs.org/google-closure-compiler-java/-/google-closure-compiler-java-20211006.0.0.tgz", + "integrity": "sha512-ggvk48GuP5Y8TD1I9dcJTu50+BQ2AfroAAsTV7nnbKdEPCZ/XJmGqy5qrJk0ImdAvONUHZETc5DMHHgFI5WjMg==", "dev": true }, "google-closure-compiler-linux": { - "version": "20210601.0.0", - "resolved": "https://registry.npmjs.org/google-closure-compiler-linux/-/google-closure-compiler-linux-20210601.0.0.tgz", - "integrity": "sha512-rnEQt7zz/1P1SfPhJiHQpfCgMPrsVVyEgDs09h67xn6+LXa9L0RP+hrJDEHqSWwjDPz0BkfUUv6zkqZvp1h/lw==", + "version": "20211006.0.0", + "resolved": "https://registry.npmjs.org/google-closure-compiler-linux/-/google-closure-compiler-linux-20211006.0.0.tgz", + "integrity": "sha512-7FclqwRDHcx9zvoy1JCQB3DC84T0anyOsb5kNIZgIf/oaUCvq27ElJK1X7W6IenOcwYyvDDWeDb38YkWl15ANw==", "dev": true, "optional": true }, "google-closure-compiler-osx": { - "version": "20210601.0.0", - "resolved": "https://registry.npmjs.org/google-closure-compiler-osx/-/google-closure-compiler-osx-20210601.0.0.tgz", - "integrity": "sha512-A5r4s/WthR2iLMM0mxsluw8EW2AcOomC5ri/H6FjzpMq0RVEnLTgaGYdXolUAfEzH/7XtJJT2+JkYk3HSLCtrg==", + "version": "20211006.0.0", + "resolved": "https://registry.npmjs.org/google-closure-compiler-osx/-/google-closure-compiler-osx-20211006.0.0.tgz", + "integrity": "sha512-b0FGLvYZuMbDoLcu5z1lw0nWigpT8G29acuh4Yz6zO4NFq1aCpyR1X+BPhC2KCxb2eaMWPx2xoxbsekhkU0VzQ==", "dev": true, "optional": true }, "google-closure-compiler-windows": { - "version": "20210601.0.0", - "resolved": "https://registry.npmjs.org/google-closure-compiler-windows/-/google-closure-compiler-windows-20210601.0.0.tgz", - "integrity": "sha512-6r94bPShnB0XXh9+5/qXGDHJN2PQGhF9yJPcgBZj+FAZlQGzlYkT0pkyp+loZT3lG+YRbjD28Lgo7xMcY4xgkA==", + "version": "20211006.0.0", + "resolved": "https://registry.npmjs.org/google-closure-compiler-windows/-/google-closure-compiler-windows-20211006.0.0.tgz", + "integrity": "sha512-7P13hA42LWIm4o+speQC5Yhs3D+3q9nvuItOxLCzess1sPDeBKi5dQi3w+C2MBTDyVN0CTKL86iClyyOnrbuRQ==", "dev": true, "optional": true }, diff --git a/package.json b/package.json index 4964db70b13..8f31af7dd3d 100644 --- a/package.json +++ b/package.json @@ -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", From ef32af45d7f2ae6cc2472441b7146b3c3bfba6a9 Mon Sep 17 00:00:00 2001 From: Christopher Allen Date: Fri, 15 Oct 2021 19:36:05 +0100 Subject: [PATCH 2/4] 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. --- scripts/gulpfiles/build_tasks.js | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/gulpfiles/build_tasks.js b/scripts/gulpfiles/build_tasks.js index 7010db85910..dfcd0af8741 100644 --- a/scripts/gulpfiles/build_tasks.js +++ b/scripts/gulpfiles/build_tasks.js @@ -91,7 +91,6 @@ var JSCOMP_ERROR = [ // 'strictPrimitiveOperators', 'suspiciousCode', 'typeInvalidation', - 'undefinedNames', 'undefinedVars', 'underscore', 'unknownDefines', From da63810f7fea88c892db17eae283c4fb140381d4 Mon Sep 17 00:00:00 2001 From: Christopher Allen Date: Fri, 15 Oct 2021 22:03:00 +0100 Subject: [PATCH 3/4] Provide externs for base.js functions Per comment: fixes compiler errors from build:debug. --- externs/goog-externs.js | 53 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) diff --git a/externs/goog-externs.js b/externs/goog-externs.js index 8b956d4b037..dcc80965ae6 100644 --- a/externs/goog-externs.js +++ b/externs/goog-externs.js @@ -5,7 +5,17 @@ */ /** - * @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 */ @@ -13,3 +23,44 @@ * @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) {}; From 2a371a2d1d3d3815050bf192bd7b6633271ab179 Mon Sep 17 00:00:00 2001 From: Christopher Allen Date: Fri, 15 Oct 2021 22:04:12 +0100 Subject: [PATCH 4/4] Fix erroneous import Blockly.serialization.ISerializer uses named exports, so we need to destructure the import. --- core/registry.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/registry.js b/core/registry.js index 5b286557581..e4f91c3b48b 100644 --- a/core/registry.js +++ b/core/registry.js @@ -41,7 +41,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');