(name: &str)
| 679 | } |
| 680 | |
| 681 | fn is_builtin_nodejs_module(name: &str) -> bool { |
| 682 | const BUILTINS: &[&str] = &[ |
| 683 | // Core modules |
| 684 | "fs", "path", "http", "https", "os", "crypto", "util", "events", |
| 685 | "stream", "buffer", "child_process", "cluster", "dgram", "dns", |
| 686 | "domain", "net", "querystring", "readline", "repl", "tls", "tty", |
| 687 | "url", "v8", "vm", "zlib", "assert", "console", "module", "process", |
| 688 | "timers", "string_decoder", "punycode", "async_hooks", "inspector", |
| 689 | "perf_hooks", "worker_threads", "constants", "sys", "wasi", |
| 690 | // Node prefixed modules |
| 691 | "node:fs", "node:path", "node:http", "node:https", "node:os", |
| 692 | "node:crypto", "node:util", "node:events", "node:stream", "node:buffer", |
| 693 | "node:child_process", "node:cluster", "node:dgram", "node:dns", |
| 694 | "node:net", "node:querystring", "node:readline", "node:tls", "node:url", |
| 695 | "node:v8", "node:vm", "node:zlib", "node:assert", "node:console", |
| 696 | "node:module", "node:process", "node:timers", "node:worker_threads", |
| 697 | // fs submodules |
| 698 | "fs/promises", "node:fs/promises", |
| 699 | // Stream submodules |
| 700 | "stream/promises", "stream/consumers", "stream/web", |
| 701 | // Other common built-ins |
| 702 | "diagnostics_channel", "trace_events", "node:test", |
| 703 | ]; |
| 704 | |
| 705 | // Check exact match |
| 706 | if BUILTINS.contains(&name) { |
| 707 | return true; |
| 708 | } |
| 709 | |
| 710 | // Check if starts with node: prefix |
| 711 | if name.starts_with("node:") { |
| 712 | return true; |
| 713 | } |
| 714 | |
| 715 | false |
| 716 | } |
| 717 | |
| 718 | fn is_builtin_python_module(name: &str) -> bool { |
| 719 | const BUILTINS: &[&str] = &[ |
no outgoing calls
no test coverage detected