(v: str)
| 999 | |
| 1000 | |
| 1001 | def _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 | |
| 1013 | def _is_release_version(v: str) -> bool: |
no test coverage detected