MCPcopy Create free account
hub / github.com/apache/fory / _update_js_version

Function _update_js_version

ci/release.py:989–998  ·  view source on GitHub ↗
(lines, v: str)

Source from the content-addressed store, hash-verified

987
988
989def _update_js_version(lines, v: str):
990 v = _normalize_js_version(v)
991 for index, line in enumerate(lines):
992 if "version" in line:
993 # "version": "0.5.9-beta"
994 for x in ["-alpha", "-beta", "-rc"]:
995 if x in v and v.split(x)[-1].isdigit():
996 v = v.replace(x, x + ".")
997 lines[index] = f' "version": "{v}",\n'
998 break
999
1000
1001def _normalize_js_version(v: str) -> str:

Callers

nothing calls this directly

Calls 2

_normalize_js_versionFunction · 0.85
replaceMethod · 0.45

Tested by

no test coverage detected