Skip to content

Commit 709ec2f

Browse files
authored
fix(cypress): use depsets for runfiles and data (#3240)
1 parent 9bc681d commit 709ec2f

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

internal/node/node.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def _join(*elements):
157157
def _nodejs_binary_impl(ctx, data = [], runfiles = [], expanded_args = []):
158158
node_modules_manifest = write_node_modules_manifest(ctx, link_workspace_root = ctx.attr.link_workspace_root)
159159
node_modules_depsets = []
160-
data = ctx.attr.data + data
160+
data = depset(ctx.attr.data + data).to_list()
161161

162162
# Also include files from npm fine grained deps as inputs.
163163
# These deps are identified by the ExternalNpmPackageInfo provider.

packages/cypress/internal/cypress_web_test.bzl

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,26 +94,25 @@ def _cypress_web_test_impl(ctx):
9494
cypressinfo.cypress_bin_path,
9595
]
9696

97-
runfiles = (
97+
runfiles = depset(
9898
[plugin_wrapper] +
9999
ctx.files.config_file +
100100
ctx.files.cypress_npm_package +
101101
ctx.files.plugin_file +
102102
ctx.files.srcs +
103-
cypressinfo.cypress_files
103+
cypressinfo.cypress_files,
104104
)
105105

106-
data = [
106+
data = depset([
107107
ctx.attr.config_file,
108108
ctx.attr.cypress_npm_package,
109109
ctx.attr.plugin_file,
110-
ctx.attr.srcs,
111-
]
110+
] + ctx.attr.srcs)
112111

113112
return nodejs_test_kwargs["implementation"](
114113
ctx,
115-
data = data,
116-
runfiles = runfiles,
114+
data = data.to_list(),
115+
runfiles = runfiles.to_list(),
117116
expanded_args = expanded_args,
118117
)
119118

0 commit comments

Comments
 (0)