@@ -117,12 +117,9 @@ function genproto_group3_commonjs_strict(cb) {
117117}
118118
119119
120- function getClosureCompilerCommand ( exportsFile , outputFile , keepSymbols ) {
121- let compilationLevel = 'ADVANCED' ;
122- if ( keepSymbols === true ) {
123- compilationLevel = 'SIMPLE' ;
124- }
125-
120+ function getClosureCompilerCommand ( exportsFile , outputFile ) {
121+ // Use the default optimization level: SIMPLE_OPTIMIZATIONS:
122+ // https://developers.google.com/closure/compiler/docs/compilation_levels#simple_optimizations
126123 const closureLib = 'node_modules/google-closure-library' ;
127124 return [
128125 'node_modules/.bin/google-closure-compiler' ,
@@ -139,13 +136,13 @@ function getClosureCompilerCommand(exportsFile, outputFile, keepSymbols) {
139136 '--js=binary/utils.js' ,
140137 '--js=binary/writer.js' ,
141138 `--js=${ exportsFile } ` ,
142- `--compilation_level="${ compilationLevel } "` ,
143139 '--generate_exports' ,
144140 '--export_local_property_definitions' ,
145141 `--entry_point=${ exportsFile } ` , `> ${ outputFile } `
146142 ] . join ( ' ' ) ;
147143}
148144
145+
149146function gen_google_protobuf_js ( cb ) {
150147 exec (
151148 getClosureCompilerCommand ( 'commonjs/export.js' , 'google-protobuf.js' ) ,
@@ -157,8 +154,7 @@ function commonjs_testdeps(cb) {
157154 'mkdir -p commonjs_out/test_node_modules && ' +
158155 getClosureCompilerCommand (
159156 'commonjs/export_testdeps.js' ,
160- 'commonjs_out/test_node_modules/testdeps_commonjs.js' ,
161- true ) ,
157+ 'commonjs_out/test_node_modules/testdeps_commonjs.js' ) ,
162158 make_exec_logging_callback ( cb ) ) ;
163159}
164160
0 commit comments