MCPcopy Create free account
hub / github.com/chatmail/core / update_package_json

Function update_package_json

scripts/set_core_version.py:54–62  ·  view source on GitHub ↗
(relpath, newversion)

Source from the content-addressed store, hash-verified

52
53
54def update_package_json(relpath, newversion):
55 p = pathlib.Path(relpath)
56 assert p.exists()
57 with open(p) as f:
58 json_data = json.loads(f.read())
59 json_data["version"] = newversion
60 with open(p, "w") as f:
61 json.dump(json_data, f, sort_keys=True, indent=2)
62 f.write("\n")
63
64
65def main():

Callers 1

mainFunction · 0.85

Calls 1

existsMethod · 0.45

Tested by

no test coverage detected