File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
bazel/ts_project/strict_deps Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 11load ("@aspect_rules_js//js:providers.bzl" , "JsInfo" )
2+ load ("@build_bazel_rules_nodejs//:providers.bzl" , "LinkablePackageInfo" )
23
34# A custom provider to pass along the npm package name for linked npm packages
45NpmPackage = provider ()
56
67def _npm_package_aspect_impl (target , ctx ):
8+ # Extract the module_name provided to an interop compatible ts_project to be made
9+ # available as an imported module by downstream usages.
10+ # TODO: Remove after all interop usage is removed.
11+ if ctx .rule .kind == "ts_project_module" :
12+ package_name = target [LinkablePackageInfo ].package_name
13+ if package_name != "" :
14+ return [NpmPackage (name = package_name )]
15+
716 if (ctx .rule .kind == "npm_link_package_store" ):
817 package_name = ctx .rule .attr .package
918
You can’t perform that action at this time.
0 commit comments