@@ -43,15 +43,15 @@ def _yarn_modules_impl(ctx):
4343 sha256 = "472add7ad141c75811f93dca421e2b7456045504afacec814b0565f092156250" ,
4444 stripPrefix = "package" ,
4545 )
46-
46+
4747 # Copy over or create the package.json file
4848 if ctx .attr .package_json :
4949 package_json_file = ctx .path (ctx .attr .package_json )
5050 execute (ctx , ["cp" , package_json_file , "package.json" ])
5151 else :
5252 ctx .file ("package.json" , _create_package_json_content (ctx ).to_json ())
5353
54-
54+
5555 # Copy the parse_yarn_lock script and yarn.js over here.
5656 execute (ctx , ["cp" , parse_yarn_lock_js , "internal/parse_yarn_lock.js" ])
5757 execute (ctx , ["cp" , clean_node_modules_js , "internal/clean_node_modules.js" ])
@@ -64,7 +64,7 @@ def _yarn_modules_impl(ctx):
6464 fail ("Required install tool '%s' is not in the PATH" % tool , "install_tools" )
6565 install_path .append (tool_path .dirname )
6666 install_path .append ("$PATH" )
67-
67+
6868 # Build node_modules via 'yarn install'
6969 execute (ctx , [node , yarn_js , "install" ], quiet = True , environment = {
7070 "PATH" : ":" .join (install_path ),
@@ -73,7 +73,7 @@ def _yarn_modules_impl(ctx):
7373 # Sadly, pre-existing BUILD.bazel files located in npm modules can
7474 # screw up package boudaries. Remove these.
7575 execute (ctx , [node , "internal/clean_node_modules.js" ], quiet = True )
76-
76+
7777 # Run the script and save the stdout to our BUILD file(s)
7878 parse_args = ["--resolve=%s:%s" % (k , v ) for k , v in ctx .attr .resolutions .items ()]
7979 result = execute (ctx , [node , "internal/parse_yarn_lock.js" ] + parse_args , quiet = True )
@@ -130,11 +130,11 @@ yarn_modules = repository_rule(
130130 single_file = True ,
131131 ),
132132 # If specififed, augment the PATH environment variable with these
133- # tools during 'yarn install'.
133+ # tools during 'yarn install'.
134134 "install_tools" : attr .string_list (),
135135 "package_json" : attr .label (
136136 mandatory = False ,
137- allow_files = FileType ( ["package.json" ]) ,
137+ allow_files = ["package.json" ],
138138 ),
139139 "post_install" : attr .string_list (),
140140 "deps" : attr .string_dict (mandatory = False ),
0 commit comments