summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/_fs/_fs_write.mjs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2024-06-11 12:41:44 +0100
committerGitHub <noreply@github.com>2024-06-11 11:41:44 +0000
commit6a356aff1380e79d67738c5b43aa2b5fee76600d (patch)
treebe4aadc62a523ff280820958a1a3829f1a18ca7d /ext/node/polyfills/_fs/_fs_write.mjs
parent3d41b486da7dcba49c8a18b45425e356c329d986 (diff)
chore: sync up Node.js test files for v20.11.1 (#24066)
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
Diffstat (limited to 'ext/node/polyfills/_fs/_fs_write.mjs')
-rw-r--r--ext/node/polyfills/_fs/_fs_write.mjs6
1 files changed, 1 insertions, 5 deletions
diff --git a/ext/node/polyfills/_fs/_fs_write.mjs b/ext/node/polyfills/_fs/_fs_write.mjs
index aa23805bf..1ad6ac492 100644
--- a/ext/node/polyfills/_fs/_fs_write.mjs
+++ b/ext/node/polyfills/_fs/_fs_write.mjs
@@ -13,7 +13,6 @@ import * as io from "ext:deno_io/12_io.js";
import * as fs from "ext:deno_fs/30_fs.js";
import {
getValidatedFd,
- showStringCoercionDeprecation,
validateOffsetLengthWrite,
validateStringAfterArrayBufferView,
} from "ext:deno_node/internal/fs/utils.mjs";
@@ -114,9 +113,6 @@ export function write(fd, buffer, offset, length, position, callback) {
// `fs.write(fd, string[, position[, encoding]], callback)`
validateStringAfterArrayBufferView(buffer, "buffer");
- if (typeof buffer !== "string") {
- showStringCoercionDeprecation();
- }
if (typeof position !== "function") {
if (typeof offset === "function") {
@@ -128,7 +124,7 @@ export function write(fd, buffer, offset, length, position, callback) {
length = "utf-8";
}
- const str = String(buffer);
+ const str = buffer;
validateEncoding(str, length);
callback = maybeCallback(position);
buffer = Buffer.from(str, length);