From 28aa489de9cd4f995ec2fc02e2c9d224e89f4c01 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Wed, 10 May 2023 20:06:59 -0400 Subject: feat(compile): unstable npm and node specifier support (#19005) This is the initial support for npm and node specifiers in `deno compile`. The npm packages are included in the binary and read from it via a virtual file system. This also supports the `--node-modules-dir` flag, dependencies specified in a package.json, and npm binary commands (ex. `deno compile --unstable npm:cowsay`) Closes #16632 --- runtime/ops/os/mod.rs | 1 + runtime/ops/os/sys_info.rs | 1 + 2 files changed, 2 insertions(+) (limited to 'runtime/ops') diff --git a/runtime/ops/os/mod.rs b/runtime/ops/os/mod.rs index 911cd327c..b997a89d9 100644 --- a/runtime/ops/os/mod.rs +++ b/runtime/ops/os/mod.rs @@ -339,6 +339,7 @@ fn rss() -> usize { (out, idx) } + #[allow(clippy::disallowed_methods)] let statm_content = if let Ok(c) = std::fs::read_to_string("/proc/self/statm") { c diff --git a/runtime/ops/os/sys_info.rs b/runtime/ops/os/sys_info.rs index 1a9358dc0..795e6bb0a 100644 --- a/runtime/ops/os/sys_info.rs +++ b/runtime/ops/os/sys_info.rs @@ -48,6 +48,7 @@ pub fn loadavg() -> LoadAvg { pub fn os_release() -> String { #[cfg(target_os = "linux")] { + #[allow(clippy::disallowed_methods)] match std::fs::read_to_string("/proc/sys/kernel/osrelease") { Ok(mut s) => { s.pop(); // pop '\n' -- cgit v1.2.3