@@ -3110,6 +3110,22 @@ releases.
3110
3110
Use [ ` process.getActiveResourcesInfo() ` ] [ ] to get a list of types of active
3111
3111
resources and not the actual references.
3112
3112
3113
+ ### DEP0162: ` fs.write() ` , ` fs.writeFileSync() ` coercion to string
3114
+
3115
+ <!-- YAML
3116
+ changes:
3117
+ - version: REPLACEME
3118
+ pr-url: https://github.com/nodejs/node/pull/42149
3119
+ description: Documentation-only deprecation.
3120
+ -->
3121
+
3122
+ Type: Documentation-only
3123
+
3124
+ Implicit coercion of objects with own ` toString ` property, passed as second
3125
+ parameter in [ ` fs.write() ` ] [ ] , [ ` fs.writeFile() ` ] [ ] , [ ` fs.appendFile() ` ] [ ] ,
3126
+ [ ` fs.writeFileSync() ` ] [ ] , and [ ` fs.appendFileSync() ` ] [ ] is deprecated.
3127
+ Convert them to primitive strings.
3128
+
3113
3129
[ Legacy URL API ] : url.md#legacy-url-api
3114
3130
[ NIST SP 800-38D ] : https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
3115
3131
[ RFC 6066 ] : https://tools.ietf.org/html/rfc6066#section-3
@@ -3158,6 +3174,8 @@ resources and not the actual references.
3158
3174
[ `events.listenerCount(emitter, eventName)` ] : events.md#eventslistenercountemitter-eventname
3159
3175
[ `fs.FileHandle` ] : fs.md#class-filehandle
3160
3176
[ `fs.access()` ] : fs.md#fsaccesspath-mode-callback
3177
+ [ `fs.appendFile()` ] : fs.md#fsappendfilepath-data-options-callback
3178
+ [ `fs.appendFileSync()` ] : fs.md#fsappendfilesyncpath-data-options
3161
3179
[ `fs.createReadStream()` ] : fs.md#fscreatereadstreampath-options
3162
3180
[ `fs.createWriteStream()` ] : fs.md#fscreatewritestreampath-options
3163
3181
[ `fs.exists(path, callback)` ] : fs.md#fsexistspath-callback
@@ -3168,6 +3186,9 @@ resources and not the actual references.
3168
3186
[ `fs.read()` ] : fs.md#fsreadfd-buffer-offset-length-position-callback
3169
3187
[ `fs.readSync()` ] : fs.md#fsreadsyncfd-buffer-offset-length-position
3170
3188
[ `fs.stat()` ] : fs.md#fsstatpath-options-callback
3189
+ [ `fs.write()` ] : fs.md#fswritefd-buffer-offset-length-position-callback
3190
+ [ `fs.writeFile()` ] : fs.md#fswritefilefile-data-options-callback
3191
+ [ `fs.writeFileSync()` ] : fs.md#fswritefilesyncfile-data-options
3171
3192
[ `http.ClientRequest` ] : http.md#class-httpclientrequest
3172
3193
[ `http.IncomingMessage` ] : http.md#class-httpincomingmessage
3173
3194
[ `http.ServerResponse` ] : http.md#class-httpserverresponse
0 commit comments