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

Function _normalize_js_version

ci/release.py:1001–1010  ·  view source on GitHub ↗
(v: str)

Source from the content-addressed store, hash-verified

999
1000
1001def _normalize_js_version(v: str) -> str:
1002 v = v.strip()
1003 v = re.sub(r"-(alpha|beta|rc)(\d+)$", r"-\1.\2", v)
1004 dev_match = re.search(r"(?i)(?:-dev|\\.dev)(\\d+)$", v)
1005 if dev_match:
1006 v = re.sub(r"(?i)(?:-dev|\\.dev)\\d+$", f"-alpha.{dev_match.group(1)}", v)
1007 return v
1008 if re.search(r"(?i)(-snapshot|\\.dev|-dev)$", v):
1009 v = re.sub(r"(?i)(-snapshot|\\.dev|-dev)$", "-alpha.0", v)
1010 return v
1011
1012
1013def _is_release_version(v: str) -> bool:

Callers 2

bump_versionFunction · 0.85
_update_js_versionFunction · 0.85

Calls 1

subMethod · 0.45

Tested by

no test coverage detected