diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000000..87ed6103d3 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @alexeagle @soldair @gregmagolan @gkdn @jDramaix diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d7c24dfbc9..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,46 +0,0 @@ -# trusty beta image has jdk8, gcc4.8.4 -dist: trusty -sudo: required -# xcode8 has jdk8 -osx_image: xcode8 -# Not technically required but suppresses 'Ruby' in Job status message. -language: java - -os: - - linux - - osx - -env: - - BAZEL=0.22.0 - -before_install: - - | - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then - OS=darwin - else - sysctl kernel.unprivileged_userns_clone=1 - OS=linux - fi - wget -O install.sh "https://github.com/bazelbuild/bazel/releases/download/${BAZEL}/bazel-${BAZEL}-installer-${OS}-x86_64.sh" - chmod +x install.sh - ./install.sh --user - rm -f install.sh - -script: - - | - bazel \ - --output_base=$HOME/.cache/bazel \ - --host_jvm_args=-Xmx500m \ - --host_jvm_args=-Xms500m \ - test \ - --worker_verbose \ - --verbose_failures \ - --test_output=errors \ - --strategy=Genrule=sandboxed \ - --spawn_strategy=sandboxed \ - --worker_sandboxing \ - --local_resources=400,2,1.0 \ - ... - -notifications: - email: false diff --git a/CODEOWNERS b/CODEOWNERS deleted file mode 100644 index ee4259ccd5..0000000000 --- a/CODEOWNERS +++ /dev/null @@ -1 +0,0 @@ -* @dslomov @laurentlb diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 00ae97a961..879771035d 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -13,3 +13,6 @@ Justine Tunney Kamil Jiwa Andy Hochhaus Paul Johnston +Yannic Bonenberger +Rob Figueroa +Sam Gammon diff --git a/README.md b/README.md index fb1a1f5849..07369a797e 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,8 @@ JavaScript | Templating | Stylesheets | Miscellaneous --- | --- | --- | --- [closure_js_library] | [closure_js_template_library] | [closure_css_library] | [closure_js_proto_library] [closure_js_binary] | [closure_java_template_library] | [closure_css_binary] | [phantomjs_test] -[closure_js_deps] | [closure_py_template_library] | | [closure_proto_library] \(Experimental\) -[closure_js_test] | | | [closure_grpc_web_library] \(Experimental\) +[closure_js_test] | [closure_py_template_library] | | [closure_proto_library] \(Experimental\) +| | | | [closure_grpc_web_library] \(Experimental\) ## Overview @@ -69,22 +69,22 @@ notes. First you must [install Bazel]. Then you add the following to your `WORKSPACE` file: -```python +```starlark load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "io_bazel_rules_closure", - sha256 = "a80acb69c63d5f6437b099c111480a4493bad4592015af2127a2f49fb7512d8d", - strip_prefix = "rules_closure-0.7.0", + sha256 = "7d206c2383811f378a5ef03f4aacbcf5f47fd8650f6abbc3fa89f3a27dd8b176", + strip_prefix = "rules_closure-0.10.0", urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/rules_closure/archive/0.7.0.tar.gz", - "https://github.com/bazelbuild/rules_closure/archive/0.7.0.tar.gz", + "https://mirror.bazel.build/github.com/bazelbuild/rules_closure/archive/0.10.0.tar.gz", + "https://github.com/bazelbuild/rules_closure/archive/0.10.0.tar.gz", ], ) -load("@io_bazel_rules_closure//closure:defs.bzl", "closure_repositories") - -closure_repositories() +load("@io_bazel_rules_closure//closure:repositories.bzl", "rules_closure_dependencies", "rules_closure_toolchains") +rules_closure_dependencies() +rules_closure_toolchains() ``` You are not required to install the Closure Tools, PhantomJS, or anything else @@ -92,26 +92,23 @@ for that matter; they will be fetched automatically by Bazel. ### Overriding Dependency Versions -When you call `closure_repositories()` in your `WORKSPACE` file, it causes a +When you call `rules_closure_dependencies()` in your `WORKSPACE` file, it causes a few dozen external dependencies to be added to your project, e.g. Guava, Guice, JSR305, etc. You might need to customize this behavior. To override the version of any dependency, modify your `WORKSPACE` file to pass -`omit_=True` to `closure_repositories()`. Next define your +`omit_=True` to `rules_closure_dependencies()`. Next define your custom dependency version. A full list of dependencies is available from [repositories.bzl]. For example, to override the version of Guava: -```python -load( - "@io_bazel_rules_closure//closure:defs.bzl", - "closure_repositories", - "java_import_external", -) - -closure_repositories( +```starlark +load("@io_bazel_rules_closure//closure:repositories.bzl", "rules_closure_dependencies", "rules_closure_toolchains") +rules_closure_dependencies( omit_com_google_guava=True, ) +rules_closure_toolchains() +load("@bazel_tools//tools/build_defs/repo:java.bzl", "java_import_external") java_import_external( name = "com_google_guava", licenses = ["notice"], # Apache 2.0 @@ -133,7 +130,6 @@ Please see the test directories within this project for concrete examples of usa - [//closure/testing/test](https://github.com/bazelbuild/rules_closure/tree/master/closure/testing/test) - [//closure/compiler/test](https://github.com/bazelbuild/rules_closure/tree/master/closure/compiler/test) -- [//closure/library/test](https://github.com/bazelbuild/rules_closure/tree/master/closure/library/test) - [//closure/templates/test](https://github.com/bazelbuild/rules_closure/tree/master/closure/templates/test) - [//closure/stylesheets/test](https://github.com/bazelbuild/rules_closure/tree/master/closure/stylesheets/test) - [//closure/protobuf/test](https://github.com/bazelbuild/rules_closure/tree/master/closure/protobuf/test) @@ -144,7 +140,7 @@ Please see the test directories within this project for concrete examples of usa ## closure\_js\_library -```python +```starlark load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_library") closure_js_library(name, srcs, data, deps, exports, suppress, convention, no_closure_library) @@ -245,7 +241,7 @@ This rule can be referenced as though it were the following: ## closure\_js\_binary -```python +```starlark load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_binary") closure_js_binary(name, deps, css, debug, language, entry_points, dependency_mode, compilation_level, formatting, @@ -332,7 +328,7 @@ This rule can be referenced as though it were the following: - `WHITESPACE_ONLY`: Tells the Closure Compiler to strip whitespace and comments. Transpilation between languages will still work. Type checking - becomes disabled. No symbols will not be renamed. Nothing will be inlined. + becomes disabled. No symbols will be renamed. Nothing will be inlined. Dependency statements will not be removed. **ProTip:** If you're using the Closure Library, you'll need to look into the `CLOSURE_NO_DEPS` and `goog.ENABLE_DEBUG_LOADER` options in order to execute the compiled output.) @@ -367,7 +363,7 @@ When compiling AngularJS applications, you need to pass custom flags to the Closure Compiler. This can be accomplished by adding the following to your [closure_js_binary] rule: -```python +```starlark closure_js_binary( # ... defs = [ @@ -379,7 +375,7 @@ closure_js_binary( ## closure\_js\_test -```python +```starlark load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_test") closure_js_test(name, srcs, data, deps, css, html, language, suppress, compilation_level, entry_points, defs) @@ -428,8 +424,7 @@ This rule can be referenced as though it were the following: register test functions. - **deps:** (List of [labels]; optional) Direct dependency list passed along to - [closure_js_library]. This list will almost certainly need - `"@io_bazel_rules_closure//closure/library:testing"`. + [closure_js_library]. - **data:** (List of [labels]; optional) Passed to [closure_js_library]. @@ -452,7 +447,7 @@ This rule can be referenced as though it were the following: ## phantomjs\_test -```python +```starlark load("@io_bazel_rules_closure//closure:defs.bzl", "phantomjs_test") phantomjs_test(name, data, deps, html, harness, runner) ``` @@ -498,56 +493,9 @@ This rule can be referenced as though it were the following: to report the result to the `harness`. -## closure\_js\_deps - -```python -load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_deps") -closure_js_deps(name, deps) -``` - -Generates a dependency file, for an application using the Closure Library. - -Generating this file is necessary for running an application in raw sources -mode, because it tells the Closure Library how to load namespaces from the web -server that are requested by `goog.require()`. - -For example, if you've made your source runfiles available under a protected -admin-only path named `/filez/`, then raw source mode could be used as follows: - -```html - - - - -``` - -#### Implicit Output Targets - -- *name*.js: A JavaScript source file containing `goog.addDependency()` - statements which map Closure Library namespaces to JavaScript source paths. - Each path is expressed relative to the location of the Closure Library - [base.js] file. - -#### Rule Polymorphism - -This rule can be referenced as though it were the following: - -- [filegroup]: `srcs` will be the deps.js output files and `data` will contain - that file in addition to all transitive JS sources and data. - -### Arguments - -- **name:** ([Name]; required) A unique name for this rule. Convention states - that this be `"deps"`. - -- **deps:** (List of [labels]; required) List of [closure_js_library] and - [closure_js_template_library] targets which define all JavaScript sources in - your application. - - ## closure\_js\_template\_library -```python +```starlark load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_template_library") closure_js_template_library(name, srcs, data, deps, globals, plugin_modules, should_generate_js_doc, @@ -634,7 +582,7 @@ This rule can be referenced as though it were the following: ## closure\_java\_template\_library -```python +```starlark load("@io_bazel_rules_closure//closure:defs.bzl", "closure_java_template_library") closure_java_template_library(name, srcs, data, deps, java_package) ``` @@ -699,7 +647,7 @@ TODO ## closure\_css\_library -```python +```starlark load("@io_bazel_rules_closure//closure:defs.bzl", "closure_css_library") closure_css_library(name, srcs, data, deps) ``` @@ -763,7 +711,7 @@ This rule can be referenced as though it were the following: ## closure\_css\_binary -```python +```starlark load("@io_bazel_rules_closure//closure:defs.bzl", "closure_css_binary") closure_css_binary(name, deps, renaming, debug, defs) ``` @@ -872,7 +820,7 @@ This rule can be referenced as though it were the following: ## closure\_js\_proto\_library -```python +```starlark load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_proto_library") closure_js_proto_library(name, srcs, add_require_for_enums, binary, import_style) @@ -929,7 +877,7 @@ This rule can be referenced as though it were the following: ## closure\_proto\_library -```python +```starlark load("@io_bazel_rules_closure//closure:defs.bzl", "closure_proto_library") closure_proto_library(name, deps) ``` @@ -976,7 +924,6 @@ This rule can be referenced as though it were the following: [closure_grpc_web_library]: https://github.com/grpc/grpc-web/blob/9b7b2d5411c486aa646ba2491cfd894d5352775b/bazel/closure_grpc_web_library.bzl#L149 [closure_java_template_library]: #closure_java_template_library [closure_js_binary]: #closure_js_binary -[closure_js_deps]: #closure_js_deps [closure_js_library]: #closure_js_library [closure_js_proto_library]: #closure_js_proto_library [closure_js_template_library]: #closure_js_template_library diff --git a/WORKSPACE b/WORKSPACE index c1a902e016..f918cb9208 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -1,24 +1,17 @@ workspace(name = "io_bazel_rules_closure") +load("@bazel_tools//tools/build_defs/repo:java.bzl", "java_import_external") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -load("//closure/private:java_import_external.bzl", "java_import_external") -load("//closure:repositories.bzl", "closure_repositories") -closure_repositories() - -http_archive( - name = "zlib", - build_file = "//:third_party/zlib.BUILD", - sha256 = "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1", - strip_prefix = "zlib-1.2.11", - urls = ["https://zlib.net/zlib-1.2.11.tar.gz"], -) +load("@io_bazel_rules_closure//closure:repositories.bzl", "rules_closure_dependencies", "rules_closure_toolchains") +rules_closure_dependencies() +rules_closure_toolchains() http_archive( name = "bazel_skylib", - sha256 = "bbccf674aa441c266df9894182d80de104cabd19be98be002f6d478aaa31574d", - strip_prefix = "bazel-skylib-2169ae1c374aab4a09aa90e65efe1a3aad4e279b", - urls = ["https://github.com/bazelbuild/bazel-skylib/archive/2169ae1c374aab4a09aa90e65efe1a3aad4e279b.tar.gz"], + sha256 = "7ac0fa88c0c4ad6f5b9ffb5e09ef81e235492c873659e6bb99efb89d11246bcb", + strip_prefix = "bazel-skylib-1.0.3", + urls = ["https://github.com/bazelbuild/bazel-skylib/archive/1.0.3.tar.gz"], ) java_import_external( @@ -131,7 +124,7 @@ java_import_external( jar_sha256 = "0f7dced2a16e55a77e44fc3ff9c5be98d4bf4bb30abc18d78ffd735df950a69f", jar_urls = [ "https://mirror.bazel.build/repo1.maven.org/maven2/com/google/truth/truth/0.45/truth-0.45.jar", - "http://repo1.maven.org/maven2/com/google/truth/truth/0.45/truth-0.45.jar", + "https://repo1.maven.org/maven2/com/google/truth/truth/0.45/truth-0.45.jar", "http://maven.ibiblio.org/maven2/com/google/truth/truth/0.45/truth-0.45.jar", ], licenses = ["notice"], # Apache 2.0 diff --git a/closure/compiler/BUILD b/closure/compiler/BUILD index 2115a48fed..46c255e3bf 100644 --- a/closure/compiler/BUILD +++ b/closure/compiler/BUILD @@ -16,7 +16,18 @@ package(default_visibility = ["//visibility:public"]) licenses(["notice"]) # Apache 2.0 +load("@rules_java//java:defs.bzl", "java_library") +load("@bazel_skylib//:bzl_library.bzl", "bzl_library") + java_library( name = "compiler", exports = ["@com_google_javascript_closure_compiler"], ) + +bzl_library( + name = "compiler_bzl", + srcs = glob(["*.bzl"]), + deps = [ + "//closure/private:defs_bzl", + ], +) diff --git a/closure/compiler/closure_base_js_library.bzl b/closure/compiler/closure_base_js_library.bzl new file mode 100644 index 0000000000..9f1c3a3478 --- /dev/null +++ b/closure/compiler/closure_base_js_library.bzl @@ -0,0 +1,35 @@ +# Copyright 2019 The Closure Rules Authors. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Internal-only build definition for a Closure JS library containing Closure base.""" + +load("//closure/compiler:closure_js_library.bzl", "create_closure_js_library") +load("//closure/private:defs.bzl", "CLOSURE_WORKER_ATTR", "JS_FILE_TYPE", "UNUSABLE_TYPE_DEFINITION") + +def _closure_base_js_library(ctx): + if not ctx.files.srcs: + fail("Must provide sources") + + return create_closure_js_library(ctx, ctx.files.srcs) + +# Only usable to create a closure js library for base.js +closure_base_js_library = rule( + implementation = _closure_base_js_library, + attrs = { + "srcs": attr.label_list(allow_files = JS_FILE_TYPE + [".d.ts"]), + # Leave empty to avoid circular dependencies + "_closure_library_base": attr.label_list(default = []), + "_unusable_type_definition": UNUSABLE_TYPE_DEFINITION, + }, +) diff --git a/closure/compiler/closure_js_aspect.bzl b/closure/compiler/closure_js_aspect.bzl index 1e0ea0020f..8b18187a59 100644 --- a/closure/compiler/closure_js_aspect.bzl +++ b/closure/compiler/closure_js_aspect.bzl @@ -14,7 +14,6 @@ load( "//closure/private:defs.bzl", - "CLOSURE_WORKER_ATTR", "JS_FILE_TYPE", "collect_js", "collect_runfiles", @@ -37,5 +36,4 @@ def _closure_js_aspect_impl(target, ctx): closure_js_aspect = aspect( implementation = _closure_js_aspect_impl, attr_aspects = ["deps", "sticky_deps", "exports"], - attrs = {"_ClosureWorkerAspect": CLOSURE_WORKER_ATTR}, ) diff --git a/closure/compiler/closure_js_binary.bzl b/closure/compiler/closure_js_binary.bzl index 93c0f1a41e..8232800d13 100644 --- a/closure/compiler/closure_js_binary.bzl +++ b/closure/compiler/closure_js_binary.bzl @@ -23,9 +23,7 @@ load( "collect_js", "collect_runfiles", "difference", - "find_js_module_roots", "get_jsfile_path", - "sort_roots", "unfurl", ) load( @@ -33,6 +31,49 @@ load( "closure_js_aspect", ) +default_ts_suppress = [ + "checkTypes", + "strictCheckTypes", + "reportUnknownTypes", + "analyzerChecks", + # "JSC_EXTRA_REQUIRE_WARNING", + "unusedLocalVariables", + "underscore", +] + +_dependency_mode_warning = '\n'.join([ + "{target}: dependency_mode={old_mode} is deprecated and will be " + + "removed soon; prefer to use its equivalent {new_mode}.", + "", + " ** You can use the following buildozer command:", + "buildozer 'set dependency_mode \"{new_mode}\"' {target}", +]) + +def _get_dependency_mode_flag(target, attr): + if attr == "LOOSE": + print(_dependency_mode_warning.format( + target = str(target), + old_mode = "LOOSE", + new_mode = "PRUNE_LEGACY", + )) + return "PRUNE_LEGACY" + if attr == "STRICT": + print(_dependency_mode_warning.format( + target = str(target), + old_mode = "STRICT", + new_mode = "PRUNE", + )) + return "PRUNE" + return attr + +def _get_src_path(f): + path = get_jsfile_path(f) + if path != None: + if f.extension == "zip": + return ["--jszip", path] + return path + return None + def _impl(ctx): if not ctx.attr.deps: fail("closure_js_binary rules can not have an empty 'deps' list") @@ -46,17 +87,24 @@ def _impl(ctx): )) deps = unfurl(ctx.attr.deps, provider = "closure_js_library") - js = collect_js(deps, ctx.files._closure_library_base, css = ctx.attr.css) + js = collect_js(deps, ctx.attr._closure_library_base, css = ctx.attr.css) if not js.srcs: fail("There are no JS source files in the transitive closure") _validate_css_graph(ctx, js) + sourcemap = None + # This is the list of files we'll be generating. - outputs = [ctx.outputs.bin, ctx.outputs.map, ctx.outputs.stderr] + outputs = [ctx.outputs.bin] # This is the subset of that list we'll report to parent rules. - files = [ctx.outputs.bin, ctx.outputs.map] + files = [ctx.outputs.bin] + + if ctx.attr.compilation_level != 'BUNDLE': + sourcemap = ctx.actions.declare_file(ctx.label.name+".js.map",sibling = ctx.outputs.bin) + outputs.append(sourcemap) + files.append(sourcemap) # JsCompiler is thin veneer over the Closure compiler. It's configured with a # superset of its flags. It introduces a private testing API, allows per-file @@ -64,13 +112,9 @@ def _impl(ctx): # error messages. inputs = [] args = [ - "JsCompiler", + "--platform=native", "--js_output_file", ctx.outputs.bin.path, - "--create_source_map", - ctx.outputs.map.path, - "--output_errors", - ctx.outputs.stderr.path, "--language_in", JS_LANGUAGE_IN, "--language_out", @@ -78,7 +122,7 @@ def _impl(ctx): "--compilation_level", ctx.attr.compilation_level, "--dependency_mode", - ctx.attr.dependency_mode, + _get_dependency_mode_flag(ctx.label, ctx.attr.dependency_mode), "--warning_level", ctx.attr.warning_level, "--generate_exports", @@ -87,45 +131,13 @@ def _impl(ctx): "--hide_warnings_for=closure/goog/base.js", ] + if sourcemap: + args.append("--create_source_map") + args.append(sourcemap.path) + if not ctx.attr.debug: args.append("--define=goog.DEBUG=false") - # These ClosureJsLibrary protocol buffers contain information about which - # errors should be suppressed in which files. - for info in js.infos.to_list(): - args.append("--info") - args.append(info.path) - inputs.append(info) - - # We want to test the failure conditions of the compiler from within Bazel, - # rather than from a system on top of Bazel like shell scripts. In order to - # do that, we need a way to toggle the return status of the process. - if ctx.attr.internal_expect_failure: - args.append("--expect_failure") - if ctx.attr.internal_expect_warnings: - args.append("--expect_warnings") - - # We need to help the Closure Compiler turn these weird Bazel paths into - # proper ES6 module names. So we give it all the directory prefixes that - # should be cut off. These are basically the same thing as C++ include dirs, - # except unlike C++ there's no I/O operation penalty to using them since all - # source paths that exist are being passed as flags. - js_module_roots = sort_roots( - depset(transitive = [ - find_js_module_roots( - [ctx.outputs.bin], - ctx.workspace_name, - ctx.label, - getattr(ctx.attr, "includes", []), - ), - js.js_module_roots, - ]), - ) - - for root in js_module_roots: - args.append("--js_module_root") - args.append(root) - # For the sake of simplicity we're going to assume that the sourcemap file is # stored within the same directory as the compiled JS binary; therefore, the # JSON sourcemap file should cite that file as relative to itself. @@ -136,21 +148,6 @@ def _impl(ctx): # can be disabled with the nodefs attribute. args.append("--source_map_include_content") - # We still need to map the source files to paths on the web server. We're - # going to use absolute paths relative to the root of the repository. For - # example if the label is //foo/bar:lol.js then it will be /foo/bar/lol.js on - # the web server, even if lol.js is generated. If the label is @a//b:c.js - # then that will be /b/c.js on the web server. The only exception is when the - # includes attribute has been used, in which case, directory prefixes may be - # cut off. - args.append("--source_map_location_mapping") - args.append(" [synthetic:| [synthetic:") - for root in js_module_roots: - args.append("--source_map_location_mapping") - args.append("%s/|/" % (root)) - args.append("--source_map_location_mapping") - args.append("|/") - # Some flags we're merely pass along as-is from our attributes. if ctx.attr.formatting: args.append("--formatting") @@ -161,21 +158,19 @@ def _impl(ctx): args.append("--entry_point") args.append(entry_point) - # It would be quite onerous to put an /** @export */ and entry_point on every - # single testFoo, setUp, and tearDown function. This undocumented flag is a - # godsend for testing in ADVANCED mode that releases us from this toil. - if ctx.attr.testonly: - args.append("--export_test_functions") - # Those who write JavaScript on the hardest difficulty setting shall be # rewarded accordingly. if ctx.attr.compilation_level == "ADVANCED": args.append("--use_types_for_optimization") if ctx.attr.output_wrapper: - args.append("--output_wrapper=" + ctx.attr.output_wrapper) + output_wrapper_file = ctx.actions.declare_file(ctx.attr.name + "_output_wrapper_file") + ctx.actions.write(output = output_wrapper_file, content = ctx.attr.output_wrapper) + inputs.append(output_wrapper_file) + args.append("--output_wrapper_file=" + output_wrapper_file.path) if ctx.attr.output_wrapper == "(function(){%output%}).call(this);": args.append("--assume_function_wrapper") + if ctx.outputs.property_renaming_report: report = ctx.outputs.property_renaming_report files.append(report) @@ -192,8 +187,8 @@ def _impl(ctx): # It is better to put a suppress code on the closure_js_library rule that # defined the source responsible for an error. We provide an escape hatch for # situations in which that would be unfeasible or burdensome. - for code in ctx.attr.suppress_on_all_sources_in_transitive_closure: - args.append("--suppress") + for code in ctx.attr.suppress_on_all_sources_in_transitive_closure+default_ts_suppress: + args.append("--jscomp_off") args.append(code) # In order for us to feel comfortable creating an optimal experience for 99% @@ -207,15 +202,12 @@ def _impl(ctx): all_args.add_all(args) # We shall now pass all transitive sources, including externs files. - for src in js.srcs.to_list(): - inputs.append(src) - if src.path.endswith(".zip"): - all_args.add("--jszip") - all_args.add_all( - [src], - map_each = get_jsfile_path, - expand_directories = True, - ) + all_args.add_all( + js.srcs, + map_each = _get_src_path, + expand_directories = True, + ) + inputs.extend(js.srcs.to_list()) # As a matter of policy, we don't add attributes to this rule just because we # can. We only add attributes when the Skylark code adds value beyond merely @@ -228,15 +220,13 @@ def _impl(ctx): # Insert an edge into the build graph that produces the minified version of # all JavaScript sources in the transitive closure, sans dead code. - all_args.use_param_file("@@%s", use_always = True) - all_args.set_param_file_format("multiline") + ctx.actions.run( inputs = inputs, outputs = outputs, - executable = ctx.executable._ClosureWorker, + executable = ctx.executable._google_closure_compiler, arguments = [all_args], mnemonic = "Closure", - execution_requirements = {"supports-workers": "1"}, progress_message = "Compiling %d JavaScript files to %s" % ( len(js.srcs.to_list()), ctx.outputs.bin.short_path, @@ -252,7 +242,7 @@ def _impl(ctx): closure_js_library = js, closure_js_binary = struct( bin = ctx.outputs.bin, - map = ctx.outputs.map, + map = sourcemap, language = ctx.attr.language, ), runfiles = ctx.runfiles( @@ -284,9 +274,19 @@ closure_js_binary = rule( "css": attr.label(providers = ["closure_css_binary"]), "debug": attr.bool(default = False), "defs": attr.string_list(), - "dependency_mode": attr.string(default = "LOOSE"), + # TODO(tjgq): Remove the deprecated STRICT/LOOSE in favor of PRUNE/PRUNE_LEGACY. + "dependency_mode": attr.string( + default = "PRUNE_LEGACY", + values = [ + "NONE", + "SORT_ONLY", + "LOOSE", + "STRICT", + "PRUNE", + "PRUNE_LEGACY", + ], + ), "deps": attr.label_list( - aspects = [closure_js_aspect], providers = ["closure_js_library"], ), "entry_points": attr.string_list(), @@ -303,10 +303,15 @@ closure_js_binary = rule( # internal only "internal_expect_failure": attr.bool(default = False), "internal_expect_warnings": attr.bool(default = False), + "_google_closure_compiler": attr.label( + default = Label( + "@npm//google-closure-compiler/bin:google-closure-compiler", + ), + executable = True, + cfg = "host", + ), }, **CLOSURE_JS_TOOLCHAIN_ATTRS), outputs = { "bin": "%{name}.js", - "map": "%{name}.js.map", - "stderr": "%{name}-stderr.txt", }, ) diff --git a/closure/compiler/closure_js_deps.bzl b/closure/compiler/closure_js_deps.bzl deleted file mode 100644 index a755e7fc43..0000000000 --- a/closure/compiler/closure_js_deps.bzl +++ /dev/null @@ -1,110 +0,0 @@ -# Copyright 2016 The Closure Rules Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Build definitions for JavaScript dependency files.""" - -load( - "//closure/private:defs.bzl", - "CLOSURE_LIBRARY_BASE_ATTR", - "collect_js", - "collect_runfiles", - "long_path", - "unfurl", -) - -def _impl(ctx): - deps = unfurl(ctx.attr.deps, provider = "closure_js_library") - js = collect_js(deps) - closure_root = _dirname(long_path(ctx, ctx.files._closure_library_base[0])) - closure_rel = "/".join([".." for _ in range(len(closure_root.split("/")))]) - outputs = [ctx.outputs.out] - - # XXX: Other files in same directory will get schlepped in w/o sandboxing. - ctx.actions.run( - inputs = list(js.srcs.to_list()), - outputs = outputs, - arguments = (["--output_file=%s" % ctx.outputs.out.path] + - [ - "--root_with_prefix=%s %s" % ( - r, - _make_prefix(p, closure_root, closure_rel), - ) - for r, p in _find_roots( - [ - ( - src.dirname if not src.is_directory else src.path, - long_path(ctx, src) if not src.is_directory else (src.path + "/null.js"), - ) - for src in js.srcs.to_list() - ], - ) - ]), - executable = ctx.executable._depswriter, - progress_message = "Calculating %d JavaScript deps to %s" % ( - len(js.srcs.to_list()), - ctx.outputs.out.short_path, - ), - ) - return struct( - files = depset(outputs), - runfiles = ctx.runfiles( - files = outputs + ctx.files.data, - transitive_files = depset( - ctx.files._closure_library_base, - transitive = [collect_runfiles(deps), collect_runfiles(ctx.attr.data)], - ), - ), - ) - -def _dirname(path): - return path[:path.rindex("/")] - -def _find_roots(dirs): - roots = {} - for _, d, p in sorted([(len(d.split("/")), d, p) for d, p in dirs]): - parts = d.split("/") - want = True - for i in range(len(parts)): - if "/".join(parts[:i + 1]) in roots: - want = False - break - if want: - roots[d] = p - return roots.items() - -def _make_prefix(prefix, closure_root, closure_rel): - prefix = "/".join(prefix.split("/")[:-1]) - if not prefix: - return closure_rel - elif prefix == closure_root: - return "." - elif prefix.startswith(closure_root + "/"): - return prefix[len(closure_root) + 1:] - else: - return closure_rel + "/" + prefix - -closure_js_deps = rule( - implementation = _impl, - attrs = { - "deps": attr.label_list(), - "data": attr.label_list(allow_files = True), - "_closure_library_base": CLOSURE_LIBRARY_BASE_ATTR, - "_depswriter": attr.label( - default = Label("@com_google_javascript_closure_library//:depswriter"), - executable = True, - cfg = "host", - ), - }, - outputs = {"out": "%{name}.js"}, -) diff --git a/closure/compiler/closure_js_library.bzl b/closure/compiler/closure_js_library.bzl index e3cc3892e8..1d90052776 100644 --- a/closure/compiler/closure_js_library.bzl +++ b/closure/compiler/closure_js_library.bzl @@ -21,23 +21,9 @@ load( "JS_LANGUAGE_IN", "collect_js", "collect_runfiles", - "convert_path_to_es6_module_name", - "create_argfile", - "find_js_module_roots", - "library_level_checks", - "make_jschecker_progress_message", - "sort_roots", "unfurl", ) -load( - "//closure/compiler:closure_js_aspect.bzl", - "closure_js_aspect", -) - -def _maybe_declare_file(actions, file, name): - if file: - return file - return actions.declare_file(name) +load("@build_bazel_rules_nodejs//:providers.bzl", "DeclarationInfo", "declaration_info") def create_closure_js_library( ctx, @@ -72,16 +58,14 @@ def create_closure_js_library( A closure_js_library metadata struct with exports and closure_js_library attribute """ - if not hasattr(ctx.files, "_ClosureWorker") or not hasattr(ctx.files, "_closure_library_base"): + if not hasattr(ctx.files, "_closure_library_base"): fail("Closure toolchain undefined; rule should include CLOSURE_JS_TOOLCHAIN_ATTRS") # testonly exist for all rules but if it is an aspect it need to accessed over ctx.rule. testonly = ctx.attr.testonly if hasattr(ctx.attr, "testonly") else ctx.rule.attr.testonly return _closure_js_library_impl( - ctx.actions, - ctx.label, - ctx.workspace_name, + ctx, srcs = srcs, deps = deps, exports = exports, @@ -89,22 +73,16 @@ def create_closure_js_library( lenient = lenient, convention = convention, testonly = testonly, - closure_library_base = ctx.files._closure_library_base, - closure_worker = ctx.executable._ClosureWorker, ) def _closure_js_library_impl( - actions, - label, - workspace_name, + ctx, srcs, deps, testonly, suppress, lenient, convention, - closure_library_base, - closure_worker, includes = (), exports = depset(), internal_descriptors = depset(), @@ -117,41 +95,18 @@ def _closure_js_library_impl( deprecated_stderr_file = None, deprecated_ijs_file = None, deprecated_typecheck_file = None): - # TODO(yannic): Figure out how to modify |find_js_module_roots| - # so that we won't need |workspace_name| anymore. + if not no_closure_library: + deps = deps + ctx.attr._closure_library_base - if lenient: - suppress = suppress + [ - "analyzerChecks", - "analyzerChecksInternal", - "deprecated", - "legacyGoogScopeRequire", - "lintChecks", - "missingOverride", - "reportUnknownTypes", - "strictCheckTypes", - "strictModuleChecks", - "superfluousSuppress", - "unnecessaryEscape", - "underscore", - ] + srcs_it = srcs + if type(srcs) == "depset": + srcs_it = srcs.to_list() - # TODO(yannic): Always use |actions.declare_file()|. - info_file = _maybe_declare_file( - actions, - deprecated_info_file, - "%s.pbtxt" % label.name, - ) - stderr_file = _maybe_declare_file( - actions, - deprecated_stderr_file, - "%s-stderr.txt" % label.name, - ) - ijs_file = _maybe_declare_file( - actions, - deprecated_ijs_file, - "%s.i.js" % label.name, - ) + dts_srcs = [f for f in srcs_it if f.path.endswith(".d.ts")] + srcs_it = [f for f in srcs_it if f.path.endswith(".js") or f.path.endswith(".mjs")] + + # don't pass protofire deps to declaration_info + declarations = declaration_info(depset(dts_srcs), [d for d in deps if type(d) != "struct"]) # Create a list of direct children of this rule. If any direct dependencies # have the exports attribute, those labels become direct dependencies here. @@ -159,7 +114,7 @@ def _closure_js_library_impl( # Collect all the transitive stuff the child rules have propagated. Bazel has # a special nested set data structure that makes this efficient. - js = collect_js(deps, closure_library_base, bool(srcs), no_closure_library) + js = collect_js(deps, bool(srcs), no_closure_library) # If closure_js_library depends on closure_css_library, that means # goog.getCssName() is being used in srcs to reference CSS names in the @@ -172,146 +127,15 @@ def _closure_js_library_impl( if hasattr(dep, "closure_css_library"): stylesheets.append(dep.label) - # JsChecker is a program that's run via the ClosureWorker persistent Bazel - # worker. This program is a modded version of the Closure Compiler. It does - # syntax checking and linting on the srcs files specified by this target, and - # only this target. It does not output a JS file, but it does output a - # ClosureJsLibrary protobuf info file with useful information extracted from - # the abstract syntax tree, such as provided namespaces. This information is - # propagated up to parent rules for strict dependency checking. It's also - # used by the Closure Compiler when producing the final JS binary. - args = [ - "JsChecker", - "--label", - str(label), - "--output", - info_file.path, - "--output_errors", - stderr_file.path, - "--output_ijs_file", - ijs_file.path, - "--convention", - convention, - ] - - # Because JsChecker is an edge in the build graph, we need to declare all of - # its input vertices. - inputs = [] - - # We want to test the failure conditions of this rule from within Bazel, - # rather than from a meta-system like shell scripts. In order to do that, we - # need a way to toggle the return status of the process. - if internal_expect_failure: - args.append("--expect_failure") - - # JsChecker wants to know if this is a testonly rule so it can throw an error - # if goog.setTestOnly() is used. - if testonly: - args.append("--testonly") - - # The suppress attribute is a Closure Rules feature that makes warnings and - # errors go away. It's a list of strings containing DiagnosticGroup (coarse - # grained) or DiagnosticType (fine grained) codes. These apply not only to - # JsChecker, but also propagate up to closure_js_binary. - for s in suppress: - args.append("--suppress") - args.append(s) - - # Pass source file paths to JsChecker. Under normal circumstances, these - # paths appear to be relative to the root of the repository. But they're - # actually relative to the ctx.action working directory, which is a folder - # full of symlinks generated by Bazel which point to the actual files. These - # paths might contain weird bazel-out/blah/external/ prefixes. These paths - # are by no means canonical and can change for a particular file based on - # where the ctx.action is located. - # TODO(davido): Find out how to avoid that hack - srcs_it = srcs - if type(srcs) == "depset": - srcs_it = srcs.to_list() - for f in srcs_it: - args.append("--src") - args.append(f.path) - inputs.append(f) - - # In order for JsChecker to turn weird Bazel paths into ES6 module names, we - # need to give it a list of path prefixes to strip. By default, the ES6 - # module name is the same as the filename relative to the root of the - # repository, ignoring the workspace name. The exception is when the includes - # attribute is being used, which chops the path down even further. - js_module_roots = sort_roots( - find_js_module_roots(srcs, workspace_name, label, includes), - ) - for root in js_module_roots: - args.append("--js_module_root") - args.append(root) - - # We keep track of ES6 module names so we can guarantee that no namespace - # collisions exist for any particular transitive closure. By making it - # canonical, we can use it to propagate suppressions up to closure_js_binary. - # TODO(davido): Find out how to avoid that hack - modules = [ - convert_path_to_es6_module_name( - f.path if not f.is_directory else f.path + "/*.js", - js_module_roots, - ) - for f in srcs_it - ] - for module in modules: - if module in js.modules.to_list(): - fail(("ES6 namespace '%s' already defined by a dependency. Check the " + - "deps transitively. Remember that namespaces are relative to the " + - "root of the repository unless includes=[...] is used") % module) - if len(modules) != len(depset(modules).to_list()): - fail("Intrarule namespace collision detected") - - # Give JsChecker the ClosureJsLibrary protobufs outputted by direct children. - for dep in deps: - # Polymorphic rules, e.g. closure_css_library, might not provide this. - info = getattr(dep.closure_js_library, "info", None) - if info: - args.append("--dep") - args.append(info.path) - inputs.append(info) - - # The list of flags could potentially be very long. So we're going to write - # them all to a file which gets loaded automatically by our BazelWorker - # middleware. - argfile = create_argfile(actions, label.name, args) - inputs.append(argfile) - - # Add a JsChecker edge to the build graph. The command itself will only be - # executed if something that requires its output is executed. - actions.run( - inputs = inputs, - outputs = [info_file, stderr_file, ijs_file], - executable = closure_worker, - arguments = ["@@" + argfile.path], - mnemonic = "Closure", - execution_requirements = {"supports-workers": "1"}, - progress_message = make_jschecker_progress_message(srcs, label), - ) - - library_level_checks( - actions = actions, - label = label, - ijs_deps = js.ijs_files, - srcs = srcs, - executable = closure_worker, - output = _maybe_declare_file( - actions, - deprecated_typecheck_file, - "%s_typecheck" % label.name, - ), - suppress = suppress, - internal_expect_failure = internal_expect_failure, - ) - if type(internal_descriptors) == "list": - internal_descriptors = depset(internal_descriptors) + internal_descriptors = depset(internal_descriptors.to_list()) + + direct_srcs = depset(srcs_it) + transitive_srcs = depset(srcs_it, transitive = [js.srcs]) # We now export providers to any parent Target. This is considered a public - # interface because other Skylark rules can be designed to do things with - # this data. Other Skylark rules can even export their own provider with the + # interface because other Starlark rules can be designed to do things with + # this data. Other Starlark rules can even export their own provider with the # same name to become polymorphically compatible with this one. return struct( # Iterable of deps that should only become deps in parent rules. @@ -339,16 +163,16 @@ def _closure_js_library_impl( # as well as information extracted from inside the srcs files, e.g. # goog.provide'd namespaces. It is used for strict dependency # checking, a.k.a. layering checks. - info = info_file, + info = None, # NestedSet of all info files in the transitive closure. This # is used by JsCompiler to apply error suppression on a file-by-file # basis. - infos = depset([info_file], transitive = [js.infos]), - ijs = ijs_file, - ijs_files = depset([ijs_file], transitive = [js.ijs_files]), + infos = depset(), + ijs = None, + ijs_files = depset(), # NestedSet of all JavaScript source File artifacts in the # transitive closure. These files MUST be JavaScript. - srcs = depset(srcs_it, transitive = [js.srcs]), + srcs = transitive_srcs, # NestedSet of all execroot path prefixes in the transitive # closure. For very simple projects, it will be empty. It is useful # for getting rid of Bazel generated directories, workspace names, @@ -356,13 +180,13 @@ def _closure_js_library_impl( # generated roots, external repository roots, and includes # prefixes. This is passed to JSCompiler via the --js_module_root # flag. See find_js_module_roots() in defs.bzl. - js_module_roots = depset(js_module_roots, transitive = [js.js_module_roots]), + js_module_roots = depset(), # NestedSet of all ES6 module name strings in the transitive # closure. These are generated from the source file path relative to # the longest matching root prefix. It is used to guarantee that # within any given transitive closure, no namespace collisions # exist. These MUST NOT begin with "/" or ".", or contain "..". - modules = depset(modules, transitive = [js.modules]), + modules = depset(), # NestedSet of all protobuf definitions in the transitive # closure. It is used so Closure Templates can have information about # the structure of protobufs so they can be easily rendered in .soy @@ -376,6 +200,13 @@ def _closure_js_library_impl( # of the srcs subprovider. This field exists for optimization. has_closure_library = js.has_closure_library, ), + typescript = struct( + es5_sources = direct_srcs, + es6_sources = direct_srcs, + transitive_es5_sources = transitive_srcs, + transitive_es6_sources = transitive_srcs, + ), + providers = [declarations], ) def _closure_js_library(ctx): @@ -396,28 +227,18 @@ def _closure_js_library(ctx): srcs = ctx.files.externs + srcs library = _closure_js_library_impl( - ctx.actions, - ctx.label, - ctx.workspace_name, - srcs, - ctx.attr.deps, - ctx.attr.testonly, - ctx.attr.suppress, - ctx.attr.lenient, - ctx.attr.convention, - ctx.files._closure_library_base, - ctx.executable._ClosureWorker, - getattr(ctx.attr, "includes", []), - ctx.attr.exports, - ctx.files.internal_descriptors, - ctx.attr.no_closure_library, - ctx.attr.internal_expect_failure, - - # Deprecated output files. - ctx.outputs.info, - ctx.outputs.stderr, - ctx.outputs.ijs, - ctx.outputs.typecheck, + ctx, + srcs = srcs, + deps = ctx.attr.deps, + testonly = ctx.attr.testonly, + suppress = ctx.attr.suppress, + lenient = ctx.attr.lenient, + convention = ctx.attr.convention, + includes = getattr(ctx.attr, "includes", []), + exports = ctx.attr.exports, + internal_descriptors = depset(ctx.files.internal_descriptors), + no_closure_library = ctx.attr.no_closure_library, + internal_expect_failure = ctx.attr.internal_expect_failure, ) return struct( @@ -428,7 +249,6 @@ def _closure_js_library(ctx): runfiles = ctx.runfiles( files = srcs + ctx.files.data, transitive_files = depset( - [] if ctx.attr.no_closure_library else ctx.files._closure_library_base, transitive = [ collect_runfiles(unfurl(ctx.attr.deps, provider = "closure_js_library")), collect_runfiles(ctx.attr.data), @@ -436,6 +256,7 @@ def _closure_js_library(ctx): ], ), ), + providers = library.providers, ) closure_js_library = rule( @@ -448,16 +269,14 @@ closure_js_library = rule( ), "data": attr.label_list(allow_files = True), "deps": attr.label_list( - aspects = [closure_js_aspect], providers = ["closure_js_library"], ), "exports": attr.label_list( - aspects = [closure_js_aspect], providers = ["closure_js_library"], ), "includes": attr.string_list(), "no_closure_library": attr.bool(), - "srcs": attr.label_list(allow_files = JS_FILE_TYPE), + "srcs": attr.label_list(allow_files = JS_FILE_TYPE + [".mjs", ".d.ts"]), "suppress": attr.string_list(), "lenient": attr.bool(), @@ -469,12 +288,5 @@ closure_js_library = rule( "internal_descriptors": attr.label_list(allow_files = True), "internal_expect_failure": attr.bool(default = False), }, **CLOSURE_JS_TOOLCHAIN_ATTRS), - # TODO(yannic): Deprecate. - # https://docs.bazel.build/versions/master/skylark/lib/globals.html#rule.outputs - outputs = { - "info": "%{name}.pbtxt", - "stderr": "%{name}-stderr.txt", - "ijs": "%{name}.i.js", - "typecheck": "%{name}_typecheck", # dummy output file - }, + provides = ["exports", "closure_js_library", DeclarationInfo], ) diff --git a/closure/compiler/test/BUILD b/closure/compiler/test/BUILD index c56cde6715..c2868a391c 100644 --- a/closure/compiler/test/BUILD +++ b/closure/compiler/test/BUILD @@ -17,13 +17,12 @@ package(default_testonly = True) licenses(["notice"]) # Apache 2.0 load("//closure/private:file_test.bzl", "file_test") -load("//closure/private:rule_test.bzl", "rule_test") -load("//closure:defs.bzl", "closure_js_binary") -load("//closure:defs.bzl", "closure_js_library") +load("//closure:defs.bzl", "closure_js_binary", "closure_js_library") closure_js_library( name = "hello_lib", srcs = ["hello.js"], + no_closure_library = True, ) closure_js_binary( @@ -39,15 +38,7 @@ file_test( file_test( name = "sourcemap_doesntContainWeirdBazelDirectories", - content = ("{\n" + - "\"version\":3,\n" + - "\"file\":\"hello_bin.js\",\n" + - "\"lineCount\":1,\n" + - "\"mappings\":\"AAgBAA,OAAAC,IAAA,CAAgB,aAAhB;\",\n" + - "\"sources\":[\"/closure/compiler/test/hello.js\"],\n" + - "\"sourcesContent\":[\"// Copyright 2016 The Closure Rules Authors. All rights reserved.\\n//\\n// Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n// you may not use this file except in compliance with the License.\\n// You may obtain a copy of the License at\\n//\\n// http://www.apache.org/licenses/LICENSE-2.0\\n//\\n// Unless required by applicable law or agreed to in writing, software\\n// distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n// See the License for the specific language governing permissions and\\n// limitations under the License.\\n\\n// hello world\\n\\nconsole . log ( 'hello world' ) ;\\n\"],\n" + - "\"names\":[\"console\",\"log\"]\n" + - "}\n"), + regexp = r'"sources":\["/closure/compiler/test/hello.js"\]', file = "hello_bin.js.map", ) @@ -73,28 +64,20 @@ file_test( file_test( name = "sourcemapWithWrapper_hasDifferentMappingCodes", - content = "{\n" + - "\"version\":3,\n" + - "\"file\":\"hello_wrap_bin.js\",\n" + - "\"lineCount\":1,\n" + - "\"mappings\":\"A,YAgBAA,OAAAC,IAAA,CAAgB,aAAhB;\",\n" + - "\"sources\":[\"/closure/compiler/test/hello.js\"],\n" + - "\"sourcesContent\":[\"// Copyright 2016 The Closure Rules Authors. All rights reserved.\\n//\\n// Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n// you may not use this file except in compliance with the License.\\n// You may obtain a copy of the License at\\n//\\n// http://www.apache.org/licenses/LICENSE-2.0\\n//\\n// Unless required by applicable law or agreed to in writing, software\\n// distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n// See the License for the specific language governing permissions and\\n// limitations under the License.\\n\\n// hello world\\n\\nconsole . log ( 'hello world' ) ;\\n\"],\n" + - "\"names\":[\"console\",\"log\"]\n" + - "}\n", + regexp = r'"mappings":"[A-Za-z,]\+;",', file = "hello_wrap_bin.js.map", ) closure_js_binary( - name = "hello_es5strict_bin", - language = "ECMASCRIPT5_STRICT", + name = "hello_strict_bin", + defs = ["--emit_use_strict=True"], deps = [":hello_lib"], ) file_test( - name = "strictOutputLanguage_addsUseStrict", + name = "emitUseString_addsUseStrict", content = "'use strict';console.log(\"hello world\");\n", - file = "hello_es5strict_bin.js", + file = "hello_strict_bin.js", ) closure_js_library( @@ -172,6 +155,18 @@ file_test( file = "hello_output_wrapper_dash_dash_space_bin.js", ) +closure_js_binary( + name = "multiline_output_wrapper_bin", + output_wrapper = "%output%\n//# sourceMappingURL=/app.js.map", + deps = [":empty_lib"], +) + +file_test( + name = "multiline_output_wrapper_test", + content = "\n//# sourceMappingURL=/app.js.map\n", + file = "multiline_output_wrapper_bin.js", +) + ################################################################################ # External definitions work diff --git a/closure/compiler/test/closure_js_deps/BUILD b/closure/compiler/test/closure_js_deps/BUILD deleted file mode 100644 index 4d1740ae2b..0000000000 --- a/closure/compiler/test/closure_js_deps/BUILD +++ /dev/null @@ -1,161 +0,0 @@ -# Copyright 2016 The Closure Rules Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -package(default_testonly = True) - -licenses(["notice"]) # Apache 2.0 - -load("//closure/private:file_test.bzl", "file_test") -load("//closure:defs.bzl", "closure_js_binary") -load("//closure:defs.bzl", "closure_js_deps") -load("//closure:defs.bzl", "closure_js_library") - -# This package tests the behavior of closure_js_deps. This package also tests -# the behavior runfiles with regard to closure_js_library, closure_js_binary, -# and closure_js_deps. -# -# The concepts of deps files and runfiles are intertwined. If one wishes to -# develop in raw sources mode, one needs a deps file. In order for a deps file -# to be useful, one must also assemble and serve the runfiles data=[...] it -# references. -# -# Filegroups should not needed to assemble the raw sources, because the closure -# rules themselves can behave like smart filegroups. The tests in this package -# demonstrate how the sources and data files propagate through them. -# -# tl;dr: java_binary() data attribute only needs to reference the deps rule. - -closure_js_library( - name = "external_library", - srcs = ["external_library.js"], -) - -closure_js_library( - name = "hyperion_lib", - srcs = ["hyperion.js"], - data = ["data1.txt"], - deps = [":external_library"], -) - -closure_js_deps( - name = "hyperion_deps", - deps = [":hyperion_lib"], -) - -file_test( - name = "noTransitiveDeps_containsSingleLineRelativeToClosureLibraryBaseJs", - file = "hyperion_deps.js", - regexp = "^goog.addDependency('.*closure/compiler/test/closure_js_deps/hyperion.js', \\['hyperion'\\], \\[\\], {});$", -) - -closure_js_library( - name = "goblin", - srcs = ["goblin.js"], - deps = ["//closure/library/dom"], -) - -closure_js_deps( - name = "goblin_deps", - deps = [":goblin"], -) - -file_test( - name = "module_usesTrueArgument", - file = "goblin_deps.js", - regexp = "^goog.addDependency('.*closure/compiler/test/closure_js_deps/goblin.js', \\['goblin'\\], \\['goog.dom'\\], {'module': 'goog'});$", -) - -file_test( - name = "googDomDependency_includesClosureLibraryStuffInDepsFile", - file = "goblin_deps.js", - regexp = "^goog.addDependency('\\./dom/dom\\.js', \\['goog\\.dom'", -) - -file_test( - name = "externs_dontGoInDepsFile", - file = "hyperion_deps.js", - invert = True, - regexp = "^external_library$", -) - -################################################################################ -# closure_js_deps() ingests sources transitively - -closure_js_library( - name = "hyperion2_lib", - srcs = ["hyperion2.js"], - data = ["data2.txt"], - deps = [":hyperion_lib"], -) - -closure_js_deps( - name = "hyperion2_deps", - data = ["data4.txt"], - deps = [":hyperion2_lib"], -) - -file_test( - name = "hasTransitiveDep_showsUpInDepsFile", - file = "hyperion2_deps.js", - regexp = "^goog.addDependency('.*closure/compiler/test/closure_js_deps/hyperion.js', \\['hyperion'\\], \\[\\], .*);$", -) - -################################################################################ -# srcs referencing closure_js_library() ingests nothing - -genrule( - name = "hyperion2_srcs", - srcs = [":hyperion2_lib"], - outs = ["hyperion2_srcs.txt"], - cmd = "echo -n $(SRCS) >$@", -) - -file_test( - name = "srcsReferencingJsLibrary_getsDirectSources", - content = "", - file = "hyperion2_srcs.txt", -) - -################################################################################ -# data referencing closure_js_deps() gives you the deps file AND the sauce - -sh_test( - name = "dataAttributeReferencingJsDeps_providesDepsFileSourcesAndData", - size = "small", - srcs = ["hyperion2_deps_runfiles_test.sh"], - data = [":hyperion2_deps"], -) - -################################################################################ -# srcs referencing closure_js_binary() gives only the binary - -closure_js_binary( - name = "hyperion2_bin", - data = ["data3.txt"], - entry_points = ["goog:hyperion2"], - deps = [":hyperion2_lib"], -) - -genrule( - name = "hyperion2_bin_srcs", - srcs = [":hyperion2_bin"], - outs = ["hyperion2_bin_srcs.txt"], - cmd = "echo -n $(SRCS) >$@", -) - -file_test( - name = "srcsReferencingJsBinary_getsJsBinaryAndMapNotData", - file = "hyperion2_bin_srcs.txt", - regexp = "^.*/closure/compiler/test/closure_js_deps/hyperion2_bin.js .*/closure/compiler/test/closure_js_deps/hyperion2_bin.js.map$", -) diff --git a/closure/compiler/test/closure_js_deps/data1.txt b/closure/compiler/test/closure_js_deps/data1.txt deleted file mode 100644 index ce01362503..0000000000 --- a/closure/compiler/test/closure_js_deps/data1.txt +++ /dev/null @@ -1 +0,0 @@ -hello diff --git a/closure/compiler/test/closure_js_deps/data2.txt b/closure/compiler/test/closure_js_deps/data2.txt deleted file mode 100644 index 30e8a65069..0000000000 --- a/closure/compiler/test/closure_js_deps/data2.txt +++ /dev/null @@ -1 +0,0 @@ -there diff --git a/closure/compiler/test/closure_js_deps/data3.txt b/closure/compiler/test/closure_js_deps/data3.txt deleted file mode 100644 index 00e6690f83..0000000000 --- a/closure/compiler/test/closure_js_deps/data3.txt +++ /dev/null @@ -1 +0,0 @@ -love diff --git a/closure/compiler/test/closure_js_deps/data4.txt b/closure/compiler/test/closure_js_deps/data4.txt deleted file mode 100644 index 50610a9792..0000000000 --- a/closure/compiler/test/closure_js_deps/data4.txt +++ /dev/null @@ -1 +0,0 @@ -forever diff --git a/closure/compiler/test/closure_js_deps/goblin.js b/closure/compiler/test/closure_js_deps/goblin.js deleted file mode 100644 index 54db8b02e0..0000000000 --- a/closure/compiler/test/closure_js_deps/goblin.js +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright 2016 The Closure Rules Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -goog.module('goblin'); - -var dom = goog.require('goog.dom'); - - -/** - * Morning and evening - * Maids heard the goblins cry: - * “Come buy our orchard fruits, - * Come buy, come buy: - * Apples and quinces, - * Lemons and oranges, - * Plump unpeck’d cherries, - * Melons and raspberries, - * Bloom-down-cheek’d peaches, - * Swart-headed mulberries, - * Wild free-born cranberries, - * Crab-apples, dewberries, - * Pine-apples, blackberries, - * Apricots, strawberries;— - * All ripe together - * In summer weather,— - * Morns that pass by, - * Fair eves that fly; - * Come buy, come buy: - * Our grapes fresh from the vine, - * Pomegranates full and fine, - * Dates and sharp bullaces, - * Rare pears and greengages, - * Damsons and bilberries, - * Taste them and try: - * Currants and gooseberries, - * Bright-fire-like barberries, - * Figs to fill your mouth, - * Citrons from the South, - * Sweet to tongue and sound to eye; - * Come buy, come buy.” - */ -function goblin() { - dom.getElement('goblin'); - console.log('Goblin Market by Christina Rossetti'); -} - - -exports = goblin; diff --git a/closure/compiler/test/closure_js_deps/hyperion.js b/closure/compiler/test/closure_js_deps/hyperion.js deleted file mode 100644 index 95fe18ba84..0000000000 --- a/closure/compiler/test/closure_js_deps/hyperion.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2016 The Closure Rules Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -goog.provide('hyperion'); - - -/** - * CANTO I - * - * Fanatics have their dreams, wherewith they weave - * A paradise for a sect; the savage too - * From forth the loftiest fashion of his sleep - * Guesses at Heaven; pity these have not - * Trac'd upon vellum or wild Indian leaf - * The shadows of melodious utterance. - * But bare of laurel they live, dream, and die; - * For Poesy alone can tell her dreams, - * With the fine spell of words alone can save - * Imagination from the sable charm - * And dumb enchantment. Who alive can say, - * 'Thou art no Poet may'st not tell thy dreams?' - * Since every man whose soul is not a clod - * Hath visions, and would speak, if he had loved - * And been well nurtured in his mother tongue. - * Whether the dream now purpos'd to rehearse - * Be poet's or fanatic's will be known - * When this warm scribe my hand is in the grave. - */ -hyperion = function() { - external_library.doodle(); - console.log('The Fall of Hyperion - A Dream by John Keats'); -}; diff --git a/closure/compiler/test/closure_js_deps/hyperion2.js b/closure/compiler/test/closure_js_deps/hyperion2.js deleted file mode 100644 index 2e3878a9d2..0000000000 --- a/closure/compiler/test/closure_js_deps/hyperion2.js +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright 2016 The Closure Rules Authors. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -goog.provide('hyperion2'); - -goog.require('hyperion'); - - -/** - * Methought I stood where trees of every clime, - * Palm, myrtle, oak, and sycamore, and beech, - * With plantain, and spice blossoms, made a screen; - * In neighbourhood of fountains, by the noise - * Soft showering in my ears, and, by the touch - * Of scent, not far from roses. Turning round - * I saw an arbour with a drooping roof - * Of trellis vines, and bells, and larger blooms, - * Like floral censers swinging light in air; - * Before its wreathed doorway, on a mound - * Of moss, was spread a feast of summer fruits, - * Which, nearer seen, seem'd refuse of a meal - * By angel tasted or our Mother Eve; - * For empty shells were scattered on the grass, - * And grape stalks but half bare, and remnants more, - * Sweet smelling, whose pure kinds I could not know. - * Still was more plenty than the fabled horn - * Thrice emptied could pour forth, at banqueting - * For Proserpine return'd to her own fields, - * Where the white heifers low. And appetite - * More yearning than on earth I ever felt - * Growing within, I ate deliciously; - * And, after not long, thirsted, for thereby - * Stood a cool vessel of transparent juice - * Sipp'd by the wander'd bee, the which I took, - * And, pledging all the mortals of the world, - * And all the dead whose names are in our lips, - * Drank. That full draught is parent of my theme. - * No Asian poppy nor elixir fine - * Of the soon fading jealous Caliphat, - * No poison gender'd in close monkish cell - * To thin the scarlet conclave of old men, - * Could so have rapt unwilling life away. - * Among the fragrant husks and berries crush'd, - * Upon the grass I struggled hard against - * The domineering potion; but in vain: - * The cloudy swoon came on, and down I sunk - * Like a Silenus on an antique vase. - * How long I slumber'd 'tis a chance to guess. - * When sense of life return'd, I started up - * As if with wings; but the fair trees were gone, - * The mossy mound and arbour were no more: - * I look'd around upon the carved sides - * Of an old sanctuary with roof august, - * Builded so high, it seem'd that filmed clouds - * Might spread beneath, as o'er the stars of heaven; - * So old the place was, I remember'd none - * The like upon the earth: what I had seen - * Of grey cathedrals, buttress'd walls, rent towers, - * The superannuations of sunk realms, - * Or Nature's rocks toil'd hard in waves and winds, - * Seem'd but the faulture of decrepit things - * To that eternal domed monument. - * Upon the marble at my feet there lay - * Store of strange vessels and large draperies, - * Which needs had been of dyed asbestos wove, - * Or in that place the moth could not corrupt, - * So white the linen, so, in some, distinct - * Ran imageries from a sombre loom. - * All in a mingled heap confus'd there lay - * Robes, golden tongs, censer and chafing dish, - * Girdles, and chains, and holy jewelries. - * @export - */ -hyperion2 = function() { - hyperion(); - console.log('Published in 1819'); -}; diff --git a/closure/compiler/test/closure_js_deps/hyperion2_deps_runfiles_test.sh b/closure/compiler/test/closure_js_deps/hyperion2_deps_runfiles_test.sh deleted file mode 100755 index 94c1d3d1c8..0000000000 --- a/closure/compiler/test/closure_js_deps/hyperion2_deps_runfiles_test.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -# -# Copyright 2016 The Closure Rules Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -ex - -# when we add a closure_js_deps() to our runfiles data=[...] we get: - -# the deps file -[[ -e closure/compiler/test/closure_js_deps/hyperion2_deps.js ]] - -# all transitive sources -[[ -e external/com_google_javascript_closure_library/closure/goog/base.js ]] -[[ -e closure/compiler/test/closure_js_deps/hyperion.js ]] -[[ -e closure/compiler/test/closure_js_deps/hyperion2.js ]] - -# all transitive data -[[ -e closure/compiler/test/closure_js_deps/data1.txt ]] -[[ -e closure/compiler/test/closure_js_deps/data2.txt ]] -[[ -e closure/compiler/test/closure_js_deps/data4.txt ]] diff --git a/closure/compiler/test/exports_and_entry_points/BUILD b/closure/compiler/test/exports_and_entry_points/BUILD index 3f6509a888..f189db2598 100644 --- a/closure/compiler/test/exports_and_entry_points/BUILD +++ b/closure/compiler/test/exports_and_entry_points/BUILD @@ -17,8 +17,7 @@ package(default_testonly = True) licenses(["notice"]) # Apache 2.0 load("//closure/private:file_test.bzl", "file_test") -load("//closure:defs.bzl", "closure_js_binary") -load("//closure:defs.bzl", "closure_js_library") +load("//closure:defs.bzl", "closure_js_binary", "closure_js_library") ################################################################################ # Assume we want to write a JavaScript program (not a library) that we compile @@ -84,6 +83,7 @@ file_test( closure_js_library( name = "library_goog_lib", srcs = ["library_goog.js"], + suppress = ["useOfGoogProvide"], ) closure_js_binary( @@ -105,7 +105,7 @@ file_test( closure_js_binary( name = "program_strict_bin", - dependency_mode = "STRICT", + dependency_mode = "PRUNE", entry_points = ["closure/compiler/test/empty"], deps = [ ":program_lib", @@ -121,7 +121,7 @@ file_test( closure_js_binary( name = "program_strict_bin2", - dependency_mode = "STRICT", + dependency_mode = "PRUNE", entry_points = ["closure/compiler/test/exports_and_entry_points/program"], deps = [ ":program_lib", diff --git a/closure/compiler/test/goog_es6_interop/BUILD b/closure/compiler/test/goog_es6_interop/BUILD new file mode 100644 index 0000000000..08ede853fd --- /dev/null +++ b/closure/compiler/test/goog_es6_interop/BUILD @@ -0,0 +1,55 @@ +# Copyright 2019 The Closure Rules Authors. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +load("//closure/compiler:closure_js_library.bzl", "closure_js_library") +load("//closure/testing:closure_js_test.bzl", "closure_js_test") + +closure_js_library( + name = "person", + srcs = [ + "person.js", + ], + deps = [ + "@com_google_javascript_closure_library//closure/goog/string", + ], +) + +closure_js_library( + name = "person_factory", + srcs = [ + "person_factory.js", + ], + # TODO(yannic): Remove this suppression when + # `bazelbuild/rules_closure#436` is fixed. + suppress = ["moduleLoad"], + deps = [ + ":person", + "@com_google_javascript_closure_library//closure/goog/asserts", + ], +) + +closure_js_test( + name = "person_factory_test", + srcs = [ + "person_factory_test.js", + ], + entry_points = [ + "goog:rulesClosure.googEs6Interop.PersonFactoryTest", + ], + deps = [ + ":person_factory", + "@com_google_javascript_closure_library//closure/goog/testing:testsuite", + ], +) diff --git a/closure/compiler/test/goog_es6_interop/person.js b/closure/compiler/test/goog_es6_interop/person.js new file mode 100644 index 0000000000..0b2b02b44e --- /dev/null +++ b/closure/compiler/test/goog_es6_interop/person.js @@ -0,0 +1,56 @@ +// Copyright 2019 The Closure Rules Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @fileoverview A person, implementes as ES6 module. + */ + +import {capitalize} from 'goog:goog.string'; + +/** + * Represents a person. + */ +export class Person { + /** + * Constructs a new `Person`. + * + * @param {string} firstName + * @param {string} lastName + */ + constructor(firstName, lastName) { + /** @private @const {string} */ + this.firstName_ = capitalize(firstName); + + /** @private @const {string} */ + this.lastName_ = capitalize(lastName); + } + + /** + * Returns the first name of the person. + * + * @return {string} + */ + firstName() { + return this.firstName_; + } + + /** + * Returns the last name of the person. + * + * @return {string} + */ + lastName() { + return this.lastName_; + } +} diff --git a/closure/compiler/test/goog_es6_interop/person_factory.js b/closure/compiler/test/goog_es6_interop/person_factory.js new file mode 100644 index 0000000000..042faf5bed --- /dev/null +++ b/closure/compiler/test/goog_es6_interop/person_factory.js @@ -0,0 +1,35 @@ +// Copyright 2019 The Closure Rules Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @fileoverview A factory function for `Person`, implemented as ES6 module + * declaring a goog module id so it can be `goog.require`d. + */ + +goog.declareModuleId('rulesClosure.googEs6Interop.personFactory'); + +import {Person} from '/closure/compiler/test/goog_es6_interop/person.js'; +import {assert} from 'goog:goog.asserts'; + +/** + * Creates a new `Person`. + * + * @param {string} name + * @return {!Person} + */ +export const createPerson = (name) => { + const pieces = name.split(' '); + assert(2 === pieces.length); + return new Person(pieces[0], pieces[1]); +}; diff --git a/closure/compiler/test/goog_es6_interop/person_factory_test.js b/closure/compiler/test/goog_es6_interop/person_factory_test.js new file mode 100644 index 0000000000..1d27ba37d2 --- /dev/null +++ b/closure/compiler/test/goog_es6_interop/person_factory_test.js @@ -0,0 +1,33 @@ +// Copyright 2019 The Closure Rules Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// This is not expected to work for namespaces declared by `goog.provide`. +// https://github.com/google/closure-compiler/wiki/Migrating-from-goog.modules-to-ES6-modules +goog.module('rulesClosure.googEs6Interop.PersonFactoryTest'); + +const testSuite = goog.require('goog.testing.testSuite'); +const {createPerson} = goog.require('rulesClosure.googEs6Interop.personFactory'); + + + +class PersonFactoryTest { + /** @return {void} */ + testPersonFactory() { + const person = createPerson('rules CLOSURE'); + assertNotNull(person); + assertEquals('Rules', person.firstName()); + assertEquals('Closure', person.lastName()); + } +} +testSuite(new PersonFactoryTest()); diff --git a/closure/compiler/test/linting/BUILD b/closure/compiler/test/linting/BUILD index 8c2cdb1af0..abb981063c 100644 --- a/closure/compiler/test/linting/BUILD +++ b/closure/compiler/test/linting/BUILD @@ -25,12 +25,6 @@ closure_js_library( internal_expect_failure = True, ) -file_test( - name = "memberWithUnderscoreButNoPrivateMarker_causesError", - file = "love-stderr.txt", - regexp = "JSC_MUST_BE_PRIVATE", -) - file_test( name = "methodMissingJsdoc_causesError", file = "love-stderr.txt", diff --git a/closure/compiler/test/reports/BUILD b/closure/compiler/test/reports/BUILD index 21c6c82fb1..0508ad0df9 100644 --- a/closure/compiler/test/reports/BUILD +++ b/closure/compiler/test/reports/BUILD @@ -17,8 +17,7 @@ package(default_testonly = True) licenses(["notice"]) # Apache 2.0 load("//closure/private:file_test.bzl", "file_test") -load("//closure:defs.bzl", "closure_js_binary") -load("//closure:defs.bzl", "closure_js_library") +load("//closure:defs.bzl", "closure_js_binary", "closure_js_library") # Property renaming reports are rarely used. But they can be used to minify # JSON messages. However it's recommended that you use protobuf instead. @@ -36,12 +35,12 @@ closure_js_binary( file_test( name = "propertyWithoutQuotes_getsRenamed", - content = "console.log({a:\"world\"});\n", + regexp = r'console.log({\w:"world"});', file = "property_bin.js", ) file_test( name = "propertyRenamingReportDef_createsAdditionalOutputFile", - content = "hello:a\n", + regexp = "hello:\\w", file = "property_bin_renaming_report.txt", ) diff --git a/closure/compiler/test/strict_dependency_checking/BUILD b/closure/compiler/test/strict_dependency_checking/BUILD index afafb95200..ba7922359b 100644 --- a/closure/compiler/test/strict_dependency_checking/BUILD +++ b/closure/compiler/test/strict_dependency_checking/BUILD @@ -17,8 +17,7 @@ package(default_testonly = True) licenses(["notice"]) # Apache 2.0 load("//closure/private:file_test.bzl", "file_test") -load("//closure:defs.bzl", "closure_js_binary") -load("//closure:defs.bzl", "closure_js_library") +load("//closure:defs.bzl", "closure_js_binary", "closure_js_library") ################################################################################ # Assume we're using traditional Google namespaces. @@ -26,17 +25,20 @@ load("//closure:defs.bzl", "closure_js_library") closure_js_library( name = "a", srcs = ["a.js"], + suppress = ["useOfGoogProvide"], ) closure_js_library( name = "b", srcs = ["b.js"], + suppress = ["useOfGoogProvide"], deps = [":a"], ) closure_js_library( name = "c", srcs = ["c.js"], + suppress = ["useOfGoogProvide"], deps = [ ":a", ":b", @@ -47,6 +49,7 @@ closure_js_library( name = "t", testonly = True, srcs = ["t.js"], + suppress = ["useOfGoogProvide"], ) file_test( @@ -96,6 +99,7 @@ file_test( closure_js_library( name = "b2", srcs = ["b.js"], + suppress = ["useOfGoogProvide"], exports = [":a"], deps = [":a"], ) @@ -103,6 +107,7 @@ closure_js_library( closure_js_library( name = "exportMadeTransitiveDepDirect", srcs = ["c.js"], + suppress = ["useOfGoogProvide"], deps = [":b2"], # but if :b exports :a, then we're ok ) @@ -212,6 +217,7 @@ closure_js_library( "a.js", "es6_a.js", ], + suppress = ["useOfGoogProvide"], ) file_test( @@ -245,6 +251,31 @@ genrule( cmd = "echo 'import { g } from \"/closure/compiler/test/strict_dependency_checking/es6_g.js\"; g();' >$@", ) +genrule( + name = "es6_g3_generate", + outs = ["es6_g3.js"], + cmd = "echo 'import { g } from \"./es6_g.js\"; g();' >$@", +) + +closure_js_library( + name = "es6_g3_gen_lib", + srcs = [":es6_g_generate", ":es6_g3_generate"], +) + +closure_js_binary( + name = "es6_relative_imports_gen_srcs_bin", + entry_points = [ + "closure/compiler/test/strict_dependency_checking/es6_g3.js", + ], + deps = [":es6_g3_gen_lib"], +) + +file_test( + name = "es6ModulesWithRelativeImports_compileCorrectlyWhenSourcesAreGenerated", + content = "console.log(\"hi\");\n", + file = "es6_relative_imports_gen_srcs_bin.js", +) + closure_js_library( name = "es6_g2", srcs = ["es6_g2.js"], diff --git a/closure/defs.bzl b/closure/defs.bzl index 0fd1d54afb..85a4ca2e02 100644 --- a/closure/defs.bzl +++ b/closure/defs.bzl @@ -14,41 +14,33 @@ load("//closure/compiler:closure_js_aspect.bzl", _closure_js_aspect = "closure_js_aspect") load("//closure/compiler:closure_js_binary.bzl", _closure_js_binary = "closure_js_binary") -load("//closure/compiler:closure_js_deps.bzl", _closure_js_deps = "closure_js_deps") load("//closure/compiler:closure_js_library.bzl", _closure_js_library = "closure_js_library", _create_closure_js_library = "create_closure_js_library") load("//closure/private:defs.bzl", _CLOSURE_JS_TOOLCHAIN_ATTRS = "CLOSURE_JS_TOOLCHAIN_ATTRS") load("//closure/private:files_equal_test.bzl", _files_equal_test = "files_equal_test") -load("//closure/private:java_import_external.bzl", _java_import_external = "java_import_external") load("//closure/protobuf:closure_js_proto_library.bzl", _closure_js_proto_library = "closure_js_proto_library") load("//closure/protobuf:closure_proto_library.bzl", _closure_proto_library = "closure_proto_library") load("//closure/stylesheets:closure_css_binary.bzl", _closure_css_binary = "closure_css_binary") load("//closure/stylesheets:closure_css_library.bzl", _closure_css_library = "closure_css_library") load("//closure/templates:closure_java_template_library.bzl", _closure_java_template_library = "closure_java_template_library") load("//closure/templates:closure_js_template_library.bzl", _closure_js_template_library = "closure_js_template_library") +load("//closure/templates:closure_templates_plugin.bzl", _closure_templates_plugin = "closure_templates_plugin") load("//closure/testing:closure_js_test.bzl", _closure_js_test = "closure_js_test") load("//closure/testing:phantomjs_test.bzl", _phantomjs_test = "phantomjs_test") load("//closure:filegroup_external.bzl", _filegroup_external = "filegroup_external") -load("//closure:repositories.bzl", _closure_repositories = "closure_repositories") -load("//closure:webfiles/web_library.bzl", _web_library = "web_library") -load("//closure:webfiles/web_library_external.bzl", _web_library_external = "web_library_external") closure_js_aspect = _closure_js_aspect closure_js_binary = _closure_js_binary -closure_js_deps = _closure_js_deps closure_js_library = _closure_js_library create_closure_js_library = _create_closure_js_library CLOSURE_JS_TOOLCHAIN_ATTRS = _CLOSURE_JS_TOOLCHAIN_ATTRS files_equal_test = _files_equal_test -java_import_external = _java_import_external closure_js_proto_library = _closure_js_proto_library closure_proto_library = _closure_proto_library closure_css_binary = _closure_css_binary closure_css_library = _closure_css_library closure_java_template_library = _closure_java_template_library closure_js_template_library = _closure_js_template_library +closure_templates_plugin = _closure_templates_plugin closure_js_test = _closure_js_test phantomjs_test = _phantomjs_test filegroup_external = _filegroup_external -closure_repositories = _closure_repositories -web_library = _web_library -web_library_external = _web_library_external diff --git a/closure/library/BUILD b/closure/library/BUILD deleted file mode 100644 index 8dd4e88392..0000000000 --- a/closure/library/BUILD +++ /dev/null @@ -1,225 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_css_library") -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "library", - exports = [ - "//closure/library/a11y/aria:all_js", - "//closure/library/array:all_js", - "//closure/library/asserts:all_js", - "//closure/library/async:all_js", - "//closure/library/collections:all_js", - "//closure/library/color:all_js", - "//closure/library/crypt:all_js", - "//closure/library/cssom:all_js", - "//closure/library/datasource:all_js", - "//closure/library/date:all_js", - "//closure/library/db:all_js", - "//closure/library/debug:all_js", - "//closure/library/delegate:all_js", - "//closure/library/disposable:all_js", - "//closure/library/dom:all_js", - "//closure/library/editor:all_js", - "//closure/library/events:all_js", - "//closure/library/format:all_js", - "//closure/library/fs:all_js", - "//closure/library/functions:all_js", - "//closure/library/fx:all_js", - "//closure/library/graphics:all_js", - "//closure/library/history:all_js", - "//closure/library/html:all_js", - "//closure/library/i18n:all_js", - "//closure/library/iter:all_js", - "//closure/library/json:all_js", - "//closure/library/loader:all_js", - "//closure/library/locale:all_js", - "//closure/library/log:all_js", - "//closure/library/math:all_js", - "//closure/library/memoize:all_js", - "//closure/library/messaging:all_js", - "//closure/library/module:all_js", - "//closure/library/net:all_js", - "//closure/library/object:all_js", - "//closure/library/positioning:all_js", - "//closure/library/promise:all_js", - "//closure/library/proto:all_js", - "//closure/library/proto2:all_js", - "//closure/library/pubsub:all_js", - "//closure/library/reflect:all_js", - "//closure/library/result:all_js", - "//closure/library/soy:all_js", - "//closure/library/spell:all_js", - "//closure/library/stats:all_js", - "//closure/library/storage:all_js", - "//closure/library/string:all_js", - "//closure/library/structs:all_js", - "//closure/library/style:all_js", - "//closure/library/testing:all_js", - "//closure/library/timer:all_js", - "//closure/library/tweak:all_js", - "//closure/library/uri:all_js", - "//closure/library/useragent:all_js", - "//closure/library/vec:all_js", - "//closure/library/webgl:all_js", - "//closure/library/window:all_js", - ], -) - -closure_js_library( - name = "testing", - testonly = True, - exports = [ - "//closure/library:test_module", - "//closure/library:test_module_dep", - "//closure/library/crypt:hashtester", - "//closure/library/events:eventtargettester", - "//closure/library/html:testing", - "//closure/library/promise:testsuiteadapter", - "//closure/library/proto2:test.pb", - "//closure/library/storage:collectablestoragetester", - "//closure/library/storage:storagetester", - "//closure/library/storage/mechanism:iterablemechanismtester", - "//closure/library/storage/mechanism:mechanismseparationtester", - "//closure/library/storage/mechanism:mechanismsharingtester", - "//closure/library/storage/mechanism:mechanismtestdefinition", - "//closure/library/storage/mechanism:mechanismtester", - "//closure/library/style:stylescrollbartester", - "//closure/library/testing:assertionfailure", - "//closure/library/testing:asserts", - "//closure/library/testing:asynctestcase", - "//closure/library/testing:benchmark", - "//closure/library/testing:continuationtestcase", - "//closure/library/testing:deferredtestcase", - "//closure/library/testing:dom", - "//closure/library/testing:expectedfailures", - "//closure/library/testing:functionmock", - "//closure/library/testing:graphics", - "//closure/library/testing:jstdtestcaseadapter", - "//closure/library/testing:jsunit", - "//closure/library/testing:jsunitexception", - "//closure/library/testing:loosemock", - "//closure/library/testing:mock", - "//closure/library/testing:mockclassfactory", - "//closure/library/testing:mockclock", - "//closure/library/testing:mockcontrol", - "//closure/library/testing:mockinterface", - "//closure/library/testing:mockmatchers", - "//closure/library/testing:mockrandom", - "//closure/library/testing:mockrange", - "//closure/library/testing:mockstorage", - "//closure/library/testing:mockuseragent", - "//closure/library/testing:multitestrunner", - "//closure/library/testing:objectpropertystring", - "//closure/library/testing:performancetable", - "//closure/library/testing:performancetimer", - "//closure/library/testing:propertyreplacer", - "//closure/library/testing:pseudorandom", - "//closure/library/testing:recordfunction", - "//closure/library/testing:shardingtestcase", - "//closure/library/testing:singleton", - "//closure/library/testing:stacktrace", - "//closure/library/testing:strictmock", - "//closure/library/testing:testcase", - "//closure/library/testing:testqueue", - "//closure/library/testing:testrunner", - "//closure/library/testing:testsuite", - "//closure/library/testing/async:mockcontrol", - "//closure/library/testing/editor:dom", - "//closure/library/testing/editor:fieldmock", - "//closure/library/testing/editor:testhelper", - "//closure/library/testing/events", - "//closure/library/testing/events:eventobserver", - "//closure/library/testing/events:matchers", - "//closure/library/testing/events:onlinehandler", - "//closure/library/testing/fs", - "//closure/library/testing/fs:blob", - "//closure/library/testing/fs:entry", - "//closure/library/testing/fs:file", - "//closure/library/testing/fs:filereader", - "//closure/library/testing/fs:filesystem", - "//closure/library/testing/fs:filewriter", - "//closure/library/testing/fs:progressevent", - "//closure/library/testing/i18n:asserts", - "//closure/library/testing/messaging:mockmessagechannel", - "//closure/library/testing/messaging:mockmessageevent", - "//closure/library/testing/messaging:mockmessageport", - "//closure/library/testing/messaging:mockportnetwork", - "//closure/library/testing/net:mockiframeio", - "//closure/library/testing/net:xhrio", - "//closure/library/testing/net:xhriopool", - "//closure/library/testing/proto2", - "//closure/library/testing/storage:fakemechanism", - "//closure/library/testing/style", - "//closure/library/testing/style:layoutasserts", - "//closure/library/tweak:testhelpers", - "//closure/library/useragent:useragenttestutil", - ], -) - -closure_js_library( - name = "goog", - srcs = ["@com_google_javascript_closure_library//:closure/goog/goog.js"], - lenient = True, - no_closure_library = True, -) - -closure_js_library( - name = "test_module", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/test_module.js"], - lenient = True, - deps = ["//closure/library:test_module_dep"], -) - -closure_js_library( - name = "test_module_dep", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/test_module_dep.js"], - lenient = True, -) - -filegroup( - name = "base", - srcs = [ - "@com_google_javascript_closure_library//:closure/goog/base.js", - "@com_google_javascript_closure_library//:closure/goog/transitionalforwarddeclarations.js", - ], -) - -closure_js_library( - name = "deps", - srcs = ["@com_google_javascript_closure_library//:closure/goog/deps.js"], - lenient = True, -) - -closure_js_library( - name = "transpile", - srcs = ["@com_google_javascript_closure_library//:closure/goog/transpile.js"], - lenient = True, -) - -closure_css_library( - name = "css", - srcs = ["@com_google_javascript_closure_library//:css_files"], -) - -py_binary( - name = "regenerate", - srcs = ["regenerate.py"], - args = ["$(location @com_google_javascript_closure_library//:closure/goog/base.js)"], - data = [ - "@com_google_javascript_closure_library", - "@com_google_javascript_closure_library//:closure/goog/base.js", - ], - tags = [ - "local", - "manual", - ], - visibility = ["//visibility:private"], -) diff --git a/closure/library/a11y/aria/BUILD b/closure/library/a11y/aria/BUILD deleted file mode 100644 index 6e391b9c36..0000000000 --- a/closure/library/a11y/aria/BUILD +++ /dev/null @@ -1,72 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":announcer", - ":aria", - ":attributes", - ":datatables", - ":roles", - ], -) - -closure_js_library( - name = "announcer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/a11y/aria/announcer.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria", - "//closure/library/a11y/aria:attributes", - "//closure/library/disposable", - "//closure/library/dom", - "//closure/library/dom:tagname", - "//closure/library/object", - "//closure/library/timer", - ], -) - -closure_js_library( - name = "aria", - srcs = ["@com_google_javascript_closure_library//:closure/goog/a11y/aria/aria.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria:attributes", - "//closure/library/a11y/aria:datatables", - "//closure/library/a11y/aria:roles", - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:tagname", - "//closure/library/object", - "//closure/library/string", - ], -) - -closure_js_library( - name = "attributes", - srcs = ["@com_google_javascript_closure_library//:closure/goog/a11y/aria/attributes.js"], - lenient = True, -) - -closure_js_library( - name = "datatables", - srcs = ["@com_google_javascript_closure_library//:closure/goog/a11y/aria/datatables.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria:attributes", - "//closure/library/object", - ], -) - -closure_js_library( - name = "roles", - srcs = ["@com_google_javascript_closure_library//:closure/goog/a11y/aria/roles.js"], - lenient = True, -) diff --git a/closure/library/array/BUILD b/closure/library/array/BUILD deleted file mode 100644 index a98e67f488..0000000000 --- a/closure/library/array/BUILD +++ /dev/null @@ -1,19 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [":array"], -) - -closure_js_library( - name = "array", - srcs = ["@com_google_javascript_closure_library//:closure/goog/array/array.js"], - lenient = True, - deps = ["//closure/library/asserts"], -) diff --git a/closure/library/asserts/BUILD b/closure/library/asserts/BUILD deleted file mode 100644 index be229166e3..0000000000 --- a/closure/library/asserts/BUILD +++ /dev/null @@ -1,22 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [":asserts"], -) - -closure_js_library( - name = "asserts", - srcs = ["@com_google_javascript_closure_library//:closure/goog/asserts/asserts.js"], - lenient = True, - deps = [ - "//closure/library/debug:error", - "//closure/library/dom:nodetype", - ], -) diff --git a/closure/library/async/BUILD b/closure/library/async/BUILD deleted file mode 100644 index 3e4e98c77f..0000000000 --- a/closure/library/async/BUILD +++ /dev/null @@ -1,112 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":animationdelay", - ":conditionaldelay", - ":debouncer", - ":delay", - ":freelist", - ":nexttick", - ":run", - ":throttle", - ":workqueue", - ], -) - -closure_js_library( - name = "animationdelay", - srcs = ["@com_google_javascript_closure_library//:closure/goog/async/animationdelay.js"], - lenient = True, - deps = [ - "//closure/library/disposable", - "//closure/library/events", - "//closure/library/functions", - ], -) - -closure_js_library( - name = "conditionaldelay", - srcs = ["@com_google_javascript_closure_library//:closure/goog/async/conditionaldelay.js"], - lenient = True, - deps = [ - "//closure/library/async:delay", - "//closure/library/disposable", - ], -) - -closure_js_library( - name = "debouncer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/async/debouncer.js"], - lenient = True, - deps = [ - "//closure/library/disposable", - "//closure/library/timer", - ], -) - -closure_js_library( - name = "delay", - srcs = ["@com_google_javascript_closure_library//:closure/goog/async/delay.js"], - lenient = True, - deps = [ - "//closure/library/disposable", - "//closure/library/timer", - ], -) - -closure_js_library( - name = "freelist", - srcs = ["@com_google_javascript_closure_library//:closure/goog/async/freelist.js"], - lenient = True, -) - -closure_js_library( - name = "nexttick", - srcs = ["@com_google_javascript_closure_library//:closure/goog/async/nexttick.js"], - lenient = True, - deps = [ - "//closure/library/debug:entrypointregistry", - "//closure/library/dom:tagname", - "//closure/library/functions", - "//closure/library/labs/useragent:browser", - "//closure/library/labs/useragent:engine", - ], -) - -closure_js_library( - name = "run", - srcs = ["@com_google_javascript_closure_library//:closure/goog/async/run.js"], - lenient = True, - deps = [ - "//closure/library/async:nexttick", - "//closure/library/async:workqueue", - ], -) - -closure_js_library( - name = "throttle", - srcs = ["@com_google_javascript_closure_library//:closure/goog/async/throttle.js"], - lenient = True, - deps = [ - "//closure/library/disposable", - "//closure/library/timer", - ], -) - -closure_js_library( - name = "workqueue", - srcs = ["@com_google_javascript_closure_library//:closure/goog/async/workqueue.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/async:freelist", - ], -) diff --git a/closure/library/bootstrap/BUILD b/closure/library/bootstrap/BUILD deleted file mode 100644 index a65d51757f..0000000000 --- a/closure/library/bootstrap/BUILD +++ /dev/null @@ -1,21 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "nodejs", - srcs = ["@com_google_javascript_closure_library//:closure/goog/bootstrap/nodejs.js"], - lenient = True, - no_closure_library = True, -) - -closure_js_library( - name = "webworkers", - srcs = ["@com_google_javascript_closure_library//:closure/goog/bootstrap/webworkers.js"], - lenient = True, - no_closure_library = True, -) diff --git a/closure/library/closure_library.BUILD b/closure/library/closure_library.BUILD deleted file mode 100644 index 853a926161..0000000000 --- a/closure/library/closure_library.BUILD +++ /dev/null @@ -1,34 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -filegroup( - name = "com_google_javascript_closure_library", - srcs = glob([ - "closure/**", - "third_party/**", - ]), -) - -filegroup( - name = "css_files", - srcs = glob(["closure/goog/css/**/*.css"]), -) - -py_library( - name = "build_source", - srcs = ["closure/bin/build/source.py"], -) - -py_library( - name = "build_treescan", - srcs = ["closure/bin/build/treescan.py"], -) - -py_binary( - name = "depswriter", - srcs = ["closure/bin/build/depswriter.py"], - main = "closure/bin/build/depswriter.py", - deps = [ - ":build_source", - ":build_treescan", - ], -) diff --git a/closure/library/collections/BUILD b/closure/library/collections/BUILD deleted file mode 100644 index df894f632c..0000000000 --- a/closure/library/collections/BUILD +++ /dev/null @@ -1,19 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [":sets"], -) - -closure_js_library( - name = "sets", - srcs = ["@com_google_javascript_closure_library//:closure/goog/collections/sets.js"], - lenient = True, - deps = ["//closure/library/labs/collections:iterables"], -) diff --git a/closure/library/color/BUILD b/closure/library/color/BUILD deleted file mode 100644 index 00322bad06..0000000000 --- a/closure/library/color/BUILD +++ /dev/null @@ -1,39 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":alpha", - ":color", - ":names", - ], -) - -closure_js_library( - name = "alpha", - srcs = ["@com_google_javascript_closure_library//:closure/goog/color/alpha.js"], - lenient = True, - deps = ["//closure/library/color"], -) - -closure_js_library( - name = "color", - srcs = ["@com_google_javascript_closure_library//:closure/goog/color/color.js"], - lenient = True, - deps = [ - "//closure/library/color:names", - "//closure/library/math", - ], -) - -closure_js_library( - name = "names", - srcs = ["@com_google_javascript_closure_library//:closure/goog/color/names.js"], - lenient = True, -) diff --git a/closure/library/crypt/BUILD b/closure/library/crypt/BUILD deleted file mode 100644 index a4a9670fd4..0000000000 --- a/closure/library/crypt/BUILD +++ /dev/null @@ -1,243 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":aes", - ":arc4", - ":base64", - ":basen", - ":blobhasher", - ":blockcipher", - ":cbc", - ":crypt", - ":ctr", - ":hash", - ":hash32", - ":hmac", - ":md5", - ":pbkdf2", - ":sha1", - ":sha2", - ":sha224", - ":sha256", - ":sha2_64bit", - ":sha384", - ":sha512", - ":sha512_256", - ], -) - -closure_js_library( - name = "aes", - srcs = ["@com_google_javascript_closure_library//:closure/goog/crypt/aes.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/crypt:blockcipher", - ], -) - -closure_js_library( - name = "arc4", - srcs = ["@com_google_javascript_closure_library//:closure/goog/crypt/arc4.js"], - lenient = True, - deps = ["//closure/library/asserts"], -) - -closure_js_library( - name = "base64", - srcs = ["@com_google_javascript_closure_library//:closure/goog/crypt/base64.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/crypt", - "//closure/library/string", - "//closure/library/useragent", - "//closure/library/useragent:product", - ], -) - -closure_js_library( - name = "basen", - srcs = ["@com_google_javascript_closure_library//:closure/goog/crypt/basen.js"], - lenient = True, -) - -closure_js_library( - name = "blobhasher", - srcs = ["@com_google_javascript_closure_library//:closure/goog/crypt/blobhasher.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/events:eventtarget", - "//closure/library/fs", - "//closure/library/log", - ], -) - -closure_js_library( - name = "blockcipher", - srcs = ["@com_google_javascript_closure_library//:closure/goog/crypt/blockcipher.js"], - lenient = True, -) - -closure_js_library( - name = "cbc", - srcs = ["@com_google_javascript_closure_library//:closure/goog/crypt/cbc.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/crypt", - "//closure/library/crypt:blockcipher", - ], -) - -closure_js_library( - name = "crypt", - srcs = ["@com_google_javascript_closure_library//:closure/goog/crypt/crypt.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - ], -) - -closure_js_library( - name = "ctr", - srcs = ["@com_google_javascript_closure_library//:closure/goog/crypt/ctr.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/crypt", - ], -) - -closure_js_library( - name = "hash", - srcs = ["@com_google_javascript_closure_library//:closure/goog/crypt/hash.js"], - lenient = True, -) - -closure_js_library( - name = "hash32", - srcs = ["@com_google_javascript_closure_library//:closure/goog/crypt/hash32.js"], - lenient = True, - deps = ["//closure/library/crypt"], -) - -closure_js_library( - name = "hashtester", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/crypt/hashtester.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/crypt", - "//closure/library/dom", - "//closure/library/dom:tagname", - "//closure/library/testing:asserts", - "//closure/library/testing:performancetable", - "//closure/library/testing:pseudorandom", - ], -) - -closure_js_library( - name = "hmac", - srcs = ["@com_google_javascript_closure_library//:closure/goog/crypt/hmac.js"], - lenient = True, - deps = ["//closure/library/crypt:hash"], -) - -closure_js_library( - name = "md5", - srcs = ["@com_google_javascript_closure_library//:closure/goog/crypt/md5.js"], - lenient = True, - deps = ["//closure/library/crypt:hash"], -) - -closure_js_library( - name = "pbkdf2", - srcs = ["@com_google_javascript_closure_library//:closure/goog/crypt/pbkdf2.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/crypt", - "//closure/library/crypt:hmac", - "//closure/library/crypt:sha1", - ], -) - -closure_js_library( - name = "sha1", - srcs = ["@com_google_javascript_closure_library//:closure/goog/crypt/sha1.js"], - lenient = True, - deps = ["//closure/library/crypt:hash"], -) - -closure_js_library( - name = "sha2", - srcs = ["@com_google_javascript_closure_library//:closure/goog/crypt/sha2.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/crypt:hash", - ], -) - -closure_js_library( - name = "sha224", - srcs = ["@com_google_javascript_closure_library//:closure/goog/crypt/sha224.js"], - lenient = True, - deps = ["//closure/library/crypt:sha2"], -) - -closure_js_library( - name = "sha256", - srcs = ["@com_google_javascript_closure_library//:closure/goog/crypt/sha256.js"], - lenient = True, - deps = ["//closure/library/crypt:sha2"], -) - -closure_js_library( - name = "sha2_64bit", - srcs = ["@com_google_javascript_closure_library//:closure/goog/crypt/sha2_64bit.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/crypt:hash", - "//closure/library/math:long", - ], -) - -closure_js_library( - name = "sha384", - srcs = ["@com_google_javascript_closure_library//:closure/goog/crypt/sha384.js"], - lenient = True, - deps = ["//closure/library/crypt:sha2_64bit"], -) - -closure_js_library( - name = "sha512", - srcs = ["@com_google_javascript_closure_library//:closure/goog/crypt/sha512.js"], - lenient = True, - deps = ["//closure/library/crypt:sha2_64bit"], -) - -closure_js_library( - name = "sha512_256", - srcs = ["@com_google_javascript_closure_library//:closure/goog/crypt/sha512_256.js"], - lenient = True, - deps = ["//closure/library/crypt:sha2_64bit"], -) diff --git a/closure/library/cssom/BUILD b/closure/library/cssom/BUILD deleted file mode 100644 index 2db068434d..0000000000 --- a/closure/library/cssom/BUILD +++ /dev/null @@ -1,26 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":cssom", - "//closure/library/cssom/iframe:all_js", - ], -) - -closure_js_library( - name = "cssom", - srcs = ["@com_google_javascript_closure_library//:closure/goog/cssom/cssom.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/dom", - "//closure/library/dom:tagname", - ], -) diff --git a/closure/library/cssom/iframe/BUILD b/closure/library/cssom/iframe/BUILD deleted file mode 100644 index 43028322fa..0000000000 --- a/closure/library/cssom/iframe/BUILD +++ /dev/null @@ -1,29 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [":style"], -) - -closure_js_library( - name = "style", - srcs = ["@com_google_javascript_closure_library//:closure/goog/cssom/iframe/style.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/cssom", - "//closure/library/dom", - "//closure/library/dom:classlist", - "//closure/library/dom:nodetype", - "//closure/library/dom:tagname", - "//closure/library/string", - "//closure/library/style", - "//closure/library/useragent", - ], -) diff --git a/closure/library/datasource/BUILD b/closure/library/datasource/BUILD deleted file mode 100644 index 5829b24549..0000000000 --- a/closure/library/datasource/BUILD +++ /dev/null @@ -1,123 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":datamanager", - ":datasource", - ":expr", - ":fastdatanode", - ":jsdatasource", - ":jsondatasource", - ":jsxmlhttpdatasource", - ":xmldatasource", - ], -) - -closure_js_library( - name = "datamanager", - srcs = ["@com_google_javascript_closure_library//:closure/goog/datasource/datamanager.js"], - lenient = True, - deps = [ - "//closure/library/datasource", - "//closure/library/datasource:expr", - "//closure/library/object", - "//closure/library/string", - "//closure/library/structs", - "//closure/library/structs:map", - ], -) - -closure_js_library( - name = "datasource", - srcs = ["@com_google_javascript_closure_library//:closure/goog/datasource/datasource.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/log", - ], -) - -closure_js_library( - name = "expr", - srcs = ["@com_google_javascript_closure_library//:closure/goog/datasource/expr.js"], - lenient = True, - deps = [ - "//closure/library/datasource", - "//closure/library/string", - ], -) - -closure_js_library( - name = "fastdatanode", - srcs = ["@com_google_javascript_closure_library//:closure/goog/datasource/fastdatanode.js"], - lenient = True, - deps = [ - "//closure/library/datasource", - "//closure/library/datasource:datamanager", - "//closure/library/string", - ], -) - -closure_js_library( - name = "jsdatasource", - srcs = ["@com_google_javascript_closure_library//:closure/goog/datasource/jsdatasource.js"], - lenient = True, - deps = [ - "//closure/library/datasource", - "//closure/library/datasource:datamanager", - ], -) - -closure_js_library( - name = "jsondatasource", - srcs = ["@com_google_javascript_closure_library//:closure/goog/datasource/jsondatasource.js"], - lenient = True, - deps = [ - "//closure/library/datasource", - "//closure/library/datasource:datamanager", - "//closure/library/datasource:jsdatasource", - "//closure/library/dom", - "//closure/library/dom:safe", - "//closure/library/dom:tagname", - "//closure/library/log", - ], -) - -closure_js_library( - name = "jsxmlhttpdatasource", - srcs = ["@com_google_javascript_closure_library//:closure/goog/datasource/jsxmlhttpdatasource.js"], - lenient = True, - deps = [ - "//closure/library/datasource", - "//closure/library/datasource:datamanager", - "//closure/library/datasource:fastdatanode", - "//closure/library/events", - "//closure/library/log", - "//closure/library/net:eventtype", - "//closure/library/net:xhrio", - "//closure/library/uri", - ], -) - -closure_js_library( - name = "xmldatasource", - srcs = ["@com_google_javascript_closure_library//:closure/goog/datasource/xmldatasource.js"], - lenient = True, - deps = [ - "//closure/library/datasource", - "//closure/library/datasource:datamanager", - "//closure/library/dom:nodetype", - "//closure/library/dom:xml", - "//closure/library/log", - "//closure/library/net:xhrio", - "//closure/library/string", - "//closure/library/uri", - ], -) diff --git a/closure/library/date/BUILD b/closure/library/date/BUILD deleted file mode 100644 index 6ccd516c37..0000000000 --- a/closure/library/date/BUILD +++ /dev/null @@ -1,75 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":date", - ":datelike", - ":daterange", - ":duration", - ":relative", - ":utcdatetime", - ], -) - -closure_js_library( - name = "date", - srcs = ["@com_google_javascript_closure_library//:closure/goog/date/date.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/date:datelike", - "//closure/library/i18n:datetimesymbols", - "//closure/library/string", - ], -) - -closure_js_library( - name = "datelike", - srcs = ["@com_google_javascript_closure_library//:closure/goog/date/datelike.js"], - lenient = True, -) - -closure_js_library( - name = "daterange", - srcs = ["@com_google_javascript_closure_library//:closure/goog/date/daterange.js"], - lenient = True, - deps = [ - "//closure/library/date", - "//closure/library/iter", - ], -) - -closure_js_library( - name = "duration", - srcs = ["@com_google_javascript_closure_library//:closure/goog/date/duration.js"], - lenient = True, - deps = [ - "//closure/library/i18n:datetimeformat", - "//closure/library/i18n:messageformat", - ], -) - -closure_js_library( - name = "relative", - srcs = ["@com_google_javascript_closure_library//:closure/goog/date/relative.js"], - lenient = True, - deps = [ - "//closure/library/i18n:datetimeformat", - "//closure/library/i18n:datetimepatterns", - "//closure/library/i18n:relativedatetimeformat", - ], -) - -closure_js_library( - name = "utcdatetime", - srcs = ["@com_google_javascript_closure_library//:closure/goog/date/utcdatetime.js"], - lenient = True, - deps = ["//closure/library/date"], -) diff --git a/closure/library/db/BUILD b/closure/library/db/BUILD deleted file mode 100644 index a08a6f106a..0000000000 --- a/closure/library/db/BUILD +++ /dev/null @@ -1,118 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":cursor", - ":db", - ":error", - ":index", - ":indexeddb", - ":keyrange", - ":objectstore", - ":transaction", - ], -) - -closure_js_library( - name = "cursor", - srcs = ["@com_google_javascript_closure_library//:closure/goog/db/cursor.js"], - lenient = True, - deps = [ - "//closure/library/db:error", - "//closure/library/db:keyrange", - "//closure/library/debug", - "//closure/library/events:eventtarget", - "//third_party/closure/library/mochikit/async:deferred", - ], -) - -closure_js_library( - name = "db", - srcs = ["@com_google_javascript_closure_library//:closure/goog/db/db.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/db:error", - "//closure/library/db:indexeddb", - "//closure/library/db:transaction", - "//third_party/closure/library/mochikit/async:deferred", - ], -) - -closure_js_library( - name = "error", - srcs = ["@com_google_javascript_closure_library//:closure/goog/db/error.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/debug:error", - ], -) - -closure_js_library( - name = "index", - srcs = ["@com_google_javascript_closure_library//:closure/goog/db/index.js"], - lenient = True, - deps = [ - "//closure/library/db:cursor", - "//closure/library/db:error", - "//closure/library/db:keyrange", - "//closure/library/debug", - "//third_party/closure/library/mochikit/async:deferred", - ], -) - -closure_js_library( - name = "indexeddb", - srcs = ["@com_google_javascript_closure_library//:closure/goog/db/indexeddb.js"], - lenient = True, - deps = [ - "//closure/library/db:error", - "//closure/library/db:objectstore", - "//closure/library/db:transaction", - "//closure/library/events:event", - "//closure/library/events:eventhandler", - "//closure/library/events:eventtarget", - ], -) - -closure_js_library( - name = "keyrange", - srcs = ["@com_google_javascript_closure_library//:closure/goog/db/keyrange.js"], - lenient = True, -) - -closure_js_library( - name = "objectstore", - srcs = ["@com_google_javascript_closure_library//:closure/goog/db/objectstore.js"], - lenient = True, - deps = [ - "//closure/library/db:cursor", - "//closure/library/db:error", - "//closure/library/db:index", - "//closure/library/db:keyrange", - "//closure/library/debug", - "//third_party/closure/library/mochikit/async:deferred", - ], -) - -closure_js_library( - name = "transaction", - srcs = ["@com_google_javascript_closure_library//:closure/goog/db/transaction.js"], - lenient = True, - deps = [ - "//closure/library/db:error", - "//closure/library/db:objectstore", - "//closure/library/events", - "//closure/library/events:eventhandler", - "//closure/library/events:eventtarget", - "//third_party/closure/library/mochikit/async:deferred", - ], -) diff --git a/closure/library/debug/BUILD b/closure/library/debug/BUILD deleted file mode 100644 index 54ad08cbb7..0000000000 --- a/closure/library/debug/BUILD +++ /dev/null @@ -1,260 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":console", - ":debug", - ":debugwindow", - ":divconsole", - ":entrypointregistry", - ":error", - ":errorcontext", - ":errorhandler", - ":errorhandlerweakdep", - ":errorreporter", - ":fancywindow", - ":formatter", - ":fpsdisplay", - ":logbuffer", - ":logger", - ":logrecord", - ":logrecordserializer", - ":relativetimeprovider", - ":tracer", - "//closure/library/debug/devcss:all_js", - ], -) - -closure_js_library( - name = "console", - srcs = ["@com_google_javascript_closure_library//:closure/goog/debug/console.js"], - lenient = True, - deps = [ - "//closure/library/debug:formatter", - "//closure/library/debug:logger", - ], -) - -closure_js_library( - name = "debug", - srcs = ["@com_google_javascript_closure_library//:closure/goog/debug/debug.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/debug:errorcontext", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "debugwindow", - srcs = ["@com_google_javascript_closure_library//:closure/goog/debug/debugwindow.js"], - lenient = True, - deps = [ - "//closure/library/debug:formatter", - "//closure/library/debug:logger", - "//closure/library/dom:safe", - "//closure/library/html:safehtml", - "//closure/library/html:safestylesheet", - "//closure/library/string:const", - "//closure/library/structs:circularbuffer", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "divconsole", - srcs = ["@com_google_javascript_closure_library//:closure/goog/debug/divconsole.js"], - lenient = True, - deps = [ - "//closure/library/debug:formatter", - "//closure/library/debug:logger", - "//closure/library/dom", - "//closure/library/dom:safe", - "//closure/library/dom:tagname", - "//closure/library/html:safehtml", - "//closure/library/html:safestylesheet", - "//closure/library/string:const", - "//closure/library/style", - ], -) - -closure_js_library( - name = "entrypointregistry", - srcs = ["@com_google_javascript_closure_library//:closure/goog/debug/entrypointregistry.js"], - lenient = True, - deps = ["//closure/library/asserts"], -) - -closure_js_library( - name = "error", - srcs = ["@com_google_javascript_closure_library//:closure/goog/debug/error.js"], - lenient = True, -) - -closure_js_library( - name = "errorcontext", - srcs = ["@com_google_javascript_closure_library//:closure/goog/debug/errorcontext.js"], - lenient = True, -) - -closure_js_library( - name = "errorhandler", - srcs = ["@com_google_javascript_closure_library//:closure/goog/debug/errorhandler.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/debug", - "//closure/library/debug:entrypointregistry", - "//closure/library/debug:error", - "//closure/library/debug:tracer", - "//closure/library/disposable", - ], -) - -closure_js_library( - name = "errorhandlerweakdep", - srcs = ["@com_google_javascript_closure_library//:closure/goog/debug/errorhandlerweakdep.js"], - lenient = True, -) - -closure_js_library( - name = "errorreporter", - srcs = ["@com_google_javascript_closure_library//:closure/goog/debug/errorreporter.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/debug", - "//closure/library/debug:entrypointregistry", - "//closure/library/debug:error", - "//closure/library/debug:errorcontext", - "//closure/library/debug:errorhandler", - "//closure/library/events", - "//closure/library/events:event", - "//closure/library/events:eventtarget", - "//closure/library/log", - "//closure/library/net:xhrio", - "//closure/library/object", - "//closure/library/string", - "//closure/library/uri:utils", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "fancywindow", - srcs = ["@com_google_javascript_closure_library//:closure/goog/debug/fancywindow.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/debug:debugwindow", - "//closure/library/debug:logger", - "//closure/library/dom", - "//closure/library/dom:safe", - "//closure/library/dom:tagname", - "//closure/library/html:safehtml", - "//closure/library/html:safestylesheet", - "//closure/library/object", - "//closure/library/string", - "//closure/library/string:const", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "formatter", - srcs = ["@com_google_javascript_closure_library//:closure/goog/debug/formatter.js"], - lenient = True, - deps = [ - "//closure/library/debug", - "//closure/library/debug:logger", - "//closure/library/debug:relativetimeprovider", - "//closure/library/html:safehtml", - "//closure/library/html:safeurl", - "//closure/library/html:uncheckedconversions", - "//closure/library/string:const", - ], -) - -closure_js_library( - name = "fpsdisplay", - srcs = ["@com_google_javascript_closure_library//:closure/goog/debug/fpsdisplay.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/async:animationdelay", - "//closure/library/dom", - "//closure/library/dom:tagname", - "//closure/library/ui:component", - ], -) - -closure_js_library( - name = "logbuffer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/debug/logbuffer.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/debug:logrecord", - ], -) - -closure_js_library( - name = "logger", - srcs = ["@com_google_javascript_closure_library//:closure/goog/debug/logger.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/debug", - "//closure/library/debug:logbuffer", - "//closure/library/debug:logrecord", - ], -) - -closure_js_library( - name = "logrecord", - srcs = ["@com_google_javascript_closure_library//:closure/goog/debug/logrecord.js"], - lenient = True, -) - -closure_js_library( - name = "logrecordserializer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/debug/logrecordserializer.js"], - lenient = True, - deps = [ - "//closure/library/debug:logger", - "//closure/library/debug:logrecord", - "//closure/library/json", - "//closure/library/object", - ], -) - -closure_js_library( - name = "relativetimeprovider", - srcs = ["@com_google_javascript_closure_library//:closure/goog/debug/relativetimeprovider.js"], - lenient = True, -) - -closure_js_library( - name = "tracer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/debug/tracer.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/debug:logger", - "//closure/library/iter", - "//closure/library/log", - "//closure/library/structs:map", - "//closure/library/structs:simplepool", - ], -) diff --git a/closure/library/debug/devcss/BUILD b/closure/library/debug/devcss/BUILD deleted file mode 100644 index 744bfb9561..0000000000 --- a/closure/library/debug/devcss/BUILD +++ /dev/null @@ -1,37 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":devcss", - ":devcssrunner", - ], -) - -closure_js_library( - name = "devcss", - srcs = ["@com_google_javascript_closure_library//:closure/goog/debug/devcss/devcss.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/cssom", - "//closure/library/dom:classlist", - "//closure/library/events", - "//closure/library/events:eventtype", - "//closure/library/string", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "devcssrunner", - srcs = ["@com_google_javascript_closure_library//:closure/goog/debug/devcss/devcssrunner.js"], - lenient = True, - deps = ["//closure/library/debug/devcss"], -) diff --git a/closure/library/delegate/BUILD b/closure/library/delegate/BUILD deleted file mode 100644 index 9407b3f127..0000000000 --- a/closure/library/delegate/BUILD +++ /dev/null @@ -1,32 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":delegateregistry", - ":delegates", - ], -) - -closure_js_library( - name = "delegateregistry", - srcs = ["@com_google_javascript_closure_library//:closure/goog/delegate/delegateregistry.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/debug", - ], -) - -closure_js_library( - name = "delegates", - srcs = ["@com_google_javascript_closure_library//:closure/goog/delegate/delegates.js"], - lenient = True, -) diff --git a/closure/library/disposable/BUILD b/closure/library/disposable/BUILD deleted file mode 100644 index 56c2ab63ee..0000000000 --- a/closure/library/disposable/BUILD +++ /dev/null @@ -1,28 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":disposable", - ":idisposable", - ], -) - -closure_js_library( - name = "disposable", - srcs = ["@com_google_javascript_closure_library//:closure/goog/disposable/disposable.js"], - lenient = True, - deps = ["//closure/library/disposable:idisposable"], -) - -closure_js_library( - name = "idisposable", - srcs = ["@com_google_javascript_closure_library//:closure/goog/disposable/idisposable.js"], - lenient = True, -) diff --git a/closure/library/dom/BUILD b/closure/library/dom/BUILD deleted file mode 100644 index 2bb43e9f2b..0000000000 --- a/closure/library/dom/BUILD +++ /dev/null @@ -1,487 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":abstractmultirange", - ":abstractrange", - ":annotate", - ":asserts", - ":attr", - ":browserfeature", - ":bufferedviewportsizemonitor", - ":classes", - ":classlist", - ":controlrange", - ":dataset", - ":dom", - ":fontsizemonitor", - ":forms", - ":fullscreen", - ":htmlelement", - ":iframe", - ":inputtype", - ":iter", - ":multirange", - ":nodeiterator", - ":nodeoffset", - ":nodetype", - ":range", - ":rangeendpoint", - ":safe", - ":savedcaretrange", - ":savedrange", - ":selection", - ":tagiterator", - ":tagname", - ":tags", - ":textassert", - ":textrange", - ":textrangeiterator", - ":uri", - ":vendor", - ":viewportsizemonitor", - ":xml", - "//closure/library/dom/animationframe:all_js", - "//closure/library/dom/browserrange:all_js", - "//closure/library/dom/pattern:all_js", - ], -) - -closure_js_library( - name = "abstractmultirange", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/abstractmultirange.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/dom", - "//closure/library/dom:abstractrange", - "//closure/library/dom:textrange", - ], -) - -closure_js_library( - name = "abstractrange", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/abstractrange.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/dom:nodetype", - "//closure/library/dom:savedcaretrange", - "//closure/library/dom:tagiterator", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "annotate", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/annotate.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:nodetype", - "//closure/library/dom:safe", - "//closure/library/dom:tagname", - "//closure/library/html:safehtml", - "//closure/library/object", - ], -) - -closure_js_library( - name = "asserts", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/asserts.js"], - lenient = True, - deps = ["//closure/library/asserts"], -) - -closure_js_library( - name = "attr", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/attr.js"], - lenient = True, -) - -closure_js_library( - name = "browserfeature", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/browserfeature.js"], - lenient = True, - deps = ["//closure/library/useragent"], -) - -closure_js_library( - name = "bufferedviewportsizemonitor", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/bufferedviewportsizemonitor.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/async:delay", - "//closure/library/events", - "//closure/library/events:eventtarget", - "//closure/library/events:eventtype", - ], -) - -closure_js_library( - name = "classes", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/classes.js"], - lenient = True, - deps = ["//closure/library/array"], -) - -closure_js_library( - name = "classlist", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/classlist.js"], - lenient = True, - deps = ["//closure/library/array"], -) - -closure_js_library( - name = "controlrange", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/controlrange.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/dom", - "//closure/library/dom:abstractmultirange", - "//closure/library/dom:abstractrange", - "//closure/library/dom:savedrange", - "//closure/library/dom:tagiterator", - "//closure/library/dom:textrange", - "//closure/library/iter", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "dataset", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/dataset.js"], - lenient = True, - deps = [ - "//closure/library/labs/useragent:browser", - "//closure/library/string", - "//closure/library/useragent:product", - ], -) - -closure_js_library( - name = "dom", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/dom.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/dom:browserfeature", - "//closure/library/dom:nodetype", - "//closure/library/dom:safe", - "//closure/library/dom:tagname", - "//closure/library/html:safehtml", - "//closure/library/html:uncheckedconversions", - "//closure/library/math:coordinate", - "//closure/library/math:size", - "//closure/library/object", - "//closure/library/string", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "fontsizemonitor", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/fontsizemonitor.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/dom:tagname", - "//closure/library/events", - "//closure/library/events:eventtarget", - "//closure/library/events:eventtype", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "forms", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/forms.js"], - lenient = True, - deps = [ - "//closure/library/dom:inputtype", - "//closure/library/dom:tagname", - "//closure/library/structs:map", - "//closure/library/window", - ], -) - -closure_js_library( - name = "fullscreen", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/fullscreen.js"], - lenient = True, - deps = ["//closure/library/dom"], -) - -closure_js_library( - name = "htmlelement", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/htmlelement.js"], - lenient = True, -) - -closure_js_library( - name = "iframe", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/iframe.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/dom:safe", - "//closure/library/dom:tagname", - "//closure/library/html:safehtml", - "//closure/library/html:safestyle", - "//closure/library/html:trustedresourceurl", - "//closure/library/string:const", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "inputtype", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/inputtype.js"], - lenient = True, -) - -closure_js_library( - name = "iter", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/iter.js"], - lenient = True, - deps = ["//closure/library/iter"], -) - -closure_js_library( - name = "multirange", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/multirange.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/dom", - "//closure/library/dom:abstractmultirange", - "//closure/library/dom:abstractrange", - "//closure/library/dom:savedrange", - "//closure/library/dom:textrange", - "//closure/library/iter", - "//closure/library/log", - ], -) - -closure_js_library( - name = "nodeiterator", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/nodeiterator.js"], - lenient = True, - deps = ["//closure/library/dom:tagiterator"], -) - -closure_js_library( - name = "nodeoffset", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/nodeoffset.js"], - lenient = True, - deps = [ - "//closure/library/disposable", - "//closure/library/dom:tagname", - ], -) - -closure_js_library( - name = "nodetype", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/nodetype.js"], - lenient = True, -) - -closure_js_library( - name = "range", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/range.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/dom:abstractrange", - "//closure/library/dom:browserfeature", - "//closure/library/dom:controlrange", - "//closure/library/dom:multirange", - "//closure/library/dom:nodetype", - "//closure/library/dom:textrange", - ], -) - -closure_js_library( - name = "rangeendpoint", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/rangeendpoint.js"], - lenient = True, -) - -closure_js_library( - name = "safe", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/safe.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/dom:asserts", - "//closure/library/functions", - "//closure/library/html:safehtml", - "//closure/library/html:safescript", - "//closure/library/html:safestyle", - "//closure/library/html:safeurl", - "//closure/library/html:trustedresourceurl", - "//closure/library/html:uncheckedconversions", - "//closure/library/string:const", - "//closure/library/string:internal", - ], -) - -closure_js_library( - name = "savedcaretrange", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/savedcaretrange.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/dom", - "//closure/library/dom:savedrange", - "//closure/library/dom:tagname", - "//closure/library/string", - ], -) - -closure_js_library( - name = "savedrange", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/savedrange.js"], - lenient = True, - deps = [ - "//closure/library/disposable", - "//closure/library/log", - ], -) - -closure_js_library( - name = "selection", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/selection.js"], - lenient = True, - deps = [ - "//closure/library/dom:inputtype", - "//closure/library/string", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "tagiterator", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/tagiterator.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/dom:nodetype", - "//closure/library/iter", - ], -) - -closure_js_library( - name = "tagname", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/tagname.js"], - lenient = True, - deps = ["//closure/library/dom:htmlelement"], -) - -closure_js_library( - name = "tags", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/tags.js"], - lenient = True, - deps = ["//closure/library/object"], -) - -closure_js_library( - name = "textassert", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/textassert.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:tagname", - ], -) - -closure_js_library( - name = "textrange", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/textrange.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/dom", - "//closure/library/dom:abstractrange", - "//closure/library/dom:savedrange", - "//closure/library/dom:tagname", - "//closure/library/dom:textrangeiterator", - "//closure/library/dom/browserrange", - "//closure/library/string", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "textrangeiterator", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/textrangeiterator.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/dom", - "//closure/library/dom:abstractrange", - "//closure/library/dom:nodetype", - "//closure/library/dom:tagname", - "//closure/library/iter", - ], -) - -closure_js_library( - name = "uri", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/uri.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/dom:safe", - "//closure/library/dom:tagname", - "//closure/library/html:uncheckedconversions", - "//closure/library/string:const", - ], -) - -closure_js_library( - name = "vendor", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/vendor.js"], - lenient = True, - deps = [ - "//closure/library/string", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "viewportsizemonitor", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/viewportsizemonitor.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/events", - "//closure/library/events:eventtarget", - "//closure/library/events:eventtype", - "//closure/library/math:size", - ], -) - -closure_js_library( - name = "xml", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/xml.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/dom:nodetype", - "//closure/library/useragent", - ], -) diff --git a/closure/library/dom/animationframe/BUILD b/closure/library/dom/animationframe/BUILD deleted file mode 100644 index fdd62964d0..0000000000 --- a/closure/library/dom/animationframe/BUILD +++ /dev/null @@ -1,28 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":animationframe", - ":polyfill", - ], -) - -closure_js_library( - name = "animationframe", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/animationframe/animationframe.js"], - lenient = True, - deps = ["//closure/library/dom/animationframe:polyfill"], -) - -closure_js_library( - name = "polyfill", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/animationframe/polyfill.js"], - lenient = True, -) diff --git a/closure/library/dom/browserrange/BUILD b/closure/library/dom/browserrange/BUILD deleted file mode 100644 index ea286cd41e..0000000000 --- a/closure/library/dom/browserrange/BUILD +++ /dev/null @@ -1,114 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":abstractrange", - ":browserrange", - ":geckorange", - ":ierange", - ":operarange", - ":w3crange", - ":webkitrange", - ], -) - -closure_js_library( - name = "abstractrange", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/browserrange/abstractrange.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:nodetype", - "//closure/library/dom:rangeendpoint", - "//closure/library/dom:tagname", - "//closure/library/dom:textrangeiterator", - "//closure/library/iter", - "//closure/library/math:coordinate", - "//closure/library/string", - "//closure/library/string:stringbuffer", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "browserrange", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/browserrange/browserrange.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/dom:browserfeature", - "//closure/library/dom:nodetype", - "//closure/library/dom/browserrange:geckorange", - "//closure/library/dom/browserrange:ierange", - "//closure/library/dom/browserrange:operarange", - "//closure/library/dom/browserrange:w3crange", - "//closure/library/dom/browserrange:webkitrange", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "geckorange", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/browserrange/geckorange.js"], - lenient = True, - deps = ["//closure/library/dom/browserrange:w3crange"], -) - -closure_js_library( - name = "ierange", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/browserrange/ierange.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/dom", - "//closure/library/dom:nodetype", - "//closure/library/dom:rangeendpoint", - "//closure/library/dom:tagname", - "//closure/library/dom/browserrange:abstractrange", - "//closure/library/log", - "//closure/library/string", - ], -) - -closure_js_library( - name = "operarange", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/browserrange/operarange.js"], - lenient = True, - deps = ["//closure/library/dom/browserrange:w3crange"], -) - -closure_js_library( - name = "w3crange", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/browserrange/w3crange.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/dom", - "//closure/library/dom:nodetype", - "//closure/library/dom:rangeendpoint", - "//closure/library/dom:tagname", - "//closure/library/dom/browserrange:abstractrange", - "//closure/library/string", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "webkitrange", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/browserrange/webkitrange.js"], - lenient = True, - deps = [ - "//closure/library/dom:rangeendpoint", - "//closure/library/dom/browserrange:w3crange", - "//closure/library/useragent", - ], -) diff --git a/closure/library/dom/pattern/BUILD b/closure/library/dom/pattern/BUILD deleted file mode 100644 index 34e0452a9c..0000000000 --- a/closure/library/dom/pattern/BUILD +++ /dev/null @@ -1,159 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":abstractpattern", - ":allchildren", - ":childmatches", - ":endtag", - ":fulltag", - ":matcher", - ":nodetype", - ":pattern", - ":repeat", - ":sequence", - ":starttag", - ":tag", - ":text", - "//closure/library/dom/pattern/callback:all_js", - ], -) - -closure_js_library( - name = "abstractpattern", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/pattern/abstractpattern.js"], - lenient = True, - deps = [ - "//closure/library/dom:tagiterator", - "//closure/library/dom/pattern", - ], -) - -closure_js_library( - name = "allchildren", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/pattern/allchildren.js"], - lenient = True, - deps = [ - "//closure/library/dom/pattern", - "//closure/library/dom/pattern:abstractpattern", - ], -) - -closure_js_library( - name = "childmatches", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/pattern/childmatches.js"], - lenient = True, - deps = [ - "//closure/library/dom/pattern", - "//closure/library/dom/pattern:allchildren", - ], -) - -closure_js_library( - name = "endtag", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/pattern/endtag.js"], - lenient = True, - deps = [ - "//closure/library/dom:tagiterator", - "//closure/library/dom/pattern:tag", - ], -) - -closure_js_library( - name = "fulltag", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/pattern/fulltag.js"], - lenient = True, - deps = [ - "//closure/library/dom/pattern", - "//closure/library/dom/pattern:starttag", - "//closure/library/dom/pattern:tag", - ], -) - -closure_js_library( - name = "matcher", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/pattern/matcher.js"], - lenient = True, - deps = [ - "//closure/library/dom:tagiterator", - "//closure/library/dom/pattern", - "//closure/library/iter", - ], -) - -closure_js_library( - name = "nodetype", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/pattern/nodetype.js"], - lenient = True, - deps = [ - "//closure/library/dom/pattern", - "//closure/library/dom/pattern:abstractpattern", - ], -) - -closure_js_library( - name = "pattern", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/pattern/pattern.js"], - lenient = True, -) - -closure_js_library( - name = "repeat", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/pattern/repeat.js"], - lenient = True, - deps = [ - "//closure/library/dom:nodetype", - "//closure/library/dom/pattern", - "//closure/library/dom/pattern:abstractpattern", - ], -) - -closure_js_library( - name = "sequence", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/pattern/sequence.js"], - lenient = True, - deps = [ - "//closure/library/dom:nodetype", - "//closure/library/dom/pattern", - "//closure/library/dom/pattern:abstractpattern", - ], -) - -closure_js_library( - name = "starttag", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/pattern/starttag.js"], - lenient = True, - deps = [ - "//closure/library/dom:tagiterator", - "//closure/library/dom/pattern:tag", - ], -) - -closure_js_library( - name = "tag", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/pattern/tag.js"], - lenient = True, - deps = [ - "//closure/library/dom/pattern", - "//closure/library/dom/pattern:abstractpattern", - "//closure/library/object", - ], -) - -closure_js_library( - name = "text", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/pattern/text.js"], - lenient = True, - deps = [ - "//closure/library/dom:nodetype", - "//closure/library/dom/pattern", - "//closure/library/dom/pattern:abstractpattern", - ], -) diff --git a/closure/library/dom/pattern/callback/BUILD b/closure/library/dom/pattern/callback/BUILD deleted file mode 100644 index f99083acdb..0000000000 --- a/closure/library/dom/pattern/callback/BUILD +++ /dev/null @@ -1,40 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":callback", - ":counter", - ":test", - ], -) - -closure_js_library( - name = "callback", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/pattern/callback/callback.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/dom:tagiterator", - "//closure/library/iter", - ], -) - -closure_js_library( - name = "counter", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/pattern/callback/counter.js"], - lenient = True, -) - -closure_js_library( - name = "test", - srcs = ["@com_google_javascript_closure_library//:closure/goog/dom/pattern/callback/test.js"], - lenient = True, - deps = ["//closure/library/iter"], -) diff --git a/closure/library/editor/BUILD b/closure/library/editor/BUILD deleted file mode 100644 index 83f0610ef5..0000000000 --- a/closure/library/editor/BUILD +++ /dev/null @@ -1,275 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":browserfeature", - ":clicktoeditwrapper", - ":command", - ":contenteditablefield", - ":defines", - ":field", - ":focus", - ":icontent", - ":link", - ":node", - ":plugin", - ":plugin_impl", - ":range", - ":seamlessfield", - ":style", - ":table", - "//closure/library/editor/plugins:all_js", - ], -) - -closure_js_library( - name = "browserfeature", - srcs = ["@com_google_javascript_closure_library//:closure/goog/editor/browserfeature.js"], - lenient = True, - deps = [ - "//closure/library/editor:defines", - "//closure/library/labs/useragent:browser", - "//closure/library/useragent", - "//closure/library/useragent:product", - "//closure/library/useragent:product_isversion", - ], -) - -closure_js_library( - name = "clicktoeditwrapper", - srcs = ["@com_google_javascript_closure_library//:closure/goog/editor/clicktoeditwrapper.js"], - lenient = True, - deps = [ - "//closure/library/disposable", - "//closure/library/dom", - "//closure/library/dom:range", - "//closure/library/dom:tagname", - "//closure/library/editor:browserfeature", - "//closure/library/editor:command", - "//closure/library/editor:field", - "//closure/library/editor:range", - "//closure/library/events:browserevent", - "//closure/library/events:eventhandler", - "//closure/library/events:eventtype", - ], -) - -closure_js_library( - name = "command", - srcs = ["@com_google_javascript_closure_library//:closure/goog/editor/command.js"], - lenient = True, -) - -closure_js_library( - name = "contenteditablefield", - srcs = ["@com_google_javascript_closure_library//:closure/goog/editor/contenteditablefield.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/editor:field", - "//closure/library/log", - ], -) - -closure_js_library( - name = "defines", - srcs = ["@com_google_javascript_closure_library//:closure/goog/editor/defines.js"], - lenient = True, -) - -closure_js_library( - name = "field", - srcs = ["@com_google_javascript_closure_library//:closure/goog/editor/field.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria", - "//closure/library/a11y/aria:roles", - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/async:delay", - "//closure/library/dom", - "//closure/library/dom:classlist", - "//closure/library/dom:range", - "//closure/library/dom:safe", - "//closure/library/dom:tagname", - "//closure/library/editor:browserfeature", - "//closure/library/editor:command", - "//closure/library/editor:icontent", - "//closure/library/editor:node", - "//closure/library/editor:plugin_impl", - "//closure/library/editor:range", - "//closure/library/events", - "//closure/library/events:eventhandler", - "//closure/library/events:eventtarget", - "//closure/library/events:eventtype", - "//closure/library/events:keycodes", - "//closure/library/functions", - "//closure/library/html:safehtml", - "//closure/library/html:safestylesheet", - "//closure/library/log", - "//closure/library/string", - "//closure/library/style", - "//closure/library/useragent", - "//closure/library/useragent:product", - ], -) - -closure_js_library( - name = "focus", - srcs = ["@com_google_javascript_closure_library//:closure/goog/editor/focus.js"], - lenient = True, - deps = ["//closure/library/dom:selection"], -) - -closure_js_library( - name = "icontent", - srcs = ["@com_google_javascript_closure_library//:closure/goog/editor/icontent.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/editor:browserfeature", - "//closure/library/style", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "link", - srcs = ["@com_google_javascript_closure_library//:closure/goog/editor/link.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/dom", - "//closure/library/dom:nodetype", - "//closure/library/dom:range", - "//closure/library/dom:tagname", - "//closure/library/editor:browserfeature", - "//closure/library/editor:command", - "//closure/library/editor:field", - "//closure/library/editor:node", - "//closure/library/editor:range", - "//closure/library/string", - "//closure/library/uri:utils", - ], -) - -closure_js_library( - name = "node", - srcs = ["@com_google_javascript_closure_library//:closure/goog/editor/node.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/dom:iter", - "//closure/library/dom:nodetype", - "//closure/library/dom:tagname", - "//closure/library/iter", - "//closure/library/object", - "//closure/library/string", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "plugin", - srcs = ["@com_google_javascript_closure_library//:closure/goog/editor/plugin.js"], - lenient = True, - deps = [ - "//closure/library/editor:field", - "//closure/library/editor:plugin_impl", - ], -) - -closure_js_library( - name = "plugin_impl", - srcs = ["@com_google_javascript_closure_library//:closure/goog/editor/plugin_impl.js"], - lenient = True, - deps = [ - "//closure/library/events:eventtarget", - "//closure/library/functions", - "//closure/library/log", - "//closure/library/object", - "//closure/library/reflect", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "range", - srcs = ["@com_google_javascript_closure_library//:closure/goog/editor/range.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/dom", - "//closure/library/dom:nodetype", - "//closure/library/dom:range", - "//closure/library/dom:rangeendpoint", - "//closure/library/dom:savedcaretrange", - "//closure/library/editor:node", - "//closure/library/editor:style", - "//closure/library/iter", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "seamlessfield", - srcs = ["@com_google_javascript_closure_library//:closure/goog/editor/seamlessfield.js"], - lenient = True, - deps = [ - "//closure/library/cssom/iframe:style", - "//closure/library/dom", - "//closure/library/dom:range", - "//closure/library/dom:safe", - "//closure/library/dom:tagname", - "//closure/library/editor:browserfeature", - "//closure/library/editor:field", - "//closure/library/editor:icontent", - "//closure/library/editor:node", - "//closure/library/events", - "//closure/library/events:eventtype", - "//closure/library/html:safehtml", - "//closure/library/log", - "//closure/library/style", - ], -) - -closure_js_library( - name = "style", - srcs = ["@com_google_javascript_closure_library//:closure/goog/editor/style.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:nodetype", - "//closure/library/dom:tagname", - "//closure/library/editor:browserfeature", - "//closure/library/events:eventhandler", - "//closure/library/events:eventtype", - "//closure/library/object", - "//closure/library/style", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "table", - srcs = ["@com_google_javascript_closure_library//:closure/goog/editor/table.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:nodetype", - "//closure/library/dom:tagname", - "//closure/library/log", - "//closure/library/string", - "//closure/library/style", - ], -) diff --git a/closure/library/editor/plugins/BUILD b/closure/library/editor/plugins/BUILD deleted file mode 100644 index f14d9f8e21..0000000000 --- a/closure/library/editor/plugins/BUILD +++ /dev/null @@ -1,387 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":abstractbubbleplugin", - ":abstractdialogplugin", - ":abstracttabhandler", - ":basictextformatter", - ":blockquote", - ":emoticons", - ":enterhandler", - ":firststrong", - ":headerformatter", - ":linkbubble", - ":linkdialogplugin", - ":linkshortcutplugin", - ":listtabhandler", - ":loremipsum", - ":removeformatting", - ":spacestabhandler", - ":tableeditor", - ":tagonenterhandler", - ":undoredo", - ":undoredomanager", - ":undoredostate", - ], -) - -closure_js_library( - name = "abstractbubbleplugin", - srcs = ["@com_google_javascript_closure_library//:closure/goog/editor/plugins/abstractbubbleplugin.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/dom", - "//closure/library/dom:classlist", - "//closure/library/dom:nodetype", - "//closure/library/dom:range", - "//closure/library/dom:tagname", - "//closure/library/editor:plugin", - "//closure/library/editor:style", - "//closure/library/events", - "//closure/library/events:actioneventwrapper", - "//closure/library/events:eventhandler", - "//closure/library/events:eventtype", - "//closure/library/events:keycodes", - "//closure/library/functions", - "//closure/library/string", - "//closure/library/ui:component", - "//closure/library/ui/editor:bubble", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "abstractdialogplugin", - srcs = ["@com_google_javascript_closure_library//:closure/goog/editor/plugins/abstractdialogplugin.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/dom:range", - "//closure/library/editor:field", - "//closure/library/editor:plugin", - "//closure/library/editor:range", - "//closure/library/events", - "//closure/library/ui/editor:abstractdialog", - ], -) - -closure_js_library( - name = "abstracttabhandler", - srcs = ["@com_google_javascript_closure_library//:closure/goog/editor/plugins/abstracttabhandler.js"], - lenient = True, - deps = [ - "//closure/library/editor:plugin", - "//closure/library/events:keycodes", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "basictextformatter", - srcs = ["@com_google_javascript_closure_library//:closure/goog/editor/plugins/basictextformatter.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/dom", - "//closure/library/dom:nodetype", - "//closure/library/dom:range", - "//closure/library/dom:tagname", - "//closure/library/editor:browserfeature", - "//closure/library/editor:command", - "//closure/library/editor:link", - "//closure/library/editor:node", - "//closure/library/editor:plugin", - "//closure/library/editor:range", - "//closure/library/editor:style", - "//closure/library/iter", - "//closure/library/log", - "//closure/library/object", - "//closure/library/string", - "//closure/library/style", - "//closure/library/ui/editor:messages", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "blockquote", - srcs = ["@com_google_javascript_closure_library//:closure/goog/editor/plugins/blockquote.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/dom:classlist", - "//closure/library/dom:nodetype", - "//closure/library/dom:tagname", - "//closure/library/editor:browserfeature", - "//closure/library/editor:command", - "//closure/library/editor:node", - "//closure/library/editor:plugin", - "//closure/library/functions", - "//closure/library/log", - ], -) - -closure_js_library( - name = "emoticons", - srcs = ["@com_google_javascript_closure_library//:closure/goog/editor/plugins/emoticons.js"], - lenient = True, - deps = [ - "//closure/library/dom:tagname", - "//closure/library/editor:plugin", - "//closure/library/editor:range", - "//closure/library/functions", - "//closure/library/ui/emoji", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "enterhandler", - srcs = ["@com_google_javascript_closure_library//:closure/goog/editor/plugins/enterhandler.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/dom:nodeoffset", - "//closure/library/dom:nodetype", - "//closure/library/dom:range", - "//closure/library/dom:tagname", - "//closure/library/editor:browserfeature", - "//closure/library/editor:node", - "//closure/library/editor:plugin", - "//closure/library/editor:range", - "//closure/library/editor:style", - "//closure/library/editor/plugins:blockquote", - "//closure/library/events:keycodes", - "//closure/library/functions", - "//closure/library/object", - "//closure/library/string", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "firststrong", - srcs = ["@com_google_javascript_closure_library//:closure/goog/editor/plugins/firststrong.js"], - lenient = True, - deps = [ - "//closure/library/dom:nodetype", - "//closure/library/dom:tagiterator", - "//closure/library/dom:tagname", - "//closure/library/editor:command", - "//closure/library/editor:field", - "//closure/library/editor:node", - "//closure/library/editor:plugin", - "//closure/library/editor:range", - "//closure/library/i18n:bidi", - "//closure/library/i18n:uchar", - "//closure/library/iter", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "headerformatter", - srcs = ["@com_google_javascript_closure_library//:closure/goog/editor/plugins/headerformatter.js"], - lenient = True, - deps = [ - "//closure/library/editor:command", - "//closure/library/editor:plugin", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "linkbubble", - srcs = ["@com_google_javascript_closure_library//:closure/goog/editor/plugins/linkbubble.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/dom", - "//closure/library/dom:range", - "//closure/library/dom:tagname", - "//closure/library/editor:command", - "//closure/library/editor:link", - "//closure/library/editor/plugins:abstractbubbleplugin", - "//closure/library/functions", - "//closure/library/string", - "//closure/library/style", - "//closure/library/ui/editor:messages", - "//closure/library/uri:utils", - "//closure/library/window", - ], -) - -closure_js_library( - name = "linkdialogplugin", - srcs = ["@com_google_javascript_closure_library//:closure/goog/editor/plugins/linkdialogplugin.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/dom", - "//closure/library/editor:command", - "//closure/library/editor/plugins:abstractdialogplugin", - "//closure/library/events:eventhandler", - "//closure/library/functions", - "//closure/library/ui/editor:abstractdialog", - "//closure/library/ui/editor:linkdialog", - "//closure/library/uri:utils", - ], -) - -closure_js_library( - name = "linkshortcutplugin", - srcs = ["@com_google_javascript_closure_library//:closure/goog/editor/plugins/linkshortcutplugin.js"], - lenient = True, - deps = [ - "//closure/library/editor:command", - "//closure/library/editor:plugin", - ], -) - -closure_js_library( - name = "listtabhandler", - srcs = ["@com_google_javascript_closure_library//:closure/goog/editor/plugins/listtabhandler.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/dom:tagname", - "//closure/library/editor:command", - "//closure/library/editor/plugins:abstracttabhandler", - "//closure/library/iter", - ], -) - -closure_js_library( - name = "loremipsum", - srcs = ["@com_google_javascript_closure_library//:closure/goog/editor/plugins/loremipsum.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/editor:command", - "//closure/library/editor:field", - "//closure/library/editor:node", - "//closure/library/editor:plugin", - "//closure/library/functions", - "//closure/library/html:safehtml", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "removeformatting", - srcs = ["@com_google_javascript_closure_library//:closure/goog/editor/plugins/removeformatting.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/dom:nodetype", - "//closure/library/dom:range", - "//closure/library/dom:tagname", - "//closure/library/editor:browserfeature", - "//closure/library/editor:node", - "//closure/library/editor:plugin", - "//closure/library/editor:range", - "//closure/library/string", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "spacestabhandler", - srcs = ["@com_google_javascript_closure_library//:closure/goog/editor/plugins/spacestabhandler.js"], - lenient = True, - deps = [ - "//closure/library/dom:tagname", - "//closure/library/editor:range", - "//closure/library/editor/plugins:abstracttabhandler", - ], -) - -closure_js_library( - name = "tableeditor", - srcs = ["@com_google_javascript_closure_library//:closure/goog/editor/plugins/tableeditor.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/dom", - "//closure/library/dom:range", - "//closure/library/dom:tagname", - "//closure/library/editor:node", - "//closure/library/editor:plugin", - "//closure/library/editor:range", - "//closure/library/editor:table", - "//closure/library/object", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "tagonenterhandler", - srcs = ["@com_google_javascript_closure_library//:closure/goog/editor/plugins/tagonenterhandler.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/dom:nodetype", - "//closure/library/dom:range", - "//closure/library/dom:tagname", - "//closure/library/editor:command", - "//closure/library/editor:node", - "//closure/library/editor:range", - "//closure/library/editor:style", - "//closure/library/editor/plugins:enterhandler", - "//closure/library/events:keycodes", - "//closure/library/functions", - "//closure/library/string", - "//closure/library/style", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "undoredo", - srcs = ["@com_google_javascript_closure_library//:closure/goog/editor/plugins/undoredo.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/dom:nodeoffset", - "//closure/library/dom:range", - "//closure/library/editor:browserfeature", - "//closure/library/editor:command", - "//closure/library/editor:field", - "//closure/library/editor:node", - "//closure/library/editor:plugin", - "//closure/library/editor/plugins:undoredomanager", - "//closure/library/editor/plugins:undoredostate", - "//closure/library/events", - "//closure/library/events:eventhandler", - "//closure/library/log", - "//closure/library/object", - ], -) - -closure_js_library( - name = "undoredomanager", - srcs = ["@com_google_javascript_closure_library//:closure/goog/editor/plugins/undoredomanager.js"], - lenient = True, - deps = [ - "//closure/library/editor/plugins:undoredostate", - "//closure/library/events", - "//closure/library/events:eventtarget", - ], -) - -closure_js_library( - name = "undoredostate", - srcs = ["@com_google_javascript_closure_library//:closure/goog/editor/plugins/undoredostate.js"], - lenient = True, - deps = ["//closure/library/events:eventtarget"], -) diff --git a/closure/library/events/BUILD b/closure/library/events/BUILD deleted file mode 100644 index b7edd60ae6..0000000000 --- a/closure/library/events/BUILD +++ /dev/null @@ -1,364 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":actioneventwrapper", - ":actionhandler", - ":browserevent", - ":browserfeature", - ":event", - ":eventhandler", - ":eventid", - ":events", - ":eventtarget", - ":eventtype", - ":eventwrapper", - ":filedrophandler", - ":focushandler", - ":imehandler", - ":inputhandler", - ":keycodes", - ":keyhandler", - ":keynames", - ":keys", - ":listenable", - ":listener", - ":listenermap", - ":mousewheelhandler", - ":onlinehandler", - ":pastehandler", - ":wheelevent", - ":wheelhandler", - ], -) - -closure_js_library( - name = "actioneventwrapper", - srcs = ["@com_google_javascript_closure_library//:closure/goog/events/actioneventwrapper.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria", - "//closure/library/a11y/aria:roles", - "//closure/library/dom", - "//closure/library/events", - "//closure/library/events:eventhandler", - "//closure/library/events:eventtype", - "//closure/library/events:eventwrapper", - "//closure/library/events:keycodes", - ], -) - -closure_js_library( - name = "actionhandler", - srcs = ["@com_google_javascript_closure_library//:closure/goog/events/actionhandler.js"], - lenient = True, - deps = [ - "//closure/library/events", - "//closure/library/events:browserevent", - "//closure/library/events:eventtarget", - "//closure/library/events:eventtype", - "//closure/library/events:keycodes", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "browserevent", - srcs = ["@com_google_javascript_closure_library//:closure/goog/events/browserevent.js"], - lenient = True, - deps = [ - "//closure/library/debug", - "//closure/library/events:browserfeature", - "//closure/library/events:event", - "//closure/library/events:eventtype", - "//closure/library/reflect", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "browserfeature", - srcs = ["@com_google_javascript_closure_library//:closure/goog/events/browserfeature.js"], - lenient = True, - deps = ["//closure/library/useragent"], -) - -closure_js_library( - name = "event", - srcs = ["@com_google_javascript_closure_library//:closure/goog/events/event.js"], - lenient = True, - deps = [ - "//closure/library/disposable", - "//closure/library/events:eventid", - ], -) - -closure_js_library( - name = "eventhandler", - srcs = ["@com_google_javascript_closure_library//:closure/goog/events/eventhandler.js"], - lenient = True, - deps = [ - "//closure/library/disposable", - "//closure/library/events", - "//closure/library/object", - ], -) - -closure_js_library( - name = "eventid", - srcs = ["@com_google_javascript_closure_library//:closure/goog/events/eventid.js"], - lenient = True, -) - -closure_js_library( - name = "events", - srcs = ["@com_google_javascript_closure_library//:closure/goog/events/events.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/debug:entrypointregistry", - "//closure/library/events:browserevent", - "//closure/library/events:browserfeature", - "//closure/library/events:listenable", - "//closure/library/events:listenermap", - ], -) - -closure_js_library( - name = "eventtarget", - srcs = ["@com_google_javascript_closure_library//:closure/goog/events/eventtarget.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/disposable", - "//closure/library/events", - "//closure/library/events:event", - "//closure/library/events:listenable", - "//closure/library/events:listenermap", - "//closure/library/object", - ], -) - -closure_js_library( - name = "eventtargettester", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/events/eventtargettester.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/events", - "//closure/library/events:event", - "//closure/library/events:eventtarget", - "//closure/library/testing:asserts", - "//closure/library/testing:recordfunction", - ], -) - -closure_js_library( - name = "eventtype", - srcs = ["@com_google_javascript_closure_library//:closure/goog/events/eventtype.js"], - lenient = True, - deps = [ - "//closure/library/events:browserfeature", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "eventwrapper", - srcs = ["@com_google_javascript_closure_library//:closure/goog/events/eventwrapper.js"], - lenient = True, -) - -closure_js_library( - name = "filedrophandler", - srcs = ["@com_google_javascript_closure_library//:closure/goog/events/filedrophandler.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/dom", - "//closure/library/events:browserevent", - "//closure/library/events:eventhandler", - "//closure/library/events:eventtarget", - "//closure/library/events:eventtype", - "//closure/library/log", - ], -) - -closure_js_library( - name = "focushandler", - srcs = ["@com_google_javascript_closure_library//:closure/goog/events/focushandler.js"], - lenient = True, - deps = [ - "//closure/library/events", - "//closure/library/events:browserevent", - "//closure/library/events:eventtarget", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "imehandler", - srcs = ["@com_google_javascript_closure_library//:closure/goog/events/imehandler.js"], - lenient = True, - deps = [ - "//closure/library/events:event", - "//closure/library/events:eventhandler", - "//closure/library/events:eventtarget", - "//closure/library/events:eventtype", - "//closure/library/events:keycodes", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "inputhandler", - srcs = ["@com_google_javascript_closure_library//:closure/goog/events/inputhandler.js"], - lenient = True, - deps = [ - "//closure/library/dom:tagname", - "//closure/library/events:browserevent", - "//closure/library/events:eventhandler", - "//closure/library/events:eventtarget", - "//closure/library/events:keycodes", - "//closure/library/timer", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "keycodes", - srcs = ["@com_google_javascript_closure_library//:closure/goog/events/keycodes.js"], - lenient = True, - deps = ["//closure/library/useragent"], -) - -closure_js_library( - name = "keyhandler", - srcs = ["@com_google_javascript_closure_library//:closure/goog/events/keyhandler.js"], - lenient = True, - deps = [ - "//closure/library/events", - "//closure/library/events:browserevent", - "//closure/library/events:eventtarget", - "//closure/library/events:eventtype", - "//closure/library/events:keycodes", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "keynames", - srcs = ["@com_google_javascript_closure_library//:closure/goog/events/keynames.js"], - lenient = True, -) - -closure_js_library( - name = "keys", - srcs = ["@com_google_javascript_closure_library//:closure/goog/events/keys.js"], - lenient = True, -) - -closure_js_library( - name = "listenable", - srcs = ["@com_google_javascript_closure_library//:closure/goog/events/listenable.js"], - lenient = True, - deps = ["//closure/library/events:eventid"], -) - -closure_js_library( - name = "listener", - srcs = ["@com_google_javascript_closure_library//:closure/goog/events/listener.js"], - lenient = True, - deps = ["//closure/library/events:listenable"], -) - -closure_js_library( - name = "listenermap", - srcs = ["@com_google_javascript_closure_library//:closure/goog/events/listenermap.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/events:listener", - "//closure/library/object", - ], -) - -closure_js_library( - name = "mousewheelhandler", - srcs = ["@com_google_javascript_closure_library//:closure/goog/events/mousewheelhandler.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/events", - "//closure/library/events:browserevent", - "//closure/library/events:eventtarget", - "//closure/library/math", - "//closure/library/style", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "onlinehandler", - srcs = ["@com_google_javascript_closure_library//:closure/goog/events/onlinehandler.js"], - lenient = True, - deps = [ - "//closure/library/events:browserfeature", - "//closure/library/events:eventhandler", - "//closure/library/events:eventtarget", - "//closure/library/events:eventtype", - "//closure/library/net:networkstatusmonitor", - "//closure/library/timer", - ], -) - -closure_js_library( - name = "pastehandler", - srcs = ["@com_google_javascript_closure_library//:closure/goog/events/pastehandler.js"], - lenient = True, - deps = [ - "//closure/library/async:conditionaldelay", - "//closure/library/events:browserevent", - "//closure/library/events:eventhandler", - "//closure/library/events:eventtarget", - "//closure/library/events:eventtype", - "//closure/library/events:keycodes", - "//closure/library/log", - "//closure/library/timer", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "wheelevent", - srcs = ["@com_google_javascript_closure_library//:closure/goog/events/wheelevent.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/events:browserevent", - ], -) - -closure_js_library( - name = "wheelhandler", - srcs = ["@com_google_javascript_closure_library//:closure/goog/events/wheelhandler.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/events", - "//closure/library/events:eventtarget", - "//closure/library/events:wheelevent", - "//closure/library/style", - "//closure/library/useragent", - "//closure/library/useragent:product", - "//closure/library/useragent:product_isversion", - ], -) diff --git a/closure/library/format/BUILD b/closure/library/format/BUILD deleted file mode 100644 index 6f606378e4..0000000000 --- a/closure/library/format/BUILD +++ /dev/null @@ -1,69 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":emailaddress", - ":format", - ":htmlprettyprinter", - ":internationalizedemailaddress", - ":jsonprettyprinter", - ], -) - -closure_js_library( - name = "emailaddress", - srcs = ["@com_google_javascript_closure_library//:closure/goog/format/emailaddress.js"], - lenient = True, - deps = ["//closure/library/string"], -) - -closure_js_library( - name = "format", - srcs = ["@com_google_javascript_closure_library//:closure/goog/format/format.js"], - lenient = True, - deps = [ - "//closure/library/i18n:graphemebreak", - "//closure/library/string", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "htmlprettyprinter", - srcs = ["@com_google_javascript_closure_library//:closure/goog/format/htmlprettyprinter.js"], - lenient = True, - deps = [ - "//closure/library/dom:tagname", - "//closure/library/object", - "//closure/library/string:stringbuffer", - ], -) - -closure_js_library( - name = "internationalizedemailaddress", - srcs = ["@com_google_javascript_closure_library//:closure/goog/format/internationalizedemailaddress.js"], - lenient = True, - deps = [ - "//closure/library/format:emailaddress", - "//closure/library/string", - ], -) - -closure_js_library( - name = "jsonprettyprinter", - srcs = ["@com_google_javascript_closure_library//:closure/goog/format/jsonprettyprinter.js"], - lenient = True, - deps = [ - "//closure/library/html:safehtml", - "//closure/library/json", - "//closure/library/string", - "//closure/library/string:stringformat", - ], -) diff --git a/closure/library/fs/BUILD b/closure/library/fs/BUILD deleted file mode 100644 index 831cece8f6..0000000000 --- a/closure/library/fs/BUILD +++ /dev/null @@ -1,134 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":entry", - ":entryimpl", - ":error", - ":filereader", - ":filesaver", - ":filesystem", - ":filesystemimpl", - ":filewriter", - ":fs", - ":progressevent", - ":url", - ], -) - -closure_js_library( - name = "entry", - srcs = ["@com_google_javascript_closure_library//:closure/goog/fs/entry.js"], - lenient = True, -) - -closure_js_library( - name = "entryimpl", - srcs = ["@com_google_javascript_closure_library//:closure/goog/fs/entryimpl.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/fs:entry", - "//closure/library/fs:error", - "//closure/library/fs:filewriter", - "//closure/library/functions", - "//closure/library/string", - "//third_party/closure/library/mochikit/async:deferred", - ], -) - -closure_js_library( - name = "error", - srcs = ["@com_google_javascript_closure_library//:closure/goog/fs/error.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/debug:error", - "//closure/library/object", - "//closure/library/string", - ], -) - -closure_js_library( - name = "filereader", - srcs = ["@com_google_javascript_closure_library//:closure/goog/fs/filereader.js"], - lenient = True, - deps = [ - "//closure/library/events:eventtarget", - "//closure/library/fs:error", - "//closure/library/fs:progressevent", - "//third_party/closure/library/mochikit/async:deferred", - ], -) - -closure_js_library( - name = "filesaver", - srcs = ["@com_google_javascript_closure_library//:closure/goog/fs/filesaver.js"], - lenient = True, - deps = [ - "//closure/library/events:eventtarget", - "//closure/library/fs:error", - "//closure/library/fs:progressevent", - ], -) - -closure_js_library( - name = "filesystem", - srcs = ["@com_google_javascript_closure_library//:closure/goog/fs/filesystem.js"], - lenient = True, -) - -closure_js_library( - name = "filesystemimpl", - srcs = ["@com_google_javascript_closure_library//:closure/goog/fs/filesystemimpl.js"], - lenient = True, - deps = [ - "//closure/library/fs:entryimpl", - "//closure/library/fs:filesystem", - ], -) - -closure_js_library( - name = "filewriter", - srcs = ["@com_google_javascript_closure_library//:closure/goog/fs/filewriter.js"], - lenient = True, - deps = [ - "//closure/library/fs:error", - "//closure/library/fs:filesaver", - ], -) - -closure_js_library( - name = "fs", - srcs = ["@com_google_javascript_closure_library//:closure/goog/fs/fs.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/fs:error", - "//closure/library/fs:filereader", - "//closure/library/fs:filesystemimpl", - "//closure/library/fs:url", - "//closure/library/useragent", - "//third_party/closure/library/mochikit/async:deferred", - ], -) - -closure_js_library( - name = "progressevent", - srcs = ["@com_google_javascript_closure_library//:closure/goog/fs/progressevent.js"], - lenient = True, - deps = ["//closure/library/events:event"], -) - -closure_js_library( - name = "url", - srcs = ["@com_google_javascript_closure_library//:closure/goog/fs/url.js"], - lenient = True, -) diff --git a/closure/library/functions/BUILD b/closure/library/functions/BUILD deleted file mode 100644 index 56c07ccf0c..0000000000 --- a/closure/library/functions/BUILD +++ /dev/null @@ -1,18 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [":functions"], -) - -closure_js_library( - name = "functions", - srcs = ["@com_google_javascript_closure_library//:closure/goog/functions/functions.js"], - lenient = True, -) diff --git a/closure/library/fx/BUILD b/closure/library/fx/BUILD deleted file mode 100644 index 8fc9cd21f4..0000000000 --- a/closure/library/fx/BUILD +++ /dev/null @@ -1,207 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":abstractdragdrop", - ":animation", - ":animationqueue", - ":cssspriteanimation", - ":dom", - ":dragdrop", - ":dragdropgroup", - ":dragger", - ":draglistgroup", - ":dragscrollsupport", - ":easing", - ":fx", - ":transition", - ":transitionbase", - "//closure/library/fx/anim:all_js", - "//closure/library/fx/css3:all_js", - ], -) - -closure_js_library( - name = "abstractdragdrop", - srcs = ["@com_google_javascript_closure_library//:closure/goog/fx/abstractdragdrop.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:classlist", - "//closure/library/events", - "//closure/library/events:event", - "//closure/library/events:eventhandler", - "//closure/library/events:eventtarget", - "//closure/library/events:eventtype", - "//closure/library/fx:dragger", - "//closure/library/math:box", - "//closure/library/math:coordinate", - "//closure/library/style", - ], -) - -closure_js_library( - name = "animation", - srcs = ["@com_google_javascript_closure_library//:closure/goog/fx/animation.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/events:event", - "//closure/library/fx:transition", - "//closure/library/fx:transitionbase", - "//closure/library/fx/anim", - ], -) - -closure_js_library( - name = "animationqueue", - srcs = ["@com_google_javascript_closure_library//:closure/goog/fx/animationqueue.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/events", - "//closure/library/fx:animation", - "//closure/library/fx:transition", - "//closure/library/fx:transitionbase", - ], -) - -closure_js_library( - name = "cssspriteanimation", - srcs = ["@com_google_javascript_closure_library//:closure/goog/fx/cssspriteanimation.js"], - lenient = True, - deps = ["//closure/library/fx:animation"], -) - -closure_js_library( - name = "dom", - srcs = ["@com_google_javascript_closure_library//:closure/goog/fx/dom.js"], - lenient = True, - deps = [ - "//closure/library/color", - "//closure/library/events", - "//closure/library/fx:animation", - "//closure/library/fx:transition", - "//closure/library/style", - "//closure/library/style:bidi", - ], -) - -closure_js_library( - name = "dragdrop", - srcs = ["@com_google_javascript_closure_library//:closure/goog/fx/dragdrop.js"], - lenient = True, - deps = ["//closure/library/fx:abstractdragdrop"], -) - -closure_js_library( - name = "dragdropgroup", - srcs = ["@com_google_javascript_closure_library//:closure/goog/fx/dragdropgroup.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/fx:abstractdragdrop", - ], -) - -closure_js_library( - name = "dragger", - srcs = ["@com_google_javascript_closure_library//:closure/goog/fx/dragger.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/dom:tagname", - "//closure/library/events", - "//closure/library/events:event", - "//closure/library/events:eventhandler", - "//closure/library/events:eventtarget", - "//closure/library/events:eventtype", - "//closure/library/math:coordinate", - "//closure/library/math:rect", - "//closure/library/style", - "//closure/library/style:bidi", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "draglistgroup", - srcs = ["@com_google_javascript_closure_library//:closure/goog/fx/draglistgroup.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:classlist", - "//closure/library/events", - "//closure/library/events:event", - "//closure/library/events:eventhandler", - "//closure/library/events:eventid", - "//closure/library/events:eventtarget", - "//closure/library/events:eventtype", - "//closure/library/fx:dragger", - "//closure/library/math:coordinate", - "//closure/library/string", - "//closure/library/style", - ], -) - -closure_js_library( - name = "dragscrollsupport", - srcs = ["@com_google_javascript_closure_library//:closure/goog/fx/dragscrollsupport.js"], - lenient = True, - deps = [ - "//closure/library/disposable", - "//closure/library/dom", - "//closure/library/events:eventhandler", - "//closure/library/events:eventtype", - "//closure/library/math:coordinate", - "//closure/library/style", - "//closure/library/timer", - ], -) - -closure_js_library( - name = "easing", - srcs = ["@com_google_javascript_closure_library//:closure/goog/fx/easing.js"], - lenient = True, -) - -closure_js_library( - name = "fx", - srcs = ["@com_google_javascript_closure_library//:closure/goog/fx/fx.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/fx:animation", - "//closure/library/fx:easing", - "//closure/library/fx:transition", - ], -) - -closure_js_library( - name = "transition", - srcs = ["@com_google_javascript_closure_library//:closure/goog/fx/transition.js"], - lenient = True, -) - -closure_js_library( - name = "transitionbase", - srcs = ["@com_google_javascript_closure_library//:closure/goog/fx/transitionbase.js"], - lenient = True, - deps = [ - "//closure/library/events:eventtarget", - "//closure/library/fx:transition", - ], -) diff --git a/closure/library/fx/anim/BUILD b/closure/library/fx/anim/BUILD deleted file mode 100644 index b9f9d9236c..0000000000 --- a/closure/library/fx/anim/BUILD +++ /dev/null @@ -1,23 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [":anim"], -) - -closure_js_library( - name = "anim", - srcs = ["@com_google_javascript_closure_library//:closure/goog/fx/anim/anim.js"], - lenient = True, - deps = [ - "//closure/library/async:animationdelay", - "//closure/library/async:delay", - "//closure/library/object", - ], -) diff --git a/closure/library/fx/css3/BUILD b/closure/library/fx/css3/BUILD deleted file mode 100644 index 3ebeb7c8c5..0000000000 --- a/closure/library/fx/css3/BUILD +++ /dev/null @@ -1,35 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":fx", - ":transition", - ], -) - -closure_js_library( - name = "fx", - srcs = ["@com_google_javascript_closure_library//:closure/goog/fx/css3/fx.js"], - lenient = True, - deps = ["//closure/library/fx/css3:transition"], -) - -closure_js_library( - name = "transition", - srcs = ["@com_google_javascript_closure_library//:closure/goog/fx/css3/transition.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/fx:transitionbase", - "//closure/library/style", - "//closure/library/style:transition", - "//closure/library/timer", - ], -) diff --git a/closure/library/graphics/BUILD b/closure/library/graphics/BUILD deleted file mode 100644 index 74eb499816..0000000000 --- a/closure/library/graphics/BUILD +++ /dev/null @@ -1,323 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":abstractgraphics", - ":affinetransform", - ":canvaselement", - ":canvasgraphics", - ":element", - ":ellipseelement", - ":fill", - ":font", - ":graphics", - ":groupelement", - ":imageelement", - ":lineargradient", - ":path", - ":pathelement", - ":paths", - ":rectelement", - ":solidfill", - ":stroke", - ":strokeandfillelement", - ":svgelement", - ":svggraphics", - ":textelement", - ":vmlelement", - ":vmlgraphics", - "//closure/library/graphics/ext:all_js", - ], -) - -closure_js_library( - name = "abstractgraphics", - srcs = ["@com_google_javascript_closure_library//:closure/goog/graphics/abstractgraphics.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/graphics:affinetransform", - "//closure/library/graphics:element", - "//closure/library/graphics:ellipseelement", - "//closure/library/graphics:fill", - "//closure/library/graphics:font", - "//closure/library/graphics:groupelement", - "//closure/library/graphics:path", - "//closure/library/graphics:pathelement", - "//closure/library/graphics:rectelement", - "//closure/library/graphics:stroke", - "//closure/library/graphics:strokeandfillelement", - "//closure/library/graphics:textelement", - "//closure/library/math:coordinate", - "//closure/library/math:size", - "//closure/library/style", - "//closure/library/ui:component", - ], -) - -closure_js_library( - name = "affinetransform", - srcs = ["@com_google_javascript_closure_library//:closure/goog/graphics/affinetransform.js"], - lenient = True, -) - -closure_js_library( - name = "canvaselement", - srcs = ["@com_google_javascript_closure_library//:closure/goog/graphics/canvaselement.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/dom", - "//closure/library/dom:safe", - "//closure/library/dom:tagname", - "//closure/library/graphics:ellipseelement", - "//closure/library/graphics:font", - "//closure/library/graphics:groupelement", - "//closure/library/graphics:imageelement", - "//closure/library/graphics:path", - "//closure/library/graphics:pathelement", - "//closure/library/graphics:rectelement", - "//closure/library/graphics:textelement", - "//closure/library/html:safehtml", - "//closure/library/html:uncheckedconversions", - "//closure/library/math", - "//closure/library/string", - "//closure/library/string:const", - ], -) - -closure_js_library( - name = "canvasgraphics", - srcs = ["@com_google_javascript_closure_library//:closure/goog/graphics/canvasgraphics.js"], - lenient = True, - deps = [ - "//closure/library/dom:tagname", - "//closure/library/events:eventtype", - "//closure/library/graphics:abstractgraphics", - "//closure/library/graphics:canvaselement", - "//closure/library/graphics:font", - "//closure/library/graphics:solidfill", - "//closure/library/math:size", - "//closure/library/style", - ], -) - -closure_js_library( - name = "element", - srcs = ["@com_google_javascript_closure_library//:closure/goog/graphics/element.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/events", - "//closure/library/events:eventtarget", - "//closure/library/events:listenable", - "//closure/library/graphics:affinetransform", - "//closure/library/math", - ], -) - -closure_js_library( - name = "ellipseelement", - srcs = ["@com_google_javascript_closure_library//:closure/goog/graphics/ellipseelement.js"], - lenient = True, - deps = ["//closure/library/graphics:strokeandfillelement"], -) - -closure_js_library( - name = "fill", - srcs = ["@com_google_javascript_closure_library//:closure/goog/graphics/fill.js"], - lenient = True, -) - -closure_js_library( - name = "font", - srcs = ["@com_google_javascript_closure_library//:closure/goog/graphics/font.js"], - lenient = True, -) - -closure_js_library( - name = "graphics", - srcs = ["@com_google_javascript_closure_library//:closure/goog/graphics/graphics.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/graphics:canvasgraphics", - "//closure/library/graphics:svggraphics", - "//closure/library/graphics:vmlgraphics", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "groupelement", - srcs = ["@com_google_javascript_closure_library//:closure/goog/graphics/groupelement.js"], - lenient = True, - deps = ["//closure/library/graphics:element"], -) - -closure_js_library( - name = "imageelement", - srcs = ["@com_google_javascript_closure_library//:closure/goog/graphics/imageelement.js"], - lenient = True, - deps = ["//closure/library/graphics:element"], -) - -closure_js_library( - name = "lineargradient", - srcs = ["@com_google_javascript_closure_library//:closure/goog/graphics/lineargradient.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/graphics:fill", - ], -) - -closure_js_library( - name = "path", - srcs = ["@com_google_javascript_closure_library//:closure/goog/graphics/path.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/graphics:affinetransform", - "//closure/library/math", - ], -) - -closure_js_library( - name = "pathelement", - srcs = ["@com_google_javascript_closure_library//:closure/goog/graphics/pathelement.js"], - lenient = True, - deps = ["//closure/library/graphics:strokeandfillelement"], -) - -closure_js_library( - name = "paths", - srcs = ["@com_google_javascript_closure_library//:closure/goog/graphics/paths.js"], - lenient = True, - deps = [ - "//closure/library/graphics:path", - "//closure/library/math:coordinate", - ], -) - -closure_js_library( - name = "rectelement", - srcs = ["@com_google_javascript_closure_library//:closure/goog/graphics/rectelement.js"], - lenient = True, - deps = ["//closure/library/graphics:strokeandfillelement"], -) - -closure_js_library( - name = "solidfill", - srcs = ["@com_google_javascript_closure_library//:closure/goog/graphics/solidfill.js"], - lenient = True, - deps = ["//closure/library/graphics:fill"], -) - -closure_js_library( - name = "stroke", - srcs = ["@com_google_javascript_closure_library//:closure/goog/graphics/stroke.js"], - lenient = True, -) - -closure_js_library( - name = "strokeandfillelement", - srcs = ["@com_google_javascript_closure_library//:closure/goog/graphics/strokeandfillelement.js"], - lenient = True, - deps = ["//closure/library/graphics:element"], -) - -closure_js_library( - name = "svgelement", - srcs = ["@com_google_javascript_closure_library//:closure/goog/graphics/svgelement.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/graphics:ellipseelement", - "//closure/library/graphics:groupelement", - "//closure/library/graphics:imageelement", - "//closure/library/graphics:pathelement", - "//closure/library/graphics:rectelement", - "//closure/library/graphics:textelement", - ], -) - -closure_js_library( - name = "svggraphics", - srcs = ["@com_google_javascript_closure_library//:closure/goog/graphics/svggraphics.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/events:eventhandler", - "//closure/library/events:eventtype", - "//closure/library/graphics:abstractgraphics", - "//closure/library/graphics:font", - "//closure/library/graphics:lineargradient", - "//closure/library/graphics:path", - "//closure/library/graphics:solidfill", - "//closure/library/graphics:stroke", - "//closure/library/graphics:svgelement", - "//closure/library/math", - "//closure/library/math:size", - "//closure/library/style", - "//closure/library/timer", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "textelement", - srcs = ["@com_google_javascript_closure_library//:closure/goog/graphics/textelement.js"], - lenient = True, - deps = ["//closure/library/graphics:strokeandfillelement"], -) - -closure_js_library( - name = "vmlelement", - srcs = ["@com_google_javascript_closure_library//:closure/goog/graphics/vmlelement.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/graphics:ellipseelement", - "//closure/library/graphics:groupelement", - "//closure/library/graphics:imageelement", - "//closure/library/graphics:pathelement", - "//closure/library/graphics:rectelement", - "//closure/library/graphics:textelement", - ], -) - -closure_js_library( - name = "vmlgraphics", - srcs = ["@com_google_javascript_closure_library//:closure/goog/graphics/vmlgraphics.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/dom:safe", - "//closure/library/dom:tagname", - "//closure/library/events", - "//closure/library/events:eventhandler", - "//closure/library/events:eventtype", - "//closure/library/graphics:abstractgraphics", - "//closure/library/graphics:font", - "//closure/library/graphics:lineargradient", - "//closure/library/graphics:path", - "//closure/library/graphics:solidfill", - "//closure/library/graphics:vmlelement", - "//closure/library/html:uncheckedconversions", - "//closure/library/math", - "//closure/library/math:size", - "//closure/library/reflect", - "//closure/library/string", - "//closure/library/string:const", - "//closure/library/style", - "//closure/library/useragent", - ], -) diff --git a/closure/library/graphics/ext/BUILD b/closure/library/graphics/ext/BUILD deleted file mode 100644 index 5751a14ba0..0000000000 --- a/closure/library/graphics/ext/BUILD +++ /dev/null @@ -1,125 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":coordinates", - ":element", - ":ellipse", - ":ext", - ":graphics", - ":group", - ":image", - ":path", - ":rectangle", - ":shape", - ":strokeandfillelement", - ], -) - -closure_js_library( - name = "coordinates", - srcs = ["@com_google_javascript_closure_library//:closure/goog/graphics/ext/coordinates.js"], - lenient = True, - deps = ["//closure/library/string"], -) - -closure_js_library( - name = "element", - srcs = ["@com_google_javascript_closure_library//:closure/goog/graphics/ext/element.js"], - lenient = True, - deps = [ - "//closure/library/events:eventtarget", - "//closure/library/functions", - "//closure/library/graphics/ext:coordinates", - ], -) - -closure_js_library( - name = "ellipse", - srcs = ["@com_google_javascript_closure_library//:closure/goog/graphics/ext/ellipse.js"], - lenient = True, - deps = ["//closure/library/graphics/ext:strokeandfillelement"], -) - -closure_js_library( - name = "ext", - srcs = ["@com_google_javascript_closure_library//:closure/goog/graphics/ext/ext.js"], - lenient = True, - deps = [ - "//closure/library/graphics/ext:coordinates", - "//closure/library/graphics/ext:ellipse", - "//closure/library/graphics/ext:graphics", - "//closure/library/graphics/ext:group", - "//closure/library/graphics/ext:image", - "//closure/library/graphics/ext:rectangle", - "//closure/library/graphics/ext:shape", - ], -) - -closure_js_library( - name = "graphics", - srcs = ["@com_google_javascript_closure_library//:closure/goog/graphics/ext/graphics.js"], - lenient = True, - deps = [ - "//closure/library/events", - "//closure/library/events:eventtype", - "//closure/library/graphics", - "//closure/library/graphics/ext:group", - ], -) - -closure_js_library( - name = "group", - srcs = ["@com_google_javascript_closure_library//:closure/goog/graphics/ext/group.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/graphics/ext:element", - ], -) - -closure_js_library( - name = "image", - srcs = ["@com_google_javascript_closure_library//:closure/goog/graphics/ext/image.js"], - lenient = True, - deps = ["//closure/library/graphics/ext:element"], -) - -closure_js_library( - name = "path", - srcs = ["@com_google_javascript_closure_library//:closure/goog/graphics/ext/path.js"], - lenient = True, - deps = [ - "//closure/library/graphics:affinetransform", - "//closure/library/graphics:path", - "//closure/library/math:rect", - ], -) - -closure_js_library( - name = "rectangle", - srcs = ["@com_google_javascript_closure_library//:closure/goog/graphics/ext/rectangle.js"], - lenient = True, - deps = ["//closure/library/graphics/ext:strokeandfillelement"], -) - -closure_js_library( - name = "shape", - srcs = ["@com_google_javascript_closure_library//:closure/goog/graphics/ext/shape.js"], - lenient = True, - deps = ["//closure/library/graphics/ext:strokeandfillelement"], -) - -closure_js_library( - name = "strokeandfillelement", - srcs = ["@com_google_javascript_closure_library//:closure/goog/graphics/ext/strokeandfillelement.js"], - lenient = True, - deps = ["//closure/library/graphics/ext:element"], -) diff --git a/closure/library/history/BUILD b/closure/library/history/BUILD deleted file mode 100644 index 8ab19f4d0b..0000000000 --- a/closure/library/history/BUILD +++ /dev/null @@ -1,73 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":event", - ":eventtype", - ":history", - ":html5history", - ], -) - -closure_js_library( - name = "event", - srcs = ["@com_google_javascript_closure_library//:closure/goog/history/event.js"], - lenient = True, - deps = [ - "//closure/library/events:event", - "//closure/library/history:eventtype", - ], -) - -closure_js_library( - name = "eventtype", - srcs = ["@com_google_javascript_closure_library//:closure/goog/history/eventtype.js"], - lenient = True, -) - -closure_js_library( - name = "history", - srcs = ["@com_google_javascript_closure_library//:closure/goog/history/history.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:inputtype", - "//closure/library/dom:safe", - "//closure/library/events:event", - "//closure/library/events:eventhandler", - "//closure/library/events:eventtarget", - "//closure/library/events:eventtype", - "//closure/library/history:event", - "//closure/library/history:eventtype", - "//closure/library/html:safehtml", - "//closure/library/html:trustedresourceurl", - "//closure/library/html:uncheckedconversions", - "//closure/library/labs/useragent:device", - "//closure/library/memoize", - "//closure/library/string", - "//closure/library/string:const", - "//closure/library/timer", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "html5history", - srcs = ["@com_google_javascript_closure_library//:closure/goog/history/html5history.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/events", - "//closure/library/events:eventtarget", - "//closure/library/events:eventtype", - "//closure/library/history:event", - ], -) diff --git a/closure/library/html/BUILD b/closure/library/html/BUILD deleted file mode 100644 index 54ee35d429..0000000000 --- a/closure/library/html/BUILD +++ /dev/null @@ -1,240 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":cssspecificity", - ":flash", - ":legacyconversions", - ":safehtml", - ":safehtmlformatter", - ":safescript", - ":safestyle", - ":safestylesheet", - ":safeurl", - ":silverlight", - ":textextractor", - ":trustedresourceurl", - ":trustedtypes", - ":uncheckedconversions", - ":utils", - "//closure/library/html/sanitizer:all_js", - ], -) - -closure_js_library( - name = "cssspecificity", - srcs = ["@com_google_javascript_closure_library//:closure/goog/html/cssspecificity.js"], - lenient = True, - deps = [ - "//closure/library/useragent", - "//closure/library/useragent:product", - ], -) - -closure_js_library( - name = "flash", - srcs = ["@com_google_javascript_closure_library//:closure/goog/html/flash.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/html:safehtml", - ], -) - -closure_js_library( - name = "legacyconversions", - srcs = ["@com_google_javascript_closure_library//:closure/goog/html/legacyconversions.js"], - lenient = True, - deps = [ - "//closure/library/html:safehtml", - "//closure/library/html:safescript", - "//closure/library/html:safestyle", - "//closure/library/html:safestylesheet", - "//closure/library/html:safeurl", - "//closure/library/html:trustedresourceurl", - ], -) - -closure_js_library( - name = "safehtml", - srcs = ["@com_google_javascript_closure_library//:closure/goog/html/safehtml.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/dom:tagname", - "//closure/library/dom:tags", - "//closure/library/html:safescript", - "//closure/library/html:safestyle", - "//closure/library/html:safestylesheet", - "//closure/library/html:safeurl", - "//closure/library/html:trustedresourceurl", - "//closure/library/html:trustedtypes", - "//closure/library/i18n:bidi", - "//closure/library/labs/useragent:browser", - "//closure/library/object", - "//closure/library/string:const", - "//closure/library/string:internal", - "//closure/library/string:typedstring", - ], -) - -closure_js_library( - name = "safehtmlformatter", - srcs = ["@com_google_javascript_closure_library//:closure/goog/html/safehtmlformatter.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/dom:tags", - "//closure/library/html:safehtml", - "//closure/library/string", - ], -) - -closure_js_library( - name = "safescript", - srcs = ["@com_google_javascript_closure_library//:closure/goog/html/safescript.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/html:trustedtypes", - "//closure/library/string:const", - "//closure/library/string:typedstring", - ], -) - -closure_js_library( - name = "safestyle", - srcs = ["@com_google_javascript_closure_library//:closure/goog/html/safestyle.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/html:safeurl", - "//closure/library/string:const", - "//closure/library/string:internal", - "//closure/library/string:typedstring", - ], -) - -closure_js_library( - name = "safestylesheet", - srcs = ["@com_google_javascript_closure_library//:closure/goog/html/safestylesheet.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/html:safestyle", - "//closure/library/object", - "//closure/library/string:const", - "//closure/library/string:internal", - "//closure/library/string:typedstring", - ], -) - -closure_js_library( - name = "safeurl", - srcs = ["@com_google_javascript_closure_library//:closure/goog/html/safeurl.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/fs:url", - "//closure/library/html:trustedresourceurl", - "//closure/library/html:trustedtypes", - "//closure/library/i18n:bidi", - "//closure/library/string:const", - "//closure/library/string:internal", - "//closure/library/string:typedstring", - ], -) - -closure_js_library( - name = "silverlight", - srcs = ["@com_google_javascript_closure_library//:closure/goog/html/silverlight.js"], - lenient = True, - deps = [ - "//closure/library/html:flash", - "//closure/library/html:safehtml", - "//closure/library/html:trustedresourceurl", - "//closure/library/string:const", - ], -) - -closure_js_library( - name = "testing", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/html/testing.js"], - lenient = True, - deps = [ - "//closure/library/html:safehtml", - "//closure/library/html:safescript", - "//closure/library/html:safestyle", - "//closure/library/html:safestylesheet", - "//closure/library/html:safeurl", - "//closure/library/html:trustedresourceurl", - "//closure/library/testing:mockmatchers", - ], -) - -closure_js_library( - name = "textextractor", - srcs = ["@com_google_javascript_closure_library//:closure/goog/html/textextractor.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/dom:tagname", - "//closure/library/html/sanitizer:htmlsanitizer", - "//closure/library/object", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "trustedresourceurl", - srcs = ["@com_google_javascript_closure_library//:closure/goog/html/trustedresourceurl.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/html:trustedtypes", - "//closure/library/i18n:bidi", - "//closure/library/string:const", - "//closure/library/string:typedstring", - ], -) - -closure_js_library( - name = "trustedtypes", - srcs = ["@com_google_javascript_closure_library//:closure/goog/html/trustedtypes.js"], - lenient = True, -) - -closure_js_library( - name = "uncheckedconversions", - srcs = ["@com_google_javascript_closure_library//:closure/goog/html/uncheckedconversions.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/html:safehtml", - "//closure/library/html:safescript", - "//closure/library/html:safestyle", - "//closure/library/html:safestylesheet", - "//closure/library/html:safeurl", - "//closure/library/html:trustedresourceurl", - "//closure/library/string:const", - "//closure/library/string:internal", - ], -) - -closure_js_library( - name = "utils", - srcs = ["@com_google_javascript_closure_library//:closure/goog/html/utils.js"], - lenient = True, - deps = ["//closure/library/string"], -) diff --git a/closure/library/html/sanitizer/BUILD b/closure/library/html/sanitizer/BUILD deleted file mode 100644 index 9ae51330a9..0000000000 --- a/closure/library/html/sanitizer/BUILD +++ /dev/null @@ -1,148 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":attributewhitelist", - ":csspropertysanitizer", - ":csssanitizer", - ":elementweakmap", - ":htmlsanitizer", - ":noclobber", - ":safedomtreeprocessor", - ":tagblacklist", - ":tagwhitelist", - ":unsafe", - ], -) - -closure_js_library( - name = "attributewhitelist", - srcs = ["@com_google_javascript_closure_library//:closure/goog/html/sanitizer/attributewhitelist.js"], - lenient = True, -) - -closure_js_library( - name = "csspropertysanitizer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/html/sanitizer/csspropertysanitizer.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/html:safeurl", - "//closure/library/object", - "//closure/library/string", - ], -) - -closure_js_library( - name = "csssanitizer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/html/sanitizer/csssanitizer.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/dom", - "//closure/library/dom:tagname", - "//closure/library/html:cssspecificity", - "//closure/library/html:safestyle", - "//closure/library/html:safestylesheet", - "//closure/library/html:safeurl", - "//closure/library/html:uncheckedconversions", - "//closure/library/html/sanitizer:csspropertysanitizer", - "//closure/library/html/sanitizer:noclobber", - "//closure/library/object", - "//closure/library/string", - "//closure/library/useragent", - "//closure/library/useragent:product", - ], -) - -closure_js_library( - name = "elementweakmap", - srcs = ["@com_google_javascript_closure_library//:closure/goog/html/sanitizer/elementweakmap.js"], - lenient = True, - deps = ["//closure/library/html/sanitizer:noclobber"], -) - -closure_js_library( - name = "htmlsanitizer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/html/sanitizer/htmlsanitizer.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:tagname", - "//closure/library/functions", - "//closure/library/html:safehtml", - "//closure/library/html:safestyle", - "//closure/library/html:safestylesheet", - "//closure/library/html:safeurl", - "//closure/library/html:uncheckedconversions", - "//closure/library/html/sanitizer:attributewhitelist", - "//closure/library/html/sanitizer:csssanitizer", - "//closure/library/html/sanitizer:noclobber", - "//closure/library/html/sanitizer:safedomtreeprocessor", - "//closure/library/html/sanitizer:tagblacklist", - "//closure/library/html/sanitizer:tagwhitelist", - "//closure/library/object", - "//closure/library/string", - "//closure/library/string:const", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "noclobber", - srcs = ["@com_google_javascript_closure_library//:closure/goog/html/sanitizer/noclobber.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/dom:nodetype", - "//closure/library/useragent:product", - ], -) - -closure_js_library( - name = "safedomtreeprocessor", - srcs = ["@com_google_javascript_closure_library//:closure/goog/html/sanitizer/safedomtreeprocessor.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/dom:nodetype", - "//closure/library/dom:tagname", - "//closure/library/html/sanitizer:elementweakmap", - "//closure/library/html/sanitizer:noclobber", - "//closure/library/log", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "tagblacklist", - srcs = ["@com_google_javascript_closure_library//:closure/goog/html/sanitizer/tagblacklist.js"], - lenient = True, -) - -closure_js_library( - name = "tagwhitelist", - srcs = ["@com_google_javascript_closure_library//:closure/goog/html/sanitizer/tagwhitelist.js"], - lenient = True, -) - -closure_js_library( - name = "unsafe", - srcs = ["@com_google_javascript_closure_library//:closure/goog/html/sanitizer/unsafe.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/html/sanitizer:htmlsanitizer", - "//closure/library/string", - "//closure/library/string:const", - ], -) diff --git a/closure/library/i18n/BUILD b/closure/library/i18n/BUILD deleted file mode 100644 index de19d87797..0000000000 --- a/closure/library/i18n/BUILD +++ /dev/null @@ -1,331 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":bidi", - ":bidiformatter", - ":charlistdecompressor", - ":charpickerdata", - ":collation", - ":compactnumberformatsymbols", - ":compactnumberformatsymbolsext", - ":currency", - ":currencycodemap", - ":dateintervalformat", - ":dateintervalpatterns", - ":dateintervalpatternsext", - ":dateintervalsymbols", - ":dateintervalsymbolsext", - ":datetimeformat", - ":datetimeparse", - ":datetimepatterns", - ":datetimepatternsext", - ":datetimesymbols", - ":datetimesymbolsext", - ":graphemebreak", - ":messageformat", - ":mime", - ":numberformat", - ":numberformatsymbols", - ":numberformatsymbolsext", - ":ordinalrules", - ":pluralrules", - ":relativedatetimeformat", - ":relativedatetimesymbols", - ":relativedatetimesymbolsext", - ":timezone", - ":uchar", - ":ucharnames", - "//closure/library/i18n/uchar:all_js", - ], -) - -closure_js_library( - name = "bidi", - srcs = ["@com_google_javascript_closure_library//:closure/goog/i18n/bidi.js"], - lenient = True, -) - -closure_js_library( - name = "bidiformatter", - srcs = ["@com_google_javascript_closure_library//:closure/goog/i18n/bidiformatter.js"], - lenient = True, - deps = [ - "//closure/library/html:safehtml", - "//closure/library/i18n:bidi", - ], -) - -closure_js_library( - name = "charlistdecompressor", - srcs = ["@com_google_javascript_closure_library//:closure/goog/i18n/charlistdecompressor.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/i18n:uchar", - ], -) - -closure_js_library( - name = "charpickerdata", - srcs = ["@com_google_javascript_closure_library//:closure/goog/i18n/charpickerdata.js"], - lenient = True, -) - -closure_js_library( - name = "collation", - srcs = ["@com_google_javascript_closure_library//:closure/goog/i18n/collation.js"], - lenient = True, -) - -closure_js_library( - name = "compactnumberformatsymbols", - srcs = ["@com_google_javascript_closure_library//:closure/goog/i18n/compactnumberformatsymbols.js"], - lenient = True, -) - -closure_js_library( - name = "compactnumberformatsymbolsext", - srcs = ["@com_google_javascript_closure_library//:closure/goog/i18n/compactnumberformatsymbolsext.js"], - lenient = True, - deps = ["//closure/library/i18n:compactnumberformatsymbols"], -) - -closure_js_library( - name = "currency", - srcs = ["@com_google_javascript_closure_library//:closure/goog/i18n/currency.js"], - lenient = True, -) - -closure_js_library( - name = "currencycodemap", - srcs = ["@com_google_javascript_closure_library//:closure/goog/i18n/currencycodemap.js"], - lenient = True, -) - -closure_js_library( - name = "dateintervalformat", - srcs = ["@com_google_javascript_closure_library//:closure/goog/i18n/dateintervalformat.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/date", - "//closure/library/date:datelike", - "//closure/library/date:daterange", - "//closure/library/i18n:dateintervalsymbols", - "//closure/library/i18n:datetimeformat", - "//closure/library/i18n:datetimesymbols", - "//closure/library/i18n:timezone", - "//closure/library/object", - ], -) - -closure_js_library( - name = "dateintervalpatterns", - srcs = ["@com_google_javascript_closure_library//:closure/goog/i18n/dateintervalpatterns.js"], - lenient = True, - deps = ["//closure/library/i18n:dateintervalsymbols"], -) - -closure_js_library( - name = "dateintervalpatternsext", - srcs = ["@com_google_javascript_closure_library//:closure/goog/i18n/dateintervalpatternsext.js"], - lenient = True, - deps = ["//closure/library/i18n:dateintervalpatterns"], -) - -closure_js_library( - name = "dateintervalsymbols", - srcs = ["@com_google_javascript_closure_library//:closure/goog/i18n/dateintervalsymbols.js"], - lenient = True, -) - -closure_js_library( - name = "dateintervalsymbolsext", - srcs = ["@com_google_javascript_closure_library//:closure/goog/i18n/dateintervalsymbolsext.js"], - lenient = True, - deps = ["//closure/library/i18n:dateintervalsymbols"], -) - -closure_js_library( - name = "datetimeformat", - srcs = ["@com_google_javascript_closure_library//:closure/goog/i18n/datetimeformat.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/date", - "//closure/library/i18n:datetimesymbols", - "//closure/library/i18n:timezone", - "//closure/library/string", - ], -) - -closure_js_library( - name = "datetimeparse", - srcs = ["@com_google_javascript_closure_library//:closure/goog/i18n/datetimeparse.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/date", - "//closure/library/i18n:datetimeformat", - "//closure/library/i18n:datetimesymbols", - ], -) - -closure_js_library( - name = "datetimepatterns", - srcs = ["@com_google_javascript_closure_library//:closure/goog/i18n/datetimepatterns.js"], - lenient = True, -) - -closure_js_library( - name = "datetimepatternsext", - srcs = ["@com_google_javascript_closure_library//:closure/goog/i18n/datetimepatternsext.js"], - lenient = True, - deps = ["//closure/library/i18n:datetimepatterns"], -) - -closure_js_library( - name = "datetimesymbols", - srcs = ["@com_google_javascript_closure_library//:closure/goog/i18n/datetimesymbols.js"], - lenient = True, -) - -closure_js_library( - name = "datetimesymbolsext", - srcs = ["@com_google_javascript_closure_library//:closure/goog/i18n/datetimesymbolsext.js"], - lenient = True, - deps = ["//closure/library/i18n:datetimesymbols"], -) - -closure_js_library( - name = "graphemebreak", - srcs = ["@com_google_javascript_closure_library//:closure/goog/i18n/graphemebreak.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/i18n:uchar", - "//closure/library/structs:inversionmap", - ], -) - -closure_js_library( - name = "messageformat", - srcs = ["@com_google_javascript_closure_library//:closure/goog/i18n/messageformat.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/i18n:compactnumberformatsymbols", - "//closure/library/i18n:numberformat", - "//closure/library/i18n:numberformatsymbols", - "//closure/library/i18n:ordinalrules", - "//closure/library/i18n:pluralrules", - ], -) - -closure_js_library( - name = "mime", - srcs = ["@com_google_javascript_closure_library//:closure/goog/i18n/mime.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/i18n:uchar", - ], -) - -closure_js_library( - name = "numberformat", - srcs = ["@com_google_javascript_closure_library//:closure/goog/i18n/numberformat.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/i18n:compactnumberformatsymbols", - "//closure/library/i18n:currency", - "//closure/library/i18n:numberformatsymbols", - "//closure/library/math", - "//closure/library/string", - ], -) - -closure_js_library( - name = "numberformatsymbols", - srcs = ["@com_google_javascript_closure_library//:closure/goog/i18n/numberformatsymbols.js"], - lenient = True, -) - -closure_js_library( - name = "numberformatsymbolsext", - srcs = ["@com_google_javascript_closure_library//:closure/goog/i18n/numberformatsymbolsext.js"], - lenient = True, - deps = ["//closure/library/i18n:numberformatsymbols"], -) - -closure_js_library( - name = "ordinalrules", - srcs = ["@com_google_javascript_closure_library//:closure/goog/i18n/ordinalrules.js"], - lenient = True, -) - -closure_js_library( - name = "pluralrules", - srcs = ["@com_google_javascript_closure_library//:closure/goog/i18n/pluralrules.js"], - lenient = True, -) - -closure_js_library( - name = "relativedatetimeformat", - srcs = ["@com_google_javascript_closure_library//:closure/goog/i18n/relativedatetimeformat.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/i18n:messageformat", - "//closure/library/i18n:relativedatetimesymbols", - ], -) - -closure_js_library( - name = "relativedatetimesymbols", - srcs = ["@com_google_javascript_closure_library//:closure/goog/i18n/relativedatetimesymbols.js"], - lenient = True, -) - -closure_js_library( - name = "relativedatetimesymbolsext", - srcs = ["@com_google_javascript_closure_library//:closure/goog/i18n/relativedatetimesymbolsext.js"], - lenient = True, - deps = ["//closure/library/i18n:relativedatetimesymbols"], -) - -closure_js_library( - name = "timezone", - srcs = ["@com_google_javascript_closure_library//:closure/goog/i18n/timezone.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/date:datelike", - "//closure/library/object", - "//closure/library/string", - ], -) - -closure_js_library( - name = "uchar", - srcs = ["@com_google_javascript_closure_library//:closure/goog/i18n/uchar.js"], - lenient = True, -) - -closure_js_library( - name = "ucharnames", - srcs = ["@com_google_javascript_closure_library//:closure/goog/i18n/ucharnames.js"], - lenient = True, - deps = ["//closure/library/i18n:uchar"], -) diff --git a/closure/library/i18n/uchar/BUILD b/closure/library/i18n/uchar/BUILD deleted file mode 100644 index 8d2ca17f71..0000000000 --- a/closure/library/i18n/uchar/BUILD +++ /dev/null @@ -1,49 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":localnamefetcher", - ":namefetcher", - ":remotenamefetcher", - ], -) - -closure_js_library( - name = "localnamefetcher", - srcs = ["@com_google_javascript_closure_library//:closure/goog/i18n/uchar/localnamefetcher.js"], - lenient = True, - deps = [ - "//closure/library/i18n:ucharnames", - "//closure/library/i18n/uchar:namefetcher", - "//closure/library/log", - ], -) - -closure_js_library( - name = "namefetcher", - srcs = ["@com_google_javascript_closure_library//:closure/goog/i18n/uchar/namefetcher.js"], - lenient = True, -) - -closure_js_library( - name = "remotenamefetcher", - srcs = ["@com_google_javascript_closure_library//:closure/goog/i18n/uchar/remotenamefetcher.js"], - lenient = True, - deps = [ - "//closure/library/disposable", - "//closure/library/events", - "//closure/library/i18n:uchar", - "//closure/library/i18n/uchar:namefetcher", - "//closure/library/log", - "//closure/library/net:eventtype", - "//closure/library/net:xhrio", - "//closure/library/uri", - ], -) diff --git a/closure/library/iter/BUILD b/closure/library/iter/BUILD deleted file mode 100644 index 34d6a01ef1..0000000000 --- a/closure/library/iter/BUILD +++ /dev/null @@ -1,34 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":es6", - ":iter", - ], -) - -closure_js_library( - name = "es6", - srcs = ["@com_google_javascript_closure_library//:closure/goog/iter/es6.js"], - lenient = True, - deps = ["//closure/library/iter"], -) - -closure_js_library( - name = "iter", - srcs = ["@com_google_javascript_closure_library//:closure/goog/iter/iter.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/functions", - "//closure/library/math", - ], -) diff --git a/closure/library/json/BUILD b/closure/library/json/BUILD deleted file mode 100644 index 590d562788..0000000000 --- a/closure/library/json/BUILD +++ /dev/null @@ -1,60 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":hybrid", - ":json", - ":jsonable", - ":nativejsonprocessor", - ":processor", - ], -) - -closure_js_library( - name = "hybrid", - srcs = ["@com_google_javascript_closure_library//:closure/goog/json/hybrid.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/json", - ], -) - -closure_js_library( - name = "json", - srcs = ["@com_google_javascript_closure_library//:closure/goog/json/json.js"], - lenient = True, -) - -closure_js_library( - name = "jsonable", - srcs = ["@com_google_javascript_closure_library//:closure/goog/json/jsonable.js"], - lenient = True, -) - -closure_js_library( - name = "nativejsonprocessor", - srcs = ["@com_google_javascript_closure_library//:closure/goog/json/nativejsonprocessor.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/json:processor", - ], -) - -closure_js_library( - name = "processor", - srcs = ["@com_google_javascript_closure_library//:closure/goog/json/processor.js"], - lenient = True, - deps = [ - "//closure/library/string:parser", - "//closure/library/string:stringifier", - ], -) diff --git a/closure/library/labs/collections/BUILD b/closure/library/labs/collections/BUILD deleted file mode 100644 index 3b71b63a66..0000000000 --- a/closure/library/labs/collections/BUILD +++ /dev/null @@ -1,18 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [":iterables"], -) - -closure_js_library( - name = "iterables", - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/collections/iterables.js"], - lenient = True, -) diff --git a/closure/library/labs/dom/BUILD b/closure/library/labs/dom/BUILD deleted file mode 100644 index 1c0c341da9..0000000000 --- a/closure/library/labs/dom/BUILD +++ /dev/null @@ -1,27 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [":pagevisibilitymonitor"], -) - -closure_js_library( - name = "pagevisibilitymonitor", - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/dom/pagevisibilitymonitor.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/dom:vendor", - "//closure/library/events", - "//closure/library/events:event", - "//closure/library/events:eventtarget", - "//closure/library/events:eventtype", - "//closure/library/memoize", - ], -) diff --git a/closure/library/labs/events/BUILD b/closure/library/labs/events/BUILD deleted file mode 100644 index 625ff4c989..0000000000 --- a/closure/library/labs/events/BUILD +++ /dev/null @@ -1,41 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":nondisposableeventtarget", - ":touch", - ], -) - -closure_js_library( - name = "nondisposableeventtarget", - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/events/nondisposableeventtarget.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/events:event", - "//closure/library/events:listenable", - "//closure/library/events:listenermap", - "//closure/library/object", - ], -) - -closure_js_library( - name = "touch", - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/events/touch.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/events:eventtype", - "//closure/library/string", - ], -) diff --git a/closure/library/labs/format/BUILD b/closure/library/labs/format/BUILD deleted file mode 100644 index fb84f82475..0000000000 --- a/closure/library/labs/format/BUILD +++ /dev/null @@ -1,26 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [":csv"], -) - -closure_js_library( - name = "csv", - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/format/csv.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/debug:error", - "//closure/library/object", - "//closure/library/string", - "//closure/library/string:newlines", - ], -) diff --git a/closure/library/labs/i18n/BUILD b/closure/library/labs/i18n/BUILD deleted file mode 100644 index a7a21a7650..0000000000 --- a/closure/library/labs/i18n/BUILD +++ /dev/null @@ -1,39 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":listformat", - ":listsymbols", - ":listsymbolsext", - ], -) - -closure_js_library( - name = "listformat", - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/i18n/listformat.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/labs/i18n:listsymbols", - ], -) - -closure_js_library( - name = "listsymbols", - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/i18n/listsymbols.js"], - lenient = True, -) - -closure_js_library( - name = "listsymbolsext", - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/i18n/listsymbolsext.js"], - lenient = True, - deps = ["//closure/library/labs/i18n:listsymbols"], -) diff --git a/closure/library/labs/mock/BUILD b/closure/library/labs/mock/BUILD deleted file mode 100644 index 42a05d9b87..0000000000 --- a/closure/library/labs/mock/BUILD +++ /dev/null @@ -1,34 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [":verificationmode"], -) - -closure_js_library( - name = "mock", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/mock/mock.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/debug", - "//closure/library/debug:error", - "//closure/library/functions", - "//closure/library/labs/mock:verificationmode", - "//closure/library/object", - ], -) - -closure_js_library( - name = "verificationmode", - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/mock/verificationmode.js"], - lenient = True, -) diff --git a/closure/library/labs/net/BUILD b/closure/library/labs/net/BUILD deleted file mode 100644 index d3f534a380..0000000000 --- a/closure/library/labs/net/BUILD +++ /dev/null @@ -1,78 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":image", - ":webchannel", - ":webchanneltransport", - ":webchanneltransportfactory", - ":xhr", - "//closure/library/labs/net/webchannel:all_js", - ], -) - -closure_js_library( - name = "image", - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/net/image.js"], - lenient = True, - deps = [ - "//closure/library/events:eventhandler", - "//closure/library/events:eventtype", - "//closure/library/html:safeurl", - "//closure/library/net:eventtype", - "//closure/library/promise", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "webchannel", - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/net/webchannel.js"], - lenient = True, - deps = [ - "//closure/library/events", - "//closure/library/events:event", - "//closure/library/events:listenable", - "//closure/library/net:xmlhttpfactory", - ], -) - -closure_js_library( - name = "webchanneltransport", - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/net/webchanneltransport.js"], - lenient = True, -) - -closure_js_library( - name = "webchanneltransportfactory", - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/net/webchanneltransportfactory.js"], - lenient = True, - deps = [ - "//closure/library/functions", - "//closure/library/labs/net/webchannel:webchannelbasetransport", - ], -) - -closure_js_library( - name = "xhr", - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/net/xhr.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/debug:error", - "//closure/library/net:httpstatus", - "//closure/library/net:xmlhttp", - "//closure/library/object", - "//closure/library/promise", - "//closure/library/string", - "//closure/library/uri:utils", - "//closure/library/useragent", - ], -) diff --git a/closure/library/labs/net/webchannel/BUILD b/closure/library/labs/net/webchannel/BUILD deleted file mode 100644 index 9fd27cab39..0000000000 --- a/closure/library/labs/net/webchannel/BUILD +++ /dev/null @@ -1,195 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":basetestchannel", - ":channel", - ":channelrequest", - ":connectionstate", - ":environment", - ":forwardchannelrequestpool", - ":netutils", - ":requeststats", - ":webchannelbase", - ":webchannelbasetransport", - ":webchanneldebug", - ":wire", - ":wirev8", - ], -) - -closure_js_library( - name = "basetestchannel", - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/net/webchannel/basetestchannel.js"], - lenient = True, - deps = [ - "//closure/library/labs/net:webchannel", - "//closure/library/labs/net/webchannel:channel", - "//closure/library/labs/net/webchannel:channelrequest", - "//closure/library/labs/net/webchannel:requeststats", - "//closure/library/labs/net/webchannel:webchanneldebug", - ], -) - -closure_js_library( - name = "channel", - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/net/webchannel/channel.js"], - lenient = True, -) - -closure_js_library( - name = "channelrequest", - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/net/webchannel/channelrequest.js"], - lenient = True, - deps = [ - "//closure/library/async:throttle", - "//closure/library/events:eventhandler", - "//closure/library/labs/net:webchannel", - "//closure/library/labs/net/webchannel:channel", - "//closure/library/labs/net/webchannel:environment", - "//closure/library/labs/net/webchannel:requeststats", - "//closure/library/labs/net/webchannel:webchanneldebug", - "//closure/library/net:errorcode", - "//closure/library/net:eventtype", - "//closure/library/net:xmlhttp", - "//closure/library/object", - "//closure/library/string", - "//closure/library/timer", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "connectionstate", - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/net/webchannel/connectionstate.js"], - lenient = True, -) - -closure_js_library( - name = "environment", - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/net/webchannel/environment.js"], - lenient = True, - deps = ["//closure/library/useragent"], -) - -closure_js_library( - name = "forwardchannelrequestpool", - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/net/webchannel/forwardchannelrequestpool.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/labs/net/webchannel:channelrequest", - "//closure/library/labs/net/webchannel:wire", - "//closure/library/string", - "//closure/library/structs:set", - ], -) - -closure_js_library( - name = "netutils", - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/net/webchannel/netutils.js"], - lenient = True, - deps = [ - "//closure/library/labs/net/webchannel:webchanneldebug", - "//closure/library/uri", - ], -) - -closure_js_library( - name = "requeststats", - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/net/webchannel/requeststats.js"], - lenient = True, - deps = [ - "//closure/library/events:event", - "//closure/library/events:eventtarget", - ], -) - -closure_js_library( - name = "webchannelbase", - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/net/webchannel/webchannelbase.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/async:run", - "//closure/library/debug:formatter", - "//closure/library/json", - "//closure/library/labs/net:webchannel", - "//closure/library/labs/net/webchannel:basetestchannel", - "//closure/library/labs/net/webchannel:channel", - "//closure/library/labs/net/webchannel:channelrequest", - "//closure/library/labs/net/webchannel:connectionstate", - "//closure/library/labs/net/webchannel:forwardchannelrequestpool", - "//closure/library/labs/net/webchannel:netutils", - "//closure/library/labs/net/webchannel:requeststats", - "//closure/library/labs/net/webchannel:webchanneldebug", - "//closure/library/labs/net/webchannel:wire", - "//closure/library/labs/net/webchannel:wirev8", - "//closure/library/log", - "//closure/library/net:xhrio", - "//closure/library/net:xmlhttpfactory", - "//closure/library/net/rpc:httpcors", - "//closure/library/object", - "//closure/library/string", - "//closure/library/structs", - "//closure/library/structs:circularbuffer", - "//closure/library/uri", - ], -) - -closure_js_library( - name = "webchannelbasetransport", - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/net/webchannel/webchannelbasetransport.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/events:eventtarget", - "//closure/library/json", - "//closure/library/labs/net:webchannel", - "//closure/library/labs/net:webchanneltransport", - "//closure/library/labs/net/webchannel:channelrequest", - "//closure/library/labs/net/webchannel:webchannelbase", - "//closure/library/labs/net/webchannel:wire", - "//closure/library/log", - "//closure/library/object", - "//closure/library/string", - "//closure/library/string:path", - ], -) - -closure_js_library( - name = "webchanneldebug", - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/net/webchannel/webchanneldebug.js"], - lenient = True, - deps = [ - "//closure/library/json", - "//closure/library/log", - ], -) - -closure_js_library( - name = "wire", - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/net/webchannel/wire.js"], - lenient = True, -) - -closure_js_library( - name = "wirev8", - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/net/webchannel/wirev8.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/json", - "//closure/library/json:nativejsonprocessor", - "//closure/library/labs/net/webchannel:wire", - "//closure/library/structs", - ], -) diff --git a/closure/library/labs/pubsub/BUILD b/closure/library/labs/pubsub/BUILD deleted file mode 100644 index 1033d3a000..0000000000 --- a/closure/library/labs/pubsub/BUILD +++ /dev/null @@ -1,33 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [":broadcastpubsub"], -) - -closure_js_library( - name = "broadcastpubsub", - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/pubsub/broadcastpubsub.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/async:run", - "//closure/library/disposable", - "//closure/library/events:eventhandler", - "//closure/library/events:eventtype", - "//closure/library/log", - "//closure/library/math", - "//closure/library/pubsub", - "//closure/library/storage", - "//closure/library/storage/mechanism:html5localstorage", - "//closure/library/string", - "//closure/library/timer", - "//closure/library/useragent", - ], -) diff --git a/closure/library/labs/storage/BUILD b/closure/library/labs/storage/BUILD deleted file mode 100644 index 5cfe5a7bdb..0000000000 --- a/closure/library/labs/storage/BUILD +++ /dev/null @@ -1,26 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [":boundedcollectablestorage"], -) - -closure_js_library( - name = "boundedcollectablestorage", - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/storage/boundedcollectablestorage.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/iter", - "//closure/library/storage:collectablestorage", - "//closure/library/storage:errorcode", - "//closure/library/storage:expiringstorage", - ], -) diff --git a/closure/library/labs/structs/BUILD b/closure/library/labs/structs/BUILD deleted file mode 100644 index 0d4c7caab3..0000000000 --- a/closure/library/labs/structs/BUILD +++ /dev/null @@ -1,22 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [":multimap"], -) - -closure_js_library( - name = "multimap", - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/structs/multimap.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/object", - ], -) diff --git a/closure/library/labs/style/BUILD b/closure/library/labs/style/BUILD deleted file mode 100644 index 1d2a489917..0000000000 --- a/closure/library/labs/style/BUILD +++ /dev/null @@ -1,22 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [":pixeldensitymonitor"], -) - -closure_js_library( - name = "pixeldensitymonitor", - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/style/pixeldensitymonitor.js"], - lenient = True, - deps = [ - "//closure/library/events", - "//closure/library/events:eventtarget", - ], -) diff --git a/closure/library/labs/testing/BUILD b/closure/library/labs/testing/BUILD deleted file mode 100644 index 3f058cf54f..0000000000 --- a/closure/library/labs/testing/BUILD +++ /dev/null @@ -1,113 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "assertthat", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/testing/assertthat.js"], - lenient = True, - deps = ["//closure/library/debug:error"], -) - -closure_js_library( - name = "decoratormatcher", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/testing/decoratormatcher.js"], - lenient = True, - deps = ["//closure/library/labs/testing:matcher"], -) - -closure_js_library( - name = "dictionarymatcher", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/testing/dictionarymatcher.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/labs/testing:matcher", - "//closure/library/object", - ], -) - -closure_js_library( - name = "environment", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/testing/environment.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/debug:console", - "//closure/library/promise:thenable", - "//closure/library/testing:jsunit", - "//closure/library/testing:mockclock", - "//closure/library/testing:mockcontrol", - "//closure/library/testing:propertyreplacer", - "//closure/library/testing:testcase", - ], -) - -closure_js_library( - name = "json_fuzzing", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/testing/json_fuzzing.js"], - lenient = True, - deps = [ - "//closure/library/string", - "//closure/library/testing:pseudorandom", - ], -) - -closure_js_library( - name = "logicmatcher", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/testing/logicmatcher.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/labs/testing:matcher", - ], -) - -closure_js_library( - name = "matcher", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/testing/matcher.js"], - lenient = True, -) - -closure_js_library( - name = "numbermatcher", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/testing/numbermatcher.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/labs/testing:matcher", - ], -) - -closure_js_library( - name = "objectmatcher", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/testing/objectmatcher.js"], - lenient = True, - deps = ["//closure/library/labs/testing:matcher"], -) - -closure_js_library( - name = "stringmatcher", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/testing/stringmatcher.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/labs/testing:matcher", - "//closure/library/string", - ], -) diff --git a/closure/library/labs/useragent/BUILD b/closure/library/labs/useragent/BUILD deleted file mode 100644 index c52024d5f6..0000000000 --- a/closure/library/labs/useragent/BUILD +++ /dev/null @@ -1,79 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":browser", - ":device", - ":engine", - ":platform", - ":util", - ":verifier", - ], -) - -closure_js_library( - name = "browser", - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/useragent/browser.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/labs/useragent:util", - "//closure/library/object", - "//closure/library/string:internal", - ], -) - -closure_js_library( - name = "device", - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/useragent/device.js"], - lenient = True, - deps = ["//closure/library/labs/useragent:util"], -) - -closure_js_library( - name = "engine", - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/useragent/engine.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/labs/useragent:util", - "//closure/library/string", - ], -) - -closure_js_library( - name = "platform", - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/useragent/platform.js"], - lenient = True, - deps = [ - "//closure/library/labs/useragent:util", - "//closure/library/string", - ], -) - -closure_js_library( - name = "test_agents", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/useragent/test_agents.js"], - lenient = True, -) - -closure_js_library( - name = "util", - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/useragent/util.js"], - lenient = True, - deps = ["//closure/library/string:internal"], -) - -closure_js_library( - name = "verifier", - srcs = ["@com_google_javascript_closure_library//:closure/goog/labs/useragent/verifier.js"], - lenient = True, -) diff --git a/closure/library/loader/BUILD b/closure/library/loader/BUILD deleted file mode 100644 index b0a9b1f016..0000000000 --- a/closure/library/loader/BUILD +++ /dev/null @@ -1,36 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":abstractmodulemanager", - ":activemodulemanager", - ], -) - -closure_js_library( - name = "abstractmodulemanager", - srcs = ["@com_google_javascript_closure_library//:closure/goog/loader/abstractmodulemanager.js"], - lenient = True, - deps = [ - "//closure/library/module:abstractmoduleloader", - "//closure/library/module:moduleinfo", - "//closure/library/module:moduleloadcallback", - ], -) - -closure_js_library( - name = "activemodulemanager", - srcs = ["@com_google_javascript_closure_library//:closure/goog/loader/activemodulemanager.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/loader:abstractmodulemanager", - ], -) diff --git a/closure/library/locale/BUILD b/closure/library/locale/BUILD deleted file mode 100644 index 790f692efa..0000000000 --- a/closure/library/locale/BUILD +++ /dev/null @@ -1,87 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":countries", - ":defaultlocalenameconstants", - ":genericfontnames", - ":genericfontnamesdata", - ":locale", - ":nativenameconstants", - ":scriptToLanguages", - ":timezonedetection", - ":timezonefingerprint", - ":timezonelist", - ], -) - -closure_js_library( - name = "countries", - srcs = ["@com_google_javascript_closure_library//:closure/goog/locale/countries.js"], - lenient = True, -) - -closure_js_library( - name = "defaultlocalenameconstants", - srcs = ["@com_google_javascript_closure_library//:closure/goog/locale/defaultlocalenameconstants.js"], - lenient = True, -) - -closure_js_library( - name = "genericfontnames", - srcs = ["@com_google_javascript_closure_library//:closure/goog/locale/genericfontnames.js"], - lenient = True, -) - -closure_js_library( - name = "genericfontnamesdata", - srcs = ["@com_google_javascript_closure_library//:closure/goog/locale/genericfontnamesdata.js"], - lenient = True, -) - -closure_js_library( - name = "locale", - srcs = ["@com_google_javascript_closure_library//:closure/goog/locale/locale.js"], - lenient = True, - deps = ["//closure/library/locale:nativenameconstants"], -) - -closure_js_library( - name = "nativenameconstants", - srcs = ["@com_google_javascript_closure_library//:closure/goog/locale/nativenameconstants.js"], - lenient = True, -) - -closure_js_library( - name = "scriptToLanguages", - srcs = ["@com_google_javascript_closure_library//:closure/goog/locale/scriptToLanguages.js"], - lenient = True, - deps = ["//closure/library/locale"], -) - -closure_js_library( - name = "timezonedetection", - srcs = ["@com_google_javascript_closure_library//:closure/goog/locale/timezonedetection.js"], - lenient = True, - deps = ["//closure/library/locale:timezonefingerprint"], -) - -closure_js_library( - name = "timezonefingerprint", - srcs = ["@com_google_javascript_closure_library//:closure/goog/locale/timezonefingerprint.js"], - lenient = True, -) - -closure_js_library( - name = "timezonelist", - srcs = ["@com_google_javascript_closure_library//:closure/goog/locale/timezonelist.js"], - lenient = True, - deps = ["//closure/library/locale"], -) diff --git a/closure/library/log/BUILD b/closure/library/log/BUILD deleted file mode 100644 index bcba28bc68..0000000000 --- a/closure/library/log/BUILD +++ /dev/null @@ -1,23 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [":log"], -) - -closure_js_library( - name = "log", - srcs = ["@com_google_javascript_closure_library//:closure/goog/log/log.js"], - lenient = True, - deps = [ - "//closure/library/debug", - "//closure/library/debug:logger", - "//closure/library/debug:logrecord", - ], -) diff --git a/closure/library/math/BUILD b/closure/library/math/BUILD deleted file mode 100644 index 1d948fcea3..0000000000 --- a/closure/library/math/BUILD +++ /dev/null @@ -1,220 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":affinetransform", - ":bezier", - ":box", - ":coordinate", - ":coordinate3", - ":exponentialbackoff", - ":integer", - ":irect", - ":line", - ":long", - ":math", - ":matrix", - ":path", - ":paths", - ":range", - ":rangeset", - ":rect", - ":size", - ":tdma", - ":vec2", - ":vec3", - "//closure/library/math/interpolator:all_js", - ], -) - -closure_js_library( - name = "affinetransform", - srcs = ["@com_google_javascript_closure_library//:closure/goog/math/affinetransform.js"], - lenient = True, -) - -closure_js_library( - name = "bezier", - srcs = ["@com_google_javascript_closure_library//:closure/goog/math/bezier.js"], - lenient = True, - deps = [ - "//closure/library/math", - "//closure/library/math:coordinate", - ], -) - -closure_js_library( - name = "box", - srcs = ["@com_google_javascript_closure_library//:closure/goog/math/box.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/math:coordinate", - ], -) - -closure_js_library( - name = "coordinate", - srcs = ["@com_google_javascript_closure_library//:closure/goog/math/coordinate.js"], - lenient = True, - deps = ["//closure/library/math"], -) - -closure_js_library( - name = "coordinate3", - srcs = ["@com_google_javascript_closure_library//:closure/goog/math/coordinate3.js"], - lenient = True, -) - -closure_js_library( - name = "exponentialbackoff", - srcs = ["@com_google_javascript_closure_library//:closure/goog/math/exponentialbackoff.js"], - lenient = True, - deps = ["//closure/library/asserts"], -) - -closure_js_library( - name = "integer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/math/integer.js"], - lenient = True, -) - -closure_js_library( - name = "irect", - srcs = ["@com_google_javascript_closure_library//:closure/goog/math/irect.js"], - lenient = True, -) - -closure_js_library( - name = "line", - srcs = ["@com_google_javascript_closure_library//:closure/goog/math/line.js"], - lenient = True, - deps = [ - "//closure/library/math", - "//closure/library/math:coordinate", - ], -) - -closure_js_library( - name = "long", - srcs = ["@com_google_javascript_closure_library//:closure/goog/math/long.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/reflect", - ], -) - -closure_js_library( - name = "math", - srcs = ["@com_google_javascript_closure_library//:closure/goog/math/math.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - ], -) - -closure_js_library( - name = "matrix", - srcs = ["@com_google_javascript_closure_library//:closure/goog/math/matrix.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/math", - "//closure/library/math:size", - "//closure/library/string", - ], -) - -closure_js_library( - name = "path", - srcs = ["@com_google_javascript_closure_library//:closure/goog/math/path.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/math", - "//closure/library/math:affinetransform", - ], -) - -closure_js_library( - name = "paths", - srcs = ["@com_google_javascript_closure_library//:closure/goog/math/paths.js"], - lenient = True, - deps = [ - "//closure/library/math:coordinate", - "//closure/library/math:path", - ], -) - -closure_js_library( - name = "range", - srcs = ["@com_google_javascript_closure_library//:closure/goog/math/range.js"], - lenient = True, - deps = ["//closure/library/asserts"], -) - -closure_js_library( - name = "rangeset", - srcs = ["@com_google_javascript_closure_library//:closure/goog/math/rangeset.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/iter", - "//closure/library/math:range", - ], -) - -closure_js_library( - name = "rect", - srcs = ["@com_google_javascript_closure_library//:closure/goog/math/rect.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/math:box", - "//closure/library/math:coordinate", - "//closure/library/math:irect", - "//closure/library/math:size", - ], -) - -closure_js_library( - name = "size", - srcs = ["@com_google_javascript_closure_library//:closure/goog/math/size.js"], - lenient = True, -) - -closure_js_library( - name = "tdma", - srcs = ["@com_google_javascript_closure_library//:closure/goog/math/tdma.js"], - lenient = True, -) - -closure_js_library( - name = "vec2", - srcs = ["@com_google_javascript_closure_library//:closure/goog/math/vec2.js"], - lenient = True, - deps = [ - "//closure/library/math", - "//closure/library/math:coordinate", - ], -) - -closure_js_library( - name = "vec3", - srcs = ["@com_google_javascript_closure_library//:closure/goog/math/vec3.js"], - lenient = True, - deps = [ - "//closure/library/math", - "//closure/library/math:coordinate3", - ], -) diff --git a/closure/library/math/interpolator/BUILD b/closure/library/math/interpolator/BUILD deleted file mode 100644 index e9371f6fd7..0000000000 --- a/closure/library/math/interpolator/BUILD +++ /dev/null @@ -1,58 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":interpolator1", - ":linear1", - ":pchip1", - ":spline1", - ], -) - -closure_js_library( - name = "interpolator1", - srcs = ["@com_google_javascript_closure_library//:closure/goog/math/interpolator/interpolator1.js"], - lenient = True, -) - -closure_js_library( - name = "linear1", - srcs = ["@com_google_javascript_closure_library//:closure/goog/math/interpolator/linear1.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/math", - "//closure/library/math/interpolator:interpolator1", - ], -) - -closure_js_library( - name = "pchip1", - srcs = ["@com_google_javascript_closure_library//:closure/goog/math/interpolator/pchip1.js"], - lenient = True, - deps = [ - "//closure/library/math", - "//closure/library/math/interpolator:spline1", - ], -) - -closure_js_library( - name = "spline1", - srcs = ["@com_google_javascript_closure_library//:closure/goog/math/interpolator/spline1.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/math", - "//closure/library/math:tdma", - "//closure/library/math/interpolator:interpolator1", - ], -) diff --git a/closure/library/memoize/BUILD b/closure/library/memoize/BUILD deleted file mode 100644 index 732b32d808..0000000000 --- a/closure/library/memoize/BUILD +++ /dev/null @@ -1,18 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [":memoize"], -) - -closure_js_library( - name = "memoize", - srcs = ["@com_google_javascript_closure_library//:closure/goog/memoize/memoize.js"], - lenient = True, -) diff --git a/closure/library/messaging/BUILD b/closure/library/messaging/BUILD deleted file mode 100644 index e0d8ad6672..0000000000 --- a/closure/library/messaging/BUILD +++ /dev/null @@ -1,174 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":abstractchannel", - ":bufferedchannel", - ":deferredchannel", - ":loggerclient", - ":loggerserver", - ":messagechannel", - ":messaging", - ":multichannel", - ":portcaller", - ":portchannel", - ":portnetwork", - ":portoperator", - ":respondingchannel", - ], -) - -closure_js_library( - name = "abstractchannel", - srcs = ["@com_google_javascript_closure_library//:closure/goog/messaging/abstractchannel.js"], - lenient = True, - deps = [ - "//closure/library/disposable", - "//closure/library/json", - "//closure/library/log", - "//closure/library/messaging:messagechannel", - ], -) - -closure_js_library( - name = "bufferedchannel", - srcs = ["@com_google_javascript_closure_library//:closure/goog/messaging/bufferedchannel.js"], - lenient = True, - deps = [ - "//closure/library/disposable", - "//closure/library/events", - "//closure/library/log", - "//closure/library/messaging:messagechannel", - "//closure/library/messaging:multichannel", - "//closure/library/timer", - ], -) - -closure_js_library( - name = "deferredchannel", - srcs = ["@com_google_javascript_closure_library//:closure/goog/messaging/deferredchannel.js"], - lenient = True, - deps = [ - "//closure/library/disposable", - "//closure/library/messaging:messagechannel", - ], -) - -closure_js_library( - name = "loggerclient", - srcs = ["@com_google_javascript_closure_library//:closure/goog/messaging/loggerclient.js"], - lenient = True, - deps = [ - "//closure/library/debug", - "//closure/library/debug:logger", - "//closure/library/disposable", - ], -) - -closure_js_library( - name = "loggerserver", - srcs = ["@com_google_javascript_closure_library//:closure/goog/messaging/loggerserver.js"], - lenient = True, - deps = [ - "//closure/library/disposable", - "//closure/library/log", - ], -) - -closure_js_library( - name = "messagechannel", - srcs = ["@com_google_javascript_closure_library//:closure/goog/messaging/messagechannel.js"], - lenient = True, -) - -closure_js_library( - name = "messaging", - srcs = ["@com_google_javascript_closure_library//:closure/goog/messaging/messaging.js"], - lenient = True, -) - -closure_js_library( - name = "multichannel", - srcs = ["@com_google_javascript_closure_library//:closure/goog/messaging/multichannel.js"], - lenient = True, - deps = [ - "//closure/library/disposable", - "//closure/library/log", - "//closure/library/messaging:messagechannel", - "//closure/library/object", - ], -) - -closure_js_library( - name = "portcaller", - srcs = ["@com_google_javascript_closure_library//:closure/goog/messaging/portcaller.js"], - lenient = True, - deps = [ - "//closure/library/disposable", - "//closure/library/messaging:deferredchannel", - "//closure/library/messaging:portchannel", - "//closure/library/messaging:portnetwork", - "//closure/library/object", - "//third_party/closure/library/mochikit/async:deferred", - ], -) - -closure_js_library( - name = "portchannel", - srcs = ["@com_google_javascript_closure_library//:closure/goog/messaging/portchannel.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/debug", - "//closure/library/events", - "//closure/library/events:eventtype", - "//closure/library/json", - "//closure/library/log", - "//closure/library/messaging:abstractchannel", - "//closure/library/messaging:deferredchannel", - "//closure/library/object", - "//closure/library/string", - "//closure/library/timer", - "//closure/library/useragent", - "//third_party/closure/library/mochikit/async:deferred", - ], -) - -closure_js_library( - name = "portnetwork", - srcs = ["@com_google_javascript_closure_library//:closure/goog/messaging/portnetwork.js"], - lenient = True, -) - -closure_js_library( - name = "portoperator", - srcs = ["@com_google_javascript_closure_library//:closure/goog/messaging/portoperator.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/disposable", - "//closure/library/log", - "//closure/library/messaging:portchannel", - "//closure/library/messaging:portnetwork", - "//closure/library/object", - ], -) - -closure_js_library( - name = "respondingchannel", - srcs = ["@com_google_javascript_closure_library//:closure/goog/messaging/respondingchannel.js"], - lenient = True, - deps = [ - "//closure/library/disposable", - "//closure/library/log", - "//closure/library/messaging:multichannel", - "//closure/library/promise", - ], -) diff --git a/closure/library/module/BUILD b/closure/library/module/BUILD deleted file mode 100644 index b373245a29..0000000000 --- a/closure/library/module/BUILD +++ /dev/null @@ -1,134 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":abstractmoduleloader", - ":basemodule", - ":loader", - ":module", - ":moduleinfo", - ":moduleloadcallback", - ":moduleloader", - ":modulemanager", - ], -) - -closure_js_library( - name = "abstractmoduleloader", - srcs = ["@com_google_javascript_closure_library//:closure/goog/module/abstractmoduleloader.js"], - lenient = True, - deps = [ - "//closure/library/module", - "//closure/library/module:moduleinfo", - ], -) - -closure_js_library( - name = "basemodule", - srcs = ["@com_google_javascript_closure_library//:closure/goog/module/basemodule.js"], - lenient = True, - deps = [ - "//closure/library/disposable", - "//closure/library/module", - ], -) - -closure_js_library( - name = "loader", - srcs = ["@com_google_javascript_closure_library//:closure/goog/module/loader.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:safe", - "//closure/library/dom:tagname", - "//closure/library/html:legacyconversions", - "//closure/library/module", - "//closure/library/object", - "//closure/library/timer", - ], -) - -closure_js_library( - name = "module", - srcs = ["@com_google_javascript_closure_library//:closure/goog/module/module.js"], - lenient = True, -) - -closure_js_library( - name = "moduleinfo", - srcs = ["@com_google_javascript_closure_library//:closure/goog/module/moduleinfo.js"], - lenient = True, - deps = [ - "//closure/library/async:nexttick", - "//closure/library/disposable", - "//closure/library/functions", - "//closure/library/html:trustedresourceurl", - "//closure/library/module", - "//closure/library/module:basemodule", - "//closure/library/module:moduleloadcallback", - ], -) - -closure_js_library( - name = "moduleloadcallback", - srcs = ["@com_google_javascript_closure_library//:closure/goog/module/moduleloadcallback.js"], - lenient = True, - deps = [ - "//closure/library/debug:entrypointregistry", - "//closure/library/module", - ], -) - -closure_js_library( - name = "moduleloader", - srcs = ["@com_google_javascript_closure_library//:closure/goog/module/moduleloader.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/events", - "//closure/library/events:event", - "//closure/library/events:eventhandler", - "//closure/library/events:eventid", - "//closure/library/events:eventtarget", - "//closure/library/html:trustedresourceurl", - "//closure/library/labs/useragent:browser", - "//closure/library/log", - "//closure/library/module:abstractmoduleloader", - "//closure/library/net:bulkloader", - "//closure/library/net:eventtype", - "//closure/library/net:jsloader", - "//closure/library/timer", - "//closure/library/useragent", - "//closure/library/useragent:product", - ], -) - -closure_js_library( - name = "modulemanager", - srcs = ["@com_google_javascript_closure_library//:closure/goog/module/modulemanager.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/debug:tracer", - "//closure/library/disposable", - "//closure/library/disposable:idisposable", - "//closure/library/loader:abstractmodulemanager", - "//closure/library/loader:activemodulemanager", - "//closure/library/log", - "//closure/library/module", - "//closure/library/module:moduleinfo", - "//closure/library/module:moduleloadcallback", - "//closure/library/object", - "//third_party/closure/library/mochikit/async:deferred", - ], -) diff --git a/closure/library/net/BUILD b/closure/library/net/BUILD deleted file mode 100644 index 687f271666..0000000000 --- a/closure/library/net/BUILD +++ /dev/null @@ -1,493 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":browserchannel", - ":browsertestchannel", - ":bulkloader", - ":bulkloaderhelper", - ":channeldebug", - ":channelrequest", - ":cookies", - ":corsxmlhttpfactory", - ":crossdomainrpc", - ":errorcode", - ":eventtype", - ":fetchxmlhttpfactory", - ":filedownloader", - ":httpstatus", - ":httpstatusname", - ":iframeio", - ":iframeloadmonitor", - ":imageloader", - ":ipaddress", - ":jsloader", - ":jsonp", - ":mockiframeio", - ":multiiframeloadmonitor", - ":networkstatusmonitor", - ":networktester", - ":tmpnetwork", - ":websocket", - ":wrapperxmlhttpfactory", - ":xhrio", - ":xhriopool", - ":xhrlike", - ":xhrmanager", - ":xmlhttp", - ":xmlhttpfactory", - "//closure/library/net/rpc:all_js", - "//closure/library/net/streams:all_js", - "//closure/library/net/xpc:all_js", - ], -) - -closure_js_library( - name = "browserchannel", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/browserchannel.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/debug:formatter", - "//closure/library/events:event", - "//closure/library/events:eventtarget", - "//closure/library/json", - "//closure/library/json:nativejsonprocessor", - "//closure/library/log", - "//closure/library/net:browsertestchannel", - "//closure/library/net:channeldebug", - "//closure/library/net:channelrequest", - "//closure/library/net:tmpnetwork", - "//closure/library/net:xhrio", - "//closure/library/object", - "//closure/library/string", - "//closure/library/structs", - "//closure/library/structs:circularbuffer", - "//closure/library/uri", - ], -) - -closure_js_library( - name = "browsertestchannel", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/browsertestchannel.js"], - lenient = True, - deps = [ - "//closure/library/json:nativejsonprocessor", - "//closure/library/net:channelrequest", - "//closure/library/net:tmpnetwork", - "//closure/library/string:parser", - ], -) - -closure_js_library( - name = "bulkloader", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/bulkloader.js"], - lenient = True, - deps = [ - "//closure/library/events:eventhandler", - "//closure/library/events:eventtarget", - "//closure/library/log", - "//closure/library/net:bulkloaderhelper", - "//closure/library/net:eventtype", - "//closure/library/net:xhrio", - ], -) - -closure_js_library( - name = "bulkloaderhelper", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/bulkloaderhelper.js"], - lenient = True, - deps = ["//closure/library/disposable"], -) - -closure_js_library( - name = "channeldebug", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/channeldebug.js"], - lenient = True, - deps = [ - "//closure/library/json", - "//closure/library/log", - ], -) - -closure_js_library( - name = "channelrequest", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/channelrequest.js"], - lenient = True, - deps = [ - "//closure/library/async:throttle", - "//closure/library/dom:safe", - "//closure/library/dom:tagname", - "//closure/library/events:eventhandler", - "//closure/library/html:safeurl", - "//closure/library/html:uncheckedconversions", - "//closure/library/net:errorcode", - "//closure/library/net:eventtype", - "//closure/library/net:xmlhttp", - "//closure/library/object", - "//closure/library/string", - "//closure/library/string:const", - "//closure/library/timer", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "cookies", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/cookies.js"], - lenient = True, - deps = ["//closure/library/string"], -) - -closure_js_library( - name = "corsxmlhttpfactory", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/corsxmlhttpfactory.js"], - lenient = True, - deps = [ - "//closure/library/net:httpstatus", - "//closure/library/net:xhrlike", - "//closure/library/net:xmlhttp", - "//closure/library/net:xmlhttpfactory", - ], -) - -closure_js_library( - name = "crossdomainrpc", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/crossdomainrpc.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/dom:safe", - "//closure/library/dom:tagname", - "//closure/library/events", - "//closure/library/events:eventtarget", - "//closure/library/events:eventtype", - "//closure/library/html:safehtml", - "//closure/library/log", - "//closure/library/net:eventtype", - "//closure/library/net:httpstatus", - "//closure/library/string", - "//closure/library/uri", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "errorcode", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/errorcode.js"], - lenient = True, -) - -closure_js_library( - name = "eventtype", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/eventtype.js"], - lenient = True, -) - -closure_js_library( - name = "fetchxmlhttpfactory", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/fetchxmlhttpfactory.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/events:eventtarget", - "//closure/library/functions", - "//closure/library/log", - "//closure/library/net:xhrlike", - "//closure/library/net:xmlhttpfactory", - ], -) - -closure_js_library( - name = "filedownloader", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/filedownloader.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/crypt:hash32", - "//closure/library/debug:error", - "//closure/library/disposable", - "//closure/library/events", - "//closure/library/events:eventhandler", - "//closure/library/fs", - "//closure/library/fs:entry", - "//closure/library/fs:error", - "//closure/library/fs:filesaver", - "//closure/library/net:eventtype", - "//closure/library/net:xhrio", - "//closure/library/net:xhriopool", - "//closure/library/object", - "//third_party/closure/library/mochikit/async:deferred", - ], -) - -closure_js_library( - name = "httpstatus", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/httpstatus.js"], - lenient = True, -) - -closure_js_library( - name = "httpstatusname", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/httpstatusname.js"], - lenient = True, -) - -closure_js_library( - name = "iframeio", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/iframeio.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/debug:formatter", - "//closure/library/dom", - "//closure/library/dom:inputtype", - "//closure/library/dom:safe", - "//closure/library/dom:tagname", - "//closure/library/events", - "//closure/library/events:event", - "//closure/library/events:eventtarget", - "//closure/library/events:eventtype", - "//closure/library/html:uncheckedconversions", - "//closure/library/json", - "//closure/library/log", - "//closure/library/net:errorcode", - "//closure/library/net:eventtype", - "//closure/library/reflect", - "//closure/library/string", - "//closure/library/string:const", - "//closure/library/structs", - "//closure/library/timer", - "//closure/library/uri", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "iframeloadmonitor", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/iframeloadmonitor.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/events", - "//closure/library/events:eventtarget", - "//closure/library/events:eventtype", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "imageloader", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/imageloader.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/dom", - "//closure/library/dom:tagname", - "//closure/library/events:eventhandler", - "//closure/library/events:eventtarget", - "//closure/library/events:eventtype", - "//closure/library/net:eventtype", - "//closure/library/object", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "ipaddress", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/ipaddress.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/math:integer", - "//closure/library/object", - "//closure/library/string", - ], -) - -closure_js_library( - name = "jsloader", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/jsloader.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/debug:error", - "//closure/library/dom", - "//closure/library/dom:safe", - "//closure/library/dom:tagname", - "//closure/library/html:trustedresourceurl", - "//closure/library/object", - "//third_party/closure/library/mochikit/async:deferred", - ], -) - -closure_js_library( - name = "jsonp", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/jsonp.js"], - lenient = True, - deps = [ - "//closure/library/html:trustedresourceurl", - "//closure/library/net:jsloader", - "//closure/library/object", - ], -) - -closure_js_library( - name = "mockiframeio", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/mockiframeio.js"], - lenient = True, - deps = [ - "//closure/library/events:eventtarget", - "//closure/library/net:errorcode", - "//closure/library/net:eventtype", - "//closure/library/net:iframeio", - ], -) - -closure_js_library( - name = "multiiframeloadmonitor", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/multiiframeloadmonitor.js"], - lenient = True, - deps = [ - "//closure/library/events", - "//closure/library/net:iframeloadmonitor", - ], -) - -closure_js_library( - name = "networkstatusmonitor", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/networkstatusmonitor.js"], - lenient = True, - deps = ["//closure/library/events:listenable"], -) - -closure_js_library( - name = "networktester", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/networktester.js"], - lenient = True, - deps = [ - "//closure/library/log", - "//closure/library/timer", - "//closure/library/uri", - ], -) - -closure_js_library( - name = "tmpnetwork", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/tmpnetwork.js"], - lenient = True, - deps = [ - "//closure/library/net:channeldebug", - "//closure/library/uri", - ], -) - -closure_js_library( - name = "websocket", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/websocket.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/debug:entrypointregistry", - "//closure/library/events", - "//closure/library/events:event", - "//closure/library/events:eventtarget", - "//closure/library/log", - "//closure/library/timer", - ], -) - -closure_js_library( - name = "wrapperxmlhttpfactory", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/wrapperxmlhttpfactory.js"], - lenient = True, - deps = [ - "//closure/library/net:xhrlike", - "//closure/library/net:xmlhttpfactory", - ], -) - -closure_js_library( - name = "xhrio", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/xhrio.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/debug:entrypointregistry", - "//closure/library/events:eventtarget", - "//closure/library/json:hybrid", - "//closure/library/log", - "//closure/library/net:errorcode", - "//closure/library/net:eventtype", - "//closure/library/net:httpstatus", - "//closure/library/net:xmlhttp", - "//closure/library/object", - "//closure/library/string", - "//closure/library/structs", - "//closure/library/structs:map", - "//closure/library/timer", - "//closure/library/uri:utils", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "xhriopool", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/xhriopool.js"], - lenient = True, - deps = [ - "//closure/library/net:xhrio", - "//closure/library/structs:prioritypool", - ], -) - -closure_js_library( - name = "xhrlike", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/xhrlike.js"], - lenient = True, -) - -closure_js_library( - name = "xhrmanager", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/xhrmanager.js"], - lenient = True, - deps = [ - "//closure/library/events", - "//closure/library/events:event", - "//closure/library/events:eventhandler", - "//closure/library/events:eventtarget", - "//closure/library/net:errorcode", - "//closure/library/net:eventtype", - "//closure/library/net:xhrio", - "//closure/library/net:xhriopool", - "//closure/library/structs:map", - ], -) - -closure_js_library( - name = "xmlhttp", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/xmlhttp.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/net:wrapperxmlhttpfactory", - "//closure/library/net:xmlhttpfactory", - ], -) - -closure_js_library( - name = "xmlhttpfactory", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/xmlhttpfactory.js"], - lenient = True, - deps = ["//closure/library/net:xhrlike"], -) diff --git a/closure/library/net/rpc/BUILD b/closure/library/net/rpc/BUILD deleted file mode 100644 index b1f5ba1fbb..0000000000 --- a/closure/library/net/rpc/BUILD +++ /dev/null @@ -1,24 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [":httpcors"], -) - -closure_js_library( - name = "httpcors", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/rpc/httpcors.js"], - lenient = True, - deps = [ - "//closure/library/object", - "//closure/library/string", - "//closure/library/uri", - "//closure/library/uri:utils", - ], -) diff --git a/closure/library/net/streams/BUILD b/closure/library/net/streams/BUILD deleted file mode 100644 index 5d2013e8e1..0000000000 --- a/closure/library/net/streams/BUILD +++ /dev/null @@ -1,141 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":base64pbstreamparser", - ":base64streamdecoder", - ":jsonstreamparser", - ":nodereadablestream", - ":pbjsonstreamparser", - ":pbstreamparser", - ":streamfactory", - ":streamparser", - ":utils", - ":xhrnodereadablestream", - ":xhrstreamreader", - ], -) - -closure_js_library( - name = "base64pbstreamparser", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/streams/base64pbstreamparser.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/net/streams:base64streamdecoder", - "//closure/library/net/streams:pbstreamparser", - "//closure/library/net/streams:streamparser", - ], -) - -closure_js_library( - name = "base64streamdecoder", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/streams/base64streamdecoder.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/crypt:base64", - ], -) - -closure_js_library( - name = "jsonstreamparser", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/streams/jsonstreamparser.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/net/streams:streamparser", - "//closure/library/net/streams:utils", - ], -) - -closure_js_library( - name = "nodereadablestream", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/streams/nodereadablestream.js"], - lenient = True, -) - -closure_js_library( - name = "pbjsonstreamparser", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/streams/pbjsonstreamparser.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/net/streams:jsonstreamparser", - "//closure/library/net/streams:streamparser", - "//closure/library/net/streams:utils", - ], -) - -closure_js_library( - name = "pbstreamparser", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/streams/pbstreamparser.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/net/streams:streamparser", - ], -) - -closure_js_library( - name = "streamfactory", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/streams/streamfactory.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/net/streams:xhrnodereadablestream", - "//closure/library/net/streams:xhrstreamreader", - ], -) - -closure_js_library( - name = "streamparser", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/streams/streamparser.js"], - lenient = True, -) - -closure_js_library( - name = "utils", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/streams/utils.js"], - lenient = True, -) - -closure_js_library( - name = "xhrnodereadablestream", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/streams/xhrnodereadablestream.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/log", - "//closure/library/net/streams:nodereadablestream", - "//closure/library/net/streams:xhrstreamreader", - ], -) - -closure_js_library( - name = "xhrstreamreader", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/streams/xhrstreamreader.js"], - lenient = True, - deps = [ - "//closure/library/events:eventhandler", - "//closure/library/log", - "//closure/library/net:errorcode", - "//closure/library/net:eventtype", - "//closure/library/net:httpstatus", - "//closure/library/net:xhrio", - "//closure/library/net:xmlhttp", - "//closure/library/net/streams:base64pbstreamparser", - "//closure/library/net/streams:jsonstreamparser", - "//closure/library/net/streams:pbjsonstreamparser", - "//closure/library/net/streams:pbstreamparser", - "//closure/library/string", - "//closure/library/useragent", - ], -) diff --git a/closure/library/net/xpc/BUILD b/closure/library/net/xpc/BUILD deleted file mode 100644 index 44e4f483fc..0000000000 --- a/closure/library/net/xpc/BUILD +++ /dev/null @@ -1,178 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":crosspagechannel", - ":crosspagechannelrole", - ":directtransport", - ":frameelementmethodtransport", - ":iframepollingtransport", - ":iframerelaytransport", - ":nativemessagingtransport", - ":nixtransport", - ":relay", - ":transport", - ":xpc", - ], -) - -closure_js_library( - name = "crosspagechannel", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/xpc/crosspagechannel.js"], - lenient = True, - deps = [ - "//closure/library/async:delay", - "//closure/library/disposable", - "//closure/library/dom", - "//closure/library/dom:tagname", - "//closure/library/events", - "//closure/library/events:eventhandler", - "//closure/library/events:eventtype", - "//closure/library/json", - "//closure/library/log", - "//closure/library/messaging:abstractchannel", - "//closure/library/net/xpc", - "//closure/library/net/xpc:crosspagechannelrole", - "//closure/library/net/xpc:directtransport", - "//closure/library/net/xpc:frameelementmethodtransport", - "//closure/library/net/xpc:iframerelaytransport", - "//closure/library/net/xpc:nativemessagingtransport", - "//closure/library/net/xpc:nixtransport", - "//closure/library/string", - "//closure/library/uri", - "//closure/library/uri:utils", - "//closure/library/useragent", - "//third_party/closure/library/mochikit/async:deferred", - ], -) - -closure_js_library( - name = "crosspagechannelrole", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/xpc/crosspagechannelrole.js"], - lenient = True, -) - -closure_js_library( - name = "directtransport", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/xpc/directtransport.js"], - lenient = True, - deps = [ - "//closure/library/events:eventhandler", - "//closure/library/log", - "//closure/library/net/xpc", - "//closure/library/net/xpc:crosspagechannelrole", - "//closure/library/net/xpc:transport", - "//closure/library/object", - "//closure/library/timer", - "//third_party/closure/library/mochikit/async:deferred", - ], -) - -closure_js_library( - name = "frameelementmethodtransport", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/xpc/frameelementmethodtransport.js"], - lenient = True, - deps = [ - "//closure/library/log", - "//closure/library/net/xpc", - "//closure/library/net/xpc:crosspagechannelrole", - "//closure/library/net/xpc:transport", - ], -) - -closure_js_library( - name = "iframepollingtransport", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/xpc/iframepollingtransport.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/dom", - "//closure/library/dom:safe", - "//closure/library/dom:tagname", - "//closure/library/log", - "//closure/library/net/xpc", - "//closure/library/net/xpc:crosspagechannelrole", - "//closure/library/net/xpc:transport", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "iframerelaytransport", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/xpc/iframerelaytransport.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/dom:safe", - "//closure/library/dom:tagname", - "//closure/library/events", - "//closure/library/html:safehtml", - "//closure/library/log", - "//closure/library/net/xpc", - "//closure/library/net/xpc:transport", - "//closure/library/string", - "//closure/library/string:const", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "nativemessagingtransport", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/xpc/nativemessagingtransport.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/events", - "//closure/library/events:eventhandler", - "//closure/library/log", - "//closure/library/net/xpc", - "//closure/library/net/xpc:crosspagechannelrole", - "//closure/library/net/xpc:transport", - "//closure/library/timer", - "//third_party/closure/library/mochikit/async:deferred", - ], -) - -closure_js_library( - name = "nixtransport", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/xpc/nixtransport.js"], - lenient = True, - deps = [ - "//closure/library/log", - "//closure/library/net/xpc", - "//closure/library/net/xpc:crosspagechannelrole", - "//closure/library/net/xpc:transport", - "//closure/library/reflect", - ], -) - -closure_js_library( - name = "relay", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/xpc/relay.js"], - lenient = True, -) - -closure_js_library( - name = "transport", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/xpc/transport.js"], - lenient = True, - deps = [ - "//closure/library/disposable", - "//closure/library/dom", - "//closure/library/net/xpc", - ], -) - -closure_js_library( - name = "xpc", - srcs = ["@com_google_javascript_closure_library//:closure/goog/net/xpc/xpc.js"], - lenient = True, - deps = ["//closure/library/log"], -) diff --git a/closure/library/object/BUILD b/closure/library/object/BUILD deleted file mode 100644 index 51bdcd76e1..0000000000 --- a/closure/library/object/BUILD +++ /dev/null @@ -1,18 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [":object"], -) - -closure_js_library( - name = "object", - srcs = ["@com_google_javascript_closure_library//:closure/goog/object/object.js"], - lenient = True, -) diff --git a/closure/library/positioning/BUILD b/closure/library/positioning/BUILD deleted file mode 100644 index 981c9113c2..0000000000 --- a/closure/library/positioning/BUILD +++ /dev/null @@ -1,124 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":absoluteposition", - ":abstractposition", - ":anchoredposition", - ":anchoredviewportposition", - ":clientposition", - ":menuanchoredposition", - ":positioning", - ":viewportclientposition", - ":viewportposition", - ], -) - -closure_js_library( - name = "absoluteposition", - srcs = ["@com_google_javascript_closure_library//:closure/goog/positioning/absoluteposition.js"], - lenient = True, - deps = [ - "//closure/library/math:coordinate", - "//closure/library/positioning", - "//closure/library/positioning:abstractposition", - ], -) - -closure_js_library( - name = "abstractposition", - srcs = ["@com_google_javascript_closure_library//:closure/goog/positioning/abstractposition.js"], - lenient = True, -) - -closure_js_library( - name = "anchoredposition", - srcs = ["@com_google_javascript_closure_library//:closure/goog/positioning/anchoredposition.js"], - lenient = True, - deps = [ - "//closure/library/positioning", - "//closure/library/positioning:abstractposition", - ], -) - -closure_js_library( - name = "anchoredviewportposition", - srcs = ["@com_google_javascript_closure_library//:closure/goog/positioning/anchoredviewportposition.js"], - lenient = True, - deps = [ - "//closure/library/positioning", - "//closure/library/positioning:anchoredposition", - ], -) - -closure_js_library( - name = "clientposition", - srcs = ["@com_google_javascript_closure_library//:closure/goog/positioning/clientposition.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/math:coordinate", - "//closure/library/positioning", - "//closure/library/positioning:abstractposition", - "//closure/library/style", - ], -) - -closure_js_library( - name = "menuanchoredposition", - srcs = ["@com_google_javascript_closure_library//:closure/goog/positioning/menuanchoredposition.js"], - lenient = True, - deps = [ - "//closure/library/positioning", - "//closure/library/positioning:anchoredviewportposition", - ], -) - -closure_js_library( - name = "positioning", - srcs = ["@com_google_javascript_closure_library//:closure/goog/positioning/positioning.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:tagname", - "//closure/library/math:coordinate", - "//closure/library/math:rect", - "//closure/library/math:size", - "//closure/library/style", - "//closure/library/style:bidi", - ], -) - -closure_js_library( - name = "viewportclientposition", - srcs = ["@com_google_javascript_closure_library//:closure/goog/positioning/viewportclientposition.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/math:coordinate", - "//closure/library/positioning", - "//closure/library/positioning:clientposition", - "//closure/library/style", - ], -) - -closure_js_library( - name = "viewportposition", - srcs = ["@com_google_javascript_closure_library//:closure/goog/positioning/viewportposition.js"], - lenient = True, - deps = [ - "//closure/library/math:coordinate", - "//closure/library/positioning", - "//closure/library/positioning:abstractposition", - "//closure/library/style", - ], -) diff --git a/closure/library/promise/BUILD b/closure/library/promise/BUILD deleted file mode 100644 index 67c4aaa376..0000000000 --- a/closure/library/promise/BUILD +++ /dev/null @@ -1,58 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":nativeresolver", - ":promise", - ":resolver", - ":thenable", - ], -) - -closure_js_library( - name = "nativeresolver", - srcs = ["@com_google_javascript_closure_library//:closure/goog/promise/nativeresolver.js"], - lenient = True, -) - -closure_js_library( - name = "promise", - srcs = ["@com_google_javascript_closure_library//:closure/goog/promise/promise.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/async:freelist", - "//closure/library/async:nexttick", - "//closure/library/async:run", - "//closure/library/debug:error", - "//closure/library/promise:resolver", - "//closure/library/promise:thenable", - ], -) - -closure_js_library( - name = "resolver", - srcs = ["@com_google_javascript_closure_library//:closure/goog/promise/resolver.js"], - lenient = True, -) - -closure_js_library( - name = "testsuiteadapter", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/promise/testsuiteadapter.js"], - lenient = True, - deps = ["//closure/library/promise"], -) - -closure_js_library( - name = "thenable", - srcs = ["@com_google_javascript_closure_library//:closure/goog/promise/thenable.js"], - lenient = True, -) diff --git a/closure/library/proto/BUILD b/closure/library/proto/BUILD deleted file mode 100644 index e1ad8070ca..0000000000 --- a/closure/library/proto/BUILD +++ /dev/null @@ -1,32 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":proto", - ":serializer", - ], -) - -closure_js_library( - name = "proto", - srcs = ["@com_google_javascript_closure_library//:closure/goog/proto/proto.js"], - lenient = True, - deps = ["//closure/library/proto:serializer"], -) - -closure_js_library( - name = "serializer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/proto/serializer.js"], - lenient = True, - deps = [ - "//closure/library/json", - "//closure/library/string", - ], -) diff --git a/closure/library/proto2/BUILD b/closure/library/proto2/BUILD deleted file mode 100644 index cff8b6f141..0000000000 --- a/closure/library/proto2/BUILD +++ /dev/null @@ -1,132 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":descriptor", - ":fielddescriptor", - ":lazydeserializer", - ":message", - ":objectserializer", - ":pbliteserializer", - ":serializer", - ":textformatserializer", - ":util", - ], -) - -closure_js_library( - name = "descriptor", - srcs = ["@com_google_javascript_closure_library//:closure/goog/proto2/descriptor.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/object", - "//closure/library/string", - ], -) - -closure_js_library( - name = "fielddescriptor", - srcs = ["@com_google_javascript_closure_library//:closure/goog/proto2/fielddescriptor.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/string", - ], -) - -closure_js_library( - name = "lazydeserializer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/proto2/lazydeserializer.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/proto2:message", - "//closure/library/proto2:serializer", - ], -) - -closure_js_library( - name = "message", - srcs = ["@com_google_javascript_closure_library//:closure/goog/proto2/message.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/proto2:descriptor", - "//closure/library/proto2:fielddescriptor", - ], -) - -closure_js_library( - name = "objectserializer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/proto2/objectserializer.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/proto2:fielddescriptor", - "//closure/library/proto2:serializer", - "//closure/library/string", - ], -) - -closure_js_library( - name = "pbliteserializer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/proto2/pbliteserializer.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/proto2:fielddescriptor", - "//closure/library/proto2:lazydeserializer", - "//closure/library/proto2:serializer", - ], -) - -closure_js_library( - name = "serializer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/proto2/serializer.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/proto2:fielddescriptor", - "//closure/library/proto2:message", - ], -) - -closure_js_library( - name = "test.pb", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/proto2/test.pb.js"], - lenient = True, - deps = ["//closure/library/proto2:message"], -) - -closure_js_library( - name = "textformatserializer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/proto2/textformatserializer.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/math", - "//closure/library/object", - "//closure/library/proto2:fielddescriptor", - "//closure/library/proto2:message", - "//closure/library/proto2:serializer", - "//closure/library/string", - ], -) - -closure_js_library( - name = "util", - srcs = ["@com_google_javascript_closure_library//:closure/goog/proto2/util.js"], - lenient = True, - deps = ["//closure/library/asserts"], -) diff --git a/closure/library/pubsub/BUILD b/closure/library/pubsub/BUILD deleted file mode 100644 index bdd5d50d93..0000000000 --- a/closure/library/pubsub/BUILD +++ /dev/null @@ -1,43 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":pubsub", - ":topicid", - ":typedpubsub", - ], -) - -closure_js_library( - name = "pubsub", - srcs = ["@com_google_javascript_closure_library//:closure/goog/pubsub/pubsub.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/async:run", - "//closure/library/disposable", - ], -) - -closure_js_library( - name = "topicid", - srcs = ["@com_google_javascript_closure_library//:closure/goog/pubsub/topicid.js"], - lenient = True, -) - -closure_js_library( - name = "typedpubsub", - srcs = ["@com_google_javascript_closure_library//:closure/goog/pubsub/typedpubsub.js"], - lenient = True, - deps = [ - "//closure/library/disposable", - "//closure/library/pubsub", - ], -) diff --git a/closure/library/reflect/BUILD b/closure/library/reflect/BUILD deleted file mode 100644 index 035e16bcc3..0000000000 --- a/closure/library/reflect/BUILD +++ /dev/null @@ -1,18 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [":reflect"], -) - -closure_js_library( - name = "reflect", - srcs = ["@com_google_javascript_closure_library//:closure/goog/reflect/reflect.js"], - lenient = True, -) diff --git a/closure/library/regenerate.py b/closure/library/regenerate.py deleted file mode 100755 index 6cddb047d4..0000000000 --- a/closure/library/regenerate.py +++ /dev/null @@ -1,263 +0,0 @@ -#!/usr/bin/env python -# Copyright 2018 The Closure Rules Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Closure Library BUILD definition generator. - -This script produces a build rule for each file in the Closure Library. -It also produces coarse-grained targets (e.g. //closure/library) since -the Closure Compiler can skip unused modules very quickly. Fine-grained -build targets are useful in situations without the Closure Compiler. -""" - -import collections -import itertools -import os -import re -import subprocess -import sys - -HEADER = '# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD"\n\n' -REPO = 'com_google_javascript_closure_library' - -PROVIDE_PATTERN = re.compile(r'^goog\.(?:provide|module)\([\'"]([^\'"]+)', re.M) -REQUIRE_PATTERN = re.compile( - r'^(?:(?:const|var) .* = )?goog\.require\([\'"]([^\'"]+)', re.M) - -TESTONLY_PATTERN = re.compile(r'^goog\.setTestOnly\(', re.M) -TESTONLY_PATHS_PATTERN = re.compile(r'(?:%s)' % '|'.join(( - r'^closure/goog/labs/testing/', # forgot to use goog.setTestOnly() - r'^closure/goog/testing/net/mockiframeio\.js$', -))) - -IGNORE_PATHS_PATTERN = re.compile(r'(?:%s)' % '|'.join(( - r'_perf', - r'_test', - r'/demos/', - r'/testdata/', - r'^closure/goog/base\.js$', - r'^closure/goog/deps\.js$', - r'^closure/goog/transitionalforwarddeclarations\.js$', - r'^closure/goog/transpile\.js$', - r'^closure/goog/debug_loader_integration_tests/', - r'^third_party/closure/goog/osapi', -))) - -UNITTEST_PATTERN = re.compile('|'.join(( - r'goog\.require\(.goog\.testing\.testSuite', - r'^function (?:setUp|tearDown)', -)), re.M) - -MASTER = 'closure/library/BUILD' -MASTER_EXCLUDES = ('/ui', '/labs', 'third_party/') -MASTER_EXTRA = ''' -filegroup( - name = "base", - srcs = [ - "@{0}//:closure/goog/base.js", - "@{0}//:closure/goog/transitionalforwarddeclarations.js", - ], -) -closure_js_library( - name = "deps", - srcs = ["@{0}//:closure/goog/deps.js"], - lenient = True, -) -closure_js_library( - name = "transpile", - srcs = ["@{0}//:closure/goog/transpile.js"], - lenient = True, -) -closure_css_library( - name = "css", - srcs = ["@{0}//:css_files"], -) -py_binary( - name = "regenerate", - srcs = ["regenerate.py"], - args = ["$(location @{0}//:closure/goog/base.js)"], - data = [ - "@{0}", - "@{0}//:closure/goog/base.js", - ], - tags = [ - "local", - "manual", - ], - visibility = ["//visibility:private"], -) -'''.format(REPO) - - -def mkdir(path): - try: - os.makedirs(path) - except OSError as e: - if e.errno != 17: # File exists - raise - - -def find(prefix): - for base, _, names in os.walk(prefix): - for name in names: - yield os.path.join(base, name) - - -def normalize(path): - return path.replace('closure/goog', 'closure/library') - - -def file2build(path): - return os.path.join(os.path.dirname(normalize(path)), 'BUILD') - - -def file2name(path): - return os.path.splitext(os.path.basename(path))[0] - - -def file2dep(path): - path = normalize(path) - return '//%s:%s' % (os.path.dirname(path), file2name(path)) - - -def main(basejs, outdir): - assert outdir.startswith('/') - - # cd @com_google_javascript_closure_library// - os.chdir(os.path.join(os.path.dirname(basejs), '../..')) - - # files=$(find {third_party,}closure/goog | sort) - files = sorted(itertools.chain(find('closure/goog'), - find('third_party/closure/goog'))) - - # Find JavaScript sources and determine their relationships. - jslibs = [] - jstestlibs = set() # jslibs with goog.setTestOnly() - jsrawlibs = set() # jslibs without goog.provide() or goog.module() - file2requires = {} # e.g. closure/goog/array/array.js -> goog.asserts - provide2file = {} # e.g. goog.asserts -> closure/goog/asserts/asserts.js - for f in files: - if IGNORE_PATHS_PATTERN.search(f) is not None: - continue - file2requires[f] = [] - if f.endswith('.js'): - with open(f) as fh: - data = fh.read() - provides = [m.group(1) for m in PROVIDE_PATTERN.finditer(data)] - if provides: - if (TESTONLY_PATHS_PATTERN.search(f) is not None or - TESTONLY_PATTERN.search(data) is not None): - if UNITTEST_PATTERN.search(data) is not None: - continue - jstestlibs.add(f) - for provide in provides: - provide2file[provide] = f - file2requires[f] = sorted(set( - m.group(1) for m in REQUIRE_PATTERN.finditer(data))) - else: - jsrawlibs.add(f) - jslibs.append(f) - - # Write a build rule for each JavaScript source file. - builds = collections.defaultdict(list) - for f in jslibs: - deps = set() - for ns in file2requires[f]: - if ns not in provide2file: - sys.stderr.write('%s needs %s but not provided\n' % (f, ns)) - return 1 - deps.add(provide2file[ns]) - build = file2build(f) - name = file2name(f) - rule = 'closure_js_library(name="%s",lenient=True,srcs=["@%s//:%s"],' % ( - name, REPO, f) - if deps: - rule += 'deps=[%s],' % ','.join('"%s"' % file2dep(dep) for dep in deps) - if f in jsrawlibs: - rule += 'no_closure_library = True,' - if f in jstestlibs: - rule += 'testonly = True,' - builds[build].append(rule + ')') - - # Production source modules are grouped by folder for convenience, - # which percolates upwards in the directory hierarchy towards - # //closure/library which exports it all. Test modules are only - # grouped under the //closure/library:testing label. - alls = collections.defaultdict(set) # group rules for :all_js - testall = set() # group rules for //closure/library:testing - for f in jslibs: - if f in jsrawlibs: - continue - if f in jstestlibs: - testall.add(file2dep(f)) - continue - alls[file2build(f)].add(':%s' % file2name(f)) - dn = os.path.dirname # lazy kludge due to third_party dichotomy - dirname = dn(normalize(f)) - for parent in (os.path.join(dn(dirname), 'BUILD'), - os.path.join(dn(dn(dirname)), 'BUILD'), - os.path.join(dn(dn(dn(dirname))), 'BUILD'), - 'closure/library/BUILD'): - if parent in builds: - alls[parent].add('//%s:all_js' % dirname) - break - - # Remove labels by substring for modules like goog.ui and goog.labs - # which we don't want exported by default in the top-level BUILD file. - alls[MASTER] = [t for t in alls[MASTER] - if not any(ss in t for ss in MASTER_EXCLUDES)] - testall = [t for t in testall - if not any(ss in t for ss in MASTER_EXCLUDES)] - - # Make ninja edits to the BUILD files we wrote earlier. - for build in builds: - if alls[build]: - alljs = 'library' if build == MASTER else 'all_js' - rule = 'closure_js_library(name="%s",exports=[%s])' % ( - alljs, ','.join('"%s"' % d for d in alls[build])) - builds[build].insert(0, rule) - if build == MASTER: - builds[build].append(MASTER_EXTRA) - builds[build].insert(1, 'closure_js_library(' + - 'name="testing",' + - 'testonly=True,' + - 'exports=[%s],' % ','.join('"%s"' % d - for d in testall) + - ')') - builds[build].insert( - 0, 'load("//closure:defs.bzl", "closure_css_library")\n' + - 'load("//closure:defs.bzl", "closure_js_library")') - else: - builds[build].insert( - 0, 'load("//closure:defs.bzl", "closure_js_library")') - builds[build].insert(0, 'licenses(["notice"])') - builds[build].insert( - 0, 'package(default_visibility = ["//visibility:public"])') - - # Now actually write the BUILD files to disk. - for build in sorted(builds.keys()): - path = os.path.join(outdir, build) - mkdir(os.path.dirname(path)) - with open(path, 'w') as fh: - fh.write(HEADER) - fh.write('\n\n'.join(builds[build])) - fh.write('\n') - - # Fix the formatting of those BUILD files. - os.chdir(outdir) - return subprocess.call(['buildifier'] + sorted(builds.keys())) - - -if __name__ == '__main__': - sys.exit(main(*sys.argv[1:])) diff --git a/closure/library/result/BUILD b/closure/library/result/BUILD deleted file mode 100644 index 04fa6052ee..0000000000 --- a/closure/library/result/BUILD +++ /dev/null @@ -1,67 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":deferredadaptor", - ":dependentresult", - ":result_interface", - ":resultutil", - ":simpleresult", - ], -) - -closure_js_library( - name = "deferredadaptor", - srcs = ["@com_google_javascript_closure_library//:closure/goog/result/deferredadaptor.js"], - lenient = True, - deps = [ - "//closure/library/result:result_interface", - "//closure/library/result:resultutil", - "//third_party/closure/library/mochikit/async:deferred", - ], -) - -closure_js_library( - name = "dependentresult", - srcs = ["@com_google_javascript_closure_library//:closure/goog/result/dependentresult.js"], - lenient = True, - deps = ["//closure/library/result:result_interface"], -) - -closure_js_library( - name = "result_interface", - srcs = ["@com_google_javascript_closure_library//:closure/goog/result/result_interface.js"], - lenient = True, - deps = ["//closure/library/promise:thenable"], -) - -closure_js_library( - name = "resultutil", - srcs = ["@com_google_javascript_closure_library//:closure/goog/result/resultutil.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/result:dependentresult", - "//closure/library/result:result_interface", - "//closure/library/result:simpleresult", - ], -) - -closure_js_library( - name = "simpleresult", - srcs = ["@com_google_javascript_closure_library//:closure/goog/result/simpleresult.js"], - lenient = True, - deps = [ - "//closure/library/debug:error", - "//closure/library/promise", - "//closure/library/promise:thenable", - "//closure/library/result:result_interface", - ], -) diff --git a/closure/library/soy/BUILD b/closure/library/soy/BUILD deleted file mode 100644 index 39c86ef129..0000000000 --- a/closure/library/soy/BUILD +++ /dev/null @@ -1,63 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":data", - ":renderer", - ":soy", - ], -) - -closure_js_library( - name = "data", - srcs = ["@com_google_javascript_closure_library//:closure/goog/soy/data.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/html:safehtml", - "//closure/library/html:safescript", - "//closure/library/html:safestyle", - "//closure/library/html:safestylesheet", - "//closure/library/html:safeurl", - "//closure/library/html:trustedresourceurl", - "//closure/library/html:uncheckedconversions", - "//closure/library/i18n:bidi", - "//closure/library/string:const", - "//closure/library/uri", - ], -) - -closure_js_library( - name = "renderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/soy/renderer.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/soy", - "//closure/library/soy:data", - ], -) - -closure_js_library( - name = "soy", - srcs = ["@com_google_javascript_closure_library//:closure/goog/soy/soy.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:nodetype", - "//closure/library/dom:safe", - "//closure/library/dom:tagname", - "//closure/library/html:uncheckedconversions", - "//closure/library/soy:data", - "//closure/library/string", - ], -) diff --git a/closure/library/spell/BUILD b/closure/library/spell/BUILD deleted file mode 100644 index 6e5905c417..0000000000 --- a/closure/library/spell/BUILD +++ /dev/null @@ -1,24 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [":spellcheck"], -) - -closure_js_library( - name = "spellcheck", - srcs = ["@com_google_javascript_closure_library//:closure/goog/spell/spellcheck.js"], - lenient = True, - deps = [ - "//closure/library/events:event", - "//closure/library/events:eventtarget", - "//closure/library/structs:set", - "//closure/library/timer", - ], -) diff --git a/closure/library/stats/BUILD b/closure/library/stats/BUILD deleted file mode 100644 index 7d7495adc2..0000000000 --- a/closure/library/stats/BUILD +++ /dev/null @@ -1,24 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [":basicstat"], -) - -closure_js_library( - name = "basicstat", - srcs = ["@com_google_javascript_closure_library//:closure/goog/stats/basicstat.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/log", - "//closure/library/string:stringformat", - "//closure/library/structs:circularbuffer", - ], -) diff --git a/closure/library/storage/BUILD b/closure/library/storage/BUILD deleted file mode 100644 index 8bca103c53..0000000000 --- a/closure/library/storage/BUILD +++ /dev/null @@ -1,102 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":collectablestorage", - ":encryptedstorage", - ":errorcode", - ":expiringstorage", - ":richstorage", - ":storage", - "//closure/library/storage/mechanism:all_js", - ], -) - -closure_js_library( - name = "collectablestorage", - srcs = ["@com_google_javascript_closure_library//:closure/goog/storage/collectablestorage.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/iter", - "//closure/library/storage:errorcode", - "//closure/library/storage:expiringstorage", - "//closure/library/storage:richstorage", - ], -) - -closure_js_library( - name = "collectablestoragetester", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/storage/collectablestoragetester.js"], - lenient = True, - deps = ["//closure/library/testing:asserts"], -) - -closure_js_library( - name = "encryptedstorage", - srcs = ["@com_google_javascript_closure_library//:closure/goog/storage/encryptedstorage.js"], - lenient = True, - deps = [ - "//closure/library/crypt", - "//closure/library/crypt:arc4", - "//closure/library/crypt:base64", - "//closure/library/crypt:sha1", - "//closure/library/json", - "//closure/library/storage:collectablestorage", - "//closure/library/storage:errorcode", - "//closure/library/storage:richstorage", - ], -) - -closure_js_library( - name = "errorcode", - srcs = ["@com_google_javascript_closure_library//:closure/goog/storage/errorcode.js"], - lenient = True, -) - -closure_js_library( - name = "expiringstorage", - srcs = ["@com_google_javascript_closure_library//:closure/goog/storage/expiringstorage.js"], - lenient = True, - deps = ["//closure/library/storage:richstorage"], -) - -closure_js_library( - name = "richstorage", - srcs = ["@com_google_javascript_closure_library//:closure/goog/storage/richstorage.js"], - lenient = True, - deps = [ - "//closure/library/storage", - "//closure/library/storage:errorcode", - ], -) - -closure_js_library( - name = "storage", - srcs = ["@com_google_javascript_closure_library//:closure/goog/storage/storage.js"], - lenient = True, - deps = [ - "//closure/library/json", - "//closure/library/storage:errorcode", - ], -) - -closure_js_library( - name = "storagetester", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/storage/storagetester.js"], - lenient = True, - deps = [ - "//closure/library/storage", - "//closure/library/structs:map", - "//closure/library/testing:asserts", - ], -) diff --git a/closure/library/storage/mechanism/BUILD b/closure/library/storage/mechanism/BUILD deleted file mode 100644 index 8b11bc2d12..0000000000 --- a/closure/library/storage/mechanism/BUILD +++ /dev/null @@ -1,172 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":errorcode", - ":errorhandlingmechanism", - ":html5localstorage", - ":html5sessionstorage", - ":html5webstorage", - ":ieuserdata", - ":iterablemechanism", - ":mechanism", - ":mechanismfactory", - ":prefixedmechanism", - ], -) - -closure_js_library( - name = "errorcode", - srcs = ["@com_google_javascript_closure_library//:closure/goog/storage/mechanism/errorcode.js"], - lenient = True, -) - -closure_js_library( - name = "errorhandlingmechanism", - srcs = ["@com_google_javascript_closure_library//:closure/goog/storage/mechanism/errorhandlingmechanism.js"], - lenient = True, - deps = ["//closure/library/storage/mechanism"], -) - -closure_js_library( - name = "html5localstorage", - srcs = ["@com_google_javascript_closure_library//:closure/goog/storage/mechanism/html5localstorage.js"], - lenient = True, - deps = ["//closure/library/storage/mechanism:html5webstorage"], -) - -closure_js_library( - name = "html5sessionstorage", - srcs = ["@com_google_javascript_closure_library//:closure/goog/storage/mechanism/html5sessionstorage.js"], - lenient = True, - deps = ["//closure/library/storage/mechanism:html5webstorage"], -) - -closure_js_library( - name = "html5webstorage", - srcs = ["@com_google_javascript_closure_library//:closure/goog/storage/mechanism/html5webstorage.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/iter", - "//closure/library/storage/mechanism:errorcode", - "//closure/library/storage/mechanism:iterablemechanism", - ], -) - -closure_js_library( - name = "ieuserdata", - srcs = ["@com_google_javascript_closure_library//:closure/goog/storage/mechanism/ieuserdata.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/iter", - "//closure/library/storage/mechanism:errorcode", - "//closure/library/storage/mechanism:iterablemechanism", - "//closure/library/structs:map", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "iterablemechanism", - srcs = ["@com_google_javascript_closure_library//:closure/goog/storage/mechanism/iterablemechanism.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/iter", - "//closure/library/storage/mechanism", - ], -) - -closure_js_library( - name = "iterablemechanismtester", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/storage/mechanism/iterablemechanismtester.js"], - lenient = True, - deps = [ - "//closure/library/iter", - "//closure/library/testing:asserts", - ], -) - -closure_js_library( - name = "mechanism", - srcs = ["@com_google_javascript_closure_library//:closure/goog/storage/mechanism/mechanism.js"], - lenient = True, -) - -closure_js_library( - name = "mechanismfactory", - srcs = ["@com_google_javascript_closure_library//:closure/goog/storage/mechanism/mechanismfactory.js"], - lenient = True, - deps = [ - "//closure/library/storage/mechanism:html5localstorage", - "//closure/library/storage/mechanism:html5sessionstorage", - "//closure/library/storage/mechanism:ieuserdata", - "//closure/library/storage/mechanism:prefixedmechanism", - ], -) - -closure_js_library( - name = "mechanismseparationtester", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/storage/mechanism/mechanismseparationtester.js"], - lenient = True, - deps = [ - "//closure/library/iter", - "//closure/library/storage/mechanism:mechanismtestdefinition", - "//closure/library/testing:asserts", - ], -) - -closure_js_library( - name = "mechanismsharingtester", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/storage/mechanism/mechanismsharingtester.js"], - lenient = True, - deps = [ - "//closure/library/iter", - "//closure/library/storage/mechanism:mechanismtestdefinition", - "//closure/library/testing:asserts", - ], -) - -closure_js_library( - name = "mechanismtestdefinition", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/storage/mechanism/mechanismtestdefinition.js"], - lenient = True, -) - -closure_js_library( - name = "mechanismtester", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/storage/mechanism/mechanismtester.js"], - lenient = True, - deps = [ - "//closure/library/storage/mechanism:errorcode", - "//closure/library/testing:asserts", - "//closure/library/useragent", - "//closure/library/useragent:product", - "//closure/library/useragent:product_isversion", - ], -) - -closure_js_library( - name = "prefixedmechanism", - srcs = ["@com_google_javascript_closure_library//:closure/goog/storage/mechanism/prefixedmechanism.js"], - lenient = True, - deps = [ - "//closure/library/iter", - "//closure/library/storage/mechanism:iterablemechanism", - ], -) diff --git a/closure/library/string/BUILD b/closure/library/string/BUILD deleted file mode 100644 index 5340a889b8..0000000000 --- a/closure/library/string/BUILD +++ /dev/null @@ -1,105 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":const", - ":internal", - ":linkify", - ":newlines", - ":parser", - ":path", - ":string", - ":stringbuffer", - ":stringformat", - ":stringifier", - ":typedstring", - ], -) - -closure_js_library( - name = "const", - srcs = ["@com_google_javascript_closure_library//:closure/goog/string/const.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/string:typedstring", - ], -) - -closure_js_library( - name = "internal", - srcs = ["@com_google_javascript_closure_library//:closure/goog/string/internal.js"], - lenient = True, -) - -closure_js_library( - name = "linkify", - srcs = ["@com_google_javascript_closure_library//:closure/goog/string/linkify.js"], - lenient = True, - deps = [ - "//closure/library/html:safehtml", - "//closure/library/string", - ], -) - -closure_js_library( - name = "newlines", - srcs = ["@com_google_javascript_closure_library//:closure/goog/string/newlines.js"], - lenient = True, - deps = ["//closure/library/array"], -) - -closure_js_library( - name = "parser", - srcs = ["@com_google_javascript_closure_library//:closure/goog/string/parser.js"], - lenient = True, -) - -closure_js_library( - name = "path", - srcs = ["@com_google_javascript_closure_library//:closure/goog/string/path.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/string", - ], -) - -closure_js_library( - name = "string", - srcs = ["@com_google_javascript_closure_library//:closure/goog/string/string.js"], - lenient = True, - deps = ["//closure/library/string:internal"], -) - -closure_js_library( - name = "stringbuffer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/string/stringbuffer.js"], - lenient = True, -) - -closure_js_library( - name = "stringformat", - srcs = ["@com_google_javascript_closure_library//:closure/goog/string/stringformat.js"], - lenient = True, - deps = ["//closure/library/string"], -) - -closure_js_library( - name = "stringifier", - srcs = ["@com_google_javascript_closure_library//:closure/goog/string/stringifier.js"], - lenient = True, -) - -closure_js_library( - name = "typedstring", - srcs = ["@com_google_javascript_closure_library//:closure/goog/string/typedstring.js"], - lenient = True, -) diff --git a/closure/library/structs/BUILD b/closure/library/structs/BUILD deleted file mode 100644 index 1b39acd286..0000000000 --- a/closure/library/structs/BUILD +++ /dev/null @@ -1,196 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":avltree", - ":circularbuffer", - ":collection", - ":heap", - ":inversionmap", - ":linkedmap", - ":map", - ":node", - ":pool", - ":prioritypool", - ":priorityqueue", - ":quadtree", - ":queue", - ":set", - ":simplepool", - ":stringset", - ":structs", - ":treenode", - ":trie", - ], -) - -closure_js_library( - name = "avltree", - srcs = ["@com_google_javascript_closure_library//:closure/goog/structs/avltree.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/structs:collection", - ], -) - -closure_js_library( - name = "circularbuffer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/structs/circularbuffer.js"], - lenient = True, -) - -closure_js_library( - name = "collection", - srcs = ["@com_google_javascript_closure_library//:closure/goog/structs/collection.js"], - lenient = True, -) - -closure_js_library( - name = "heap", - srcs = ["@com_google_javascript_closure_library//:closure/goog/structs/heap.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/object", - "//closure/library/structs:node", - ], -) - -closure_js_library( - name = "inversionmap", - srcs = ["@com_google_javascript_closure_library//:closure/goog/structs/inversionmap.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - ], -) - -closure_js_library( - name = "linkedmap", - srcs = ["@com_google_javascript_closure_library//:closure/goog/structs/linkedmap.js"], - lenient = True, - deps = ["//closure/library/structs:map"], -) - -closure_js_library( - name = "map", - srcs = ["@com_google_javascript_closure_library//:closure/goog/structs/map.js"], - lenient = True, - deps = ["//closure/library/iter"], -) - -closure_js_library( - name = "node", - srcs = ["@com_google_javascript_closure_library//:closure/goog/structs/node.js"], - lenient = True, -) - -closure_js_library( - name = "pool", - srcs = ["@com_google_javascript_closure_library//:closure/goog/structs/pool.js"], - lenient = True, - deps = [ - "//closure/library/disposable", - "//closure/library/structs:queue", - "//closure/library/structs:set", - ], -) - -closure_js_library( - name = "prioritypool", - srcs = ["@com_google_javascript_closure_library//:closure/goog/structs/prioritypool.js"], - lenient = True, - deps = [ - "//closure/library/structs:pool", - "//closure/library/structs:priorityqueue", - ], -) - -closure_js_library( - name = "priorityqueue", - srcs = ["@com_google_javascript_closure_library//:closure/goog/structs/priorityqueue.js"], - lenient = True, - deps = ["//closure/library/structs:heap"], -) - -closure_js_library( - name = "quadtree", - srcs = ["@com_google_javascript_closure_library//:closure/goog/structs/quadtree.js"], - lenient = True, - deps = ["//closure/library/math:coordinate"], -) - -closure_js_library( - name = "queue", - srcs = ["@com_google_javascript_closure_library//:closure/goog/structs/queue.js"], - lenient = True, - deps = ["//closure/library/array"], -) - -closure_js_library( - name = "set", - srcs = ["@com_google_javascript_closure_library//:closure/goog/structs/set.js"], - lenient = True, - deps = [ - "//closure/library/structs", - "//closure/library/structs:collection", - "//closure/library/structs:map", - ], -) - -closure_js_library( - name = "simplepool", - srcs = ["@com_google_javascript_closure_library//:closure/goog/structs/simplepool.js"], - lenient = True, - deps = ["//closure/library/disposable"], -) - -closure_js_library( - name = "stringset", - srcs = ["@com_google_javascript_closure_library//:closure/goog/structs/stringset.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/iter", - ], -) - -closure_js_library( - name = "structs", - srcs = ["@com_google_javascript_closure_library//:closure/goog/structs/structs.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/object", - ], -) - -closure_js_library( - name = "treenode", - srcs = ["@com_google_javascript_closure_library//:closure/goog/structs/treenode.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/structs:node", - ], -) - -closure_js_library( - name = "trie", - srcs = ["@com_google_javascript_closure_library//:closure/goog/structs/trie.js"], - lenient = True, - deps = [ - "//closure/library/object", - "//closure/library/structs", - ], -) diff --git a/closure/library/style/BUILD b/closure/library/style/BUILD deleted file mode 100644 index 6a7918c47a..0000000000 --- a/closure/library/style/BUILD +++ /dev/null @@ -1,107 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":bidi", - ":cursor", - ":style", - ":transform", - ":transition", - ], -) - -closure_js_library( - name = "bidi", - srcs = ["@com_google_javascript_closure_library//:closure/goog/style/bidi.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/style", - "//closure/library/useragent", - "//closure/library/useragent:platform", - "//closure/library/useragent:product", - "//closure/library/useragent:product_isversion", - ], -) - -closure_js_library( - name = "cursor", - srcs = ["@com_google_javascript_closure_library//:closure/goog/style/cursor.js"], - lenient = True, - deps = ["//closure/library/useragent"], -) - -closure_js_library( - name = "style", - srcs = ["@com_google_javascript_closure_library//:closure/goog/style/style.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:nodetype", - "//closure/library/dom:tagname", - "//closure/library/dom:vendor", - "//closure/library/html:safestylesheet", - "//closure/library/math:box", - "//closure/library/math:coordinate", - "//closure/library/math:rect", - "//closure/library/math:size", - "//closure/library/object", - "//closure/library/reflect", - "//closure/library/string", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "stylescrollbartester", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/style/stylescrollbartester.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/dom:tagname", - "//closure/library/style", - "//closure/library/testing:asserts", - ], -) - -closure_js_library( - name = "transform", - srcs = ["@com_google_javascript_closure_library//:closure/goog/style/transform.js"], - lenient = True, - deps = [ - "//closure/library/functions", - "//closure/library/math:coordinate", - "//closure/library/math:coordinate3", - "//closure/library/style", - "//closure/library/useragent", - "//closure/library/useragent:product_isversion", - ], -) - -closure_js_library( - name = "transition", - srcs = ["@com_google_javascript_closure_library//:closure/goog/style/transition.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:safe", - "//closure/library/dom:tagname", - "//closure/library/dom:vendor", - "//closure/library/functions", - "//closure/library/html:safehtml", - "//closure/library/style", - "//closure/library/useragent", - ], -) diff --git a/closure/library/test/BUILD b/closure/library/test/BUILD deleted file mode 100644 index dd1dbfcd96..0000000000 --- a/closure/library/test/BUILD +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright 2016 The Closure Rules Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -package(default_testonly = True) - -licenses(["notice"]) # Apache 2.0 - -load("//closure:defs.bzl", "closure_js_test") - -closure_js_test( - name = "dom_test", - timeout = "short", - srcs = ["dom_test.js"], - deps = [ - "//closure/library", - "//closure/library:testing", - ], -) diff --git a/closure/library/testing/BUILD b/closure/library/testing/BUILD deleted file mode 100644 index 2e6b419dec..0000000000 --- a/closure/library/testing/BUILD +++ /dev/null @@ -1,505 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [":jstdasyncwrapper"], -) - -closure_js_library( - name = "assertionfailure", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/assertionfailure.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/testing:asserts", - ], -) - -closure_js_library( - name = "asserts", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/asserts.js"], - lenient = True, - deps = ["//closure/library/testing:jsunitexception"], -) - -closure_js_library( - name = "asynctestcase", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/asynctestcase.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/testing:asserts", - "//closure/library/testing:testcase", - ], -) - -closure_js_library( - name = "benchmark", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/benchmark.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/dom:tagname", - "//closure/library/testing:performancetable", - "//closure/library/testing:performancetimer", - "//closure/library/testing:testcase", - ], -) - -closure_js_library( - name = "continuationtestcase", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/continuationtestcase.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/events:eventhandler", - "//closure/library/events:eventtarget", - "//closure/library/testing:asserts", - "//closure/library/testing:testcase", - ], -) - -closure_js_library( - name = "deferredtestcase", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/deferredtestcase.js"], - lenient = True, - deps = [ - "//closure/library/testing:asynctestcase", - "//closure/library/testing:testcase", - "//third_party/closure/library/mochikit/async:deferred", - ], -) - -closure_js_library( - name = "dom", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/dom.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:abstractrange", - "//closure/library/dom:classlist", - "//closure/library/dom:inputtype", - "//closure/library/dom:nodeiterator", - "//closure/library/dom:nodetype", - "//closure/library/dom:tagiterator", - "//closure/library/dom:tagname", - "//closure/library/iter", - "//closure/library/object", - "//closure/library/string", - "//closure/library/style", - "//closure/library/testing:asserts", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "expectedfailures", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/expectedfailures.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/debug:divconsole", - "//closure/library/dom", - "//closure/library/dom:tagname", - "//closure/library/events", - "//closure/library/events:eventtype", - "//closure/library/log", - "//closure/library/style", - "//closure/library/testing:asserts", - "//closure/library/testing:jsunitexception", - "//closure/library/testing:testcase", - ], -) - -closure_js_library( - name = "functionmock", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/functionmock.js"], - lenient = True, - deps = [ - "//closure/library/object", - "//closure/library/testing:loosemock", - "//closure/library/testing:mock", - "//closure/library/testing:propertyreplacer", - "//closure/library/testing:strictmock", - ], -) - -closure_js_library( - name = "graphics", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/graphics.js"], - lenient = True, - deps = [ - "//closure/library/graphics:path", - "//closure/library/testing:asserts", - ], -) - -closure_js_library( - name = "jstdasyncwrapper", - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/jstdasyncwrapper.js"], - lenient = True, - deps = ["//closure/library/promise"], -) - -closure_js_library( - name = "jstdtestcaseadapter", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/jstdtestcaseadapter.js"], - lenient = True, - deps = [ - "//closure/library/async:run", - "//closure/library/functions", - "//closure/library/testing:jstdasyncwrapper", - "//closure/library/testing:jsunit", - "//closure/library/testing:testcase", - ], -) - -closure_js_library( - name = "jsunit", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/jsunit.js"], - lenient = True, - deps = [ - "//closure/library/dom:tagname", - "//closure/library/testing:testcase", - "//closure/library/testing:testrunner", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "jsunitexception", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/jsunitexception.js"], - lenient = True, - deps = ["//closure/library/testing:stacktrace"], -) - -closure_js_library( - name = "loosemock", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/loosemock.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/structs:map", - "//closure/library/structs:set", - "//closure/library/testing:mock", - ], -) - -closure_js_library( - name = "mock", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/mock.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/object", - "//closure/library/promise", - "//closure/library/promise:resolver", - "//closure/library/testing:jsunitexception", - "//closure/library/testing:mockinterface", - "//closure/library/testing:mockmatchers", - ], -) - -closure_js_library( - name = "mockclassfactory", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/mockclassfactory.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/object", - "//closure/library/testing:loosemock", - "//closure/library/testing:mockmatchers", - "//closure/library/testing:strictmock", - "//closure/library/testing:testcase", - ], -) - -closure_js_library( - name = "mockclock", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/mockclock.js"], - lenient = True, - deps = [ - "//closure/library/async:run", - "//closure/library/disposable", - "//closure/library/promise", - "//closure/library/promise:thenable", - "//closure/library/testing:propertyreplacer", - "//closure/library/testing/events", - ], -) - -closure_js_library( - name = "mockcontrol", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/mockcontrol.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/promise", - "//closure/library/testing:functionmock", - "//closure/library/testing:loosemock", - "//closure/library/testing:strictmock", - ], -) - -closure_js_library( - name = "mockinterface", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/mockinterface.js"], - lenient = True, - deps = ["//closure/library/promise"], -) - -closure_js_library( - name = "mockmatchers", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/mockmatchers.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/dom", - "//closure/library/testing:asserts", - ], -) - -closure_js_library( - name = "mockrandom", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/mockrandom.js"], - lenient = True, - deps = ["//closure/library/disposable"], -) - -closure_js_library( - name = "mockrange", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/mockrange.js"], - lenient = True, - deps = [ - "//closure/library/dom:abstractrange", - "//closure/library/testing:loosemock", - ], -) - -closure_js_library( - name = "mockstorage", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/mockstorage.js"], - lenient = True, - deps = ["//closure/library/structs:map"], -) - -closure_js_library( - name = "mockuseragent", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/mockuseragent.js"], - lenient = True, - deps = [ - "//closure/library/disposable", - "//closure/library/labs/useragent:util", - "//closure/library/testing:propertyreplacer", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "multitestrunner", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/multitestrunner.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:classlist", - "//closure/library/dom:tagname", - "//closure/library/events:eventhandler", - "//closure/library/functions", - "//closure/library/object", - "//closure/library/string", - "//closure/library/testing:testcase", - "//closure/library/timer", - "//closure/library/ui:component", - "//closure/library/ui:serverchart", - "//closure/library/ui:tablesorter", - ], -) - -closure_js_library( - name = "objectpropertystring", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/objectpropertystring.js"], - lenient = True, -) - -closure_js_library( - name = "performancetable", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/performancetable.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:tagname", - "//closure/library/testing:performancetimer", - ], -) - -closure_js_library( - name = "performancetimer", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/performancetimer.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/math", - "//third_party/closure/library/mochikit/async:deferred", - ], -) - -closure_js_library( - name = "propertyreplacer", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/propertyreplacer.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "pseudorandom", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/pseudorandom.js"], - lenient = True, - deps = ["//closure/library/disposable"], -) - -closure_js_library( - name = "recordfunction", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/recordfunction.js"], - lenient = True, - deps = [ - "//closure/library/promise", - "//closure/library/promise:resolver", - "//closure/library/testing:asserts", - ], -) - -closure_js_library( - name = "shardingtestcase", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/shardingtestcase.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/testing:testcase", - ], -) - -closure_js_library( - name = "singleton", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/singleton.js"], - lenient = True, -) - -closure_js_library( - name = "stacktrace", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/stacktrace.js"], - lenient = True, -) - -closure_js_library( - name = "strictmock", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/strictmock.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/structs:set", - "//closure/library/testing:mock", - ], -) - -closure_js_library( - name = "testcase", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/testcase.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:tagname", - "//closure/library/object", - "//closure/library/promise", - "//closure/library/promise:thenable", - "//closure/library/testing:asserts", - "//closure/library/testing:jsunitexception", - ], -) - -closure_js_library( - name = "testqueue", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/testqueue.js"], - lenient = True, -) - -closure_js_library( - name = "testrunner", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/testrunner.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/dom:safe", - "//closure/library/dom:tagname", - "//closure/library/json", - "//closure/library/testing:testcase", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "testsuite", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/testsuite.js"], - lenient = True, - deps = [ - "//closure/library/labs/testing:environment", - "//closure/library/testing:testcase", - ], -) diff --git a/closure/library/testing/async/BUILD b/closure/library/testing/async/BUILD deleted file mode 100644 index 6b15c1b1d1..0000000000 --- a/closure/library/testing/async/BUILD +++ /dev/null @@ -1,22 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "mockcontrol", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/async/mockcontrol.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/debug", - "//closure/library/testing:asserts", - "//closure/library/testing:mockcontrol", - "//closure/library/testing:mockmatchers", - "//third_party/closure/library/mochikit/async:deferred", - ], -) diff --git a/closure/library/testing/editor/BUILD b/closure/library/testing/editor/BUILD deleted file mode 100644 index e3faa7f09d..0000000000 --- a/closure/library/testing/editor/BUILD +++ /dev/null @@ -1,52 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "dom", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/editor/dom.js"], - lenient = True, - deps = [ - "//closure/library/dom:abstractrange", - "//closure/library/dom:nodetype", - "//closure/library/dom:tagiterator", - "//closure/library/iter", - "//closure/library/string", - "//closure/library/testing:asserts", - ], -) - -closure_js_library( - name = "fieldmock", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/editor/fieldmock.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/dom:range", - "//closure/library/editor:field", - "//closure/library/testing:loosemock", - "//closure/library/testing:mockmatchers", - ], -) - -closure_js_library( - name = "testhelper", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/editor/testhelper.js"], - lenient = True, - deps = [ - "//closure/library/disposable", - "//closure/library/dom", - "//closure/library/dom:range", - "//closure/library/editor:browserfeature", - "//closure/library/editor:node", - "//closure/library/editor/plugins:abstractbubbleplugin", - "//closure/library/testing:dom", - ], -) diff --git a/closure/library/testing/events/BUILD b/closure/library/testing/events/BUILD deleted file mode 100644 index 010060be14..0000000000 --- a/closure/library/testing/events/BUILD +++ /dev/null @@ -1,61 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "eventobserver", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/events/eventobserver.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/events:event", - ], -) - -closure_js_library( - name = "events", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/events/events.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/disposable", - "//closure/library/dom:nodetype", - "//closure/library/events", - "//closure/library/events:browserevent", - "//closure/library/events:browserfeature", - "//closure/library/events:eventtarget", - "//closure/library/events:eventtype", - "//closure/library/events:keycodes", - "//closure/library/object", - "//closure/library/style", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "matchers", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/events/matchers.js"], - lenient = True, - deps = [ - "//closure/library/events:event", - "//closure/library/testing:mockmatchers", - ], -) - -closure_js_library( - name = "onlinehandler", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/events/onlinehandler.js"], - lenient = True, - deps = [ - "//closure/library/events:eventtarget", - "//closure/library/net:networkstatusmonitor", - ], -) diff --git a/closure/library/testing/fs/BUILD b/closure/library/testing/fs/BUILD deleted file mode 100644 index 85e4bbb943..0000000000 --- a/closure/library/testing/fs/BUILD +++ /dev/null @@ -1,114 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "blob", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/fs/blob.js"], - lenient = True, - deps = [ - "//closure/library/crypt", - "//closure/library/crypt:base64", - ], -) - -closure_js_library( - name = "entry", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/fs/entry.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/fs:entry", - "//closure/library/fs:entryimpl", - "//closure/library/fs:error", - "//closure/library/functions", - "//closure/library/object", - "//closure/library/string", - "//closure/library/testing/fs:file", - "//closure/library/testing/fs:filewriter", - "//closure/library/timer", - "//third_party/closure/library/mochikit/async:deferred", - ], -) - -closure_js_library( - name = "file", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/fs/file.js"], - lenient = True, - deps = ["//closure/library/testing/fs:blob"], -) - -closure_js_library( - name = "filereader", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/fs/filereader.js"], - lenient = True, - deps = [ - "//closure/library/events:eventtarget", - "//closure/library/fs:error", - "//closure/library/fs:filereader", - "//closure/library/testing/fs:blob", - "//closure/library/testing/fs:progressevent", - "//closure/library/timer", - ], -) - -closure_js_library( - name = "filesystem", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/fs/filesystem.js"], - lenient = True, - deps = [ - "//closure/library/fs:filesystem", - "//closure/library/testing/fs:entry", - ], -) - -closure_js_library( - name = "filewriter", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/fs/filewriter.js"], - lenient = True, - deps = [ - "//closure/library/events:eventtarget", - "//closure/library/fs:error", - "//closure/library/fs:filesaver", - "//closure/library/string", - "//closure/library/testing/fs:blob", - "//closure/library/testing/fs:file", - "//closure/library/testing/fs:progressevent", - "//closure/library/timer", - ], -) - -closure_js_library( - name = "fs", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/fs/fs.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/fs", - "//closure/library/testing:propertyreplacer", - "//closure/library/testing/fs:blob", - "//closure/library/testing/fs:filesystem", - "//closure/library/timer", - "//third_party/closure/library/mochikit/async:deferred", - ], -) - -closure_js_library( - name = "progressevent", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/fs/progressevent.js"], - lenient = True, - deps = ["//closure/library/events:event"], -) diff --git a/closure/library/testing/i18n/BUILD b/closure/library/testing/i18n/BUILD deleted file mode 100644 index 994ac20921..0000000000 --- a/closure/library/testing/i18n/BUILD +++ /dev/null @@ -1,15 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "asserts", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/i18n/asserts.js"], - lenient = True, - deps = ["//closure/library/testing:jsunit"], -) diff --git a/closure/library/testing/messaging/BUILD b/closure/library/testing/messaging/BUILD deleted file mode 100644 index 3c85da14e5..0000000000 --- a/closure/library/testing/messaging/BUILD +++ /dev/null @@ -1,53 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "mockmessagechannel", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/messaging/mockmessagechannel.js"], - lenient = True, - deps = [ - "//closure/library/messaging:abstractchannel", - "//closure/library/testing:asserts", - "//closure/library/testing:mockcontrol", - ], -) - -closure_js_library( - name = "mockmessageevent", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/messaging/mockmessageevent.js"], - lenient = True, - deps = [ - "//closure/library/events:browserevent", - "//closure/library/events:eventtype", - "//closure/library/testing/events", - ], -) - -closure_js_library( - name = "mockmessageport", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/messaging/mockmessageport.js"], - lenient = True, - deps = [ - "//closure/library/events:eventtarget", - "//closure/library/testing:mockcontrol", - ], -) - -closure_js_library( - name = "mockportnetwork", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/messaging/mockportnetwork.js"], - lenient = True, - deps = [ - "//closure/library/messaging:portnetwork", - "//closure/library/testing/messaging:mockmessagechannel", - ], -) diff --git a/closure/library/testing/net/BUILD b/closure/library/testing/net/BUILD deleted file mode 100644 index f5142e728f..0000000000 --- a/closure/library/testing/net/BUILD +++ /dev/null @@ -1,55 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "mockiframeio", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/net/mockiframeio.js"], - lenient = True, - deps = [ - "//closure/library/events:eventtarget", - "//closure/library/net:errorcode", - "//closure/library/net:eventtype", - "//closure/library/net:iframeio", - "//closure/library/testing:testqueue", - ], -) - -closure_js_library( - name = "xhrio", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/net/xhrio.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/dom:xml", - "//closure/library/events", - "//closure/library/net:errorcode", - "//closure/library/net:eventtype", - "//closure/library/net:httpstatus", - "//closure/library/net:xhrio", - "//closure/library/net:xmlhttp", - "//closure/library/object", - "//closure/library/structs", - "//closure/library/structs:map", - "//closure/library/testing:testqueue", - "//closure/library/uri", - "//closure/library/uri:utils", - ], -) - -closure_js_library( - name = "xhriopool", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/net/xhriopool.js"], - lenient = True, - deps = [ - "//closure/library/net:xhriopool", - "//closure/library/testing/net:xhrio", - ], -) diff --git a/closure/library/testing/proto2/BUILD b/closure/library/testing/proto2/BUILD deleted file mode 100644 index 396308c9b8..0000000000 --- a/closure/library/testing/proto2/BUILD +++ /dev/null @@ -1,19 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "proto2", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/proto2/proto2.js"], - lenient = True, - deps = [ - "//closure/library/proto2:message", - "//closure/library/proto2:objectserializer", - "//closure/library/testing:asserts", - ], -) diff --git a/closure/library/testing/storage/BUILD b/closure/library/testing/storage/BUILD deleted file mode 100644 index f336de5c60..0000000000 --- a/closure/library/testing/storage/BUILD +++ /dev/null @@ -1,18 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "fakemechanism", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/storage/fakemechanism.js"], - lenient = True, - deps = [ - "//closure/library/storage/mechanism:iterablemechanism", - "//closure/library/structs:map", - ], -) diff --git a/closure/library/testing/style/BUILD b/closure/library/testing/style/BUILD deleted file mode 100644 index 76484b09cb..0000000000 --- a/closure/library/testing/style/BUILD +++ /dev/null @@ -1,31 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "layoutasserts", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/style/layoutasserts.js"], - lenient = True, - deps = [ - "//closure/library/style", - "//closure/library/testing:asserts", - "//closure/library/testing/style", - ], -) - -closure_js_library( - name = "style", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/style/style.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/math:rect", - "//closure/library/style", - ], -) diff --git a/closure/library/testing/ui/BUILD b/closure/library/testing/ui/BUILD deleted file mode 100644 index 4bb765027a..0000000000 --- a/closure/library/testing/ui/BUILD +++ /dev/null @@ -1,47 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "rendererasserts", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/ui/rendererasserts.js"], - lenient = True, - deps = [ - "//closure/library/testing:asserts", - "//closure/library/ui:controlrenderer", - ], -) - -closure_js_library( - name = "rendererharness", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/ui/rendererharness.js"], - lenient = True, - deps = [ - "//closure/library/disposable", - "//closure/library/dom:nodetype", - "//closure/library/testing:asserts", - "//closure/library/testing:dom", - "//closure/library/ui:control", - "//closure/library/ui:controlrenderer", - ], -) - -closure_js_library( - name = "style", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/testing/ui/style.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:classlist", - "//closure/library/testing:asserts", - ], -) diff --git a/closure/library/timer/BUILD b/closure/library/timer/BUILD deleted file mode 100644 index ccf26faaa7..0000000000 --- a/closure/library/timer/BUILD +++ /dev/null @@ -1,22 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [":timer"], -) - -closure_js_library( - name = "timer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/timer/timer.js"], - lenient = True, - deps = [ - "//closure/library/events:eventtarget", - "//closure/library/promise", - ], -) diff --git a/closure/library/tweak/BUILD b/closure/library/tweak/BUILD deleted file mode 100644 index 56cc32c806..0000000000 --- a/closure/library/tweak/BUILD +++ /dev/null @@ -1,88 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":entries", - ":registry", - ":tweak", - ":tweakui", - ], -) - -closure_js_library( - name = "entries", - srcs = ["@com_google_javascript_closure_library//:closure/goog/tweak/entries.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/log", - "//closure/library/object", - ], -) - -closure_js_library( - name = "registry", - srcs = ["@com_google_javascript_closure_library//:closure/goog/tweak/registry.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/log", - "//closure/library/string", - "//closure/library/tweak:entries", - "//closure/library/uri:utils", - ], -) - -closure_js_library( - name = "testhelpers", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/tweak/testhelpers.js"], - lenient = True, - deps = [ - "//closure/library/tweak", - "//closure/library/tweak:entries", - "//closure/library/tweak:registry", - ], -) - -closure_js_library( - name = "tweak", - srcs = ["@com_google_javascript_closure_library//:closure/goog/tweak/tweak.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/tweak:entries", - "//closure/library/tweak:registry", - ], -) - -closure_js_library( - name = "tweakui", - srcs = ["@com_google_javascript_closure_library//:closure/goog/tweak/tweakui.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:safe", - "//closure/library/dom:tagname", - "//closure/library/html:safehtml", - "//closure/library/html:safestylesheet", - "//closure/library/object", - "//closure/library/string:const", - "//closure/library/style", - "//closure/library/tweak", - "//closure/library/tweak:entries", - "//closure/library/ui:zippy", - "//closure/library/useragent", - ], -) diff --git a/closure/library/ui/BUILD b/closure/library/ui/BUILD deleted file mode 100644 index a385f30102..0000000000 --- a/closure/library/ui/BUILD +++ /dev/null @@ -1,2293 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":abstractspellchecker", - ":activitymonitor", - ":advancedtooltip", - ":animatedzippy", - ":attachablemenu", - ":bidiinput", - ":bubble", - ":button", - ":buttonrenderer", - ":buttonside", - ":charcounter", - ":charpicker", - ":checkbox", - ":checkboxmenuitem", - ":checkboxrenderer", - ":colormenubutton", - ":colormenubuttonrenderer", - ":colorpalette", - ":colorpicker", - ":combobox", - ":component", - ":componentutil", - ":container", - ":containerrenderer", - ":containerscroller", - ":control", - ":controlcontent", - ":controlrenderer", - ":cookieeditor", - ":css3buttonrenderer", - ":css3menubuttonrenderer", - ":cssnames", - ":custombutton", - ":custombuttonrenderer", - ":customcolorpalette", - ":datepicker", - ":datepickerrenderer", - ":decorate", - ":defaultdatepickerrenderer", - ":dialog", - ":dimensionpicker", - ":dimensionpickerrenderer", - ":dragdropdetector", - ":drilldownrow", - ":filteredmenu", - ":filterobservingmenuitem", - ":filterobservingmenuitemrenderer", - ":flatbuttonrenderer", - ":flatmenubuttonrenderer", - ":formpost", - ":gauge", - ":gaugetheme", - ":hovercard", - ":hsvapalette", - ":hsvpalette", - ":idgenerator", - ":idletimer", - ":iframemask", - ":imagelessbuttonrenderer", - ":imagelessmenubuttonrenderer", - ":inputdatepicker", - ":itemevent", - ":keyboardeventdata", - ":keyboardshortcuthandler", - ":labelinput", - ":linkbuttonrenderer", - ":menu", - ":menubar", - ":menubardecorator", - ":menubarrenderer", - ":menubase", - ":menubutton", - ":menubuttonrenderer", - ":menuheader", - ":menuheaderrenderer", - ":menuitem", - ":menuitemrenderer", - ":menurenderer", - ":menuseparator", - ":menuseparatorrenderer", - ":mockactivitymonitor", - ":modalariavisibilityhelper", - ":modalpopup", - ":nativebuttonrenderer", - ":option", - ":palette", - ":paletterenderer", - ":plaintextspellchecker", - ":popup", - ":popupbase", - ":popupcolorpicker", - ":popupdatepicker", - ":popupmenu", - ":progressbar", - ":prompt", - ":rangemodel", - ":ratings", - ":registry", - ":richtextspellchecker", - ":roundedpanel", - ":roundedtabrenderer", - ":scrollfloater", - ":select", - ":selectionmenubutton", - ":selectionmodel", - ":separator", - ":serverchart", - ":slider", - ":sliderbase", - ":splitpane", - ":submenu", - ":submenurenderer", - ":synthetickeyboardevent", - ":tab", - ":tabbar", - ":tabbarrenderer", - ":tablesorter", - ":tabpane", - ":tabrenderer", - ":textarea", - ":textarearenderer", - ":togglebutton", - ":toolbar", - ":toolbarbutton", - ":toolbarbuttonrenderer", - ":toolbarcolormenubutton", - ":toolbarcolormenubuttonrenderer", - ":toolbarmenubutton", - ":toolbarmenubuttonrenderer", - ":toolbarrenderer", - ":toolbarselect", - ":toolbarseparator", - ":toolbarseparatorrenderer", - ":toolbartogglebutton", - ":tooltip", - ":tristatemenuitem", - ":tristatemenuitemrenderer", - ":twothumbslider", - ":zippy", - "//closure/library/ui/ac:all_js", - "//closure/library/ui/editor:all_js", - "//closure/library/ui/emoji:all_js", - "//closure/library/ui/media:all_js", - "//closure/library/ui/style/app:all_js", - "//closure/library/ui/tree:all_js", - ], -) - -closure_js_library( - name = "abstractspellchecker", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/abstractspellchecker.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria", - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:classlist", - "//closure/library/dom:inputtype", - "//closure/library/dom:nodetype", - "//closure/library/dom:selection", - "//closure/library/dom:tagname", - "//closure/library/events", - "//closure/library/events:event", - "//closure/library/events:eventtype", - "//closure/library/math:coordinate", - "//closure/library/spell:spellcheck", - "//closure/library/structs:set", - "//closure/library/style", - "//closure/library/ui:component", - "//closure/library/ui:menuitem", - "//closure/library/ui:menuseparator", - "//closure/library/ui:popupmenu", - ], -) - -closure_js_library( - name = "activitymonitor", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/activitymonitor.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/events:eventhandler", - "//closure/library/events:eventtarget", - "//closure/library/events:eventtype", - ], -) - -closure_js_library( - name = "advancedtooltip", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/advancedtooltip.js"], - lenient = True, - deps = [ - "//closure/library/events", - "//closure/library/events:eventtype", - "//closure/library/math:box", - "//closure/library/math:coordinate", - "//closure/library/style", - "//closure/library/ui:tooltip", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "animatedzippy", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/animatedzippy.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria:roles", - "//closure/library/dom", - "//closure/library/dom:tagname", - "//closure/library/events", - "//closure/library/fx:animation", - "//closure/library/fx:easing", - "//closure/library/fx:transition", - "//closure/library/ui:zippy", - ], -) - -closure_js_library( - name = "attachablemenu", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/attachablemenu.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria", - "//closure/library/a11y/aria:attributes", - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:classlist", - "//closure/library/events:event", - "//closure/library/events:keycodes", - "//closure/library/string", - "//closure/library/style", - "//closure/library/ui:itemevent", - "//closure/library/ui:menubase", - "//closure/library/ui:popupbase", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "bidiinput", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/bidiinput.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/dom:inputtype", - "//closure/library/dom:tagname", - "//closure/library/events", - "//closure/library/events:inputhandler", - "//closure/library/i18n:bidi", - "//closure/library/ui:component", - ], -) - -closure_js_library( - name = "bubble", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/bubble.js"], - lenient = True, - deps = [ - "//closure/library/dom:safe", - "//closure/library/events", - "//closure/library/events:eventtype", - "//closure/library/html:safehtml", - "//closure/library/math:box", - "//closure/library/positioning", - "//closure/library/positioning:absoluteposition", - "//closure/library/positioning:anchoredposition", - "//closure/library/string:const", - "//closure/library/style", - "//closure/library/timer", - "//closure/library/ui:component", - "//closure/library/ui:popup", - ], -) - -closure_js_library( - name = "button", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/button.js"], - lenient = True, - deps = [ - "//closure/library/events:eventtype", - "//closure/library/events:keycodes", - "//closure/library/events:keyhandler", - "//closure/library/ui:buttonrenderer", - "//closure/library/ui:buttonside", - "//closure/library/ui:component", - "//closure/library/ui:control", - "//closure/library/ui:nativebuttonrenderer", - "//closure/library/ui:registry", - ], -) - -closure_js_library( - name = "buttonrenderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/buttonrenderer.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria", - "//closure/library/a11y/aria:attributes", - "//closure/library/a11y/aria:roles", - "//closure/library/asserts", - "//closure/library/ui:buttonside", - "//closure/library/ui:component", - "//closure/library/ui:controlrenderer", - ], -) - -closure_js_library( - name = "buttonside", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/buttonside.js"], - lenient = True, -) - -closure_js_library( - name = "charcounter", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/charcounter.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/events", - "//closure/library/events:eventtarget", - "//closure/library/events:inputhandler", - ], -) - -closure_js_library( - name = "charpicker", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/charpicker.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria", - "//closure/library/a11y/aria:attributes", - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:classlist", - "//closure/library/dom:tagname", - "//closure/library/events", - "//closure/library/events:event", - "//closure/library/events:eventhandler", - "//closure/library/events:eventtype", - "//closure/library/events:inputhandler", - "//closure/library/events:keycodes", - "//closure/library/events:keyhandler", - "//closure/library/i18n:charlistdecompressor", - "//closure/library/i18n:charpickerdata", - "//closure/library/i18n:uchar", - "//closure/library/i18n/uchar:namefetcher", - "//closure/library/structs:set", - "//closure/library/style", - "//closure/library/ui:button", - "//closure/library/ui:component", - "//closure/library/ui:containerscroller", - "//closure/library/ui:flatbuttonrenderer", - "//closure/library/ui:hovercard", - "//closure/library/ui:labelinput", - "//closure/library/ui:menu", - "//closure/library/ui:menubutton", - "//closure/library/ui:menuitem", - "//closure/library/ui:tooltip", - ], -) - -closure_js_library( - name = "checkbox", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/checkbox.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria", - "//closure/library/a11y/aria:attributes", - "//closure/library/events:eventtype", - "//closure/library/events:keycodes", - "//closure/library/string", - "//closure/library/ui:checkboxrenderer", - "//closure/library/ui:component", - "//closure/library/ui:control", - "//closure/library/ui:registry", - ], -) - -closure_js_library( - name = "checkboxmenuitem", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/checkboxmenuitem.js"], - lenient = True, - deps = [ - "//closure/library/ui:menuitem", - "//closure/library/ui:registry", - ], -) - -closure_js_library( - name = "checkboxrenderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/checkboxrenderer.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria", - "//closure/library/a11y/aria:attributes", - "//closure/library/a11y/aria:roles", - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/dom:classlist", - "//closure/library/dom:tagname", - "//closure/library/object", - "//closure/library/ui:controlrenderer", - ], -) - -closure_js_library( - name = "colormenubutton", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/colormenubutton.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/object", - "//closure/library/ui:colormenubuttonrenderer", - "//closure/library/ui:colorpalette", - "//closure/library/ui:component", - "//closure/library/ui:menu", - "//closure/library/ui:menubutton", - "//closure/library/ui:registry", - ], -) - -closure_js_library( - name = "colormenubuttonrenderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/colormenubuttonrenderer.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/color", - "//closure/library/dom:classlist", - "//closure/library/dom:tagname", - "//closure/library/ui:menubuttonrenderer", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "colorpalette", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/colorpalette.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/color", - "//closure/library/dom:tagname", - "//closure/library/style", - "//closure/library/ui:palette", - "//closure/library/ui:paletterenderer", - ], -) - -closure_js_library( - name = "colorpicker", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/colorpicker.js"], - lenient = True, - deps = [ - "//closure/library/ui:colorpalette", - "//closure/library/ui:component", - ], -) - -closure_js_library( - name = "combobox", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/combobox.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:classlist", - "//closure/library/dom:inputtype", - "//closure/library/dom:tagname", - "//closure/library/events:eventtype", - "//closure/library/events:inputhandler", - "//closure/library/events:keycodes", - "//closure/library/events:keyhandler", - "//closure/library/log", - "//closure/library/positioning", - "//closure/library/positioning:menuanchoredposition", - "//closure/library/string", - "//closure/library/style", - "//closure/library/timer", - "//closure/library/ui:component", - "//closure/library/ui:itemevent", - "//closure/library/ui:labelinput", - "//closure/library/ui:menu", - "//closure/library/ui:menuitem", - "//closure/library/ui:menuseparator", - "//closure/library/ui:registry", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "component", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/component.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:nodetype", - "//closure/library/dom:tagname", - "//closure/library/events:eventhandler", - "//closure/library/events:eventtarget", - "//closure/library/object", - "//closure/library/style", - "//closure/library/ui:idgenerator", - ], -) - -closure_js_library( - name = "componentutil", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/componentutil.js"], - lenient = True, - deps = ["//closure/library/events:eventtype"], -) - -closure_js_library( - name = "container", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/container.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria", - "//closure/library/a11y/aria:attributes", - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/events:eventtype", - "//closure/library/events:keycodes", - "//closure/library/events:keyhandler", - "//closure/library/object", - "//closure/library/style", - "//closure/library/ui:component", - "//closure/library/ui:componentutil", - "//closure/library/ui:containerrenderer", - "//closure/library/ui:control", - ], -) - -closure_js_library( - name = "containerrenderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/containerrenderer.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria", - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/dom:classlist", - "//closure/library/dom:nodetype", - "//closure/library/dom:tagname", - "//closure/library/string", - "//closure/library/style", - "//closure/library/ui:registry", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "containerscroller", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/containerscroller.js"], - lenient = True, - deps = [ - "//closure/library/disposable", - "//closure/library/events:eventhandler", - "//closure/library/style", - "//closure/library/timer", - "//closure/library/ui:component", - "//closure/library/ui:container", - ], -) - -closure_js_library( - name = "control", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/control.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/disposable", - "//closure/library/dom", - "//closure/library/events:browserevent", - "//closure/library/events:event", - "//closure/library/events:eventhandler", - "//closure/library/events:eventtype", - "//closure/library/events:keycodes", - "//closure/library/events:keyhandler", - "//closure/library/string", - "//closure/library/ui:component", - "//closure/library/ui:componentutil", - "//closure/library/ui:controlcontent", - "//closure/library/ui:controlrenderer", - "//closure/library/ui:registry", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "controlcontent", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/controlcontent.js"], - lenient = True, -) - -closure_js_library( - name = "controlrenderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/controlrenderer.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria", - "//closure/library/a11y/aria:attributes", - "//closure/library/a11y/aria:roles", - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:classlist", - "//closure/library/dom:tagname", - "//closure/library/object", - "//closure/library/string", - "//closure/library/style", - "//closure/library/ui:component", - "//closure/library/ui:controlcontent", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "cookieeditor", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/cookieeditor.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:tagname", - "//closure/library/events:eventtype", - "//closure/library/net:cookies", - "//closure/library/string", - "//closure/library/style", - "//closure/library/ui:component", - ], -) - -closure_js_library( - name = "css3buttonrenderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/css3buttonrenderer.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/dom:classlist", - "//closure/library/dom:tagname", - "//closure/library/ui:button", - "//closure/library/ui:buttonrenderer", - "//closure/library/ui:component", - "//closure/library/ui:cssnames", - "//closure/library/ui:registry", - ], -) - -closure_js_library( - name = "css3menubuttonrenderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/css3menubuttonrenderer.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/dom:tagname", - "//closure/library/ui:cssnames", - "//closure/library/ui:menubutton", - "//closure/library/ui:menubuttonrenderer", - "//closure/library/ui:registry", - ], -) - -closure_js_library( - name = "cssnames", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/cssnames.js"], - lenient = True, -) - -closure_js_library( - name = "custombutton", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/custombutton.js"], - lenient = True, - deps = [ - "//closure/library/ui:button", - "//closure/library/ui:custombuttonrenderer", - "//closure/library/ui:registry", - ], -) - -closure_js_library( - name = "custombuttonrenderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/custombuttonrenderer.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria:roles", - "//closure/library/asserts", - "//closure/library/dom:classlist", - "//closure/library/dom:nodetype", - "//closure/library/dom:tagname", - "//closure/library/string", - "//closure/library/ui:buttonrenderer", - "//closure/library/ui:cssnames", - ], -) - -closure_js_library( - name = "customcolorpalette", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/customcolorpalette.js"], - lenient = True, - deps = [ - "//closure/library/color", - "//closure/library/dom", - "//closure/library/dom:classlist", - "//closure/library/dom:tagname", - "//closure/library/ui:colorpalette", - "//closure/library/ui:component", - ], -) - -closure_js_library( - name = "datepicker", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/datepicker.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria", - "//closure/library/asserts", - "//closure/library/date", - "//closure/library/date:daterange", - "//closure/library/dom", - "//closure/library/dom:classlist", - "//closure/library/dom:nodetype", - "//closure/library/dom:tagname", - "//closure/library/events:event", - "//closure/library/events:eventtype", - "//closure/library/events:keyhandler", - "//closure/library/i18n:datetimeformat", - "//closure/library/i18n:datetimepatterns", - "//closure/library/i18n:datetimesymbols", - "//closure/library/style", - "//closure/library/ui:component", - "//closure/library/ui:defaultdatepickerrenderer", - "//closure/library/ui:idgenerator", - ], -) - -closure_js_library( - name = "datepickerrenderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/datepickerrenderer.js"], - lenient = True, -) - -closure_js_library( - name = "decorate", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/decorate.js"], - lenient = True, - deps = ["//closure/library/ui:registry"], -) - -closure_js_library( - name = "defaultdatepickerrenderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/defaultdatepickerrenderer.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/dom:tagname", - "//closure/library/ui:datepickerrenderer", - ], -) - -closure_js_library( - name = "dialog", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/dialog.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria", - "//closure/library/a11y/aria:attributes", - "//closure/library/a11y/aria:roles", - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:classlist", - "//closure/library/dom:nodetype", - "//closure/library/dom:safe", - "//closure/library/dom:tagname", - "//closure/library/events", - "//closure/library/events:event", - "//closure/library/events:eventtype", - "//closure/library/events:keycodes", - "//closure/library/events:keys", - "//closure/library/fx:dragger", - "//closure/library/html:safehtml", - "//closure/library/math:rect", - "//closure/library/string", - "//closure/library/structs:map", - "//closure/library/style", - "//closure/library/ui:modalpopup", - ], -) - -closure_js_library( - name = "dimensionpicker", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/dimensionpicker.js"], - lenient = True, - deps = [ - "//closure/library/events:browserevent", - "//closure/library/events:eventtype", - "//closure/library/events:keycodes", - "//closure/library/math:size", - "//closure/library/ui:component", - "//closure/library/ui:componentutil", - "//closure/library/ui:control", - "//closure/library/ui:dimensionpickerrenderer", - "//closure/library/ui:registry", - ], -) - -closure_js_library( - name = "dimensionpickerrenderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/dimensionpickerrenderer.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria:announcer", - "//closure/library/a11y/aria:attributes", - "//closure/library/dom", - "//closure/library/dom:tagname", - "//closure/library/i18n:bidi", - "//closure/library/style", - "//closure/library/ui:controlrenderer", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "dragdropdetector", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/dragdropdetector.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/dom:inputtype", - "//closure/library/dom:tagname", - "//closure/library/events:event", - "//closure/library/events:eventhandler", - "//closure/library/events:eventtarget", - "//closure/library/events:eventtype", - "//closure/library/math:coordinate", - "//closure/library/string", - "//closure/library/style", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "drilldownrow", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/drilldownrow.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:classlist", - "//closure/library/dom:safe", - "//closure/library/dom:tagname", - "//closure/library/html:safehtml", - "//closure/library/string", - "//closure/library/ui:component", - ], -) - -closure_js_library( - name = "filteredmenu", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/filteredmenu.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria", - "//closure/library/a11y/aria:attributes", - "//closure/library/dom", - "//closure/library/dom:inputtype", - "//closure/library/dom:tagname", - "//closure/library/events", - "//closure/library/events:eventtype", - "//closure/library/events:inputhandler", - "//closure/library/events:keycodes", - "//closure/library/string", - "//closure/library/style", - "//closure/library/ui:component", - "//closure/library/ui:filterobservingmenuitem", - "//closure/library/ui:menu", - "//closure/library/ui:menuitem", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "filterobservingmenuitem", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/filterobservingmenuitem.js"], - lenient = True, - deps = [ - "//closure/library/ui:filterobservingmenuitemrenderer", - "//closure/library/ui:menuitem", - "//closure/library/ui:registry", - ], -) - -closure_js_library( - name = "filterobservingmenuitemrenderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/filterobservingmenuitemrenderer.js"], - lenient = True, - deps = ["//closure/library/ui:menuitemrenderer"], -) - -closure_js_library( - name = "flatbuttonrenderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/flatbuttonrenderer.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria:roles", - "//closure/library/asserts", - "//closure/library/dom:classlist", - "//closure/library/dom:tagname", - "//closure/library/ui:button", - "//closure/library/ui:buttonrenderer", - "//closure/library/ui:cssnames", - "//closure/library/ui:registry", - ], -) - -closure_js_library( - name = "flatmenubuttonrenderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/flatmenubuttonrenderer.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/dom:tagname", - "//closure/library/style", - "//closure/library/ui:cssnames", - "//closure/library/ui:flatbuttonrenderer", - "//closure/library/ui:menu", - "//closure/library/ui:menubutton", - "//closure/library/ui:menurenderer", - "//closure/library/ui:registry", - ], -) - -closure_js_library( - name = "formpost", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/formpost.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/dom:inputtype", - "//closure/library/dom:safe", - "//closure/library/dom:tagname", - "//closure/library/html:safehtml", - "//closure/library/ui:component", - ], -) - -closure_js_library( - name = "gauge", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/gauge.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria", - "//closure/library/asserts", - "//closure/library/dom:tagname", - "//closure/library/events", - "//closure/library/fx:animation", - "//closure/library/fx:easing", - "//closure/library/fx:transition", - "//closure/library/graphics", - "//closure/library/graphics:font", - "//closure/library/graphics:path", - "//closure/library/graphics:solidfill", - "//closure/library/math", - "//closure/library/ui:component", - "//closure/library/ui:gaugetheme", - ], -) - -closure_js_library( - name = "gaugetheme", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/gaugetheme.js"], - lenient = True, - deps = [ - "//closure/library/graphics:lineargradient", - "//closure/library/graphics:solidfill", - "//closure/library/graphics:stroke", - ], -) - -closure_js_library( - name = "hovercard", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/hovercard.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/dom", - "//closure/library/events", - "//closure/library/events:event", - "//closure/library/events:eventtype", - "//closure/library/ui:advancedtooltip", - "//closure/library/ui:popupbase", - "//closure/library/ui:tooltip", - ], -) - -closure_js_library( - name = "hsvapalette", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/hsvapalette.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/color:alpha", - "//closure/library/dom:tagname", - "//closure/library/events", - "//closure/library/events:eventtype", - "//closure/library/style", - "//closure/library/ui:component", - "//closure/library/ui:hsvpalette", - ], -) - -closure_js_library( - name = "hsvpalette", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/hsvpalette.js"], - lenient = True, - deps = [ - "//closure/library/color", - "//closure/library/dom:inputtype", - "//closure/library/dom:tagname", - "//closure/library/events", - "//closure/library/events:eventtype", - "//closure/library/events:inputhandler", - "//closure/library/style", - "//closure/library/style:bidi", - "//closure/library/ui:component", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "idgenerator", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/idgenerator.js"], - lenient = True, -) - -closure_js_library( - name = "idletimer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/idletimer.js"], - lenient = True, - deps = [ - "//closure/library/events", - "//closure/library/events:eventtarget", - "//closure/library/structs:set", - "//closure/library/timer", - "//closure/library/ui:activitymonitor", - ], -) - -closure_js_library( - name = "iframemask", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/iframemask.js"], - lenient = True, - deps = [ - "//closure/library/disposable", - "//closure/library/dom", - "//closure/library/dom:iframe", - "//closure/library/events:eventhandler", - "//closure/library/structs:pool", - "//closure/library/style", - "//closure/library/timer", - ], -) - -closure_js_library( - name = "imagelessbuttonrenderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/imagelessbuttonrenderer.js"], - lenient = True, - deps = [ - "//closure/library/dom:classlist", - "//closure/library/dom:tagname", - "//closure/library/ui:button", - "//closure/library/ui:component", - "//closure/library/ui:cssnames", - "//closure/library/ui:custombuttonrenderer", - "//closure/library/ui:registry", - ], -) - -closure_js_library( - name = "imagelessmenubuttonrenderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/imagelessmenubuttonrenderer.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/dom:classlist", - "//closure/library/dom:tagname", - "//closure/library/ui:cssnames", - "//closure/library/ui:menubutton", - "//closure/library/ui:menubuttonrenderer", - "//closure/library/ui:registry", - ], -) - -closure_js_library( - name = "inputdatepicker", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/inputdatepicker.js"], - lenient = True, - deps = [ - "//closure/library/date", - "//closure/library/dom", - "//closure/library/dom:inputtype", - "//closure/library/dom:tagname", - "//closure/library/i18n:datetimeparse", - "//closure/library/string", - "//closure/library/ui:component", - "//closure/library/ui:datepicker", - "//closure/library/ui:labelinput", - "//closure/library/ui:popupbase", - "//closure/library/ui:popupdatepicker", - ], -) - -closure_js_library( - name = "itemevent", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/itemevent.js"], - lenient = True, - deps = ["//closure/library/events:event"], -) - -closure_js_library( - name = "keyboardeventdata", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/keyboardeventdata.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/events:browserevent", - ], -) - -closure_js_library( - name = "keyboardshortcuthandler", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/keyboardshortcuthandler.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/dom:tagname", - "//closure/library/events", - "//closure/library/events:event", - "//closure/library/events:eventtarget", - "//closure/library/events:eventtype", - "//closure/library/events:keycodes", - "//closure/library/events:keynames", - "//closure/library/events:keys", - "//closure/library/object", - "//closure/library/ui:keyboardeventdata", - "//closure/library/ui:synthetickeyboardevent", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "labelinput", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/labelinput.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria", - "//closure/library/a11y/aria:attributes", - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:classlist", - "//closure/library/dom:inputtype", - "//closure/library/dom:tagname", - "//closure/library/events:eventhandler", - "//closure/library/events:eventtype", - "//closure/library/timer", - "//closure/library/ui:component", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "linkbuttonrenderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/linkbuttonrenderer.js"], - lenient = True, - deps = [ - "//closure/library/ui:button", - "//closure/library/ui:flatbuttonrenderer", - "//closure/library/ui:registry", - ], -) - -closure_js_library( - name = "menu", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/menu.js"], - lenient = True, - deps = [ - "//closure/library/dom:tagname", - "//closure/library/math:coordinate", - "//closure/library/string", - "//closure/library/style", - "//closure/library/ui:component", - "//closure/library/ui:container", - "//closure/library/ui:menuheader", - "//closure/library/ui:menuitem", - "//closure/library/ui:menurenderer", - "//closure/library/ui:menuseparator", - ], -) - -closure_js_library( - name = "menubar", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/menubar.js"], - lenient = True, - deps = [ - "//closure/library/ui:container", - "//closure/library/ui:menubarrenderer", - ], -) - -closure_js_library( - name = "menubardecorator", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/menubardecorator.js"], - lenient = True, - deps = [ - "//closure/library/ui:menubar", - "//closure/library/ui:menubarrenderer", - "//closure/library/ui:registry", - ], -) - -closure_js_library( - name = "menubarrenderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/menubarrenderer.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria:roles", - "//closure/library/ui:container", - "//closure/library/ui:containerrenderer", - ], -) - -closure_js_library( - name = "menubase", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/menubase.js"], - lenient = True, - deps = [ - "//closure/library/events:eventhandler", - "//closure/library/events:eventtype", - "//closure/library/events:keyhandler", - "//closure/library/ui:popup", - ], -) - -closure_js_library( - name = "menubutton", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/menubutton.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria", - "//closure/library/a11y/aria:attributes", - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/events:eventtype", - "//closure/library/events:keycodes", - "//closure/library/events:keyhandler", - "//closure/library/math:box", - "//closure/library/math:rect", - "//closure/library/positioning", - "//closure/library/positioning:menuanchoredposition", - "//closure/library/style", - "//closure/library/timer", - "//closure/library/ui:button", - "//closure/library/ui:component", - "//closure/library/ui:idgenerator", - "//closure/library/ui:menu", - "//closure/library/ui:menubuttonrenderer", - "//closure/library/ui:menuitem", - "//closure/library/ui:menurenderer", - "//closure/library/ui:registry", - "//closure/library/useragent", - "//closure/library/useragent:product", - ], -) - -closure_js_library( - name = "menubuttonrenderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/menubuttonrenderer.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/dom:tagname", - "//closure/library/style", - "//closure/library/ui:cssnames", - "//closure/library/ui:custombuttonrenderer", - "//closure/library/ui:menu", - "//closure/library/ui:menurenderer", - ], -) - -closure_js_library( - name = "menuheader", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/menuheader.js"], - lenient = True, - deps = [ - "//closure/library/ui:component", - "//closure/library/ui:control", - "//closure/library/ui:menuheaderrenderer", - "//closure/library/ui:registry", - ], -) - -closure_js_library( - name = "menuheaderrenderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/menuheaderrenderer.js"], - lenient = True, - deps = ["//closure/library/ui:controlrenderer"], -) - -closure_js_library( - name = "menuitem", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/menuitem.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria:roles", - "//closure/library/array", - "//closure/library/dom", - "//closure/library/dom:classlist", - "//closure/library/math:coordinate", - "//closure/library/string", - "//closure/library/ui:component", - "//closure/library/ui:control", - "//closure/library/ui:menuitemrenderer", - "//closure/library/ui:registry", - ], -) - -closure_js_library( - name = "menuitemrenderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/menuitemrenderer.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria:roles", - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:classlist", - "//closure/library/dom:tagname", - "//closure/library/ui:component", - "//closure/library/ui:controlrenderer", - ], -) - -closure_js_library( - name = "menurenderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/menurenderer.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria", - "//closure/library/a11y/aria:attributes", - "//closure/library/a11y/aria:roles", - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:tagname", - "//closure/library/ui:containerrenderer", - "//closure/library/ui:separator", - ], -) - -closure_js_library( - name = "menuseparator", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/menuseparator.js"], - lenient = True, - deps = [ - "//closure/library/ui:menuseparatorrenderer", - "//closure/library/ui:registry", - "//closure/library/ui:separator", - ], -) - -closure_js_library( - name = "menuseparatorrenderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/menuseparatorrenderer.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/dom:classlist", - "//closure/library/dom:tagname", - "//closure/library/ui:controlrenderer", - ], -) - -closure_js_library( - name = "mockactivitymonitor", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/mockactivitymonitor.js"], - lenient = True, - deps = [ - "//closure/library/events:eventtype", - "//closure/library/ui:activitymonitor", - ], -) - -closure_js_library( - name = "modalariavisibilityhelper", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/modalariavisibilityhelper.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria", - "//closure/library/a11y/aria:attributes", - ], -) - -closure_js_library( - name = "modalpopup", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/modalpopup.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:classlist", - "//closure/library/dom:iframe", - "//closure/library/dom:tagname", - "//closure/library/dom/animationframe", - "//closure/library/events", - "//closure/library/events:eventtype", - "//closure/library/events:focushandler", - "//closure/library/fx:transition", - "//closure/library/string", - "//closure/library/style", - "//closure/library/timer", - "//closure/library/ui:component", - "//closure/library/ui:modalariavisibilityhelper", - "//closure/library/ui:popupbase", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "nativebuttonrenderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/nativebuttonrenderer.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/dom:classlist", - "//closure/library/dom:inputtype", - "//closure/library/dom:tagname", - "//closure/library/events:eventtype", - "//closure/library/ui:buttonrenderer", - "//closure/library/ui:component", - ], -) - -closure_js_library( - name = "option", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/option.js"], - lenient = True, - deps = [ - "//closure/library/ui:component", - "//closure/library/ui:menuitem", - "//closure/library/ui:registry", - ], -) - -closure_js_library( - name = "palette", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/palette.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/dom", - "//closure/library/events", - "//closure/library/events:eventtype", - "//closure/library/events:keycodes", - "//closure/library/math:size", - "//closure/library/ui:component", - "//closure/library/ui:control", - "//closure/library/ui:paletterenderer", - "//closure/library/ui:selectionmodel", - ], -) - -closure_js_library( - name = "paletterenderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/paletterenderer.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria", - "//closure/library/a11y/aria:attributes", - "//closure/library/a11y/aria:roles", - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:classlist", - "//closure/library/dom:dataset", - "//closure/library/dom:nodeiterator", - "//closure/library/dom:nodetype", - "//closure/library/dom:tagname", - "//closure/library/iter", - "//closure/library/style", - "//closure/library/ui:controlrenderer", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "plaintextspellchecker", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/plaintextspellchecker.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria", - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:tagname", - "//closure/library/events:eventhandler", - "//closure/library/events:eventtype", - "//closure/library/events:keycodes", - "//closure/library/events:keyhandler", - "//closure/library/spell:spellcheck", - "//closure/library/style", - "//closure/library/timer", - "//closure/library/ui:abstractspellchecker", - "//closure/library/ui:component", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "popup", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/popup.js"], - lenient = True, - deps = [ - "//closure/library/math:box", - "//closure/library/positioning", - "//closure/library/positioning:abstractposition", - "//closure/library/style", - "//closure/library/ui:popupbase", - ], -) - -closure_js_library( - name = "popupbase", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/popupbase.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/dom", - "//closure/library/dom:tagname", - "//closure/library/events", - "//closure/library/events:eventhandler", - "//closure/library/events:eventtarget", - "//closure/library/events:eventtype", - "//closure/library/events:keycodes", - "//closure/library/fx:transition", - "//closure/library/style", - "//closure/library/timer", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "popupcolorpicker", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/popupcolorpicker.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/dom:classlist", - "//closure/library/events:eventtype", - "//closure/library/positioning", - "//closure/library/positioning:anchoredposition", - "//closure/library/ui:colorpicker", - "//closure/library/ui:component", - "//closure/library/ui:popup", - ], -) - -closure_js_library( - name = "popupdatepicker", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/popupdatepicker.js"], - lenient = True, - deps = [ - "//closure/library/events:eventtype", - "//closure/library/positioning", - "//closure/library/positioning:anchoredposition", - "//closure/library/style", - "//closure/library/ui:component", - "//closure/library/ui:datepicker", - "//closure/library/ui:popup", - "//closure/library/ui:popupbase", - ], -) - -closure_js_library( - name = "popupmenu", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/popupmenu.js"], - lenient = True, - deps = [ - "//closure/library/events", - "//closure/library/events:browserevent", - "//closure/library/events:eventtype", - "//closure/library/events:keycodes", - "//closure/library/positioning", - "//closure/library/positioning:anchoredviewportposition", - "//closure/library/positioning:menuanchoredposition", - "//closure/library/positioning:viewportclientposition", - "//closure/library/structs:map", - "//closure/library/style", - "//closure/library/ui:component", - "//closure/library/ui:menu", - "//closure/library/ui:popupbase", - ], -) - -closure_js_library( - name = "progressbar", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/progressbar.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria", - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:classlist", - "//closure/library/dom:tagname", - "//closure/library/events", - "//closure/library/events:eventtype", - "//closure/library/ui:component", - "//closure/library/ui:rangemodel", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "prompt", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/prompt.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/dom:inputtype", - "//closure/library/dom:tagname", - "//closure/library/events", - "//closure/library/events:eventtype", - "//closure/library/functions", - "//closure/library/html:safehtml", - "//closure/library/timer", - "//closure/library/ui:component", - "//closure/library/ui:dialog", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "rangemodel", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/rangemodel.js"], - lenient = True, - deps = [ - "//closure/library/events:eventtarget", - "//closure/library/ui:component", - ], -) - -closure_js_library( - name = "ratings", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/ratings.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria", - "//closure/library/a11y/aria:attributes", - "//closure/library/a11y/aria:roles", - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:classlist", - "//closure/library/dom:tagname", - "//closure/library/events:eventtype", - "//closure/library/ui:component", - ], -) - -closure_js_library( - name = "registry", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/registry.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/dom:classlist", - ], -) - -closure_js_library( - name = "richtextspellchecker", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/richtextspellchecker.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:nodetype", - "//closure/library/dom:range", - "//closure/library/events:eventhandler", - "//closure/library/events:eventtype", - "//closure/library/events:keycodes", - "//closure/library/events:keyhandler", - "//closure/library/math:coordinate", - "//closure/library/spell:spellcheck", - "//closure/library/string:stringbuffer", - "//closure/library/style", - "//closure/library/timer", - "//closure/library/ui:abstractspellchecker", - "//closure/library/ui:component", - "//closure/library/ui:popupmenu", - ], -) - -closure_js_library( - name = "roundedpanel", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/roundedpanel.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:classlist", - "//closure/library/dom:tagname", - "//closure/library/graphics", - "//closure/library/graphics:path", - "//closure/library/graphics:solidfill", - "//closure/library/graphics:stroke", - "//closure/library/math", - "//closure/library/math:coordinate", - "//closure/library/style", - "//closure/library/ui:component", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "roundedtabrenderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/roundedtabrenderer.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/dom:tagname", - "//closure/library/ui:registry", - "//closure/library/ui:tab", - "//closure/library/ui:tabbar", - "//closure/library/ui:tabrenderer", - ], -) - -closure_js_library( - name = "scrollfloater", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/scrollfloater.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:classlist", - "//closure/library/dom:tagname", - "//closure/library/events:eventtype", - "//closure/library/style", - "//closure/library/ui:component", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "select", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/select.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria", - "//closure/library/a11y/aria:attributes", - "//closure/library/a11y/aria:roles", - "//closure/library/array", - "//closure/library/events:eventtype", - "//closure/library/ui:component", - "//closure/library/ui:idgenerator", - "//closure/library/ui:menubutton", - "//closure/library/ui:menuitem", - "//closure/library/ui:menurenderer", - "//closure/library/ui:registry", - "//closure/library/ui:selectionmodel", - ], -) - -closure_js_library( - name = "selectionmenubutton", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/selectionmenubutton.js"], - lenient = True, - deps = [ - "//closure/library/dom:inputtype", - "//closure/library/dom:tagname", - "//closure/library/events:eventtype", - "//closure/library/style", - "//closure/library/ui:component", - "//closure/library/ui:menubutton", - "//closure/library/ui:menuitem", - "//closure/library/ui:registry", - ], -) - -closure_js_library( - name = "selectionmodel", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/selectionmodel.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/events:eventtarget", - "//closure/library/events:eventtype", - ], -) - -closure_js_library( - name = "separator", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/separator.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria", - "//closure/library/asserts", - "//closure/library/ui:component", - "//closure/library/ui:control", - "//closure/library/ui:menuseparatorrenderer", - "//closure/library/ui:registry", - ], -) - -closure_js_library( - name = "serverchart", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/serverchart.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/dom:safe", - "//closure/library/dom:tagname", - "//closure/library/events:event", - "//closure/library/string", - "//closure/library/ui:component", - "//closure/library/uri", - ], -) - -closure_js_library( - name = "slider", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/slider.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria", - "//closure/library/a11y/aria:roles", - "//closure/library/dom", - "//closure/library/dom:tagname", - "//closure/library/ui:sliderbase", - ], -) - -closure_js_library( - name = "sliderbase", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/sliderbase.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria", - "//closure/library/a11y/aria:attributes", - "//closure/library/a11y/aria:roles", - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:classlist", - "//closure/library/dom:tagname", - "//closure/library/events", - "//closure/library/events:eventtype", - "//closure/library/events:keycodes", - "//closure/library/events:keyhandler", - "//closure/library/events:mousewheelhandler", - "//closure/library/functions", - "//closure/library/fx:animationqueue", - "//closure/library/fx:dom", - "//closure/library/fx:dragger", - "//closure/library/fx:transition", - "//closure/library/math", - "//closure/library/math:coordinate", - "//closure/library/style", - "//closure/library/style:bidi", - "//closure/library/timer", - "//closure/library/ui:component", - "//closure/library/ui:rangemodel", - ], -) - -closure_js_library( - name = "splitpane", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/splitpane.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:classlist", - "//closure/library/dom:tagname", - "//closure/library/events:eventtype", - "//closure/library/fx:dragger", - "//closure/library/math:rect", - "//closure/library/math:size", - "//closure/library/style", - "//closure/library/ui:component", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "submenu", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/submenu.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:classlist", - "//closure/library/events:keycodes", - "//closure/library/positioning", - "//closure/library/positioning:anchoredviewportposition", - "//closure/library/style", - "//closure/library/timer", - "//closure/library/ui:component", - "//closure/library/ui:menu", - "//closure/library/ui:menuitem", - "//closure/library/ui:registry", - "//closure/library/ui:submenurenderer", - ], -) - -closure_js_library( - name = "submenurenderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/submenurenderer.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria", - "//closure/library/a11y/aria:attributes", - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:classlist", - "//closure/library/dom:tagname", - "//closure/library/style", - "//closure/library/ui:menu", - "//closure/library/ui:menuitemrenderer", - ], -) - -closure_js_library( - name = "synthetickeyboardevent", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/synthetickeyboardevent.js"], - lenient = True, - deps = [ - "//closure/library/events:event", - "//closure/library/ui:keyboardeventdata", - ], -) - -closure_js_library( - name = "tab", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/tab.js"], - lenient = True, - deps = [ - "//closure/library/ui:component", - "//closure/library/ui:control", - "//closure/library/ui:registry", - "//closure/library/ui:tabrenderer", - ], -) - -closure_js_library( - name = "tabbar", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/tabbar.js"], - lenient = True, - deps = [ - "//closure/library/ui:component", - "//closure/library/ui:container", - "//closure/library/ui:registry", - "//closure/library/ui:tab", - "//closure/library/ui:tabbarrenderer", - ], -) - -closure_js_library( - name = "tabbarrenderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/tabbarrenderer.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria:roles", - "//closure/library/object", - "//closure/library/ui:containerrenderer", - ], -) - -closure_js_library( - name = "tablesorter", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/tablesorter.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/dom", - "//closure/library/dom:classlist", - "//closure/library/dom:tagname", - "//closure/library/events:eventtype", - "//closure/library/functions", - "//closure/library/ui:component", - ], -) - -closure_js_library( - name = "tabpane", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/tabpane.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:classlist", - "//closure/library/dom:tagname", - "//closure/library/events", - "//closure/library/events:event", - "//closure/library/events:eventtarget", - "//closure/library/events:eventtype", - "//closure/library/events:keycodes", - "//closure/library/html:safestylesheet", - "//closure/library/style", - ], -) - -closure_js_library( - name = "tabrenderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/tabrenderer.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria:roles", - "//closure/library/ui:component", - "//closure/library/ui:controlrenderer", - ], -) - -closure_js_library( - name = "textarea", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/textarea.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:classlist", - "//closure/library/events:eventtype", - "//closure/library/style", - "//closure/library/ui:control", - "//closure/library/ui:textarearenderer", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "textarearenderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/textarearenderer.js"], - lenient = True, - deps = [ - "//closure/library/dom:tagname", - "//closure/library/ui:component", - "//closure/library/ui:controlrenderer", - ], -) - -closure_js_library( - name = "togglebutton", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/togglebutton.js"], - lenient = True, - deps = [ - "//closure/library/ui:button", - "//closure/library/ui:component", - "//closure/library/ui:custombuttonrenderer", - "//closure/library/ui:registry", - ], -) - -closure_js_library( - name = "toolbar", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/toolbar.js"], - lenient = True, - deps = [ - "//closure/library/ui:container", - "//closure/library/ui:toolbarrenderer", - ], -) - -closure_js_library( - name = "toolbarbutton", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/toolbarbutton.js"], - lenient = True, - deps = [ - "//closure/library/ui:button", - "//closure/library/ui:registry", - "//closure/library/ui:toolbarbuttonrenderer", - ], -) - -closure_js_library( - name = "toolbarbuttonrenderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/toolbarbuttonrenderer.js"], - lenient = True, - deps = ["//closure/library/ui:custombuttonrenderer"], -) - -closure_js_library( - name = "toolbarcolormenubutton", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/toolbarcolormenubutton.js"], - lenient = True, - deps = [ - "//closure/library/ui:colormenubutton", - "//closure/library/ui:registry", - "//closure/library/ui:toolbarcolormenubuttonrenderer", - ], -) - -closure_js_library( - name = "toolbarcolormenubuttonrenderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/toolbarcolormenubuttonrenderer.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/dom:classlist", - "//closure/library/ui:colormenubuttonrenderer", - "//closure/library/ui:menubuttonrenderer", - "//closure/library/ui:toolbarmenubuttonrenderer", - ], -) - -closure_js_library( - name = "toolbarmenubutton", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/toolbarmenubutton.js"], - lenient = True, - deps = [ - "//closure/library/ui:menubutton", - "//closure/library/ui:registry", - "//closure/library/ui:toolbarmenubuttonrenderer", - ], -) - -closure_js_library( - name = "toolbarmenubuttonrenderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/toolbarmenubuttonrenderer.js"], - lenient = True, - deps = ["//closure/library/ui:menubuttonrenderer"], -) - -closure_js_library( - name = "toolbarrenderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/toolbarrenderer.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria:roles", - "//closure/library/dom:tagname", - "//closure/library/ui:container", - "//closure/library/ui:containerrenderer", - "//closure/library/ui:separator", - "//closure/library/ui:toolbarseparatorrenderer", - ], -) - -closure_js_library( - name = "toolbarselect", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/toolbarselect.js"], - lenient = True, - deps = [ - "//closure/library/ui:registry", - "//closure/library/ui:select", - "//closure/library/ui:toolbarmenubuttonrenderer", - ], -) - -closure_js_library( - name = "toolbarseparator", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/toolbarseparator.js"], - lenient = True, - deps = [ - "//closure/library/ui:registry", - "//closure/library/ui:separator", - "//closure/library/ui:toolbarseparatorrenderer", - ], -) - -closure_js_library( - name = "toolbarseparatorrenderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/toolbarseparatorrenderer.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/dom:classlist", - "//closure/library/dom:tagname", - "//closure/library/ui:cssnames", - "//closure/library/ui:menuseparatorrenderer", - ], -) - -closure_js_library( - name = "toolbartogglebutton", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/toolbartogglebutton.js"], - lenient = True, - deps = [ - "//closure/library/ui:registry", - "//closure/library/ui:togglebutton", - "//closure/library/ui:toolbarbuttonrenderer", - ], -) - -closure_js_library( - name = "tooltip", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/tooltip.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:safe", - "//closure/library/dom:tagname", - "//closure/library/events", - "//closure/library/events:eventtype", - "//closure/library/events:focushandler", - "//closure/library/math:box", - "//closure/library/math:coordinate", - "//closure/library/positioning", - "//closure/library/positioning:anchoredposition", - "//closure/library/positioning:viewportposition", - "//closure/library/structs:set", - "//closure/library/style", - "//closure/library/timer", - "//closure/library/ui:popup", - "//closure/library/ui:popupbase", - ], -) - -closure_js_library( - name = "tristatemenuitem", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/tristatemenuitem.js"], - lenient = True, - deps = [ - "//closure/library/dom:classlist", - "//closure/library/ui:component", - "//closure/library/ui:menuitem", - "//closure/library/ui:registry", - "//closure/library/ui:tristatemenuitemrenderer", - ], -) - -closure_js_library( - name = "tristatemenuitemrenderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/tristatemenuitemrenderer.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/dom:classlist", - "//closure/library/ui:menuitemrenderer", - ], -) - -closure_js_library( - name = "twothumbslider", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/twothumbslider.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria", - "//closure/library/a11y/aria:roles", - "//closure/library/dom", - "//closure/library/dom:tagname", - "//closure/library/ui:sliderbase", - ], -) - -closure_js_library( - name = "zippy", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/zippy.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria", - "//closure/library/a11y/aria:attributes", - "//closure/library/a11y/aria:roles", - "//closure/library/dom", - "//closure/library/dom:classlist", - "//closure/library/events:event", - "//closure/library/events:eventhandler", - "//closure/library/events:eventtarget", - "//closure/library/events:eventtype", - "//closure/library/events:keycodes", - "//closure/library/events:keyhandler", - "//closure/library/style", - ], -) diff --git a/closure/library/ui/ac/BUILD b/closure/library/ui/ac/BUILD deleted file mode 100644 index d537604bee..0000000000 --- a/closure/library/ui/ac/BUILD +++ /dev/null @@ -1,180 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":ac", - ":arraymatcher", - ":autocomplete", - ":cachingmatcher", - ":inputhandler", - ":remote", - ":remotearraymatcher", - ":renderer", - ":renderoptions", - ":richinputhandler", - ":richremote", - ":richremotearraymatcher", - ], -) - -closure_js_library( - name = "ac", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/ac/ac.js"], - lenient = True, - deps = [ - "//closure/library/ui/ac:arraymatcher", - "//closure/library/ui/ac:autocomplete", - "//closure/library/ui/ac:inputhandler", - "//closure/library/ui/ac:renderer", - ], -) - -closure_js_library( - name = "arraymatcher", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/ac/arraymatcher.js"], - lenient = True, - deps = ["//closure/library/string"], -) - -closure_js_library( - name = "autocomplete", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/ac/autocomplete.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/events", - "//closure/library/events:eventtarget", - "//closure/library/object", - "//closure/library/ui/ac:renderoptions", - ], -) - -closure_js_library( - name = "cachingmatcher", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/ac/cachingmatcher.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/async:throttle", - "//closure/library/ui/ac:arraymatcher", - "//closure/library/ui/ac:renderoptions", - ], -) - -closure_js_library( - name = "inputhandler", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/ac/inputhandler.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria", - "//closure/library/a11y/aria:attributes", - "//closure/library/a11y/aria:roles", - "//closure/library/disposable", - "//closure/library/dom", - "//closure/library/dom:selection", - "//closure/library/events:eventhandler", - "//closure/library/events:eventtype", - "//closure/library/events:keycodes", - "//closure/library/events:keyhandler", - "//closure/library/string", - "//closure/library/timer", - "//closure/library/useragent", - "//closure/library/useragent:product", - ], -) - -closure_js_library( - name = "remote", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/ac/remote.js"], - lenient = True, - deps = [ - "//closure/library/ui/ac:autocomplete", - "//closure/library/ui/ac:inputhandler", - "//closure/library/ui/ac:remotearraymatcher", - "//closure/library/ui/ac:renderer", - ], -) - -closure_js_library( - name = "remotearraymatcher", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/ac/remotearraymatcher.js"], - lenient = True, - deps = [ - "//closure/library/disposable", - "//closure/library/events", - "//closure/library/net:eventtype", - "//closure/library/net:xhrio", - "//closure/library/uri", - ], -) - -closure_js_library( - name = "renderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/ac/renderer.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria", - "//closure/library/a11y/aria:attributes", - "//closure/library/a11y/aria:roles", - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/disposable", - "//closure/library/dom", - "//closure/library/dom:classlist", - "//closure/library/dom:nodetype", - "//closure/library/dom:tagname", - "//closure/library/events", - "//closure/library/events:eventtarget", - "//closure/library/events:eventtype", - "//closure/library/fx:dom", - "//closure/library/positioning", - "//closure/library/string", - "//closure/library/style", - "//closure/library/ui:idgenerator", - "//closure/library/ui/ac:autocomplete", - ], -) - -closure_js_library( - name = "renderoptions", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/ac/renderoptions.js"], - lenient = True, -) - -closure_js_library( - name = "richinputhandler", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/ac/richinputhandler.js"], - lenient = True, - deps = ["//closure/library/ui/ac:inputhandler"], -) - -closure_js_library( - name = "richremote", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/ac/richremote.js"], - lenient = True, - deps = [ - "//closure/library/ui/ac:autocomplete", - "//closure/library/ui/ac:remote", - "//closure/library/ui/ac:renderer", - "//closure/library/ui/ac:richinputhandler", - "//closure/library/ui/ac:richremotearraymatcher", - ], -) - -closure_js_library( - name = "richremotearraymatcher", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/ac/richremotearraymatcher.js"], - lenient = True, - deps = [ - "//closure/library/dom", - "//closure/library/ui/ac:remotearraymatcher", - ], -) diff --git a/closure/library/ui/editor/BUILD b/closure/library/ui/editor/BUILD deleted file mode 100644 index befd015010..0000000000 --- a/closure/library/ui/editor/BUILD +++ /dev/null @@ -1,175 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":abstractdialog", - ":bubble", - ":defaulttoolbar", - ":linkdialog", - ":messages", - ":tabpane", - ":toolbarcontroller", - ":toolbarfactory", - ], -) - -closure_js_library( - name = "abstractdialog", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/editor/abstractdialog.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:classlist", - "//closure/library/events:eventtarget", - "//closure/library/string", - "//closure/library/ui:dialog", - "//closure/library/ui:popupbase", - ], -) - -closure_js_library( - name = "bubble", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/editor/bubble.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:classlist", - "//closure/library/dom:tagname", - "//closure/library/dom:viewportsizemonitor", - "//closure/library/editor:style", - "//closure/library/events:eventhandler", - "//closure/library/events:eventtarget", - "//closure/library/events:eventtype", - "//closure/library/functions", - "//closure/library/log", - "//closure/library/math:box", - "//closure/library/object", - "//closure/library/positioning", - "//closure/library/string", - "//closure/library/style", - "//closure/library/ui:component", - "//closure/library/ui:popupbase", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "defaulttoolbar", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/editor/defaulttoolbar.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:classlist", - "//closure/library/dom:tagname", - "//closure/library/editor:command", - "//closure/library/style", - "//closure/library/ui/editor:messages", - "//closure/library/ui/editor:toolbarfactory", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "linkdialog", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/editor/linkdialog.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria", - "//closure/library/a11y/aria:attributes", - "//closure/library/dom", - "//closure/library/dom:inputtype", - "//closure/library/dom:safe", - "//closure/library/dom:tagname", - "//closure/library/editor:browserfeature", - "//closure/library/editor:focus", - "//closure/library/editor:link", - "//closure/library/editor:node", - "//closure/library/events:event", - "//closure/library/events:eventhandler", - "//closure/library/events:inputhandler", - "//closure/library/html:safehtml", - "//closure/library/html:safehtmlformatter", - "//closure/library/string", - "//closure/library/style", - "//closure/library/ui:button", - "//closure/library/ui:component", - "//closure/library/ui:linkbuttonrenderer", - "//closure/library/ui/editor:abstractdialog", - "//closure/library/ui/editor:messages", - "//closure/library/ui/editor:tabpane", - "//closure/library/useragent", - "//closure/library/window", - ], -) - -closure_js_library( - name = "messages", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/editor/messages.js"], - lenient = True, - deps = ["//closure/library/html:safehtmlformatter"], -) - -closure_js_library( - name = "tabpane", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/editor/tabpane.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/dom", - "//closure/library/dom:classlist", - "//closure/library/dom:inputtype", - "//closure/library/dom:tagname", - "//closure/library/events:eventhandler", - "//closure/library/events:eventtype", - "//closure/library/style", - "//closure/library/ui:component", - "//closure/library/ui:control", - "//closure/library/ui:tab", - "//closure/library/ui:tabbar", - ], -) - -closure_js_library( - name = "toolbarcontroller", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/editor/toolbarcontroller.js"], - lenient = True, - deps = [ - "//closure/library/editor:field", - "//closure/library/events:eventhandler", - "//closure/library/events:eventtarget", - "//closure/library/ui:component", - ], -) - -closure_js_library( - name = "toolbarfactory", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/editor/toolbarfactory.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/dom", - "//closure/library/dom:tagname", - "//closure/library/string", - "//closure/library/style", - "//closure/library/ui:component", - "//closure/library/ui:container", - "//closure/library/ui:option", - "//closure/library/ui:toolbar", - "//closure/library/ui:toolbarbutton", - "//closure/library/ui:toolbarcolormenubutton", - "//closure/library/ui:toolbarmenubutton", - "//closure/library/ui:toolbarrenderer", - "//closure/library/ui:toolbarselect", - "//closure/library/useragent", - ], -) diff --git a/closure/library/ui/emoji/BUILD b/closure/library/ui/emoji/BUILD deleted file mode 100644 index 9a8cc11ae8..0000000000 --- a/closure/library/ui/emoji/BUILD +++ /dev/null @@ -1,102 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":emoji", - ":emojipalette", - ":emojipaletterenderer", - ":emojipicker", - ":popupemojipicker", - ":progressiveemojipaletterenderer", - ":spriteinfo", - ], -) - -closure_js_library( - name = "emoji", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/emoji/emoji.js"], - lenient = True, -) - -closure_js_library( - name = "emojipalette", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/emoji/emojipalette.js"], - lenient = True, - deps = [ - "//closure/library/events:eventtype", - "//closure/library/net:imageloader", - "//closure/library/ui:palette", - "//closure/library/ui/emoji", - "//closure/library/ui/emoji:emojipaletterenderer", - ], -) - -closure_js_library( - name = "emojipaletterenderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/emoji/emojipaletterenderer.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria", - "//closure/library/asserts", - "//closure/library/dom:classlist", - "//closure/library/dom:nodetype", - "//closure/library/dom:tagname", - "//closure/library/style", - "//closure/library/ui:paletterenderer", - "//closure/library/ui/emoji", - ], -) - -closure_js_library( - name = "emojipicker", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/emoji/emojipicker.js"], - lenient = True, - deps = [ - "//closure/library/dom:tagname", - "//closure/library/style", - "//closure/library/ui:component", - "//closure/library/ui:tabpane", - "//closure/library/ui/emoji", - "//closure/library/ui/emoji:emojipalette", - "//closure/library/ui/emoji:emojipaletterenderer", - "//closure/library/ui/emoji:progressiveemojipaletterenderer", - ], -) - -closure_js_library( - name = "popupemojipicker", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/emoji/popupemojipicker.js"], - lenient = True, - deps = [ - "//closure/library/events:eventtype", - "//closure/library/positioning", - "//closure/library/positioning:anchoredposition", - "//closure/library/ui:component", - "//closure/library/ui:popup", - "//closure/library/ui/emoji:emojipicker", - ], -) - -closure_js_library( - name = "progressiveemojipaletterenderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/emoji/progressiveemojipaletterenderer.js"], - lenient = True, - deps = [ - "//closure/library/dom:tagname", - "//closure/library/style", - "//closure/library/ui/emoji:emojipaletterenderer", - ], -) - -closure_js_library( - name = "spriteinfo", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/emoji/spriteinfo.js"], - lenient = True, -) diff --git a/closure/library/ui/media/BUILD b/closure/library/ui/media/BUILD deleted file mode 100644 index c886341752..0000000000 --- a/closure/library/ui/media/BUILD +++ /dev/null @@ -1,162 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":flashobject", - ":flickr", - ":googlevideo", - ":media", - ":mediamodel", - ":mp3", - ":photo", - ":picasa", - ":vimeo", - ":youtube", - ], -) - -closure_js_library( - name = "flashobject", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/media/flashobject.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/dom:safe", - "//closure/library/dom:tagname", - "//closure/library/events:event", - "//closure/library/events:eventhandler", - "//closure/library/events:eventtype", - "//closure/library/html:flash", - "//closure/library/html:trustedresourceurl", - "//closure/library/log", - "//closure/library/object", - "//closure/library/string", - "//closure/library/structs:map", - "//closure/library/style", - "//closure/library/ui:component", - "//closure/library/useragent", - "//closure/library/useragent:flash", - ], -) - -closure_js_library( - name = "flickr", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/media/flickr.js"], - lenient = True, - deps = [ - "//closure/library/html:trustedresourceurl", - "//closure/library/string:const", - "//closure/library/ui/media", - "//closure/library/ui/media:flashobject", - "//closure/library/ui/media:mediamodel", - ], -) - -closure_js_library( - name = "googlevideo", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/media/googlevideo.js"], - lenient = True, - deps = [ - "//closure/library/html:trustedresourceurl", - "//closure/library/string", - "//closure/library/string:const", - "//closure/library/ui/media", - "//closure/library/ui/media:flashobject", - "//closure/library/ui/media:mediamodel", - ], -) - -closure_js_library( - name = "media", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/media/media.js"], - lenient = True, - deps = [ - "//closure/library/asserts", - "//closure/library/dom:tagname", - "//closure/library/style", - "//closure/library/ui:component", - "//closure/library/ui:control", - "//closure/library/ui:controlrenderer", - ], -) - -closure_js_library( - name = "mediamodel", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/media/mediamodel.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/html:trustedresourceurl", - ], -) - -closure_js_library( - name = "mp3", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/media/mp3.js"], - lenient = True, - deps = [ - "//closure/library/string", - "//closure/library/ui/media", - "//closure/library/ui/media:flashobject", - ], -) - -closure_js_library( - name = "photo", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/media/photo.js"], - lenient = True, - deps = [ - "//closure/library/dom:tagname", - "//closure/library/ui/media", - ], -) - -closure_js_library( - name = "picasa", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/media/picasa.js"], - lenient = True, - deps = [ - "//closure/library/html:trustedresourceurl", - "//closure/library/string:const", - "//closure/library/ui/media", - "//closure/library/ui/media:flashobject", - "//closure/library/ui/media:mediamodel", - ], -) - -closure_js_library( - name = "vimeo", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/media/vimeo.js"], - lenient = True, - deps = [ - "//closure/library/html:trustedresourceurl", - "//closure/library/string", - "//closure/library/string:const", - "//closure/library/ui/media", - "//closure/library/ui/media:flashobject", - "//closure/library/ui/media:mediamodel", - ], -) - -closure_js_library( - name = "youtube", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/media/youtube.js"], - lenient = True, - deps = [ - "//closure/library/dom:tagname", - "//closure/library/html:trustedresourceurl", - "//closure/library/string", - "//closure/library/string:const", - "//closure/library/ui:component", - "//closure/library/ui/media", - "//closure/library/ui/media:flashobject", - "//closure/library/ui/media:mediamodel", - ], -) diff --git a/closure/library/ui/style/app/BUILD b/closure/library/ui/style/app/BUILD deleted file mode 100644 index 312698a412..0000000000 --- a/closure/library/ui/style/app/BUILD +++ /dev/null @@ -1,57 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":buttonrenderer", - ":menubuttonrenderer", - ":primaryactionbuttonrenderer", - ], -) - -closure_js_library( - name = "buttonrenderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/style/app/buttonrenderer.js"], - lenient = True, - deps = [ - "//closure/library/dom:classlist", - "//closure/library/dom:tagname", - "//closure/library/ui:button", - "//closure/library/ui:cssnames", - "//closure/library/ui:custombuttonrenderer", - "//closure/library/ui:registry", - ], -) - -closure_js_library( - name = "menubuttonrenderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/style/app/menubuttonrenderer.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria:roles", - "//closure/library/array", - "//closure/library/dom", - "//closure/library/dom:tagname", - "//closure/library/style", - "//closure/library/ui:menu", - "//closure/library/ui:menurenderer", - "//closure/library/ui/style/app:buttonrenderer", - ], -) - -closure_js_library( - name = "primaryactionbuttonrenderer", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/style/app/primaryactionbuttonrenderer.js"], - lenient = True, - deps = [ - "//closure/library/ui:button", - "//closure/library/ui:registry", - "//closure/library/ui/style/app:buttonrenderer", - ], -) diff --git a/closure/library/ui/tree/BUILD b/closure/library/ui/tree/BUILD deleted file mode 100644 index 6b57a49104..0000000000 --- a/closure/library/ui/tree/BUILD +++ /dev/null @@ -1,77 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":basenode", - ":treecontrol", - ":treenode", - ":typeahead", - ], -) - -closure_js_library( - name = "basenode", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/tree/basenode.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria", - "//closure/library/a11y/aria:attributes", - "//closure/library/asserts", - "//closure/library/dom:safe", - "//closure/library/events:event", - "//closure/library/events:keycodes", - "//closure/library/html:safehtml", - "//closure/library/html:safestyle", - "//closure/library/string", - "//closure/library/string:stringbuffer", - "//closure/library/style", - "//closure/library/timer", - "//closure/library/ui:component", - ], -) - -closure_js_library( - name = "treecontrol", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/tree/treecontrol.js"], - lenient = True, - deps = [ - "//closure/library/a11y/aria", - "//closure/library/asserts", - "//closure/library/dom:classlist", - "//closure/library/events:eventtype", - "//closure/library/events:focushandler", - "//closure/library/events:keyhandler", - "//closure/library/html:safehtml", - "//closure/library/log", - "//closure/library/ui/tree:basenode", - "//closure/library/ui/tree:treenode", - "//closure/library/ui/tree:typeahead", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "treenode", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/tree/treenode.js"], - lenient = True, - deps = ["//closure/library/ui/tree:basenode"], -) - -closure_js_library( - name = "typeahead", - srcs = ["@com_google_javascript_closure_library//:closure/goog/ui/tree/typeahead.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/events:keycodes", - "//closure/library/string", - "//closure/library/structs:trie", - ], -) diff --git a/closure/library/uri/BUILD b/closure/library/uri/BUILD deleted file mode 100644 index 2e6ab3628f..0000000000 --- a/closure/library/uri/BUILD +++ /dev/null @@ -1,40 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":uri", - ":utils", - ], -) - -closure_js_library( - name = "uri", - srcs = ["@com_google_javascript_closure_library//:closure/goog/uri/uri.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/string", - "//closure/library/structs", - "//closure/library/structs:map", - "//closure/library/uri:utils", - ], -) - -closure_js_library( - name = "utils", - srcs = ["@com_google_javascript_closure_library//:closure/goog/uri/utils.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/string", - ], -) diff --git a/closure/library/useragent/BUILD b/closure/library/useragent/BUILD deleted file mode 100644 index c13ef9a41f..0000000000 --- a/closure/library/useragent/BUILD +++ /dev/null @@ -1,128 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":adobereader", - ":flash", - ":iphoto", - ":jscript", - ":keyboard", - ":platform", - ":product", - ":product_isversion", - ":useragent", - ], -) - -closure_js_library( - name = "adobereader", - srcs = ["@com_google_javascript_closure_library//:closure/goog/useragent/adobereader.js"], - lenient = True, - deps = [ - "//closure/library/string", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "flash", - srcs = ["@com_google_javascript_closure_library//:closure/goog/useragent/flash.js"], - lenient = True, - deps = ["//closure/library/string"], -) - -closure_js_library( - name = "iphoto", - srcs = ["@com_google_javascript_closure_library//:closure/goog/useragent/iphoto.js"], - lenient = True, - deps = [ - "//closure/library/string", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "jscript", - srcs = ["@com_google_javascript_closure_library//:closure/goog/useragent/jscript.js"], - lenient = True, - deps = ["//closure/library/string"], -) - -closure_js_library( - name = "keyboard", - srcs = ["@com_google_javascript_closure_library//:closure/goog/useragent/keyboard.js"], - lenient = True, - deps = ["//closure/library/labs/useragent:platform"], -) - -closure_js_library( - name = "platform", - srcs = ["@com_google_javascript_closure_library//:closure/goog/useragent/platform.js"], - lenient = True, - deps = [ - "//closure/library/string", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "product", - srcs = ["@com_google_javascript_closure_library//:closure/goog/useragent/product.js"], - lenient = True, - deps = [ - "//closure/library/labs/useragent:browser", - "//closure/library/labs/useragent:platform", - "//closure/library/useragent", - ], -) - -closure_js_library( - name = "product_isversion", - srcs = ["@com_google_javascript_closure_library//:closure/goog/useragent/product_isversion.js"], - lenient = True, - deps = [ - "//closure/library/labs/useragent:platform", - "//closure/library/string", - "//closure/library/useragent", - "//closure/library/useragent:product", - ], -) - -closure_js_library( - name = "useragent", - srcs = ["@com_google_javascript_closure_library//:closure/goog/useragent/useragent.js"], - lenient = True, - deps = [ - "//closure/library/labs/useragent:browser", - "//closure/library/labs/useragent:engine", - "//closure/library/labs/useragent:platform", - "//closure/library/labs/useragent:util", - "//closure/library/reflect", - "//closure/library/string", - ], -) - -closure_js_library( - name = "useragenttestutil", - testonly = True, - srcs = ["@com_google_javascript_closure_library//:closure/goog/useragent/useragenttestutil.js"], - lenient = True, - deps = [ - "//closure/library/labs/useragent:browser", - "//closure/library/labs/useragent:engine", - "//closure/library/labs/useragent:platform", - "//closure/library/object", - "//closure/library/useragent", - "//closure/library/useragent:keyboard", - "//closure/library/useragent:platform", - "//closure/library/useragent:product", - "//closure/library/useragent:product_isversion", - ], -) diff --git a/closure/library/vec/BUILD b/closure/library/vec/BUILD deleted file mode 100644 index d12968652c..0000000000 --- a/closure/library/vec/BUILD +++ /dev/null @@ -1,198 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":float32array", - ":float64array", - ":mat3", - ":mat3d", - ":mat3f", - ":mat4", - ":mat4d", - ":mat4f", - ":quaternion", - ":ray", - ":vec", - ":vec2", - ":vec2d", - ":vec2f", - ":vec3", - ":vec3d", - ":vec3f", - ":vec4", - ":vec4d", - ":vec4f", - ], -) - -closure_js_library( - name = "float32array", - srcs = ["@com_google_javascript_closure_library//:closure/goog/vec/float32array.js"], - lenient = True, -) - -closure_js_library( - name = "float64array", - srcs = ["@com_google_javascript_closure_library//:closure/goog/vec/float64array.js"], - lenient = True, -) - -closure_js_library( - name = "mat3", - srcs = ["@com_google_javascript_closure_library//:closure/goog/vec/mat3.js"], - lenient = True, - deps = ["//closure/library/vec"], -) - -closure_js_library( - name = "mat3d", - srcs = ["@com_google_javascript_closure_library//:closure/goog/vec/mat3d.js"], - lenient = True, - deps = [ - "//closure/library/vec", - "//closure/library/vec:vec3d", - ], -) - -closure_js_library( - name = "mat3f", - srcs = ["@com_google_javascript_closure_library//:closure/goog/vec/mat3f.js"], - lenient = True, - deps = [ - "//closure/library/vec", - "//closure/library/vec:vec3f", - ], -) - -closure_js_library( - name = "mat4", - srcs = ["@com_google_javascript_closure_library//:closure/goog/vec/mat4.js"], - lenient = True, - deps = [ - "//closure/library/vec", - "//closure/library/vec:vec3", - "//closure/library/vec:vec4", - ], -) - -closure_js_library( - name = "mat4d", - srcs = ["@com_google_javascript_closure_library//:closure/goog/vec/mat4d.js"], - lenient = True, - deps = [ - "//closure/library/vec", - "//closure/library/vec:quaternion", - "//closure/library/vec:vec3d", - "//closure/library/vec:vec4d", - ], -) - -closure_js_library( - name = "mat4f", - srcs = ["@com_google_javascript_closure_library//:closure/goog/vec/mat4f.js"], - lenient = True, - deps = [ - "//closure/library/vec", - "//closure/library/vec:quaternion", - "//closure/library/vec:vec3f", - "//closure/library/vec:vec4f", - ], -) - -closure_js_library( - name = "quaternion", - srcs = ["@com_google_javascript_closure_library//:closure/goog/vec/quaternion.js"], - lenient = True, - deps = [ - "//closure/library/vec", - "//closure/library/vec:vec3", - "//closure/library/vec:vec4", - ], -) - -closure_js_library( - name = "ray", - srcs = ["@com_google_javascript_closure_library//:closure/goog/vec/ray.js"], - lenient = True, - deps = ["//closure/library/vec:vec3"], -) - -closure_js_library( - name = "vec", - srcs = ["@com_google_javascript_closure_library//:closure/goog/vec/vec.js"], - lenient = True, - deps = [ - "//closure/library/vec:float32array", - "//closure/library/vec:float64array", - ], -) - -closure_js_library( - name = "vec2", - srcs = ["@com_google_javascript_closure_library//:closure/goog/vec/vec2.js"], - lenient = True, - deps = ["//closure/library/vec"], -) - -closure_js_library( - name = "vec2d", - srcs = ["@com_google_javascript_closure_library//:closure/goog/vec/vec2d.js"], - lenient = True, - deps = ["//closure/library/vec"], -) - -closure_js_library( - name = "vec2f", - srcs = ["@com_google_javascript_closure_library//:closure/goog/vec/vec2f.js"], - lenient = True, - deps = ["//closure/library/vec"], -) - -closure_js_library( - name = "vec3", - srcs = ["@com_google_javascript_closure_library//:closure/goog/vec/vec3.js"], - lenient = True, - deps = ["//closure/library/vec"], -) - -closure_js_library( - name = "vec3d", - srcs = ["@com_google_javascript_closure_library//:closure/goog/vec/vec3d.js"], - lenient = True, - deps = ["//closure/library/vec"], -) - -closure_js_library( - name = "vec3f", - srcs = ["@com_google_javascript_closure_library//:closure/goog/vec/vec3f.js"], - lenient = True, - deps = ["//closure/library/vec"], -) - -closure_js_library( - name = "vec4", - srcs = ["@com_google_javascript_closure_library//:closure/goog/vec/vec4.js"], - lenient = True, - deps = ["//closure/library/vec"], -) - -closure_js_library( - name = "vec4d", - srcs = ["@com_google_javascript_closure_library//:closure/goog/vec/vec4d.js"], - lenient = True, - deps = ["//closure/library/vec"], -) - -closure_js_library( - name = "vec4f", - srcs = ["@com_google_javascript_closure_library//:closure/goog/vec/vec4f.js"], - lenient = True, - deps = ["//closure/library/vec"], -) diff --git a/closure/library/webgl/BUILD b/closure/library/webgl/BUILD deleted file mode 100644 index ee4fa6e3ff..0000000000 --- a/closure/library/webgl/BUILD +++ /dev/null @@ -1,18 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [":webgl"], -) - -closure_js_library( - name = "webgl", - srcs = ["@com_google_javascript_closure_library//:closure/goog/webgl/webgl.js"], - lenient = True, -) diff --git a/closure/library/window/BUILD b/closure/library/window/BUILD deleted file mode 100644 index 72fa6bd5f0..0000000000 --- a/closure/library/window/BUILD +++ /dev/null @@ -1,28 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [":window"], -) - -closure_js_library( - name = "window", - srcs = ["@com_google_javascript_closure_library//:closure/goog/window/window.js"], - lenient = True, - deps = [ - "//closure/library/dom:safe", - "//closure/library/dom:tagname", - "//closure/library/html:safeurl", - "//closure/library/html:uncheckedconversions", - "//closure/library/labs/useragent:platform", - "//closure/library/string", - "//closure/library/string:const", - "//closure/library/useragent", - ], -) diff --git a/closure/private/BUILD b/closure/private/BUILD index 9d016926e5..a0a265bda3 100644 --- a/closure/private/BUILD +++ b/closure/private/BUILD @@ -12,11 +12,33 @@ # See the License for the specific language governing permissions and # limitations under the License. +load("//closure/compiler:closure_base_js_library.bzl", "closure_base_js_library") +load("@bazel_skylib//:bzl_library.bzl", "bzl_library") + package(default_visibility = ["//visibility:public"]) licenses(["notice"]) # Apache 2.0 +exports_files(["unusable_type.js"]) + sh_binary( name = "gensrcjar", srcs = ["gensrcjar.sh"], ) + +closure_base_js_library( + name = "base_lib", + srcs = [ + "@com_google_javascript_closure_library//closure/goog:base.js", + ], +) + +bzl_library( + name = "defs_bzl", + srcs = ["defs.bzl"], +) + +bzl_library( + name = "files_equal_test_bzl", + srcs = ["files_equal_test.bzl"], +) diff --git a/closure/private/defs.bzl b/closure/private/defs.bzl index b470f26ec3..fe47ac2668 100644 --- a/closure/private/defs.bzl +++ b/closure/private/defs.bzl @@ -18,32 +18,29 @@ CSS_FILE_TYPE = [".css", ".gss"] HTML_FILE_TYPE = [".html"] JS_FILE_TYPE = [".js"] -JS_LANGUAGE_DEFAULT = "ECMASCRIPT5_STRICT" JS_TEST_FILE_TYPE = ["_test.js"] SOY_FILE_TYPE = [".soy"] -JS_LANGUAGE_IN = "ECMASCRIPT_2017" +JS_LANGUAGE_IN = "STABLE" JS_LANGUAGE_OUT_DEFAULT = "ECMASCRIPT5" JS_LANGUAGES = depset([ "ECMASCRIPT3", "ECMASCRIPT5", - "ECMASCRIPT5_STRICT", "ECMASCRIPT6", - "ECMASCRIPT6_STRICT", - "ECMASCRIPT6_TYPED", "ECMASCRIPT_2015", "ECMASCRIPT_2016", "ECMASCRIPT_2017", "ECMASCRIPT_2018", "ECMASCRIPT_2019", + "ECMASCRIPT_2020", + "ECMASCRIPT_2021", "ECMASCRIPT_NEXT", "STABLE", "NO_TRANSPILE", ]) -CLOSURE_LIBRARY_BASE_ATTR = attr.label( - default = Label("//closure/library:base"), - allow_files = True, +CLOSURE_LIBRARY_BASE_ATTR = attr.label_list( + default = [Label("//closure/private:base_lib")], ) CLOSURE_WORKER_ATTR = attr.label( @@ -52,13 +49,25 @@ CLOSURE_WORKER_ATTR = attr.label( cfg = "host", ) +# Necessary for checking ijs files +UNUSABLE_TYPE_DEFINITION = attr.label( + default = Label("//closure/private:unusable_type.js"), + allow_single_file = True, +) + CLOSURE_JS_TOOLCHAIN_ATTRS = { "_closure_library_base": CLOSURE_LIBRARY_BASE_ATTR, - "_ClosureWorker": CLOSURE_WORKER_ATTR, + "_unusable_type_definition": UNUSABLE_TYPE_DEFINITION, } def get_jsfile_path(f): - return f.path + """Returns the file path for a JavaScript file, otherwise None. + + This may be used to exclude non-JavaScript files inside tree artifacts + expanded by Args#add_all. + """ + # TODO(tjgq): Remove .zip once J2CL is switched to tree artifacts. + return f.path if f.extension in ["js", "zip","mjs","json"] else None def unfurl(deps, provider = ""): """Returns deps as well as deps exported by parent rules.""" @@ -74,7 +83,6 @@ def unfurl(deps, provider = ""): def collect_js( deps, - closure_library_base = None, has_direct_srcs = False, no_closure_library = False, css = None): @@ -104,11 +112,11 @@ def collect_js( if has_closure_library: fail("no_closure_library can't be used when Closure Library is " + "already part of the transitive closure") - elif has_direct_srcs and not has_closure_library: - direct_srcs += closure_library_base + elif has_direct_srcs: has_closure_library = True + if css: - direct_srcs += closure_library_base + [css.closure_css_binary.renaming_map] + direct_srcs += [css.closure_css_binary.renaming_map] return struct( srcs = depset(direct_srcs, transitive = srcs), @@ -254,6 +262,7 @@ def library_level_checks( srcs, executable, output, + unusable_type_definition, suppress = [], internal_expect_failure = False): args = [ @@ -264,14 +273,14 @@ def library_level_checks( "--jscomp_off", "reportUnknownTypes", "--language_in", - "ECMASCRIPT_2017", + "STABLE", "--language_out", "ECMASCRIPT5", "--js_output_file", output.path, ] inputs = [] - for f in ijs_deps.to_list(): + for f in ijs_deps.to_list() + unusable_type_definition: args.append("--externs=%s" % f.path) inputs.append(f) diff --git a/closure/private/file_test.bzl b/closure/private/file_test.bzl index b79420bb27..7e2f88d864 100644 --- a/closure/private/file_test.bzl +++ b/closure/private/file_test.bzl @@ -14,6 +14,13 @@ """Rule for testing contents of text files generated by rules.""" +_LICENSE =r"""/* + + Copyright The Closure Library Authors. + SPDX-License-Identifier: Apache-2.0 +*/ +""".replace("\n", "\\n").replace("*", "\\*") + def _impl(ctx): exe = ctx.outputs.executable file_ = ctx.file.file @@ -25,17 +32,26 @@ def _impl(ctx): if content and matches != -1: fail("matches only makes sense with regexp") if not regexp: - dat = ctx.actions.declare_file(exe.basename + ".dat") + expected = ctx.actions.declare_file(exe.basename + ".expected") ctx.actions.write( - output = dat, + output = expected, content = content, ) + + actual = ctx.actions.declare_file(exe.basename + ".actual") + ctx.actions.run_shell( + inputs = [file_], + outputs = [actual], + arguments = [file_.path, actual.path], + command = "sed -e ':a' -e '$!N' -e '$!ba' -e 's|%s||' $1>$2" % _LICENSE, + ) + ctx.actions.write( output = exe, - content = "diff -u %s %s" % (dat.short_path, file_.short_path), + content = "diff -u %s %s" % (expected.short_path, actual.short_path), is_executable = True, ) - return struct(runfiles = ctx.runfiles([exe, dat, file_])) + return struct(runfiles = ctx.runfiles([exe, expected, actual])) if matches != -1: script = "[ %s == $(grep -c %s %s) ]" % ( matches, diff --git a/closure/private/java_import_external.bzl b/closure/private/java_import_external.bzl deleted file mode 100644 index e7dd48088d..0000000000 --- a/closure/private/java_import_external.bzl +++ /dev/null @@ -1,131 +0,0 @@ -# Copyright 2016 The Closure Rules Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -_HEADER = "# DO NOT EDIT: generated by java_import_external()" - -_PASS_PROPS = ( - "neverlink", - "tags", - "testonly_", - "visibility", - "exports", - "runtime_deps", - "deps", -) - -def _java_import_external(repository_ctx): - """Downloads jar and creates a java_import rule.""" - if (repository_ctx.attr.generated_linkable_rule_name and - not repository_ctx.attr.neverlink): - fail("Only use generated_linkable_rule_name if neverlink is set") - name = repository_ctx.attr.generated_rule_name or repository_ctx.name - urls = repository_ctx.attr.jar_urls - sha = repository_ctx.attr.jar_sha256 - path = repository_ctx.name + ".jar" - for url in urls: - if url.endswith(".jar"): - path = url[url.rindex("/") + 1:] - break - srcurls = repository_ctx.attr.srcjar_urls - srcsha = repository_ctx.attr.srcjar_sha256 - srcpath = repository_ctx.name + "-src.jar" if srcurls else "" - for url in srcurls: - if url.endswith(".jar"): - srcpath = url[url.rindex("/") + 1:].replace("-sources.jar", "-src.jar") - break - lines = [_HEADER, ""] - if repository_ctx.attr.default_visibility: - lines.append("package(default_visibility = %r)" % ( - repository_ctx.attr.default_visibility - )) - lines.append("") - lines.append("licenses(%s)" % repr(repository_ctx.attr.licenses)) - lines.append("") - lines.extend(_make_java_import( - name, - path, - srcpath, - repository_ctx.attr, - _PASS_PROPS, - )) - if (repository_ctx.attr.neverlink and - repository_ctx.attr.generated_linkable_rule_name): - lines.extend(_make_java_import( - repository_ctx.attr.generated_linkable_rule_name, - path, - srcpath, - repository_ctx.attr, - [p for p in _PASS_PROPS if p != "neverlink"], - )) - extra = repository_ctx.attr.extra_build_file_content - if extra: - lines.append(extra) - if not extra.endswith("\n"): - lines.append("") - repository_ctx.download(urls, path, sha) - if srcurls: - repository_ctx.download(srcurls, srcpath, srcsha) - repository_ctx.file("BUILD", "\n".join(lines)) - repository_ctx.file("jar/BUILD", "\n".join([ - _HEADER, - "", - "package(default_visibility = %r)" % ( - repository_ctx.attr.visibility or - repository_ctx.attr.default_visibility - ), - "", - "alias(", - " name = \"jar\",", - " actual = \"@%s\"," % repository_ctx.name, - ")", - "", - ])) - -def _make_java_import(name, path, srcpath, attrs, props): - lines = [ - "java_import(", - " name = %s," % repr(name), - " jars = [%s]," % repr(path), - ] - if srcpath: - lines.append(" srcjar = %s," % repr(srcpath)) - for prop in props: - value = getattr(attrs, prop, None) - if value: - if prop.endswith("_"): - prop = prop[:-1] - lines.append(" %s = %s," % (prop, repr(value))) - lines.append(")") - lines.append("") - return lines - -java_import_external = repository_rule( - implementation = _java_import_external, - attrs = { - "licenses": attr.string_list(mandatory = True, allow_empty = False), - "jar_urls": attr.string_list(mandatory = True, allow_empty = False), - "jar_sha256": attr.string(mandatory = True), - "srcjar_urls": attr.string_list(), - "srcjar_sha256": attr.string(), - "deps": attr.string_list(), - "runtime_deps": attr.string_list(), - "testonly_": attr.bool(), - "exports": attr.string_list(), - "neverlink": attr.bool(), - "generated_rule_name": attr.string(), - "generated_linkable_rule_name": attr.string(), - "default_visibility": attr.string_list(default = ["//visibility:public"]), - "extra_build_file_content": attr.string(), - }, -) diff --git a/closure/private/rule_test.bzl b/closure/private/rule_test.bzl deleted file mode 100644 index 3f47bb0c0f..0000000000 --- a/closure/private/rule_test.bzl +++ /dev/null @@ -1,101 +0,0 @@ -# Copyright 2016 The Bazel Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Rule for testing the struct returned by a rule.""" - -def _strip_prefix(prefix, string): - if not string.startswith(prefix): - fail("%s does not start with %s" % (string, prefix)) - return string[len(prefix):len(string)] - -def _success_target(ctx, msg): - exe = ctx.outputs.executable - dat = ctx.new_file(ctx.configuration.genfiles_dir, exe, ".dat") - ctx.actions.write( - output = dat, - content = msg, - ) - ctx.actions.write( - output = exe, - content = "cat " + dat.path + " ; echo", - is_executable = True, - ) - return struct(runfiles = ctx.runfiles([exe, dat])) - -def _impl(ctx): - rule_ = ctx.attr.rule - rule_name = str(rule_.label) - exe = ctx.outputs.executable - if ctx.attr.generates: - prefix = rule_.label.package + "/" - generates = sorted(ctx.attr.generates) - generated = sorted([ - _strip_prefix(prefix, f.short_path) - for f in rule_.files - ]) - if generates != generated: - fail("rule %s generates %s not %s" % - (rule_name, repr(generated), repr(generates))) - provides = ctx.attr.provides - if provides: - files = [] - commands = [] - for k in provides.keys(): - if _hasattr(rule_, k): - v = repr(_getattr(rule_, k)) - else: - fail(("rule %s doesn't provide attribute %s. " + - "Its list of attributes is: %s") % - (rule_name, k, dir(rule_))) - file_ = ctx.new_file(ctx.configuration.genfiles_dir, exe, "." + k) - files += [file_] - regexp = provides[k] - commands += [ - "if ! grep %s %s ; then echo 'bad %s:' ; cat %s ; echo ; exit 1 ; fi" % - (repr(regexp), file_.short_path, k, file_.short_path), - ] - ctx.actions.write(output = file_, content = v) - script = "\n".join(commands + ["true"]) - ctx.actions.write(output = exe, content = script, is_executable = True) - return struct(runfiles = ctx.runfiles([exe] + files)) - else: - return _success_target(ctx, "success") - -def _hasattr(obj, name): - for label in name.split("."): - if not hasattr(obj, label): - return False - obj = getattr(obj, label) - return True - -def _getattr(obj, name): - for label in name.split("."): - if not hasattr(obj, label): - return False - obj = getattr(obj, label) - return obj - -_rule_test = rule( - attrs = { - "rule": attr.label(mandatory = True), - "generates": attr.string_list(), - "provides": attr.string_dict(), - }, - executable = True, - implementation = _impl, - test = True, -) - -def rule_test(size = "small", **kwargs): - _rule_test(size = size, **kwargs) diff --git a/closure/private/unusable_type.js b/closure/private/unusable_type.js new file mode 100644 index 0000000000..9671a3b810 --- /dev/null +++ b/closure/private/unusable_type.js @@ -0,0 +1,9 @@ +/** + * @externs @fileoverview + * The Closure Compiler generates an UnusableType reference when generating ijs + * when it cannot find a definition of a type. In order to avoid a + * JSC_BAD_TYPE_ANNOTATION warning in these cases, define the UnusableType to be + * the top type *. +*/ +/** @typedef {*} */ +var UnusableType; diff --git a/closure/protobuf/BUILD b/closure/protobuf/BUILD index 91f951a592..5563068368 100644 --- a/closure/protobuf/BUILD +++ b/closure/protobuf/BUILD @@ -12,6 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +load("@bazel_skylib//:bzl_library.bzl", "bzl_library") + package(default_visibility = ["//visibility:public"]) licenses(["notice"]) # Apache 2.0 @@ -26,13 +28,30 @@ closure_js_library( "lintChecks", "reportUnknownTypes", "strictCheckTypes", + "deprecated", + ], + deps = [ + "@com_google_javascript_closure_library//closure/goog/array", + "@com_google_javascript_closure_library//closure/goog/asserts", + "@com_google_javascript_closure_library//closure/goog/crypt", + "@com_google_javascript_closure_library//closure/goog/crypt:base64", + "@com_google_javascript_closure_library//closure/goog/object", + "@com_google_javascript_closure_library//closure/goog/string", ], +) + +bzl_library( + name = "closure_js_proto_library_bzl", + srcs = ["closure_js_proto_library.bzl"], + deps = [ + "//closure/compiler:compiler_bzl", + ], +) + +bzl_library( + name = "closure_proto_library_bzl", + srcs = ["closure_proto_library.bzl"], deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/crypt", - "//closure/library/crypt:base64", - "//closure/library/object", - "//closure/library/string", + "//closure/compiler:compiler_bzl", ], ) diff --git a/closure/protobuf/closure_js_proto_library.bzl b/closure/protobuf/closure_js_proto_library.bzl index 5a389d7043..ce62e638f2 100644 --- a/closure/protobuf/closure_js_proto_library.bzl +++ b/closure/protobuf/closure_js_proto_library.bzl @@ -38,7 +38,7 @@ def closure_js_proto_library( protocbin = Label("@com_google_protobuf//:protoc"), **kwargs): cmd = ["$(location %s)" % protocbin] - js_out_options = ["library=%s,error_on_name_conflict" % name] + js_out_options = ["library=%s" % name] if add_require_for_enums: js_out_options += ["add_require_for_enums"] if testonly: @@ -69,7 +69,7 @@ def closure_js_proto_library( srcs = [name + ".js"], testonly = testonly, deps = [ - str(Label("//closure/library/array")), + str(Label("@com_google_javascript_closure_library//closure/goog/array")), str(Label("//closure/protobuf:jspb")), ], internal_descriptors = [name + ".descriptor"], diff --git a/closure/protobuf/closure_proto_library.bzl b/closure/protobuf/closure_proto_library.bzl index f3ee6fb2b6..24238155a0 100644 --- a/closure/protobuf/closure_proto_library.bzl +++ b/closure/protobuf/closure_proto_library.bzl @@ -15,36 +15,10 @@ """Utilities for building JavaScript Protocol Buffers. """ +load("@rules_proto//proto:defs.bzl", "ProtoInfo") load("//closure/compiler:closure_js_library.bzl", "create_closure_js_library") load("//closure/private:defs.bzl", "CLOSURE_JS_TOOLCHAIN_ATTRS", "unfurl") -# This was borrowed from Rules Go, licensed under Apache 2. -# https://github.com/bazelbuild/rules_go/blob/67f44035d84a352cffb9465159e199066ecb814c/proto/compiler.bzl#L72 -def _proto_path(proto): - path = proto.path - root = proto.root.path - ws = proto.owner.workspace_root - if path.startswith(root): - path = path[len(root):] - if path.startswith("/"): - path = path[1:] - if path.startswith(ws): - path = path[len(ws):] - if path.startswith("/"): - path = path[1:] - return path - -def _proto_include_path(proto): - path = proto.path[:-len(_proto_path(proto))] - if not path: - return "." - if path.endswith("/"): - path = path[:-1] - return path - -def _proto_include_paths(protos): - return depset([_proto_include_path(proto) for proto in protos.to_list()]) - def _generate_closure_js_progress_message(name): # TODO(yannic): Add a better message? return "Generating JavaScript Protocol Buffer %s" % name @@ -63,8 +37,7 @@ def _generate_closure_js(target, ctx): # Add include paths for all proto files, # to avoid copying/linking the files for every target. - protos = target[ProtoInfo].transitive_imports - args = ["-I%s" % p for p in _proto_include_paths(protos).to_list()] + args = ["-I%s" % p for p in target[ProtoInfo].transitive_proto_path.to_list()] out_options = ",".join(js_out_options) out_path = "/".join(js.path.split("/")[:-1]) @@ -74,7 +47,7 @@ def _generate_closure_js(target, ctx): args += [file.path for file in target[ProtoInfo].direct_sources] ctx.actions.run( - inputs = protos, + inputs = target[ProtoInfo].transitive_imports, outputs = [js], executable = ctx.executable._protoc, arguments = args, @@ -114,7 +87,7 @@ closure_proto_aspect = aspect( cfg = "host", ), "_closure_library": attr.label( - default = Label("//closure/library/array"), + default = Label("@com_google_javascript_closure_library//closure/goog/array"), ), "_closure_protobuf_jspb": attr.label( default = Label("//closure/protobuf:jspb"), diff --git a/closure/protobuf/test/BUILD b/closure/protobuf/test/BUILD index addf5387e9..bc4a2a54a5 100644 --- a/closure/protobuf/test/BUILD +++ b/closure/protobuf/test/BUILD @@ -16,6 +16,7 @@ package(default_testonly = True) licenses(["notice"]) # Apache 2.0 +load("@rules_proto//proto:defs.bzl", "proto_library") load("//closure/compiler:closure_js_library.bzl", "closure_js_library") load("//closure/protobuf:closure_proto_library.bzl", "closure_proto_library") load("//closure/testing:closure_js_test.bzl", "closure_js_test") @@ -51,7 +52,7 @@ closure_js_test( ], deps = [ ":foo", - "//closure/library:testing", + "@com_google_javascript_closure_library//closure/goog/testing:testsuite", ], ) @@ -94,6 +95,42 @@ closure_js_test( deps = [ ":baz", ":foo", - "//closure/library:testing", + "@com_google_javascript_closure_library//closure/goog/testing:testsuite", + ], +) + +proto_library( + name = "bat_proto", + srcs = ["bat.proto"], + deps = ["@com_google_protobuf//:any_proto"], +) + +closure_proto_library( + name = "bat_closure_proto", + deps = [":bat_proto"], +) + +closure_js_library( + name = "bat", + srcs = [ + "bat.js", + ], + deps = [ + ":bat_closure_proto", + ], +) + +closure_js_test( + name = "bat_test", + timeout = "short", + srcs = [ + "bat_test.js", + ], + entry_points = [ + "goog:io.bazel.rules.closure.protobuf.BatTest", + ], + deps = [ + ":bat", + "@com_google_javascript_closure_library//closure/goog/testing:testsuite", ], ) diff --git a/closure/protobuf/test/bat.js b/closure/protobuf/test/bat.js new file mode 100644 index 0000000000..9c6e1ac6a7 --- /dev/null +++ b/closure/protobuf/test/bat.js @@ -0,0 +1,32 @@ +// Copyright 2021 The Closure Rules Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +goog.module('io.bazel.rules.closure.protobuf.Bat'); + +const PbBat = goog.require('proto.io.bazel.rules.closure.protobuf.Bat'); + + + +exports = class { + /** + * Creates a new Bat. + */ + constructor() { + /** + * @private + * @const {!PbBat} + */ + this.message_ = new PbBat(); + } +}; diff --git a/closure/compiler/test/closure_js_deps/external_library.js b/closure/protobuf/test/bat.proto similarity index 71% rename from closure/compiler/test/closure_js_deps/external_library.js rename to closure/protobuf/test/bat.proto index 60e65ff42c..bcae1f8ea5 100644 --- a/closure/compiler/test/closure_js_deps/external_library.js +++ b/closure/protobuf/test/bat.proto @@ -1,4 +1,4 @@ -// Copyright 2016 The Closure Rules Authors. All rights reserved. +// Copyright 2021 The Closure Rules Authors. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -12,15 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -/** - * @fileoverview Fake external library. - * @externs - */ +syntax = "proto3"; -class external_library { +package io.bazel.rules.closure.protobuf; - /** - * Does something someone else defined. - */ - static doodle() {} +import "google/protobuf/any.proto"; + +message Bat { + google.protobuf.Any any = 1; } diff --git a/closure/protobuf/test/bat_test.js b/closure/protobuf/test/bat_test.js new file mode 100644 index 0000000000..c21373d434 --- /dev/null +++ b/closure/protobuf/test/bat_test.js @@ -0,0 +1,29 @@ +// Copyright 2021 The Closure Rules Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +goog.module('io.bazel.rules.closure.protobuf.BatTest'); +goog.setTestOnly('io.bazel.rules.closure.protobuf.BatTest'); + +const Bat = goog.require('io.bazel.rules.closure.protobuf.Bat'); +const testSuite = goog.require('goog.testing.testSuite'); + + + +class BatTest { + /** @return {void} */ + testAny() { + const bat = new Bat(); + } +} +testSuite(new BatTest()); diff --git a/closure/protobuf/test/legacy/BUILD b/closure/protobuf/test/legacy/BUILD index 71596cd133..2f079e4463 100644 --- a/closure/protobuf/test/legacy/BUILD +++ b/closure/protobuf/test/legacy/BUILD @@ -28,9 +28,9 @@ closure_js_proto_library( closure_js_library( name = "example_lib", srcs = ["example.js"], + suppress = ["useOfGoogProvide"], deps = [ ":example_proto", - "//closure/library", ], ) @@ -40,6 +40,7 @@ closure_js_test( srcs = ["example_test.js"], deps = [ ":example_lib", - "//closure/library:testing", + "@com_google_javascript_closure_library//closure/goog/testing:asserts", + "@com_google_javascript_closure_library//closure/goog/testing:jsunit", ], ) diff --git a/closure/repositories.bzl b/closure/repositories.bzl index f21ff2bb52..b262918f5a 100644 --- a/closure/repositories.bzl +++ b/closure/repositories.bzl @@ -14,11 +14,17 @@ """External dependencies for Closure Rules.""" +load("@bazel_tools//tools/build_defs/repo:java.bzl", "java_import_external") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file") -load("//closure/private:java_import_external.bzl", "java_import_external") load("//closure/private:platform_http_file.bzl", "platform_http_file") -def closure_repositories( +def rules_closure_toolchains(): + """An utility method to load all Closure toolchains. + It doesn't do anything at the moment. + """ + pass + +def rules_closure_dependencies( omit_aopalliance = False, omit_args4j = False, omit_bazel_skylib = False, @@ -47,7 +53,6 @@ def closure_repositories( omit_com_google_javascript_closure_library = False, omit_com_google_jsinterop_annotations = False, omit_com_google_protobuf = False, - omit_com_google_protobuf_java = False, omit_com_google_protobuf_js = False, omit_com_google_template_soy = False, omit_com_google_template_soy_jssrc = False, @@ -69,10 +74,13 @@ def closure_repositories( omit_org_ow2_asm_tree = False, omit_org_ow2_asm_util = False, omit_phantomjs = False, + omit_rules_cc = False, + omit_rules_java = False, + omit_rules_jvm_external = False, + omit_rules_proto = False, + omit_rules_python = False, omit_zlib = False): """Imports dependencies for Closure Rules.""" - if omit_com_google_protobuf_java: - fail("omit_com_google_protobuf_java no longer supported and must be not be passed to closure_repositories()") if not omit_aopalliance: aopalliance() if not omit_args4j: @@ -171,6 +179,16 @@ def closure_repositories( org_ow2_asm_util() if not omit_phantomjs: phantomjs() + if not omit_rules_cc: + rules_cc() + if not omit_rules_java: + rules_java() + if not omit_rules_jvm_external: + rules_jvm_external() + if not omit_rules_proto: + rules_proto() + if not omit_rules_python: + rules_python() if not omit_zlib: zlib() @@ -191,10 +209,10 @@ def aopalliance(): def args4j(): java_import_external( name = "args4j", - jar_sha256 = "989bda2321ea073a03686e9d4437ea4928c72c99f993f9ca6fab24615f0771a4", + jar_sha256 = "91ddeaba0b24adce72291c618c00bbdce1c884755f6c4dba9c5c46e871c69ed6", jar_urls = [ - "https://mirror.bazel.build/repo1.maven.org/maven2/args4j/args4j/2.0.26/args4j-2.0.26.jar", - "https://repo1.maven.org/maven2/args4j/args4j/2.0.26/args4j-2.0.26.jar", + "https://mirror.bazel.build/repo1.maven.org/maven2/args4j/args4j/2.33/args4j-2.33.jar", + "https://repo1.maven.org/maven2/args4j/args4j/2.33/args4j-2.33.jar", ], licenses = ["notice"], # MIT License ) @@ -203,22 +221,23 @@ def bazel_skylib(): http_archive( name = "bazel_skylib", sha256 = "2ef429f5d7ce7111263289644d233707dba35e39696377ebab8b0bc701f7818e", - urls = ["https://github.com/bazelbuild/bazel-skylib/releases/download/0.8.0/bazel-skylib.0.8.0.tar.gz"], + urls = [ + "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/0.8.0/bazel-skylib.0.8.0.tar.gz", + "https://github.com/bazelbuild/bazel-skylib/releases/download/0.8.0/bazel-skylib.0.8.0.tar.gz", + ], ) def clang(): platform_http_file( name = "clang", amd64_urls = [ - "https://mirror.bazel.build/llvm.org/releases/3.8.0/clang+llvm-3.8.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz", - "http://llvm.org/releases/3.8.0/clang+llvm-3.8.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz", + "https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/clang+llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz", ], - amd64_sha256 = "3120c3055ea78bbbb6848510a2af70c68538b990cb0545bac8dad01df8ff69d7", + amd64_sha256 = "b25f592a0c00686f03e3b7db68ca6dc87418f681f4ead4df4745a01d9be63843", macos_urls = [ - "https://mirror.bazel.build/llvm.org/releases/3.8.0/clang+llvm-3.8.0-x86_64-apple-darwin.tar.xz", - "http://llvm.org/releases/3.8.0/clang+llvm-3.8.0-x86_64-apple-darwin.tar.xz", + "https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/clang+llvm-10.0.0-x86_64-apple-darwin.tar.xz", ], - macos_sha256 = "e5a961e04b0e1738bbb5b824886a34932dc13b0af699d1fe16519d814d7b776f", + macos_sha256 = "633a833396bf2276094c126b072d52b59aca6249e7ce8eae14c728016edb5e61", ) def com_google_auto_common(): @@ -551,8 +570,8 @@ def com_google_errorprone_javac_shaded(): ) def com_google_guava(): - version = "25.1" - sha256 = "6db0c3a244c397429c2e362ea2837c3622d5b68bb95105d37c21c36e5bc70abf" + version = "30.1.1" + sha256 = "44ce229ce26d880bf3afc362bbfcec34d7e6903d195bbb1db9f3b6e0d9834f06" java_import_external( name = "com_google_guava", @@ -562,12 +581,26 @@ def com_google_guava(): "https://repo1.maven.org/maven2/com/google/guava/guava/%s-jre/guava-%s-jre.jar" % (version, version), ], jar_sha256 = sha256, + deps = [ + "@com_google_guava_failure_access", + ], exports = [ "@com_google_code_findbugs_jsr305", "@com_google_errorprone_error_prone_annotations", ], ) + # This is part of guava but is split out from core to allow android to pull this part independenty. + java_import_external( + name = "com_google_guava_failure_access", + licenses = ["notice"], # Apache 2.0 + jar_urls = [ + "https://mirror.bazel.build/repo1.maven.org/maven2/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar", + "https://repo1.maven.org/maven2/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar", + ], + jar_sha256 = "a171ee4c734dd2da837e4b16be9df4661afab72a41adaf31eb84dfdaf936ca26", + ) + def com_google_inject_extensions_guice_assistedinject(): java_import_external( name = "com_google_inject_extensions_guice_assistedinject", @@ -637,16 +670,15 @@ def com_google_java_format(): ) def com_google_javascript_closure_compiler(): - version = "v20190528" - jar = "closure-compiler-unshaded-%s.jar" % version + version = "v20211107" + jar = "closure-compiler-%s.jar" % version java_import_external( name = "com_google_javascript_closure_compiler", licenses = ["reciprocal"], # MPL v1.1 (Rhino AST), Apache 2.0 (JSCompiler) jar_urls = [ - "https://mirror.bazel.build/repo1.maven.org/maven2/com/google/javascript/closure-compiler-unshaded/%s/%s" % (version, jar), - "http://repo1.maven.org/maven2/com/google/javascript/closure-compiler-unshaded/%s/%s" % (version, jar), + "https://repo1.maven.org/maven2/com/google/javascript/closure-compiler/%s/%s" % (version, jar), ], - jar_sha256 = "5e8262a9208e3acf22cf1109928355e6d6c0b4bfe44fbf42e3ef537084353fe5", + jar_sha256 = "733f00f0a1651c9d5409d9162e6f94f0a3e61463628925d3d6ef66be60ec14a6", deps = [ "@com_google_code_gson", "@com_google_guava", @@ -676,16 +708,11 @@ def com_google_javascript_closure_compiler(): ) def com_google_javascript_closure_library(): - # After updating: bazel run //closure/library:regenerate -- "$PWD" http_archive( - name = "com_google_javascript_closure_library", - urls = [ - "https://mirror.bazel.build/github.com/google/closure-library/archive/v20190415.tar.gz", - "https://github.com/google/closure-library/archive/v20190415.tar.gz", - ], - sha256 = "b92f9c2b81adeb06b16e0a5d748baf115eeb58884fe864bec3fe8e23a7cf7d14", - strip_prefix = "closure-library-20190415", - build_file = str(Label("//closure/library:closure_library.BUILD")), + name = "com_google_javascript_closure_library", + sha256 = "355e3cb51a498ea083f2bd200cd6b025df7692d0d339a7353ff99faa8d6710b4", + strip_prefix = "closure-library-57beea47d30d7123dc2268972f20b544e501432b", + urls = ["https://github.com/google/closure-library/archive/57beea47d30d7123dc2268972f20b544e501432b.tar.gz"], ) def com_google_jsinterop_annotations(): @@ -703,24 +730,22 @@ def com_google_jsinterop_annotations(): def com_google_protobuf(): http_archive( name = "com_google_protobuf", - strip_prefix = "protobuf-3.8.0", - sha256 = "03d2e5ef101aee4c2f6ddcf145d2a04926b9c19e7086944df3842b1b8502b783", + strip_prefix = "protobuf-3.19.1", + sha256 = "87407cd28e7a9c95d9f61a098a53cf031109d451a7763e7dd1253abf8b4df422", urls = [ - "https://mirror.bazel.build/github.com/google/protobuf/archive/v3.8.0.tar.gz", - "https://github.com/protocolbuffers/protobuf/archive/v3.8.0.tar.gz", + "https://github.com/protocolbuffers/protobuf/archive/v3.19.1.tar.gz", ], ) def com_google_protobuf_js(): http_archive( name = "com_google_protobuf_js", - strip_prefix = "protobuf-3.8.0/js", + build_file = "@io_bazel_rules_closure//closure/protobuf:protobuf_js.BUILD", + sha256 = "87407cd28e7a9c95d9f61a098a53cf031109d451a7763e7dd1253abf8b4df422", + strip_prefix = "protobuf-3.19.1/js", urls = [ - "https://mirror.bazel.build/github.com/google/protobuf/archive/v3.8.0.tar.gz", - "https://github.com/protocolbuffers/protobuf/archive/v3.8.0.tar.gz", + "https://github.com/protocolbuffers/protobuf/archive/v3.19.1.tar.gz", ], - sha256 = "03d2e5ef101aee4c2f6ddcf145d2a04926b9c19e7086944df3842b1b8502b783", - build_file = str(Label("//closure/protobuf:protobuf_js.BUILD")), ) def com_google_template_soy(): @@ -728,10 +753,9 @@ def com_google_template_soy(): name = "com_google_template_soy", licenses = ["notice"], # Apache 2.0 jar_urls = [ - "https://mirror.bazel.build/repo1.maven.org/maven2/com/google/template/soy/2019-03-11/soy-2019-03-11.jar", - "https://repo1.maven.org/maven2/com/google/template/soy/2019-03-11/soy-2019-03-11.jar", + "https://repo1.maven.org/maven2/com/google/template/soy/2021-02-01/soy-2021-02-01.jar", ], - jar_sha256 = "ceb0e78cf1cadefa17493bbd0a913314558e34dd30e4d7d92e406f69c2670725", + jar_sha256 = "1b96cc533e8fdfb8c5287df3fb614cb46833b48cd0bc59337751fe3220ddf0b6", deps = [ "@args4j", "@com_google_code_findbugs_jsr305", @@ -769,13 +793,10 @@ def com_google_template_soy(): def com_google_template_soy_jssrc(): http_archive( name = "com_google_template_soy_jssrc", - sha256 = "188a28d3935b0661631bdb518a97d03edd4a597a13a09dd3d92a138c09b59780", - urls = [ - "https://mirror.bazel.build/repo1.maven.org/maven2/com/google/template/soy/2019-03-11/soy-2019-03-11-jssrc_js.jar", - "https://repo1.maven.org/maven2/com/google/template/soy/2019-03-11/soy-2019-03-11-jssrc_js.jar", - ], + sha256 = "b8863e45841cb89e9c1e29d46eaabfb4599724d85ef081dbb6f9dfc6ffc58c99", + strip_prefix = "closure-templates-a1c02e60ae88ed1b7db92722ea25ac7d396514fc/javascript", + urls = ["https://github.com/google/closure-templates/archive/a1c02e60ae88ed1b7db92722ea25ac7d396514fc.tar.gz"], build_file = str(Label("//closure/templates:soy_jssrc.BUILD")), - type = "zip", ) def com_ibm_icu_icu4j(): @@ -890,8 +911,9 @@ def org_apache_tomcat_annotations_api(): name = "org_apache_tomcat_annotations_api", licenses = ["notice"], # Apache License, Version 2.0 jar_urls = [ + "https://mirror.bazel.build/repo1.maven.org/maven2/org/apache/tomcat/tomcat-annotations-api/8.0.5/tomcat-annotations-api-8.0.5.jar", "http://maven.ibiblio.org/maven2/org/apache/tomcat/tomcat-annotations-api/8.0.5/tomcat-annotations-api-8.0.5.jar", - "http://repo1.maven.org/maven2/org/apache/tomcat/tomcat-annotations-api/8.0.5/tomcat-annotations-api-8.0.5.jar", + "https://repo1.maven.org/maven2/org/apache/tomcat/tomcat-annotations-api/8.0.5/tomcat-annotations-api-8.0.5.jar", ], jar_sha256 = "748677bebb1651a313317dfd93e984ed8f8c9e345538fa8b0ab0cbb804631953", ) @@ -999,11 +1021,66 @@ def phantomjs(): macos_sha256 = "538cf488219ab27e309eafc629e2bcee9976990fe90b1ec334f541779150f8c1", ) +def rules_cc(): + http_archive( + name = "rules_cc", + sha256 = "29daf0159f0cf552fcff60b49d8bcd4f08f08506d2da6e41b07058ec50cfeaec", + strip_prefix = "rules_cc-b7fe9697c0c76ab2fd431a891dbb9a6a32ed7c3e", + urls = [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/b7fe9697c0c76ab2fd431a891dbb9a6a32ed7c3e.tar.gz", + "https://github.com/bazelbuild/rules_cc/archive/b7fe9697c0c76ab2fd431a891dbb9a6a32ed7c3e.tar.gz", + ], + ) + +def rules_java(): + http_archive( + name = "rules_java", + sha256 = "f5a3e477e579231fca27bf202bb0e8fbe4fc6339d63b38ccb87c2760b533d1c3", + strip_prefix = "rules_java-981f06c3d2bd10225e85209904090eb7b5fb26bd", + urls = [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_java/archive/981f06c3d2bd10225e85209904090eb7b5fb26bd.tar.gz", + "https://github.com/bazelbuild/rules_java/archive/981f06c3d2bd10225e85209904090eb7b5fb26bd.tar.gz", + ], + ) + +def rules_jvm_external(): + http_archive( + name = "rules_jvm_external", + sha256 = "f36441aa876c4f6427bfb2d1f2d723b48e9d930b62662bf723ddfb8fc80f0140", + strip_prefix = "rules_jvm_external-4.1", + urls = ["https://github.com/bazelbuild/rules_jvm_external/archive/4.1.zip"], + ) + +def rules_proto(): + http_archive( + name = "rules_proto", + sha256 = "602e7161d9195e50246177e7c55b2f39950a9cf7366f74ed5f22fd45750cd208", + strip_prefix = "rules_proto-97d8af4dc474595af3900dd85cb3a29ad28cc313", + urls = [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz", + "https://github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz", + ], + ) + +def rules_python(): + http_archive( + name = "rules_python", + sha256 = "e5470e92a18aa51830db99a4d9c492cc613761d5bdb7131c04bd92b9834380f6", + strip_prefix = "rules_python-4b84ad270387a7c439ebdccfd530e2339601ef27", + urls = [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_python/archive/4b84ad270387a7c439ebdccfd530e2339601ef27.tar.gz", + "https://github.com/bazelbuild/rules_python/archive/4b84ad270387a7c439ebdccfd530e2339601ef27.tar.gz", + ], + ) + def zlib(): http_archive( name = "zlib", - build_file = "@io_bazel_rules_closure//:third_party/zlib.BUILD", + build_file = "@com_google_protobuf//:third_party/zlib.BUILD", sha256 = "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1", strip_prefix = "zlib-1.2.11", - urls = ["https://zlib.net/zlib-1.2.11.tar.gz"], + urls = [ + "https://mirror.bazel.build/zlib.net/zlib-1.2.11.tar.gz", + "https://zlib.net/zlib-1.2.11.tar.gz", + ], ) diff --git a/closure/stylesheets/BUILD b/closure/stylesheets/BUILD index 30c5efb1c9..a42826fcf2 100644 --- a/closure/stylesheets/BUILD +++ b/closure/stylesheets/BUILD @@ -12,6 +12,24 @@ # See the License for the specific language governing permissions and # limitations under the License. +load("@bazel_skylib//:bzl_library.bzl", "bzl_library") + package(default_visibility = ["//visibility:public"]) licenses(["notice"]) # Apache 2.0 + +bzl_library( + name = "closure_css_binary_bzl", + srcs = ["closure_css_binary.bzl"], + deps = [ + "//closure/private:defs_bzl", + ], +) + +bzl_library( + name = "closure_css_library_bzl", + srcs = ["closure_css_library.bzl"], + deps = [ + "//closure/private:defs_bzl", + ], +) diff --git a/closure/stylesheets/test/BUILD b/closure/stylesheets/test/BUILD index 22b7f49632..cf25638382 100644 --- a/closure/stylesheets/test/BUILD +++ b/closure/stylesheets/test/BUILD @@ -17,10 +17,7 @@ package(default_testonly = True) licenses(["notice"]) # Apache 2.0 load("//closure/private:file_test.bzl", "file_test") -load("//closure:defs.bzl", "closure_css_binary") -load("//closure:defs.bzl", "closure_css_library") -load("//closure:defs.bzl", "closure_js_binary") -load("//closure:defs.bzl", "closure_js_library") +load("//closure:defs.bzl", "closure_css_binary", "closure_css_library", "closure_js_binary", "closure_js_library") closure_css_library( name = "hello_lib", diff --git a/closure/templates/BUILD b/closure/templates/BUILD index 80c82052a6..0932884be1 100644 --- a/closure/templates/BUILD +++ b/closure/templates/BUILD @@ -16,8 +16,8 @@ package(default_visibility = ["//visibility:public"]) licenses(["notice"]) # Apache 2.0 -load("//closure:defs.bzl", "closure_js_library") -load("//closure:defs.bzl", "closure_js_proto_library") +load("@rules_java//java:defs.bzl", "java_library") +load("//closure:defs.bzl", "closure_js_library", "closure_js_proto_library") java_library( name = "templates", @@ -35,25 +35,27 @@ closure_js_library( lenient = True, deps = [ ":soy_html_proto", - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/debug", - "//closure/library/format", - "//closure/library/html:safehtml", - "//closure/library/html:safescript", - "//closure/library/html:safestyle", - "//closure/library/html:safestylesheet", - "//closure/library/html:safeurl", - "//closure/library/html:trustedresourceurl", - "//closure/library/html:uncheckedconversions", - "//closure/library/i18n:bidi", - "//closure/library/i18n:bidiformatter", - "//closure/library/i18n:numberformat", - "//closure/library/object", - "//closure/library/soy:all_js", - "//closure/library/string", - "//closure/library/string:const", - "//closure/library/uri", + "@com_google_javascript_closure_library//closure/goog/array", + "@com_google_javascript_closure_library//closure/goog/asserts", + "@com_google_javascript_closure_library//closure/goog/debug", + "@com_google_javascript_closure_library//closure/goog/format", + "@com_google_javascript_closure_library//closure/goog/html:safehtml", + "@com_google_javascript_closure_library//closure/goog/html:safescript", + "@com_google_javascript_closure_library//closure/goog/html:safestyle", + "@com_google_javascript_closure_library//closure/goog/html:safestylesheet", + "@com_google_javascript_closure_library//closure/goog/html:safeurl", + "@com_google_javascript_closure_library//closure/goog/html:trustedresourceurl", + "@com_google_javascript_closure_library//closure/goog/html:uncheckedconversions", + "@com_google_javascript_closure_library//closure/goog/i18n:bidi", + "@com_google_javascript_closure_library//closure/goog/i18n:bidiformatter", + "@com_google_javascript_closure_library//closure/goog/i18n:numberformat", + "@com_google_javascript_closure_library//closure/goog/object", + "@com_google_javascript_closure_library//closure/goog/soy", + "@com_google_javascript_closure_library//closure/goog/soy:data", + "@com_google_javascript_closure_library//closure/goog/soy:renderer", + "@com_google_javascript_closure_library//closure/goog/string", + "@com_google_javascript_closure_library//closure/goog/string:const", + "@com_google_javascript_closure_library//closure/goog/uri", ], ) diff --git a/closure/templates/closure_java_template_library.bzl b/closure/templates/closure_java_template_library.bzl index 9d9b4a1d53..35f8d039de 100644 --- a/closure/templates/closure_java_template_library.bzl +++ b/closure/templates/closure_java_template_library.bzl @@ -15,6 +15,8 @@ """Utilities for compiling Closure Templates to Java. """ +load("@rules_java//java:defs.bzl", "java_library") + _SOY_COMPILER_BIN = "@com_google_template_soy//:SoyParseInfoGenerator" _SOY_LIBRARY = "@com_google_template_soy//:com_google_template_soy" @@ -77,7 +79,7 @@ def closure_java_template_library( # Now, wrap them in a Java library, and expose the Soy files as resources. java_srcs = outs + extra_outs - native.java_library( + java_library( name = name, srcs = java_srcs or None, exports = [str(Label(_SOY_LIBRARY))], diff --git a/closure/templates/closure_js_template_library.bzl b/closure/templates/closure_js_template_library.bzl index 23184db31c..e910371b72 100644 --- a/closure/templates/closure_js_template_library.bzl +++ b/closure/templates/closure_js_template_library.bzl @@ -18,6 +18,7 @@ load("//closure/compiler:closure_js_aspect.bzl", "closure_js_aspect") load("//closure/compiler:closure_js_library.bzl", "closure_js_library") load("//closure/private:defs.bzl", "SOY_FILE_TYPE", "unfurl") +load("//closure/templates:closure_templates_plugin.bzl", "SoyPluginInfo") _SOYTOJSSRCCOMPILER = "@com_google_template_soy//:SoyToJsSrcCompiler" @@ -30,8 +31,11 @@ def _impl(ctx): args += ["--shouldGenerateGoogMsgDefs"] if ctx.attr.bidi_global_dir: args += ["--bidiGlobalDir=%s" % ctx.attr.bidi_global_dir] - if ctx.attr.plugin_modules: - args += ["--pluginModules=%s" % ",".join(ctx.attr.plugin_modules)] + if ctx.attr.plugins: + args += ["--pluginModules=%s" % ",".join([ + m[SoyPluginInfo].generator.module + for m in ctx.attr.plugins + ])] for arg in ctx.attr.defs: if not arg.startswith("--") or (" " in arg and "=" not in arg): fail("Please use --flag=value syntax for defs") @@ -47,6 +51,16 @@ def _impl(ctx): for f in dep.closure_js_library.descriptors.to_list(): args += ["--protoFileDescriptors=%s" % f.path] inputs.append(f) + + plugin_transitive_deps = depset( + transitive = [m[SoyPluginInfo].generator.runtime.transitive_runtime_deps for m in ctx.attr.plugins], + ).to_list() + inputs.extend(plugin_transitive_deps) + plugin_classpath = [dep.path for dep in plugin_transitive_deps] + if len(plugin_classpath) > 0: + args.insert(0, "--main_advice_classpath=" + + ctx.configuration.host_path_separator.join(plugin_classpath)) + ctx.actions.run( inputs = inputs, outputs = ctx.outputs.outputs, @@ -69,7 +83,9 @@ _closure_js_template_library = rule( ), "outputs": attr.output_list(), "globals": attr.label(allow_single_file = True), - "plugin_modules": attr.label_list(), + "plugins": attr.label_list( + providers = [SoyPluginInfo], + ), "should_generate_soy_msg_defs": attr.bool(), "bidi_global_dir": attr.int(default = 1, values = [1, -1]), "soy_msgs_are_external": attr.bool(), @@ -85,7 +101,7 @@ def closure_js_template_library( suppress = [], testonly = None, globals = None, - plugin_modules = None, + plugins = None, should_generate_soy_msg_defs = None, bidi_global_dir = None, soy_msgs_are_external = None, @@ -101,7 +117,7 @@ def closure_js_template_library( testonly = testonly, visibility = ["//visibility:private"], globals = globals, - plugin_modules = plugin_modules, + plugins = plugins, should_generate_soy_msg_defs = should_generate_soy_msg_defs, bidi_global_dir = bidi_global_dir, soy_msgs_are_external = soy_msgs_are_external, @@ -110,25 +126,27 @@ def closure_js_template_library( ) deps = deps + [ - str(Label("//closure/library/array")), - str(Label("//closure/library/asserts")), - str(Label("//closure/library/debug")), - str(Label("//closure/library/format")), - str(Label("//closure/library/html:safehtml")), - str(Label("//closure/library/html:safescript")), - str(Label("//closure/library/html:safestyle")), - str(Label("//closure/library/html:safestylesheet")), - str(Label("//closure/library/html:safeurl")), - str(Label("//closure/library/html:trustedresourceurl")), - str(Label("//closure/library/html:uncheckedconversions")), - str(Label("//closure/library/i18n:bidi")), - str(Label("//closure/library/i18n:bidiformatter")), - str(Label("//closure/library/i18n:numberformat")), - str(Label("//closure/library/object")), - str(Label("//closure/library/soy:all_js")), - str(Label("//closure/library/string")), - str(Label("//closure/library/string:const")), - str(Label("//closure/library/uri")), + "@com_google_javascript_closure_library//closure/goog/array", + "@com_google_javascript_closure_library//closure/goog/asserts", + "@com_google_javascript_closure_library//closure/goog/debug", + "@com_google_javascript_closure_library//closure/goog/format", + "@com_google_javascript_closure_library//closure/goog/html:safehtml", + "@com_google_javascript_closure_library//closure/goog/html:safescript", + "@com_google_javascript_closure_library//closure/goog/html:safestyle", + "@com_google_javascript_closure_library//closure/goog/html:safestylesheet", + "@com_google_javascript_closure_library//closure/goog/html:safeurl", + "@com_google_javascript_closure_library//closure/goog/html:trustedresourceurl", + "@com_google_javascript_closure_library//closure/goog/html:uncheckedconversions", + "@com_google_javascript_closure_library//closure/goog/i18n:bidi", + "@com_google_javascript_closure_library//closure/goog/i18n:bidiformatter", + "@com_google_javascript_closure_library//closure/goog/i18n:numberformat", + "@com_google_javascript_closure_library//closure/goog/object", + "@com_google_javascript_closure_library//closure/goog/soy", + "@com_google_javascript_closure_library//closure/goog/soy:data", + "@com_google_javascript_closure_library//closure/goog/soy:renderer", + "@com_google_javascript_closure_library//closure/goog/string", + "@com_google_javascript_closure_library//closure/goog/string:const", + "@com_google_javascript_closure_library//closure/goog/uri", str(Label("//closure/templates:soy_jssrc")), ] @@ -139,6 +157,7 @@ def closure_js_template_library( testonly = testonly, suppress = suppress + [ "analyzerChecks", + "deprecated", "reportUnknownTypes", "strictCheckTypes", "unusedLocalVariables", diff --git a/closure/templates/closure_templates_plugin.bzl b/closure/templates/closure_templates_plugin.bzl new file mode 100644 index 0000000000..3d302a0c0e --- /dev/null +++ b/closure/templates/closure_templates_plugin.bzl @@ -0,0 +1,43 @@ +# Copyright 2019 The Closure Rules Authors. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +SoyPluginInfo = provider( + doc = "provides the module and java_library implementing this plugin", +) + +def _impl(ctx): + return [SoyPluginInfo( + generator = struct( + module = ctx.attr.module, + runtime = java_common.merge([dep[JavaInfo] for dep in ctx.attr.deps]), + ), + )] + +closure_templates_plugin = rule( + implementation = _impl, + doc = "a closure templates plugin providing user-defined functions", + attrs = { + "module": attr.string( + doc = "fully-qualified class name of extension module", + mandatory = True, + ), + "deps": attr.label_list( + doc = "java_library rules providing the specified class name", + providers = [JavaInfo], + mandatory = True, + cfg = "exec", + ), + }, + provides = [SoyPluginInfo], +) diff --git a/closure/templates/test/BUILD b/closure/templates/test/BUILD index 892115205f..7a767c1f6c 100644 --- a/closure/templates/test/BUILD +++ b/closure/templates/test/BUILD @@ -16,12 +16,7 @@ package(default_testonly = True) licenses(["notice"]) # Apache 2.0 -load("//closure:defs.bzl", "closure_js_binary") -load("//closure:defs.bzl", "closure_js_library") -load("//closure:defs.bzl", "closure_js_proto_library") -load("//closure:defs.bzl", "closure_js_template_library") -load("//closure:defs.bzl", "closure_js_test") -load("//closure:defs.bzl", "closure_java_template_library") +load("//closure:defs.bzl", "closure_java_template_library", "closure_js_library", "closure_js_proto_library", "closure_js_template_library", "closure_js_test", "closure_templates_plugin") load("//closure/private:file_test.bzl", "file_test") closure_js_proto_library( @@ -63,6 +58,36 @@ closure_js_template_library( ], ) +closure_js_template_library( + name = "plugin_soy", + srcs = ["plugin.soy"], + plugins = [":plugin_ExampleModule"], +) + +java_library( + name = "ExampleModule", + srcs = ["ExampleModule.java"], + deps = [ + "@com_google_guava", + "@com_google_inject_extensions_guice_multibindings", + "@com_google_inject_guice", + "@com_google_template_soy", + ], +) + +closure_templates_plugin( + name = "plugin_ExampleModule", + module = "test.ExampleModule", + deps = [":ExampleModule"], +) + +file_test( + name = "plugin_test_toLower", + size = "small", + file = ":plugin.soy.js", + regexp = ".toLowerCase()", +) + file_test( name = "localized_using_defs_test", size = "small", @@ -73,25 +98,30 @@ file_test( closure_js_template_library( name = "greeter_proto_soy", srcs = ["greeter_proto.soy"], - deps = [":person_proto"], + deps = [ + ":greeter_soy", + ":person_proto", + ], ) closure_js_library( name = "greeter_lib", srcs = ["greeter.js"], + suppress = ["useOfGoogProvide"], deps = [ ":greeter_soy", - "//closure/library/soy", + "@com_google_javascript_closure_library//closure/goog/soy", ], ) closure_js_library( name = "greeter_proto_lib", srcs = ["greeter_proto.js"], + suppress = ["useOfGoogProvide"], deps = [ ":greeter_proto_soy", ":person_proto", - "//closure/library/soy", + "@com_google_javascript_closure_library//closure/goog/soy", ], ) @@ -101,9 +131,9 @@ closure_js_test( srcs = ["greeter_test.js"], deps = [ ":greeter_lib", - "//closure/library/asserts", - "//closure/library/testing:asserts", - "//closure/library/testing:jsunit", + "@com_google_javascript_closure_library//closure/goog/asserts", + "@com_google_javascript_closure_library//closure/goog/testing:asserts", + "@com_google_javascript_closure_library//closure/goog/testing:jsunit", ], ) @@ -113,9 +143,9 @@ closure_js_test( srcs = ["greeter_proto_test.js"], deps = [ ":greeter_proto_lib", - "//closure/library/asserts", - "//closure/library/testing:asserts", - "//closure/library/testing:jsunit", + "@com_google_javascript_closure_library//closure/goog/asserts", + "@com_google_javascript_closure_library//closure/goog/testing:asserts", + "@com_google_javascript_closure_library//closure/goog/testing:jsunit", ], ) @@ -132,6 +162,22 @@ file_test( regexp = "class GreeterSoyInfo", ) +closure_java_template_library( + name = "greeter2_soy_java", + srcs = ["greeter2.soy"], + java_package = "io.bazel.rules.closure.soy.greeter", + deps = [ + ":greeter_soy", + ], +) + +file_test( + name = "greeter2_java_generated", + size = "small", + file = "Greeter2SoyInfo.java", + regexp = "class Greeter2SoyInfo", +) + ################################################################################ # Globals variables can be defined in txt files @@ -147,7 +193,9 @@ closure_js_test( srcs = ["globals_test.js"], deps = [ ":globals_soy", - "//closure/library", - "//closure/library:testing", + "@com_google_javascript_closure_library//closure/goog/soy", + "@com_google_javascript_closure_library//closure/goog/testing:asserts", + "@com_google_javascript_closure_library//closure/goog/testing:jsunit", + "@com_google_javascript_closure_library//closure/goog/testing:testsuite", ], ) diff --git a/closure/templates/test/ExampleModule.java b/closure/templates/test/ExampleModule.java new file mode 100644 index 0000000000..81f12609ec --- /dev/null +++ b/closure/templates/test/ExampleModule.java @@ -0,0 +1,58 @@ +// Copyright 2019 The Closure Rules Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +package test; + +import com.google.common.collect.ImmutableSet; +import com.google.inject.AbstractModule; +import com.google.inject.multibindings.Multibinder; +import com.google.template.soy.jssrc.restricted.JsExpr; +import com.google.template.soy.jssrc.restricted.SoyJsSrcFunction; +import com.google.template.soy.shared.restricted.SoyFunction; +import java.util.List; +import java.util.Set; + +/** + * An example module providing a custom soy function and js source implementation. + * See {@link https://github.com/google/closure-templates/blob/master/documentation/dev/plugins.md} + */ +public class ExampleModule extends AbstractModule { + /** {@inheritDoc} */ + @Override + protected void configure() { + bindFunctions(Multibinder.newSetBinder(binder(), SoyFunction.class)); + } + + private void bindFunctions(Multibinder fns) { + fns.addBinding().to(ToLowerFunction.class); + } + + public static class ToLowerFunction implements SoyJsSrcFunction { + @Override + public String getName() { + return "toLower"; + } + + @Override + public Set getValidArgsSizes() { + return ImmutableSet.of(1); + } + + @Override + public JsExpr computeForJsSrc(List args) { + JsExpr arg = args.get(0); + String exprText = "(" + arg.getText() + ").toLowerCase()"; + return new JsExpr(exprText, Integer.MAX_VALUE); + } + } +} diff --git a/closure/templates/test/greeter2.soy b/closure/templates/test/greeter2.soy new file mode 100644 index 0000000000..6378e3c245 --- /dev/null +++ b/closure/templates/test/greeter2.soy @@ -0,0 +1,29 @@ +// Copyright 2019 The Closure Rules Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +{namespace io.bazel.rules.closure.soy.greeter2} + + +/** + * Greets a person. + */ +{template .greet} + {@param name: string} + + {call io.bazel.rules.closure.soy.greeter.greet} + {param name kind="text"} + {$name} + {/param} + {/call} +{/template} diff --git a/closure/templates/test/greeter_proto.js b/closure/templates/test/greeter_proto.js index b1ed612a08..f0882322d6 100644 --- a/closure/templates/test/greeter_proto.js +++ b/closure/templates/test/greeter_proto.js @@ -15,7 +15,7 @@ goog.provide('io.bazel.rules.closure.GreeterProto'); goog.require('goog.soy'); -goog.require('io.bazel.rules.closure.soy.greeter'); +goog.require('io.bazel.rules.closure.soy.protoGreeter'); goog.require('proto.io.bazel.rules.closure.soy.Person'); @@ -45,6 +45,6 @@ io.bazel.rules.closure.GreeterProto.prototype.greet = function() { person.setName(this.name_); goog.soy.renderElement(goog.global.document.body, - io.bazel.rules.closure.soy.greeter.greet, + io.bazel.rules.closure.soy.protoGreeter.greet, {person: person}); }; diff --git a/closure/templates/test/greeter_proto.soy b/closure/templates/test/greeter_proto.soy index a6c0c27da4..1e11d7603c 100644 --- a/closure/templates/test/greeter_proto.soy +++ b/closure/templates/test/greeter_proto.soy @@ -12,14 +12,19 @@ // See the License for the specific language governing permissions and // limitations under the License. -{namespace io.bazel.rules.closure.soy.greeter} +{namespace io.bazel.rules.closure.soy.protoGreeter} +import {Person} from 'closure/templates/test/person.proto'; /** * Greets a person. */ {template .greet} - {@param person: io.bazel.rules.closure.soy.Person} -

- Hello {$person.name}! + {@param person: Person} + + {call io.bazel.rules.closure.soy.greeter.greet} + {param name kind="text"} + {$person.name} + {/param} + {/call} {/template} diff --git a/closure/templates/test/plugin.soy b/closure/templates/test/plugin.soy new file mode 100644 index 0000000000..1c06ce3adf --- /dev/null +++ b/closure/templates/test/plugin.soy @@ -0,0 +1,25 @@ +// Copyright 2019 The Closure Rules Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +{namespace io.bazel.rules.closure.soy.plugin} + + +/** + * Greets a person, loudly. + */ +{template .greetLoudly} + {@param name: string} +

+ {toLower('Hello')} {$name}! +{/template} diff --git a/closure/testing/BUILD b/closure/testing/BUILD index 97c9e8ef21..10396944af 100644 --- a/closure/testing/BUILD +++ b/closure/testing/BUILD @@ -20,6 +20,7 @@ package( licenses(["notice"]) # Apache 2.0 load("//closure:defs.bzl", "closure_js_binary", "closure_js_library") +load("@bazel_skylib//:bzl_library.bzl", "bzl_library") exports_files(["empty.html"]) @@ -41,3 +42,21 @@ closure_js_binary( defs = ["--env=CUSTOM"], deps = [":phantomjs_harness"], ) + +bzl_library( + name = "phantomjs_test_bzl", + srcs = ["phantomjs_test.bzl"], + deps = [ + "//closure/compiler:compiler_bzl", + ], +) + +bzl_library( + name = "closure_js_test_bzl", + srcs = ["closure_js_test.bzl"], + deps = [ + ":phantomjs_test_bzl", + "//closure/compiler:compiler_bzl", + ], +) + diff --git a/closure/testing/closure_js_test.bzl b/closure/testing/closure_js_test.bzl index 6ea7e201ed..9bdd13d207 100644 --- a/closure/testing/closure_js_test.bzl +++ b/closure/testing/closure_js_test.bzl @@ -33,6 +33,7 @@ def closure_js_test( suppress = None, visibility = None, tags = [], + debug = False, **kwargs): if not srcs: fail("closure_js_test rules can not have an empty 'srcs' list") @@ -81,6 +82,7 @@ def closure_js_test( name = shard, runner = str(Label("//closure/testing:phantomjs_jsunit_runner")), deps = [":%s_bin" % shard], + debug = debug, html = html, visibility = visibility, tags = tags, diff --git a/closure/testing/externs/phantom.js b/closure/testing/externs/phantom.js index cb4ffc02ab..1959ef9449 100644 --- a/closure/testing/externs/phantom.js +++ b/closure/testing/externs/phantom.js @@ -230,6 +230,12 @@ phantomjs.Page = class { * @return {void} */ onLoadStarted() {} + + + /** + * @param {!phantomjs.Server.ResourceError} resource + */ + onResourceTimeout(resource) {} }; /** @@ -278,7 +284,6 @@ phantomjs.Server.Request = class {}; */ phantomjs.Server.Request.prototype.url; - /** * @record * @see http://phantomjs.org/api/webserver/method/listen.html @@ -316,6 +321,31 @@ phantomjs.Server.Response = class { }; +/** + * @record + * @see https://phantomjs.org/api/webpage/handler/on-resource-error.html + */ +phantomjs.Server.ResourceError = class {}; + +/** + * @type {string} + * @const + */ +phantomjs.Server.ResourceError.prototype.url; + +/** + * @type {number} + * @const + */ +phantomjs.Server.ResourceError.prototype.errorCode; + +/** + * @type {string} + * @const + */ +phantomjs.Server.ResourceError.prototype.errorString; + + /** * @record * @see http://phantomjs.org/api/webserver/ diff --git a/closure/testing/phantomjs_harness.js b/closure/testing/phantomjs_harness.js index 9c83170850..058d4ca23d 100644 --- a/closure/testing/phantomjs_harness.js +++ b/closure/testing/phantomjs_harness.js @@ -189,6 +189,14 @@ function onLoadFinished(status) { } } +/** + * Callback when a script fails to load in time. + * @param {!phantomjs.Server.ResourceError} resource + */ +function onResourceTimeout(resource) { + system.stderr.writeLine('Resource timed out: ' + resource.url); + retry(); +} /** * Callback when webpage shows an alert dialog. @@ -246,7 +254,6 @@ function retry() { main(); } - /** * Attempts to run the test. */ @@ -288,6 +295,8 @@ function main() { page.onConsoleMessage = onConsoleMessage; page.onError = onError; page.onLoadFinished = onLoadFinished; + page.onResourceTimeout = onResourceTimeout; + // XXX: If PhantomJS croaks, fail sooner rather than later. // https://github.com/ariya/phantomjs/issues/10652 page.settings.resourceTimeout = 2000; diff --git a/closure/testing/phantomjs_test.bzl b/closure/testing/phantomjs_test.bzl index da37701447..5f4e735838 100644 --- a/closure/testing/phantomjs_test.bzl +++ b/closure/testing/phantomjs_test.bzl @@ -32,20 +32,23 @@ def _impl(ctx): srcs = [] direct_srcs = [] deps = unfurl(ctx.attr.deps, provider = "closure_js_library") - deps.append(ctx.attr.runner) for dep in deps: if hasattr(dep, "closure_js_binary"): direct_srcs += [dep.closure_js_binary.bin] else: srcs += [dep.closure_js_library.srcs] srcs = depset(direct_srcs, transitive = srcs) + deps.append(ctx.attr.runner) args = [ "#!/bin/sh\nexec " + ctx.executable._phantomjs.short_path, - ctx.attr.harness.closure_js_binary.bin.short_path, - ctx.file.html.short_path, ] + if ctx.attr.debug: + args += ["--debug=true"] + args += [ctx.attr.harness.closure_js_binary.bin.short_path] + args += [ctx.file.html.short_path] args += [long_path(ctx, src) for src in srcs.to_list()] + args += [long_path(ctx, src) for src in ctx.attr.runner.closure_js_library.srcs.to_list()] ctx.actions.write( is_executable = True, output = ctx.outputs.executable, @@ -82,6 +85,10 @@ phantomjs_test = rule( default = Label("//closure/testing:empty.html"), ), "data": attr.label_list(allow_files = True), + "debug": attr.bool( + doc = "Activate phantomjs debug logging", + default = False, + ), "_phantomjs": attr.label( default = Label("//third_party/phantomjs"), executable = True, diff --git a/closure/testing/test/BUILD b/closure/testing/test/BUILD index f9e9d892d6..15c6f38b70 100644 --- a/closure/testing/test/BUILD +++ b/closure/testing/test/BUILD @@ -16,13 +16,12 @@ package(default_testonly = True) licenses(["notice"]) # Apache 2.0 -load("//closure:defs.bzl", "closure_js_library") -load("//closure:defs.bzl", "closure_js_test") -load("//closure:defs.bzl", "files_equal_test") +load("//closure:defs.bzl", "closure_js_library", "closure_js_test") closure_js_library( name = "arithmetic_lib", srcs = ["arithmetic.js"], + suppress = ["useOfGoogProvide"], ) closure_js_test( @@ -30,15 +29,14 @@ closure_js_test( timeout = "short", srcs = ["simple_test.js"], deps = [ - "//closure/library/testing:asserts", - "//closure/library/testing:jsunit", + "@com_google_javascript_closure_library//closure/goog/testing:asserts", + "@com_google_javascript_closure_library//closure/goog/testing:jsunit", ], ) closure_js_library( name = "arithmetic_module_lib", srcs = ["arithmetic_module.js"], - deps = ["//closure/library"], ) closure_js_test( @@ -48,9 +46,9 @@ closure_js_test( entry_points = ["goog:arithmetic_module_test"], deps = [ ":arithmetic_module_lib", - "//closure/library/testing:asserts", - "//closure/library/testing:jsunit", - "//closure/library/testing:testsuite", + "@com_google_javascript_closure_library//closure/goog/testing:asserts", + "@com_google_javascript_closure_library//closure/goog/testing:jsunit", + "@com_google_javascript_closure_library//closure/goog/testing:testsuite", ], ) @@ -60,9 +58,9 @@ closure_js_test( srcs = ["arithmetic_scope_test.js"], deps = [ ":arithmetic_lib", - "//closure/library/testing:asserts", - "//closure/library/testing:jsunit", - "//closure/library/testing:testsuite", + "@com_google_javascript_closure_library//closure/goog/testing:asserts", + "@com_google_javascript_closure_library//closure/goog/testing:jsunit", + "@com_google_javascript_closure_library//closure/goog/testing:testsuite", ], ) @@ -79,7 +77,22 @@ closure_js_test( suppress = ["moduleLoad"], deps = [ ":arithmetic_es6module_lib", - "//closure/library:testing", + "@com_google_javascript_closure_library//closure/goog/testing:asserts", + "@com_google_javascript_closure_library//closure/goog/testing:jsunit", + ], +) + +# Note that this is also validating Closure Library integration. +closure_js_test( + name = "dom_test", + timeout = "short", + srcs = ["dom_test.js"], + deps = [ + "@com_google_javascript_closure_library//closure/goog/dom", + "@com_google_javascript_closure_library//closure/goog/dom:tagname", + "@com_google_javascript_closure_library//closure/goog/html:safehtml", + "@com_google_javascript_closure_library//closure/goog/testing:asserts", + "@com_google_javascript_closure_library//closure/goog/testing:jsunit", ], ) @@ -96,7 +109,8 @@ closure_js_test( lenient = True, deps = [ ":lenient_lib", - "//closure/library:testing", + "@com_google_javascript_closure_library//closure/goog/testing:asserts", + "@com_google_javascript_closure_library//closure/goog/testing:testsuite", ], ) @@ -107,7 +121,7 @@ closure_js_test( "dict_entry_point_test.js": ["rules_closure.DictEntryPointTest"], }, deps = [ - "//closure/library:testing", + "@com_google_javascript_closure_library//closure/goog/testing:testsuite", ], ) diff --git a/closure/library/test/dom_test.js b/closure/testing/test/dom_test.js similarity index 99% rename from closure/library/test/dom_test.js rename to closure/testing/test/dom_test.js index bd6ab40e41..53e0af4497 100644 --- a/closure/library/test/dom_test.js +++ b/closure/testing/test/dom_test.js @@ -48,3 +48,4 @@ function testHtml() { assertHTMLEquals('

Hello World!
', goog.dom.getRequiredElement('hello').outerHTML); } + diff --git a/closure/webfiles/test/BUILD b/closure/webfiles/test/BUILD deleted file mode 100644 index 55b6d7925c..0000000000 --- a/closure/webfiles/test/BUILD +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright 2016 The Closure Rules Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -package(default_testonly = True) - -licenses(["notice"]) # Apache 2.0 - -load("//closure:defs.bzl", "web_library") - -# ProTip: bazel run //closure/webfiles/test:raven -web_library( - name = "raven", - srcs = ["index.html"], - path = "/", - deps = [":stuff"], -) - -web_library( - name = "stuff", - srcs = [ - "import.html", - "index.css", - ], - path = "/", -) diff --git a/closure/webfiles/test/import.html b/closure/webfiles/test/import.html deleted file mode 100644 index de4fd047d4..0000000000 --- a/closure/webfiles/test/import.html +++ /dev/null @@ -1,18 +0,0 @@ - - - diff --git a/closure/webfiles/test/index.css b/closure/webfiles/test/index.css deleted file mode 100644 index 1241e7ea07..0000000000 --- a/closure/webfiles/test/index.css +++ /dev/null @@ -1,29 +0,0 @@ -/** - * @license - * Copyright 2016 The Closure Rules Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -body { - background: #333; - color: #f6f6f6; - font-family: sans-serif; - margin: 1em auto; - padding: 0 1em; - width: 960px; -} - -b { - color: #f63333; -} diff --git a/closure/webfiles/test/index.html b/closure/webfiles/test/index.html deleted file mode 100644 index 8c4c4fd24e..0000000000 --- a/closure/webfiles/test/index.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - -

The Raven by Edgar Allen Poe (Excerpt)

- -

- “Prophet!” said I, “thing of evil!—prophet still, if bird or devil!—
- Whether Tempter sent, or whether tempest tossed thee here ashore,
- Desolate yet all undaunted, on this desert land enchanted—
- On this home by Horror haunted—tell me truly, I implore—
- Is there—is there balm in Gilead?—tell me—tell me, I implore!”
- Quoth the Raven “Nevermore.” - -

- “Prophet!” said I, “thing of evil!—prophet still, if bird or devil!
- By that Heaven that bends above us—by that God we both adore—
- Tell this soul with sorrow laden if, within the distant Aidenn,
- It shall clasp a sainted maiden whom the angels name Lenore—
- Clasp a rare and radiant maiden whom the angels name Lenore.”
- Quoth the Raven “Nevermore.” - -

- “Be that word our sign of parting, bird or fiend!” I shrieked, upstarting—
- “Get thee back into the tempest and the Night’s Plutonian shore!
- Leave no black plume as a token of that lie thy soul hath spoken!
- Leave my loneliness unbroken!—quit the bust above my door!
- Take thy beak from out my heart, and take thy form from off my door!”
- Quoth the Raven “Nevermore.” - -

- And the Raven, never flitting, still is sitting, still is sitting
- On the pallid bust of Pallas just above my chamber door;
- And his eyes have all the seeming of a demon’s that is dreaming,
- And the lamp-light o’er him streaming throws his shadow on the floor;
- And my soul from out that shadow that lies floating on the floor
- Shall be lifted—nevermore! diff --git a/closure/webfiles/web_library.bzl b/closure/webfiles/web_library.bzl deleted file mode 100644 index 6b3c076b18..0000000000 --- a/closure/webfiles/web_library.bzl +++ /dev/null @@ -1,235 +0,0 @@ -# Copyright 2016 The Closure Rules Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Web component validation, packaging, and development web server.""" - -load( - "//closure/private:defs.bzl", - "create_argfile", - "difference", - "long_path", - "unfurl", -) - -def _web_library(ctx): - if not ctx.attr.srcs: - if ctx.attr.deps: - fail("deps can not be set when srcs is not") - if not ctx.attr.exports: - fail("exports must be set if srcs is not") - if ctx.attr.path: - if not ctx.attr.path.startswith("/"): - fail("webpath must start with /") - if ctx.attr.path != "/" and ctx.attr.path.endswith("/"): - fail("webpath must not end with / unless it is /") - if "//" in ctx.attr.path: - fail("webpath must not have //") - elif ctx.attr.srcs: - fail("path must be set when srcs is set") - if "*" in ctx.attr.suppress and len(ctx.attr.suppress) != 1: - fail("when \"*\" is suppressed no other items should be present") - - # process what came before - deps = unfurl(ctx.attr.deps, provider = "webfiles") - webpaths = [] - manifests = [] - for dep in deps: - webpaths.append(dep.webfiles.webpaths) - manifests += [dep.webfiles.manifests] - - # process what comes now - new_webpaths = [] - manifest_srcs = [] - path = ctx.attr.path - strip = _get_strip(ctx) - for src in ctx.files.srcs: - suffix = _get_path_relative_to_package(src) - if strip: - if not suffix.startswith(strip): - fail("Relative src path not start with '%s': %s" % (strip, suffix)) - suffix = suffix[len(strip):] - webpath = "%s/%s" % ("" if path == "/" else path, suffix) - if webpath in new_webpaths: - _fail(ctx, "multiple srcs within %s define the webpath %s " % ( - ctx.label, - webpath, - )) - if webpath in webpaths: - _fail(ctx, "webpath %s was defined by %s when already defined by deps" % ( - webpath, - ctx.label, - )) - new_webpaths.append(webpath) - manifest_srcs.append(struct( - path = src.path, - longpath = long_path(ctx, src), - webpath = webpath, - )) - webpaths += [depset(new_webpaths)] - manifest = ctx.actions.declare_file("%s.pbtxt" % ctx.label.name) - ctx.actions.write( - output = manifest, - content = struct( - label = str(ctx.label), - src = manifest_srcs, - ).to_proto(), - ) - manifests = depset([manifest], transitive = manifests, order = "postorder") - - # perform strict dependency checking - inputs = [manifest] - direct_manifests = [manifest] - args = [ - "WebfilesValidator", - "--dummy", - ctx.outputs.dummy.path, - "--target", - manifest.path, - ] - for category in ctx.attr.suppress: - args.append("--suppress") - args.append(category) - inputs.extend(ctx.files.srcs) - for dep in deps: - inputs.append(dep.webfiles.dummy) - for f in dep.files.to_list(): - inputs.append(f) - direct_manifests += [dep.webfiles.manifest] - inputs.append(dep.webfiles.manifest) - args.append("--direct_dep") - args.append(dep.webfiles.manifest.path) - for man in difference(manifests, depset(direct_manifests)): - inputs.append(man) - args.append("--transitive_dep") - args.append(man.path) - argfile = create_argfile(ctx.actions, ctx.label.name, args) - inputs.append(argfile) - ctx.actions.run( - inputs = inputs, - outputs = [ctx.outputs.dummy], - executable = ctx.executable._ClosureWorker, - arguments = ["@@" + argfile.path], - mnemonic = "Closure", - execution_requirements = {"supports-workers": "1"}, - progress_message = "Checking webfiles in %s" % ctx.label, - ) - - # define development web server that only applies to this transitive closure - params = struct( - label = str(ctx.label), - bind = "[::]:6006", - manifest = [long_path(ctx, man) for man in manifests.to_list()], - external_asset = [ - struct(webpath = k, path = v) - for k, v in ctx.attr.external_assets.items() - ], - ) - params_file = ctx.actions.declare_file("%s_server_params.pbtxt" % ctx.label.name) - ctx.actions.write(output = params_file, content = params.to_proto()) - ctx.actions.write( - is_executable = True, - output = ctx.outputs.executable, - content = "#!/bin/sh\nexec %s %s \"$@\"" % ( - ctx.executable._WebfilesServer.short_path, - long_path(ctx, params_file), - ), - ) - - transitive_runfiles = depset( - transitive = [ctx.attr._WebfilesServer.data_runfiles.files] + - [dep.data_runfiles.files for dep in deps], - ) - - return struct( - files = depset([ctx.outputs.executable, ctx.outputs.dummy]), - exports = unfurl(ctx.attr.exports), - webfiles = struct( - manifest = manifest, - manifests = manifests, - webpaths = depset(transitive = webpaths), - dummy = ctx.outputs.dummy, - ), - runfiles = ctx.runfiles( - files = ctx.files.srcs + ctx.files.data + [ - manifest, - params_file, - ctx.outputs.executable, - ctx.outputs.dummy, - ], - transitive_files = transitive_runfiles, - ), - ) - -def _fail(ctx, message): - if ctx.attr.suppress == ["*"]: - print(message) - else: - fail(message) - -def _get_path_relative_to_package(artifact): - """Returns file path relative to the package that declared it.""" - path = artifact.path - for prefix in ( - artifact.root.path, - artifact.owner.workspace_root if artifact.owner else "", - artifact.owner.package if artifact.owner else "", - ): - if prefix: - prefix = prefix + "/" - if not path.startswith(prefix): - fail("Path %s doesn't start with %s" % (path, prefix)) - path = path[len(prefix):] - return path - -def _get_strip(ctx): - strip = ctx.attr.strip_prefix - if strip: - if strip.startswith("/"): - _fail(ctx, "strip_prefix should not end with /") - strip = strip[1:] - if strip.endswith("/"): - _fail(ctx, "strip_prefix should not end with /") - else: - strip += "/" - return strip - -web_library = rule( - implementation = _web_library, - executable = True, - attrs = { - "path": attr.string(), - "srcs": attr.label_list(allow_files = True), - "deps": attr.label_list(providers = ["webfiles"]), - "exports": attr.label_list(), - "data": attr.label_list(allow_files = True), - "suppress": attr.string_list(), - "strip_prefix": attr.string(), - "external_assets": attr.string_dict(default = {"/_/runfiles": "."}), - "_ClosureWorker": attr.label( - default = Label("//java/io/bazel/rules/closure:ClosureWorker"), - executable = True, - cfg = "host", - ), - "_WebfilesServer": attr.label( - default = Label( - "//java/io/bazel/rules/closure/webfiles/server:WebfilesServer", - ), - executable = True, - cfg = "host", - ), - }, - outputs = { - "dummy": "%{name}.ignoreme", - }, -) diff --git a/closure/webfiles/web_library_external.bzl b/closure/webfiles/web_library_external.bzl deleted file mode 100644 index 530641d6fd..0000000000 --- a/closure/webfiles/web_library_external.bzl +++ /dev/null @@ -1,103 +0,0 @@ -# Copyright 2016 The Closure Rules Authors. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -def _web_library_external(ctx): - """Downloads HTTP archive and creates a webfiles rule.""" - name = ctx.attr.generated_rule_name or ctx.name - lines = ["# DO NOT EDIT: generated by webfiles_external()", ""] - if ctx.attr.default_visibility: - lines.append("package(default_visibility = %s)" % ( - ctx.attr.default_visibility - )) - lines.append("") - lines.append("licenses(%s)" % repr(ctx.attr.licenses)) - lines.append("") - lines.append("load(\"@io_bazel_rules_closure//closure:" + - "defs.bzl\", \"web_library\")") - lines.append("") - lines.append("web_library(") - lines.append(" name = %s," % repr(name)) - if ctx.attr.path: - lines.append(" path = %r," % ctx.attr.path) - if ctx.attr.srcs: - lines.append(" srcs = %s," % _repr_list(ctx.attr.srcs)) - else: - lines.append(" srcs = glob(") - lines.append(" %s," % _repr_list(ctx.attr.glob, indent = " ")) - lines.append(" exclude = %s," % - _repr_list( - ctx.attr.exclude + ["BUILD", "WORKSPACE"], - indent = " ", - )) - lines.append(" ),") - for attr in ( - "data", - "visibility", - "exports", - "suppress", - "deps", - ): - value = getattr(ctx.attr, attr, None) - if value: - lines.append(" %s = %s," % (attr, _repr_list(value))) - if ctx.attr.testonly_: - lines.append(" testonly = 1,") - lines.append(")") - lines.append("") - extra = ctx.attr.extra_build_file_content - if extra: - lines.append(extra) - if not extra.endswith("\n"): - lines.append("") - ctx.download_and_extract( - ctx.attr.urls, - "", - ctx.attr.sha256, - "", - ctx.attr.strip_prefix, - ) - ctx.file("BUILD", "\n".join(lines)) - -def _repr_list(items, indent = " "): - items = sorted(items) - if not items: - return "[]" - if len(items) == 1: - return repr(items) - parts = [repr(item) for item in items] - return (("[\n%s " % indent) + - (",\n%s " % indent).join(parts) + - (",\n%s]" % indent)) - -web_library_external = repository_rule( - implementation = _web_library_external, - attrs = { - "sha256": attr.string(mandatory = True), - "urls": attr.string_list(mandatory = True, allow_empty = False), - "licenses": attr.string_list(mandatory = True, allow_empty = False), - "strip_prefix": attr.string(), - "path": attr.string(mandatory = True), - "srcs": attr.string_list(), - "glob": attr.string_list(default = ["**"]), - "exclude": attr.string_list(), - "data": attr.string_list(allow_empty = False), - "deps": attr.string_list(), - "exports": attr.string_list(), - "suppress": attr.string_list(), - "testonly_": attr.bool(), - "generated_rule_name": attr.string(), - "default_visibility": attr.string_list(default = ["//visibility:public"]), - "extra_build_file_content": attr.string(), - }, -) diff --git a/java/com/google/javascript/jscomp/BUILD b/java/com/google/javascript/jscomp/BUILD index 20c7af9d0f..10b20f2b99 100644 --- a/java/com/google/javascript/jscomp/BUILD +++ b/java/com/google/javascript/jscomp/BUILD @@ -14,6 +14,8 @@ licenses(["notice"]) # Apache 2.0 +load("@rules_java//java:defs.bzl", "java_library") + java_library( name = "jscomp", srcs = [ diff --git a/java/com/google/javascript/jscomp/CheckSetTestOnly.java b/java/com/google/javascript/jscomp/CheckSetTestOnly.java index 4c973c5b5b..963c056bf1 100644 --- a/java/com/google/javascript/jscomp/CheckSetTestOnly.java +++ b/java/com/google/javascript/jscomp/CheckSetTestOnly.java @@ -20,7 +20,7 @@ import com.google.javascript.rhino.Node; final class CheckSetTestOnly - extends AbstractShallowCallback implements HotSwapCompilerPass { + extends AbstractShallowCallback implements CompilerPass { public static final DiagnosticType INVALID_SETTESTONLY = DiagnosticType.error( @@ -40,11 +40,6 @@ public final void process(Node externs, Node root) { NodeTraversal.traverse(compiler, root, this); } - @Override - public final void hotSwapScript(Node scriptRoot, Node originalRoot) { - NodeTraversal.traverse(compiler, scriptRoot, this); - } - @Override public final void visit(NodeTraversal t, Node n, Node parent) { if (!state.testonly diff --git a/java/com/google/javascript/jscomp/CheckStrictDeps.java b/java/com/google/javascript/jscomp/CheckStrictDeps.java index 70109ddbc2..628a72dedb 100644 --- a/java/com/google/javascript/jscomp/CheckStrictDeps.java +++ b/java/com/google/javascript/jscomp/CheckStrictDeps.java @@ -23,7 +23,7 @@ import io.bazel.rules.closure.Webpath; abstract class CheckStrictDeps - extends AbstractShallowCallback implements HotSwapCompilerPass { + extends AbstractShallowCallback implements CompilerPass { public static final DiagnosticType DUPLICATE_PROVIDES = DiagnosticType.error( @@ -47,11 +47,6 @@ public final void process(Node externs, Node root) { NodeTraversal.traverse(compiler, root, this); } - @Override - public final void hotSwapScript(Node scriptRoot, Node originalRoot) { - NodeTraversal.traverse(compiler, scriptRoot, this); - } - static final class FirstPass extends CheckStrictDeps { private final JsCheckerState state; @@ -70,7 +65,8 @@ public final void visit(NodeTraversal t, Node n, Node parent) { Node parameter = n.getLastChild(); if (parameter.isString() && (callee.matchesQualifiedName("goog.provide") - || callee.matchesQualifiedName("goog.module"))) { + || callee.matchesQualifiedName("goog.module") + || callee.matchesQualifiedName("goog.declareModuleId"))) { String namespace = JsCheckerHelper.normalizeClosureNamespace(parameter.getString()); if (!state.mysterySources.contains(t.getSourceName())) { if (!state.provides.add(namespace)) { @@ -80,8 +76,14 @@ public final void visit(NodeTraversal t, Node n, Node parent) { && state.redeclaredProvides.add(namespace)) { t.report(parameter, REDECLARED_PROVIDES, state.label); } - // Since this file uses Google namespaces, it can no longer be loaded as an ES6 module. - state.provides.removeAll(convertPathToModuleName(t.getSourceName(), state.roots).asSet()); + if (!callee.matchesQualifiedName("goog.declareModuleId")) { + // This file uses `goog.{provide,module}`, so it can no longer be an ES6 module. + // For migration, ES6 modules can call `goog.declareModuleId` to allow them to be + // imported by `goog.require` (if they are `goog.module`s). + // https://github.com/google/closure-compiler/wiki/Migrating-from-goog.modules-to-ES6-modules + state.provides.removeAll( + convertPathToModuleName(t.getSourceName(), state.roots).asSet()); + } } else { state.provided.add(namespace); state.provided.removeAll(convertPathToModuleName(t.getSourceName(), state.roots).asSet()); @@ -136,7 +138,7 @@ private void visitEs6Import(NodeTraversal t, Node n) { private void checkNamespaceIsProvided(NodeTraversal t, Node n, String namespace) { if (namespace.startsWith("/") || namespace.startsWith(".")) { // TODO(jart): Unify path resolution with ModuleLoader. - Webpath me = Webpath.get(t.getSourceName()); + Webpath me = Webpath.get(convertPathToModuleName(t.getSourceName(), state.roots).or(t.getSourceName())); if (!me.isAbsolute()) { me = Webpath.get("/").resolve(me); } diff --git a/java/com/google/javascript/jscomp/Diagnostics.java b/java/com/google/javascript/jscomp/Diagnostics.java index 07a2fa5120..b3380076d5 100644 --- a/java/com/google/javascript/jscomp/Diagnostics.java +++ b/java/com/google/javascript/jscomp/Diagnostics.java @@ -57,11 +57,9 @@ final class Diagnostics { "nonStandardJsDocs", "setTestOnly", "strictDependencies", - "strictMissingRequire", "strictModuleChecks", "superfluousSuppress", - "underscore", - "useOfGoogBase"); + "underscore"); /** Diagnostic groups both {@link JsChecker} and {@link JsCompiler} will check. */ static final ImmutableSet JSCHECKER_EXTRA_ERRORS = @@ -75,8 +73,8 @@ final class Diagnostics { private static final ImmutableSet LEGAL_JSDOC_SUPPRESSIONS = ImmutableSet.of( "accessControls", - "ambiguousFunctionDecl", "checkDebuggerStatement", + "checkPrototypalTypes", "checkRegExp", "checkTypes", "checkVars", @@ -87,12 +85,13 @@ final class Diagnostics { "duplicate", "es5Strict", "externsValidation", + "extraProvide", "extraRequire", - "fileoverviewTags", "globalThis", "invalidCasts", "lateProvide", "legacyGoogScopeRequire", + "lintChecks", "messageConventions", "misplacedTypeAnnotation", "missingOverride", @@ -101,20 +100,26 @@ final class Diagnostics { "missingProvide", "missingRequire", "missingReturn", - "newCheckTypes", - "newCheckTypesAllChecks", + "missingSourcesWarnings", + "moduleLoad", "nonStandardJsDocs", + "partialAlias", + "polymer", "reportUnknownTypes", + "strictCheckTypes", + "strictMissingProperties", "strictModuleDepCheck", + "strictPrimitiveOperators", "suspiciousCode", "transitionalSuspiciousCodeWarnings", "undefinedNames", "undefinedVars", "underscore", "unknownDefines", - "unnecessaryCasts", + "untranspilableFeatures", "unusedLocalVariables", "unusedPrivateMembers", + "useOfGoogProvide", "uselessCode", "visibility", "with"); @@ -132,11 +137,6 @@ final class Diagnostics { static final ImmutableSet CLOSURE_LINTER_CHECKS = new ImmutableSet.Builder() .addAll(GOOGLE_LINTER_CHECKS) - .add(CheckJSDocStyle.MUST_BE_PRIVATE) - .add(CheckJSDocStyle.MUST_HAVE_TRAILING_UNDERSCORE) - .add(CheckMissingAndExtraRequires.MISSING_REQUIRE_FOR_GOOG_SCOPE) - .add(CheckMissingAndExtraRequires.MISSING_REQUIRE_STRICT_WARNING) - .add(CheckMissingAndExtraRequires.MISSING_REQUIRE_WARNING) .add(ClosureCheckModule.LET_GOOG_REQUIRE) .add(ClosureRewriteModule.USELESS_USE_STRICT_DIRECTIVE) .add(ImplicitNullabilityCheck.IMPLICITLY_NULLABLE_JSDOC) diff --git a/java/com/google/javascript/jscomp/JsChecker.java b/java/com/google/javascript/jscomp/JsChecker.java index 5470f8e7d5..7c3bd8b1a5 100644 --- a/java/com/google/javascript/jscomp/JsChecker.java +++ b/java/com/google/javascript/jscomp/JsChecker.java @@ -171,7 +171,7 @@ private boolean run() throws IOException { // configure compiler Compiler compiler = new Compiler(); CompilerOptions options = new CompilerOptions(); - options.setLanguage(LanguageMode.ECMASCRIPT_2017); + options.setLanguage(LanguageMode.STABLE); options.setStrictModeInput(true); options.setIncrementalChecks(IncrementalCheckMode.GENERATE_IJS); options.setCodingConvention(convention.convention); @@ -242,7 +242,7 @@ public CheckLevel level(JSError error) { } // Ignore linter warnings on generated sources. if (groupNames.contains("lintChecks") - && JsCheckerHelper.isGeneratedPath(error.sourceName)) { + && JsCheckerHelper.isGeneratedPath(error.getSourceName())) { return CheckLevel.OFF; } return null; @@ -334,7 +334,7 @@ public static final class Program implements CommandLineProgram { public Integer apply(Iterable args) { JsChecker checker = new JsChecker(); CmdLineParser parser = new CmdLineParser(checker); - parser.setUsageWidth(80); + parser.getProperties().withAtSyntax(false).withUsageWidth(80); try { parser.parseArgument(ImmutableList.copyOf(args)); } catch (CmdLineException e) { diff --git a/java/com/google/javascript/jscomp/JsCheckerClosureCodingConvention.java b/java/com/google/javascript/jscomp/JsCheckerClosureCodingConvention.java index 554e481954..52efc63d14 100644 --- a/java/com/google/javascript/jscomp/JsCheckerClosureCodingConvention.java +++ b/java/com/google/javascript/jscomp/JsCheckerClosureCodingConvention.java @@ -23,9 +23,4 @@ final class JsCheckerClosureCodingConvention extends CodingConventions.Proxy { JsCheckerClosureCodingConvention() { super(new ClosureCodingConvention()); } - - @Override - public boolean isPrivate(String name) { - return name.endsWith("_"); - } } diff --git a/java/com/google/javascript/jscomp/JsCheckerErrorFormatter.java b/java/com/google/javascript/jscomp/JsCheckerErrorFormatter.java index 4b6866d903..e7a6849035 100644 --- a/java/com/google/javascript/jscomp/JsCheckerErrorFormatter.java +++ b/java/com/google/javascript/jscomp/JsCheckerErrorFormatter.java @@ -65,8 +65,8 @@ public void setColorize(boolean colorize) { private String format(JSError error, boolean warning) { SourceExcerptProvider source = getSource(); - String sourceName = error.sourceName; - int lineNumber = error.lineNumber; + String sourceName = error.getSourceName(); + int lineNumber = error.getLineNumber(); int charno = error.getCharno(); // Format the non-reverse-mapped position. @@ -75,8 +75,10 @@ private String format(JSError error, boolean warning) { String nonMappedPosition = formatPosition(sourceName, lineNumber); // Check if we can reverse-map the source. - OriginalMapping mapping = source == null ? null : source.getSourceMapping( - error.sourceName, error.lineNumber, error.getCharno()); + OriginalMapping mapping = + source == null + ? null + : source.getSourceMapping(error.getSourceName(), error.getLineNumber(), error.getCharno()); if (mapping == null) { boldLine.append(nonMappedPosition); } else { @@ -96,7 +98,7 @@ private String format(JSError error, boolean warning) { boldLine.append(getLevelName(warning ? CheckLevel.WARNING : CheckLevel.ERROR)); boldLine.append(" - "); - boldLine.append(error.description); + boldLine.append(error.getDescription()); b.append(maybeEmbolden(boldLine.toString())); @@ -122,7 +124,7 @@ private String format(JSError error, boolean warning) { } // Help the user know how to suppress this warning. - String module = convertPathToModuleName(nullToEmpty(error.sourceName), roots).or(""); + String module = convertPathToModuleName(nullToEmpty(error.getSourceName()), roots).or(""); String label = labels.get(module); if (label == null) { if (colorize) { diff --git a/java/com/google/javascript/jscomp/JsCheckerHelper.java b/java/com/google/javascript/jscomp/JsCheckerHelper.java index 680d6ba19c..1f39f7144c 100644 --- a/java/com/google/javascript/jscomp/JsCheckerHelper.java +++ b/java/com/google/javascript/jscomp/JsCheckerHelper.java @@ -65,8 +65,8 @@ static ClosureJsLibrary loadClosureJsLibraryInfo(Path path) throws IOException { /** Returns {@code true} if error was produced by code generated by compiler passes. */ static boolean isInSyntheticCode(JSError error) { - return error.sourceName != null - && error.sourceName.startsWith(" [synthetic:"); + return error.getSourceName() != null + && error.getSourceName().startsWith(" [synthetic:"); } private JsCheckerHelper() {} diff --git a/java/com/google/javascript/jscomp/JsCheckerPassConfig.java b/java/com/google/javascript/jscomp/JsCheckerPassConfig.java index b4b4f1f50a..64bfc9e710 100644 --- a/java/com/google/javascript/jscomp/JsCheckerPassConfig.java +++ b/java/com/google/javascript/jscomp/JsCheckerPassConfig.java @@ -18,7 +18,7 @@ import com.google.common.collect.ImmutableList; import com.google.javascript.jscomp.NodeTraversal.Callback; -import com.google.javascript.jscomp.PassFactory.HotSwapPassFactory; +import com.google.javascript.jscomp.PassFactory; import com.google.javascript.jscomp.ijs.ConvertToTypedInterface; import com.google.javascript.jscomp.lint.CheckDuplicateCase; import com.google.javascript.jscomp.lint.CheckEmptyStatements; @@ -38,21 +38,24 @@ final class JsCheckerPassConfig extends PassConfig.PassConfigDelegate { private final JsCheckerState state; + private final ImmutableList checks; JsCheckerPassConfig(JsCheckerState state, CompilerOptions options) { super(new DefaultPassConfig(options)); this.state = state; + this.checks = + ImmutableList.of( + gatherModuleMetadataPass(), + earlyLintChecks(), + scopedAliases(), + closureRewriteClass(), + lateLintChecks(), + ijsGeneration()); } @Override protected List getChecks() { - return ImmutableList.of( - gatherModuleMetadataPass, - earlyLintChecks, - scopedAliases, - closureRewriteClass, - lateLintChecks, - ijsGeneration); + return checks; } @Override @@ -60,108 +63,87 @@ protected List getOptimizations() { return ImmutableList.of(); } - private final HotSwapPassFactory gatherModuleMetadataPass = - new HotSwapPassFactory("gather module metadata") { - @Override - protected HotSwapCompilerPass create(AbstractCompiler compiler) { - return new GatherModuleMetadata( - compiler, - compiler.getOptions().getProcessCommonJSModules(), - compiler.getOptions().getModuleResolutionMode()); - } - - @Override - protected FeatureSet featureSet() { - return FeatureSet.latest().withoutTypes(); - } - }; - - private final PassFactory earlyLintChecks = - new PassFactory("earlyLintChecks", true) { - @Override - protected CompilerPass create(AbstractCompiler compiler) { - return new CombinedCompilerPass( - compiler, - ImmutableList.of( - new CheckDuplicateCase(compiler), - new CheckEmptyStatements(compiler), - new CheckEnums(compiler), - new CheckJSDocStyle(compiler), - new CheckJSDoc(compiler), - new CheckMissingSemicolon(compiler), - new CheckSuper(compiler), - new CheckPrimitiveAsObject(compiler), - new CheckProvidesSorted(CheckProvidesSorted.Mode.COLLECT_AND_REPORT), - new CheckRequiresSorted(CheckRequiresSorted.Mode.COLLECT_AND_REPORT), - new CheckMissingAndExtraRequires( - compiler, CheckMissingAndExtraRequires.Mode.SINGLE_FILE), - new CheckUnusedLabels(compiler), - new CheckUselessBlocks(compiler), - new ClosureCheckModule(compiler, compiler.getModuleMetadataMap()), - new CheckSetTestOnly(state, compiler), - new CheckStrictDeps.FirstPass(state, compiler))); - } - - @Override - protected FeatureSet featureSet() { - return FeatureSet.latest().withoutTypes(); - } - }; - - private final PassFactory scopedAliases = - new PassFactory("scopedAliases", true) { - @Override - protected HotSwapCompilerPass create(AbstractCompiler compiler) { - return new ScopedAliases(compiler, null, options.getAliasTransformationHandler()); - } - - @Override - protected FeatureSet featureSet() { - return FeatureSet.latest().withoutTypes(); - } - }; - - private final PassFactory closureRewriteClass = - new PassFactory("closureRewriteClass", true) { - @Override - protected HotSwapCompilerPass create(AbstractCompiler compiler) { - return new ClosureRewriteClass(compiler); - } + private PassFactory gatherModuleMetadataPass() { + return PassFactory.builder() + .setName("gather module metadata") + .setInternalFactory( + (compiler) -> + new GatherModuleMetadata( + compiler, + compiler.getOptions().getProcessCommonJSModules(), + compiler.getOptions().getModuleResolutionMode())) + .setFeatureSet(FeatureSet.latest().withoutTypes()) + .build(); + } - @Override - protected FeatureSet featureSet() { - return FeatureSet.latest().withoutTypes(); - } - }; + private PassFactory earlyLintChecks() { + return PassFactory.builder() + .setName("earlyLintChecks") + .setInternalFactory( + (compiler) -> + new CombinedCompilerPass( + compiler, + ImmutableList.of( + new CheckDuplicateCase(compiler), + new CheckEmptyStatements(compiler), + new CheckEnums(compiler), + new CheckJSDocStyle(compiler), + new CheckJSDoc(compiler), + new CheckMissingSemicolon(compiler), + new CheckSuper(compiler), + new CheckPrimitiveAsObject(compiler), + new CheckProvidesSorted(CheckProvidesSorted.Mode.COLLECT_AND_REPORT), + new CheckRequiresSorted(CheckRequiresSorted.Mode.COLLECT_AND_REPORT), + new CheckUnusedLabels(compiler), + new CheckUselessBlocks(compiler), + new ClosureCheckModule(compiler, compiler.getModuleMetadataMap()), + new CheckSetTestOnly(state, compiler), + new CheckStrictDeps.FirstPass(state, compiler)))) + .setFeatureSet(FeatureSet.latest().withoutTypes()) + .build(); + } - private final PassFactory lateLintChecks = - new PassFactory("lateLintChecks", true) { - @Override - protected CompilerPass create(AbstractCompiler compiler) { - return new CombinedCompilerPass( - compiler, - ImmutableList.of( - new CheckInterfaces(compiler), - new CheckPrototypeProperties(compiler), - new CheckStrictDeps.SecondPass(state, compiler))); - } + private PassFactory scopedAliases() { + return PassFactory.builder() + .setName("scopedAliases") + .setInternalFactory( + (compiler) -> + new ScopedAliases( + compiler, + /*preprocessorSymbolTable=*/null, + compiler.getOptions().getAliasTransformationHandler())) + .setFeatureSet(FeatureSet.latest().withoutTypes()) + .build(); + } - @Override - protected FeatureSet featureSet() { - return FeatureSet.latest().withoutTypes(); - } - }; + private PassFactory closureRewriteClass() { + return PassFactory.builder() + .setName("closureRewriteClass") + .setInternalFactory((compiler) -> new ClosureRewriteClass(compiler)) + .setFeatureSet(FeatureSet.latest().withoutTypes()) + .build(); + } - private final PassFactory ijsGeneration = - new PassFactory("ijsGeneration", true) { - @Override - protected CompilerPass create(AbstractCompiler compiler) { - return new ConvertToTypedInterface(compiler); - } + private PassFactory lateLintChecks() { + return PassFactory.builder() + .setName("lateLintChecks") + .setInternalFactory( + (compiler) -> + new CombinedCompilerPass( + compiler, + ImmutableList.of( + new CheckInterfaces(compiler), + new CheckPrototypeProperties(compiler), + new CheckStrictDeps.SecondPass(state, compiler)))) + .setFeatureSet(FeatureSet.latest().withoutTypes()) + .build(); + } - @Override - protected FeatureSet featureSet() { - return FeatureSet.latest().withoutTypes(); - } - }; + private PassFactory ijsGeneration() { + return PassFactory.builder() + .setName("ijsGeneration") + .setInternalFactory((compiler) -> new ConvertToTypedInterface(compiler)) + .setFeatureSet(FeatureSet.latest().withoutTypes()) + .build(); + } } diff --git a/java/com/google/javascript/jscomp/JsCheckerState.java b/java/com/google/javascript/jscomp/JsCheckerState.java index 4b722517e7..45f35aa6de 100644 --- a/java/com/google/javascript/jscomp/JsCheckerState.java +++ b/java/com/google/javascript/jscomp/JsCheckerState.java @@ -45,10 +45,10 @@ final class JsCheckerState { // Set of namespaces provided by direct dependencies of this closure_js_library. // // The initial capacity of 9000 was chosen because nearly all closure_js_library rules will - // directly depend on //closure/library which has 4788 provides. This sets a very large lower - // bound for the size of this hash table. Since HashMap has a default load factor of 0.75, it - // would need to have a capacity of 6385 (4788/0.75+1) to store those namespaces without - // redimensioning. + // directly depend on @com_google_javascript_closure_library//closure/goog which has 4788 + // provides. This sets a very large lower bound for the size of this hash table. Since HashMap + // has a default load factor of 0.75, it would need to have a capacity of 6385 (4788/0.75+1) to + // store those namespaces without redimensioning. final Set provided = new HashSet<>(9000); // These are used to avoid flooding the user with certain types of error messages. diff --git a/java/com/google/javascript/jscomp/JsCompilerWarnings.java b/java/com/google/javascript/jscomp/JsCompilerWarnings.java index 2e2c60215c..d0041dea85 100644 --- a/java/com/google/javascript/jscomp/JsCompilerWarnings.java +++ b/java/com/google/javascript/jscomp/JsCompilerWarnings.java @@ -20,6 +20,7 @@ import static com.google.javascript.jscomp.JsCheckerHelper.isInSyntheticCode; import com.google.common.collect.Multimap; +import com.google.javascript.jscomp.base.Tri; import java.util.List; import java.util.Set; @@ -49,16 +50,12 @@ final class JsCompilerWarnings extends WarningsGuard { } @Override - protected boolean enables(DiagnosticGroup group) { - // Oh yes, we want all the wonderful checks the Closure Compiler performs. That is with the - // exception of the things JsChecker alone is responsible for checking. - return !Diagnostics.JSCHECKER_ONLY_GROUPS.contains(group); + public Tri mustRunChecks(DiagnosticGroup group) { + return Diagnostics.JSCHECKER_ONLY_GROUPS.contains(group) ? Tri.UNKNOWN : Tri.TRUE; } @Override public CheckLevel level(JSError error) { - CheckLevel level = CheckLevel.ERROR; - // Closure Rules will always ignore these checks no matter what. if (Diagnostics.IGNORE_ALWAYS.contains(error.getType())) { return CheckLevel.OFF; @@ -82,18 +79,24 @@ public CheckLevel level(JSError error) { } // Some errors are independent of code, e.g. flag misuse. - if (error.sourceName == null) { + if (error.getSourceName() == null) { return CheckLevel.ERROR; } + + // We provide an escape hatch for situations in which it's not possible (or too burdensome) to + // add a suppress code to the closure_js_library() rule responsible for the error. + if (globalSuppressions.contains(error.getType())) { + return CheckLevel.OFF; + } - for (String module : convertPathToModuleName(error.sourceName, roots).asSet()) { + for (String module : convertPathToModuleName(error.getSourceName(), roots).asSet()) { if (legacyModules.contains(module)) { // Ignore it entirely if it's very noisy. if (Diagnostics.IGNORE_FOR_LEGACY.contains(error.getType())) { return CheckLevel.OFF; } // Otherwise downgrade to a warning, since it's not easily actionable. - level = CheckLevel.WARNING; + return CheckLevel.WARNING; } else if (suppressions.containsEntry(module, error.getType())) { // If a closure_js_library() defined this source file, then check if that library rule // defined a suppress code to make this error go away. @@ -101,13 +104,19 @@ public CheckLevel level(JSError error) { } } - // We provide an escape hatch for situations in which it's not possible (or too burdensome) to - // add a suppress code to the closure_js_library() rule responsible for the error. - if (globalSuppressions.contains(error.getType())) { - return CheckLevel.OFF; - } + switch (error.getDefaultLevel()) { + case OFF: + /** + * Treat any user invisible diagnostics as safe by default. + * + *

This lets new diagnostics be added to JSCompiler without immediately being errors, + * whcih is useful for staged rollouts. + */ + return CheckLevel.OFF; - // Otherwise we'll be cautious and just assume it's bad. - return level; + default: + // Treat any user visible diagnostic as an error by default. + return CheckLevel.ERROR; + } } } diff --git a/java/io/bazel/rules/closure/BUILD b/java/io/bazel/rules/closure/BUILD index acf13f22d9..14e0ed96c0 100644 --- a/java/io/bazel/rules/closure/BUILD +++ b/java/io/bazel/rules/closure/BUILD @@ -14,6 +14,9 @@ licenses(["notice"]) # Apache 2.0 +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@rules_java//java:defs.bzl", "java_binary", "java_library", "java_proto_library") + java_binary( name = "ClosureWorker", srcs = ["ClosureWorker.java"], diff --git a/java/io/bazel/rules/closure/build_info.proto b/java/io/bazel/rules/closure/build_info.proto index 237a167ceb..6b27a33aed 100644 --- a/java/io/bazel/rules/closure/build_info.proto +++ b/java/io/bazel/rules/closure/build_info.proto @@ -26,7 +26,7 @@ option java_package = "io.bazel.rules.closure"; message ClosureJsLibrary { // Canonical build target for this rule, - // e.g. @io_bazel_rules_closure//closure/library + // e.g. @com_google_javascript_closure_library//closure/goog string label = 1; // Indicates if this proto was outputted by a legacy rule, e.g. js_library. diff --git a/java/io/bazel/rules/closure/http/BUILD b/java/io/bazel/rules/closure/http/BUILD index 172d9c0cd0..173c5e3231 100644 --- a/java/io/bazel/rules/closure/http/BUILD +++ b/java/io/bazel/rules/closure/http/BUILD @@ -14,6 +14,8 @@ licenses(["notice"]) # Apache 2.0 +load("@rules_java//java:defs.bzl", "java_library") + java_library( name = "http", srcs = glob(["*.java"]), diff --git a/java/io/bazel/rules/closure/http/filter/BUILD b/java/io/bazel/rules/closure/http/filter/BUILD index 63640af5e1..a214eb6cc8 100644 --- a/java/io/bazel/rules/closure/http/filter/BUILD +++ b/java/io/bazel/rules/closure/http/filter/BUILD @@ -14,6 +14,8 @@ licenses(["notice"]) # Apache 2.0 +load("@rules_java//java:defs.bzl", "java_library") + java_library( name = "filter", srcs = glob(["*.java"]), diff --git a/java/io/bazel/rules/closure/webfiles/BUILD b/java/io/bazel/rules/closure/webfiles/BUILD index 632f4982ce..81be71046b 100644 --- a/java/io/bazel/rules/closure/webfiles/BUILD +++ b/java/io/bazel/rules/closure/webfiles/BUILD @@ -14,6 +14,9 @@ licenses(["notice"]) # Apache 2.0 +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@rules_java//java:defs.bzl", "java_library", "java_proto_library") + java_library( name = "webfiles", srcs = glob(["*.java"]), diff --git a/java/io/bazel/rules/closure/webfiles/build_info.proto b/java/io/bazel/rules/closure/webfiles/build_info.proto index 6d1895bf84..06264b8028 100644 --- a/java/io/bazel/rules/closure/webfiles/build_info.proto +++ b/java/io/bazel/rules/closure/webfiles/build_info.proto @@ -33,7 +33,7 @@ option java_package = "io.bazel.rules.closure.webfiles"; message WebfileManifestInfo { // Canonical build target for this rule, - // e.g. @io_bazel_rules_closure//closure/library + // e.g. @com_google_javascript_closure_library//closure/goog string label = 1; // Map of files outputted by this build rule target in deterministic reverse @@ -108,7 +108,7 @@ message WebfileInfo { message WebRuleInfo { // Canonical build target for this rule, - // e.g. @io_bazel_rules_closure//closure/library + // e.g. @com_google_javascript_closure_library//closure/goog string label = 1; // Path of output.pb file to which WebfileManifestInfo is written. This field @@ -158,7 +158,7 @@ message MultimapInfo { message Webfiles { // Canonical build target for this rule, - // e.g. @io_bazel_rules_closure//closure/library + // e.g. @com_google_javascript_closure_library//closure/goog string label = 1; // List of srcs associated with webfiles() target. diff --git a/java/io/bazel/rules/closure/webfiles/compiler/BUILD b/java/io/bazel/rules/closure/webfiles/compiler/BUILD index a71eaa2912..19f26e9c8a 100644 --- a/java/io/bazel/rules/closure/webfiles/compiler/BUILD +++ b/java/io/bazel/rules/closure/webfiles/compiler/BUILD @@ -14,6 +14,8 @@ licenses(["notice"]) # Apache 2.0 +load("@rules_java//java:defs.bzl", "java_library") + java_library( name = "compiler", srcs = glob(["*.java"]), diff --git a/java/io/bazel/rules/closure/webfiles/server/BUILD b/java/io/bazel/rules/closure/webfiles/server/BUILD index d1ee4afbcb..0114249821 100644 --- a/java/io/bazel/rules/closure/webfiles/server/BUILD +++ b/java/io/bazel/rules/closure/webfiles/server/BUILD @@ -12,10 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -load("//closure:defs.bzl", "closure_java_template_library") - licenses(["notice"]) # Apache 2.0 +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@rules_java//java:defs.bzl", "java_binary", "java_library", "java_proto_library") +load("//closure:defs.bzl", "closure_java_template_library") + java_library( name = "server", srcs = glob(["*.java"]), diff --git a/java/io/bazel/rules/closure/webfiles/server/FileServer.java b/java/io/bazel/rules/closure/webfiles/server/FileServer.java index c26f9ecfc6..e8d69a2d8d 100644 --- a/java/io/bazel/rules/closure/webfiles/server/FileServer.java +++ b/java/io/bazel/rules/closure/webfiles/server/FileServer.java @@ -82,6 +82,7 @@ class FileServer { .put("ttf", MediaType.SFNT) .put("txt", MediaType.PLAIN_TEXT_UTF_8) .put("vcard", MediaType.VCARD_UTF_8) + .put("wasm", MediaType.WASM_APPLICATION) .put("webm", MediaType.WEBM_VIDEO) .put("webmanifest", MediaType.MANIFEST_JSON_UTF_8) .put("webp", MediaType.WEBP) diff --git a/java/io/bazel/rules/closure/webfiles/server/listing.soy b/java/io/bazel/rules/closure/webfiles/server/listing.soy index 3e3ec34ceb..8f654edc08 100644 --- a/java/io/bazel/rules/closure/webfiles/server/listing.soy +++ b/java/io/bazel/rules/closure/webfiles/server/listing.soy @@ -18,7 +18,7 @@ /** * Displays page listing paths in transitive closure. */ -{template .listing} +{template listing} {@param label: string} {@param paths: list} diff --git a/java/io/bazel/rules/closure/worker/BUILD b/java/io/bazel/rules/closure/worker/BUILD index 2af11400fb..e0957f8be8 100644 --- a/java/io/bazel/rules/closure/worker/BUILD +++ b/java/io/bazel/rules/closure/worker/BUILD @@ -14,6 +14,9 @@ licenses(["notice"]) # Apache 2.0 +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@rules_java//java:defs.bzl", "java_library", "java_proto_library") + java_library( name = "worker", srcs = glob(["*.java"]), diff --git a/java/org/jsoup/nodes/BUILD b/java/org/jsoup/nodes/BUILD index f4f00e3543..79274beffe 100644 --- a/java/org/jsoup/nodes/BUILD +++ b/java/org/jsoup/nodes/BUILD @@ -14,6 +14,8 @@ licenses(["notice"]) # Apache 2.0 +load("@rules_java//java:defs.bzl", "java_library") + java_library( name = "nodes", srcs = ["Html5Printer.java"], diff --git a/javatests/com/google/javascript/jscomp/BUILD b/javatests/com/google/javascript/jscomp/BUILD index bbc0fa5487..7f5c59d340 100644 --- a/javatests/com/google/javascript/jscomp/BUILD +++ b/javatests/com/google/javascript/jscomp/BUILD @@ -14,6 +14,8 @@ licenses(["notice"]) # Apache 2.0 +load("@rules_java//java:defs.bzl", "java_test") + java_test( name = "DiagnosticsTest", size = "small", diff --git a/javatests/io/bazel/rules/closure/BUILD b/javatests/io/bazel/rules/closure/BUILD index e2c8c53676..a27386c8de 100644 --- a/javatests/io/bazel/rules/closure/BUILD +++ b/javatests/io/bazel/rules/closure/BUILD @@ -14,6 +14,8 @@ licenses(["notice"]) # Apache 2.0 +load("@rules_java//java:defs.bzl", "java_test") + java_test( name = "TarjanTest", size = "small", diff --git a/javatests/io/bazel/rules/closure/http/BUILD b/javatests/io/bazel/rules/closure/http/BUILD index d4825c0994..2630b4f7b1 100644 --- a/javatests/io/bazel/rules/closure/http/BUILD +++ b/javatests/io/bazel/rules/closure/http/BUILD @@ -14,6 +14,8 @@ licenses(["notice"]) # Apache 2.0 +load("@rules_java//java:defs.bzl", "java_test") + java_test( name = "HttpTestSuite", size = "small", diff --git a/javatests/io/bazel/rules/closure/http/filter/BUILD b/javatests/io/bazel/rules/closure/http/filter/BUILD index 35c1090d83..73a73cf61b 100644 --- a/javatests/io/bazel/rules/closure/http/filter/BUILD +++ b/javatests/io/bazel/rules/closure/http/filter/BUILD @@ -14,6 +14,8 @@ licenses(["notice"]) # Apache 2.0 +load("@rules_java//java:defs.bzl", "java_test") + java_test( name = "FilterTestSuite", size = "small", diff --git a/javatests/io/bazel/rules/closure/webfiles/BUILD b/javatests/io/bazel/rules/closure/webfiles/BUILD index dbbed60a56..436b30f0db 100644 --- a/javatests/io/bazel/rules/closure/webfiles/BUILD +++ b/javatests/io/bazel/rules/closure/webfiles/BUILD @@ -14,6 +14,8 @@ licenses(["notice"]) # Apache 2.0 +load("@rules_java//java:defs.bzl", "java_test") + java_test( name = "WebfilesTestSuite", size = "small", diff --git a/javatests/io/bazel/rules/closure/webfiles/WebfilesValidatorProgramTest.java b/javatests/io/bazel/rules/closure/webfiles/WebfilesValidatorProgramTest.java index 9683c1b2b4..e22afc7759 100644 --- a/javatests/io/bazel/rules/closure/webfiles/WebfilesValidatorProgramTest.java +++ b/javatests/io/bazel/rules/closure/webfiles/WebfilesValidatorProgramTest.java @@ -17,9 +17,9 @@ import static com.google.common.truth.Truth.assertThat; import static java.nio.charset.StandardCharsets.UTF_8; import static org.mockito.ArgumentMatchers.any; -import static org.mockito.Matchers.contains; -import static org.mockito.Matchers.eq; -import static org.mockito.Matchers.matches; +import static org.mockito.ArgumentMatchers.contains; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.ArgumentMatchers.matches; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyNoMoreInteractions; @@ -129,4 +129,4 @@ private void save(Path path, String contents) throws IOException { Files.createDirectories(path.getParent()); Files.write(path, contents.getBytes(UTF_8)); } -} \ No newline at end of file +} diff --git a/javatests/io/bazel/rules/closure/webfiles/server/BUILD b/javatests/io/bazel/rules/closure/webfiles/server/BUILD index 66adf0f499..4b4e2005b0 100644 --- a/javatests/io/bazel/rules/closure/webfiles/server/BUILD +++ b/javatests/io/bazel/rules/closure/webfiles/server/BUILD @@ -14,6 +14,8 @@ licenses(["notice"]) # Apache 2.0 +load("@rules_java//java:defs.bzl", "java_test") + java_test( name = "ServerTestSuite", size = "small", diff --git a/javatests/io/bazel/rules/closure/webfiles/server/WebfilesHandlerTest.java b/javatests/io/bazel/rules/closure/webfiles/server/WebfilesHandlerTest.java index 817fe24205..ed6c9001e5 100644 --- a/javatests/io/bazel/rules/closure/webfiles/server/WebfilesHandlerTest.java +++ b/javatests/io/bazel/rules/closure/webfiles/server/WebfilesHandlerTest.java @@ -15,7 +15,7 @@ package io.bazel.rules.closure.webfiles.server; import static com.google.common.truth.Truth.assertThat; -import static org.mockito.Matchers.eq; +import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyNoMoreInteractions; diff --git a/javatests/io/bazel/rules/closure/worker/BUILD b/javatests/io/bazel/rules/closure/worker/BUILD index 0c3e5704d5..4bb762d553 100644 --- a/javatests/io/bazel/rules/closure/worker/BUILD +++ b/javatests/io/bazel/rules/closure/worker/BUILD @@ -14,6 +14,8 @@ licenses(["notice"]) # Apache 2.0 +load("@rules_java//java:defs.bzl", "java_test") + java_test( name = "WorkerTestSuite", size = "small", diff --git a/javatests/io/bazel/rules/closure/worker/testing/BUILD b/javatests/io/bazel/rules/closure/worker/testing/BUILD index b6abe7bc4e..f5c28abcf0 100644 --- a/javatests/io/bazel/rules/closure/worker/testing/BUILD +++ b/javatests/io/bazel/rules/closure/worker/testing/BUILD @@ -14,6 +14,8 @@ licenses(["notice"]) # Apache 2.0 +load("@rules_java//java:defs.bzl", "java_library") + java_library( name = "testing", testonly = 1, diff --git a/javatests/io/bazel/rules/closure/worker/testing/ProgramResult.java b/javatests/io/bazel/rules/closure/worker/testing/ProgramResult.java index 6f9e1cc34a..f74ae8004a 100644 --- a/javatests/io/bazel/rules/closure/worker/testing/ProgramResult.java +++ b/javatests/io/bazel/rules/closure/worker/testing/ProgramResult.java @@ -100,7 +100,7 @@ public WarningsChain withErrors(String... warnings) { checkArgument(warnings.length > 0); check("warnings()") .that(actual.warnings()) - .containsExactly(Arrays.asList(warnings)) + .containsExactlyElementsIn(warnings) .inOrder(); return this; } @@ -115,7 +115,7 @@ public void withWarnings(String... warnings) { checkArgument(warnings.length > 0); check("warnings()") .that(actual.warnings()) - .containsExactly(Arrays.asList(warnings)) + .containsExactlyElementsIn(warnings) .inOrder(); } } diff --git a/javatests/org/jsoup/nodes/BUILD b/javatests/org/jsoup/nodes/BUILD index b81f22144b..03904a91d8 100644 --- a/javatests/org/jsoup/nodes/BUILD +++ b/javatests/org/jsoup/nodes/BUILD @@ -14,6 +14,8 @@ licenses(["notice"]) # Apache 2.0 +load("@rules_java//java:defs.bzl", "java_test") + java_test( name = "Html5PrinterTest", size = "small", diff --git a/third_party/closure/library/BUILD b/third_party/closure/library/BUILD deleted file mode 100644 index c685c207b6..0000000000 --- a/third_party/closure/library/BUILD +++ /dev/null @@ -1,31 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - "//third_party/closure/library/dojo/dom:all_js", - "//third_party/closure/library/loremipsum/text:all_js", - "//third_party/closure/library/mochikit/async:all_js", - "//third_party/closure/library/svgpan:all_js", - ], -) - -closure_js_library( - name = "base", - srcs = ["@com_google_javascript_closure_library//:third_party/closure/goog/base.js"], - lenient = True, - no_closure_library = True, -) - -closure_js_library( - name = "deps", - srcs = ["@com_google_javascript_closure_library//:third_party/closure/goog/deps.js"], - lenient = True, - no_closure_library = True, -) diff --git a/third_party/closure/library/dojo/dom/BUILD b/third_party/closure/library/dojo/dom/BUILD deleted file mode 100644 index f605879c67..0000000000 --- a/third_party/closure/library/dojo/dom/BUILD +++ /dev/null @@ -1,25 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [":query"], -) - -closure_js_library( - name = "query", - srcs = ["@com_google_javascript_closure_library//:third_party/closure/goog/dojo/dom/query.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/dom", - "//closure/library/functions", - "//closure/library/string", - "//closure/library/useragent", - ], -) diff --git a/third_party/closure/library/loremipsum/text/BUILD b/third_party/closure/library/loremipsum/text/BUILD deleted file mode 100644 index 8847311013..0000000000 --- a/third_party/closure/library/loremipsum/text/BUILD +++ /dev/null @@ -1,25 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [":loremipsum"], -) - -closure_js_library( - name = "loremipsum", - srcs = ["@com_google_javascript_closure_library//:third_party/closure/goog/loremipsum/text/loremipsum.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/math", - "//closure/library/string", - "//closure/library/structs:map", - "//closure/library/structs:set", - ], -) diff --git a/third_party/closure/library/mochikit/async/BUILD b/third_party/closure/library/mochikit/async/BUILD deleted file mode 100644 index 3563bf7565..0000000000 --- a/third_party/closure/library/mochikit/async/BUILD +++ /dev/null @@ -1,35 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [ - ":deferred", - ":deferredlist", - ], -) - -closure_js_library( - name = "deferred", - srcs = ["@com_google_javascript_closure_library//:third_party/closure/goog/mochikit/async/deferred.js"], - lenient = True, - deps = [ - "//closure/library/array", - "//closure/library/asserts", - "//closure/library/debug:error", - "//closure/library/promise", - "//closure/library/promise:thenable", - ], -) - -closure_js_library( - name = "deferredlist", - srcs = ["@com_google_javascript_closure_library//:third_party/closure/goog/mochikit/async/deferredlist.js"], - lenient = True, - deps = ["//third_party/closure/library/mochikit/async:deferred"], -) diff --git a/third_party/closure/library/svgpan/BUILD b/third_party/closure/library/svgpan/BUILD deleted file mode 100644 index 98807da40e..0000000000 --- a/third_party/closure/library/svgpan/BUILD +++ /dev/null @@ -1,24 +0,0 @@ -# DO NOT EDIT -- bazel run //closure/library:regenerate -- "$PWD" - -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -load("//closure:defs.bzl", "closure_js_library") - -closure_js_library( - name = "all_js", - exports = [":svgpan"], -) - -closure_js_library( - name = "svgpan", - srcs = ["@com_google_javascript_closure_library//:third_party/closure/goog/svgpan/svgpan.js"], - lenient = True, - deps = [ - "//closure/library/disposable", - "//closure/library/events", - "//closure/library/events:eventtype", - "//closure/library/events:mousewheelhandler", - ], -) diff --git a/third_party/zlib.BUILD b/third_party/zlib.BUILD deleted file mode 100644 index f948117417..0000000000 --- a/third_party/zlib.BUILD +++ /dev/null @@ -1,60 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) # BSD/MIT-like license (for zlib) - -_ZLIB_HEADERS = [ - "crc32.h", - "deflate.h", - "gzguts.h", - "inffast.h", - "inffixed.h", - "inflate.h", - "inftrees.h", - "trees.h", - "zconf.h", - "zlib.h", - "zutil.h", -] - -_ZLIB_PREFIXED_HEADERS = ["zlib/include/" + hdr for hdr in _ZLIB_HEADERS] - -# In order to limit the damage from the `includes` propagation -# via `:zlib`, copy the public headers to a subdirectory and -# expose those. -genrule( - name = "copy_public_headers", - srcs = _ZLIB_HEADERS, - outs = _ZLIB_PREFIXED_HEADERS, - cmd = "cp $(SRCS) $(@D)/zlib/include/", - visibility = ["//visibility:private"], -) - -cc_library( - name = "zlib", - srcs = [ - "adler32.c", - "compress.c", - "crc32.c", - "deflate.c", - "gzclose.c", - "gzlib.c", - "gzread.c", - "gzwrite.c", - "infback.c", - "inffast.c", - "inflate.c", - "inftrees.c", - "trees.c", - "uncompr.c", - "zutil.c", - # Include the un-prefixed headers in srcs to work - # around the fact that zlib isn't consistent in its - # choice of <> or "" delimiter when including itself. - ] + _ZLIB_HEADERS, - hdrs = _ZLIB_PREFIXED_HEADERS, - copts = [ - "-Wno-unused-variable", - "-Wno-implicit-function-declaration", - ], - includes = ["zlib/include/"], -)