Skip to content

Commit

Permalink
fix(cypress): use depsets for runfiles and data (#3240)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmeku authored and alexeagle committed Jan 20, 2022
1 parent 925d5fb commit 4889a1a
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 @@ -156,7 +156,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 @@ -95,26 +95,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 4889a1a

Please sign in to comment.