@@ -2277,7 +2277,10 @@ changes:
2277
2277
Creates a unique temporary directory.
2278
2278
2279
2279
Generates six random characters to be appended behind a required
2280
- ` prefix ` to create a unique temporary directory.
2280
+ ` prefix ` to create a unique temporary directory. Due to platform
2281
+ inconsistencies, avoid trailing ` X ` characters in ` prefix ` . Some platforms,
2282
+ notably the BSDs, can return more than six random characters, and replace
2283
+ trailing ` X ` characters in ` prefix ` with random characters.
2281
2284
2282
2285
The created folder path is passed as a string to the callback's second
2283
2286
parameter.
@@ -4280,7 +4283,10 @@ added: v10.0.0
4280
4283
4281
4284
Creates a unique temporary directory and resolves the ` Promise ` with the created
4282
4285
folder path. A unique directory name is generated by appending six random
4283
- characters to the end of the provided ` prefix ` .
4286
+ characters to the end of the provided ` prefix ` . Due to platform
4287
+ inconsistencies, avoid trailing ` X ` characters in ` prefix ` . Some platforms,
4288
+ notably the BSDs, can return more than six random characters, and replace
4289
+ trailing ` X ` characters in ` prefix ` with random characters.
4284
4290
4285
4291
The optional ` options ` argument can be a string specifying an encoding, or an
4286
4292
object with an ` encoding ` property specifying the character encoding to use.
0 commit comments