Skip to content

Commit

Permalink
doc: deprecate fs.Stats public constructor
Browse files Browse the repository at this point in the history
PR-URL: #51879
Refs: #51681
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Paolo Insogna <[email protected]>
  • Loading branch information
marco-ippolito committed May 2, 2024
1 parent b3a11b5 commit 5e78a20
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
14 changes: 14 additions & 0 deletions doc/api/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -3478,6 +3478,20 @@ Calling `Hash` class directly with `Hash()` or `new Hash()` is
deprecated due to being internals, not intended for public use.
Please use the [`crypto.createHash()`][] method to create Hash instances.

### DEP0180: `fs.Stats` constructor

<!-- YAML
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/51879
description: Documentation-only deprecation.
-->

Type: Documentation-only

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

[NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
[RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3
[RFC 8247 Section 2.4]: https://www.rfc-editor.org/rfc/rfc8247#section-2.4
Expand Down
4 changes: 4 additions & 0 deletions doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -6842,6 +6842,9 @@ i.e. before the `'ready'` event is emitted.
<!-- YAML
added: v0.1.21
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/51879
description: Public constructor is deprecated.
- version: v8.1.0
pr-url: https://github.com/nodejs/node/pull/13173
description: Added times as numbers.
Expand All @@ -6854,6 +6857,7 @@ their synchronous counterparts are of this type.
If `bigint` in the `options` passed to those methods is true, the numeric values
will be `bigint` instead of `number`, and the object will contain additional
nanosecond-precision properties suffixed with `Ns`.
`Stat` objects are not to be created directly using the `new` keyword.
```console
Stats {
Expand Down

0 comments on commit 5e78a20

Please sign in to comment.