build(bazel): remove deprecated rules_nodejs NodeModuleInfo provider (#31325)
PR Close #31325
This commit is contained in:
parent
29f5582af5
commit
d2d84c4460
|
@ -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
|
||||
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue