mirror of
https://github.com/denoland/deno.git
synced 2024-10-30 09:08:00 -04:00
507f24c474
For the following example, if I set the encoding to `base64url`, it'll throw an unexpected TypeError: ```ts import { Buffer } from "node:buffer"; Buffer.from("IntcImhlbGxvXCI6XCJoZGQvZStpXCJ9Ig", "base64url").toString(); // error: Uncaught TypeError: src.subarray is not a function // const buf = Buffer.from( // ^ // at blitBuffer (ext:deno_node/internal/buffer.mjs:1779:15) // at Uint8Array.base64urlWrite (ext:deno_node/internal/buffer.mjs:691:10) // at Object.write (ext:deno_node/internal/buffer.mjs:2195:11) // at Uint8Array.write (ext:deno_node/internal/buffer.mjs:794:14) // at fromString (ext:deno_node/internal/buffer.mjs:214:22) // at _from (ext:deno_node/internal/buffer.mjs:119:12) // at Function.from (ext:deno_node/internal/buffer.mjs:157:10) // at file:///Users/foodieats/temp/buffer1.ts:3:20 ``` The error caused by `base64urlWrite` function, it should call `forgivingBase64UrlDecode` not `forgivingBase64UrlEncode` Also fixed #20563 . |
||
---|---|---|
.. | ||
_libuv_winerror.ts | ||
_listen.ts | ||
_node.ts | ||
_timingSafeEqual.ts | ||
_utils.ts | ||
ares.ts | ||
async_wrap.ts | ||
buffer.ts | ||
cares_wrap.ts | ||
connection_wrap.ts | ||
constants.ts | ||
crypto.ts | ||
handle_wrap.ts | ||
mod.ts | ||
node_file.ts | ||
node_options.ts | ||
pipe_wrap.ts | ||
README.md | ||
stream_wrap.ts | ||
string_decoder.ts | ||
symbols.ts | ||
tcp_wrap.ts | ||
types.ts | ||
udp_wrap.ts | ||
util.ts | ||
uv.ts |
Internal Bindings
The modules in this directory implement (simulate) C++ bindings implemented in
the ./src/
directory of the Node.js
repository.
These bindings are created in the Node.js source code by using
NODE_MODULE_CONTEXT_AWARE_INTERNAL
.
Please refer to https://github.com/nodejs/node/blob/master/src/README.md for further information.