summaryrefslogtreecommitdiff
path: root/ext/node/polyfills
AgeCommit message (Collapse)Author
2023-08-10fix(node/async_hooks): don't pop async context frame if stack if empty (#20077)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/20076
2023-08-08fix(fmt): do not insert expr stmt leading semi-colon in do while stmt body ↵David Sherret
(#20093) This is for when semiColons: false Closes #20089
2023-08-04fix(node): polyfill process.title (#20044)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/19777
2023-08-04fix(node): repl._builtinLibs (#20046)Bartek Iwańczuk
Ref https://github.com/denoland/deno/issues/19733
2023-08-02fix(node): node:test reports correct location (#20025)Bartek Iwańczuk
Also removed some noisy output that caused test flakiness.
2023-08-02feat(node): add polyfill for node:test module (#20002)Bartek Iwańczuk
This commit provides basic polyfill for "node:test" module. Currently only top-level "test" function is polyfilled, all remaining functions from that module throw not implemented errors.
2023-07-31feat(node/os): implement getPriority, setPriority & userInfo (#19370)Leo Kettmeir
Takes #4202 over Closes #17850 --------- Co-authored-by: ecyrbe <ecyrbe@gmail.com>
2023-07-31perf: faster node globals access in cjs (#19997)Luca Casonato
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-07-25fix(node): add writable and readable fields to FakeSocket (#19931)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/19927
2023-07-24fix(node_compat): Wrap require resolve exports in try catch block (#19592)Vedant Pandey
Potentially closes #19499
2023-07-22chore: update commonjs loading docs (#19904)sigmaSd
2023-07-21fix(node/http): add encrypted field to FakeSocket (#19886)Leo Kettmeir
Fixes #19557
2023-07-19feat(ext/node): properly segregate node globals (#19307)Luca Casonato
Code run within Deno-mode and Node-mode should have access to a slightly different set of globals. Previously this was done through a compile time code-transform for Node-mode, but this is not ideal and has many edge cases, for example Node's globalThis having a different identity than Deno's globalThis. This commit makes the `globalThis` of the entire runtime a semi-proxy. This proxy returns a different set of globals depending on the caller's mode. This is not a full proxy, because it is shadowed by "real" properties on globalThis. This is done to avoid the overhead of a full proxy for all globalThis operations. The globals between Deno-mode and Node-mode are now properly segregated. This means that code running in Deno-mode will not have access to Node's globals, and vice versa. Deleting a managed global in Deno-mode will NOT delete the corresponding global in Node-mode, and vice versa. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: Aapo Alasuutari <aapo.alasuutari@gmail.com>
2023-07-19fix(node/http): call callback after request is sent (#19871)Leo Kettmeir
Fixes #19762
2023-07-19fix(node/net): Server connection callback include socket value (#19779)Leo Kettmeir
2023-07-18fix(ext/node): check if resource can be used with write_vectored (#19868)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/19766 Fixes https://github.com/denoland/deno/issues/19846
2023-07-18fix(node): add process.dlopen API (#19860)Bartek Iwańczuk
Fixes https://github.com/denoland/deno/issues/19830
2023-07-17fix(node): improve error message requiring non-npm es module (#19856)David Sherret
Closes #19842 Closes #16913
2023-07-17fix(node): improve require esm error messages (#19853)David Sherret
Part of #19842. Closes #19583 Closes #16913
2023-07-17fix(ext/node): fix stream/promises export (#19820)await-ovo
2023-07-11fix(node/http): add destroy to FakeSocket (#19796)Leo Kettmeir
Closes #19782
2023-07-11fix(node/http): allow callback in first argument of end call (#19778)Leo Kettmeir
Closes #19762
2023-07-10fix(node/http): server use FakeSocket and add end method (#19660)Leo Kettmeir
Fixes #19324
2023-07-08chore: upgrade to dprint 0.39 (#19768)David Sherret
2023-07-07perf(ext/node): native vectored write for server streams (#19752)Divy Srivastava
``` # main $ ./load_test 10 0.0.0.0 8080 0 0 Using message size of 20 bytes Running benchmark now... Msg/sec: 106182.250000 Msg/sec: 110279.750000 ^C # this PR $ ./load_test 10 0.0.0.0 8080 0 0 Using message size of 20 bytes Running benchmark now... Msg/sec: 131632.250000 Msg/sec: 134754.250000 ^C ```
2023-07-06perf(node/async_hooks): optimize AsyncLocalStorage (#19729)Bartek Iwańczuk
This makes the implementation of "AsyncLocalStorage" from "node:async_hooks" 3.5x faster than before for noop benchmark (measuring baseline overhead). It's still 3.5x slower than not using `AsyncLocalStorage` and 1.64x slower than using noop promise hooks.
2023-07-05perf(ext/node): optimize net streams (#19678)Divy Srivastava
~4.5x improvement in `npm:ws` echo benchmark: ``` $ ./load_test 10 0.0.0.0 8080 0 0 Using message size of 20 bytes Running benchmark now... Msg/sec: 101083.750000 Msg/sec: 103606.000000 ^C $ ./load_test 10 0.0.0.0 8080 0 0 Using message size of 20 bytes Running benchmark now... Msg/sec: 24906.750000 Msg/sec: 28478.000000 ^C ```
2023-07-04fix(ext/node): Define performance.timeOrigin as getter property (#19714)await-ovo
2023-07-02fix(ext/node): ignore cancelled timer when node timer refresh (#19637)await-ovo
For timers that have already executed clearTimeout, there is no need to recreate a new timer when refresh is executed again.
2023-07-02refactor: rename built-in node modules from ext:deno_node/ to node: (#19680)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/19510
2023-06-30fix(node/http): add setKeepAlive to FakeSocket (#19659)Leo Kettmeir
Closes #19535
2023-06-27fix: lint on main branch (#19622)Bartek Iwańczuk
2023-06-27chore(ext/node): disable prefer-primordials on a per-file basis (#19553)Kenta Moriuchi
2023-06-27test(ext/node): port crypto_test.ts from deno_std (#19561)Felipe Baltor
2023-06-26chore: fix typos (#19572)Martin Fischer
2023-06-26fix(ext/node): remove path.toFileUrl (#19536)Ryan Clements
2023-06-24fix(ext/node): support brotli APIs (#19223)Divy Srivastava
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-06-23fix(serde_v8): Do not coerce values in serde_v8 (#19569)Divy Srivastava
Fixes #19568 Values are not coerced to the desired type during deserialisation. This makes serde_v8 stricter. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-06-16fix(ext/node): remove fromFileUrl from "node:path" (#19504)Ryan Clements
2023-06-15fix(node): Worker constructor doesn't check type: module of package.json ↵Vedant Pandey
(#19480)
2023-06-15refactor(ext/fetch): simplify fetch ops (#19494)Bartek Iwańczuk
Addresses feedback from https://github.com/denoland/deno/pull/19412#discussion_r1227912676
2023-06-14chore(ext/node): bring back changes to ClientRequest.onSocket (#19509)Leo Kettmeir
Reverts denoland/deno#19426
2023-06-13fix(node/buffer): make slice be the same as subarray (#19481)Leo Kettmeir
2023-06-13fix(ext/node): handle 'upgrade' responses (#19412)Bartek Iwańczuk
This commit adds support for "upgrade" events in "node:http" "ClientRequest". Currently only "Websocket" upgrades are handled. Thanks to this change package like "npm:puppeteer" and "npm:discord" should work. Closes https://github.com/denoland/deno/issues/18913 Closes https://github.com/denoland/deno/issues/17847
2023-06-13feat(node): HTTPS server (#19362)Leo Kettmeir
2023-06-12feat: Adaptations to support OpenBSD port (#19153)VlkrS
2023-06-08chore(ext/node): revert changes to ClientRequest.onSocket (#19426)Bartek Iwańczuk
Partially reverts https://github.com/denoland/deno/pull/19340 because it causes hangs in some situations.
2023-06-08feat(node_compat): Add a write method to the FileHandle class (#19385)nasa
## WHY ref: https://github.com/denoland/deno/issues/19165 The FileHandle class has many missing methods compared to node. ## WHAT Add write method
2023-06-08feat(node_compat): Add a read method to the FileHandle class (#19359)nasa
ref: #19165 The FileHandle class has many missing methods compared to node.
2023-06-06fix(node/http): use fake socket and proper url handling (#19340)Leo Kettmeir
Fixes https://github.com/denoland/deno/issues/19349 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>