summaryrefslogtreecommitdiff
path: root/ext/node/ops/os
AgeCommit message (Collapse)Author
2024-11-04refactor(runtime/permissions): use concrete error types (#26464)Leo Kettmeir
2024-10-31fix(node): Implement `os.userInfo` properly, add missing `toPrimitive` (#24702)Nathan Whitaker
Fixes the implementation of `os.userInfo`, and adds a missing `toPrimitive` for `tmpdir`. This allows us to enable the corresponding node_compat test.
2024-10-24refactor(ext/node): use concrete error types (#26419)Leo Kettmeir
2024-09-23fix(ext/node): stub cpu_info() for OpenBSD (#25807)Volker Schlecht
Add an implementation of cpu_info() for OpenBSD, that returns a correctly-sized array. Since Rust's libc bindings for OpenBSD do not contain all symbols necessary for a full implementation and it is not planned to add them, this solution at least avoids problems with code that relies on cpu_info() purely for the size of the returned array to derive the number of available CPUs. This addresses https://github.com/denoland/deno/issues/25621
2024-07-26fix(ext/node): read correct CPU usage stats on Linux (#24732)MrEconomical
Fixes #24731 <img width="554" alt="deno_fixed" src="https://github.com/user-attachments/assets/691f2f89-d979-4ca5-be9a-cf51446cd9b2"> The total CPU usage row is ignored and info from `cpu0` and `cpu1` is correctly read. --------- Signed-off-by: MrEconomical <47700125+MrEconomical@users.noreply.github.com>
2024-07-17fix(ext/node): stat.mode on windows (#24434)Divy Srivastava
2024-07-10fix: Add sys permission kinds for node compat (#24242)Adam Gregory
Fixes #24241 * Support "statfs", "username", "getPriority" and "setPriority" kinds for `--allow-sys`. * Check individual permissions in `node:os.userInfo()` instead of a single "userInfo" permission. * Check for "uid" permission in `node:process.geteuid()` instead of "geteuid". * Add missing "homedir" to `SysPermissionDescriptor.kind` union Co-authored-by: Bartek IwaƄczuk <biwanczuk@gmail.com>
2024-07-05fix(node): Implement `fs.lchown` (and `process.getegid`) (#24418)Nathan Whitaker
Closes https://github.com/denoland/deno/issues/21260. Part of https://github.com/denoland/deno/issues/18218. Implements `node:fs.lchown`, and enables the node_compat test for it. The test uses `process.getegid`, which we didn't have implemented, so I went ahead and implemented that as well to get the test working.
2024-06-14chore: upgrade to rust 1.79 (#24207)Satya Rohith
2024-05-16fix(ext/node): homedir() `getpwuid`/`SHGetKnownFolderPath` fallback (#23841)Divy Srivastava
**Unix**: Returns the value of the HOME environment variable if it is set even if it is an empty string. Otherwise, it tries to determine the home directory by invoking the [getpwuid_r](https://linux.die.net/man/3/getpwuid_r) function with the UID of the current user. **Windows**: Returns the value of the USERPROFILE environment variable if it is set and it is not an empty string. Otherwise, it tries to determine the home directory by invoking the [SHGetKnownFolderPath](https://learn.microsoft.com/en-us/windows/win32/api/shlobj_core/nf-shlobj_core-shgetknownfolderpath) function with [FOLDERID_Profile](https://learn.microsoft.com/en-us/windows/win32/shell/knownfolderid). Fixes https://github.com/denoland/deno/issues/23824
2024-04-21fix: Fix some typos in comments (#23470)welfuture
Signed-off-by: welfuture <wellfuture@qq.com>
2024-04-20fix(ext/node): implement process.kill in Rust (#23130)Divy Srivastava
Closes https://github.com/denoland/deno/issues/23056
2024-02-06fix(ext/node): Ensure os.cpus() works on arm64 linux (#22302)Matt Mastracci
`/proc/cpuinfo` on ARM doesn't have the model name per CPU, so we leave those as "unknown".
2024-01-10fix: android support (#19437)cions
<!-- Before submitting a PR, please read https://deno.com/manual/contributing 1. Give the PR a descriptive title. Examples of good title: - fix(std/http): Fix race condition in server - docs(console): Update docstrings - feat(doc): Handle nested reexports Examples of bad title: - fix #7123 - update docs - fix bugs 2. Ensure there is a related issue and it is referenced in the PR text. 3. Ensure there are tests that cover the changes. 4. Ensure `cargo test` passes. 5. Ensure `./tools/format.js` passes without changing files. 6. Ensure `./tools/lint.js` passes. 7. Open as a draft PR if your work is still in progress. The CI won't run all steps, but you can add '[ci]' to a commit message to force it to. 8. If you would like to run the benchmarks on the CI, add the 'ci-bench' label. --> --------- Signed-off-by: Matt Mastracci <matthew@mastracci.com> Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2024-01-01chore: update copyright to 2024 (#21753)David Sherret
2023-12-30fix(ext/node): add process.abort() (#21742)Divy Srivastava
2023-12-28fix(node): Implement os.cpus() (#21697)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/21666 Zero added dependency and tries to match the libuv implementation