Skip to content

Commit

Permalink
fix(cypress): use depsets for runfiles and data
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmeku committed Jan 14, 2022
1 parent d2f9c41 commit 47a73b1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion internal/node/node.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def _join(*elements):
def _nodejs_binary_impl(ctx, data = [], runfiles = [], expanded_args = []):
node_modules_manifest = write_node_modules_manifest(ctx, link_workspace_root = ctx.attr.link_workspace_root)
node_modules_depsets = []
data = ctx.attr.data + data
data = depset(ctx.attr.data + data).to_list()

# Also include files from npm fine grained deps as inputs.
# These deps are identified by the ExternalNpmPackageInfo provider.
Expand Down
13 changes: 6 additions & 7 deletions packages/cypress/internal/cypress_web_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -94,26 +94,25 @@ def _cypress_web_test_impl(ctx):
cypressinfo.cypress_bin_path,
]

runfiles = (
runfiles = depset(
[plugin_wrapper] +
ctx.files.config_file +
ctx.files.cypress_npm_package +
ctx.files.plugin_file +
ctx.files.srcs +
cypressinfo.cypress_files
cypressinfo.cypress_files,
)

data = [
data = depset([
ctx.attr.config_file,
ctx.attr.cypress_npm_package,
ctx.attr.plugin_file,
ctx.attr.srcs,
]
] + ctx.attr.srcs)

return nodejs_test_kwargs["implementation"](
ctx,
data = data,
runfiles = runfiles,
data = data.to_list(),
runfiles = runfiles.to_list(),
expanded_args = expanded_args,
)

Expand Down

0 comments on commit 47a73b1

Please sign in to comment.