style: enforce buildifier lint on CI (#28186)

PR Close #28186
This commit is contained in:
Wassim Chegham 2019-02-26 13:30:44 +01:00 committed by Ben Lesh
parent ce68b4d839
commit dad5a258b8
33 changed files with 60 additions and 111 deletions

View File

@ -2,7 +2,6 @@ load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary")
package(default_visibility = ["//visibility:public"]) package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_nodejs//:defs.bzl", "node_modules_filegroup")
load("//tools:defaults.bzl", "karma_web_test") load("//tools:defaults.bzl", "karma_web_test")
exports_files([ exports_files([

View File

@ -35,7 +35,8 @@ load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_reposi
# Bazel version must be at least v0.21.0 because: # Bazel version must be at least v0.21.0 because:
# - 0.21.0 Using --incompatible_strict_action_env flag fixes cache when running `yarn bazel` # - 0.21.0 Using --incompatible_strict_action_env flag fixes cache when running `yarn bazel`
# (see https://github.com/angular/angular/issues/27514#issuecomment-451438271) # (see https://github.com/angular/angular/issues/27514#issuecomment-451438271)
check_bazel_version("0.21.0", """ check_bazel_version(
message = """
You no longer need to install Bazel on your machine. You no longer need to install Bazel on your machine.
Angular has a dependency on the @bazel/bazel package which supplies it. Angular has a dependency on the @bazel/bazel package which supplies it.
Try running `yarn bazel` instead. Try running `yarn bazel` instead.

View File

@ -23,13 +23,16 @@ load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_reposi
# Bazel version must be at least v0.21.0 because: # Bazel version must be at least v0.21.0 because:
# - 0.21.0 Using --incompatible_strict_action_env flag fixes cache when running `yarn bazel` # - 0.21.0 Using --incompatible_strict_action_env flag fixes cache when running `yarn bazel`
# (see https://github.com/angular/angular/issues/27514#issuecomment-451438271) # (see https://github.com/angular/angular/issues/27514#issuecomment-451438271)
check_bazel_version("0.21.0", """ check_bazel_version(
message = """
You no longer need to install Bazel on your machine. You no longer need to install Bazel on your machine.
Angular has a dependency on the @bazel/bazel package which supplies it. Angular has a dependency on the @bazel/bazel package which supplies it.
Try running `yarn bazel` instead. Try running `yarn bazel` instead.
(If you did run that, check that you've got a fresh `yarn install`) (If you did run that, check that you've got a fresh `yarn install`)
""") """,
minimum_bazel_version = "0.21.0",
)
# Setup the Node.js toolchain # Setup the Node.js toolchain
node_repositories( node_repositories(

View File

@ -1,12 +1,10 @@
package(default_visibility = ["//visibility:public"]) package(default_visibility = ["//visibility:public"])
load("@npm_angular_bazel//:index.bzl", "ng_module") load("@npm_angular_bazel//:index.bzl", "ng_module")
load("@build_bazel_rules_nodejs//:defs.bzl", "http_server", "nodejs_binary", "rollup_bundle") load("@build_bazel_rules_nodejs//:defs.bzl", "http_server", "rollup_bundle")
load("@build_bazel_rules_nodejs//internal/web_package:web_package.bzl", "web_package") load("@build_bazel_rules_nodejs//internal/web_package:web_package.bzl", "web_package")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver") load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
package(default_visibility = ["//visibility:public"])
# Allow targets under sub-packages to reference the tsconfig.json file # Allow targets under sub-packages to reference the tsconfig.json file
exports_files(["tsconfig.json"]) exports_files(["tsconfig.json"])

View File

@ -5,8 +5,6 @@ load("@npm_bazel_typescript//:defs.bzl", "ts_library")
load("@io_bazel_rules_sass//sass:sass.bzl", "sass_binary") load("@io_bazel_rules_sass//sass:sass.bzl", "sass_binary")
load("@npm_angular_bazel//:index.bzl", "ng_module", "ng_package") load("@npm_angular_bazel//:index.bzl", "ng_module", "ng_package")
package(default_visibility = ["//visibility:public"])
sass_binary( sass_binary(
name = "hello-world-styles", name = "hello-world-styles",
src = "hello-world.component.scss", src = "hello-world.component.scss",

View File

@ -1,4 +1,3 @@
load("//tools:defaults.bzl", "ts_library")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver") load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test") load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")

View File

@ -4,8 +4,6 @@ load("//tools:defaults.bzl", "ng_module", "ng_rollup_bundle")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver") load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test") load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
package(default_visibility = ["//visibility:public"])
ng_module( ng_module(
name = "largetable_lib", name = "largetable_lib",
srcs = glob(["**/*.ts"]), srcs = glob(["**/*.ts"]),

View File

@ -4,8 +4,6 @@ load("//tools:defaults.bzl", "ng_module", "ng_rollup_bundle")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver") load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test") load("//modules/benchmarks:benchmark_test.bzl", "benchmark_test")
package(default_visibility = ["//visibility:public"])
ng_module( ng_module(
name = "tree_lib", name = "tree_lib",
srcs = glob(["**/*.ts"]), srcs = glob(["**/*.ts"]),

View File

@ -6,7 +6,7 @@ package(default_visibility = ["//modules/playground:__subpackages__"])
ng_module( ng_module(
name = "zippy_component", name = "zippy_component",
srcs = glob(["**/*.ts"]), srcs = glob(["**/*.ts"]),
assets = glob(["app/zippy.html"]), assets = ["app/zippy.html"],
tsconfig = "//modules/playground:tsconfig-build.json", tsconfig = "//modules/playground:tsconfig-build.json",
# TODO: FW-1004 Type checking is currently not complete. # TODO: FW-1004 Type checking is currently not complete.
type_check = False, type_check = False,

View File

@ -16,7 +16,7 @@
"url": "https://github.com/angular/angular.git" "url": "https://github.com/angular/angular.git"
}, },
"scripts": { "scripts": {
"bazel:format": "find . -type f \\( -name \"*.bzl\" -or -name WORKSPACE -or -name BUILD -or -name BUILD.bazel \\) ! -path \"*/node_modules/*\" | xargs buildifier -v --warnings=args-order,attr-cfg,attr-license,attr-non-empty,attr-output-default,attr-single-file,constant-glob,ctx-args,depset-iteration,depset-union,dict-concatenation,duplicated-name,filetype,git-repository,http-archive,integer-division,load,load-on-top,native-build,native-package,out-of-order-load,output-group,package-name,package-on-top,positional-args,redefined-variable,repository-name,same-origin-load,string-iteration,unsorted-dict-items,unused-variable", "bazel:format": "find . -type f \\( -name \"*.bzl\" -or -name WORKSPACE -or -name BUILD -or -name BUILD.bazel \\) ! -path \"*/node_modules/*\" | xargs buildifier -v --warnings=args-order,attr-cfg,attr-license,attr-non-empty,attr-output-default,attr-single-file,constant-glob,ctx-args,depset-iteration,depset-union,dict-concatenation,duplicated-name,filetype,git-repository,http-archive,integer-division,load,load-on-top,native-build,native-package,output-group,package-name,package-on-top,positional-args,redefined-variable,repository-name,same-origin-load,string-iteration,unused-variable",
"bazel:lint": "yarn bazel:format --lint=warn", "bazel:lint": "yarn bazel:format --lint=warn",
"bazel:lint-fix": "yarn bazel:format --lint=fix", "bazel:lint-fix": "yarn bazel:format --lint=fix",
"preinstall": "node tools/yarn/check-yarn.js", "preinstall": "node tools/yarn/check-yarn.js",

View File

@ -1,5 +1,3 @@
load("//tools:defaults.bzl", "ts_library")
package(default_visibility = ["//visibility:public"]) package(default_visibility = ["//visibility:public"])
exports_files([ exports_files([

View File

@ -8,6 +8,8 @@ filegroup(
# For generating skydoc # For generating skydoc
exports_files(glob(["*.bzl"])) exports_files(glob(["*.bzl"]))
load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary")
nodejs_binary( nodejs_binary(
name = "rollup_with_build_optimizer", name = "rollup_with_build_optimizer",
data = [ data = [

View File

@ -170,11 +170,6 @@ esm5_outputs_aspect = aspect(
executable = True, executable = True,
cfg = "host", cfg = "host",
), ),
"_tsc_wrapped": attr.label(
default = Label("@build_bazel_rules_typescript//:@bazel/typescript/tsc_wrapped"),
executable = True,
cfg = "host",
),
}, },
) )

View File

@ -244,8 +244,6 @@ def _expected_outs(ctx):
# TODO(alxhub): i18n is only produced by the legacy compiler currently. This should be re-enabled # TODO(alxhub): i18n is only produced by the legacy compiler currently. This should be re-enabled
# when ngtsc can extract messages # when ngtsc can extract messages
if is_legacy_ngc: if is_legacy_ngc:
# TODO(manekinekko): due to bazelbuild/bazel#4858 we cannot fix the call to ctx.new_file(genfiles_dir)
# so the rule is turned off for now.
i18n_messages_files = [ctx.new_file(ctx.genfiles_dir, ctx.label.name + "_ngc_messages.xmb")] i18n_messages_files = [ctx.new_file(ctx.genfiles_dir, ctx.label.name + "_ngc_messages.xmb")]
else: else:
i18n_messages_files = [] i18n_messages_files = []
@ -270,9 +268,9 @@ def _ngc_tsconfig(ctx, files, srcs, **kwargs):
expected_outs = outs.closure_js expected_outs = outs.closure_js
angular_compiler_options = { angular_compiler_options = {
"allowEmptyCodegenFiles": True,
"enableIvy": _enable_ivy_value(ctx),
"enableResourceInlining": ctx.attr.inline_resources, "enableResourceInlining": ctx.attr.inline_resources,
"generateCodeForLibraries": False,
"allowEmptyCodegenFiles": True,
# Summaries are only enabled if Angular outputs are to be produced. # Summaries are only enabled if Angular outputs are to be produced.
"enableSummariesForJit": is_legacy_ngc, "enableSummariesForJit": is_legacy_ngc,
"enableIvy": _enable_ivy_value(ctx), "enableIvy": _enable_ivy_value(ctx),
@ -539,8 +537,8 @@ def ng_module_impl(ctx, ts_compile_actions):
if is_legacy_ngc: if is_legacy_ngc:
providers["angular"] = { providers["angular"] = {
"metadata": outs.metadata,
"summaries": outs.summaries, "summaries": outs.summaries,
"metadata": outs.metadata,
} }
providers["ngc_messages"] = outs.i18n_messages providers["ngc_messages"] = outs.i18n_messages
@ -570,6 +568,13 @@ local_deps_aspects = [collect_node_modules_aspect, _collect_summaries_aspect]
NG_MODULE_ATTRIBUTES = { NG_MODULE_ATTRIBUTES = {
"srcs": attr.label_list(allow_files = [".ts"]), "srcs": attr.label_list(allow_files = [".ts"]),
# Note: DEPS_ASPECTS is already a list, we add the cast to workaround
# https://github.com/bazelbuild/skydoc/issues/21
"deps": attr.label_list(
doc = "Targets that are imported by this target",
aspects = local_deps_aspects,
),
"assets": attr.label_list( "assets": attr.label_list(
doc = ".html and .css files needed by the Angular compiler", doc = ".html and .css files needed by the Angular compiler",
allow_files = [ allow_files = [
@ -578,6 +583,14 @@ NG_MODULE_ATTRIBUTES = {
".html", ".html",
], ],
), ),
"factories": attr.label_list(
allow_files = [".ts", ".html"],
mandatory = False,
),
"filter_summaries": attr.bool(default = False),
"type_check": attr.bool(default = True),
"inline_resources": attr.bool(default = True),
"no_i18n": attr.bool(default = False),
"compiler": attr.label( "compiler": attr.label(
doc = """Sets a different ngc compiler binary to use for this library. doc = """Sets a different ngc compiler binary to use for this library.
@ -592,40 +605,16 @@ NG_MODULE_ATTRIBUTES = {
executable = True, executable = True,
cfg = "host", cfg = "host",
), ),
"factories": attr.label_list(
allow_files = [".ts", ".html"],
mandatory = False,
),
"filter_summaries": attr.bool(default = False),
"inline_resources": attr.bool(default = True),
"ng_xi18n": attr.label( "ng_xi18n": attr.label(
default = Label(DEFAULT_NG_XI18N), default = Label(DEFAULT_NG_XI18N),
executable = True, executable = True,
cfg = "host", cfg = "host",
), ),
"no_i18n": attr.bool(default = False),
"type_check": attr.bool(default = True),
# Note: DEPS_ASPECTS is already a list, we add the cast to workaround
# https://github.com/bazelbuild/skydoc/issues/21
"deps": attr.label_list(
doc = "Targets that are imported by this target",
aspects = local_deps_aspects,
),
"_supports_workers": attr.bool(default = True), "_supports_workers": attr.bool(default = True),
} }
NG_MODULE_RULE_ATTRS = dict(dict(COMMON_ATTRIBUTES, **NG_MODULE_ATTRIBUTES), **{ NG_MODULE_RULE_ATTRS = dict(dict(COMMON_ATTRIBUTES, **NG_MODULE_ATTRIBUTES), **{
"entry_point": attr.string(), "tsconfig": attr.label(allow_single_file = True),
# Default is %{name}_public_index
# The suffix points to the generated "bundle index" files that users import from
# The default is intended to avoid collisions with the users input files.
# Later packaging rules will point to these generated files as the entry point
# into the package.
# See the flatModuleOutFile documentation in
# https://github.com/angular/angular/blob/master/packages/compiler-cli/src/transformers/api.ts
"flat_module_out_file": attr.string(),
"node_modules": attr.label( "node_modules": attr.label(
doc = """The npm packages which should be available during the compile. doc = """The npm packages which should be available during the compile.

View File

@ -1,3 +1,5 @@
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary") load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary")
# BEGIN-DEV-ONLY # BEGIN-DEV-ONLY

View File

@ -16,12 +16,6 @@ specification of this format at https://goo.gl/jB3GVv
load("@build_bazel_rules_nodejs//internal/common:collect_es6_sources.bzl", "collect_es6_sources") load("@build_bazel_rules_nodejs//internal/common:collect_es6_sources.bzl", "collect_es6_sources")
load("@build_bazel_rules_nodejs//internal/common:node_module_info.bzl", "NodeModuleInfo") load("@build_bazel_rules_nodejs//internal/common:node_module_info.bzl", "NodeModuleInfo")
load("@build_bazel_rules_nodejs//internal/common:sources_aspect.bzl", "sources_aspect") load("@build_bazel_rules_nodejs//internal/common:sources_aspect.bzl", "sources_aspect")
load(
"@build_bazel_rules_nodejs//:internal/npm_package/npm_package.bzl",
"NPM_PACKAGE_ATTRS",
"NPM_PACKAGE_OUTPUTS",
"create_package",
)
load( load(
"@build_bazel_rules_nodejs//:internal/rollup/rollup_bundle.bzl", "@build_bazel_rules_nodejs//:internal/rollup/rollup_bundle.bzl",
"ROLLUP_ATTRS", "ROLLUP_ATTRS",
@ -38,7 +32,6 @@ load(
load("//packages/bazel/src:external.bzl", "FLAT_DTS_FILE_SUFFIX") load("//packages/bazel/src:external.bzl", "FLAT_DTS_FILE_SUFFIX")
load("//packages/bazel/src:esm5.bzl", "esm5_outputs_aspect", "esm5_root_dir", "flatten_esm5") load("//packages/bazel/src:esm5.bzl", "esm5_outputs_aspect", "esm5_root_dir", "flatten_esm5")
load("//packages/bazel/src/ng_package:collect-type-definitions.bzl", "collect_type_definitions") load("//packages/bazel/src/ng_package:collect-type-definitions.bzl", "collect_type_definitions")
load("//packages/bazel/src:esm5.bzl", "esm5_outputs_aspect", "esm5_root_dir", "flatten_esm5")
_DEFAULT_NG_PACKAGER = "@npm//@angular/bazel/bin:packager" _DEFAULT_NG_PACKAGER = "@npm//@angular/bazel/bin:packager"
@ -343,8 +336,8 @@ def _ng_package_impl(ctx):
packager_inputs.extend([m.metadata_file]) packager_inputs.extend([m.metadata_file])
metadata_arg[m.module_name] = { metadata_arg[m.module_name] = {
"index": m.typings_file.path.replace(".d.ts", ".js"), "index": m.typings_file.path.replace(".d.ts", ".js"),
"metadata": m.metadata_file.path,
"typings": m.typings_file.path, "typings": m.typings_file.path,
"metadata": m.metadata_file.path,
} }
packager_args.add(str(metadata_arg)) packager_args.add(str(metadata_arg))
@ -408,6 +401,7 @@ DEPS_ASPECTS = [esm5_outputs_aspect, sources_aspect]
NG_PACKAGE_ATTRS = dict(NPM_PACKAGE_ATTRS, **dict(ROLLUP_ATTRS, **{ NG_PACKAGE_ATTRS = dict(NPM_PACKAGE_ATTRS, **dict(ROLLUP_ATTRS, **{
"srcs": attr.label_list(allow_files = True), "srcs": attr.label_list(allow_files = True),
"deps": attr.label_list(aspects = DEPS_ASPECTS),
"data": attr.label_list( "data": attr.label_list(
doc = "Additional, non-Angular files to be added to the package, e.g. global CSS assets.", doc = "Additional, non-Angular files to be added to the package, e.g. global CSS assets.",
allow_files = True, allow_files = True,
@ -418,15 +412,11 @@ NG_PACKAGE_ATTRS = dict(NPM_PACKAGE_ATTRS, **dict(ROLLUP_ATTRS, **{
"entry_point_name": attr.string( "entry_point_name": attr.string(
doc = "Name to use when generating bundle files for the primary entry-point.", doc = "Name to use when generating bundle files for the primary entry-point.",
), ),
"globals": attr.string_dict(default = {}),
"include_devmode_srcs": attr.bool(default = False),
"ng_packager": attr.label( "ng_packager": attr.label(
default = Label(_DEFAULT_NG_PACKAGER), default = Label(_DEFAULT_NG_PACKAGER),
executable = True, executable = True,
cfg = "host", cfg = "host",
), ),
"readme_md": attr.label(allow_single_file = [".md"]),
"deps": attr.label_list(aspects = DEPS_ASPECTS),
"_rollup": attr.label( "_rollup": attr.label(
default = Label("@build_bazel_rules_nodejs//internal/rollup"), default = Label("@build_bazel_rules_nodejs//internal/rollup"),
executable = True, executable = True,
@ -489,8 +479,8 @@ def ng_package_outputs(name, entry_point, entry_point_name):
basename = primary_entry_point_name(name, entry_point, entry_point_name) basename = primary_entry_point_name(name, entry_point, entry_point_name)
outputs = { outputs = {
"fesm2015": "fesm2015/%s.js" % basename,
"fesm5": "fesm5/%s.js" % basename, "fesm5": "fesm5/%s.js" % basename,
"fesm2015": "fesm2015/%s.js" % basename,
"umd": "%s.umd.js" % basename, "umd": "%s.umd.js" % basename,
"umd_min": "%s.umd.min.js" % basename, "umd_min": "%s.umd.min.js" % basename,
} }

View File

@ -2,8 +2,6 @@ package(default_visibility = ["//visibility:public"])
load("@npm_bazel_typescript//:defs.bzl", "ts_library") load("@npm_bazel_typescript//:defs.bzl", "ts_library")
package(default_visibility = ["//visibility:public"])
ts_library( ts_library(
name = "utils", name = "utils",
srcs = ["index.ts"], srcs = ["index.ts"],

View File

@ -3,8 +3,6 @@ package(default_visibility = ["//visibility:public"])
load("//tools:defaults.bzl", "npm_package", "ts_library") load("//tools:defaults.bzl", "npm_package", "ts_library")
load("@npm_bazel_typescript//:defs.bzl", "ts_config") load("@npm_bazel_typescript//:defs.bzl", "ts_config")
package(default_visibility = ["//visibility:public"])
ts_config( ts_config(
name = "tsconfig", name = "tsconfig",
src = "tsconfig-build.json", src = "tsconfig-build.json",

View File

@ -4,8 +4,7 @@ load("//tools:defaults.bzl", "ts_library")
ts_library( ts_library(
name = "cycles", name = "cycles",
srcs = glob([ srcs = ["index.ts"] + glob([
"index.ts",
"src/**/*.ts", "src/**/*.ts",
]), ]),
module_name = "@angular/compiler-cli/src/ngtsc/cycles", module_name = "@angular/compiler-cli/src/ngtsc/cycles",

View File

@ -4,8 +4,7 @@ load("//tools:defaults.bzl", "ts_library")
ts_library( ts_library(
name = "path", name = "path",
srcs = glob([ srcs = ["index.ts"] + glob([
"index.ts",
"src/*.ts", "src/*.ts",
]), ]),
deps = [ deps = [

View File

@ -4,8 +4,7 @@ load("//tools:defaults.bzl", "ts_library")
ts_library( ts_library(
name = "routing", name = "routing",
srcs = glob([ srcs = ["index.ts"] + glob([
"index.ts",
"src/**/*.ts", "src/**/*.ts",
]), ]),
module_name = "@angular/compiler-cli/src/ngtsc/routing", module_name = "@angular/compiler-cli/src/ngtsc/routing",

View File

@ -4,8 +4,7 @@ load("//tools:defaults.bzl", "ts_library")
ts_library( ts_library(
name = "scope", name = "scope",
srcs = glob([ srcs = ["index.ts"] + glob([
"index.ts",
"src/**/*.ts", "src/**/*.ts",
]), ]),
deps = [ deps = [

View File

@ -1,7 +1,7 @@
load("//tools:defaults.bzl", "ng_package", "ts_library")
package(default_visibility = ["//visibility:public"]) package(default_visibility = ["//visibility:public"])
load("//tools:defaults.bzl", "ng_package", "ts_library")
ts_library( ts_library(
name = "fake_core", name = "fake_core",
srcs = [ srcs = [

View File

@ -1,10 +1,8 @@
package(default_visibility = ["//visibility:public"]) package(default_visibility = ["//visibility:public"])
load("//tools:defaults.bzl", "jasmine_node_test", "ng_module", "ng_rollup_bundle", "ts_library") load("//tools:defaults.bzl", "ng_module", "ng_rollup_bundle")
load("@build_bazel_rules_nodejs//:defs.bzl", "http_server") load("@build_bazel_rules_nodejs//:defs.bzl", "http_server")
package(default_visibility = ["//visibility:public"])
ng_module( ng_module(
name = "animation_world", name = "animation_world",
srcs = ["index.ts"], srcs = ["index.ts"],

View File

@ -4,8 +4,6 @@ load("//tools:defaults.bzl", "jasmine_node_test", "ng_module", "ng_rollup_bundle
load("//tools/symbol-extractor:index.bzl", "js_expected_symbol_test") load("//tools/symbol-extractor:index.bzl", "js_expected_symbol_test")
load("@build_bazel_rules_nodejs//:defs.bzl", "http_server") load("@build_bazel_rules_nodejs//:defs.bzl", "http_server")
package(default_visibility = ["//visibility:public"])
ng_module( ng_module(
name = "hello_world", name = "hello_world",
srcs = ["index.ts"], srcs = ["index.ts"],

View File

@ -1,10 +1,8 @@
package(default_visibility = ["//visibility:public"]) package(default_visibility = ["//visibility:public"])
load("//tools:defaults.bzl", "ng_module", "ng_rollup_bundle", "ts_library") load("//tools:defaults.bzl", "ng_module", "ng_rollup_bundle")
load("@build_bazel_rules_nodejs//:defs.bzl", "http_server") load("@build_bazel_rules_nodejs//:defs.bzl", "http_server")
package(default_visibility = ["//visibility:public"])
ng_module( ng_module(
name = "hello_world_i18n", name = "hello_world_i18n",
srcs = ["index.ts"], srcs = ["index.ts"],

View File

@ -3,8 +3,6 @@ package(default_visibility = ["//visibility:public"])
load("//tools:defaults.bzl", "jasmine_node_test", "ng_module", "ng_rollup_bundle", "ts_library") load("//tools:defaults.bzl", "jasmine_node_test", "ng_module", "ng_rollup_bundle", "ts_library")
load("@build_bazel_rules_nodejs//:defs.bzl", "http_server") load("@build_bazel_rules_nodejs//:defs.bzl", "http_server")
package(default_visibility = ["//visibility:public"])
ng_module( ng_module(
name = "hello_world", name = "hello_world",
srcs = ["index.ts"], srcs = ["index.ts"],

View File

@ -5,8 +5,6 @@ load("//tools/symbol-extractor:index.bzl", "js_expected_symbol_test")
load("@build_bazel_rules_nodejs//:defs.bzl", "http_server") load("@build_bazel_rules_nodejs//:defs.bzl", "http_server")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver") load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
package(default_visibility = ["//visibility:public"])
ng_module( ng_module(
name = "todo", name = "todo",
srcs = ["index.ts"], srcs = ["index.ts"],

View File

@ -4,8 +4,6 @@ load("//tools:defaults.bzl", "jasmine_node_test", "ng_module", "ng_rollup_bundle
load("@build_bazel_rules_nodejs//:defs.bzl", "http_server") load("@build_bazel_rules_nodejs//:defs.bzl", "http_server")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver") load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
package(default_visibility = ["//visibility:public"])
ng_module( ng_module(
name = "todo_i18n", name = "todo_i18n",
srcs = [ srcs = [

View File

@ -4,8 +4,6 @@ load("//tools:defaults.bzl", "jasmine_node_test", "ng_module", "ng_rollup_bundle
load("@build_bazel_rules_nodejs//:defs.bzl", "http_server") load("@build_bazel_rules_nodejs//:defs.bzl", "http_server")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver") load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
package(default_visibility = ["//visibility:public"])
ng_module( ng_module(
name = "todo", name = "todo",
srcs = ["index.ts"], srcs = ["index.ts"],

View File

@ -5,6 +5,8 @@ package(default_visibility = [
exports_files(["package.json"]) exports_files(["package.json"])
load("//tools:defaults.bzl", "ng_module")
ng_module( ng_module(
name = "testing", name = "testing",
testonly = True, testonly = True,

View File

@ -6,7 +6,6 @@ load("@npm_bazel_karma//:defs.bzl", _karma_web_test = "karma_web_test", _karma_w
load("@npm_bazel_typescript//:defs.bzl", _ts_library = "ts_library") load("@npm_bazel_typescript//:defs.bzl", _ts_library = "ts_library")
load("//packages/bazel:index.bzl", _ng_module = "ng_module", _ng_package = "ng_package") load("//packages/bazel:index.bzl", _ng_module = "ng_module", _ng_package = "ng_package")
load("//packages/bazel/src:ng_rollup_bundle.bzl", _ng_rollup_bundle = "ng_rollup_bundle") load("//packages/bazel/src:ng_rollup_bundle.bzl", _ng_rollup_bundle = "ng_rollup_bundle")
load("//packages/bazel:index.bzl", _ng_module = "ng_module", _ng_package = "ng_package")
_DEFAULT_TSCONFIG_BUILD = "//packages:tsconfig-build.json" _DEFAULT_TSCONFIG_BUILD = "//packages:tsconfig-build.json"
_DEFAULT_TSCONFIG_TEST = "//packages:tsconfig-test" _DEFAULT_TSCONFIG_TEST = "//packages:tsconfig-test"

View File

@ -82,23 +82,23 @@
"@bazel/bazel-linux_x64" "0.22.0" "@bazel/bazel-linux_x64" "0.22.0"
"@bazel/bazel-win32_x64" "0.22.0" "@bazel/bazel-win32_x64" "0.22.0"
"@bazel/buildifier-darwin_x64@0.20.0": "@bazel/buildifier-darwin_x64@0.19.2":
version "0.20.0" version "0.19.2"
resolved "https://registry.yarnpkg.com/@bazel/buildifier-darwin_x64/-/buildifier-darwin_x64-0.20.0.tgz#1aeceb5a1a57a62eef6415377dbe95091781a7d4" resolved "https://registry.yarnpkg.com/@bazel/buildifier-darwin_x64/-/buildifier-darwin_x64-0.19.2.tgz#1182862b4a3578fb9367ab42e807131187a61702"
integrity sha512-yV7niwbdpDDPUw1vgyk1wIjPl3+YOM4o5FPgFmnFgzf48JUqrF3PK6Blg95Z8SqGOVoJAOChRC1GvopzEUzwZA== integrity sha512-f6CITRj8jFhhZFrQkIao3IgJjZAXGYwUkW/QBSeAu0HIltBerJ0FTt/Nmu9ji1QZYT2aO4RpZ8oJksG6xv1dcQ==
"@bazel/buildifier-linux_x64@0.20.0": "@bazel/buildifier-linux_x64@0.19.2":
version "0.20.0" version "0.19.2"
resolved "https://registry.yarnpkg.com/@bazel/buildifier-linux_x64/-/buildifier-linux_x64-0.20.0.tgz#8cb6c8f999dbd8a9ee183906f202b698571d771b" resolved "https://registry.yarnpkg.com/@bazel/buildifier-linux_x64/-/buildifier-linux_x64-0.19.2.tgz#8b26eaf1f091cd3846a7dd7ea94008b55498401e"
integrity sha512-djbBtcacgERWZoxjEm8lGmMyEaOYB3moiz0kioHTQc2F96wNLfm6Cikd4Ojrcj5VNQCMW9oy3YFTu+c5mIrCcA== integrity sha512-kJjzbrjuAW4yVms5mbTWSHpJF6ogDLkuq4MjVP6a03umQ7E15o9YoxbDoiN+CzAj9ZMWPWfc5/N5TouiwXkGzA==
"@bazel/buildifier@^0.20.0": "@bazel/buildifier@^0.19.2":
version "0.20.0" version "0.19.2"
resolved "https://registry.yarnpkg.com/@bazel/buildifier/-/buildifier-0.20.0.tgz#24a10e485fe65dbd75ef812cf37635df1fb91d0d" resolved "https://registry.yarnpkg.com/@bazel/buildifier/-/buildifier-0.19.2.tgz#3e077de346ad98561cee703297aa8db50cfb3c76"
integrity sha512-dahQRtE1KEp+efUV23q/JtOCSbQEk5C/+H3J33g8wP5roxMUa8mfDto85eloJ+gRPW7yOybxknuRYc4KSpgT7w== integrity sha512-MwkuoQdOdZ/VYKJvZe3qVCn3/20pLJyJpzNl3cBmaccWeUtdDKhtOm8YlLU08lxrt0VcKNcTYt4uiA62e/315A==
optionalDependencies: optionalDependencies:
"@bazel/buildifier-darwin_x64" "0.20.0" "@bazel/buildifier-darwin_x64" "0.19.2"
"@bazel/buildifier-linux_x64" "0.20.0" "@bazel/buildifier-linux_x64" "0.19.2"
"@bazel/ibazel@~0.9.0": "@bazel/ibazel@~0.9.0":
version "0.9.0" version "0.9.0"