This repository has been archived by the owner on Aug 1, 2024. It is now read-only.
Releases: google/closure-library
Releases · google/closure-library
Closure Library v20210907
Closure Library v20210906
New Additions
- Add instance method alises on goog.structs.StringSet to align it with ES6 Set. (ee36b88)
- Removes references to
goog\.structs\.Map
in WebChannel code. (74ae512)
Backwards Incompatible Changes
- Make ModuleManager handle when "synthetic" modules dont mark themselves as loaded (e19c97b)
- Type definition for goog.i18n.NumberFormatSymbols changed. (cfab9e2)
- goog.log.LogRecord.getException now returns * and defaults to undefined. setException and other APIs have been adjusted accordingly. (c244e80)
- Tests that override shouldRunTests will now cache the result of the first time shouldRunTests is executed. Tests that may have been incorrectly skipped will now start running. (645d11a)
- setModuleConstructor now explicitly requires a parameter-less (4bb0dca)
Other Changes
- Fix Date.add behavior for years 0-99. (4ad6ca7)
- Get userAgent browser info from userAgentData whenever possible. (619f3fc)
- Add HTTP 499 to goog.net.HttpStatus* packages (b3a823e)
- Added goog.math.Long.hashCode function that returns 32 bit hash code of the long. (1f3f3d0)
- Publish BUILD files with closure-library. (cfbdb31)
- Use closure_base_js_library for closure:base and setup WORKSPACE for bazel repo. (73debba)
- Formatting uses ECMASCript Intl class in modern browsers. (51d4398)
- Use Client hints API to get device isMobile info. (cb82c47)
- Support addEventListener in pixeldensitymonitor. (e12df7e)
- Avoids setting unknown fields with null value when used along with pbliteserializer. (8eb6cbe)
Closure Library v20210808
New Additions
- Rename declarations of goog.iter.Iterator#next to #nextValueOrThrow, leaving behind aliasing implementations of #next. If your codebase uses goog.iter.Iterator, similar changes should be applied to your codebase to prepare for upcoming Closure Library changes that call
nextValueOrThrow
wherenext
is currently called. (0048217)
Backwards Incompatible Changes
- Deleted goog.provide for goog.net.streams.JsonStreamParser.Options (fc26060)
- Delete goog.date.formatMonthAndYear. (ed02aa9)
- goog.editor.Field.prototype.shouldRefocusOnInputMobileSafari has been removed. (1cb5f6f)
- Remove the fourth parameter passed to window.open. (5d49bd0)
- Removed 'goog.ui.GaugeColoredRange' as a namespace. (24820b0)
- goog.structs.Map#set no longer returns a value, to align with ES6 Map. (a00c1e6)
Other Changes
- Delete open-sourced Python helper scripts. (7496346)
- Return the correct singleton when using goog.singleton with subclassed classes. (1422c25)
- Small type safety fix. (9d24a6c)
- Disable failing test. (1b39353)
- Various type-safety fixes for closure/ui. (e40ca54)
- Add
var
css function name to safestyle allowlist. (1ba2249) - Remove missingRequire suppressions (e7d2e82)
- One-line summary of change for external release notes. (a009a5e)
- Remove support for IE8 and before, Gecko 3.x and before, and Safari 5.1 and before. (0bc21de, d53f6fd, 8640bb4, 2113d7c, 4479b9f, a1eee63, 7f64bd1, f848b52, bb45183, a6ad7d8, 5808803, 9ce5d59, 415d9e4, 7a5a20c, 0b18892)
- Add graceful degradation for the Cobalt (https://cobalt.dev) browser. (46bbac9)
- In goog.userAgent, check for "CriOS" in the user agent string when determining Chrome version on macOS. (b9885a8)
- Round the elapsed time in the "x of y tests run in z ms" message printed by the Closure test runner. Add a space before "ms". (792a43c)
- Drop support for pre-Chromium Opera (c7ea3f4)
- BrowserRange no longer has special cases for IE and Opera. (e510109)
- Replace calls to methods on goog.structs,Set that aren't present on an ES6 Set with compatible equivalent code. (47bd286)
Closure Library v20210601
New Additions
- goog.storage.mechanism.IterableMechanism now implements ES6 Iteration protocols. The default implementation delegates to the existing goog.iter.Iterator via a shim. Support for iteration using goog.iter.Iterable is softly deprecated and will eventually be removed in favour of ES6 iteration. (8e7279e)
- Add new goog.array toMap and bucketToMap methods that act like toObject and bucket, but return an ES6 map. (8d6fec3)
- Introduce goog.singleton.getInstance() which can replace goog.addSingletonGetter(). (de77284)
- Implement
MockClock.doTimeWarpAsync()
. (a9e3d01) - goog.dom.fullscreen.requestFullscreenWithKeys now accepts options to pass to goog.dom.fullscreen.requestFullscreen when feasible. (8d18ebb)
- goog.iter.Iterator's next method (with ES4 iteration semantics) is being renamed to
nextValueOrThrow
. The existingnext
method has been left for backwards-compatibility and marked deprecated. Users are encouraged to migrate all usages ofnext
tonextValueOrThrow
. (f05a665) - Added a unique id to the aria-live regions created by goog.a11y.aria.Announcer and added a public method to get the id for a specific priority. (c0047ef)
- goog.cloneObject and goog.object.unsafeClone now shallow-clone ES6 Maps and Sets. (8ad7d98)
- Add methods to goog.structs.Map to align the implementation with native ES6 Map. This marks the first of several steps in migrating goog.structs.Map to ES6 Map. (132696f)
- Create goog.collections.maps, containing helper methods that operate on Map-Like collections. These functions are the intended replacement for various methods on goog.structs.Map, and as such various methods on goog.structs.Map are marked deprecated with their intended replacements noted in the deprecation message. (ba5012f)
- Support iterating over keys and values for ES6 Map and Set in goog.structs. (0515a76)
- Copy functionality from goog.structs.Set that is not present on ES6 Set into helper functions in goog.collections.sets, and add additional methods on goog.structs.Set instances to align with native ES6 Set. goog.structs.Set is softly-deprecated in favour of ES6 Set. (6f2c86c)
- Rename declarations of goog.iter.Iterator#next to #nextValueOrThrow, leaving behind aliasing implementations of #next. If your codebase uses goog.iter.Iterator, similar changes should be applied to your codebase to prepare for upcoming Closure Library changes that call
nextValueOrThrow
wherenext
is currently called. (32872c4)
Backwards Incompatible Changes
- Make goog.getScriptNonce private. Existing users should use goog.dom.safe.getScriptNonce instead. (69dc26e)
- Remove goog.userAgent.isVersion, the old name for goog.userAgent.isVersionOrHigher. (62c6d5a)
- goog.debug.errorHandlerWeakDep has been removed. (edaa2d5)
- Remove support for integrating with the ActiveX garbage collector in goog.debug.Trace as ActiveX is deprecated. (40e5451)
Other Changes
- Deprecate Closure Python scripts. (89659f0)
- Create the script tag in jsloader.safeLoad using the document it will be appended to, instead of the current document. (aa5b129)
- Allow dimension picker to be extended. (be5fd1a)
- Correctly parse ISO 8601 date strings representing dates in years 0-99. (1f76d5f)
- Add goog.dom.safe.getScriptNonce, take 2. (de69cc1)
- Fix 'undefined' streaming response header in testing XhrIo. (c1b7b96)
- A data update based on ICU69.1. (1bfee28)
- Fix test filtering for generated test names, which can contain any character. (99c8cc3)
- Compact decimals formatting - inheritance improvement (from CLDR). (21ad239)
- Allow
shouldRunTests
to be respected in nested tests when a containing test object does not defineshouldRunTests
. (5e49bff) - Delete script nonce cache. (4dcfc9e)
- introduce goog.getLocale() (5d1bd01)
- Allow goog.ui.InputDatePicker to use any implementation of a DateTime(Parser|Formatter). (7bf5f74)
- Minor optimisation of base64 serialization. (eef94a6)
- Fix verbalization in PaletteRenderer (ce40d50)
- Improvement to time zone detection. (15fe94f)
- Fixes output for infinity in compact short style (2c26f37)
Closure Library v20210406
New Additions
- DebugError constructor takes an optional error as a cause for error chaining. (8797fa8)
- Implement a predictive parsing option for goog.i18n.DateTimeParse with support for limited pattern symbols. (1e6e512)
Backwards Incompatible Changes
- Delete an unused goog.provide goog.fx.TransitionBase.State. (5ee9c7f)
- Some private-looking constants (TRANSPORT_SERVICE_ and SETUP_ACK_) that were actually being used outside of goog.net.xpc have been renamed and locked down to
@package
-visible. (3688e9a) - Removed goog.ui.media.FlashObject (3961167)
- Remove goog.html.flash (c5f6e8e)
- Drops support for legacy browsers (IE<=8) in OnlineHandler (cae5f13)
Other Changes
- Capture the Native URL constructor on module load to avoid it being clobbered by users. (18edb20)
- Remove flash reference from userAgent demo (131b2f8)
- Expose LoadOptions type for AbstractModuleLoader (306254f)
- debug.normalizeErrorObject() returns a consistent object across browsers. (fbbe58a)
- Remove optional parameter to hasNativeComparator, and use goog.FEATURESET_YEAR. (9106b74)
- Add goog.dom.safe.getStyleNonce. (634c79e)
- Removed goog.userAgent.flash (f62aba0)
- Use ECMAScript Intl object when supported by browsers for relative date time formatting. (ef3fcb3)
- Use paddingTop instead of paddingBottom to nudge textarea element. (914e6ad)
- The ability to detect Content Security Policy (CSP) violations during unit tests has been added to the Closure testing framework. (7968899)
- Add nonce in goog.dom.safe.setLinkHrefAndRel. We already do this goog.style.installSafeStyleSheet. (6c84afc)
- If a shortcut that conflicts with an existing one is registered, have the triggered error show the existing shortcut that would be overridden. (40a889f)
Closure Library v20210302
New Additions
- goog.debug.EntryPointMonitor is now aliased as goog.debug.entryPointRegistry.EntryPointMonitor. (af0e728)
- Add an options parameter to goog.i18n.DateTimeParse.parse and deprecate goog.i18n.DateTimeParse.strictParse in favor of calling parse with the validate option. (086cd3f)
Backwards Incompatible Changes
- All existing provides related to goog.lab.testing matchers have been moved to matchers.js. Additionally, goog.labs.testing.logicmatchers has been removed. (eaf9b87)
- Delete goog.ds. (49f6e6c)
- Remove extra multi-provides from timezonelist.js. (8d73437)
- Remove start param from DateTimeParse as it is trivially implemented on the caller side using substring. (1a89f83)
- Delete goog.debug.Logger and associated classes. (4cf54e4)
- Remove goog.fs.(createObjectUrl|revokeObjectUrl|browserSupportsObjectUrls) in favour of the equivalents in goog.fs.url. (991bdc0)
- Split out goog.provides in pagevisibilitymonitor.js into separate files. (61eef0f)
- Split out goog.provides in renderer.js into separate files. (f9f6349)
- Stop using
@package
in goog.log. (d1038d1) - Removed goog.html.silverlight (46dab4c)
- Remove most goog.ui.media classes. (89087d6)
Other Changes
- SafeScript.fromConstantAndArgs has been removed. (28ee53a)
- Disable test with ECMAScript Intl object (097b435)
- Update goog.net.Cookies.prototype.isEnabled to account for unreliable navigator.cookieEnabled API. (a327cb1)
- Remove usages of goog.debug.(LogManager|LogRecord|Loggable|Logger) from Closure. (639b79e)
- Remove unneeded
missingProvide
suppressions (2c3baa4) - Migrate ModuleLoader to goog.module. (4fb537a)
Closure Library v20210202
New Additions
- goog.net.(Ip|Ipv4|Ipv6)Address has been re-nested as goog.net.ipaddress.(Ip|Ipv4|Ipv6)Address. The old namespace paths continue to exist as aliases for compatibility reasons. (1be1988)
- goog.locale.timezonelist has been added. (0fc9e10)
- Support setTrustToken on Closure Library's XhrIo class. (07d1478)
Backwards Incompatible Changes
- Removed setKeyboardShortcutKey() from the editor plugin RemoveFormatting. This plugin now defaults to Cmd + \ on Mac, and both Ctrl + Space and Ctrl + \ on other platforms. (03589e4)
- closure/goog/deps.js is now generated. Use
npm install
ornpm run gen\_deps\_js
to regenerate it. (6c1464c) - Removed some goog.events support for IE8- era browsers. (918f0b5)
- Remove goog.asserts.assertObjectPrototypeIsIntact, inline usage into goog.structs.StringSet. (baaa878)
- goog.net.(Ip|Ipv4|Ipv6)Address have been deleted in favor of goog.net.ipaddress.(Ip|Ipv4|Ipv6)Address. (525484e)
- Remove goog.debug.Logger.logToProfilers, as well as the goog.define goog.debug.ENABLE_PROFILER_LOGGING. (1298aca)
Other Changes
- Fix unnecessary invocation of native preventDefault method when initializing goog.events.BrowserEvent from native event with defaultPrevented. (a5586c9)
- none (b6fe130, 271b135)
- Added all aria-* and on* attributes to goog.dom.Attr, plus cellpadding and cellspacing. (640167b)
- Move KeyEvent to a new single-provide file. (c52f3b4)
- Fix edge case bug with wrong repositioning when the drag is trigger by the mouse cursor being out of the viewport. Place the compiler flag into a namespace: goog.fx.DragListGroup.DRAGLISTGROUP_CORRECT_POSITION_DRAG_START (d7c2dc3)
- Remove unused field from goog.module.ModuleManager. (6bfa778)
- Fix space leak in goog.functions.throttle (774cd41)
- Hebrew compact decimals formatting improvement (from CLDR). (7489b04)
- Enabling the dragged element initial position correction by default. (c9422fe)
- Update Closure URL unit tests to pass on Firefox v83. Firefox has been continuously updating their URL Constructor parsing, and this test likely was fixed in v64. (6d411d5)
- Turn labs/testing/environment.js into a goog.module. (2e78c3a)
- Update Closure Style unit tests to pass on Firefox v83. (4b66395)
- Adding quicktime and x-ms-wmv to allowed SafeUrl video types. (65d9306)
- TODO(user): Rollback of 23c28f1 (a1197c1)
- Fix PerformanceTimer.runAsyncTask to not use recursive callbacks. (655aafb)
- Add a goog.module for the DateTimePatternsType (e05898d)
Closure Library v20210106
New Additions
- Add goog.dom.Attr.ROLE (513c254)
- goog.debug.*Formatter have been moved into goog.debug.formatter. The older namespaces still exist temporarily for compatability reasons, but will be deleted shortly. (437fd96)
Backwards Incompatible Changes
- WorkerGlobalScope may no longer be passed to FetchXmlHttpFactory constructor without an options object. (94f94f7)
- Deleted goog.locale.genericFontNames API. (e91c2e7)
- XhrLike.prototype.getResponseHeader now returns a nullable string, per the spec. (1497e55)
- goog.async.WorkItem is no longer provided by workqueue.js. (5c46105)
- Remove goog.debug.FpsDisplay which is obsolete with DevTools instrumentation. (90b2b14)
- Removed goog.debug.ErrorHandler#setAddTracersToProtectedFunctions (3a21a38)
Other Changes
- Updating Closure with data from ICU 68 / CLDR 38 (fe6132b)
- Allow "defer" attribute to be set on script elements (9256256)
- Soy templates can now be rendered to a ShadowRoot. (97eb5d9)
- Deprecate almost all of goog.debug.(Logger|LogManager|LogRecord|Loggable). (d336feb)
- Make getAllLoggers actually return a list of goog.log.Loggers. (b7c7b42)
- Update macOS user agent regex to match macOS Big Sur versions. (f4ae8e1)
- Add missing type annotations in override methods in base.js (8c14012)
- Fix all ArrayBuffer objects appearing to be equal when passed to assertObjectEquals. (44af52b)
- Add goog.soy.data.SanitizedJs.toSafeScript (916cdeb)
- Underused method goog.tweak.overrideDefaultValue has been removed. (be909f2)
- Fix overflow issues in Vec2's magnitude functions. (3ad4e10)
- Provide a fix to correct the initial position of the dragged element when its size is smaller than the original element. This can be controlled via the compiler flag
goog\.fx\.DragListGroup\.DRAGLISTGROUP\_CORRECT\_POSITION\_DRAG\_START
as well as the override methodoverrideCorrectDraggedElementInitialPos
. By default this behavior is not enabled. (09013c7) - Remove stale TODOs (93760ce)
- SafeScript.toString is a value unwrapper. (4f5062c)
- SafeStyleSheet.toString is a value unwrapper. (180ee10)
- SafeStyle.toString is a value unwrapper. (4152909)
- SafeUrl.toString is a value unwrapper. (d328d8e)
- Internal change (4e91fed, ca80237)
- Move TableRow and TableCell to separate single-provide files. (1c1af22)
- SafeHtml.toString is a value unwrapper. (4acf7d6)
- Move goog.events.EventLike to a single-provide file. (ca20e8a)
- Move goog.events.ListenableKey to a single-provide file. (290c369)
- Use basic for-loop instead of for-of loop to iterate through true types. (65a0518)
- Make pre-Chromium Edge follow the same load order as IE. (ae85a9f)
- Move HTMLSanitizer allowlists to modules. (4362954)
- Defines TrustedResourceUrl.toString outside of goog.DEBUG. (caf92b3)
- Defines SafeUrl.toString outside of goog.DEBUG. (efd7720)
- Defines SafeStyleSheet.toString outside of goog.DEBUG. (79079e0)
- Defines SafeStyle.toString outside of goog.DEBUG. (be71af6)
- Defines SafeScript.toString outside of goog.DEBUG. (8ed35e1)
- Update Closure Editor Field unit tests to pass on Firefox v83. Update the logic for detecting Firefox's BR tag that it uses for empty line padding - see https://bugzilla\.mozilla\.org/show\_bug\.cgi?id=1569902 for more information. (5daefac)
- Move goog.ui.KeyboardShortcutEvent to a single-provide file. (f1dfb9e)
- Closure HTML Sanitizer namespace is now provided as 'goog.html.sanitizer', adjust CssSanitizer not to store a private property in another file's namespace. (ff5bc5c)
- Stop recording a goog.debug.Tracer from goog.module.ModuleManager (e25b197)
- Fix for bug impeding vertical drag behavior when initial position is recomputed due to size difference between the source and the dragged item. (ad91bb5)
- Move goog.net.cookies out of the same file as goog.net.Cookies to fix multi-provide issues. Mark goog.net.cookies as deprecated in favor of goog.net.Cookies#getInstance. (0e59bb8)
- Defines SafeHtml.toString outside of goog.DEBUG. (afe3ef7)
Closure Library v20201102
New Additions
- Add
goog.log.getAllLoggers
. (0fe1819) - Add goog.dom.safe.createContextualFragment. (d263cd0)
- Introduce goog.functions.UNDEFINED and goog.functions.EMPTY (28a10ae)
Backwards Incompatible Changes
- Tighten strictness in Closure Library functions in goog.provide files. (ea7f68e)
- Improve error message for failing to load a module. (7c2fc01)
- Removing Safari 10 Workarounds in debug loader. (b46b6bf)
Other Changes
- base.js now logs but does not throw on missing goog.requires. (21ae791)
- Allow Trusted Types in loading resources. (39e9faa)
- Make code Trusted Types compatible, take 2. (7e12ddc)
- Add proper support for
Infinity
fornumericValueToString
andstringToNumericValue
. (e9d776c) - Add browser detection for ES2019 and ES2020. (89d98af)
Closure Library v20201006
New Additions
Backwards Incompatible Changes
- Tighten strictness in Closure Library functions in goog.provide files. (1fa7999)
Other Changes
- Remove forwardDeclares from net/BrowserChannel, and resolve a circular dependency between BrowserChannel and BrowserTestChannel. (1b19054)
- Fix forwardDeclare between module and loader packages by moving a shared enum into a separate file. (58b8677)
- Document that using goog.url is preferred over goog.Uri and goog.uri.utils and outline one way to identify URIs that should be manipulated using the URL package. (e9ba54f)