Bradford C. Smith edited this page Nov 6, 2018 · 101 revisions


Here's a list of recent releases of Closure Compiler. To download a binary version of any release, see Binary Downloads. We also update the source distribution and the compile service (at at each release.

For complete list of changes refer to the change log


October 28, 2018 (v20181028)

  • Typechecking will now run for builds with --language_out=ECMASCRIPT_2015. Previously, typechecking was disabled for output level better than ES5.
  • Made name alias inlining more aggressive to fix some cases where property collapsing causes bad output
  • Change async transpilation to work around an MS Edge bug.
  • Fixed bug causing some properties aliasing global names to be set to null
  • Removed obsolete RemoveSuperMethods pass.
  • Improved type checking for destructured parameters and assignments.

October 8, 2018 (v20181008)

  • Typechecking and other checks now see untranspiled classes and arrow functions
  • ES2018 feature: Allow previously invalid escape sequences in tagged template literals, according to
  • The "Symbol" polyfill is now injected less often. Specifically, the use of "for-of" no longer requires the Symbol polyfill.
  • GitHub issue #3080: The WeakMap polyfill no longer causes infinite recursion when freezing objects recursively.
  • Rename the helper method for declaring a closure namespace from an ES6 module from from goog.module.declareNamespace to goog.declareModuleId.
  • PolymerPass now generates goog.exportProperty calls (instead of externs) when protecting Polymer element methods from renaming and dead code removal.
  • Fixed crash when printing "typeof" in type expressions when printing JSDoc.
  • We no longer accept missing template parameters as unknowns in the unknown conformance checks.
  • Fixed bug using quotes from command line on windows. (GitHub issue #3081)
  • Recognize named capture groups in Regex expressions and report error when trying to transpile named capture groups
  • @suppress is now legal on computed property methods and applies to both the property name expression and the method body.
  • symbol is now an allowed type in in expressions (github issue 3060)

September 10, 2018 (v20180910)

  • The "typeof" type expressions now have preliminary support. Type expressions of the form "typeof x" can be used to refer to types of objects that are were previously anonymous such as a namespace, an enum definition or a constructor.
  • Improved the "duplicate provide" error message to include the other file.
  • Fixed bug where compiler failed to warn on variables referenced before declaration inside inner block scopes.
  • (ES_2018) Recognize unicode property escapes in regular expression literals. Generate a warning since we don't transpile those yet.
  • (ES2018) Recognize lookbehind assertions in regular expression literals. Generate a warning since we don't transipile those yet.
  • @protected properties of outer classes are now accessible from inner ones.
  • Fix for bad code do to inlining of references to "super".
  • Applied Java 10 C2 bug workaround.
  • Initial implementation for async generators available with an ES2018 input language level.

August 5, 2018 (v20180805)

  • GWT version of the compiler now supports --js and --externs flags when executed by NodeJS.
  • Fixed a crash that occurred when extending a non-builtin class named Object.
  • Fixed a bug causing incorrect escaping in template literals for ES6+ output.
  • You can now specify STABLE for input and/or output language level to request the latest version of JavaScript that is fully supported by the compiler. Currently, this means ES_2017 for input and ES5 for output.
  • Fixed bug in optimization of shorthand assignments (e.g. +=, *=)

July 16, 2018 (v20180716)

  • Add a pom file for building a RefasterJs jar.
  • Type checker now knows that global let and const declarations do not add properties to the global object. To avoid a missing property error, you must use var foo if you want to later access
  • Improvements to CommonJS rewriting support.
  • Improvements to the typechecking of several ES6 patterns, including rest/spread.
  • Forward references to types now preserve their type arguments.
  • The npm distribution now includes native binaries for MacOS and Linux. Native binaries offer faster compile times without requiring a JVM.

June 10, 2018 (v20180610)

  • This release now contains the JS version of Closure Compiler inside the standard NPM package.
  • Consider @desc as @const
  • Remove special handling for @interface initialized to goog.abstractMethod
  • Fix inline type annotations of optional and var_args parameters.
  • Improve CommonJS UMD pattern detection.
  • Removed special handling for Error and subclasses: they will no longer be implicitly added if missing from (nonstandard) externs.
  • Typechecking and other checks now see untranspiled template literals, computed properties and object literal member functions.
  • Fixed bug where the compiler wasn't reporting duplicate destructured declarations.
  • Improved type inference for 'assign op's such as *=
  • Typechecking and other checks now see untranspiled for-of loops
  • Fixed incorrect code removal bug. The fix makes an optimization more conservative so may slightly increase code size.
  • Compiler preserves an input source map's sourcesContent in the output source map
  • Renamed code-splitting flags from "module" to "chunk". e.g. cross_module_code_motion -> cross_chunk_code_motion
  • Removed JSDoc parser support for "namespace types" (e.g. {jQuery.})
  • Overhauled type inference's data structures for tracking flow-sensitive types
  • Typechecking and other checks now see untranspiled let/const variables.
  • Fixed bug in for loop transpilation in generator functions
  • Fix scoping of catch variables during type inference.

May 06, 2018 (v20180506)

  • Simplified transpilation of async functions for decreased code size
  • Fixed redeclared variable error for rest destructuring
  • Corrected handling of +0 and -0 in Map and Set polyfills
  • --new_type_inf is now a no-op flag. NTI has been turned down (consider strictCheckTypes as an alternative).
  • Removed the deprecated Text.prototype.replaceWholeText API
  • Fixed bug in code generator for arrow function bodies with object literals
  • Implemented string literal trim() folding
  • Updates to support for local (non-global) @typedef declarations
  • Updates to improved support for local (non-global) type declarations.
  • Modified handling of extern declarations such that a class' @implements are fulfilled implicitly rather than always requiring explicit redefinitions.
  • Improved type inference on callbacks without an explicit type declaration
  • Better error checking in generator functions. Type checking code now understands generators and sees them un-transpiled for all use cases.
  • Better error checking for let/const and for-of loops in --checksOnly mode only. Type checking code sees them as untranspiled.

Apr 02, 2018 (v20180402)

  • Fixed flaky stack overflow problem in serialization code.
  • Corrected corner-case behavior of Array.prototype.includes polyfill.
  • Add a polyfill for Promise.prototype.finally.
  • Introduce "Global" as the type of the global object.
  • Compiler will now keep running compiler passes after hitting non-fatal errors (i.e. those that are not errors by default).
  • Misplaced @suppress warnings are now on by default.

Mar 19, 2018 (v20180319)

  • Added "misplacedSuppress" diagnostic group for warning about misplaced @suppress annotations.
  • "strictMissingProperties" is now stricter about properties referenced in conditionals. Only "typeof" is allowed as a property existence check.
  • Fixed a bug that prevented transpilation of ** in some cases.
  • Fixed an unused code removal bug
  • Improved transpilation of spread ...expr to improve code size and prevent a code pattern that blocked removal of unused code.
  • Stricter "strictMissingProperty" checks.
  • "strictCheckTypes" diagnostic group to enable both the "strict operators" and "strict property access" checks
  • Added preliminary support for 'symbol' as a primitive type to the type system.
  • Bugfixes/performance improvements in the --checks_only mode
  • ES6-output improvements:
    • StripCode now supported
    • ReplaceMessages now supported
  • Added new "strictPrimitiveOperators" diagnostic group for getting stricter NTI-like checking of primitive operators.

Feb 04, 2018 (v20180204)

  • Replace RemoveUnusedClassProperties and smartNameRemoval passes with new RemoveUnusedCode optimization pass.
  • Introduce "strictMissingProperties" that emits warnings when properties are referenced and can only be found on subtypes. These warnings can be suppressed with "missingProperties" or "strictMissingProperties" but are enabled with "strictMissingProperties".
  • Now allow @suppress JSDoc to be attached to any type of declaration (including let/const/class) instead of only functions/methods.
  • Add support for transpiling object rest and spread.
  • Removed obsolete optimization pass ChainCalls
  • Deleted the legacy option to optimize the property registry in OTI.
  • Block-scoped function declarations are now considered an ES6 feature and are treated as lexically scoped to the declaring block (per ES6 strict specification) and are no longer accessible elsewhere outside that block.
  • Fix polyfill bug where Math.hypot(0, 0) was returning NaN.
  • Add support for mutable exports and forbid duplicate exports in ES6 modules.
  • Misc bugfixes and improvements.

January 01, 2018 (v20180101)

  • If you are using the inlineFunctions or inlineLocalFunctions boolean fields of the compiler options, you will have to migrate to the getter/setter methods setInlineFunctions(Reach) or getInlineFunctionsLevel() instead.
  • Experimental support for @noinline annotation. It will prevent inlining of symbols by the inlineVariables and inlineFunctions passes, but not other inlining passes.
  • Compiler.addToDebugLog is deprecated. If you have a custom pass that calls it, please switch to logging the information with a standard Java Logger.
  • Labeled function and class declarations are now a parse error. These are illegal in ES6 strict mode.
  • ES6-output improvements:
    • RescopeGlobalSymbols now supported
    • ReplaceIdGenerators now supported
    • ClosureCodeRemoval now supported
    • CrossModuleMethodMotion now supported
  • Made AggressiveInlineAliases more aggressive about inlining constructors to prevent decomposition from hiding references to static properties that CollapseProperties needs to replace.
  • Improved optimizations of modules in SIMPLE mode with wrapped output.
  • Fixed a bug that prevented property names defined in extern JSDoc from being recognized when type checking was disabled. This led to extern properties being renamed in some cases.
  • RemoveUnusedPrototypeProperties pass removed and its functionality merged into RemoveUnusedCode. This gives a performance boost by reducing redundant work.

December 03, 2017 (v20171203)

  • Fixed a bug that broke the JavaScript (GWT) version of the compiler (closure-compiler-js). That project and its npm have now been updated.
  • Fixed a bug causing incorrect code removal.
  • ES6-output improvements:
    • J2CL passes now supported
    • CrossModuleCodeMotion now supported
    • name(Un)MappedAnonymousFunctions now supported
    • OptimizeCalls now supported
  • Several improvements to handling of and interoperation between CommonJS and ES6 modules.

November 12, 2017 (v20171112)

  • For projects invoking the compiler from Java code: Removed Compiler method reportCodeChange. Code that was using this should switch to reportChangeToChangeScope or reportChangeToEnclosingScope.
  • Improvements to optimization passes related to OptimizeCalls.

October 23, 2017 (v20171023)

  • When using the compiler to manage dependencies, made the dependency ordering match that of ES6 modules. In particular, this means that dependencies are processed depth first in the order of the imports in the file, starting from the entry points. For more details, see
  • "use types for optimizations" no longer triggers optimizations of comparisons with null and undefined.

September 10, 2017 (v20170910)

  • Improvements to performance of optimization passes.
  • Improved support for goog.modules with object literal exports style (e.g. exports = {Foo, Bar})
  • Disallow 'is' property in a Polymer behavior.
  • Continuing improvements to experimental ES6 output mode.
  • Building the compiler and its tests now requires Java 8.

August 6, 2017 (v20170806)

  • Several improvements to optimization of output modes > ES5. Type checking and optimizations that depend on that don't work yet, though.
  • CrossModuleCodeMotion now moves all symbols to the current best possible module in a single run of the pass, greatly reducing execution time for this pass. It also does a much better job of selecting the best module, leading to significant transitive module size improvement.
  • ES6 static method inheritance improved where possible. ES6 classes are supposed to inherit static methods by prototype inheritance between the 2 constructor functions. This is now implemented for all browsers that can support it, falling back to copying properties on those that don't.
  • ECMASCRIPT_2017 is now the default language mode.
  • The .throw() method for a generator now works correctly when its argument is undefined. Previously it behaved as if .next() had been called. This also fixed a bug with async functions that caused promises rejected with undefined to be treated as if they were completed successfully.
  • The output language defaults to ES5 instead of to the input language.
  • Promoted a couple of useful diagnostics to their own diagnostic group:
    • jsdocMissingType: Uses of @param/@return without a type (was lint-only).
    • unnecessaryEscape: Backslashes in string literals that are ignored (was lint-only).
    • misplacedMsgAnnotation: Warnings about misplaced @desc/@hidden/@meaning JSDoc annotations (was only available as part of misplacedTypeAnnotation).

June 26, 2017 (v20170626)

  • --language_out now allows ES2015 and higher. Passes which don't yet know how to handle ES2015 (including typechecking, and most optimization passes) will be skipped, so this is not recommended for production builds.
  • Several passes updated to work with ES2015+ code.
  • Read access to super class properties via super.someProperty is now allowed.
  • Fixed a bug that broke access to this within an async arrow function nested in another async function.
  • Changed the default ES6 module resolution mode to match that used in browsers.
  • Tools that call the compiler via its Java API and provide their own PassConfig may need to include a featureSet() method in each PassFactory.
  • CrossModuleCodeMotion now always picks the module with the smallest number of dependents when moving definitions. This will reduce the amount of code that must be loaded for some modules.
  • Now ES6 language mode defaults to strict mode. If you don't want strict mode checks, use the --strict_mode_input=false flag.
  • Allow --strict_mode_input flag to work in all language modes, including ES3.

May 21, 2017 (v20170521)

  • Fixed a bug that caused the polyfill versions of Promise.all() and Promise.race() to be renamed when disambiguate properties was enabled.
  • Fixed a bug in CrossModuleCodeMotion that caused some global variable definitions to become pinned to a module, when they should be allowed to move.
  • Allow --emit_use_strict flag to work in all language modes, including ES3.
  • NTI: handle record/interface properties declared on THIS inside the constructor.
  • Make Reflect.construct polyfill compatible with ES3.
  • New BANNED_NAME_CALL conformance check

April 23, 2017 (v20170423)

  • In RescopeGlobalSymbols, handle the case where a variable is defined both in the externs and in the source.
  • Symbol polyfill uses quoted properties to access members of $
  • NTI: improve typing of .call/.apply on methods of generic classes.
  • Support compilation of programs with missing definitions.
  • Absolute path imports now resolve when combined with --js_module_root flags.

April 9, 2017 (v20170409)

  • Added diagnostic group tooManyTypeParams to check for invalid templatized types such as Array<string, number>.
  • Use a size heuristic to stop the optimizations early when they are not making enough changes. Improves compile time by about 10%.
  • Added BanCreateDom conformance check.
  • Fixed a bug preventing definition of @record properties in the constructor when collapse properties is enabled.
  • Bugfix related to unions of unresolved types in the old type checker.
  • NTI: improve type checking of unannotated callbacks.
  • NTI: handle .call and .apply during @const inference.
  • The call to goog.module() must be the first statement in a goog.module. For instance, if you had goog.setTestOnly() before goog.module() the order must be reversed.
  • Check for temporal dead zone violation in for (let x of [x]);
  • Don't warn when an alias inside a goog.module is only used in type annotations.
  • Performance improvements to the new type inference and to InlineSimpleMethods.

February 18, 2017 (v20170218)

  • --polymer_pass flag is deprecated in anticipation of Polymer 2 support. Use --polymer_version=1 instead.
  • Add a --module_resolution flag to specify which algorithm the compiler should use to lookup modules. The flag has 3 options:
    • LEGACY (default) - the same behavior the compiler has used historically. Users are recommended to begin migrating away from this behavior.
      • Module paths which do not begin with a "." or "/" character are assumed to be relative to the compilation root.
      • Modules files can only have ".js" file extensions. The extension is auto-added if the import omits them.
    • NODE - uses the node module resolution algorithm.
      • Modules which do not begin with a "." or "/" character are looked up from the appropriate node_modules folder. Includes the ability to require directories and .json files.
      • Files may be any extension. The compiler searches for an exact match, then ".js", then ".json". package.json files should be supplied as source to the compiler.
    • BROWSER - mimics the behavior of native module loading in browsers (browser support for this is close, but not yet generally available). The behavior of this mode will be adjusted to match the behavior of browsers as they release.
      • Modules must begin with a "." or "/" character.
      • Modules import statements must include the file extension.

January 24, 2017 (v20170124)

  • Improved optimization of modules with named exports.
  • Several small improvements to compile-time performance.
  • Add a check that super() is called before accessing this.
  • Make type-based optimizations safer about null/undefined.
  • Improved handling of parameterized object types in NTI (Object).
  • In NTI, allow any IArrayLike to be used with .apply function calls.

December 1, 2016 (v20161201)

  • New type inference supports @abstract.
  • CommonJS modules now use the node module resolution algorithm and support using JSON files as module source.
  • Bugfixes in DisambiguateProperties for interface inheritance and implicit use of interfaces.

October 24, 2016 (v20161024)

  • Polyfills for Promises.
  • Support for async/await by transpiling to generators.
  • Improvements to CommonJS module rewriting.
  • New flag for strict-mode output: --emit_use_strict.
  • Duplicate keys in an object literal are always an error, even if strict mode is not explicitly enabled.

September 11, 2016 (v20160911)

  • Various compile time performance improvements to the optimization passes.
  • Allow applying input source maps to the generated source map
  • Better support/fixes for @abstract classes and methods
  • Add externs for jQuery 1.12 & 2.2
  • Add Boolean.prototype.valueOf to externs
  • Externs for Google Maps API 3.26

August 22, 2016 (v20160822)

  • Improved support for refactoring arrow functions containing 'this' or 'arguments'
  • Improve branch coverage instrumentation
  • Improvements for NTI compatibility mode
    • Don't warn when passing a method where a function is expected
    • type variables in body of a function are unknown.
  • Improvements for NTI
    • Recognize namespace aliasing in goog.module exports
    • Don't mistake specialized versions of inherited properties for own properties. (Fixes #1943 on Github.)
  • Added externs for fetchapi Headers: keys, values, entries, based on:
  • Add a distinction between @const and @final. Only @final means a class or constructor is not subclassible.
  • Warn if an ES5 class extends an ES6 class.
  • The exponentiation operator ** is now supported for --language_in=ECMASCRIPT7
  • More compile-time checks for @abstract classes and methods
  • New optimization: RemoveSuperMethods, which deletes methods that only make a super call with no change in arguments

July 13, 2016 (v20160713)

June 21, 2016 (v20160619)

  • Improved module rewriting for destructured imports.
  • New --checks_only flag that causes the compiler to not run any optimizations.
  • Allow prevention of property renaming based on the coding convention.
  • Removed support for the var name = goog.require(...).name; import pattern. The suggested alternative is const {name} = goog.require(...);
  • Added support for @abstract on methods as an ES6-compatible alternative to goog.abstractMethod.
  • Type based renaming now supports Object.defineProperties and thus ES6 getters and setters.

May 17, 2016 (v20160517)

  • ES6 library polyfills (e.g. Map, etc) are on by default. They can be disabled with --rewrite_polyfills=false.
  • Improve the rewriting of goog.modules. As a result, we now disallow accessing (non-legacy) goog.modules by their fully qualified name. Also, includes a few new checks of goog.module misuse.
  • Allow destructuring imports inside goog.module (e.g. `const {assert} = goog.require('goog.asserts');)
  • Switch to ES6 module ordering
  • Fix parsing of very deeply nested binary operators to avoid stack overflows.
  • Check for missing/incorrect usages of ES6 super statement.
  • Remove the "unnnecessary cast" check.
  • Modules which are imported, but have no exports are now properly rewritten
  • Updated dead assignment elimination to eliminate assignments in var/let/const statements, saving a few hundred bytes for some projects.
  • Better optimization of switch statements that contain a default case.
  • More aggressive constant folding.
  • CommonJS module processing now rewrites require.ensure calls.
  • Command line flag output is now grouped by category for greater readability
  • Module processing now properly recognizes absolute paths

March 15, 2016 (v20160315)

  • Improved code removal of Object.defineProperties calls
  • Compiler support for goog.reflect.cache, which allows functions with internal caches to be considered side-effect free for optimizations.
  • Linter now finds missing/extra ES6 import statements.
  • The inferredConstCheck diagnostic group is a no-op. Use the$InferredConstCheck conformance check instead.
  • The new type inference handles IObject/IArrayLike.
  • Run FlowSensitiveInlineVariables before function inlining to improve code size.
  • --use_types_for_optimization true now enables additional constant folding opportunities.
  • Allow entry points that don't provide any symbols (like ES6 or CommonJS)
  • CommonJS module rewriting is now only triggered by the presence of an export. Previously require calls also triggered a rewrite.
  • New lint checks:
    • Duplicate case statements in a switch
    • Check for the for (!x in obj) pattern, which is usually a mistake
    • Check for missing @return JSDoc

February 08, 2016 (v20160208)

  • Fixes the bug about file globs that was in the rolled-back January release.
  • Reorganization of the dependency management flags. --manage_closure_dependencies and --only_closure_dependencies are deprecated and replaced by --dependency_mode. See
  • CommonJS Modules now interoperate with ES6 modules with improved type inference. See
  • Improved handling of templated types for IObject and Array to make it possible for Array to implement IArrayLike.
  • Removed the ability to use , for union types as it led to confusing situations. You will need to rewrite types like {number,string} as {number|string} and you may find some new type errors because types such as Object<number|string, X> were previously not parsed as intended.
  • Minor improvements to constant folding. For example, "new Date == null" becomes "false", Boolean(x) to !!x
  • Allow inlining of uncollapsed constructor properties if type based optimization are enabled and the value is immutable.
  • The coverage instrumentation pass will no longer crash on arrow functions.
  • New flag for the command-line runner: assume_function_wrapper. This flag is used to indicate that "global" declaration will not actually be global but instead isolated to the compilation unit.
  • Passing a "..." to a constructor should now work correctly. The output involves Function.prototype.bind so you'll need to set --language_out=ES5 to make this work.
  • Improved exit minimization in switch statements
  • The inferredConstCheck diagnostic group is deprecated, and will soon be replaced by the$InferredConstCheck conformance check.
  • New lint check: Warn about useless blocks like
    {foo: 'bar'}; // Useless block


if (denied) {
} { // Useless block

January 25, 2016 (v20160125) [rolled-back]

December 16, 2015 (v20151216)

  • Allow input and output as JSON streams to support the gulp and grunt workflows. See:
  • Compiler web service and CommandLineRunner now default to transpiling from ES6-ES3 (instead of assuming input is ES3).
  • Pretty print record types in error messages to make it easier to find the source of type mismatches.
  • HEURISTIC renaming has been removed.
  • Don't warn if the root of a namespace is defined twice in the externs.
  • Some optimization passes now understand Object.defineProperties

October 15, 2015 (v20151015)

  • ECMAScript 6 is officially supported.
  • CollapseProperties will now collapse in more cases, possibly resulting in fewer warnings and smaller code size.
  • Destructuring is supported for goog.require()s in ES6 modules.
  • @struct is now supported for @interface and @record declarations in the "old" type inference (The NTI has this behavior by default). goog.defineClass @interfaces are @struct by default (like @constructor)
  • "unknown property" conformance check now checks @interface and @record types.
  • Improved performance for parsing arrays, objects, and parenthesized expressions.
  • Typechecking improvements affecting module code.
  • Inline type annotations on function parameters with @type will now be respected.

September 20, 2015 (v20150920)

  • Better support for IArrayLike, which checks usages of []
  • Improved handling for arguments array
  • Support structural typing for interfaces with @record.

September 1, 2015 (v20150901)

  • Support for different externs sets via the --env flag.
    • --env=CUSTOM replaces the --use_only_custom_externs flag.
    • Core language externs are always loaded - even for custom environments.
  • Improved handling of type aliases, including types exported across modules.
  • Use ES6 module ordering when in ES6 mode.
  • Remove checkStructDictInheritance diagnostic group (it no longer did anything)

July 29, 2015 (v20150729)

  • Aggressive variable checks are now on by default, and the setAggressiveVarCheck flag has become a no-op.
  • Duplicate license comments will be omitted in the output.
  • Stringifiable object keys check is on by default.
  • Removed double-bar syntax (||) for declaring unions in type annotations.
  • Removed --accept_const_keyword flag. Use --language_in=ES6_STRICT instead.
  • --jscomp_(warning|error|off) flags now accept the '*' char as a wildcard.

June 9, 2015 (v20150609)

  • AMBIGUOUS_FUNCTION_DECL is now an error by default.
  • New lint check: Extended interfaces should be goog.require'd
  • --generate_exports generates goog.exportProperty calls instead of goog.exportSymbol for @exports on prototype properties.
  • Several fixes and improvements to the new type inference
  • Several improvements to the PolymerPass.
  • ES6-related fixes:
    • Fix bug with redeclared this for arrow functions
    • Fix goog.scope rewriting to work in ES6 mode

May 5, 2015 (v20150505)

  • The @expose annotation is now deprecated. Please use @export or @nocollapse instead.
  • Removed the "checkStructDictInheritance" warning so that @struct classes can extend non-@struct classes, and vice versa.
  • Better typechecking for properties assigned in a local scope. See for details.
  • Several fixes and improvements to the new type inference.
  • Classes defined in a goog.module can now be subclassed.
  • Added the PolymerPass which handles Polymer-specific patterns (thanks to @jklein24)
  • Added a new lint check to make sure invalid types are not used as object keys. See (thanks to @nbeloglazov).
  • Better warnings for misplaced JSDoc annotations.
  • ES6-related fixes:
    • Transpiled for/of loops now work correctly with native Map and Set implementations.
    • Fixed typedefs in ES6 modules to be renamed correctly.
    • Improved output codesize for ES6 code by ensuring that unused classes are eliminated.
    • Various fixes to --preserve_type_annotations mode (thanks to @shicks)

March 15, 2015 (v20150315)

  • Type based optimizations are now enabled by default in advanced mode. They may be disabled with --use_types_for_optimization false
  • Stricter missing goog.require check
  • Fix various crashes
  • Bugfixes in transpiling of ES6 modules and classes
  • More work on still experimental inline type syntax
  • Implement more lint checks in compiler:
    • Extends without goog.require
    • Use of implicitly nullable JSDoc

February 2, 2015 (v20150126)

  • Initial work on supporting TypeScript-style type annotations, with the --language_in=ES6_TYPED flag.
  • The type annotation {?T} is now parsed correctly if T is a template type.
  • Infer the type of 'this' for functions that are immediately bound.
  • Performance improvements in the DisambiguateProperties and AmbiguateProperties passes.
  • Removed support for '@type {function(...[Foo])}' (the new syntax is '{function(...Foo)}')
  • Added the new ES6 collections (Map, Set, WeakMap, WeakSet) to the standard ES6 externs.
  • Removed support for the @notypecheck annotation. Use @suppress {checkTypes} instead.
  • Removed the checkProvides DiagnosticGroup. You can now use --jscomp_{error,warning}=missingProvide instead.
  • Deprecated the --check_requires flag (use --jscomp_{error,warning}=missingRequire instead).
  • Lots of improvements in the new type inference.
  • Fixed a bug causing the old type inference to behave differently in Java 8 than it does in Java 7
  • Removed some places where the parser was doing unnecessary lookahead, which will make parsing much faster, particularly for cases such as deeply nested array literals.
  • Fixed a bug in the transpilation of ES6 for/of loops.

December 15, 2014 (v20141215)

  • General:
    • Improved "smart name removal" runtime by 90% in some cases.
    • Check inheritance inside prototype object literals (github issue #707)
  • Closure library support:
    • "missing goog.require" check now validates that implemented interfaces are goog.require'd
    • goog.module exports are now considered constants
  • Command line runner:
    • added --rename_prefix_namespace command-line option
  • Conformance:
    • framework now allows for naming and extending rules for better composability
    • new NoImplicitlyPublicDecls standard rule
  • Parser:
    • warn about misplaced function annotations (@param/@return)
    • Minor parser speed improvements
    • Parse ES6 template literals correctly
  • New type inference:
    • function bind and goog.bind inference
    • support for @return on constructors and @this on functions
    • misc fixes

November 20, 2014 (v20141120)

  • Add a warning for mistyping namespaces as Object. (See for more explanation)
  • New JS Conformance check: ban Closure-style top-level declarations from having implicitly public visibility.
  • Migrated several lint checks into the compiler
  • Default visibility levels in @fileoverview is now supported.
  • File level @package no longer applies to goog.provide default namespaces
  • Add a warning for misuse of goog.provides/goog.requires
  • Fixes for goog.module rewriting
  • Fix goog.defineClass when extending a generic class
  • function(...[string]) can now be written as function(...string)
  • "&&" and "||" are now allowed in @define default value expressions
  • New type inference fixes:
    • Made nullable dereference checks suppressible in new type inference
    • Understand primitive unboxing
  • A few fixes to ES6 transpilation of generators, spread operators, and synthesized class constructors, as well as updates to the module syntax tracking the spec.

October 23, 2014 (v20141023)

  • Compiler now allows generics without the dot (e.g. Foo<T>)
  • Treat export as visibility annotation, allowing /** @export {Foo} */
  • Updates to ES6 parser and transpiler to match new ES6 spec
  • Got default externs working with new type inference
  • Moved from to gson
  • More work on @fileoverview visibility annotations (still experimental)
  • Github issues fixed: #186, #187, #550, #589, #606, #618, #619, #635, #640, #643, #652, #656, #658

September 23, 2014 (v20140923)

  • Various bug fixes and improvements to the new type inference, including inference of array literals (still off by default).
  • More Type Transformation work.
  • ES6 parser and transpilation fixes, including support for ES6 destructuring.
  • Move common ES6 Math methods to the "implemented" ES6 features in the standard externs
  • More fixes and improvements for goog.module
  • Open-source RefasterJs and the conformance framework.

August 14, 2014 (v20140814)

  • Fix crash when declaring "var arguments" within a function.
  • RescopeGlobalSymbols generates more compact code.
  • CollapseProperties no longer warns about namespaces redefinitions for "var x = x || {}" or "a.b = a.b || {}"
  • Improved "useless code" warnings
  • Reduce memory consumed by strings in the AST generated by the parser.
  • ES6 parser fixes: semicolons in class definitions, computed properties, etc
  • Progress on ES6 transpilation: generators, default parameters, modules, destructuring, let/const, classes, for/of statements.
  • Performance improvements to the new type inference (still off by default).

July 30, 2014 (v20140730)

Main changes in this release:

  • Warn if an @param has a '.' in the name.
  • Progress on ES6 transpilation: generators, default parameters, modules, destructuring, let/const, classes, for/of statements.
  • Performance improvements to the new type inference (still off by default).

June 25, 2014 (v20140625)

Major changes in this release:

  • Variables in externs are copied to the "window" object. This means that properties can be accessed as "" even if they're only declared in the externs as "var foo;"
  • Added support for goog.module() which helps the transition to ES6 modules.
  • Added support for (non labs-prefixed) goog.defineClass which helps the transition to ES6 classes.
  • Added @package access control mode which means the given variable can be accessed from within the same package (like package-private in Java). Thanks to 20% contributor Brendan Linn.
  • Several fixes to make the compiler work with node.js code, mostly from @nicks.
  • Turn on the InferConst pass, which allows the compiler to do more typechecking and inlining.
  • Flatten module type expressions during module-preprocess.
  • Added --source_map_location_mapping flag. Thanks @terencehonles!
  • Added --output_wrapper_file flag. Thanks @retromodular!
  • Enable GatherExternsFromTypes pass for better handling of typedefs in externs.
  • Removed the old Rhino JS parser, since we are now fully switched over to the new ES6 parser.
  • Lots of work on transpiling ES6 to ES3, as well as running some checks directly on ES6 code. Big thanks to our interns, Matt Loring and Michael Zhou for pushing this work forward.
  • Lots of work on the new type inference system (not enabled by default yet)
  • Fixed Github issues: #110, #431, #432, #435, #439, #477

May 8, 2014 (v20140508)

  • Improvements to make goog.defineClass easier to use
  • Improvements to the command line option syntax, including file globs and -W/-O flags for warning levels and optimizations, respectively. See PR #403
  • Added sourceMapInputFiles option, to map from generated JS (for example, from Angular templates) to the original source.
  • New parser is enabled by default.
  • Several improvements to performance and memory usage.
  • Lots of work on the new type inference system (not on by default yet).
  • Initial support for some ES6 features in whitespace-only mode.
  • Fixed issues: issue 102, issue 119, issue 123, issue 186, issue 310, issue 387, issue 388, issue 389, issue 390, issue 400

April 7, 2014 (v20140407)

  • Add a warning for the use of goog.base for projects that want to support strict mode in uncompiled code.
  • Add "arguments.callee", "arguments.caller", "Function.prototype.arguments" and "Function.prototype.caller" to the "strict" mode checks.
  • Have the runtime type checker type-check Object as any object type, possibly with an exotic prototype - not necessarily inheriting from a standard Object.
  • Move the checking for 'with' statements into the StrictModeCheck.
  • Add an InferConsts pass, and use it demonstrate that it fixes problems with CommonJS aliases (off by default).
  • Lots of changes in the new type inference system (not enabled yet in this release)
  • A few changes in the new parser (not enabled yet in this release)
  • Add a warning for functions with a nullable return type that never return null (off by default)
  • Issues fixed: issue 354, issue 853, issue 1217, issue 1243, issue 1244, issue 1264, issue 1265, issue 1260, issue 1267, issue 1270

March 3, 2014 (v20140303)

January 10, 2014 (v20140110)

  • New pass: GatherExternProperties.
  • Deleted the RemoveTryCatch pass.
  • Includes a work-in-progress new type inference pass.
  • Warn about invalid use of id generators.
  • Add support for a strict-mode compatible version of goog.base.
  • Don't warn about ES3-incompatible property names in externs files.
  • Warn about the right class in private-property-access warnings.
  • Improvements to the fuzzer.
  • Fix issue 1056, issue 1131, issue 1135, issue 1144, issue 1147, issue 1157, issue 1160, issue 1166, issue 1168, issue 1189.

November 18, 2013 (v20131118)

  • Allow multiple JSDoc tags on the same line.
  • Warn for unnecessary casts (disabled by default).
  • Add the experimental ES6 parser to our tree; we may make it the default in the future.
  • Move compiler to Java 7.
  • Initial work on a fuzzer for the compiler.
  • Add another smart-name pass before property disambiguation (disabled by default).
  • Warn when goog.string.Const.from is not called with a string literal.
  • Bug fixes for cross-module method motion.
  • Bug fixes for template types.
  • Fix issue 1114, issue 1116, issue 1120, issue 1129.

October 14, 2013 (v20131014)

  • Disable the "rewrite function expressions" pass.
  • Improvements in type inference for generics, related to record types and to inheritance.
  • Allow unknown and record types in inline type annotations.
  • Recognize a function return type as an inline annotation.
  • Rotate commutative operators to eliminate parens.
  • Fix issue 1007, issue 1024, issue 1047, issue 1070, issue 1072, issue 1073, issue 1085, issue 1103.
  • Extern updates

August 23, 2013 (v20130823)

  • Experimental export option: exportLocalPropertyDefinitions
  • Support of inline type declarations in "var" statements.
  • RemoveUnusedClassProperties will now remove properties if a set exists on a prototype.
  • RemoveUnusedClassProperties is now on by default in ADVANCED mode.
  • Fix: an 8 year old operator precedence bug (Issue 1062).
  • Fix: incorrect variable inlining (Issue 1053)
  • CollapseProperties correctness improvements
  • Fix: spurious warnings for obviously good logical shifts
  • VariableReferenceCheck is now suppressible using existing diagnostic groups.
  • Extern updates

July 22, 2013 (v20130722)

  • Stricter missing-property checks for structs.
  • Improved type inference for assignments to the prototype property.
  • Fix incompatibility between removeUnusedClassProperties and Object.seal, and add the pass to advanced optimizations.
  • Open source the code-coverage instrumentation pass.
  • Allow constructors with a declared return type to be called without new.
  • Bugfixes for goog.inherits used with generic types.
  • Better detection of block comments that contain jsdoc tags.
  • In ES5 mode, don't quote object literal keys when they're ES3 keywords.
  • In ES3 mode, allow ES3 keywords as property names but quote them.
  • New jsdoc tag @disposes for use with CheckEventfulDisposal pass to specify particular arguments of a function to be disposed.
  • Updated externs for angular, jquery and maps api.
  • Fix issue 1017, issue 1020, issue 1021, issue 1023, issue 1030, issue 1033, issue 1035, issue 1042, issue 1043.

June 3, 2013 (v20130603)

  • Produce smaller code for boolean conditional expressions.
  • Better type checking for classes that implement or extend generic types.
  • More accurate attaching of JSDoc to AST nodes.
  • Allow collapse properties to collapse simple global aliases.
  • New CheckEventfulObjectDisposal pass for finding memory leaks in JS programs.
  • Change RescopeGlobalSymbols to not rewrite variables that do not cross JSModules.
  • Fix issue 965, issue 987, issue 994, issue 1002, issue 1006, issue 1008.

April 11, 2013 (v20130411)

  • Improve bad cast detection.
  • Add new diagnostic group for @struct/@dict inheritance warnings (checkStructDictInheritance)
  • compiler support for goog.define
  • experimental optimization: --disambiguate_private_properties
  • "strip suffix" improvements
  • improved experimental generics: support for user defined classes and interfaces using @template
  • removed support for @classTemplate (use @template)
  • improved "angular_pass" and bug fixes.
  • build type speed improvements for several compiler passes
  • new externs: svg, page visibility api, device orientation, device motion events, Intl, Jasmine
  • misc extern corrections
  • Fixes issue 921, issue 925, issue 927, issue 931, issue 936, issue 937, issue 942, issue 957

February 27, 2013 (v20130227)

December 12, 2012 (r2388)

  • support for type declarations with @protected and @private
  • dead code pruning of cases from switches with constant conditions.
  • type checking fixes
  • @struct/@dict annotations
  • Stable naming improvements
  • new warning: misplaced type annotation
  • new diagnostic groups: suspiciousCode, cast, misplacedTypeAnnotation
  • Added goog.defineClass support
  • Added goog.getMsgWithFallback support
  • better method templating support
  • better IIFE inference
  • better unused class removal
  • AMD/CommonJS improvements
  • Fixes issue 867, issue 857, issue 851, issue 271, issue 791, issue 841, issue 764, issue 61, issue 808, issue 820, issue 824, issue 804, issue 821

September 17, 2012 (r2180)

July 10, 2012 (r2079)

April 30, 2012 (r1918)

March 5, 2012 (r1810)

January 23, 2012 (r1741)

  • Compiler now preserves code with hidden side-effects in some cases. Addresses issue 64, issue 398
  • In Advanced mode, the compiler is now more aggressive about removing unused properties (RemoveUsedClassProperties).
  • Improved jQuery 1.7, Google Maps 3.7, Typed Array and other externs definitions
  • Experimental AMD and Common JS module support.
  • Parser improvements.
  • Better unused variable removal. issue 641
  • Better support for @lends. issue 314
  • Better type checking around conditionals, "Function.bind"/ "goog.bind", etc
  • Source maps now use the v3 format by default.
  • Removed some obsolete options from CompilerOptions
  • Fixes issue 644, issue 641, issue 638, issue 621 issue 619, issue 618, issue 603, issue 601, issue 600, issue 583, issue 575, issue 314 among others

November 14, 2011 (r1592)

October 3, 2011 (r1459)

  • Bad function inlining bug fixes
  • Type system handles more idioms for assigning to the prototype (issue 537)
  • Fixes compiler crash in UnreachableCodeElimination and InlineObjectLiterals (issue 545)
  • Easier to suppress visiblity warnings
  • Extend ExportTestFunctions so that it properly exports test methods defined on objects.
  • Various type-checking bug fixes
  • The module flags now lets you specify a %basename% placeholder with the name of the module output file.
  • Adds an experimental option for more aggressive function inlining
  • Other assorted issue fixes: 548, 533. 457, 538, 535, 534, 446, 511, 530, 529, 528

August 11, 2011 (r1346)

  • Bug fixes for using stdin as input that was introduced last release
  • Bug fix for live variable analysis to handle expression in for-in loops
  • Improve output delimiter to escaped when needed.
  • Better warnings for property disambiguation

August 4, 2011 (r1314)

June 15, 2011 (r1180)

  • Improvements to line-number reporting
  • Interfaces can extend multiple interfaces, with checks for conflicting signatures
  • Support for goog.typedef has been removed. Use the @typedef annotation.
  • Closure namespaces are @const by default
  • Optimization of parseInt, parseFloat
  • Emit a warning if a private property overrides another private property
  • Make sure functions are called with an appropriate 'this' type
  • Add warnings about parameters being reassigned in a way that violates their type definition
  • Add warnings if a object has properties defined before the object is defined
  • Add duplicate object literal key check to jscompiler es5 strict mode checks
  • Update jQuery 1.6 externs
  • Fixes issues 459, 477, 482, 486, and many others

May 2, 2011 (r1043)

  • Now emits a warning if a block comment looks like it should be a jsdoc comment.
  • Type checking improvements around interfaces.
  • Improved handling of constructors defined in object literals.
  • 20% smaller source maps (version 2).
  • Experimental source map improvements (version 3)
  • Rewrite goog.object.create at compile time
  • Fix issue 380,407,412,413,416,423, 428

April 5, 2011 (r964)

March 22, 2011 (r916)

  • Added support for @interface declarations with non-function members
  • Added support for check @const property definitions
  • Deprecation warnings are now on by default with VERBOSE warnings
  • Missing return warnings are now on by default with VERBOSE warnings
  • Improved variable renaming algorithm
  • Preliminary ECMASCRIPT5/ECMASCRIPT5_STRICT support (--language_in command line flag)
  • Compile-time performance issue (Issue 349)
  • More constants folding improvements
  • Optimizations on the call graph are now performed in the main optimization loop
  • goog.asserts are stripped by default, they can be enabled with the --debug option
  • Improved unused code removal
  • Other flag changes: --output_wrapper_marker support was removed, --flagfile support added
  • New extern: jQuery 1.5, Google Maps API 3.4, Facebook JavaScript SDK, WebGL, IndexDB
  • Fixed issues 387, 384, 383, 381, 378, 375, 372, 369, 367, 366, 364, 363, 353, 349, 348, 325, 322, 321, 319, 318, 315, 301, 269, 266, 251, 249, 247, 204, 195, 133

January 19, 2011

  • whitespace-only support for es5 getters and setters
  • New type syntax for structural constructors "{function(new:Type)}"
  • Support for the @lends annotation.
  • Add a @suppress {uselessCode} warnings group
  • Improvements to constant-folding
  • Native handling for goog.tweaks
  • Emits an error if the left-hand side of an assign isn't an assignable expression
  • removal of redundant returns and throws
  • Optimize the "arguments" variable when possible.
  • "toString" and "valueOf" are now officially assumed to be side-effect free.
  • Add a --closure_entry_point flag, for use in conjunction with --manage_closure_dependencies
  • Assorted type-checking fixes
  • Fixes issues 311, 268, 267, 248, 261, 258, 187, 255, 236, 244, among others

September 17, 2010

  • Full support for goog.scope
  • Better optimization of external calls that have no side effects (like getElementById)
  • Much better unused var removal
  • A number of peephole and constant-folding optimizations
  • Much faster source map generation
  • Better property detection for missingProperties check
  • Much better type inference in local scopes
  • type inference of return types on functions
  • type checker warns about comparison of functions to booleans, numbers, or strings
  • Better externs file validation
  • @suppress annotations work for all canonical warning groups
  • @notypecheck annotation blocks more warnings
  • General performance improvements
  • Fixes issues 188, 186, 96, 177, 143, 221, 205, 200, 197, 182, 194, 172, 191, 71, 66, 229, among others

June 16, 2010

  • Beta support for goog.scope
  • Smarter unreachable code analysis.
  • Folds "new Error" to "Error", "new RegExp" to "RegExp", etc.
  • Extract Prototype Member / Devirtualization improvements
  • deterministic source maps
  • Peephole optimizations
  • Added @nocompile annotation to work with --manage_closure_dependencies
  • Inline more functions into the global scope in advanced mode
  • Better detection for dangerous 'this' references in verbose mode
  • Disabled flow sensitive variable inlining by default, because it still has problems
  • Fixes issues 174, 166, 168, 125 among others

May 14, 2010

  • Shadowing of the arguments variable is now forbidden
  • Added the --manage_closure_dependencies flag (pending documentation)
  • Support for the @extern annotation
  • Type-inference plugin that knows about goog.asserts
  • Data-flow based variable inlining
  • Better function inlining
  • Warnings for unknown @suppress parameters
  • Fixes for issue 141, issue 139, issue 58, issue 112, and many others

Mar 30, 2010

  • Renamed to
  • More user-friendly messaging for trailing commas
  • Improvements to inlining and property ambiguation optimizations
  • Run-time type-checking (not available from the command-line)
  • Better type checking in inner functions
  • Fixes for issue 33, issue 103, issue 116, issue 124, issue 127, and issue 130 (among others)

Feb 1, 2010

  • Support for Ant (BuildingWithAnt)
  • The ability to turn type warnings on/off independent of other flags (--jscomp_warning=checkTypes)
  • With --warning_level=QUIET, all warnings will be silenced.
  • Fix for Issue 86 ("@inheritDoc doesn't play well with interfaces")
  • Fix for Issue 81 ("eval function replaced with eval operator")
  • Fix for Issue 80 ("Inappropriate side-effect warning")
  • A few improvements to variable inlining.

Dec 17, 2009:

  • Fix for issue 75 ("indexing into an array with a string shouldn't be an error")
  • Fix for issue 63 ("create source map in whitespace-only mode.")
  • Fix for issue 24 ("Add --charset option to command line compiler that changes the input and output chararacter set.")
  • Don't generate warnings for ES5 directives
  • Generate a warning for unsafe uses of "with". Suppress warning with /** @suppress {with} */
  • Various bugs fixed.

Dec 3, 2009:

  • Several bug fixes.
  • Make --define part of the open source API.
  • Allow RemoveUnusedVars to strip unused anonymous function names.
  • Add a warning for function declarations that may behave differently in different browsers.
  • Enable local variable inlining for simple mode.
  • Digits aren't allowed as the first character of a key, so add a prefix.

November 19, 2009:

  • Better dead assignment elimination
  • Support for goog.base
  • Allow $ in method names.
  • Inline local functions and anonymous functions
  • Fix some compiler crashes when folding ifs and handling local vars
  • Better type inference in externs
  • Don't emit warnings for JSDoc annotations we don't support.
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.