Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Releases: google/closure-library

Closure Library v20170409

12 Apr 17:07
Compare
Choose a tag to compare

New Additions

  • Add goog.json.TRY_NATIVE_JSON.
  • goog.net.MockIFrameIo is deprecated in favor of goog.testing.net.MockIFrameIo
  • Add goog.soy.Renderer#renderStrictOfKind and renderStrictUri.
  • Add goog.async.AnimationDelay#startIfNotActive

Backwards Incompatible Changes

  • goog.db.ObjectStore.remove now accepts either an IDBKeyType or a
  • Fixed Deferred.addFinally to pass correct 'this'.
  • Remove the deprecated goog.debug.exposeException/goog.debug.exposeExceptionAsHtml functions.
  • Fixed the bug: Using goog.html.sanitizer.HtmlSanitizer constructor instead of HtmlSanitizer.Builder prevented the sanitizer from applying some attribute whitelists, allowing for XSS.
  • goog.html.sanitizer.HtmlSanitizer.Builder build() may only be called once. Calling it multiple times left the Builder in an inconsistent state.
  • Require SanitizedHtml templates in renderStrict.
  • Allow specifying error logger for goog.json.TRY_NATIVE_JSON.
  • Refactor goog.dom.AbstractRange (adding an abstract method) to break a circular reference.

Other Changes

  • Optimized goog.i18n.MessageFormat to defer work until first use and to share NumberFormat instances.
  • goog.events.EventType is updated with Media Source Extensions events.
  • In goog.db.ObjectStore.add/put, pass the key to the resolved Deferred on success.
  • Move goog.debug.exposeException/exposeExceptionHtml to goog.debug.HtmlFormatter
  • Fix goog.style types to prepare for adding correct type for Element.prototype.currentStyle in externs
  • Add ArrayBufferView as a permitted type for xhr.PostData.
  • Fix a rare debug loader bug in IE<=9.
  • improve error reporting of uncaught exceptions for unit tests.
  • Deprecated goog.string.isEmpty/goog.string.isEmptySafe
  • Document that goog.net.XhrIo.getResponseJson throws Error if response is not JSON.
  • new API ("backgroundChannelTest" option in WebChannel)
  • Fix goog.array.concat to work in a certain version of Rhino with Array.prototype polyfills.
  • The removeformatting plugin no longer captures a keyboard shortcut when the shift key is pressed.
  • new API spec, WebChannel client-side flow-control via notifyNonAckedMessageCount().
  • Fix types related to Document.defaultView for upcoming change in externs.
  • Adds iOS Chrome to goog.userAgent.
  • split goog.testing.JsUnitException into its own file.
  • Remove under utilized goog.ui.ColorButton, goog.ui.ColorButtonRenderer, goog.ui.ColorSplitBehavior, and goog.ui.SplitBehavior
  • Fix parsing empty cookies in IE/Edge
  • goog.events.EventType is updated with beforeinput event.
  • goog.i18n.currency.isAvailable(currencyCode) has been added to test if a currency is available.
  • Stop deleting "this.logger" during dispose in AbstractChannel
  • Add anyNumber(), anyString(), and anyObject() matchers to goog.labs.testing.
  • Deprecates goog.math.IsFiniteNumber in favor of isFinite
  • TestCase report can now say "[NO TESTS RUN]" in addition to pass and fail.
  • Only set aria-expanded on BaseNodes with children. The aria-expanded state will be added on addition of the first child (and removed on removal of the last child).
  • Stop using obsolete IDBDatabaseException type annotation.
  • Stack traces in test output changed slightly.
  • corrected the return type of goog.a11y.aria.Role
  • Replace deprecated references to goog.math.isFiniteNumber() in the library with isFinite().
  • Fixes the XhrIo testing library to more closely emulate the actual behavior of Xhrio.

Closure Library v20170218

24 Feb 00:12
Compare
Choose a tag to compare

New Additions

  • SanitizedContent.prototype.toSafeUrl().
  • Add SafeUrl.fromTrustedResourceUrl, take 2.
  • Add goog.editor.Field#setSafeHtml and deprecate setHtml, take 2.
  • Enhance MockIframeIo to simulate response text, and make active state bit and last URI actually work.
  • New API documentation (goog.net.WebChannel.ErrorStatus)

Backwards Incompatible Changes

  • Ignore prototype members in goog.exportPath_.
  • Where findDifferences did not detect differences between two un-equal Maps or Sets, it will now find them, meaning that assertObjectEquals will fail on un-equal Maps and Sets where it used to pass.

Other Changes

  • Extended comments on AbstractDialogPlugin.
  • Workaround Safari 10 ES6 scoping bugs when loading goog.modules.
  • goog.i18n.DateIntervalFormat API has been added to format date intervals in a locale-sensitive manner.
  • goog.events.EventType is updated with devicemotion event.
  • Prefer script['nonce'] over script.getAttribute('nonce') because of a change in Chrome.
  • new API (webchannel option: httpHeadersOverwriteParam)
  • keyboardshortcuthandler now uses KeyboardEvent.key if available
  • Added support for returning promises from setUpPage in test. Added support for returning promises from the test environment's setUp and setUpPage methods.
  • closurebuilder.py now handles non-ASCII goog.module identifiers.
  • Set the aria label attribute for each date cell in the Closure date picker so that screen readers vocalize the current date when changing the selected date via the keyboard ("1/2", "1/3", etc). Aria hide and disable tabbing to the previous and next month (<< and >>) buttons in simple navigation mode, because pressing enter while they are focused closes the picker instead of switching months (also changing months doesn't announce the new month).
  • Update the TEXTINPUT event name to be 'textinput' instead of 'textInput' for IE, as IE does not fire event listeners for the camel-cased version.
  • stop sealing functions directly assigned to goog.module exports values.
  • new API added (goog.net.rpc.httpcors)
  • Fixed documentation for matchUserAgent and matchUserAgentIgnoreCase.
  • new API ("initMessageHeaders" option in WebChannel)

Closure Library v20170124

30 Jan 17:53
Compare
Choose a tag to compare

New Additions

  • Added goog.function.rateLimit(), to complement debounce() and throttle().
  • Added optional BrowseEvent parameter to constructor of DragDropEvent. This parameter is set within AbstractDragDrop#endDrag.
  • Enhance MockIframeIo to simulate response text, and make active state bit and last URI actually work.
  • TrustedResourceUrl.format() no longer required a first fixed path component.

Other Changes

  • The removeformatting plugin no longer captures a keyboard shortcut when both ctrl and cmd are pressed.
  • Keep goog.testing.TestCase.currentTestName updated to ease migration to goog.testing.TestCase.
  • CLDR 30 locale data update.
  • Fix IE11 bugs in goog.dom.selection.
  • Stop using HTMLElement.dataset in Safari, because sometimes accessing a value incorrectly returns "undefined".
  • Set browserEvent parameter within AbstractDragDrop#endDrag.
  • The constructor of goog.net.streams.JsonStreamParser now takes an optional configuration argument.
  • Resolve unknown type for property ipStr_
  • Updating documentation for clarity.
  • goog.module.get tuning

Closure Library v20161201

05 Dec 22:16
Compare
Choose a tag to compare

New Additions

  • Add goog.dom.safe.setIframeSrcdoc() to set srcdoc from a SafeHtml
  • Added getRotation() and setRotation() to goog.style.transform.
  • Added clearCache method on goog.ui.ac.CachingMatcher.
  • goog.html.SafeHtml.createScript()\ to create script tags.
  • Add goog.testing.MethodMock.fromObjectPropertyString.
  • Added goog.Math.Long.isStringInRange that returns boolean value for if string is within bounds of a Long.
  • Add site-local and link-local IP checks.

Backwards Incompatible Changes

  • goog.messaging.PortChannel now rejects wildcard domains as the peer origin.
  • Moved getAllProperties from MockUtil to the Object utility.

Other Changes

  • Fix goog.Uri.resolve so that it doesn't unescape the query parameters.
  • Properly pass the supportsCrossDomainXhrs option into WebChannelBase, fixing a bug where withCredentials wasn't being set.
  • Support ES6 methods when creating a testSuite.
  • labs.testing.Environment: Fixed a bug where an exception thrown in a tearDown method would not cause the test to fail if the exception evaluates to false.
  • disabled test that triggers a regression in Chrome.
  • Send ANIMATION_END event when click animation ends, no user visible change for sliderbase.
  • Minor documentation fix.
  • Fix JS errors when a module contains closing script tags with attributes.
  • Fixed ErrorHandler in strict mode
  • Fix JS errors when a module contains closing script tags.

Closure Library v20161024

27 Oct 21:43
Compare
Choose a tag to compare

New Additions

  • Adding MockClock.getCallbacksTriggered
  • Added goog.html.TrustedResourceUrl.format(). Added goog.string.Const.EMPTY.
  • Creates a new method, goog.locale.getLocalizedRegionNameFromRegionCode, that accepts a region code and returns a localized region name.
  • Added goog.userAgent.IOS constant.
  • add a configuration option for the HTML sanitizer to restrict the set of allowed attributes. Also allow the policy to be relaxed using alsoAllowAttributes.
  • Introduced a new webchannel option httpSessionIdParam.
  • Add goog.string.replaceAll

Backwards Incompatible Changes

  • goog.net.Xhrio.getResponseHeader now returns undefined in all situations when a particular header does not exist in the response. Previously it would, incorrectly, return null in some situations.
  • let the autocomplete renderer now can set a border width to set the width of autocomplete dropdown width more flexible.

Other Changes

  • No longer call deprecated elem.getAttributeNode().
  • Fix bug where transpile.js was polluting global namespace with GWT exports
  • goog.dom.hasSpecifiedTabIndex_: fix for ancient IE
  • goog.async.run should only use truly native Promise.
  • Add checks for 'es7' and 'es8' support.
  • goog.events.EventType is updated with deviceorientation events.
  • Added an option to goog.net.BrowserChannel to perform test requests asynchronously.
  • Store Disposable objects passed to registerDisposable directly instead of storing closure'd dispose functions.
  • Make InputHandler compatible with goog.defineClass
  • Add comment to clear function in IterableMechanism
  • Fixed a bug where multikey shortcuts were ignored on Windows
  • Widen the goog.debug.enhanceError interface to accept any type of value. If the value is not an Error, it will be converted into an Error with the value's toString as the error message.
  • Fixing interpolation for animation in rare system clock updates.
  • Only use setCapture in goog.fx.Dragger if releaseCapture is also available.
  • Correct goog.needsTranspile_() to throw for unknown language mode.
  • Fix an assertion failure message for unrecognized fields

Closure Library v20160911

06 Oct 18:38
Compare
Choose a tag to compare

New Additions

  • New selection change event type enum entry.
  • Support for TEMPLATE tags. Added a method to turn off TEMPLATE tag content sanitization on browsers that support the TEMPLATE tag.

Backwards Incompatible Changes

  • This changes the type of goog.dom.TagName members from string to object instances used to infer the type of created or got elements. This breaks string-only uses of goog.dom.TagName members such as in "case el.tagName" statement or with strict comparison ===. Most uses (passing goog.dom.TagName members to functions such as goog.dom.createDom or non-strict comparison ==) are unaffected. Closure Compiler unconditionally converts goog.dom.TagName members to strings which means that compiled code will still work even with string-only uses. Uncompiled code needs wrapping goog.dom.TagName members to String() in string-only context.
  • goog.dom.forms.submitFormDataInNewWindow and goog.dom.forms.submitFormInNewWindow now works with form fields whose name shadow existing dom methods.

Other Changes

  • Fix Chrome console warning when using goog.events.KeyHandler due to accessing deprecated KeyboardEvent.keyIdentifier.
  • Update transpile.js, fixes bug in transpiling "for" loops using "let" or "const" declarations.
  • Do not validate strict goog.require while goog.ENABLE_DEBUG_LOADER is false.
  • Fixed numberformat (scientific) so it doesn't hang on specific very small numbers (say 5E-324) that are representable but for their exponent Math.pow(10, exponent) would return 0.

Closure Library v20160822

24 Aug 18:40
Compare
Choose a tag to compare

New Additions

  • Add new API goog.html.sanitizer.CssSanitizer.sanitizeInlineStyleString() for CSS sanitization.
  • Add goog.dom.getElementsByTagName.
  • Add a separate package to relax the HTML sanitizer's policy in a potentially unsafe way.
  • Add enum for HTML attributes. goog.dom.Attr.
  • Make goog.html.sanitizer.CssSanitizer.sanitizeInlineStyle public.
  • Added optional boolean to 0/1 serialization approach to goog.proto2.ObjectSerializer.
  • Add convenience API goog.dom.safe.setStyle() to allow setting style attributes on HTML elements safely.
  • Add goog.dom.getCanvasContext2D.
  • Added intl.collator options support.
  • Add http status code to status name mapping,
  • Added a configuration option to the HTML sanitizer to save the original tag name of sanitized tags in a data attribute.
  • Add two methods: XhrIo.getStreamingResponseHeader() and XhrIo.getAllStreamingResponseHeaders(), which allow getting response headers before the XMLHttpRequest object has reached the COMPLETE(value 4) state.
  • goog.getCssName can now optionally delegate to a global map function
  • A PropertyReplacer is now available on goog.labs.testing.Environment.

Backwards Incompatible Changes

  • goog.html.sanitizer.HtmlSanitizer.Builder is now marked as @final, in order to prevent developers from circumventing its safe interface.
  • Mocks now stub non-enumerable properties (like ES6 class methods).
  • sanitize unknown tags as span instead of
    . For consistency, sanitizeToDomNode now wraps the output in a span tag instead of a div.
  • goog.labs.mock now stubs non-enumerable properties
  • goog.disposable.IDisposable is now @record
  • Disallow non-HTML tags in goog.dom.safe.setInnerHtml.
  • Assert that goog.dom.safe.setImageSrc is correctly invoked on an object of type HTMLImageElement.
  • goog.object.unsafeClone has a T->T signature instead of ->
  • Delete goog.dom.createUntypedDom.
  • Assert that goog.dom.safe.setAnchorHref is correctly invoked on
  • Assert that goog.dom.safe wrappers for setting href and src
  • The function returned by goog.dom.animationFrame.createTask now uses the global object as context when opt_context is not provided.
  • goog.net.BrowserChannel.MAGIC_RESPONSE_COOKIE has been
  • goog.labs.mock is now enforced as test only.
  • Delete goog.dom.TypedTagName.
  • Assert that goog.dom.safe.setLocationHref is correctly invoked
  • closure.labs.html.Sanitizer has been deleted. Please use closure.html.sanitizer.HtmlSanitizer instead.

Other Changes

  • goog.Uri no longer fails when there's a newline in the fragment part of the uri.
  • Fix error when css rule does not contain a selector.
  • Update transpile.js to stop monkey-patching property accessors.
  • Replacing Function type with tighter function(?):? type in
  • Improve reported stack traces reported by the test runner for IE
  • Update transpile.js to include Reflect polyfills.
  • Fix goog.requires in demos.
  • Failing on goog.getCssName if a dot is passed as className.
  • Cleanup of deferred queue's pool.add()
  • Fix bug to handle AltGr characters in Firefox.
  • AnimatedZippy now fires TOGGLE_BEGIN event at the beginning of animation and fires TOGGLE_END event at the end of animation.
  • Make headers in testing.net.XhrIo non-nullable to match the ones in goog.net.XhrIo.
  • Only seal objects during module loading.
  • Add safe versions of goog.net.jsloader.load and variants, that require goog.html.TrustedResourceUrls. The old ones are still working, but they are deprecated.
  • Added the missing implementation of withCredentials in XhrManager
  • goog.i18n.currency.getCurrencyPattern methods have been deprecated in favor of formatting numbers using goog.i18n.NumberFormat.
  • Fix for test adapter for async tests that use MockClock.
  • Prevent mutation of input options object in goog.labs.net.xhr.getBlob() or getBytes().
  • Bug fix. Fixing the return type annotation of goog.color.hexToHsl to goog.color.Hsl.
  • Use goog.events.KeyHandler in goog.ui.Zippy to correctly handle the keyboard events.
  • Fixing issue with test util to respect caching behavior.
  • Fix type declaration in JsonPrettyPrinter constructor.
  • Improve goog.userAgent dead-code removal.
  • Replace explicit type of implemented field in Listener with @override.
  • Fixed bug in goog.labs.mock when verifying a mock function with nullable parameters.

Closure Library v20160713

19 Jul 20:55
Compare
Choose a tag to compare

New Additions

  • Debug loader transpiler now provides WeakMap and WeakSet.
  • Make goog.html.sanitizer.CssSanitizer.sanitizeInlineStyle public.
  • Targets can now be removed from AbstractDragDrop.
  • Add goog.dom.createUntypedDom.
  • Add goog.html.sanitizer.HtmlSanitizer.Builder.onlyAllowTags which allows only whitelisting the provided tags.
  • Support goog.dom.TypedTagName in getElementsByTagNameAndClass.
  • Add some accessibility attributes (aria-*) to allowed html sanitizer whitelist.

Backwards Incompatible Changes

  • IeCorsXhrAdapter.responseText is now non-nullable.

Other Changes

  • Updated getContainerOffsetToScrollInto to support elements without offsetWidth or offsetHeight property (such as SVG elements).
  • Update JsTdTestCaseAdapter such that @Suppress {duplicate} annotations are actually considered by the compiler.
  • Remove deprecated goog.vec.Matrix3/Matrix4 classes in favor of goog.vec.Mat3/Mat4
  • Fix for JSTD adapter for browsers without native Promise.
  • Fix initializing of date with year < 100 in datepicker.
  • closure/i18n/compactnumberformatsymbols_ext.js has been renamed to closure/i18n/compactnumberformatsymbolsext.js
  • For slider and two thumbs slider: 1. For slider and two thumbs slider:
    TAB focus is set on the thumbs instead of the highlighted slider handle. 2. For two thumbs slider: Key events (HOME, END, LEFT arrow, RIGHT arrow...) interacts on the focused thumb (the start thumb or the end thumb) other than the highlighted slider handle.
  • Fix goog.testing.JsTdTestCaseAdapter support for conditional test cases.

Closure Library v20160619

21 Jun 22:37
Compare
Choose a tag to compare

New Additions

  • Add a new JSTD Async wrapper to Closure.
  • Add ability to submit untrusted forms in new windows without leaking opener reference.
  • goog.math.IRect record type added for rect like objects.
  • Add a goog.dom.constHtmlToNode function.
  • added commit/onCommit/ackCommit to goog.net.WebChannel.RuntimeProperties. No implementation and the spec for the commit algorithm can be found at https://github.com/bidiweb/webchannel/blob/master/commit.md Removed setServerFlowControl (no implementation) and updated the semantics of the existing getNonAckedMessageCount.
  • Add goog.dom.TypedTagName and allow using it in goog.dom.createDom and similar.

Backwards Incompatible Changes

  • "this" in the scope of a goog.module is no longer the global "this". use goog.global instead.
  • The @define for disabling debug-loader transpilation has changed from goog.NEVER_TRANSPILE=true to goog.TRANSPILER="".
  • goog.math.Rect now implements goog.math.IRect. Additionally, most methods now accept IRect rather than just goog.math.Rect. This allows operations between things like ClientRect and goog.math.Rect.

Other Changes

  • Fix the .replace metacharacters handling in editor/plugins/removeformatting.js
  • Update the debug loader transpiler.
  • Few performance fixes to goog.html.sanitizer.sanitize.
  • goog.Math.Long.fromNumber returns max/min value for Infinity/-Infinity
  • goog.i18n.currencyCodeMap has been deprecated in favor of goog.i18n.currency.getLocalCurrencyPattern
  • Allow Promises to be resolved with the string '[object Object]'.
  • goog.dom.ConstHtmlToNode now takes varargs constants that will be concatenated.
  • Fix goog.dom.dataset.remove for Safari in strict mode. Different version not using hasOwnProperty.
  • fixes synchronous XHR in FF11
  • Allow target attributes in tags in goog.html.sanitizer.HtmlSanitizer.
  • goog.loadModule is no longer disabled if goog.DEPENDENCIES_ENABLED or goog.ENABLE_DEBUG_LOADER are false.
  • goog.events.EventType is updated with media events.
  • Update closure transpiler with support for destructuring the ...rest parameter.
  • Fix a bug in inOrderTraverse/reverseOrderTraverse when startValue is 0.
  • Fix debug loading regression for local files.

Closure Library v20160517

19 May 22:25
Compare
Choose a tag to compare

New Additions

  • goog.labs.mock.verify now supports a Mockito like VerificationMode. Factories for the common modes, times, atLeast, most, and never have been added. The default mode is atLeast(1) which was the default behavior of verify without VerificationMode. VerificationError messages have been updated to include a description from the VerificationMode about what was expected.
  • Add goog.soy.Renderer.renderSafeStyleSheet()
  • Added goog.array.concatMap method.
  • Add goog.html.sanitizer.sanitize (returns a SafeHtml from an untrusted String)
  • Debug loader will now optionally transpile if {'lang': 'es6'} is passed to goog.addDependency and "transpile.js" is available in the same directory as "base.js".
  • Added iPod detection in useragent.js and iPod OS version detection in platform.js.
  • Add new public method getUserSelectableDateRange to goog.ui.DatePicker.
  • Added fireFocusInEvent to goog.testing.events.
  • Allow testSuites to have a name via the getTestName() method on the test object.
  • goog.labs.mock.mockConstructor function to mock constructors. Static members are copied from the original constructor.

Backwards Incompatible Changes

  • goog.i18n.DateTimeSymbols and friends are now typed.
  • Make sure that you pass valid JSON to JsXmlHttpDataSource as it is now verified.
  • goog.ui.DatePicker.prototype.setUserSelectableDateRange now only accepts non-nullable goog.date.DateRange objects.
  • Opera 15 and above is now detected as Chrome to be consistent with other Chromium variants.
  • goog.ui.DatePicker.prototype.isUserSelectableDate_ now only accepts non-nullable goog.date.Date objects.
  • Delete deprecated goog.string.linkify.linkifyPlainText.
  • Breaking change for third parties: This will break your build if your code uses goog.ui.Dialog#setContent. Use setSafeHtmlContent or setTextContent instead. The method is removed because its usage can cause XSS. goog.ui.Dialog#setSafeHtmlContent or goog.ui.Dialog#setTextContent provide a safe alternative (unless the SafeHtml is constructed using legacyconversions).
  • MockControl's createFunctionMock now has non-nullable @return to match goog.testing.createFunctionMock
  • Breaking change for third parties: This will break your build if your code uses goog.dom.htmlToDocumentFragment or goog.dom.DomHelper#htmlToDocumentFragment. Use goog.dom.safeHtmlToNode or goog.dom.DomHelper#safeHtmlToNode instead.
  • goog.labs.object.is is now goog.object.is
  • Change goog.labs.mock such that later calls to #when create stubs which take precedence over previously created stubs. The previous behavior of later calls creating sequential stubs is exposed via chaining #then or #thenReturn calls to the same invocation of #when. With these changes the API now more closely matches the Java Mockito library as originally intended.

Other Changes

  • labs.testing.Environment: Enable returning a promise from user defined setUp method.
  • Update the syntax for sourceUrl in moduleloader per updated spec. See https://developers.google.com/web/updates/2013/06/sourceMappingURL-and-sourceURL-syntax-changed?hl=en.
  • Fixed UI tree typeahead handling of child node removals.
  • goog.ui.editor.ToolbarController now checks for selection to still be in the field before querying for values when updating.
  • Create a StubBinder interface to return from the public goog.labs.mock methods.
  • Added a provide for goog.i18n.DateTimeSymbolsType
  • goog.net.Cookies can now be safely included in a worker environment.
  • Have goog.math.Long use goog.reflect.cache
  • Add @typedef for strict Soy templates.
  • Fix goog.userAgentTestUtil.reinitializeUserAgent() not reinitializing goog.userAgent.EDGE_OR_IE.
  • Fix goog.dom.dataset.remove for Safari in strict mode.
  • DeferredTestCase is deprecated
  • Refactor ObjectEquals matcher to not use an assert.
  • Add forward declaration of goog.events.EventHandler.
  • Update locale data to CLDR v29.
  • Added more context to the error message when an assertion fails for setUnknown() (when tag=0). Similar explanations added to objectserializer assertion error messages. These additions should aid in finding the root cause when this assertion fails.
  • goog.events.EventType is updated with the 'timeupdate' event.
  • Support drag and drop for Opera 15 and above