@@ -3098,6 +3098,22 @@ releases.
3098
3098
Use [ ` process.getActiveResourcesInfo() ` ] [ ] to get a list of types of active
3099
3099
resources and not the actual references.
3100
3100
3101
+ ### DEP0162: ` fs.write() ` , ` fs.writeFileSync() ` coercion to string
3102
+
3103
+ <!-- YAML
3104
+ changes:
3105
+ - version: REPLACEME
3106
+ pr-url: https://github.com/nodejs/node/pull/42149
3107
+ description: Documentation-only deprecation.
3108
+ -->
3109
+
3110
+ Type: Documentation-only
3111
+
3112
+ Implicit coercion of objects with own ` toString ` property, passed as second
3113
+ parameter in [ ` fs.write() ` ] [ ] , [ ` fs.writeFile() ` ] [ ] , [ ` fs.appendFile() ` ] [ ] ,
3114
+ [ ` fs.writeFileSync() ` ] [ ] , and [ ` fs.appendFileSync() ` ] [ ] is deprecated.
3115
+ Convert them to primitive strings.
3116
+
3101
3117
[ Legacy URL API ] : url.md#legacy-url-api
3102
3118
[ NIST SP 800-38D ] : https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
3103
3119
[ RFC 6066 ] : https://tools.ietf.org/html/rfc6066#section-3
@@ -3146,6 +3162,8 @@ resources and not the actual references.
3146
3162
[ `events.listenerCount(emitter, eventName)` ] : events.md#eventslistenercountemitter-eventname
3147
3163
[ `fs.FileHandle` ] : fs.md#class-filehandle
3148
3164
[ `fs.access()` ] : fs.md#fsaccesspath-mode-callback
3165
+ [ `fs.appendFile()` ] : fs.md#fsappendfilepath-data-options-callback
3166
+ [ `fs.appendFileSync()` ] : fs.md#fsappendfilesyncpath-data-options
3149
3167
[ `fs.createReadStream()` ] : fs.md#fscreatereadstreampath-options
3150
3168
[ `fs.createWriteStream()` ] : fs.md#fscreatewritestreampath-options
3151
3169
[ `fs.exists(path, callback)` ] : fs.md#fsexistspath-callback
@@ -3156,6 +3174,9 @@ resources and not the actual references.
3156
3174
[ `fs.read()` ] : fs.md#fsreadfd-buffer-offset-length-position-callback
3157
3175
[ `fs.readSync()` ] : fs.md#fsreadsyncfd-buffer-offset-length-position
3158
3176
[ `fs.stat()` ] : fs.md#fsstatpath-options-callback
3177
+ [ `fs.write()` ] : fs.md#fswritefd-buffer-offset-length-position-callback
3178
+ [ `fs.writeFile()` ] : fs.md#fswritefilefile-data-options-callback
3179
+ [ `fs.writeFileSync()` ] : fs.md#fswritefilesyncfile-data-options
3159
3180
[ `http.ClientRequest` ] : http.md#class-httpclientrequest
3160
3181
[ `http.IncomingMessage` ] : http.md#class-httpincomingmessage
3161
3182
[ `http.ServerResponse` ] : http.md#class-httpserverresponse
0 commit comments