build(bazel): remove deprecated rules_nodejs NodeModuleInfo provider (#31019)

PR Close #31019
This commit is contained in:
Greg Magolan 2019-06-19 15:17:37 -07:00 committed by Kara Erickson
parent 5bec683692
commit 72e4ff7591
2 changed files with 5 additions and 7 deletions

View File

@ -15,7 +15,6 @@ load(
)
load(
"@build_bazel_rules_nodejs//internal/common:node_module_info.bzl",
_NodeModuleInfo = "NodeModuleInfo",
_NodeModuleSources = "NodeModuleSources",
_collect_node_modules_aspect = "collect_node_modules_aspect",
)
@ -24,7 +23,6 @@ load(
_TsConfigInfo = "TsConfigInfo",
)
NodeModuleInfo = _NodeModuleInfo
NodeModuleSources = _NodeModuleSources
collect_node_modules_aspect = _collect_node_modules_aspect

View File

@ -14,7 +14,7 @@ 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:node_module_info.bzl", "NodeModuleInfo")
load("@build_bazel_rules_nodejs//internal/common:node_module_info.bzl", "NodeModuleSources")
load("@build_bazel_rules_nodejs//internal/common:sources_aspect.bzl", "sources_aspect")
load(
"@build_bazel_rules_nodejs//internal/rollup:rollup_bundle.bzl",
@ -292,9 +292,9 @@ def _ng_package_impl(ctx):
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.
# These deps are identified by the NodeModuleSources provider.
for d in ctx.attr.deps:
if NodeModuleInfo in d:
if NodeModuleSources in d:
node_modules_files += _filter_js_inputs(d.files)
esm5_rollup_inputs = depset(node_modules_files, transitive = [esm5_sources])
@ -396,8 +396,8 @@ def _ng_package_impl(ctx):
devfiles = depset()
if ctx.attr.include_devmode_srcs:
for d in ctx.attr.deps:
if not NodeModuleInfo in d:
devfiles = depset(transitive = [devfiles, d.files, d.node_sources])
if hasattr(d, "node_sources"):
devfiles = depset(transitive = [devfiles, d.node_sources])
# Re-use the create_package function from the nodejs npm_package rule.
package_dir = create_package(