Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(node): Implement os.userInfo properly, add missing toPrimitive #24702

Merged
merged 15 commits into from
Nov 1, 2024

Conversation

nathanwhit
Copy link
Member

Fixes the implementation of os.userInfo, and adds a missing toPrimitive for tmpdir. This allows us to enable the corresponding node_compat test.

where
P: NodePermissions + 'static,
{
{
let permissions = state.borrow_mut::<P>();
permissions.check_sys("username", "node:os.userInfo()")?;
permissions.check_sys("userInfo", "node:os.userInfo()")?;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll also have to update parse_sys_kind - or just revert back to username. Probably doesn't matter all too much 😆

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@nathanwhit nathanwhit merged commit 6c6bbeb into denoland:main Nov 1, 2024
17 checks passed
@nathanwhit nathanwhit deleted the node-os branch November 1, 2024 05:18
bartlomieju pushed a commit that referenced this pull request Nov 5, 2024
#24702)

Fixes the implementation of `os.userInfo`, and adds a missing
`toPrimitive` for `tmpdir`. This allows us to enable the corresponding
node_compat test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants