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

feat(node): implement fs.statfs() #22862

Merged
merged 14 commits into from Mar 13, 2024
Merged

Conversation

nayeemrmn
Copy link
Collaborator

Closes #21139.

ext/node/ops/fs.rs Outdated Show resolved Hide resolved
ext/node/polyfills/_fs/_fs_statfs.ts Outdated Show resolved Hide resolved
ext/node/ops/fs.rs Outdated Show resolved Hide resolved
ext/node/ops/fs.rs Outdated Show resolved Hide resolved
ext/node/ops/fs.rs Outdated Show resolved Hide resolved
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, @littledivy any objections?

@@ -12,6 +12,7 @@ export const ArrayPrototypeSlice = (that, ...args) => that.slice(...args);
export const ArrayPrototypeSome = (that, ...args) => that.some(...args);
export const ArrayPrototypeSort = (that, ...args) => that.sort(...args);
export const ArrayPrototypeUnshift = (that, ...args) => that.unshift(...args);
export const BigInt = globalThis.BigInt;
Copy link
Member

Choose a reason for hiding this comment

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

Is BigInt not available in primordials from ext:core/mod.js? If so we should fix it 😬

Comment on lines 177 to 178
#[allow(clippy::disallowed_methods)]
let path = Path::new("Cargo.toml").canonicalize().unwrap();
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't canonicalize() fail if Cargo.toml is not present?

Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure why we need this. The user path argument is shadowed by this hardcoded path to Cargo.toml

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I must have copy-pasted this from my windows playground repo... that's frustrating there was no lint error.

Copy link
Member

@littledivy littledivy left a comment

Choose a reason for hiding this comment

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

Copy link
Member

@littledivy littledivy left a comment

Choose a reason for hiding this comment

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

LGTM!

@nayeemrmn nayeemrmn merged commit f377fce into denoland:main Mar 13, 2024
17 checks passed
@nayeemrmn nayeemrmn deleted the node-statfs branch March 13, 2024 10:58
magurotuna pushed a commit to magurotuna/deno that referenced this pull request Mar 13, 2024
nathanwhit pushed a commit that referenced this pull request Mar 14, 2024
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.

Missing statfs in node:fs
3 participants