diff --git a/gulpfile.js b/gulpfile.js index 7317e88..6960e5b 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -117,12 +117,9 @@ function genproto_group3_commonjs_strict(cb) { } -function getClosureCompilerCommand(exportsFile, outputFile, keepSymbols) { - let compilationLevel = 'ADVANCED'; - if (keepSymbols === true) { - compilationLevel = 'SIMPLE'; - } - +function getClosureCompilerCommand(exportsFile, outputFile) { + // Use the default optimization level: SIMPLE_OPTIMIZATIONS: + // https://developers.google.com/closure/compiler/docs/compilation_levels#simple_optimizations const closureLib = 'node_modules/google-closure-library'; return [ 'node_modules/.bin/google-closure-compiler', @@ -139,13 +136,13 @@ function getClosureCompilerCommand(exportsFile, outputFile, keepSymbols) { '--js=binary/utils.js', '--js=binary/writer.js', `--js=${exportsFile}`, - `--compilation_level="${compilationLevel}"`, '--generate_exports', '--export_local_property_definitions', `--entry_point=${exportsFile}`, `> ${outputFile}` ].join(' '); } + function gen_google_protobuf_js(cb) { exec( getClosureCompilerCommand('commonjs/export.js', 'google-protobuf.js'), @@ -157,8 +154,7 @@ function commonjs_testdeps(cb) { 'mkdir -p commonjs_out/test_node_modules && ' + getClosureCompilerCommand( 'commonjs/export_testdeps.js', - 'commonjs_out/test_node_modules/testdeps_commonjs.js', - true), + 'commonjs_out/test_node_modules/testdeps_commonjs.js'), make_exec_logging_callback(cb)); } diff --git a/package-lock.json b/package-lock.json index 58fa470..1a8e71f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,13 +1,13 @@ { "name": "google-protobuf", - "version": "3.21.0", + "version": "3.21.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "google-protobuf", - "version": "3.21.0", - "license": "BSD-3-Clause", + "version": "3.21.1", + "license": "(BSD-3-Clause AND Apache-2.0)", "devDependencies": { "glob": "~7.1.4", "google-closure-compiler": "~20190819.0.0",