()
| 300 | |
| 301 | @memoize |
| 302 | def check_node_version(): |
| 303 | try: |
| 304 | actual, version = _get_node_version_pair(config.NODE_JS) |
| 305 | except Exception as e: |
| 306 | diagnostics.warning('version-check', 'cannot check node version: %s', e) |
| 307 | return |
| 308 | |
| 309 | # Skip the version check is we are running `bun` instead of node. |
| 310 | if version < MINIMUM_NODE_VERSION and 'bun' not in os.path.basename(config.NODE_JS[0]): |
| 311 | expected = '.'.join(str(v) for v in MINIMUM_NODE_VERSION) |
| 312 | diagnostics.warning('version-check', f'node version appears too old (seeing "{actual}", expected "v{expected}")') |
| 313 | |
| 314 | return version |
| 315 | |
| 316 | |
| 317 | def node_reference_types_flags(nodejs): |
no test coverage detected