@@ -3085,6 +3085,22 @@ releases.
3085
3085
Use [ ` process.getActiveResourcesInfo() ` ] [ ] to get a list of types of active
3086
3086
resources and not the actual references.
3087
3087
3088
+ ### DEP0162: ` fs.write() ` , ` fs.writeFileSync() ` coercion to string
3089
+
3090
+ <!-- YAML
3091
+ changes:
3092
+ - version: REPLACEME
3093
+ pr-url: https://github.com/nodejs/node/pull/42149
3094
+ description: Documentation-only deprecation.
3095
+ -->
3096
+
3097
+ Type: Documentation-only
3098
+
3099
+ Implicit coercion of objects with own ` toString ` property, passed as second
3100
+ parameter in [ ` fs.write() ` ] [ ] , [ ` fs.writeFile() ` ] [ ] , [ ` fs.appendFile() ` ] [ ] ,
3101
+ [ ` fs.writeFileSync() ` ] [ ] , and [ ` fs.appendFileSync() ` ] [ ] is deprecated.
3102
+ Convert them to primitive strings.
3103
+
3088
3104
[ Legacy URL API ] : url.md#legacy-url-api
3089
3105
[ NIST SP 800-38D ] : https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
3090
3106
[ RFC 6066 ] : https://tools.ietf.org/html/rfc6066#section-3
@@ -3133,6 +3149,8 @@ resources and not the actual references.
3133
3149
[ `events.listenerCount(emitter, eventName)` ] : events.md#eventslistenercountemitter-eventname
3134
3150
[ `fs.FileHandle` ] : fs.md#class-filehandle
3135
3151
[ `fs.access()` ] : fs.md#fsaccesspath-mode-callback
3152
+ [ `fs.appendFile()` ] : fs.md#fsappendfilepath-data-options-callback
3153
+ [ `fs.appendFileSync()` ] : fs.md#fsappendfilesyncpath-data-options
3136
3154
[ `fs.createReadStream()` ] : fs.md#fscreatereadstreampath-options
3137
3155
[ `fs.createWriteStream()` ] : fs.md#fscreatewritestreampath-options
3138
3156
[ `fs.exists(path, callback)` ] : fs.md#fsexistspath-callback
@@ -3143,6 +3161,9 @@ resources and not the actual references.
3143
3161
[ `fs.read()` ] : fs.md#fsreadfd-buffer-offset-length-position-callback
3144
3162
[ `fs.readSync()` ] : fs.md#fsreadsyncfd-buffer-offset-length-position
3145
3163
[ `fs.stat()` ] : fs.md#fsstatpath-options-callback
3164
+ [ `fs.write()` ] : fs.md#fswritefd-buffer-offset-length-position-callback
3165
+ [ `fs.writeFile()` ] : fs.md#fswritefilefile-data-options-callback
3166
+ [ `fs.writeFileSync()` ] : fs.md#fswritefilesyncfile-data-options
3146
3167
[ `http.ClientRequest` ] : http.md#class-httpclientrequest
3147
3168
[ `http.IncomingMessage` ] : http.md#class-httpincomingmessage
3148
3169
[ `http.ServerResponse` ] : http.md#class-httpserverresponse
0 commit comments