@@ -1637,6 +1637,9 @@ makeDirectory().catch(console.error); |
1637 | 1637 | <!-- YAML |
1638 | 1638 | added: v10.0.0 |
1639 | 1639 | changes: |
| 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`. |
1640 | 1643 | - version: |
1641 | 1644 | - v20.6.0 |
1642 | 1645 | - v18.19.0 |
@@ -1651,7 +1654,7 @@ changes: |
1651 | 1654 |
|
1652 | 1655 | * `prefix` {string|Buffer|URL} |
1653 | 1656 | * `options` {string|Object} |
1654 | | - * `encoding` {string} **Default:** `'utf8'` |
| 1657 | + * `encoding` {string} **Default:** `'utf8'` (or `'buffer'` if `prefix` is a `Buffer`) |
1655 | 1658 | * Returns: {Promise} Fulfills with the created directory path. |
1656 | 1659 | If `encoding` is `'buffer'`, then the resulting directory |
1657 | 1660 | 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 |
1688 | 1691 |
|
1689 | 1692 | <!-- YAML |
1690 | 1693 | added: 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`. |
1691 | 1698 | --> |
1692 | 1699 |
|
1693 | 1700 | * `prefix` {string|Buffer|URL} |
1694 | 1701 | * `options` {string|Object} |
1695 | | - * `encoding` {string} **Default:** `'utf8'` |
| 1702 | + * `encoding` {string} **Default:** `'utf8'` (or `'buffer'` if `prefix` is a `Buffer`) |
1696 | 1703 | * Returns: {Promise} Fulfills with a Promise for an async-disposable Object: |
1697 | 1704 | * `path` {string|Buffer} The path of the created directory. |
1698 | 1705 | * `remove` {AsyncFunction} A function which removes the created directory. |
@@ -3978,6 +3985,9 @@ See the POSIX mkdir(2) documentation for more details. |
3978 | 3985 | <!-- YAML |
3979 | 3986 | added: v5.10.0 |
3980 | 3987 | changes: |
| 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`. |
3981 | 3991 | - version: |
3982 | 3992 | - v20.6.0 |
3983 | 3993 | - v18.19.0 |
@@ -4008,7 +4018,7 @@ changes: |
4008 | 4018 |
|
4009 | 4019 | * `prefix` {string|Buffer|URL} |
4010 | 4020 | * `options` {string|Object} |
4011 | | - * `encoding` {string} **Default:** `'utf8'` |
| 4021 | + * `encoding` {string} **Default:** `'utf8'` (or `'buffer'` if `prefix` is a `Buffer`) |
4012 | 4022 | * `callback` {Function} |
4013 | 4023 | * `err` {Error} |
4014 | 4024 | * `directory` {string|Buffer} |
@@ -6490,6 +6500,9 @@ See the POSIX mkdir(2) documentation for more details. |
6490 | 6500 | <!-- YAML |
6491 | 6501 | added: v5.10.0 |
6492 | 6502 | changes: |
| 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`. |
6493 | 6506 | - version: |
6494 | 6507 | - v20.6.0 |
6495 | 6508 | - v18.19.0 |
@@ -6504,7 +6517,7 @@ changes: |
6504 | 6517 |
|
6505 | 6518 | * `prefix` {string|Buffer|URL} |
6506 | 6519 | * `options` {string|Object} |
6507 | | - * `encoding` {string} **Default:** `'utf8'` |
| 6520 | + * `encoding` {string} **Default:** `'utf8'` (or `'buffer'` if `prefix` is a `Buffer`) |
6508 | 6521 | * Returns: {string|Buffer} |
6509 | 6522 |
|
6510 | 6523 | Returns 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. |
6521 | 6534 |
|
6522 | 6535 | <!-- YAML |
6523 | 6536 | added: 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`. |
6524 | 6541 | --> |
6525 | 6542 |
|
6526 | 6543 | * `prefix` {string|Buffer|URL} |
6527 | 6544 | * `options` {string|Object} |
6528 | | - * `encoding` {string} **Default:** `'utf8'` |
| 6545 | + * `encoding` {string} **Default:** `'utf8'` (or `'buffer'` if `prefix` is a `Buffer`) |
6529 | 6546 | * Returns: {Object} A disposable object: |
6530 | 6547 | * `path` {string|Buffer} The path of the created directory. |
6531 | 6548 | * `remove` {Function} A function which removes the created directory. |
|