Skip to content

Commit

Permalink
fix: DeclarationInfo needs to include the node_modules symlink to the…
Browse files Browse the repository at this point in the history
… pnpm store. (#107)

Fixes the issue observed in aspect-build/rules_ts#18
  • Loading branch information
alexeagle committed May 18, 2022
1 parent 9ba0539 commit 61b1867
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions js/private/link_js_package.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ deps of link_js_package must be in the same package or in a parent package.""" %
]
if virtual_store_directory:
# Provide an output group that provides a single file which is the
# package director for use in $(execpath) and $(rootpath).
# package directory for use in $(execpath) and $(rootpath).
# Output group name must match pnpm_utils.package_directory_output_group
result.append(OutputGroupInfo(package_directory = depset([virtual_store_directory])))

Expand Down Expand Up @@ -257,7 +257,9 @@ def _impl_direct(ctx):
runfiles = ctx.runfiles([root_symlink]).merge(ctx.attr.src[DefaultInfo].data_runfiles),
),
ctx.attr.src[_LinkJsPackageInfo],
ctx.attr.src[DeclarationInfo],
declaration_info(
declarations = depset([root_symlink], transitive = [ctx.attr.src[DeclarationInfo].transitive_declarations]),
),
]
if OutputGroupInfo in ctx.attr.src:
result.append(ctx.attr.src[OutputGroupInfo])
Expand Down

0 comments on commit 61b1867

Please sign in to comment.