Skip to content

Releases: bazelbuild/rules_closure

Closure Rules v0.4.1

17 Feb 04:55
Compare
Choose a tag to compare

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.
    • 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.
  • 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
  • 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 (?:).
  • Incremental DOM 0.5.0 → 0.5.2
  • 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

12 Nov 03:17
Compare
Choose a tag to compare

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

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

05 Sep 22:28
Compare
Choose a tag to compare

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

Bug Fixes

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 and closure_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
  • 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

22 Jul 21:06
Compare
Choose a tag to compare

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
  • 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) with setActiveDelegatePackageSelector(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

16 Jul 22:47
Compare
Choose a tag to compare

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.

  • Fix bug in closure_js_deps bug with external paths b5bb87e
  • Implement the correct behavior for runfiles and add data attributes a59f290
  • Don't download large tarballs for other platforms unless necessary 577cee9
  • Recommend http_archive rather than git_repository for installation 0e3eade

Closure Rules v0.2.3

07 Jul 21:06
Compare
Choose a tag to compare

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

27 Jun 23:51
Compare
Choose a tag to compare
  • 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

07 Jun 17:19
Compare
Choose a tag to compare

This is primarily a bug fix release.

Fixes

  • Automatically export testing functions if testonly. See change.

Features

  • Some ClangFormat support (contributed by @hochhaus)
  • Colorized error messages

Closure Rules v0.2.0

02 Jun 00:27
Compare
Choose a tag to compare

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, pass compilation_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 use goog.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

New Features

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

Closure Rules v0.1.0

17 May 02:41
Compare
Choose a tag to compare

This release brings Closure Rules to a level of quality that it's now been adopted by a 100k+ LOC codebase. Most of the missing features have been implemented. Most of the bugs have been hammered out.

However Closure Rules should still be considered alpha because we're not yet ready to finalize its design. The definitions of rules may change; but if they do, we'll make note of that in the release.

New Features

  • closure_js_library now does syntax checking and linting. Therefore closure_js_check_test and closure_js_lint_test have been removed. The behavior of the linter can be controlled with the suppress flag. See the README.
  • JS rules can now depend on CSS rules for class name minification. When a JS binary is produced, it will reconcile its transitive closure with that of the CSS binary to pinpoint errors. However goog.getCssName() calls are not yet validated by the linter; that comes in the next release.
  • New entry_points attribute for closure_js_binary.
  • Ability to omit dependencies in closure_repositories()
  • Closure Library base.js is now a dependency of all closure_js_library rules by default. Use the no_closure_library flag to disable this.
  • CSS orientation flipping with graph validation.
  • closure_js_binary rules can now be referenced as though they're closure_js_library rules.
  • closure_css_binary rules can now be referenced as though they're closure_css_library rules.

Bug Fixes

  • ES6 modules now work.
  • closure_js_deps now works. It now only produces the deps-runfiles.js type of output, which is now just called deps.js.
  • The exports attribute now works.
  • Most bugs referencing from an external repository have been ironed out. If you see an error running depswriter.py then just add workspace(name="foo") to the top of your WORKSPACE file.

Upstream Versions

  • Closure Compiler v20160315
  • Closure Library v20160315
  • Closure Stylesheets 20160212
  • Closure Templates 2016-01-12
  • PhantomJS 2.1.1