Releases: bazelbuild/rules_closure
Closure Rules v0.4.2
This is a maintenance release (i.e. not tracking HEAD) which upgrades the following components:
- Closure Compiler v20170124 → v20170806 (Release notes)
- Closure Library v20170124 → v20170806 (Release notes: [1] [2] [3] [4] [5])
- Closure Templates 2016-02-01 → 2017-08-08
- Closure Stylesheets 1.4.0 → 1.5.0
- Protobuf 3.2.0 → 3.3.0
http_archive(
name = "io_bazel_rules_closure",
strip_prefix = "rules_closure-0.4.2",
sha256 = "25f5399f18d8bf9ce435f85c6bbf671ec4820bc4396b3022cc5dc4bc66303609",
urls = [
"http://mirror.bazel.build/github.com/bazelbuild/rules_closure/archive/0.4.2.tar.gz",
"https://github.com/bazelbuild/rules_closure/archive/0.4.2.tar.gz",
],
)
Closure Rules v0.4.1
This is a maintenance release (i.e. not tracking HEAD) which upgrades the following components:
- Closure Compiler v20161024 → v20170124 (Release notes)
- Improved optimization of modules with named exports.
- Known issue: Aliased exports need delegate google/closure-compiler#2299
- 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.
- 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.
- Improved optimization of modules with named exports.
- Closure Library v20161024 → v20170124 (Release notes: [1] [2])
- 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.
- 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.
- 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.
- 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
- New Additions
- Closure Templates 2016-07-25 → 2017-02-01 (Release notes)
- Add
new
keyword for proto initialization. Dots are also now allowed in function names, which is needed for proto instantiation. - Improve the performance of constructing a SoyProtoTypeProvider
- Added proto initialization support to Tofu.
- Accept goog.html types as sanitized types. Also support goog.Uri as {uri}.
- Fix bug in the type resolver bug relating to expressions with null type.
- Fix a bug where if a user wrote a {msg} with no content and a genders='...' attribute, the compiler would fail with an IndexOutOfBoundsException.
- Many improvements to error reporting
- Generate
@typedef
for opt_data which can be used in JS code. - Allow trailing comma in expression parser's named param list
- Proto init call accepts null as a param value.
- Replace calls to 'new SoyFileSet.Builder()' with SoyFileSet.builder(). The former has been deprecated for over 2 years and is going away.
- New ProtoUtil.getBuilderMethod() utility method for creating a SoyExpression that calls ProtoMessage.newBuilder().
- Handle proto fields with jstype = STRING. Proto fields that are typed as int64 with jstype = STRING annotation must be handled as strings in Soy code, then converted to int64 for proto init calls.
- Improve ContentSecurityPass escaping to ensure that nonce values are valid base64.
- Soy tofu: Data access on nonexistent key/field returns NullData, not Undefined
- Soy cleanup: Remove SoyAbstractMap, move all code to AbstractDict. Remove SoyAbstractMap, move all code to AbstractDict. Remove SoyAbstractList, move all code to ListBackedList.
- Soy JS codegen: support non-expressions in null coalescing expressions (?:).
- Add
- Incremental DOM 0.5.0 → 0.5.2
- Performance improvements: google/incremental-dom@ac03c59 google/incremental-dom@2b67c5b
- Remove notifications. google/incremental-dom@f7f6b1c
- Fix bug in removeChild. google/incremental-dom@ce2bd2e
- Protobuf 3.1.0 → 3.2.0
- Deserialization of repeated fields no longer has quadratic performance behavior.
- UTF-8 encoding/decoding now properly supports high codepoints.
- Added convenience methods for some well-known types: Any, Struct, and Timestamp. These make it easier to convert data between native JavaScript types and the well-known protobuf types.
- Guava 19.0 → 20.0
- Guice 3.0 → 4.1.0
This release can be used by adding the following to WORKSPACE
:
http_archive(
name = "io_bazel_rules_closure",
strip_prefix = "rules_closure-0.4.1",
sha256 = "ba5e2e10cdc4027702f96e9bdc536c6595decafa94847d08ae28c6cb48225124",
url = "http://bazel-mirror.storage.googleapis.com/github.com/bazelbuild/rules_closure/archive/0.4.1.tar.gz",
)
load("@io_bazel_rules_closure//closure:defs.bzl", "closure_repositories")
closure_repositories()
Closure Rules v0.4.0
This release fixes bugs and upgrades certain dependencies. Migrating to this release should be relatively painless. The only breaking change you may encounter is that some linter warnings are now being treated as errors, which can be easily suppressed.
New Features
- Closure Compiler conformance protobuf configuration files are now supported thanks to @hochhaus in 8fcdda1. Please note that In the near future, Closure Rules will open source Google's internal conformance configs and make them the default.
Bug Fixes
- A nasty bug with CSS compilation has now been fixed thanks to @iflan and @hochhaus. See a657ced and #129.
- A soy file can now have two closure_js_template_library rules that compile it with and without Incremental DOM, without causing a naming error thanks to @hochhaus in 55aaa46
- Fixes to cross-repository support thanks to @hochhaus in c29b38e
- closure_js_template_library should_generate_soy_msg_defs attribute now works thanks to @gramic in c37dc23
Breaking changes
- All JsChecker warnings are now errors. If this breaks your build, please remember that the error message will contain a code you can add to the
suppress
attribute of closure_js_library to make it go away (if you'd prefer not to fix it.) We made this change because warnings are finicky; they don't show up when builds are cached, so they're sometimes hard to find again if they've already scrolled off the screen. - The incremental_dom library target was renamed
@io_bazel_rules_closure//third_party/javascript/incremental_dom
to improve compatibility with Google's internal repository in 1ddf26e
Upgrades
- Closure Compiler v20160822 → v20161024 (Release notes)
- Various compile time performance improvements to the optimization passes.
- Better support/fixes for
@abstract
classes and methods - Polyfills for Promises.
- Support for async/await by transpiling to generators.
- Closure Library v20160822 → v20161024 (Release notes: v20160911, v20161024)
- Closure Stylesheets 1.3.0 → 1.4.0 (Release notes)
- Fixes nasty bug where compiler crashes for stylesheets with commas
- Protobuf 3.0.0-beta-3 → 3.1.0
Closure Rules v0.3.0
This release makes it possible to render type safe Protocol Buffers inside HTML templates. You can now write services the same way Googlers do, with Protocol Buffers at all layers of the stack.
Protocol Buffers are the most integral data structure at Google. BigTable stores protobufs. gRPC transmits protobufs over network between backends and frontends. Business logic operates on protobufs. HTML templates render protobufs. This eliminates entire categories of problems most developers would consider toil, such as turning SQL into objects into JSON/XML and back into objects.
This release also enables CSS sourcemaps and upgrades Closure to the latest version.
New Features
- Protobuf types can be referenced in HTML templates by having closure_js_template_library depend on a closure_js_proto_library rule. Support has not yet been added for closure_java_template_library yet. This work was made possible by @mikesamuel who put a lot of work into open sourcing this functionality. The integration was contributed by @hochhaus in 1cae287 which includes tested examples of usage.
- closure_css_binary now generates a CSS sourcemap file thanks again to @mikesamuel and Closure Stylesheets maintainer @iflan. Integration in a2fed40. Improvements still need to be made on paths outputted in sourcemap file.
- Automatically enable
--assume_function_wrapper
optimization whenoutput_wrapper = "(function(){%output%}).call(this);"
. Contributed by @hochhaus in 190f7d9
Bug Fixes
- Allow filesets in closure_js_proto_library. Contributed by @flamingcow66 in bd4049c
Breaking Changes
- New Type Inference engine is now disabled by default. To re-enable it, pass
defs=["--new_type_inf"]
to closure_js_binary. See also fedf10c. - The deprecated
closure_js_template_library
andclosure_java_template_library
aliases have been removed. - The
//closure/stylesheets
binary has been moved to//third_party/java/csscomp:ClosureCommandLineCompiler
.
Upgrades
- Closure Compiler v20160713 → v20160822 (release notes)
- Includes fixes making it easy to use goog.module w/ ES6 subclasses
- Closure Library v20160713 → v20160822 (release notes)
- Includes breaking improvements to
goog.dom.TagName
- Includes breaking improvements to
- Closure Stylesheets 20160212 → 1.3.0 (release notes)
- Sourcemap functionality fixed
@if
now usable inside blocks, including@mixin
- Closure Templates 2016-07-21 → 2016-07-25
- Incremental DOM 0.4.0 → 0.5.0
- Safe HTML Types 1.0.4 → 1.0.5
Closure Rules v0.2.5
This release upgrades upstream dependencies.
- Closure Compiler v20160619 → v20160713 (release notes)
- Highlight: Some types of JS compilation may go faster
- Closure Library v20160619 → v20160713 (release notes)
- Highlight: Added enum for HTML attributes:
goog.dom.Attr
- Highlight: Added enum for HTML attributes:
- Closure Templates 2016-01-12 → 2016-07-21
- Will now run in Java 7 environments, e.g. App Engine
- Safe HTML Types support:
@io_bazel_rules_closure//closure/templates:safe_html_types
- Incremental DOM is now part of official Soy;
@incremental_dom_soy
is removed - Improved error reporting
- New Java bytecode compiler:
@io_bazel_rules_closure//closure/templates:SoyToJbcSrcCompiler
Closure Rules does not use this, but might in the future. - Breaking Changes
- Templates that take a boolean must actually take booleans. 0 and 1 will no longer work.
- Empty list/map dereference (
{let $a: [] /}{$a[0]}
) and iteration ({foreach $a in []}
) is now a compilation error. deprecated-noautoescape
has been removed. Learn how to upgrade your templates here: google/closure-templates@a5f5acb- Java users need to replace calls to
setActiveDelegatePackageNames(delegates)
withsetActiveDelegatePackageSelector(Predicates.in(delegates))
. See: google/closure-templates@41b599e - Remove SoySauce.Renderer.setActiveDelpackageNames and replace it with .setActiveDelpackageSelector which takes a Predicate object. Deprecate the analgous method on SoyTofu.
- Aliases in globals are now respected. This probably won't break anything, unless your aliases conflict with your root globals namespaces.
- Users who are subtyping SoyModule directly will need to switch to subtyping AbstractModule and directly installing SoyModule instead.
- A backslash in Soy attribute value is now used for escaping the following backslash or double quote. It is preserved if followed by other characters. Most templates are unaffected by this change but some edge cases break:
{msg desc="abc\"}
was valid before but it is not now.{msg desc="\\"}
had value \ before but it has\
now. - Users who rely on deltemplates being generated into the js object named 'null' will break. Though it is unlikely anyone relies on this.
- In the Soy Abstract Syntax Tree, SoyMsg now uses the SourceLocation class for source file information, which also includes line numbers.
- A new method has been added to the SoySauce interface. This will break custom subclasses.
- All templates that use an
$ij
parameter named 'csp_nonce' will need to use a new variable. {{command}}
syntax is no longer supported. Braces are now supported in string literals, so there is no need for this syntax. Use single braces.
- gson 2.4 → 2.7 (per soy change)
- icu4j 56.1 → 57.1 (per soy change)
- json ∅ → 20160212 (per soy change)
Closure Rules v0.2.4
This release contains some bug fixes and features that will be important for users running development web servers from Bazel, or generating deps files for raw sources mode. Some of the changes are explained in-depth in #111. The documentation has also been updated to clarify rule polymorphism.
Closure Rules v0.2.3
This is an important bug fix release.
Bug Fixes
- Make sure linter actually runs. There were certain invocation patterns before that would cause JsChecker to not run. Now it's fixed. So this may cause new errors for you. You have a choice to conform by fixing your code, or you can use the
suppress
attribute. See the closure_js_library docs to learn more. See also: c810b60 - Testing rules should now work from external repositories. If you had runfile errors using
closure_js_test
before, they should be gone. See also: 220891e
Closure Rules v0.2.2
- Upgrade Closure Compiler and Library to v20160619
- New
property_renaming_report
flag - Make all JSDoc warnings suppressible
- Stricter validation of defs flags
Closure Rules v0.2.1
Closure Rules v0.2.0
This release represents the latest iteration of Closure Rules' development and updates the Closure Tools to the latest release.
Breaking Changes
- closure_js_test is now compiled and type safe by default, i.e. uses
ADVANCED
mode. If you want the old behavior, passcompilation_level = "WHITESPACE_ONLY"
to your rule. Due to a bug, for the duration of the next few releases you'll need to add/** @exports */
to your global test functions, or usegoog.testing.testSuite
(with quoted keys) to register them. If that's not appetizing, just use whitespace only mode until we can get automatic exporting of test functions straightened out. - JS binaries will now set
USE_NATIVE_JSON
by default. This means smaller binaries at the expense of breaking IE7 / IE6 support. If you need to support those browsers, then please file an issue and we'll add support for turning this off. (Contributed by @hochhaus) - Strict escaping is now 100% mandatory when using Closure Templates. (Contributed by @hochhaus)
Deprecations
- closure_template_js_library has been renamed to closure_js_template_library. The old name will be removed in the next release.
- closure_template_java_library has been renamed to closure_java_template_library. The old name will be removed in the next release.
New Features
- New closure_js_proto_library rule. (Contributed by @hochhaus)
- Incremental DOM support for closure_js_template_library. This allows templates to be rendered in such a way that it consumes less memory but more CPU. See this mailing list thread for more information. (Contributed by @hochhaus)
- New
output_wrapper
flag for closure_js_binary. (Contributed by @hochhaus) - New low-level phantomjs_test rule.
Bug Fixes
STRICT_MODE_COMPATIBLE
is now defined if the language combination is strict. (Contributed by @hochhaus)
Upstream Versions
- Closure Compiler 20160517 (Updated from 20160315)
- Closure Library 20160517 (Updated from 20160315)
- Closure Templates incrementaldom-0.0.3 (Forked version; Updated from 2016-01-12)
- Closure Stylesheets 20160212
- PhantomJS 2.1.1