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 v20190618

22 Jun 00:24
Compare
Choose a tag to compare

New Additions

  • adds goog.labs.useragent.browser.isOperaChromium() to detect Chromium based Opera browser for client-server compatibility.
  • assertObjectEquals now checks typed arrays deeply
  • Added new SafeUrl creator for WhatsApp URLs, goog.html.SafeUrl.fromWhatsAppUrl.
  • Added goog.labs.useragent.browser.isEdgeChromium() to detect the new Chromium based Edge browser.
  • Fixed a bug in goog.module.ModuleLoader's request error handling, and added the response status to the goog.module.ModuleLoader.RequestErrorEvent.
  • goog.labs.mock now has a top level wait function. This function returns a promise that resolves when a provided function is called.

Backwards Incompatible Changes

  • Change goog.soy.TextTemplate to return string.
  • Delete goog.soy.data.UnsanitizedText.
  • Stop handling IE 5 emulation quirks.
  • assertNaN is now stricter by requiring actual NaN.

Other Changes

  • Migrate many unit tests to ES6, goog.module, and goog.testing.testSuite
  • Add LiteReadableStream interfaces.
  • Migrate goog.userAgent.adobeReader to goog.module
  • Migrate more unit tests to ES6, goog.module, and goog.testing.testSuite
  • Disallow SanitizedContent in goog.soy.Renderer#renderText.
  • Add a getter method for the dialog close message.
  • Clarifies the error message when conflicting test objects are found.

Closure Library v20190528

31 May 15:27
Compare
Choose a tag to compare

New Additions

  • Added goog.asserts.assertExists, which asserts that a value is not null or undefined.
  • Added a mode to goog.module.ModuleLoader to use <script> tags (with async=false) to download submodule code instead of xhr requests.

Backwards Incompatible Changes

  • goog.define no longer exports global symbols. Instead it returns the value. This is the final step in making goog.define work in modules (cleanup).

Other Changes

  • Fix an IE11 failure in Closure's sanitizer when templates are polyfilled
  • Remove un-used LogSaver & Ensure closure compiler views require('goog.labs.net.webChannel.WebChannelBase') as side-effect free
  • Add basic MIME parameter support in SafeUrl's sanitizers.
  • Updates out-of-date docstring for cookies.remove().
  • Preserved newlines in testrunner log output
  • Fixed goog.testing.style.isVisible for detached elements.
  • Improve the performance of the Closure Compiler transpiler when loaded with the debug loader.
  • Ensure that the closure compiler views calls to goog.require('goog.math.Integer') as side-effect free.

Closure Library v20190513

17 May 23:11
Compare
Choose a tag to compare

New Additions

  • goog.ui.PopupMenu now can be overridden with the browser context menu via setShiftOverride

Backwards Incompatible Changes

  • Fix goog.base not working in ES5 classes that have ES6 subclasses. This is not IE8 compatible and other pre-ES5 javascript environments.
  • Add divideAndRemainder and abs to goog.math.Integer.

Other Changes

  • Initialize goog.global correctly when running as an ES module
  • Bugfix that allows compiler to optimize out closure deps
  • Add an additional clarifying comment to goog.global in ES modules
  • Print message error in addition to stacktrace in globalError handler in jsunit tests.
  • Add the ability to enable js error reporting for uncaught errors in native promise and async/await functions. For native promises, install a protected entrypoint function around Promise.prototype.then. For async/await, listen to unhandledrejection events on browsers that support it.
  • In the unhandledrejection event handler, avoid dereferencing the window object since it's unneeded and protect against the case where the unhandledrejection event/event.reason is undefined.
  • Ensure that the closure compiler views calls to goog.require('goog.math.Integer') as side-effect free.

Closure Library v20190415

18 Apr 19:48
Compare
Choose a tag to compare

New Additions

  • Adding SafeUrl.isSafeMimeType() to determine whether or not a MIME type is considered safe before attempting to construct a SafeUrl. This is helpful for users who want to gracefully filter out bad MIME types before committing to creating a SafeUrl.
  • Add goog.FEATURESET_YEAR define.
  • New addition to data to provide options for date time formatted output.
  • Add type for text template.

Backwards Incompatible Changes

  • goog.soy.data.UnsanitizedText no longer respects the contentDir parameter
  • Delete goog.soy.REQUIRE_STRICT_AUTOESCAPE.
  • Delete goog.module.declareNamespace

Other Changes

  • goog.editor.Link.getCurrentText now returns an empty string instead of null for images without alt text.
  • Allow two parameters signature in Soy template types.
  • Handle KaiOS user agents better
  • Fix up type annotations for env.mock.
  • Fixes bug that caused KeyHandler to fire incorrect events for the dash key on FF.

Closure Library v20190325

27 Mar 22:17
Compare
Choose a tag to compare

New Additions

  • goog.db.Index.getAll now can take goog.db.KeyRange as the param.
  • Add SafeHtml.join.
  • Add goog.dom.isInDocument(node).
  • Add support to KeyboardShortcutHandler for handling SyntheticKeyboardEvents. This allows KeyboardShortcutHandler to process events not originating from the browser.
  • goog.dom.findElement, goog.dom.findElements
  • Whitelist additional ARIA attributes in the HtmlSanitizer.

Backwards Incompatible Changes

  • goog.db.ObjectStore::getAll and goog.db.ObjectStore::getAllKeys no longer have Cursor based fallback implementations.

Other Changes

  • Make mousewheel events non-passive when calling preventDefault.
  • goog.dom.safe.openInWindow opens the url in a new tab rather than a new window in IE11 if less than 3 arguments are provided.
  • Fixed a bug where parsing UTC ISO 8601 date times with DateTime.fromIsoString on dates containing a timezone boundary in the local timezone would sometimes be off by an hour.
  • Allow SafeUrl in goog.labs.net.image.load.
  • Pass ijData as second parameter in goog.soy.Renderer.
  • Support trusted types in goog.dom.safe.
  • Fixes parsing ISO time strings when system clock is in positive GMT time zones.
  • EventObserver.getEvents now accepts EventId.
  • Fix return type annotation for assertThrows.
  • Make goog.define return type more specific but slightly less safe.
  • Allow using Trusted Types in base.js.
  • enforce a default size limit (4KB) for WebChannel messages sent as part of the fast handshake, which uses GET to enable QUIC 0-RTT.
  • Assign value returned from goog.define in preparation of removing the global export.
  • In RelativeDateTimeFormat, "this minute" changes to "in 1 minute" and "this hour" changes to "in 1 hour".
  • Remove dependency on goog.html.SafeHtml.create from goog.dom.safe.setInnerHtml.

Closure Library v20190301

06 Mar 00:46
Compare
Choose a tag to compare

New Additions

  • Support for more currency formats.
  • Add an API to record an exception that fails a test, but not throw it.
  • Add record() for type-safe mocks.

Backwards Incompatible Changes

  • Modifies signature of goog.labs.collections.iterables.map
  • Modifies signature of goog.labs.collections.iterables.filter
  • Modifies signature of goog.labs.collections.iterables.forEach
  • Removes goog.labs.iterable alias for goog.labs.collections.iterables.

Other Changes

  • Escape < in SafeStyleSheet.createRule and allow it in SafeStyle.
  • goog.testing.style.isVisible no longer supports IE8
  • No user visible changes.
  • Some user-visible change.
  • Add 308 (permanent redirect) to HttpStatus.
  • Don't use goog.asserts.assert in security sensitive code.
  • "Home" key selects current date in goog\.ui\.DatePicker.
  • improved webchannel responsiveness in background tabs.
  • Adds support for ArrayBuffer responses to FetchXmlHttp requests.
  • Added 'response' and 'responseType' fields to the goog.net.XhrLike interface.
  • Added symmetricDifference() to goog.collections.set
  • Fix safedomtreeprocessor.processToString closing empty element using /> on IE.

Closure Library v20190215

21 Feb 19:28
Compare
Choose a tag to compare

New Additions

  • Add goog.dom.safe.parseFromString.
  • Add "auxclick" string constant to EventType
  • image/x-icon is accepted as a safe mime type for object URLs.
  • Added Go2Phone type to goog.labs.userAgent.platform. Added goog.userAgent.GO2PHONE constant.
  • goog.define now return its value and will eventually stop exporting it globally. Callers should update to assign the value.

Other Changes

  • Removes the aria label of palette cell when removing child. The aria label is added back when the child is added to the cell.
  • Fixed WebChannel network stats logging on Reactive-Native.
  • No user-visible change.
  • goog.dom.isFocusable bugfix
  • Allows setting PopupDatePicker to reposition when DatePicker's size changes so that extra rows that might appear in a different month are rendered on-screen.
  • Moving goog.labs.iterable to goog.labs.collections.iterables (with legacy alias)
  • Added difference() to goog.collections.set
  • Added union() to goog.collections.set
  • Updates aria label for cells upon content addition after creation.
  • Add support for streaming responses to requests made with goog.net.FetchXmlHttp.
  • New API addition.
  • Now the logger won't swallow exceptions that are passed to goog.log calls. Example: goog.log.error(logger_, 'foo', new Error()) currently just logs the string. With this change, we now log the passed Error to the console as well.
  • Some user-visible change if using non-ASCII digits.
  • Allow data: URLs in goog.dom.safe.set(Image|Audio|Video)Src.
  • Update return type on goog.labs.collections.iterables.forEach

Closure Library v20190121

25 Jan 01:34
Compare
Choose a tag to compare

New Additions

  • Allow getting script nonce from other windows.
  • Added support for setting hash parameters in goog.html.TrustedResourceUrl#cloneWithParams.
  • Allow shouldRunTests to be respected in nested tests.
  • New API for Closure/I18N, similar to ICU4J RelativeDateTimeFormatter.
  • Rename goog.module.declareNamespace to goog.declareModuleId. For now both functions are supported until goog.module.declareNamespace is no longer used, at which point it will be deleted.
  • Make labs mock compatible with an ES6 subclass when given the constructor/class itself.
  • Added function goog.html.SafeUrl.fromFacebookMessengerUrl to generate 'fb-messenger://share' urls in a fashion similar to 'tel:' and 'sms:' urls.
  • Added a helper function that guarantees revoking the object url created from createObjectUrl when creating an Image element from a blob with MIME type image/.*.
  • new goog.labs.net.xhr.parseJson to parse JSON txt without an HTTP request
  • Add goog.dom.safe.parseFromStringHtml.
  • New API addition.
  • Add goog.requireType, which informs the compiler that a symbol may appear in type annotations but isn't referenced at runtime.
  • Allow TrustedResourceUri in JsonDataSource.
  • Adds goog.labs.iterable.filter
  • Add support for FullscreenOptions in requestFullscreen utility
  • Add an ES6 module, goog.js, to Closure Library. This module forwards select properties of goog from base.js.
  • [goog.dom.asserts] Added missing assertIsHTMLTextAreaElement() and assertIsHTMLCanvasElement().
  • Add goog.html.SafeScript.fromJson.
  • Add a sanitizer for extension URL schemes to SafeUrl.
  • Add an option to skip validation of the dep graph when creating a deps.js file.
  • Added goog.collections.set and intersection operation.
  • Add isCompatibleWith() for goog.soy.data.Sanitized* types.
  • Added support for setting hash parameters in goog.html.TrustedResourceUrl#formatWithParams.
  • Added the ability to specify a permission per list to DragListGroup. This permission gives lists the power to prevent items within them from being dragged out, or prevents items from being dropped in. The default behavior stays the same which allows items to be dragged out of or into a list.
  • Always treat Edge as an ES5 browser.

Backwards Incompatible Changes

  • Remove the "id" param from the AbstractModuleManager interface.
  • Disallow '%{path}/' in TrustedResourceUrl.format, take 2.
  • goog.ui.dialog - spacebar on close button fixed in Firefox
  • assertSameElements no longer accepts nulls
  • Delete goog.soy.data.SanitizedStyle.
  • Tightens parameter types on goog.collections.sets.intersection.
  • Disallow non-strict templates in goog.soy.renderAsFragment.
  • Removed goog.debug.setFunctionResolver
  • Assume that "remove unused prototype properties in externs" is off.
  • Identify iOS Firefox browser (FxiOS useragent) as firefox in goog.labs.userAgent.browser.isFirefox instead of Safari.
  • Moves goog.collections.set to goog.collections.sets
  • Disallow using string or Uri in JsonDataSource.
  • assertSameElements in goog.testing.asserts now additionally acceptes iterables

Other Changes

  • Produce ?a= instead of ?&a=1 in TrustedResourceUrl#cloneWithParams.
  • goog.testing.ObjectPropertyString is now deprecated.
  • Do not log test progress if global skipClosureTestProgress is truthy.
  • Fully populate rows in goog.ui.PaletteRenderer#setContent when previous item count is less than palette grid width.
  • Headers containing only whitespace, or multiple colons are handled better.
  • Added @define goo.ASSUME_PROMISE to allow goog.async.run to use global Promise, possibly its polyfill, default preserves prior behavior with fallback to goog.async.nexTick if native Promise is unavailable.
  • Added getUndoContent function to UndoState_.
  • expose a new webchannel option to force long-pooling to work with buffering (MITM) proxies.
  • Allow relative URLs in TrustedResourceUrl.format.
  • Add missing type annotation within goog.string.unescapeEntitiesUsingDom_
  • Add the new Bolívar soberano (VES) to the tier 2 Closure currencies.
  • Remove underused goog.testing.MethodMock.fromObjectPropertyString
  • KeyboardEvent.key now includes tab, space, page down, and page up keys.
  • FilteredMenu now allows subclasses ability to overwrite #boldContent.
  • Lessen severity of most goog.module.ModuleManager log statements.
  • Consistently document the types that assert[Not]Contains work on.
  • HTML sanitizer allows the "open" attribute (which is defined on "detail" elements).
  • Fixed return type of goog.testing.recordFunction to be better typed
  • Change the message of verification exceptions when in record mode.
  • Group test logs together for better output readability.
  • Added partial support for nested whitelisted functions in the CSS Sanitizer
  • User text in Rohingya abnd Sogdian scripts will be identified as RTL.
  • The HTML sanitizer should allow the "max" attribute (which is defined on "progress" element).
  • Fix safedomtreeprocessor.processToString closing empty element using /> on IE.
  • Add audio/L16 to the list of safe MIME types.
  • Added method to efficiently copy an AvlTree.
  • Adds RTL detection for any language using Thaana script.
  • Add YEAR_MONTH_SHORT skeleton to Closure date time and date interval formatters.
  • Explicitly sets the vec types as non-null.
  • Fix goog.i18n.RelativeDateTimeFormat to use quantity value of negative zero to format zero units as past rather than future.
  • Remove the Checkbox#setEnabled since the tabindex fix is already handled by Control#setEnabled calling ControlRenderer#setFocusable on the key event target.
  • Hook up FINE, FINER, and FINEST logging levels to console.debug. This will allow developers to filter out goog.log.fine messages from the console in Chrome Dev Tools.
  • The HTML sanitizer should allow the "required" attribute (which is defined on "input" elements).
  • fixes handling of RegEx and documentation from CL 209830452
  • Added type information to output of goog.debug.normalizeErrorObject when normalizing a non-Error object.
  • closure's linkify now considers trailing apostrophe to be punctuation.
  • Improve goog.color.hexToRgb and goog.color.rgbToHex methods by reducing amount of number<-> string conversions.
  • Simplify blend math: ax + (1 - a)y = ax + y - ay = a(x - y) + y
  • Setting spellcheck on the HSVPalette's input field to false to suppress the red underline in the input field.
  • For goog.editor enable Alt-Shift keyboard shortcuts.
  • Change possibly untyped document.all reference to document['all'] in closure/base.js
  • Update Gecko key handling to account for keypress events have a keyCode equal to the charCode. Addresses https://github\.com/google/closure-library/issues/932\.
  • Fix a loss-of-precision issue in NumberFormat that caused some formattings to appear less accurate.
  • Deprecated MockClock#tickPromise
  • KeyboardEvent.key now includes escape key.
  • The AbstractModuleManager has been streamlined. afterLoadModuleCode has been removed and setLoaded no longer takes in a module ID.
  • Adds keycode for FF_HASH, which is the Gecko-specific hash keycode as documented by https://developer\.mozilla\.org/en-US/docs/Web/API/KeyboardEvent/keyCode\.
  • Create a goog.json.Jsonable typedef to represent types that can be serialized as JSON.
  • CLDR 34 locale data update.
  • Remove an erroneous @this tag from goog.memoize().
  • Removes deprecated constant goog.net.cookies.MAX_COOKIE_LENGTH.
  • Tighten typing for ClientPosition.prototype.coordinate to force non-nullability.

Closure Library v20180910

19 Sep 20:16
Compare
Choose a tag to compare

New Additions

  • Move activeModuleManager.get() getDefault parameter to a global function.
  • Added function goog.html.SafeUrl.fromSmsUrl to generate 'sms:' urls in a fashion similar to 'tel:' urls.
  • Add isSafeInteger public API to goog.math.Long
  • Added status codes from RFC 4918 to the HttpStatus enum

Backwards Incompatible Changes

  • Make Long.isSafeInteger behave like Number.isSafeInteger
  • AbstractModuleManager no longer extends Disposable.
  • Removed CRLF from Drag and drop base64.

Other Changes

  • Shorter implementation of getLowBitsUnsigned.
  • Add a $waitAndVerify() function to MockInterface and a $waitAndVerifyAll() function to MockControl that returns a goog.Promise that resolves when expectations have been registered.
  • Include RTL ranges in both the Basic Multilingual Plane (BMP) and Supplementary Planes of Unicode
  • Fixing a typo in a comment
  • AutoComplete: Fix type annotation for object parameter.
  • afterLoadModuleCode() is now a no-op, pending removal.
  • simplify long multiplication
  • Initialize TWO_PWR_63_DBL_ with exact value as jscompiler doesn't fold constants where precision might be lost.
  • Add getters for minimum and maximum number of fraction digits.
  • Optimize Long.toString
  • Rearrange 'if'-statements in Long.div to minimize number of executed checks.
  • goog.html.SAFE_URL_PATTERN_ is publicly available through goog.html.SafeUrl.SAFE_URL_PATTERN
  • Fix bug with quoted elements in csv parser
  • Fix bug in loading ES6 modules on firefox.
  • improve Long.fromNumber performance.
  • Use bit shift operation instead of mask in isSafeInteger method.

Closure Library v20180805

10 Aug 23:01
Compare
Choose a tag to compare

New Additions

  • goog.dom.safe.setAudioSrc
  • Added function goog.html.SafeUrl.fromSipUrl to generate 'sip:'/'sips:' urls in a fashion similar to 'tel:' urls.
  • Adds a touch-oriented drop-in for pointer events.

Other Changes

  • Fix bug in goog.labs.mock - record self-interactions in spied objects.
  • Update goog.labs.testing matchers to use exportSymbol rather than exporting directly into the global namespace.
  • Fix type of the interface of goog.net.WebChannel to avoid compilation errors.
  • Tightened some types.
  • Improve performance of compare operations on Math.Long
  • Allow calc() and functions used by grid-* CSS properties in SafeStyle.create.
  • In IE, soy templates clear an element's content before setting innerHTML to avoid recursive parent/child disconnecting behavior in IE.
  • Clarified documentation of goog.Promise.prototype.thenCatch().