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

Patch fs.Stats() #251

Open
kashav opened this issue Aug 19, 2024 · 0 comments
Open

Patch fs.Stats() #251

kashav opened this issue Aug 19, 2024 · 0 comments

Comments

@kashav
Copy link

kashav commented Aug 19, 2024

The fs.Stats constructor function is marked as deprecated as of Node v22.0.0 - https://nodejs.org/api/deprecations.html#DEP0180:

Calling fs.Stats class directly with Stats() or new Stats() is deprecated due to being internals, not intended for public use.

It's used all over including for example in gulp/vinyl-fs: gulpjs/vinyl-fs#356, and it's not clear to me what an alternative could be. Would it make sense to patch it in this library?

> fs = require("node:fs")
> new fs.Stats()
Stats {
  dev: undefined,
  mode: undefined,
  nlink: undefined,
  uid: undefined,
  gid: undefined,
  rdev: undefined,
  blksize: undefined,
  ino: undefined,
  size: undefined,
  blocks: undefined,
  atimeMs: undefined,
  mtimeMs: undefined,
  ctimeMs: undefined,
  birthtimeMs: undefined
}
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

No branches or pull requests

1 participant