build: Update to latest bazel rules

This commit is contained in:
Alex Eagle 2019-03-03 12:22:48 -08:00 committed by Hans
parent 64b83e2a55
commit 4e262f966f
20 changed files with 210 additions and 1100 deletions

View File

@ -15,8 +15,8 @@
# If you change the cache key prefix, also sync the restore_cache fallback to match.
# Keep the static part of the cache key as prefix to enable correct fallbacks.
# See https://circleci.com/docs/2.0/caching/#restoring-cache for how prefixes work in CircleCI.
var_1: &docker_image angular/ngcontainer:0.7.0
var_2: &cache_key angular_devkit-0.7.0-{{ checksum "yarn.lock" }}
var_1: &docker_image angular/ngcontainer:0.10.0
var_2: &cache_key angular_devkit-0.10.0-{{ checksum "yarn.lock" }}
var_3: &node_8_docker_image angular/ngcontainer:0.3.3
# Settings common to each job

View File

@ -1,55 +1,32 @@
workspace(name = "angular_cli")
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# This is required by Angular Workspace
http_archive(
name = "bazel_skylib",
url = "https://github.com/bazelbuild/bazel-skylib/archive/0.5.0.zip",
strip_prefix = "bazel-skylib-0.5.0",
sha256 = "ca4e3b8e4da9266c3a9101c8f4704fe2e20eb5625b2a6a7d2d7d45e3dd4efffd",
name = "build_bazel_rules_nodejs",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.26.0/rules_nodejs-0.26.0.tar.gz"],
sha256 = "5c86b055c57e15bf32d9009a15bcd6d8e190c41b1ff2fb18037b75e0012e4e7c",
)
# We get Buildifier from here.
http_archive(
name = "com_github_bazelbuild_buildtools",
url = "https://github.com/bazelbuild/buildtools/archive/0.15.0.zip",
strip_prefix = "buildtools-0.15.0",
sha256 = "76d1837a86fa6ef5b4a07438f8489f00bfa1b841e5643b618e01232ba884b1fe",
)
# Load the TypeScript rules, its dependencies, and setup the workspace.
http_archive(
name = "build_bazel_rules_typescript",
url = "https://github.com/bazelbuild/rules_typescript/archive/0.22.1.zip",
strip_prefix = "rules_typescript-0.22.1",
sha256 = "351abe89b291a3b3d6af38d9d04c6270f5d2ed8781e2fda25bc65fd12db25e66",
)
load("@build_bazel_rules_typescript//:package.bzl", "rules_typescript_dependencies")
# build_bazel_rules_nodejs is loaded transitively through rules_typescript_dependencies.
rules_typescript_dependencies()
load("@com_github_bazelbuild_buildtools//buildifier:deps.bzl", "buildifier_dependencies")
buildifier_dependencies()
load("@io_bazel_rules_go//go:def.bzl", "go_register_toolchains", "go_rules_dependencies")
go_rules_dependencies()
go_register_toolchains()
# TS API Guardian resides in Angular
http_archive(
name = "angular",
url = "https://github.com/angular/angular/archive/7.2.0.zip",
strip_prefix = "angular-7.2.0",
sha256 = "8a4915a524f3fed17424da4b77cd7a943fbbddba44275f06671493339713914b",
sha256 = "5a5a56c93e454b6fb3d470e2f49f6c47db85d25765fca0f26276c71c2263be38",
strip_prefix = "angular-7.2.7",
url = "https://github.com/angular/angular/archive/7.2.7.zip",
)
load("@angular//:index.bzl", "ng_setup_workspace")
ng_setup_workspace()
# We use protocol buffers for the Build Event Protocol
git_repository(
name = "com_google_protobuf",
remote = "https://github.com/protocolbuffers/protobuf",
commit = "b6375e03aa80274dae89410efdf46346413b2247",
)
load("@build_bazel_rules_typescript//:defs.bzl", "ts_setup_workspace")
ts_setup_workspace()
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
protobuf_deps()
load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories", "yarn_install")
# 0.18.0 is needed for .bazelignore
@ -92,9 +69,23 @@ yarn_install(
],
)
http_archive(
name = "rxjs",
url = "https://registry.yarnpkg.com/rxjs/-/rxjs-6.3.3.tgz",
strip_prefix = "package/src",
sha256 = "72b0b4e517f43358f554c125e40e39f67688cd2738a8998b4a266981ed32f403",
)
load("@npm//:install_bazel_dependencies.bzl", "install_bazel_dependencies")
install_bazel_dependencies()
load("@npm_bazel_typescript//:defs.bzl", "ts_setup_workspace")
ts_setup_workspace()
# Load karma dependencies
load("@npm_bazel_karma//:package.bzl", "rules_karma_dependencies")
rules_karma_dependencies()
# Setup the rules_webtesting toolchain
load("@io_bazel_rules_webtesting//web:repositories.bzl", "web_test_repositories")
web_test_repositories()
load("@angular//:index.bzl", "ng_setup_workspace")
ng_setup_workspace()

View File

@ -77,8 +77,8 @@
"devDependencies": {
"@angular/compiler": "^8.0.0-beta.0",
"@angular/compiler-cli": "^8.0.0-beta.0",
"@bazel/karma": "^0.22.1",
"@bazel/typescript": "0.22.1",
"@bazel/karma": "~0.26.0",
"@bazel/typescript": "~0.26.0",
"@ngtools/json-schema": "^1.1.0",
"@types/copy-webpack-plugin": "^4.4.1",
"@types/express": "^4.16.0",

View File

@ -5,7 +5,7 @@
licenses(["notice"]) # MIT
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("@npm_bazel_typescript//:defs.bzl", "ts_library")
load("//tools:ts_json_schema.bzl", "ts_json_schema")
package(default_visibility = ["//visibility:public"])
@ -33,6 +33,7 @@ ts_library(
"@npm//@types/node",
"@npm//@types/inquirer",
"@npm//@types/semver",
"@npm//rxjs",
],
)

View File

@ -5,7 +5,7 @@
licenses(["notice"]) # MIT
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("@npm_bazel_typescript//:defs.bzl", "ts_library")
load("//tools:ts_json_schema.bzl", "ts_json_schema")
package(default_visibility = ["//visibility:public"])
@ -29,7 +29,7 @@ ts_library(
":pwa_schema",
"//packages/angular_devkit/core",
"//packages/angular_devkit/schematics",
"@rxjs",
"@npm//rxjs",
"@npm//@types/node",
],
)

View File

@ -5,7 +5,7 @@
licenses(["notice"]) # MIT
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("@npm_bazel_typescript//:defs.bzl", "ts_library")
load("@build_bazel_rules_nodejs//:defs.bzl", "npm_package")
load("//tools:ts_json_schema.bzl", "ts_json_schema")
@ -43,8 +43,8 @@ ts_library(
deps = [
"//packages/angular_devkit/core",
"//packages/angular_devkit/core:node",
"@rxjs",
"@rxjs//operators",
"@npm//rxjs",
"@npm//@types/node",
":architect",
":builder_builders_schema",
@ -69,8 +69,8 @@ ts_library(
deps = [
"//packages/angular_devkit/core",
"//packages/angular_devkit/core:node",
"@rxjs",
"@rxjs//operators",
"@npm//rxjs",
"@npm//@types/node",
":builder_input_schema",
":builder_output_schema",
@ -93,8 +93,8 @@ ts_library(
":architect",
"//packages/angular_devkit/core",
"//packages/angular_devkit/core:node",
"@rxjs",
"@rxjs//operators",
"@npm//rxjs",
"@npm//@types/node",
],
)

View File

@ -4,7 +4,7 @@
# found in the LICENSE file at https://angular.io/license
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("@npm_bazel_typescript//:defs.bzl", "ts_library")
licenses(["notice"]) # MIT
@ -19,8 +19,8 @@ ts_library(
"//packages/angular_devkit/architect:node",
"//packages/angular_devkit/core",
"//packages/angular_devkit/core:node",
"@rxjs",
"@rxjs//operators",
"@npm//rxjs",
"@npm//@types/node",
"@npm//@types/minimist",
"@npm//@types/progress",

View File

@ -5,7 +5,7 @@
licenses(["notice"]) # MIT
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("@npm_bazel_typescript//:defs.bzl", "ts_library")
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test", "npm_package")
package(default_visibility = ["//visibility:public"])
@ -25,8 +25,8 @@ ts_library(
deps = [
"//packages/angular_devkit/core",
"//packages/angular_devkit/core:node",
"@rxjs",
"@rxjs//operators",
"@npm//rxjs",
"@npm//@types/node",
"@npm//@types/minimist",
],
@ -49,8 +49,8 @@ ts_library(
":benchmark",
"//packages/angular_devkit/core",
"//packages/angular_devkit/core:node",
"@rxjs",
"@rxjs//operators",
"@npm//rxjs",
"@npm//@types/node",
"@npm//@types/jasmine",
],

View File

@ -5,7 +5,7 @@
licenses(["notice"]) # MIT
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("@npm_bazel_typescript//:defs.bzl", "ts_library")
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test", "npm_package")
package(default_visibility = ["//visibility:public"])

View File

@ -4,7 +4,7 @@
# found in the LICENSE file at https://angular.io/license
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("@npm_bazel_typescript//:defs.bzl", "ts_library")
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test", "npm_package")
licenses(["notice"]) # MIT License
@ -28,8 +28,8 @@ ts_library(
module_root = "src/index.d.ts",
# strict_checks = False,
deps = [
"@rxjs",
"@rxjs//operators",
"@npm//rxjs",
"@npm//@types/node",
"@npm//@types/source-map",
"@npm//ajv",
@ -51,8 +51,8 @@ ts_library(
deps = [
":core",
":node",
"@rxjs",
"@rxjs//operators",
"@npm//rxjs",
"@npm//@types/node",
"@npm//@types/jasmine",
],
@ -94,8 +94,8 @@ ts_library(
module_root = "node/index.d.ts",
deps = [
":core",
"@rxjs",
"@rxjs//operators",
"@npm//rxjs",
"@npm//@types/node",
],
)
@ -112,8 +112,8 @@ ts_library(
":core",
":node",
"//tests/angular_devkit/core/node/jobs:jobs_test_lib",
"@rxjs",
"@rxjs//operators",
"@npm//rxjs",
"@npm//@types/node",
"@npm//@types/jasmine",
],
@ -154,8 +154,8 @@ ts_library(
deps = [
":core",
":node",
"@rxjs",
"@rxjs//operators",
"@npm//rxjs",
"@npm//@types/node",
"@npm//@types/jasmine",
],

View File

@ -4,7 +4,7 @@
# found in the LICENSE file at https://angular.io/license
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("@npm_bazel_typescript//:defs.bzl", "ts_library")
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test", "npm_package")
licenses(["notice"]) # MIT License
@ -27,8 +27,8 @@ ts_library(
deps = [
"//packages/angular_devkit/core",
"//packages/angular_devkit/core:node", # TODO: get rid of this for 6.0
"@rxjs",
"@rxjs//operators",
"@npm//rxjs",
"@npm//@types/node",
],
)
@ -46,8 +46,8 @@ ts_library(
":testing",
"//packages/angular_devkit/core",
"//packages/angular_devkit/core:node",
"@rxjs",
"@rxjs//operators",
"@npm//rxjs",
"@npm//@types/node",
"@npm//@types/jasmine",
],
@ -89,8 +89,8 @@ ts_library(
"@npm//@types/node",
"@npm//tslint",
"@npm//typescript",
"@rxjs",
"@rxjs//operators",
"@npm//rxjs",
"//packages/angular_devkit/core:node",
"//packages/angular_devkit/core",
],
@ -115,8 +115,8 @@ ts_library(
":tasks",
"//packages/angular_devkit/core",
"//packages/angular_devkit/core:node",
"@rxjs",
"@rxjs//operators",
"@npm//rxjs",
"@npm//@types/node",
],
)
@ -141,8 +141,8 @@ ts_library(
"//packages/angular_devkit/core",
"//packages/angular_devkit/core:node",
"//packages/angular_devkit/core:node_testing",
"@rxjs",
"@rxjs//operators",
"@npm//rxjs",
"@npm//@types/node",
"@npm//@types/jasmine",
],
@ -185,8 +185,8 @@ ts_library(
":tasks_node",
"//packages/angular_devkit/core",
"//packages/angular_devkit/core:node",
"@rxjs",
"@rxjs//operators",
"@npm//rxjs",
"@npm//@types/node",
],
)
@ -208,8 +208,8 @@ ts_library(
"//packages/angular_devkit/core",
"//packages/angular_devkit/core:node",
"//tests/angular_devkit/schematics/tools/file-system-engine-host:file_system_engine_host_test_lib",
"@rxjs",
"@rxjs//operators",
"@npm//rxjs",
"@npm//@types/node",
"@npm//@types/jasmine",
],
@ -245,8 +245,8 @@ ts_library(
":tasks_node",
":tools",
"//packages/angular_devkit/core",
"@rxjs",
"@rxjs//operators",
"@npm//rxjs",
"@npm//@types/node",
],
)

View File

@ -4,7 +4,7 @@
# found in the LICENSE file at https://angular.io/license
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("@npm_bazel_typescript//:defs.bzl", "ts_library")
licenses(["notice"]) # MIT License
@ -29,8 +29,8 @@ ts_library(
"//packages/angular_devkit/schematics",
"//packages/angular_devkit/schematics:tasks",
"//packages/angular_devkit/schematics:tools",
"@rxjs",
"@rxjs//operators",
"@npm//rxjs",
"@npm//@types/inquirer",
"@npm//@types/minimist",
"@npm//@types/node",

View File

@ -5,7 +5,7 @@
licenses(["notice"]) # MIT
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("@npm_bazel_typescript//:defs.bzl", "ts_library")
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
load("//tools:ts_json_schema.bzl", "ts_json_schema")
@ -49,14 +49,12 @@ ts_library(
"//packages/angular_devkit/core",
"//packages/angular_devkit/schematics",
"//packages/angular_devkit/schematics:tasks",
"@rxjs",
"@rxjs//operators",
"@npm//@types/node",
"@npm//rxjs",
"@npm//typescript",
],
)
ts_library(
name = "angular_test_lib",
srcs = glob(
@ -78,10 +76,9 @@ ts_library(
"//packages/angular_devkit/core",
"//packages/angular_devkit/schematics",
"//packages/angular_devkit/schematics:testing",
"@rxjs",
"@rxjs//operators",
"@npm//@types/node",
"@npm//@types/jasmine",
"@npm//rxjs",
"@npm//typescript",
],
testonly = True,

View File

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

View File

@ -5,7 +5,7 @@
licenses(["notice"]) # MIT
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("@npm_bazel_typescript//:defs.bzl", "ts_library")
load("@build_bazel_rules_nodejs//:defs.bzl", "jasmine_node_test")
load("//tools:ts_json_schema.bzl", "ts_json_schema")
@ -27,8 +27,8 @@ ts_library(
"//packages/angular_devkit/core",
"//packages/angular_devkit/schematics",
"//packages/angular_devkit/schematics:tasks",
"@rxjs",
"@rxjs//operators",
"@npm//rxjs",
"@npm//@types/node",
"@npm//@types/semver",
],
@ -62,8 +62,8 @@ ts_library(
"//packages/angular_devkit/core",
"//packages/angular_devkit/schematics",
"//packages/angular_devkit/schematics:testing",
"@rxjs",
"@rxjs//operators",
"@npm//rxjs",
"@npm//@types/jasmine",
"@npm//@types/node",
"@npm//@types/semver",

View File

@ -4,7 +4,7 @@
# found in the LICENSE file at https://angular.io/license
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("@npm_bazel_typescript//:defs.bzl", "ts_library")
licenses(["notice"]) # MIT License

View File

@ -4,7 +4,7 @@
# found in the LICENSE file at https://angular.io/license
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("@npm_bazel_typescript//:defs.bzl", "ts_library")
licenses(["notice"]) # MIT License
@ -23,8 +23,8 @@ ts_library(
# ":testing",
# "//packages/angular_devkit/core",
# "//packages/angular_devkit/core:node",
# "@rxjs",
# "@rxjs//operators",
# "@npm//rxjs",
#
"@npm//@types/jasmine",
"@npm//@types/node",
],

View File

@ -2,7 +2,7 @@
#
# Use of this source code is governed by an MIT-style license that can be
# found in the LICENSE file at https://angular.io/license
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library", "ts_proto_library")
load("@npm_bazel_typescript//:defs.bzl", "ts_library", "ts_proto_library")
load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary")
ts_proto_library(
@ -16,8 +16,8 @@ ts_library(
deps = [
":build_event_stream",
"@npm//@types/node",
"@rxjs",
"@rxjs//operators",
"@npm//rxjs",
],
)

View File

@ -3,7 +3,7 @@
# Use of this source code is governed by an MIT-style license that can be
# found in the LICENSE file at https://angular.io/license
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("@npm_bazel_typescript//:defs.bzl", "ts_library")
# @external_begin
def _ts_json_schema_interface_impl(ctx):

1075
yarn.lock

File diff suppressed because it is too large Load Diff