@@ -1637,6 +1637,9 @@ makeDirectory().catch(console.error);
16371637<!-- YAML
16381638added: v10.0.0
16391639changes:
1640+ - version: REPLACEME
1641+ pr-url: https://github.com/nodejs/node/pull/64397
1642+ description: The ` encoding` option now defaults to ` ' buffer' ` if ` prefix` is a ` Buffer` .
16401643 - version:
16411644 - v20.6.0
16421645 - v18.19.0
@@ -1651,7 +1654,7 @@ changes:
16511654
16521655* ` prefix` {string|Buffer|URL}
16531656* ` options` {string|Object}
1654- * ` encoding` {string} **Default:** ` ' utf8' `
1657+ * ` encoding` {string} **Default:** ` ' utf8' ` (or ` ' buffer ' ` if ` prefix ` is a ` Buffer ` )
16551658* Returns: {Promise} Fulfills with the created directory path.
16561659 If ` encoding` is ` ' buffer' ` , then the resulting directory
16571660 path is returned as a {Buffer}. Otherwise, the path is returned as a
@@ -1688,11 +1691,15 @@ characters directly to the `prefix` string. For instance, given a directory
16881691
16891692<!-- YAML
16901693added: v24.4.0
1694+ changes:
1695+ - version: REPLACEME
1696+ pr-url: https://github.com/nodejs/node/pull/64397
1697+ description: The ` encoding` option now defaults to ` ' buffer' ` if ` prefix` is a ` Buffer` .
16911698-->
16921699
16931700* ` prefix` {string|Buffer|URL}
16941701* ` options` {string|Object}
1695- * ` encoding` {string} **Default:** ` ' utf8' `
1702+ * ` encoding` {string} **Default:** ` ' utf8' ` (or ` ' buffer ' ` if ` prefix ` is a ` Buffer ` )
16961703* Returns: {Promise} Fulfills with a Promise for an async-disposable Object:
16971704 * ` path` {string|Buffer} The path of the created directory.
16981705 * ` remove` {AsyncFunction} A function which removes the created directory.
@@ -3978,6 +3985,9 @@ See the POSIX mkdir(2) documentation for more details.
39783985<!-- YAML
39793986added: v5.10.0
39803987changes:
3988+ - version: REPLACEME
3989+ pr-url: https://github.com/nodejs/node/pull/64397
3990+ description: The `encoding` option now defaults to `'buffer'` if `prefix` is a `Buffer`.
39813991 - version:
39823992 - v20.6.0
39833993 - v18.19.0
@@ -4008,7 +4018,7 @@ changes:
40084018
40094019* `prefix` {string|Buffer|URL}
40104020* `options` {string|Object}
4011- * `encoding` {string} **Default:** `'utf8'`
4021+ * `encoding` {string} **Default:** `'utf8'` (or `'buffer'` if `prefix` is a `Buffer`)
40124022* `callback` {Function}
40134023 * `err` {Error}
40144024 * `directory` {string|Buffer}
@@ -6490,6 +6500,9 @@ See the POSIX mkdir(2) documentation for more details.
64906500<!-- YAML
64916501added: v5.10.0
64926502changes:
6503+ - version: REPLACEME
6504+ pr-url: https://github.com/nodejs/node/pull/64397
6505+ description: The ` encoding` option now defaults to ` ' buffer' ` if ` prefix` is a ` Buffer` .
64936506 - version:
64946507 - v20.6.0
64956508 - v18.19.0
@@ -6504,7 +6517,7 @@ changes:
65046517
65056518* ` prefix` {string|Buffer|URL}
65066519* ` options` {string|Object}
6507- * ` encoding` {string} **Default:** ` ' utf8' `
6520+ * ` encoding` {string} **Default:** ` ' utf8' ` (or ` ' buffer ' ` if ` prefix ` is a ` Buffer ` )
65086521* Returns: {string|Buffer}
65096522
65106523Returns the created directory path. If ` encoding` is ` ' buffer' ` , then the
@@ -6521,11 +6534,15 @@ object with an `encoding` property specifying the character encoding to use.
65216534
65226535<!-- YAML
65236536added: v24.4.0
6537+ changes:
6538+ - version: REPLACEME
6539+ pr-url: https://github.com/nodejs/node/pull/64397
6540+ description: The ` encoding` option now defaults to ` ' buffer' ` if ` prefix` is a ` Buffer` .
65246541-->
65256542
65266543* ` prefix` {string|Buffer|URL}
65276544* ` options` {string|Object}
6528- * ` encoding` {string} **Default:** ` ' utf8' `
6545+ * ` encoding` {string} **Default:** ` ' utf8' ` (or ` ' buffer ' ` if ` prefix ` is a ` Buffer ` )
65296546* Returns: {Object} A disposable object:
65306547 * ` path` {string|Buffer} The path of the created directory.
65316548 * ` remove` {Function} A function which removes the created directory.
0 commit comments