build: run Bazel format/lint fix

This commit is contained in:
Alex Eagle 2019-04-15 08:49:22 -07:00 committed by Alex Eagle
parent 1b6602c066
commit ee619c9a34
19 changed files with 140 additions and 158 deletions

View File

@ -5,8 +5,8 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive( http_archive(
name = "build_bazel_rules_nodejs", name = "build_bazel_rules_nodejs",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.27.7/rules_nodejs-0.27.7.tar.gz"],
sha256 = "fb87ed5965cef93188af9a7287511639403f4b0da418961ce6defb9dcf658f51", sha256 = "fb87ed5965cef93188af9a7287511639403f4b0da418961ce6defb9dcf658f51",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.27.7/rules_nodejs-0.27.7.tar.gz"],
) )
# TS API Guardian resides in Angular # TS API Guardian resides in Angular
@ -20,8 +20,8 @@ http_archive(
# We use protocol buffers for the Build Event Protocol # We use protocol buffers for the Build Event Protocol
git_repository( git_repository(
name = "com_google_protobuf", name = "com_google_protobuf",
remote = "https://github.com/protocolbuffers/protobuf",
commit = "b6375e03aa80274dae89410efdf46346413b2247", commit = "b6375e03aa80274dae89410efdf46346413b2247",
remote = "https://github.com/protocolbuffers/protobuf",
) )
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps") load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
@ -29,47 +29,50 @@ load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
protobuf_deps() protobuf_deps()
load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories", "yarn_install") load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories", "yarn_install")
# 0.18.0 is needed for .bazelignore # 0.18.0 is needed for .bazelignore
check_bazel_version("0.18.0") check_bazel_version(minimum_bazel_version = "0.18.0")
node_repositories( node_repositories(
node_version = "10.9.0",
yarn_version = "1.9.2",
node_repositories = { node_repositories = {
"10.9.0-darwin_amd64": ( "10.9.0-darwin_amd64": (
"node-v10.9.0-darwin-x64.tar.gz", "node-v10.9.0-darwin-x64.tar.gz",
"node-v10.9.0-darwin-x64", "node-v10.9.0-darwin-x64",
"3c4fe75dacfcc495a432a7ba2dec9045cff359af2a5d7d0429c84a424ef686fc" "3c4fe75dacfcc495a432a7ba2dec9045cff359af2a5d7d0429c84a424ef686fc",
), ),
"10.9.0-linux_amd64": ( "10.9.0-linux_amd64": (
"node-v10.9.0-linux-x64.tar.xz", "node-v10.9.0-linux-x64.tar.xz",
"node-v10.9.0-linux-x64", "node-v10.9.0-linux-x64",
"c5acb8b7055ee0b6ac653dc4e458c5db45348cecc564b388f4ed1def84a329ff" "c5acb8b7055ee0b6ac653dc4e458c5db45348cecc564b388f4ed1def84a329ff",
), ),
"10.9.0-windows_amd64": ( "10.9.0-windows_amd64": (
"node-v10.9.0-win-x64.zip", "node-v10.9.0-win-x64.zip",
"node-v10.9.0-win-x64", "node-v10.9.0-win-x64",
"6a75cdbb69d62ed242d6cbf0238a470bcbf628567ee339d4d098a5efcda2401e" "6a75cdbb69d62ed242d6cbf0238a470bcbf628567ee339d4d098a5efcda2401e",
), ),
}, },
node_version = "10.9.0",
yarn_repositories = { yarn_repositories = {
"1.9.2": ( "1.9.2": (
"yarn-v1.9.2.tar.gz", "yarn-v1.9.2.tar.gz",
"yarn-v1.9.2", "yarn-v1.9.2",
"3ad69cc7f68159a562c676e21998eb21b44138cae7e8fe0749a7d620cf940204" "3ad69cc7f68159a562c676e21998eb21b44138cae7e8fe0749a7d620cf940204",
), ),
}, },
yarn_version = "1.9.2",
) )
yarn_install( yarn_install(
name = "npm", name = "npm",
package_json = "//:package.json",
yarn_lock = "//:yarn.lock",
data = [ data = [
"//:tools/yarn/check-yarn.js", "//:tools/yarn/check-yarn.js",
], ],
package_json = "//:package.json",
yarn_lock = "//:yarn.lock",
) )
load("@npm//:install_bazel_dependencies.bzl", "install_bazel_dependencies") load("@npm//:install_bazel_dependencies.bzl", "install_bazel_dependencies")
install_bazel_dependencies() install_bazel_dependencies()
load("@npm_bazel_typescript//:defs.bzl", "ts_setup_workspace") load("@npm_bazel_typescript//:defs.bzl", "ts_setup_workspace")

View File

@ -11,6 +11,13 @@ load("@angular//tools/ts-api-guardian:index.bzl", "ts_api_guardian_test")
bundle[1], bundle[1],
bundle[2], bundle[2],
), ),
allow_module_identifiers = [
"fs",
"ts",
"ajv",
"Symbol",
"webpack",
],
data = glob([ data = glob([
"%s/%s/**/*.d.ts" % ( "%s/%s/**/*.d.ts" % (
bundle[0], bundle[0],
@ -38,13 +45,6 @@ load("@angular//tools/ts-api-guardian:index.bzl", "ts_api_guardian_test")
# @angular-devkit/build-optimizer # @angular-devkit/build-optimizer
"^buildOptimizerLoader$", "^buildOptimizerLoader$",
], ],
allow_module_identifiers = [
"fs",
"ts",
"ajv",
"Symbol",
"webpack",
],
# At the moment using this will ignore a big change # At the moment using this will ignore a big change
use_angular_tag_rules = False, use_angular_tag_rules = False,
) for bundle in [b[:-len(".d.ts")].split("/", 2) for b in glob( ) for bundle in [b[:-len(".d.ts")].split("/", 2) for b in glob(

View File

@ -20,7 +20,7 @@
], ],
"scripts": { "scripts": {
"admin": "node ./bin/devkit-admin", "admin": "node ./bin/devkit-admin",
"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:format": "find . -type f \\( -name \"*.bzl\" -or -name WORKSPACE -or -name BUILD -or -name BUILD.bazel \\) ! -path \"*/node_modules/*\" | xargs buildifier -v --warnings=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",
"bazel:test": "bazel test //...", "bazel:test": "bazel test //...",

View File

@ -19,7 +19,10 @@ ts_library(
"**/*_spec_large.ts", "**/*_spec_large.ts",
], ],
), ),
data = glob(["**/*.json", "**/*.md"]), data = glob([
"**/*.json",
"**/*.md",
]),
module_name = "@angular/cli", module_name = "@angular/cli",
# strict_checks = False, # strict_checks = False,
deps = [ deps = [

View File

@ -29,8 +29,8 @@ ts_library(
":pwa_schema", ":pwa_schema",
"//packages/angular_devkit/core", "//packages/angular_devkit/core",
"//packages/angular_devkit/schematics", "//packages/angular_devkit/schematics",
"@npm//rxjs",
"@npm//@types/node", "@npm//@types/node",
"@npm//rxjs",
], ],
) )

View File

@ -15,14 +15,17 @@ ts_json_schema(
name = "builder_input_schema", name = "builder_input_schema",
src = "src/input-schema.json", src = "src/input-schema.json",
) )
ts_json_schema( ts_json_schema(
name = "builder_output_schema", name = "builder_output_schema",
src = "src/output-schema.json", src = "src/output-schema.json",
) )
ts_json_schema( ts_json_schema(
name = "builder_builders_schema", name = "builder_builders_schema",
src = "src/builders-schema.json", src = "src/builders-schema.json",
) )
ts_json_schema( ts_json_schema(
name = "progress_schema", name = "progress_schema",
src = "src/progress-schema.json", src = "src/progress-schema.json",
@ -41,15 +44,14 @@ ts_library(
module_root = "node/index.d.ts", module_root = "node/index.d.ts",
# strict_checks = False, # strict_checks = False,
deps = [ deps = [
"//packages/angular_devkit/core",
"//packages/angular_devkit/core:node",
"@npm//rxjs",
"@npm//@types/node",
":architect", ":architect",
":builder_builders_schema", ":builder_builders_schema",
":builder_input_schema", ":builder_input_schema",
":builder_output_schema", ":builder_output_schema",
"//packages/angular_devkit/core",
"//packages/angular_devkit/core:node",
"@npm//@types/node",
"@npm//rxjs",
], ],
) )
@ -62,18 +64,18 @@ ts_library(
"**/*_spec_large.ts", "**/*_spec_large.ts",
], ],
), ),
module_name = "@angular-devkit/architect",
module_root = "src/index.d.ts",
# strict_checks = False, # strict_checks = False,
data = glob(["**/*.json"]), data = glob(["**/*.json"]),
module_name = "@angular-devkit/architect",
module_root = "src/index.d.ts",
deps = [ deps = [
"//packages/angular_devkit/core",
"//packages/angular_devkit/core:node",
"@npm//rxjs",
"@npm//@types/node",
":builder_input_schema", ":builder_input_schema",
":builder_output_schema", ":builder_output_schema",
":progress_schema", ":progress_schema",
"//packages/angular_devkit/core",
"//packages/angular_devkit/core:node",
"@npm//@types/node",
"@npm//rxjs",
], ],
) )
@ -92,17 +94,15 @@ ts_library(
":architect", ":architect",
"//packages/angular_devkit/core", "//packages/angular_devkit/core",
"//packages/angular_devkit/core:node", "//packages/angular_devkit/core:node",
"@npm//rxjs",
"@npm//@types/node", "@npm//@types/node",
"@npm//rxjs",
], ],
) )
npm_package( npm_package(
name = "npm_package", name = "npm_package",
deps = [ deps = [
":architect", ":architect",
":testing" ":testing",
], ],
) )

View File

@ -19,10 +19,9 @@ ts_library(
"//packages/angular_devkit/architect:node", "//packages/angular_devkit/architect:node",
"//packages/angular_devkit/core", "//packages/angular_devkit/core",
"//packages/angular_devkit/core:node", "//packages/angular_devkit/core:node",
"@npm//rxjs",
"@npm//@types/node",
"@npm//@types/minimist", "@npm//@types/minimist",
"@npm//@types/node",
"@npm//@types/progress", "@npm//@types/progress",
"@npm//rxjs",
], ],
) )

View File

@ -25,15 +25,15 @@ ts_library(
deps = [ deps = [
"//packages/angular_devkit/core", "//packages/angular_devkit/core",
"//packages/angular_devkit/core:node", "//packages/angular_devkit/core:node",
"@npm//rxjs",
"@npm//@types/node",
"@npm//@types/minimist", "@npm//@types/minimist",
"@npm//@types/node",
"@npm//rxjs",
], ],
) )
ts_library( ts_library(
name = "benchmark_test_lib", name = "benchmark_test_lib",
testonly = True,
srcs = glob( srcs = glob(
include = [ include = [
"src/**/*_spec.ts", "src/**/*_spec.ts",
@ -45,18 +45,16 @@ ts_library(
"src/test/fibonacci.js", "src/test/fibonacci.js",
"src/test/test-script.js", "src/test/test-script.js",
], ],
# @external_begin
tsconfig = "//:tsconfig-test.json",
deps = [ deps = [
":benchmark", ":benchmark",
"//packages/angular_devkit/core", "//packages/angular_devkit/core",
"//packages/angular_devkit/core:node", "//packages/angular_devkit/core:node",
"@npm//rxjs",
"@npm//@types/node",
"@npm//@types/jasmine", "@npm//@types/jasmine",
"@npm//@types/node",
"@npm//rxjs",
], ],
testonly = True,
# @external_begin
tsconfig = "//:tsconfig-test.json",
# @external_end # @external_end
) )
@ -65,12 +63,12 @@ jasmine_node_test(
srcs = [":benchmark_test_lib"], srcs = [":benchmark_test_lib"],
deps = [ deps = [
"@npm//jasmine", "@npm//jasmine",
"@npm//source-map",
"@npm//minimist", "@npm//minimist",
"@npm//pidusage",
"@npm//pidtree", "@npm//pidtree",
"@npm//tree-kill", "@npm//pidusage",
"@npm//source-map",
"@npm//temp", "@npm//temp",
"@npm//tree-kill",
], ],
) )

View File

@ -26,29 +26,29 @@ ts_library(
deps = [ deps = [
"@npm//@types/node", "@npm//@types/node",
"@npm//@types/source-map", "@npm//@types/source-map",
"@npm//typescript",
"@npm//@types/webpack", "@npm//@types/webpack",
"@npm//typescript",
], ],
) )
ts_library( ts_library(
name = "build_optimizer_test_lib", name = "build_optimizer_test_lib",
testonly = True,
srcs = glob( srcs = glob(
include = [ include = [
"src/**/*_spec.ts", "src/**/*_spec.ts",
"src/**/*_spec_large.ts", "src/**/*_spec_large.ts",
], ],
), ),
# @external_begin
tsconfig = "//:tsconfig-test.json",
deps = [ deps = [
":build_optimizer", ":build_optimizer",
"//packages/angular_devkit/core", "//packages/angular_devkit/core",
"@npm//@types/node",
"@npm//@types/jasmine", "@npm//@types/jasmine",
"@npm//@types/node",
"@npm//@types/source-map", "@npm//@types/source-map",
], ],
testonly = True,
# @external_begin
tsconfig = "//:tsconfig-test.json",
# @external_end # @external_end
) )
@ -58,7 +58,7 @@ jasmine_node_test(
deps = [ deps = [
"@npm//jasmine", "@npm//jasmine",
"@npm//source-map", "@npm//source-map",
] ],
) )
npm_package( npm_package(

View File

@ -29,7 +29,6 @@ ts_library(
# strict_checks = False, # strict_checks = False,
deps = [ deps = [
"@npm//rxjs", "@npm//rxjs",
"@npm//@types/node", "@npm//@types/node",
"@npm//@types/source-map", "@npm//@types/source-map",
"@npm//ajv", "@npm//ajv",
@ -42,28 +41,27 @@ ts_library(
ts_library( ts_library(
name = "core_test_lib", name = "core_test_lib",
testonly = True,
srcs = glob( srcs = glob(
include = [ include = [
"src/**/*_spec.ts", "src/**/*_spec.ts",
"src/**/*_spec_large.ts", "src/**/*_spec_large.ts",
], ],
), ),
data = [
"src/experimental/workspace/test/test-workspace.json",
"src/experimental/workspace/workspace-schema.json",
],
# @external_begin
tsconfig = "//:tsconfig-test.json",
# strict_checks = False, # strict_checks = False,
deps = [ deps = [
":core", ":core",
":node", ":node",
"@npm//rxjs",
"@npm//@types/node",
"@npm//@types/jasmine", "@npm//@types/jasmine",
"@npm//@types/node",
"@npm//rxjs",
], ],
data = [
"src/experimental/workspace/workspace-schema.json",
"src/experimental/workspace/test/test-workspace.json"
],
testonly = True,
# @external_begin
tsconfig = "//:tsconfig-test.json",
# @external_end # @external_end
) )
@ -76,7 +74,6 @@ jasmine_node_test(
], ],
) )
# @angular-devkit/core/node # @angular-devkit/core/node
ts_library( ts_library(
@ -94,32 +91,30 @@ ts_library(
module_root = "node/index.d.ts", module_root = "node/index.d.ts",
deps = [ deps = [
":core", ":core",
"@npm//rxjs",
"@npm//@types/node", "@npm//@types/node",
"@npm//rxjs",
], ],
) )
ts_library( ts_library(
name = "node_test_lib", name = "node_test_lib",
testonly = True,
srcs = glob( srcs = glob(
include = [ include = [
"node/**/*_spec.ts", "node/**/*_spec.ts",
"node/**/*_spec_large.ts", "node/**/*_spec_large.ts",
], ],
), ),
# @external_begin
tsconfig = "//:tsconfig-test.json",
deps = [ deps = [
":core", ":core",
":node", ":node",
"//tests/angular_devkit/core/node/jobs:jobs_test_lib", "//tests/angular_devkit/core/node/jobs:jobs_test_lib",
"@npm//rxjs",
"@npm//@types/node",
"@npm//@types/jasmine", "@npm//@types/jasmine",
"@npm//@types/node",
"@npm//rxjs",
], ],
testonly = True,
# @external_begin
tsconfig = "//:tsconfig-test.json",
# @external_end # @external_end
) )
@ -127,15 +122,14 @@ jasmine_node_test(
name = "node_test", name = "node_test",
srcs = [":node_test_lib"], srcs = [":node_test_lib"],
deps = [ deps = [
"@npm//jasmine",
"@npm//chokidar", "@npm//chokidar",
"@npm//jasmine",
"@npm//source-map", "@npm//source-map",
"@npm//temp", "@npm//temp",
"@npm//tslint", "@npm//tslint",
], ],
) )
# @angular-devkit/core/node/testing # @angular-devkit/core/node/testing
ts_library( ts_library(
@ -154,10 +148,9 @@ ts_library(
deps = [ deps = [
":core", ":core",
":node", ":node",
"@npm//rxjs",
"@npm//@types/node",
"@npm//@types/jasmine", "@npm//@types/jasmine",
"@npm//@types/node",
"@npm//rxjs",
], ],
) )

View File

@ -27,33 +27,31 @@ ts_library(
deps = [ deps = [
"//packages/angular_devkit/core", "//packages/angular_devkit/core",
"//packages/angular_devkit/core:node", # TODO: get rid of this for 6.0 "//packages/angular_devkit/core:node", # TODO: get rid of this for 6.0
"@npm//rxjs",
"@npm//@types/node", "@npm//@types/node",
"@npm//rxjs",
], ],
) )
ts_library( ts_library(
name = "schematics_test_lib", name = "schematics_test_lib",
testonly = True,
srcs = glob( srcs = glob(
include = [ include = [
"src/**/*_spec.ts", "src/**/*_spec.ts",
"src/**/*_spec_large.ts", "src/**/*_spec_large.ts",
], ],
), ),
# @external_begin
tsconfig = "//:tsconfig-test.json",
deps = [ deps = [
":schematics", ":schematics",
":testing", ":testing",
"//packages/angular_devkit/core", "//packages/angular_devkit/core",
"//packages/angular_devkit/core:node", "//packages/angular_devkit/core:node",
"@npm//rxjs",
"@npm//@types/node",
"@npm//@types/jasmine", "@npm//@types/jasmine",
"@npm//@types/node",
"@npm//rxjs",
], ],
testonly = True,
# @external_begin
tsconfig = "//:tsconfig-test.json",
# @external_end # @external_end
) )
@ -66,7 +64,6 @@ jasmine_node_test(
], ],
) )
# @angular-devkit/schematics/tasks # @angular-devkit/schematics/tasks
ts_library( ts_library(
@ -85,13 +82,12 @@ ts_library(
# strict_checks = False, # strict_checks = False,
deps = [ deps = [
":schematics", ":schematics",
"//packages/angular_devkit/core",
"//packages/angular_devkit/core:node",
"@npm//@types/node", "@npm//@types/node",
"@npm//rxjs",
"@npm//tslint", "@npm//tslint",
"@npm//typescript", "@npm//typescript",
"@npm//rxjs",
"//packages/angular_devkit/core:node",
"//packages/angular_devkit/core",
], ],
) )
@ -114,14 +110,14 @@ ts_library(
":tasks", ":tasks",
"//packages/angular_devkit/core", "//packages/angular_devkit/core",
"//packages/angular_devkit/core:node", "//packages/angular_devkit/core:node",
"@npm//rxjs",
"@npm//@types/node", "@npm//@types/node",
"@npm//rxjs",
], ],
) )
ts_library( ts_library(
name = "tasks_test_lib", name = "tasks_test_lib",
testonly = True,
srcs = glob( srcs = glob(
include = [ include = [
"tasks/**/*_spec.ts", "tasks/**/*_spec.ts",
@ -133,25 +129,22 @@ ts_library(
"tasks/tslint-fix/test/collection.json", "tasks/tslint-fix/test/collection.json",
"tasks/tslint-fix/test/rules/customRuleRule.js", "tasks/tslint-fix/test/rules/customRuleRule.js",
], ],
# @external_begin
tsconfig = "//:tsconfig-test.json",
deps = [ deps = [
":schematics",
":tasks", ":tasks",
":testing", ":testing",
":schematics",
"//packages/angular_devkit/core", "//packages/angular_devkit/core",
"//packages/angular_devkit/core:node", "//packages/angular_devkit/core:node",
"//packages/angular_devkit/core:node_testing", "//packages/angular_devkit/core:node_testing",
"@npm//rxjs",
"@npm//@types/node",
"@npm//@types/jasmine", "@npm//@types/jasmine",
"@npm//@types/node",
"@npm//rxjs",
], ],
testonly = True,
# @external_begin
tsconfig = "//:tsconfig-test.json",
# @external_end # @external_end
) )
jasmine_node_test( jasmine_node_test(
name = "tasks_test", name = "tasks_test",
srcs = [":tasks_test_lib"], srcs = [":tasks_test_lib"],
@ -161,7 +154,6 @@ jasmine_node_test(
], ],
) )
# @angular-devkit/schematics/tools # @angular-devkit/schematics/tools
ts_library( ts_library(
@ -183,14 +175,14 @@ ts_library(
":tasks_node", ":tasks_node",
"//packages/angular_devkit/core", "//packages/angular_devkit/core",
"//packages/angular_devkit/core:node", "//packages/angular_devkit/core:node",
"@npm//rxjs",
"@npm//@types/node", "@npm//@types/node",
"@npm//rxjs",
], ],
) )
ts_library( ts_library(
name = "tools_test_lib", name = "tools_test_lib",
testonly = True,
srcs = glob( srcs = glob(
include = [ include = [
"tools/**/*_spec.ts", "tools/**/*_spec.ts",
@ -198,22 +190,20 @@ ts_library(
"tools/test/**/*.ts", "tools/test/**/*.ts",
], ],
), ),
# @external_begin
tsconfig = "//:tsconfig-test.json",
deps = [ deps = [
":tools",
":tasks",
":schematics", ":schematics",
":tasks",
":testing", ":testing",
":tools",
"//packages/angular_devkit/core", "//packages/angular_devkit/core",
"//packages/angular_devkit/core:node", "//packages/angular_devkit/core:node",
"//tests/angular_devkit/schematics/tools/file-system-engine-host:file_system_engine_host_test_lib", "//tests/angular_devkit/schematics/tools/file-system-engine-host:file_system_engine_host_test_lib",
"@npm//rxjs",
"@npm//@types/node",
"@npm//@types/jasmine", "@npm//@types/jasmine",
"@npm//@types/node",
"@npm//rxjs",
], ],
testonly = True,
# @external_begin
tsconfig = "//:tsconfig-test.json",
# @external_end # @external_end
) )
@ -226,7 +216,6 @@ jasmine_node_test(
], ],
) )
# @angular-devkit/schematics/testing # @angular-devkit/schematics/testing
ts_library( ts_library(
@ -242,9 +231,8 @@ ts_library(
":tasks_node", ":tasks_node",
":tools", ":tools",
"//packages/angular_devkit/core", "//packages/angular_devkit/core",
"@npm//rxjs",
"@npm//@types/node", "@npm//@types/node",
"@npm//rxjs",
], ],
) )
@ -253,7 +241,7 @@ npm_package(
deps = [ deps = [
":schematics", ":schematics",
":tasks", ":tasks",
":testing",
":tools", ":tools",
":testing"
], ],
) )

View File

@ -8,7 +8,6 @@ load("@npm_bazel_typescript//:defs.bzl", "ts_library")
licenses(["notice"]) # MIT License licenses(["notice"]) # MIT License
# @angular-devkit/schematics-cli # @angular-devkit/schematics-cli
ts_library( ts_library(
@ -29,10 +28,9 @@ ts_library(
"//packages/angular_devkit/schematics", "//packages/angular_devkit/schematics",
"//packages/angular_devkit/schematics:tasks", "//packages/angular_devkit/schematics:tasks",
"//packages/angular_devkit/schematics:tools", "//packages/angular_devkit/schematics:tools",
"@npm//rxjs",
"@npm//@types/inquirer", "@npm//@types/inquirer",
"@npm//@types/minimist", "@npm//@types/minimist",
"@npm//@types/node", "@npm//@types/node",
"@npm//rxjs",
], ],
) )

View File

@ -13,7 +13,10 @@ package(default_visibility = ["//visibility:public"])
# Create a list of Tuple("path/file.json", "path_file") to be used as rules # Create a list of Tuple("path/file.json", "path_file") to be used as rules
ALL_SCHEMA_TARGETS_PAIR = [ ALL_SCHEMA_TARGETS_PAIR = [
(x, x.replace("/", "_").replace("-", "_").replace(".json", "")) (
x,
x.replace("/", "_").replace("-", "_").replace(".json", ""),
)
for x in glob(["*/schema.json"]) for x in glob(["*/schema.json"])
] ]
@ -40,7 +43,7 @@ ts_library(
"*/files/**/*.ts", "*/files/**/*.ts",
"*/other-files/**/*.ts", "*/other-files/**/*.ts",
# Exclude test helpers. # Exclude test helpers.
"utility/test/**/*.ts" "utility/test/**/*.ts",
], ],
), ),
module_name = "@schematics/angular", module_name = "@schematics/angular",
@ -68,11 +71,12 @@ jasmine_node_test(
ts_library( ts_library(
name = "angular_test_lib", name = "angular_test_lib",
testonly = True,
srcs = glob( srcs = glob(
include = [ include = [
"**/*_spec.ts", "**/*_spec.ts",
"**/*_spec_large.ts", "**/*_spec_large.ts",
"utility/test/**/*.ts" "utility/test/**/*.ts",
], ],
), ),
data = glob( data = glob(
@ -80,8 +84,10 @@ ts_library(
"**/*.json", "**/*.json",
"*/files/**", "*/files/**",
"*/other-files/**", "*/other-files/**",
] ],
), ),
# @external_begin
tsconfig = "//:tsconfig-test.json",
deps = ALL_SCHEMA_DEPS + [ deps = ALL_SCHEMA_DEPS + [
":angular", ":angular",
"//packages/angular_devkit/core", "//packages/angular_devkit/core",
@ -95,9 +101,6 @@ ts_library(
"@npm//rxjs", "@npm//rxjs",
"@npm//tslint", "@npm//tslint",
], ],
testonly = True,
# @external_begin
tsconfig = "//:tsconfig-test.json",
# @external_end # @external_end
) )
@ -105,8 +108,8 @@ jasmine_node_test(
name = "angular_test", name = "angular_test",
srcs = [":angular_test_lib"], srcs = [":angular_test_lib"],
deps = [ deps = [
"//packages/schematics/angular/third_party/github.com/Microsoft/TypeScript",
"@npm//jasmine", "@npm//jasmine",
"@npm//source-map", "@npm//source-map",
"//packages/schematics/angular/third_party/github.com/Microsoft/TypeScript",
], ],
) )

View File

@ -6,6 +6,7 @@
licenses(["notice"]) # MIT licenses(["notice"]) # MIT
load("@npm_bazel_typescript//:defs.bzl", "ts_library") load("@npm_bazel_typescript//:defs.bzl", "ts_library")
# load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test") # load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
load("//tools:ts_json_schema.bzl", "ts_json_schema") load("//tools:ts_json_schema.bzl", "ts_json_schema")
@ -30,9 +31,8 @@ ts_library(
"//packages/angular_devkit/core", "//packages/angular_devkit/core",
"//packages/angular_devkit/schematics", "//packages/angular_devkit/schematics",
"//packages/angular_devkit/schematics:tasks", "//packages/angular_devkit/schematics:tasks",
"@npm//rxjs",
"@npm//@types/node", "@npm//@types/node",
"@npm//rxjs",
], ],
) )
@ -75,7 +75,7 @@ ts_json_schema(
# "//packages/angular_devkit/schematics", # "//packages/angular_devkit/schematics",
# "//packages/angular_devkit/schematics:testing", # "//packages/angular_devkit/schematics:testing",
# "@npm//rxjs", # "@npm//rxjs",
# #
# "@npm//@types/node", # "@npm//@types/node",
# "@npm//@types/jasmine", # "@npm//@types/jasmine",
# ], # ],

View File

@ -27,11 +27,9 @@ ts_library(
"//packages/angular_devkit/core", "//packages/angular_devkit/core",
"//packages/angular_devkit/schematics", "//packages/angular_devkit/schematics",
"//packages/angular_devkit/schematics:tasks", "//packages/angular_devkit/schematics:tasks",
"@npm//rxjs",
"@npm//semver",
"@npm//@types/node", "@npm//@types/node",
"@npm//@types/semver", "@npm//@types/semver",
"@npm//rxjs",
], ],
) )
@ -47,6 +45,7 @@ ts_json_schema(
ts_library( ts_library(
name = "update_test_lib", name = "update_test_lib",
testonly = True,
srcs = glob( srcs = glob(
include = [ include = [
"**/*_spec.ts", "**/*_spec.ts",
@ -56,25 +55,23 @@ ts_library(
data = glob( data = glob(
include = [ include = [
"**/*.json", "**/*.json",
] ],
), ),
# @external_begin
tsconfig = "//:tsconfig-test.json",
deps = [ deps = [
":update", ":update",
"//packages/angular_devkit/core", "//packages/angular_devkit/core",
"//packages/angular_devkit/schematics", "//packages/angular_devkit/schematics",
"//packages/angular_devkit/schematics:testing", "//packages/angular_devkit/schematics:testing",
"@npm//rxjs",
"@npm//@types/jasmine", "@npm//@types/jasmine",
"@npm//@types/node", "@npm//@types/node",
"@npm//@types/semver", "@npm//@types/semver",
"@npm//@yarnpkg/lockfile", "@npm//@yarnpkg/lockfile",
"@npm//ini", "@npm//ini",
"@npm//pacote", "@npm//pacote",
"@npm//rxjs",
], ],
testonly = True,
# @external_begin
tsconfig = "//:tsconfig-test.json",
# @external_end # @external_end
) )
@ -83,7 +80,7 @@ jasmine_node_test(
srcs = [":update_test_lib"], srcs = [":update_test_lib"],
deps = [ deps = [
"@npm//jasmine", "@npm//jasmine",
"@npm//source-map",
"@npm//npm-registry-client", "@npm//npm-registry-client",
"@npm//source-map",
], ],
) )

View File

@ -16,7 +16,10 @@ ts_library(
], ],
), ),
data = glob( data = glob(
include = ["**/collection.json", "**/*.js"], include = [
"**/collection.json",
"**/*.js",
],
), ),
deps = [ deps = [
"//packages/angular_devkit/schematics", "//packages/angular_devkit/schematics",
@ -24,7 +27,7 @@ ts_library(
# "//packages/angular_devkit/core", # "//packages/angular_devkit/core",
# "//packages/angular_devkit/core:node", # "//packages/angular_devkit/core:node",
# "@npm//rxjs", # "@npm//rxjs",
# #
"@npm//@types/jasmine", "@npm//@types/jasmine",
"@npm//@types/node", "@npm//@types/node",
], ],

View File

@ -8,17 +8,17 @@ package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary") load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary")
nodejs_binary( nodejs_binary(
name = 'quicktype_runner', name = "quicktype_runner",
data = [ data = [
"quicktype_runner.js", "quicktype_runner.js",
], ],
node_modules = "@npm//quicktype-core",
entry_point = "angular_cli/tools/quicktype_runner.js", entry_point = "angular_cli/tools/quicktype_runner.js",
install_source_map_support = False,
node_modules = "@npm//quicktype-core",
templated_args = [ templated_args = [
# Needed so that node doesn't walk back to the source directory. # Needed so that node doesn't walk back to the source directory.
# From there, the relative imports would point to .ts files. # From there, the relative imports would point to .ts files.
"--node_options=--preserve-symlinks", "--node_options=--preserve-symlinks",
], ],
install_source_map_support = False,
) )
# @external_end # @external_end

View File

@ -14,15 +14,14 @@ ts_library(
name = "parse_bep", name = "parse_bep",
srcs = ["parse_bep.ts"], srcs = ["parse_bep.ts"],
deps = [ deps = [
":build_event_stream", ":build_event_stream",
"@npm//@types/node", "@npm//@types/node",
"@npm//rxjs", "@npm//rxjs",
], ],
) )
nodejs_binary( nodejs_binary(
name = "parse", name = "parse",
entry_point = "angular_devkit/tools/build_event_protocol/parse_bep",
data = [":parse_bep"], data = [":parse_bep"],
entry_point = "angular_devkit/tools/build_event_protocol/parse_bep",
) )

View File

@ -21,7 +21,6 @@ def _ts_json_schema_interface_impl(ctx):
return [DefaultInfo()] return [DefaultInfo()]
_ts_json_schema_interface = rule( _ts_json_schema_interface = rule(
_ts_json_schema_interface_impl, _ts_json_schema_interface_impl,
attrs = { attrs = {
@ -42,12 +41,11 @@ _ts_json_schema_interface = rule(
), ),
}, },
outputs = { outputs = {
"ts": "%{out}" "ts": "%{out}",
}, },
) )
# @external_end # @external_end
# Generates a library that contains the interface for a JSON Schema file. Takes a single `src` # Generates a library that contains the interface for a JSON Schema file. Takes a single `src`
# argument as input, an optional data field for reference files, and produces a ts_library() # argument as input, an optional data field for reference files, and produces a ts_library()
# rule containing the typescript interface. # rule containing the typescript interface.
@ -74,6 +72,6 @@ def ts_json_schema(name, src, data = []):
# @external_begin # @external_begin
srcs = [ srcs = [
out, out,
] ],
# @external_end # @external_end
) )