MCPcopy Index your code
hub / github.com/ekalinin/nodeenv / _get_last_node_version

Function _get_last_node_version

nodeenv.py:1044–1062  ·  view source on GitHub ↗

Return last node.js version matching the filter

(lts=False)

Source from the content-addressed store, hash-verified

1042
1043
1044def _get_last_node_version(lts=False):
1045 """
1046 Return last node.js version matching the filter
1047 """
1048 print({"x86": is_x86_64_musl(), "risc": is_riscv64(), "lts": lts})
1049
1050 def version_filter(v):
1051 if lts and not v['lts']:
1052 return False
1053
1054 if is_x86_64_musl() and "linux-x64-musl" not in v['files']:
1055 return False
1056 elif is_riscv64() and "linux-riscv64" not in v['files']:
1057 return False
1058
1059 return True
1060
1061 return next((v['version'].lstrip('v')
1062 for v in _get_versions_json() if version_filter(v)), None)
1063
1064
1065def get_last_stable_node_version():

Callers 2

Calls 4

is_x86_64_muslFunction · 0.85
is_riscv64Function · 0.85
_get_versions_jsonFunction · 0.85
version_filterFunction · 0.85

Tested by

no test coverage detected