build(bazel): use fine-grained npm deps (#26111) (#26488)

PR Close #26488
This commit is contained in:
Greg Magolan
2018-10-04 13:14:14 -07:00
committed by Igor Minar
parent b6c9678f21
commit 1f3331f5e6
104 changed files with 6687 additions and 1820 deletions

View File

@ -11,6 +11,10 @@ load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "types",
srcs = glob(["*.ts"]),
deps = [
"@ngdeps//@types/hammerjs",
"@ngdeps//zone.js",
],
)
exports_files([

View File

@ -24,8 +24,8 @@ def rules_angular_dependencies():
_maybe(
http_archive,
name = "build_bazel_rules_typescript",
strip_prefix = "rules_typescript-0.17.0",
url = "https://github.com/bazelbuild/rules_typescript/archive/0.17.0.zip",
url = "https://github.com/bazelbuild/rules_typescript/archive/6561f95aa621a6e3d421ab86451167ec84e580fa.zip",
strip_prefix = "rules_typescript-6561f95aa621a6e3d421ab86451167ec84e580fa",
)
# Needed for Remote Execution

View File

@ -19,8 +19,8 @@ Fulfills similar role as the package.json file.
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# This file mirrored from https://raw.githubusercontent.com/bazelbuild/rules_nodejs/0.13.4/package.bzl
VERSION = "0.13.4"
# This file mirrored from https://raw.githubusercontent.com/bazelbuild/rules_nodejs/0.14.2/package.bzl
VERSION = "0.14.2"
def rules_nodejs_dependencies():
"""

View File

@ -20,8 +20,8 @@ against a minimum dependent build_bazel_rules_typescript version.
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# This file mirrored from https://raw.githubusercontent.com/bazelbuild/rules_typescript/0.17.0/package.bzl
VERSION = "0.17.0"
# This file mirrored from https://raw.githubusercontent.com/bazelbuild/rules_typescript/0.19.1/package.bzl
VERSION = "0.19.1"
def rules_typescript_dependencies():
"""
@ -35,18 +35,17 @@ def rules_typescript_dependencies():
_maybe(
http_archive,
name = "build_bazel_rules_nodejs",
urls = ["https://github.com/bazelbuild/rules_nodejs/archive/0.13.4.zip"],
strip_prefix = "rules_nodejs-0.13.4",
sha256 = "a612bfd80b980bf7aa1ef9b24ef3c86a7e82bcd3f8aa92c5ef492472657cc7c8",
urls = ["https://github.com/bazelbuild/rules_nodejs/archive/3501f9b6a9a78a01fd1ef9b808f022bfcbb478a0.zip"],
strip_prefix = "rules_nodejs-3501f9b6a9a78a01fd1ef9b808f022bfcbb478a0",
)
# ts_web_test depends on the web testing rules to provision browsers.
_maybe(
http_archive,
name = "io_bazel_rules_webtesting",
urls = ["https://github.com/bazelbuild/rules_webtesting/archive/0.2.1.zip"],
strip_prefix = "rules_webtesting-0.2.1",
sha256 = "7d490aadff9b5262e5251fa69427ab2ffd1548422467cb9f9e1d110e2c36f0fa",
urls = ["https://github.com/bazelbuild/rules_webtesting/archive/111d792b9a5b17f87b6e177e274dbbee46094791.zip"],
strip_prefix = "rules_webtesting-111d792b9a5b17f87b6e177e274dbbee46094791",
sha256 = "a13af63e928c34eff428d47d31bafeec4e38ee9b6940e70bf2c9cd47184c5c16",
)
# ts_devserver depends on the Go rules.
@ -54,16 +53,40 @@ def rules_typescript_dependencies():
_maybe(
http_archive,
name = "io_bazel_rules_go",
urls = ["https://github.com/bazelbuild/rules_go/releases/download/0.13.0/rules_go-0.13.0.tar.gz"],
sha256 = "ba79c532ac400cefd1859cbc8a9829346aa69e3b99482cd5a54432092cbc3933",
urls = ["https://github.com/bazelbuild/rules_go/archive/cbc1e32fba771845305f15e341fa26595d4a136d.zip"],
strip_prefix = "rules_go-cbc1e32fba771845305f15e341fa26595d4a136d",
sha256 = "d02b1d8d11fb67fb1e451645256e58a1542170eedd6e2ba160c8540c96f659da",
)
# go_repository is defined in bazel_gazelle
_maybe(
http_archive,
name = "bazel_gazelle",
urls = ["https://github.com/bazelbuild/bazel-gazelle/releases/download/0.13.0/bazel-gazelle-0.13.0.tar.gz"],
sha256 = "bc653d3e058964a5a26dcad02b6c72d7d63e6bb88d94704990b908a1445b8758",
urls = ["https://github.com/bazelbuild/bazel-gazelle/archive/109bcfd6880aac2517a1a2d48987226da6337e11.zip"],
strip_prefix = "bazel-gazelle-109bcfd6880aac2517a1a2d48987226da6337e11",
sha256 = "8f80ce0f7a6f8a3fee1fb863c9a23e1de99d678c1cf3c6f0a128f3b883168208",
)
# ts_auto_deps depends on com_github_bazelbuild_buildtools
_maybe(
http_archive,
name = "com_github_bazelbuild_buildtools",
url = "https://github.com/bazelbuild/buildtools/archive/0.12.0.zip",
strip_prefix = "buildtools-0.12.0",
sha256 = "ec495cbd19238c9dc488fd65ca1fee56dcb1a8d6d56ee69a49f2ebe69826c261",
)
###############################################
# Repeat the dependencies of rules_nodejs here!
# We can't load() from rules_nodejs yet, because we've only just fetched it.
# But we also don't want to make users load and call the rules_nodejs_dependencies
# function because we can do that for them, mostly hiding the transitive dependency.
_maybe(
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",
)
def _maybe(repo_rule, name, **kwargs):

View File

@ -80,12 +80,20 @@ def _esm5_outputs_aspect(target, ctx):
],
)
replay_compiler = target.typescript.replay_params.compiler.path.split("/")[-1]
if replay_compiler == "tsc_wrapped":
compiler = ctx.executable._tsc_wrapped
elif replay_compiler == "ngc-wrapped":
compiler = ctx.executable._ngc_wrapped
else:
fail("Unknown replay compiler", target.typescript.replay_params.compiler.path)
ctx.actions.run(
progress_message = "Compiling TypeScript (ES5 with ES Modules) %s" % target.label,
inputs = target.typescript.replay_params.inputs + [tsconfig],
outputs = outputs,
arguments = [tsconfig.path],
executable = target.typescript.replay_params.compiler,
executable = compiler,
execution_requirements = {
# TODO(alexeagle): enable worker mode for these compilations
"supports-workers": "0",
@ -122,15 +130,11 @@ esm5_outputs_aspect = aspect(
executable = True,
cfg = "host",
),
# We must list tsc_wrapped here to ensure it's built before the action runs
# For some reason, having the compiler output as an input to the action above
# is not sufficient.
"_tsc_wrapped": attr.label(
default = Label("@build_bazel_rules_typescript//internal:tsc_wrapped_bin"),
default = Label("@build_bazel_rules_typescript//:@bazel/typescript/tsc_wrapped"),
executable = True,
cfg = "host",
),
# Same comment as for tsc_wrapped above.
"_ngc_wrapped": attr.label(
default = Label("//packages/bazel/src/ngc-wrapped"),
executable = True,

View File

@ -14,6 +14,7 @@ load(
"ts_providers_dict_to_struct",
"tsc_wrapped_tsconfig",
)
load("@build_bazel_rules_nodejs//internal/common:node_module_info.bzl", "NodeModuleInfo", "collect_node_modules_aspect")
def compile_strategy(ctx):
"""Detect which strategy should be used to implement ng_module.
@ -379,23 +380,31 @@ def ngc_compile_action(
return None
def _filter_ts_inputs(all_inputs):
# The compiler only needs to see TypeScript sources from the npm dependencies,
# but may need to look at package.json and ngsummary.json files as well.
return [
f
for f in all_inputs
if f.path.endswith(".js") or f.path.endswith(".ts") or f.path.endswith(".json")
]
def _compile_action(ctx, inputs, outputs, messages_out, tsconfig_file, node_opts):
# Give the Angular compiler all the user-listed assets
file_inputs = list(ctx.files.assets)
# The compiler only needs to see TypeScript sources from the npm dependencies,
# but may need to look at package.json and ngsummary.json files as well.
if hasattr(ctx.attr, "node_modules"):
file_inputs += [
f
for f in ctx.files.node_modules
if f.path.endswith(".ts") or f.path.endswith(".json")
]
file_inputs.extend(_filter_ts_inputs(ctx.files.node_modules))
# If the user supplies a tsconfig.json file, the Angular compiler needs to read it
if hasattr(ctx.attr, "tsconfig") and ctx.file.tsconfig:
file_inputs.append(ctx.file.tsconfig)
# Also include files from npm fine grained deps as action_inputs.
# These deps are identified by the NodeModuleInfo provider.
for d in ctx.attr.deps:
if NodeModuleInfo in d:
file_inputs.extend(_filter_ts_inputs(d.files))
# Collect the inputs and summary files from our deps
action_inputs = depset(
file_inputs,
@ -443,6 +452,13 @@ def ng_module_impl(ctx, ts_compile_actions):
providers = ts_compile_actions(
ctx,
is_library = True,
# Filter out the node_modules from deps passed to TypeScript compiler
# since they don't have the required providers.
# They were added to the action inputs for tsc_wrapped already.
# strict_deps checking currently skips node_modules.
# TODO(alexeagle): turn on strict deps checking when we have a real
# provider for JS/DTS inputs to ts_library.
deps = [d for d in ctx.attr.deps if not NodeModuleInfo in d],
compile_action = _prodmode_compile_action,
devmode_compile_action = _devmode_compile_action,
tsc_wrapped_tsconfig = _ngc_tsconfig,
@ -474,6 +490,11 @@ def ng_module_impl(ctx, ts_compile_actions):
def _ng_module_impl(ctx):
return ts_providers_dict_to_struct(ng_module_impl(ctx, compile_ts))
local_deps_aspects = [collect_node_modules_aspect, _collect_summaries_aspect]
# Workaround skydoc bug which assumes DEPS_ASPECTS is a str type
[local_deps_aspects.append(a) for a in DEPS_ASPECTS]
NG_MODULE_ATTRIBUTES = {
"srcs": attr.label_list(allow_files = [".ts"]),
@ -481,7 +502,7 @@ NG_MODULE_ATTRIBUTES = {
# https://github.com/bazelbuild/skydoc/issues/21
"deps": attr.label_list(
doc = "Targets that are imported by this target",
aspects = list(DEPS_ASPECTS) + [_collect_summaries_aspect],
aspects = local_deps_aspects,
),
"assets": attr.label_list(
doc = ".html and .css files needed by the Angular compiler",
@ -514,12 +535,68 @@ NG_MODULE_ATTRIBUTES = {
NG_MODULE_RULE_ATTRS = dict(dict(COMMON_ATTRIBUTES, **NG_MODULE_ATTRIBUTES), **{
"tsconfig": attr.label(allow_files = True, single_file = True),
# @// is special syntax for the "main" repository
# The default assumes the user specified a target "node_modules" in their
# root BUILD file.
"node_modules": attr.label(
default = Label("@//:node_modules"),
doc = """The npm packages which should be available during the compile.
The default value is `@npm//typescript:typescript__typings` is setup
for projects that use bazel managed npm deps that. It is recommended
that you use the workspace name `@npm` for bazel managed deps so the
default node_modules works out of the box. Otherwise, you'll have to
override the node_modules attribute manually. This default is in place
since ng_module will always depend on at least the typescript
default libs which are provided by `@npm//typescript:typescript__typings`.
This attribute is DEPRECATED. As of version 0.18.0 the recommended
approach to npm dependencies is to use fine grained npm dependencies
which are setup with the `yarn_install` or `npm_install` rules.
For example, in targets that used a `//:node_modules` filegroup,
```
ng_module(
name = "my_lib",
...
node_modules = "@npm//node_modules",
)
```
which specifies all files within the `//:node_modules` filegroup
to be inputs to the `my_lib`. Using fine grained npm dependencies,
`my_lib` is defined with only the npm dependencies that are
needed:
```
ng_module(
name = "my_lib",
...
deps = [
"@npm//@types/foo",
"@npm//@types/bar",
"@npm//foo",
"@npm//bar",
...
],
)
```
In this case, only the listed npm packages and their
transitive deps are includes as inputs to the `my_lib` target
which reduces the time required to setup the runfiles for this
target (see https://github.com/bazelbuild/bazel/issues/5153).
The default typescript libs are also available via the node_modules
default in this case.
The @npm external repository and the fine grained npm package
targets are setup using the `yarn_install` or `npm_install` rule
in your WORKSPACE file:
yarn_install(
name = "npm",
package_json = "//:package.json",
yarn_lock = "//:yarn.lock",
)
""",
default = Label("@npm//typescript:typescript__typings"),
),
"entry_point": attr.string(),

View File

@ -14,6 +14,7 @@ exports_files(["rollup.config.js"])
ts_library(
name = "lib",
srcs = glob(["*.ts"]),
compiler = "//:@bazel/typescript/tsc_wrapped",
node_modules = "@angular_packager_deps//:node_modules",
tsconfig = ":tsconfig.json",
)

View File

@ -17,7 +17,7 @@ load("@build_bazel_rules_nodejs//:internal/collect_es6_sources.bzl", "collect_es
load(
"@build_bazel_rules_nodejs//:internal/rollup/rollup_bundle.bzl",
"ROLLUP_ATTRS",
"rollup_module_mappings_aspect",
"ROLLUP_DEPS_ASPECTS",
"run_uglify",
"write_rollup_config",
)
@ -28,6 +28,7 @@ load(
"create_package",
)
load("@build_bazel_rules_nodejs//:internal/node.bzl", "sources_aspect")
load("@build_bazel_rules_nodejs//internal/common:node_module_info.bzl", "NodeModuleInfo")
load("//packages/bazel/src:esm5.bzl", "esm5_outputs_aspect", "esm5_root_dir", "flatten_esm5")
# Convert from some-dash-case to someCamelCase
@ -160,6 +161,13 @@ def _filter_out_generated_files(files):
def _esm2015_root_dir(ctx):
return ctx.label.name + ".es6"
def _filter_js_inputs(all_inputs):
return [
f
for f in all_inputs
if f.path.endswith(".js") or f.path.endswith(".json")
]
# ng_package produces package that is npm-ready.
def _ng_package_impl(ctx):
npm_package_directory = ctx.actions.declare_directory("%s.ng_pkg" % ctx.label.name)
@ -235,11 +243,19 @@ def _ng_package_impl(ctx):
umd_output = ctx.outputs.umd
min_output = ctx.outputs.umd_min
node_modules_files = _filter_js_inputs(ctx.files.node_modules)
# Also include files from npm fine grained deps as inputs.
# These deps are identified by the NodeModuleInfo provider.
for d in ctx.attr.deps:
if NodeModuleInfo in d:
node_modules_files += _filter_js_inputs(d.files)
esm2015_config = write_rollup_config(ctx, [], "/".join([ctx.bin_dir.path, ctx.label.package, _esm2015_root_dir(ctx)]), filename = "_%s.rollup_esm2015.conf.js")
esm5_config = write_rollup_config(ctx, [], "/".join([ctx.bin_dir.path, ctx.label.package, esm5_root_dir(ctx)]), filename = "_%s.rollup_esm5.conf.js")
fesm2015.append(_rollup(ctx, "fesm2015", esm2015_config, es2015_entry_point, esm_2015_files + ctx.files.node_modules, fesm2015_output))
fesm5.append(_rollup(ctx, "fesm5", esm5_config, es5_entry_point, esm5_sources + ctx.files.node_modules, fesm5_output))
fesm2015.append(_rollup(ctx, "fesm2015", esm2015_config, es2015_entry_point, esm_2015_files + node_modules_files, fesm2015_output))
fesm5.append(_rollup(ctx, "fesm5", esm5_config, es5_entry_point, esm5_sources + node_modules_files, fesm5_output))
bundles.append(
_rollup(
@ -247,7 +263,7 @@ def _ng_package_impl(ctx):
"umd",
esm5_config,
es5_entry_point,
esm5_sources + ctx.files.node_modules,
esm5_sources + node_modules_files,
umd_output,
format = "umd",
package_name = package_name,
@ -332,7 +348,8 @@ def _ng_package_impl(ctx):
devfiles = depset()
if ctx.attr.include_devmode_srcs:
for d in ctx.attr.deps:
devfiles = depset(transitive = [devfiles, d.files, d.node_sources])
if not NodeModuleInfo in d:
devfiles = depset(transitive = [devfiles, d.files, d.node_sources])
# Re-use the create_package function from the nodejs npm_package rule.
package_dir = create_package(
@ -344,13 +361,14 @@ def _ng_package_impl(ctx):
files = depset([package_dir]),
)]
DEPS_ASPECTS = [esm5_outputs_aspect, sources_aspect]
# Workaround skydoc bug which assumes ROLLUP_DEPS_ASPECTS is a str type
[DEPS_ASPECTS.append(a) for a in ROLLUP_DEPS_ASPECTS]
NG_PACKAGE_ATTRS = dict(NPM_PACKAGE_ATTRS, **dict(ROLLUP_ATTRS, **{
"srcs": attr.label_list(allow_files = True),
"deps": attr.label_list(aspects = [
rollup_module_mappings_aspect,
esm5_outputs_aspect,
sources_aspect,
]),
"deps": attr.label_list(aspects = DEPS_ASPECTS),
"data": attr.label_list(
doc = "Additional, non-Angular files to be added to the package, e.g. global CSS assets.",
allow_files = True,

View File

@ -17,8 +17,8 @@
load(
"@build_bazel_rules_nodejs//internal/rollup:rollup_bundle.bzl",
"ROLLUP_ATTRS",
"ROLLUP_DEPS_ASPECTS",
"ROLLUP_OUTPUTS",
"rollup_module_mappings_aspect",
"run_rollup",
"run_sourcemapexplorer",
"run_uglify",
@ -141,16 +141,18 @@ def _ng_rollup_bundle(ctx):
return DefaultInfo(files = depset([ctx.outputs.build_es5_min, sourcemap]))
DEPS_ASPECTS = [esm5_outputs_aspect]
# Workaround skydoc bug which assumes ROLLUP_DEPS_ASPECTS is a str type
[DEPS_ASPECTS.append(a) for a in ROLLUP_DEPS_ASPECTS]
ng_rollup_bundle = rule(
implementation = _ng_rollup_bundle,
attrs = dict(ROLLUP_ATTRS, **{
"deps": attr.label_list(
doc = """Other targets that provide JavaScript files.
Typically this will be `ts_library` or `ng_module` targets.""",
aspects = [
rollup_module_mappings_aspect,
esm5_outputs_aspect,
],
aspects = DEPS_ASPECTS,
),
"_rollup": attr.label(
executable = True,

View File

@ -13,7 +13,9 @@ ts_library(
"extract_i18n.ts",
"index.ts",
],
compiler = "//:@bazel/typescript/tsc_wrapped",
module_name = "@angular/bazel",
node_modules = "@ngdeps//typescript:typescript__typings",
tsconfig = ":tsconfig.json",
visibility = ["//packages/bazel/test/ngc-wrapped:__subpackages__"],
deps = [
@ -22,7 +24,10 @@ ts_library(
# Users will get this dependency from node_modules.
"//packages/compiler-cli",
# END-INTERNAL
"@build_bazel_rules_typescript//internal:tsc_wrapped",
"@ngdeps//@bazel/typescript",
"@ngdeps//@types/node",
"@ngdeps//tsickle",
"@ngdeps//typescript",
],
)
@ -31,9 +36,9 @@ nodejs_binary(
data = [
":ngc_lib",
"@build_bazel_rules_typescript//third_party/github.com/bazelbuild/bazel/src/main/protobuf:worker_protocol.proto",
"@ngdeps//tslib",
],
entry_point = "angular/packages/bazel/src/ngc-wrapped/index.js",
node_modules = "@//:node_modules",
visibility = ["//visibility:public"],
)
@ -43,6 +48,5 @@ nodejs_binary(
":ngc_lib",
],
entry_point = "angular/packages/bazel/src/ngc-wrapped/index.js/extract_i18n.js",
node_modules = "@//:node_modules",
visibility = ["//visibility:public"],
)

View File

@ -1,5 +1,6 @@
{
"compilerOptions": {
"lib": ["es5", "es2015.collection", "es2015.core"]
"lib": ["es5", "es2015.collection", "es2015.core"],
"types": ["node"]
}
}

View File

@ -202,7 +202,6 @@ def protractor_web_test(
name = protractor_bin_name,
entry_point = "protractor/bin/protractor",
data = srcs + deps + data,
node_modules = "@//:node_modules",
testonly = 1,
visibility = ["//visibility:private"],
)
@ -303,7 +302,6 @@ def protractor_web_test_suite(
name = protractor_bin_name,
entry_point = "protractor/bin/protractor",
data = srcs + deps + data,
node_modules = "@//:node_modules",
testonly = 1,
visibility = ["//visibility:private"],
)

View File

@ -11,6 +11,9 @@ load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
ts_library(
name = "utils",
srcs = ["index.ts"],
compiler = "//:@bazel/typescript/tsc_wrapped",
module_name = "@angular/bazel/protractor-utils",
node_modules = "@ngdeps//typescript:typescript__typings",
tsconfig = ":tsconfig.json",
deps = ["@ngdeps//@types/node"],
)

View File

@ -1,6 +1,7 @@
{
"compilerOptions": {
"noImplicitAny": true,
"lib": ["es2015"]
"lib": ["es2015"],
"types": ["node"]
}
}

View File

@ -10,7 +10,10 @@ ts_library(
name = "core_spec_lib",
testonly = True,
srcs = ["core_package.spec.ts"],
deps = ["//packages:types"],
deps = [
"//packages:types",
"@ngdeps//@types/shelljs",
],
)
jasmine_node_test(
@ -18,6 +21,8 @@ jasmine_node_test(
srcs = [":core_spec_lib"],
data = [
"//packages/core:npm_package",
"@ngdeps//@types/shelljs",
"@ngdeps//shelljs",
],
)
@ -25,20 +30,29 @@ ts_library(
name = "common_spec_lib",
testonly = True,
srcs = ["common_package.spec.ts"],
deps = ["//packages:types"],
deps = [
"//packages:types",
"@ngdeps//@types/shelljs",
],
)
jasmine_node_test(
name = "common_package",
srcs = [":common_spec_lib"],
data = ["//packages/common:npm_package"],
data = [
"//packages/common:npm_package",
"@ngdeps//shelljs",
],
)
ts_library(
name = "example_spec_lib",
testonly = True,
srcs = ["example_package.spec.ts"],
deps = ["//packages:types"],
deps = [
"//packages:types",
"@ngdeps//@types/diff",
],
)
jasmine_node_test(

View File

@ -1,13 +1,15 @@
package(default_visibility = ["//packages/bazel/test:__subpackages__"])
load("//packages/bazel:index.bzl", "ng_module", "ng_package")
load("//tools:defaults.bzl", "npm_package")
load("//tools:defaults.bzl", "ng_module", "ng_package", "npm_package")
ng_module(
name = "example",
srcs = glob(["*.ts"]),
module_name = "example",
deps = ["//packages/bazel/test/ng_package/example/secondary"],
deps = [
"//packages/bazel/test/ng_package/example/secondary",
"@ngdeps//@types",
],
)
ng_package(

View File

@ -1,10 +1,13 @@
package(default_visibility = ["//packages/bazel/test:__subpackages__"])
load("//packages/bazel:index.bzl", "ng_module")
load("//tools:defaults.bzl", "ng_module")
ng_module(
name = "secondary",
srcs = glob(["*.ts"]),
module_name = "example/secondary",
deps = ["//packages/core"],
deps = [
"//packages/core",
"@ngdeps//@types",
],
)

View File

@ -2,6 +2,7 @@ load("//tools:defaults.bzl", "jasmine_node_test", "ts_library")
ts_library(
name = "ngc_test_lib",
testonly = True,
srcs = [
"index_test.ts",
"test_support.ts",
@ -11,6 +12,7 @@ ts_library(
deps = [
"//packages/bazel/src/ngc-wrapped:ngc_lib",
"//packages/compiler-cli",
"@ngdeps//typescript",
],
)

View File

@ -6,5 +6,8 @@ ng_module(
name = "empty",
srcs = ["empty.ts"],
tsconfig = ":tsconfig.json",
deps = ["//packages/core"],
deps = [
"//packages/core",
"@ngdeps//@types",
],
)

View File

@ -70,7 +70,7 @@ export function createTsConfig(options: TsConfigOptions) {
'tsickleExternsPath': '',
// we don't copy the node_modules into our tmp dir, so we should look in
// the original workspace directory for it
'nodeModulesPrefix': '../angular/external/angular_deps/node_modules',
'nodeModulesPrefix': '../angular/external/ngdeps/node_modules',
},
'files': options.files,
'angularCompilerOptions': {

View File

@ -1,12 +1,15 @@
load("//packages/bazel:index.bzl", "protractor_web_test_suite")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_devserver", "ts_library")
load("@build_bazel_rules_nodejs//:defs.bzl", "nodejs_binary", "rollup_bundle")
load("@build_bazel_rules_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")
ts_library(
name = "app",
srcs = ["app.ts"],
tsconfig = ":tsconfig.json",
# FIXME: should not be needed here!
deps = ["@ngdeps//@types/jasmine"],
)
ts_devserver(
@ -19,7 +22,6 @@ ts_devserver(
rollup_bundle(
name = "bundle",
entry_point = "packages/bazel/test/protractor-2/app",
node_modules = "//:node_modules",
deps = [":app"],
)
@ -36,6 +38,10 @@ ts_library(
testonly = True,
srcs = ["test.spec.ts"],
tsconfig = ":tsconfig.json",
deps = [
"@ngdeps//@types/selenium-webdriver",
"@ngdeps//protractor",
],
)
protractor_web_test_suite(
@ -44,7 +50,10 @@ protractor_web_test_suite(
data = ["//packages/bazel/src/protractor/utils"],
on_prepare = ":on-prepare.js",
server = ":prodserver",
deps = [":ts_spec"],
deps = [
":ts_spec",
"@ngdeps//protractor",
],
)
protractor_web_test_suite(
@ -53,5 +62,8 @@ protractor_web_test_suite(
data = ["//packages/bazel/src/protractor/utils"],
on_prepare = ":on-prepare.js",
server = ":devserver",
deps = [":ts_spec"],
deps = [
":ts_spec",
"@ngdeps//protractor",
],
)

View File

@ -1,5 +1,6 @@
{
"compilerOptions": {
"lib": ["dom", "es2015"]
"lib": ["dom", "es2015"],
"types": ["jasmine"]
}
}

View File

@ -1,11 +1,15 @@
load("//packages/bazel:index.bzl", "protractor_web_test_suite")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("//tools:defaults.bzl", "ts_library")
ts_library(
name = "ts_spec",
testonly = True,
srcs = ["test.spec.ts"],
tsconfig = ":tsconfig.json",
deps = [
"@ngdeps//@types/selenium-webdriver",
"@ngdeps//protractor",
],
)
ts_library(
@ -13,12 +17,18 @@ ts_library(
testonly = True,
srcs = ["conf.ts"],
tsconfig = ":tsconfig.json",
deps = ["//packages/bazel/src/protractor/utils"],
deps = [
"//packages/bazel/src/protractor/utils",
"@ngdeps//protractor",
],
)
protractor_web_test_suite(
name = "test",
configuration = ":ts_conf",
data = ["//packages/bazel/src/protractor/utils"],
deps = [":ts_spec"],
deps = [
":ts_spec",
"@ngdeps//protractor",
],
)

View File

@ -1,5 +1,6 @@
{
"compilerOptions": {
"lib": ["es2015"]
"lib": ["es2015"],
"types": ["jasmine"]
}
}

View File

@ -14,5 +14,6 @@ ts_library(
deps = [
"//packages:types",
"//packages/core",
"@ngdeps//@types/node",
],
)

View File

@ -1,7 +1,7 @@
package(default_visibility = ["//visibility:public"])
load("//tools:defaults.bzl", "npm_package")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_config", "ts_library")
load("//tools:defaults.bzl", "npm_package", "ts_library")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_config")
ts_config(
name = "tsconfig",
@ -21,7 +21,6 @@ ts_library(
],
),
module_name = "@angular/compiler-cli",
node_modules = "@angular_deps//:node_modules",
tsconfig = ":tsconfig",
deps = [
"//packages/compiler",
@ -32,6 +31,10 @@ ts_library(
"//packages/compiler-cli/src/ngtsc/switch",
"//packages/compiler-cli/src/ngtsc/transform",
"//packages/compiler-cli/src/ngtsc/typecheck",
"@ngdeps//@bazel/typescript",
"@ngdeps//@types",
"@ngdeps//tsickle",
"@ngdeps//typescript",
],
)

View File

@ -16,6 +16,7 @@ ng_module(
"//packages/platform-browser",
"//packages/platform-server",
"//packages/router",
"@ngdeps//reflect-metadata",
"@rxjs",
],
)

View File

@ -6,7 +6,11 @@ ng_module(
entry_point = "index.ts",
flat_module_out_file = "flat_module_filename",
module_name = "some_npm_module",
deps = ["//packages/core"],
node_modules = "@ngdeps//typescript:typescript__typings",
deps = [
"//packages/core",
"@ngdeps//@types",
],
)
load(":extract_flat_module_index.bzl", "extract_flat_module_index")

View File

@ -17,5 +17,14 @@ ts_library(
"//packages/compiler-cli/src/ngtsc/metadata",
"//packages/compiler-cli/src/ngtsc/transform",
"//packages/compiler-cli/src/ngtsc/translator",
"@ngdeps//@types/convert-source-map",
"@ngdeps//@types/node",
"@ngdeps//@types/shelljs",
"@ngdeps//@types/source-map",
"@ngdeps//@types/yargs",
"@ngdeps//dependency-graph",
"@ngdeps//magic-string",
"@ngdeps//source-map",
"@ngdeps//typescript",
],
)

View File

@ -13,6 +13,10 @@ ts_library(
"//packages/compiler-cli/src/ngtsc/host",
"//packages/compiler-cli/src/ngtsc/testing",
"//packages/compiler-cli/src/ngtsc/transform",
"@ngdeps//@types/convert-source-map",
"@ngdeps//@types/mock-fs",
"@ngdeps//magic-string",
"@ngdeps//typescript",
],
)
@ -22,5 +26,7 @@ jasmine_node_test(
deps = [
":test_lib",
"//tools/testing:node_no_angular",
"@ngdeps//canonical-path",
"@ngdeps//convert-source-map",
],
)

View File

@ -16,5 +16,7 @@ ts_library(
"//packages/compiler-cli/src/ngtsc/metadata",
"//packages/compiler-cli/src/ngtsc/transform",
"//packages/compiler-cli/src/ngtsc/typecheck",
"@ngdeps//@types/node",
"@ngdeps//typescript",
],
)

View File

@ -15,6 +15,7 @@ ts_library(
"//packages/compiler-cli/src/ngtsc/diagnostics",
"//packages/compiler-cli/src/ngtsc/metadata",
"//packages/compiler-cli/src/ngtsc/testing",
"@ngdeps//typescript",
],
)

View File

@ -11,5 +11,6 @@ ts_library(
module_name = "@angular/compiler-cli/src/ngtsc/diagnostics",
deps = [
"//packages/compiler",
"@ngdeps//typescript",
],
)

View File

@ -9,4 +9,5 @@ ts_library(
"src/**/*.ts",
]),
module_name = "@angular/compiler-cli/src/ngtsc/host",
deps = ["@ngdeps//typescript"],
)

View File

@ -14,5 +14,7 @@ ts_library(
"//packages/compiler",
"//packages/compiler-cli/src/ngtsc/host",
"//packages/compiler-cli/src/ngtsc/util",
"@ngdeps//@types/node",
"@ngdeps//typescript",
],
)

View File

@ -14,6 +14,7 @@ ts_library(
"//packages/compiler-cli/src/ngtsc/host",
"//packages/compiler-cli/src/ngtsc/metadata",
"//packages/compiler-cli/src/ngtsc/testing",
"@ngdeps//typescript",
],
)

View File

@ -14,5 +14,7 @@ ts_library(
"//packages/compiler-cli/src/ngtsc/host",
"//packages/compiler-cli/src/ngtsc/metadata",
"//packages/compiler-cli/src/ngtsc/util",
"@ngdeps//@types/node",
"@ngdeps//typescript",
],
)

View File

@ -10,5 +10,6 @@ ts_library(
]),
deps = [
"//packages:types",
"@ngdeps//typescript",
],
)

View File

@ -6,6 +6,8 @@
* found in the LICENSE file at https://angular.io/license
*/
///<reference types="jasmine"/>
import * as path from 'path';
import * as ts from 'typescript';

View File

@ -17,5 +17,6 @@ ts_library(
"//packages/compiler-cli/src/ngtsc/translator",
"//packages/compiler-cli/src/ngtsc/typecheck",
"//packages/compiler-cli/src/ngtsc/util",
"@ngdeps//typescript",
],
)

View File

@ -11,5 +11,7 @@ ts_library(
module_name = "@angular/compiler-cli/src/ngtsc/util",
deps = [
"//packages:types",
"@ngdeps//@types/node",
"@ngdeps//typescript",
],
)

View File

@ -12,6 +12,7 @@ ts_library(
"//packages:types",
"//packages/compiler-cli/src/ngtsc/testing",
"//packages/compiler-cli/src/ngtsc/util",
"@ngdeps//typescript",
],
)

View File

@ -17,6 +17,7 @@ ts_library(
"//packages:types",
"//packages/compiler",
"//packages/compiler-cli",
"@ngdeps//typescript",
],
)
@ -31,6 +32,7 @@ ts_library(
":test_utils",
"//packages/compiler",
"//packages/compiler-cli",
"@ngdeps//typescript",
],
)
@ -45,6 +47,7 @@ jasmine_node_test(
"//packages/common:npm_package",
"//packages/core",
"//tools/testing:node",
"@ngdeps//minimist",
],
)
@ -59,6 +62,7 @@ ts_library(
":test_utils",
"//packages/compiler",
"//packages/compiler-cli",
"@ngdeps//typescript",
],
)
@ -76,6 +80,8 @@ jasmine_node_test(
":ngc_lib",
"//packages/core",
"//tools/testing:node",
"@ngdeps//minimist",
"@ngdeps//tsickle",
],
)
@ -90,6 +96,7 @@ ts_library(
":test_utils",
"//packages/compiler",
"//packages/compiler-cli",
"@ngdeps//typescript",
],
)
@ -118,6 +125,7 @@ ts_library(
":test_utils",
"//packages/compiler",
"//packages/compiler-cli",
"@ngdeps//typescript",
],
)

View File

@ -11,6 +11,7 @@ ts_library(
"//packages/compiler",
"//packages/compiler-cli",
"//packages/compiler/test:test_utils",
"@ngdeps//typescript",
],
)

View File

@ -12,6 +12,7 @@ ts_library(
"//packages/compiler-cli",
"//packages/compiler-cli/test:test_utils",
"//packages/core",
"@ngdeps//typescript",
],
)
@ -24,6 +25,7 @@ ts_library(
":mocks",
"//packages/compiler-cli",
"//packages/compiler-cli/test:test_utils",
"@ngdeps//typescript",
],
)
@ -53,6 +55,7 @@ ts_library(
"//packages/compiler-cli",
"//packages/compiler-cli/test:test_utils",
"//packages/language-service",
"@ngdeps//typescript",
],
)
@ -83,6 +86,7 @@ ts_library(
"//packages/compiler-cli/test:test_utils",
"//packages/compiler/test:test_utils",
"//packages/language-service",
"@ngdeps//typescript",
],
)

View File

@ -10,6 +10,7 @@ ts_library(
"//packages/compiler-cli",
"//packages/compiler-cli/test:test_utils",
"//packages/core",
"@ngdeps//typescript",
],
)

View File

@ -10,6 +10,7 @@ ts_library(
deps = [
"//packages/compiler-cli/src/ngcc",
"//packages/compiler-cli/test:test_utils",
"@ngdeps//@types/mock-fs",
],
)
@ -23,5 +24,10 @@ jasmine_node_test(
deps = [
":ngcc_lib",
"//tools/testing:node_no_angular",
"@ngdeps//@types/mock-fs",
"@ngdeps//canonical-path",
"@ngdeps//convert-source-map",
"@ngdeps//shelljs",
"@ngdeps//yargs",
],
)

View File

@ -8,6 +8,7 @@ ts_library(
"//packages/compiler",
"//packages/compiler-cli",
"//packages/compiler-cli/test:test_utils",
"@ngdeps//typescript",
],
)
@ -20,5 +21,6 @@ jasmine_node_test(
deps = [
":ngtsc_lib",
"//tools/testing:node_no_angular",
"@ngdeps//minimist",
],
)

View File

@ -136,8 +136,7 @@ export function setupBazelTo(basePath: string) {
}
// Link typescript
const typescriptSource =
path.join(sources, 'angular/external/angular_deps/node_modules/typescript');
const typescriptSource = path.join(sources, 'angular/external/ngdeps/node_modules/typescript');
const typescriptDest = path.join(nodeModulesPath, 'typescript');
if (fs.existsSync(typescriptSource)) {
fs.symlinkSync(typescriptSource, typescriptDest);

View File

@ -12,6 +12,7 @@ ts_library(
"//packages/compiler/test:test_utils",
"//packages/core",
"//packages/platform-browser",
"@ngdeps//typescript",
],
)
@ -28,5 +29,6 @@ jasmine_node_test(
":test_lib",
"//packages/core",
"//tools/testing:node",
"@ngdeps//source-map",
],
)

View File

@ -22,6 +22,7 @@ ts_library(
"//packages:types",
"//packages/compiler",
"//packages/compiler-cli",
"@ngdeps//typescript",
],
)
@ -61,6 +62,7 @@ ts_library(
"//packages/compiler/test/expression_parser/utils",
"//packages/compiler/testing",
"//packages/core",
"@ngdeps//typescript",
],
)
@ -77,6 +79,8 @@ jasmine_node_test(
":test_node_only_lib",
"//packages/core",
"//tools/testing:node",
"@ngdeps//base64-js",
"@ngdeps//source-map",
],
)

View File

@ -15,5 +15,6 @@ ng_module(
"//packages:types",
"//packages/compiler",
"//packages/core",
"@ngdeps//@types/node",
],
)

View File

@ -14,6 +14,7 @@ ng_module(
deps = [
"//packages:types",
"//packages/compiler",
"@ngdeps//zone.js",
"@rxjs",
"@rxjs//operators",
],

View File

@ -29,6 +29,7 @@ ts_library(
"//packages/private/testing",
"//packages/router",
"//packages/router/testing",
"@ngdeps//zone.js",
"@rxjs",
"@rxjs//operators",
],
@ -67,6 +68,9 @@ jasmine_node_test(
"//packages/platform-server",
"//packages/platform-server/testing",
"//tools/testing:node",
"@ngdeps//base64-js",
"@ngdeps//source-map",
"@ngdeps//zone.js",
],
)

View File

@ -35,6 +35,9 @@ ng_rollup_bundle(
js_expected_symbol_test(
name = "symbol_test",
src = ":bundle.min_debug.js",
data = [
"@ngdeps//typescript",
],
golden = ":bundle.golden_symbols.json",
tags = [
"ivy-local",

View File

@ -59,6 +59,9 @@ jasmine_node_test(
js_expected_symbol_test(
name = "symbol_test",
src = ":bundle.min_debug.js",
data = [
"@ngdeps//typescript",
],
golden = ":bundle.golden_symbols.json",
tags = [
"ivy-local",

View File

@ -54,6 +54,9 @@ jasmine_node_test(
js_expected_symbol_test(
name = "symbol_test",
src = ":bundle.min_debug.js",
data = [
"@ngdeps//typescript",
],
golden = ":bundle.golden_symbols.json",
)

View File

@ -11,6 +11,7 @@ ts_library(
],
deps = [
"//packages/core",
"@ngdeps//typescript",
],
)
@ -49,5 +50,8 @@ jasmine_node_test(
js_expected_symbol_test(
name = "symbol_test",
src = ":bundle.min_debug.js",
data = [
"@ngdeps//typescript",
],
golden = ":bundle.golden_symbols.json",
)

View File

@ -31,6 +31,7 @@ ng_rollup_bundle(
"//packages/common",
"//packages/core",
"//packages/core/test/bundling/util:reflect_metadata",
"@ngdeps//reflect-metadata",
],
)
@ -65,6 +66,9 @@ jasmine_node_test(
js_expected_symbol_test(
name = "symbol_test",
src = ":bundle.min_debug.js",
data = [
"@ngdeps//typescript",
],
golden = ":bundle.golden_symbols.json",
tags = [
"ivy-local",
@ -75,7 +79,7 @@ js_expected_symbol_test(
genrule(
name = "tslib",
srcs = [
"@angular_deps//:node_modules/tslib/tslib.js",
"@ngdeps//node_modules/tslib:tslib.js",
],
outs = [
"tslib.js",

View File

@ -35,6 +35,7 @@ ng_rollup_bundle(
"//packages/core/test/bundling/util:reflect_metadata",
"//packages/platform-browser",
"//packages/platform-browser-dynamic",
"@ngdeps//reflect-metadata",
],
)
@ -71,6 +72,9 @@ jasmine_node_test(
js_expected_symbol_test(
name = "symbol_test",
src = ":bundle.min_debug.js",
data = [
"@ngdeps//typescript",
],
golden = ":bundle.golden_symbols.json",
tags = [
"ivy-local",
@ -81,7 +85,7 @@ js_expected_symbol_test(
genrule(
name = "tslib",
srcs = [
"@angular_deps//:node_modules/tslib/tslib.js",
"@ngdeps//node_modules/tslib:tslib.js",
],
outs = [
"tslib.js",

View File

@ -40,6 +40,7 @@ ts_library(
deps = [
"//packages/platform-browser",
"//packages/platform-server",
"@ngdeps//zone.js",
],
)
@ -60,6 +61,7 @@ jasmine_node_test(
],
deps = [
":render3_node_lib",
"@ngdeps//zone.js",
],
)

View File

@ -12,16 +12,6 @@ ts_library(
],
)
ts_library(
name = "ivy_node_lib",
testonly = 1,
srcs = [],
deps = [
":ivy_lib",
"//packages/core/test/render3:domino",
],
)
jasmine_node_test(
name = "ivy",
bootstrap = [
@ -31,6 +21,7 @@ jasmine_node_test(
"ivy-jit",
],
deps = [
":ivy_node_lib",
":ivy_lib",
"//packages/core/test/render3:domino",
],
)

View File

@ -13,5 +13,7 @@ ng_module(
deps = [
"//packages:types",
"//packages/core",
"@ngdeps//@types/jasmine",
"@ngdeps//zone.js",
],
)

View File

@ -13,6 +13,7 @@ ts_library(
deps = [
"//packages/common",
"//packages/core",
"@ngdeps//@angular-devkit/schematics",
"@rxjs",
],
)
@ -29,6 +30,7 @@ ts_library(
":ng-add",
"//packages/common",
"//packages/core",
"@ngdeps//@angular-devkit/schematics",
"@rxjs",
"@rxjs//operators",
],
@ -39,5 +41,6 @@ jasmine_node_test(
deps = [
":test_lib",
"//packages/elements/schematics:collection",
"@ngdeps//@schematics/angular",
],
)

View File

@ -1,5 +1,4 @@
load("//tools:defaults.bzl", "jasmine_node_test", "ts_library")
load("@build_bazel_rules_typescript//:defs.bzl", "ts_web_test_suite")
load("//tools:defaults.bzl", "jasmine_node_test", "ts_library", "ts_web_test_suite")
ts_library(
name = "test_lib",
@ -23,10 +22,10 @@ filegroup(
name = "elements_test_bootstrap_scripts",
# do not sort
srcs = [
"@angular_deps//:node_modules/@webcomponents/custom-elements/src/native-shim.js",
"@angular_deps//:node_modules/reflect-metadata/Reflect.js",
"@angular_deps//:node_modules/zone.js/dist/zone.js",
"@angular_deps//:node_modules/zone.js/dist/zone-testing.js",
"@ngdeps//node_modules/@webcomponents/custom-elements:src/native-shim.js",
"@ngdeps//node_modules/reflect-metadata:Reflect.js",
"@ngdeps//node_modules/zone.js:dist/zone.js",
"@ngdeps//node_modules/zone.js:dist/zone-testing.js",
],
)
@ -37,8 +36,6 @@ ts_web_test_suite(
],
# do not sort
deps = [
"@angular_deps//:node_modules/tslib/tslib.js",
"//tools/testing:browser",
":test_lib",
],
)

View File

@ -28,5 +28,6 @@ ts_web_test_suite(
name = "test_web",
deps = [
":test_lib",
"@ngdeps//karma",
],
)

View File

@ -16,6 +16,8 @@ ts_library(
"//packages/compiler",
"//packages/compiler-cli",
"//packages/core",
"@ngdeps//@types/node",
"@ngdeps//typescript",
],
)

View File

@ -9,7 +9,9 @@ ls_rollup_bundle(
"fs": "fs",
},
license_banner = "banner.js.txt",
node_modules = "//:node_modules",
visibility = ["//packages/language-service:__pkg__"],
deps = ["//packages/language-service"],
deps = [
"//packages/language-service",
"@ngdeps//tslib",
],
)

View File

@ -12,7 +12,7 @@ without having to provide all of the angular specific peer dependencies.
load(
"@build_bazel_rules_nodejs//internal/rollup:rollup_bundle.bzl",
"ROLLUP_ATTRS",
"rollup_module_mappings_aspect",
"ROLLUP_DEPS_ASPECTS",
"run_rollup",
"run_uglify",
"write_rollup_config",
@ -28,6 +28,11 @@ _ROLLUP_OUTPUTS = {
"build_umd_min": "%{name}.umd.min.js",
}
DEPS_ASPECTS = [esm5_outputs_aspect]
# Workaround skydoc bug which assumes ROLLUP_DEPS_ASPECTS is a str type
[DEPS_ASPECTS.append(a) for a in ROLLUP_DEPS_ASPECTS]
def _ls_rollup_bundle(ctx):
esm5_sources = flatten_esm5(ctx)
rollup_config = write_rollup_config(
@ -42,10 +47,11 @@ def _ls_rollup_bundle(ctx):
ls_rollup_bundle = rule(
implementation = _ls_rollup_bundle,
attrs = dict(ROLLUP_ATTRS, **{
"deps": attr.label_list(aspects = [
rollup_module_mappings_aspect,
esm5_outputs_aspect,
]),
"deps": attr.label_list(
doc = """Other targets that provide JavaScript files.
Typically this will be `ts_library` or `ng_module` targets.""",
aspects = DEPS_ASPECTS,
),
}),
outputs = _ROLLUP_OUTPUTS,
)

View File

@ -9,6 +9,7 @@ ts_library(
"//packages/compiler",
"//packages/compiler-cli/test:test_utils",
"//packages/language-service",
"@ngdeps//typescript",
],
)

View File

@ -15,6 +15,8 @@ ng_module(
"//packages:types",
"//packages/common",
"//packages/core",
"@ngdeps//@types/hammerjs",
"@ngdeps//zone.js",
],
)

View File

@ -12,6 +12,7 @@ ng_module(
"//packages/core",
"//packages/core/testing",
"//packages/platform-browser",
"@ngdeps//@types/jasmine",
"@rxjs",
],
)

View File

@ -21,6 +21,8 @@ ng_module(
"//packages/platform-browser",
"//packages/platform-browser-dynamic",
"//packages/platform-browser/animations",
"@ngdeps//@types/node",
"@ngdeps//zone.js",
"@rxjs",
],
)

View File

@ -12,6 +12,7 @@ ts_library(
tsconfig = ":tsconfig.json",
deps = [
"//packages/service-worker/config",
"@ngdeps//@types/node",
],
)

View File

@ -17,7 +17,10 @@
"inlineSourceMap": true,
"lib": ["es2015"],
"target": "es5",
"typeRoots": []
"typeRoots": [],
"types": [
"node"
]
},
"files": [
"main.ts",

View File

@ -1,7 +1,6 @@
package(default_visibility = ["//visibility:public"])
load("@build_bazel_rules_typescript//:defs.bzl", "ts_library")
load("//tools:defaults.bzl", "ng_rollup_bundle")
load("//tools:defaults.bzl", "ng_rollup_bundle", "ts_library")
ts_library(
name = "worker",
@ -13,6 +12,7 @@ ts_library(
exclude = ["main.ts"],
),
tsconfig = ":tsconfig.json",
deps = ["@ngdeps//@types/node"],
)
ts_library(

View File

@ -14,7 +14,8 @@
"inlineSourceMap": true,
"lib": ["es2015", "dom"],
"target": "es2017",
"typeRoots": []
"typeRoots": [],
"types": []
},
"bazelOptions": {
"suppressTsconfigOverrideWarnings": true

View File

@ -16,6 +16,7 @@ ng_module(
"//packages/core",
"//packages/platform-browser",
"//packages/platform-browser-dynamic",
"@ngdeps//zone.js",
],
)

View File

@ -74,7 +74,7 @@ export function createWithEachNg1VersionFn(setNg1: typeof setAngularJSGlobal) {
document.body.removeChild(script);
resolve();
};
script.src = `base/angular_deps/node_modules/${file}`;
script.src = `base/ngdeps/node_modules/${file}`;
document.body.appendChild(script);
})),
Promise.resolve())