@@ -2274,7 +2274,10 @@ changes:
2274
2274
Creates a unique temporary directory.
2275
2275
2276
2276
Generates six random characters to be appended behind a required
2277
- ` prefix ` to create a unique temporary directory.
2277
+ ` prefix ` to create a unique temporary directory. Due to platform
2278
+ inconsistencies, avoid trailing ` X ` characters in ` prefix ` . Some platforms,
2279
+ notably the BSDs, can return more than six random characters, and replace
2280
+ trailing ` X ` characters in ` prefix ` with random characters.
2278
2281
2279
2282
The created folder path is passed as a string to the callback's second
2280
2283
parameter.
@@ -4267,7 +4270,10 @@ added: v10.0.0
4267
4270
4268
4271
Creates a unique temporary directory and resolves the ` Promise ` with the created
4269
4272
folder path. A unique directory name is generated by appending six random
4270
- characters to the end of the provided ` prefix ` .
4273
+ characters to the end of the provided ` prefix ` . Due to platform
4274
+ inconsistencies, avoid trailing ` X ` characters in ` prefix ` . Some platforms,
4275
+ notably the BSDs, can return more than six random characters, and replace
4276
+ trailing ` X ` characters in ` prefix ` with random characters.
4271
4277
4272
4278
The optional ` options ` argument can be a string specifying an encoding, or an
4273
4279
object with an ` encoding ` property specifying the character encoding to use.
0 commit comments