Return last node.js version matching the filter
(lts=False)
| 1042 | |
| 1043 | |
| 1044 | def _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 | |
| 1065 | def get_last_stable_node_version(): |
no test coverage detected