Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -4395,6 +4395,10 @@ the end of the file.
<!-- YAML
added: v0.11.5
changes:
- version: v17.8.0
pr-url: https://github.com/nodejs/node/pull/42149
description: Passing to the `string` parameter an object with an own
`toString` function is deprecated.
- version: v14.12.0
pr-url: https://github.com/nodejs/node/pull/34993
description: The `string` parameter will stringify an object with an
Expand Down Expand Up @@ -4464,6 +4468,10 @@ changes:
description: Passing an invalid callback to the `callback` argument
now throws `ERR_INVALID_ARG_TYPE` instead of
`ERR_INVALID_CALLBACK`.
- version: v17.8.0
pr-url: https://github.com/nodejs/node/pull/42149
description: Passing to the `string` parameter an object with an own
`toString` function is deprecated.
- version: v16.0.0
pr-url: https://github.com/nodejs/node/pull/37460
description: The error returned may be an `AggregateError` if more than one
Expand Down Expand Up @@ -4524,9 +4532,6 @@ The `encoding` option is ignored if `data` is a buffer.
The `mode` option only affects the newly created file. See [`fs.open()`][]
for more details.

If `data` is a plain object, it must have an own (not inherited) `toString`
function property.

```mjs
import { writeFile } from 'fs';
import { Buffer } from 'buffer';
Expand Down Expand Up @@ -5694,6 +5699,10 @@ this API: [`fs.utimes()`][].
<!-- YAML
added: v0.1.29
changes:
- version: v17.8.0
pr-url: https://github.com/nodejs/node/pull/42149
description: Passing to the `data` parameter an object with an own
`toString` function is deprecated.
- version: v14.12.0
pr-url: https://github.com/nodejs/node/pull/34993
description: The `data` parameter will stringify an object with an
Expand Down Expand Up @@ -5723,9 +5732,6 @@ changes:

Returns `undefined`.

If `data` is a plain object, it must have an own (not inherited) `toString`
function property.

The `mode` option only affects the newly created file. See [`fs.open()`][]
for more details.

Expand Down