File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -209,15 +209,16 @@ def _update_ts_packages_version(new_version: str) -> None:
209209 new_lines : list [str ] = []
210210
211211 for line in file_lines :
212+ new_line = line
212213 if '"version"' in line :
213214 # capture: "version": "1.2.3" (comma optional)
214215 left , right = line .split (":" )
215216 start = right .index ('"' )
216217 end = right [start + 1 :].index ('"' ) + start
217218 old_version = right [start + 1 : end + 1 ]
218- line = ":" .join ([left , right [:start ] + f'"{ new_version } "' + right [end + 2 :]])
219+ new_line = ":" .join ([left , right [:start ] + f'"{ new_version } "' + right [end + 2 :]])
219220 updated = True
220- new_lines .append (line )
221+ new_lines .append (new_line )
221222
222223 if updated :
223224 package_json_path .write_text ("\n " .join (new_lines ) + "\n " )
You can’t perform that action at this time.
0 commit comments