Skip to content

Commit

Permalink
doc: deprecate fs.Stats public constructor
Browse files Browse the repository at this point in the history
PR-URL: nodejs#51879
Refs: nodejs#51681
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Paolo Insogna <[email protected]>
  • Loading branch information
marco-ippolito authored and rdw-msft committed Mar 26, 2024
1 parent ca374c3 commit e1a0808
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 @@ -3574,6 +3574,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 @@ -6999,6 +6999,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 @@ -7011,6 +7014,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 e1a0808

Please sign in to comment.