build: update to rules_typescript 0.25.1 (#28896)

* build_bazel_rules_typescript renamed to npm_bazel_typescript
* build_bazel_rules_karma renamed to npm_bazel_karma
* browser_repositories.bzl removed and now using @npm_bazel_karma//:browser_repositories.bzl
* includes some fixes for future ts_library devmode es2015 support but some failure still remain when devmode is es2015 so this PR keeps it as es5 using the bazelOptions.devmodeTargetOverride tsconfig setting

PR Close #28896
This commit is contained in:
Greg Magolan
2019-02-08 14:01:51 -08:00
committed by Ben Lesh
parent d0018e6bf6
commit d91ecd2c8b
89 changed files with 231 additions and 499 deletions

View File

@ -21,7 +21,7 @@
"@angular-devkit/architect": "^0.10.6",
"@angular-devkit/core": "^7.0.4",
"@angular-devkit/schematics": "^7.3.0-rc.0",
"@bazel/typescript": "^0.23.2",
"@bazel/typescript": "^0.25.1",
"@schematics/angular": "^7.0.4",
"@types/node": "6.0.84",
"semver": "^5.6.0",

View File

@ -157,7 +157,7 @@ esm5_outputs_aspect = aspect(
cfg = "host",
),
"_tsc_wrapped": attr.label(
default = Label("@build_bazel_rules_typescript//:@bazel/typescript/tsc_wrapped"),
default = Label("@npm//@bazel/typescript/bin:tsc_wrapped"),
executable = True,
cfg = "host",
),

View File

@ -2,11 +2,11 @@
"""
load(
"@build_bazel_rules_typescript//internal:build_defs.bzl",
"@npm_bazel_typescript//internal:build_defs.bzl",
_tsc_wrapped_tsconfig = "tsc_wrapped_tsconfig",
)
load(
"@build_bazel_rules_typescript//internal:common/compilation.bzl",
"@npm_bazel_typescript//internal:common/compilation.bzl",
_COMMON_ATTRIBUTES = "COMMON_ATTRIBUTES",
_COMMON_OUTPUTS = "COMMON_OUTPUTS",
_DEPS_ASPECTS = "DEPS_ASPECTS",

View File

@ -3,7 +3,7 @@ package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary")
# BEGIN-DEV-ONLY
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("@npm_bazel_typescript//:defs.bzl", "ts_library")
ts_library(
name = "lib",

View File

@ -1,5 +1,5 @@
load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("@npm_bazel_typescript//:defs.bzl", "ts_library")
ts_library(
name = "ngc_lib",
@ -32,9 +32,9 @@ nodejs_binary(
configuration_env_vars = ["compile"],
data = [
":ngc_lib",
"//packages/bazel/third_party/github.com/bazelbuild/bazel/src/main/protobuf:worker_protocol.proto",
"@ngdeps//source-map-support",
"@ngdeps//tslib",
"@npm_bazel_typescript//third_party/github.com/bazelbuild/bazel/src/main/protobuf:worker_protocol.proto",
],
entry_point = "angular/packages/bazel/src/ngc-wrapped/index.js",
visibility = ["//visibility:public"],

View File

@ -1,6 +1,6 @@
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("@npm_bazel_typescript//:defs.bzl", "ts_library")
ts_library(
name = "utils",

View File

@ -53,7 +53,7 @@ yarn_install(
load("@npm//:install_bazel_dependencies.bzl", "install_bazel_dependencies")
install_bazel_dependencies()
load("@build_bazel_rules_karma//:package.bzl", "rules_karma_dependencies")
load("@npm_bazel_karma//:package.bzl", "rules_karma_dependencies")
rules_karma_dependencies()
load("@io_bazel_rules_webtesting//web:repositories.bzl", "browser_repositories", "web_test_repositories")
@ -63,7 +63,7 @@ browser_repositories(
firefox = True,
)
load("@build_bazel_rules_typescript//:defs.bzl", "ts_setup_workspace")
load("@npm_bazel_typescript//:defs.bzl", "ts_setup_workspace")
ts_setup_workspace()
<% if (sass) { %>
load("@io_bazel_rules_sass//sass:sass_repositories.bzl", "sass_repositories")

View File

@ -1,4 +1,4 @@
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("@npm_bazel_typescript//:defs.bzl", "ts_library")
load("@angular//:index.bzl", "protractor_web_test_suite")
ts_library(

View File

@ -1,10 +1,10 @@
package(default_visibility = ["//visibility:public"])
load("@angular//:index.bzl", "ng_module")
load("@build_bazel_rules_karma//:defs.bzl", "ts_web_test_suite")
load("@npm_bazel_karma//:defs.bzl", "ts_web_test_suite")
load("@build_bazel_rules_nodejs//:defs.bzl", "rollup_bundle", "history_server")
load("@build_bazel_rules_nodejs//internal/web_package:web_package.bzl", "web_package")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_devserver", "ts_library")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver", "ts_library")
<% if (sass) { %>load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
[

View File

@ -43,8 +43,8 @@ function addDevDependenciesToPackageJson(options: Schema) {
// TODO(kyliau): Consider moving this to latest-versions.ts
'@bazel/bazel': '^0.22.1',
'@bazel/ibazel': '^0.9.0',
'@bazel/karma': '^0.23.2',
'@bazel/typescript': '^0.23.2',
'@bazel/karma': '^0.25.1',
'@bazel/typescript': '^0.25.1',
};
const recorder = host.beginUpdate(packageJson);

View File

@ -32,7 +32,7 @@ jasmine_node_test(
"//packages/bazel/test/ngc-wrapped/empty:empty_tsconfig.json",
"//packages/bazel/test/ngc-wrapped/empty:tsconfig.json",
"//packages/private/testing",
"@build_bazel_rules_typescript//third_party/github.com/bazelbuild/bazel/src/main/protobuf:worker_protocol.proto",
"@npm_bazel_typescript//third_party/github.com/bazelbuild/bazel/src/main/protobuf:worker_protocol.proto",
],
)

View File

@ -1,5 +1,5 @@
load("//packages/bazel:index.bzl", "protractor_web_test_suite")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_devserver")
load("@npm_bazel_typescript//:defs.bzl", "ts_devserver")
load("@build_bazel_rules_nodejs//:defs.bzl", "rollup_bundle")
load("//tools:defaults.bzl", "ts_library")
load("//tools/http-server:http_server.bzl", "http_server")