summaryrefslogtreecommitdiff
path: root/ext/node
AgeCommit message (Collapse)Author
2023-11-14fix(ext/node): add APIs perf_hook.performance (#21192)Bartek Iwańczuk
Required for Next.js.
2023-11-13Revert "fix(ext/console): fix inspecting iterators error. (#20720)" (#21191)Bartek Iwańczuk
This reverts commit 0209f7b46954d1b7bf923b4191e5a356ec09622c. Reverting because it causes failures on `main`: https://github.com/denoland/deno/pull/20720#issuecomment-1809166755
2023-11-13fix(ext/console): fix inspecting iterators error. (#20720)Chen Su
Fixes #19776 and #20676.
2023-11-11perf: snapshot runtime ops (#21127)Divy Srivastava
Closes https://github.com/denoland/deno/issues/21135 ~1ms startup time improvement --------- Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com> Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2023-11-11chore(ext/node): use libz-sys w/`zlib-ng` feature in node (#21158)Matt Mastracci
We only want one zlib dependency. Zlib dependencies are reorganized so they use a hidden `__vendored_zlib_ng` flag in cli that enables zlib-ng for both libz-sys (used by ext/node) and flate2 (used by deno_web).
2023-11-11fix(node/http): export globalAgent (#21081)Jacob Hummer
Fixes #21080 Fixes #18312 --------- Signed-off-by: Jacob Hummer <jcbhmr@outlook.com>
2023-11-10fix(ext/node): implement process.geteuid (#21151)Divy Srivastava
Fixes #21097
2023-11-10chore: use pure rust secp256k1 crate (#21154)Divy Srivastava
Saves ~40s in fresh debug build
2023-11-10chore: forward v1.38.1 release commit to main (#21144)denobot
This is the release commit being forwarded back to main for 1.38.1 Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com> Co-authored-by: littledivy <littledivy@users.noreply.github.com>
2023-11-10fix(node/child_process): properly normalize stdio for 'spawnSync' (#21103)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/20782
2023-11-09perf: remove knowledge of promise IDs from deno (#21132)Matt Mastracci
We can move all promise ID knowledge to deno_core, allowing us to better experiment with promise implementation in deno_core. `{un,}refOpPromise(promise)` is equivalent to `{un,}refOp(promise[promiseIdSymbol])`
2023-11-09fix(node): implement createPrivateKey (#20981)Divy Srivastava
Towards #18455
2023-11-07fix(node): cjs export analysis should probe for json files (#21113)David Sherret
Closes #21064
2023-11-07fix(node): inspect ancestor directories when resolving cjs re-exports during ↵David Sherret
analysis (#21104) If a CJS re-export can't be resolved, it will check the ancestor directories, which is more similar to what `require` does at runtime.
2023-11-07fix(node/http): socket.setTimeout (#20930)Gasman
Fixes #20923
2023-11-06fix(ext): use `String#toWellFormed` in ext/webidl and ext/node (#21054)Kenta Moriuchi
Fixes #18802 This PR adds `util.toUSVString` to node:util: ```js import util from "node:util"; util.toUSVString("string\ud801"); // => "string\ufffd" ```
2023-11-05chore(ext/crypto): upgrade ec cratesDivy Srivastava
2023-11-04fix(node): use closest package.json to resolve package.json imports (#21075)David Sherret
2023-11-021.38.0 (#21051)denobot
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-11-01fix(ext/node): adapt dynamic type checking to Node.js behavior (#21014)Kenta Moriuchi
2023-10-31chore: use deno_whoami (#21027)Divy Srivastava
Towards #20996 `deno_whoami` is lightweight on unix and has zero framework dependency on macOS. https://github.com/denoland/deno_whoami --------- Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
2023-10-31fix(ext/node): tty streams extends net socket (#21026)Divy Srivastava
Workaround the circular references issue by using a initializer function to give tty stream class to `initStdin`. Fixes https://github.com/denoland/deno/issues/21024 Fixes https://github.com/denoland/deno/issues/20611 Fixes https://github.com/denoland/deno/issues/20890 Fixes https://github.com/denoland/deno/issues/20336 `create-svelte` works now: ``` divy@mini /t/a> ~/gh/deno/target/debug/deno run -A --unstable --reload npm:create-svelte@latest sveltekit-deno create-svelte version 5.1.1 ┌ Welcome to SvelteKit! │ ◇ Which Svelte app template? │ Skeleton project │ ◇ Add type checking with TypeScript? │ Yes, using JavaScript with JSDoc comments │ ◇ Select additional options (use arrow keys/space bar) │ none │ └ Your project is ready! ✔ Type-checked JavaScript https://www.typescriptlang.org/tsconfig#checkJs Install community-maintained integrations: https://github.com/svelte-add/svelte-add Next steps: 1: cd sveltekit-deno 2: npm install 3: git init && git add -A && git commit -m "Initial commit" (optional) 4: npm run dev -- --open To close the dev server, hit Ctrl-C Stuck? Visit us at https://svelte.dev/chat ``` --------- Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
2023-10-30fix: implement node:tty (#20892)Divy Srivastava
Fixes #21012 Closes https://github.com/denoland/deno/issues/20855 Fixes https://github.com/denoland/deno/issues/20890 Fixes https://github.com/denoland/deno/issues/20611 Fixes https://github.com/denoland/deno/issues/20336 Fixes `create-svelte` from https://github.com/denoland/deno/issues/17248 Fixes more reports here: - https://github.com/denoland/deno/issues/6529#issuecomment-1432690559 - https://github.com/denoland/deno/issues/6529#issuecomment-1522059006 - https://github.com/denoland/deno/issues/6529#issuecomment-1695803570
2023-10-30chore: upgrade rsa to 0.9 (#21016)Divy Srivastava
2023-10-27chore(ext/crypto): upgrade to ring 0.17 (#20824)Divy Srivastava
Ref https://github.com/denoland/deno/issues/18071
2023-10-26fix(unstable/byonm): improve error messages (#20987)David Sherret
This improves the error messages when a specifier can't be resolved from a deno module into an npm package.
2023-10-25chore: update deno_core and port all remaining ops to `op2` (#20954)Bartek Iwańczuk
Signed-off-by: Matt Mastracci <matthew@mastracci.com> Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-10-22fix(polyfill): correctly handle flag when its equal 0 (#20953)sigmaSd
Fixes https://github.com/denoland/deno/issues/20910
2023-10-18fix(ext/node): process.argv0 (#20925)Bartek Iwańczuk
Fixes https://github.com/denoland/deno/issues/20924
2023-10-17fix(node): resolve file.d specifiers in npm packages (#20918)David Sherret
Makes type checking octokit work. Closes #20854
2023-10-13chore: forward v1.37.2 release commit to main (#20897)denobot
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-10-12fix(node/http2): fixes to support grpc (#20712)Bartek Iwańczuk
This commit improves "node:http2" module implementation, by enabling to use "options.createConnection" callback when starting an HTTP2 session. This change enables to pass basic client-side test with "grpc-js/grpc" package. Smaller fixes like "Http2Session.unref()" and "Http2Session.setTimeout()" were handled as well. Fixes #16647
2023-10-08fix(node/buffer): utf8ToBytes should return a Uint8Array (#20769)Aapo Alasuutari
2023-10-07refactor: migrate more ops to op2 macro (#20808)Bartek Iwańczuk
Getting closer...
2023-10-06refactor: migrate ext/node/ops to op2 (#20805)Bartek Iwańczuk
2023-10-05refactor(npm): add referrer when resolving npm package sub path from deno ↵David Sherret
module (#20800) Adds a `referrer` parameter to this function instead of using a fake one.
2023-10-05chore: update to Rust 1.73 (#20781)林炳权
2023-10-05fix(ext/node): implement uv.errname (#20785)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/20617
2023-10-04refactor(node): combine node resolution code for resolving a package subpath ↵David Sherret
from external code (#20791) We had two methods that did the same functionality.
2023-10-03refactor(npm): break up `NpmModuleLoader` and move more methods into the ↵David Sherret
managed `CliNpmResolver` (#20777) Part of https://github.com/denoland/deno/issues/18967
2023-10-02fix(ext/node): don't call undefined nextTick fn (#20724)Luca Casonato
The `process` global is not defined in this file. Fixes #20441 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-09-30perf(node): use faster utf8 byte length in Buffer#from (#20746)Divy Srivastava
Use the `core.byteLength` op for string utf8 length calculation in `node:buffer` ``` # This patch file:///Users/divy/gh/deno/buffer.mjs benchmark time (avg) iter/s (min … max) p75 p99 p995 ----------------------------------------------------------------- ----------------------------- Buffer#from 272.11 ns/iter 3,675,029.3 (268.41 ns … 301.15 ns) 271.62 ns 295.5 ns 301.15 ns # Deno 1.37.1 file:///Users/divy/gh/deno/buffer.mjs benchmark time (avg) iter/s (min … max) p75 p99 p995 ----------------------------------------------------------------- ----------------------------- Buffer#from 411.28 ns/iter 2,431,428.8 (393.82 ns … 439.92 ns) 418.85 ns 434.4 ns 439.92 ns ```
2023-09-30feat(node/os): Add `availableParallelism` (#20745)Rui He
2023-09-28refactor(ext/node): remove dependency on deno_npm and deno_semver (#20718)David Sherret
This is required from BYONM (bring your own node_modules). Part of #18967
2023-09-27fix(ext/node): fix TypeError in Buffer.from with base64url encoding. (#20705)Chen Su
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 .
2023-09-27chore: forward v1.37.1 release commit to main (#20706)denobot
This is the release commit being forwarded back to main for 1.37.1 Co-authored-by: littledivy <littledivy@users.noreply.github.com>
2023-09-26chore: slight cleanup in npm resolvers (#20692)David Sherret
2023-09-26refactor: rewrite ext/node/crypto to op2 macro (#20675)Bartek Iwańczuk
2023-09-24fix(ext/node): Fix invalid length variable reference in blitBuffer (#20648)Aapo Alasuutari
2023-09-24fix(ext/node): simplified array.from + map (#20653)Mikhail
`Array.from` has optional second argument. Calling `map` is not required for this case.