Skip to content

Commit 4889a1a

Browse files
mrmekualexeagle
authored andcommitted
fix(cypress): use depsets for runfiles and data (#3240)
1 parent 925d5fb commit 4889a1a

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
@@ -156,7 +156,7 @@ def _join(*elements):
156156
def _nodejs_binary_impl(ctx, data = [], runfiles = [], expanded_args = []):
157157
node_modules_manifest = write_node_modules_manifest(ctx, link_workspace_root = ctx.attr.link_workspace_root)
158158
node_modules_depsets = []
159-
data = ctx.attr.data + data
159+
data = depset(ctx.attr.data + data).to_list()
160160

161161
# Also include files from npm fine grained deps as inputs.
162162
# 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
@@ -95,26 +95,25 @@ def _cypress_web_test_impl(ctx):
9595
cypressinfo.cypress_bin_path,
9696
]
9797

98-
runfiles = (
98+
runfiles = depset(
9999
[plugin_wrapper] +
100100
ctx.files.config_file +
101101
ctx.files.cypress_npm_package +
102102
ctx.files.plugin_file +
103103
ctx.files.srcs +
104-
cypressinfo.cypress_files
104+
cypressinfo.cypress_files,
105105
)
106106

107-
data = [
107+
data = depset([
108108
ctx.attr.config_file,
109109
ctx.attr.cypress_npm_package,
110110
ctx.attr.plugin_file,
111-
ctx.attr.srcs,
112-
]
111+
] + ctx.attr.srcs)
113112

114113
return nodejs_test_kwargs["implementation"](
115114
ctx,
116-
data = data,
117-
runfiles = runfiles,
115+
data = data.to_list(),
116+
runfiles = runfiles.to_list(),
118117
expanded_args = expanded_args,
119118
)
120119

0 commit comments

Comments
 (0)