James M Snell
4a19cc8947
perf_hooks: introduce createHistogram
...
Adds a new `perf_hooks.createHistogram()` API for creating histogram
instances that allow user recording.
Makes Histogram instances cloneable via MessagePort. This allows, for
instance, an event loop delay monitor to be running on the main thread
while the histogram data can be monitored actively from a worker thread.
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/37155
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2021-02-14 13:03:49 -08:00
James M Snell
c3d6d50309
quic: remove quic
...
PR-URL: https://github.com/nodejs/node/pull/37067
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2021-01-30 07:49:28 -08:00
James M Snell
d4bea09a0a
buffer: introduce Blob
...
The `Blob` object is an immutable data buffer. This is a first step
towards alignment with the `Blob` Web API.
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/36811
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2021-01-18 13:55:25 -08:00
James M Snell
bd899bc656
crypto: experimental (Ed/X)25519/(Ed/X)448 support
...
Implements initial experimental support for Curve25519 and
Curve448 support for both ECDH and sign/verify in Web Crypto.
Introduced as a Node.js-specific extension to Web Crypto.
Signed-off-by: James M Snell <jasnell@gmail.com >
Fixes: https://github.com/nodejs/node/issues/36076
PR-URL: https://github.com/nodejs/node/pull/36879
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
2021-01-18 08:12:08 -08:00
James M Snell
f5287a4b7b
crypto: introduce X509Certificate API
...
Introduces the `crypto.X509Certificate` object.
```js
const { X509Certificate } = require('crypto');
const x509 = new X509Certificate('{pem encoded cert}');
console.log(x509.subject);
```
Fixes: https://github.com/nodejs/node/issues/29181
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/36804
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
2021-01-09 12:04:23 -08:00
James M Snell
9e446b3e9f
worker: add experimental BroadcastChannel
...
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/36271
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2020-12-01 08:02:28 -08:00
Stephen Belanger
c6c36c3da7
lib: create diagnostics_channel module
...
PR-URL: https://github.com/nodejs/node/pull/34895
Reviewed-By: Bryan English <bryan@bryanenglish.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
2020-10-31 21:24:11 +00:00
Simen Bekkhus
ee85eb9f8a
doc: importModuleDynamically gets Script, not Module
...
PR-URL: https://github.com/nodejs/node/pull/35593
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2020-10-17 22:13:22 -07:00
James M Snell
dae283d96f
crypto: refactoring internals, add WebCrypto
...
Fixes: https://github.com/nodejs/node/issues/678
Refs: https://github.com/nodejs/node/issues/26854
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/35093
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-10-07 17:27:05 -07:00
Rich Trott
e9639ee7e8
tools,doc: fix broken link in module.html
...
Update tools/doc/type-parser.js with correct URL for the
module.SourceMap class. This fixes a broken link in our documentation.
PR-URL: https://github.com/nodejs/node/pull/35446
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2020-10-03 05:41:50 -07:00
Antoine du HAMEL
21abb2545f
doc: move module core module doc to separate page
...
The `module` core module is available for both CJS and ESM users, it
deserves its own page.
PR-URL: https://github.com/nodejs/node/pull/34747
Refs: https://github.com/nodejs/modules/issues/539
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-08-19 10:44:06 -07:00
James M Snell
1c14810edc
src: allow instances of net.BlockList to be created internally
...
Initial PR had it so that user code would create BlockList
instances. This sets it up so that instances can be created
internally by Node.js
PR-URL: https://github.com/nodejs/node/pull/34741
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-08-17 11:31:26 -07:00
55360443ce
quic: initial QUIC implementation
...
Co-authored-by: Anna Henningsen <anna@addaleax.net >
Co-authored-by: Daniel Bevenius <daniel.bevenius@gmail.com >
Co-authored-by: gengjiawen <technicalcute@gmail.com >
Co-authored-by: James M Snell <jasnell@gmail.com >
Co-authored-by: Lucas Pardue <lucaspardue.24.7@gmail.com >
Co-authored-by: Ouyang Yadong <oyydoibh@gmail.com >
Co-authored-by: Juan Jos<C3><A9> Arboleda <soyjuanarbol@gmail.com >
Co-authored-by: Trivikram Kamat <trivikr.dev@gmail.com >
Co-authored-by: Denys Otrishko <shishugi@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/32379
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-06-16 09:23:34 -07:00
cjihrig
862d005e60
doc: make globals Extends usage consistent
...
The docs use `* Extends: {type}` to define inheritance. This
commit updates the globals documentation to be consistent.
PR-URL: https://github.com/nodejs/node/pull/33777
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2020-06-08 21:25:26 -04:00
cjihrig
85dbd17bde
doc: make perf_hooks Extends usage consistent
...
The docs use `* Extends: {type}` to define inheritance. This
commit updates the perf_hooks documentation to be consistent.
PR-URL: https://github.com/nodejs/node/pull/33777
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2020-06-08 21:25:25 -04:00
cjihrig
2e49010bc8
doc: make events Extends usage consistent
...
The docs use `* Extends: {type}` to define inheritance. This
commit updates the events documentation to be consistent.
PR-URL: https://github.com/nodejs/node/pull/33777
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2020-06-08 21:25:25 -04:00
James M Snell
74ca960aac
lib: initial experimental AbortController implementation
...
AbortController impl based very closely on:
https://github.com/mysticatea/abort-controller
Marked experimental.
Not currently used by any of the existing promise apis.
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/33527
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-06-05 12:21:47 -07:00
James M Snell
785842a053
events: initial implementation of experimental EventTarget
...
See documentation changes for details
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/33556
Refs: https://github.com/nodejs/node/pull/33527
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
2020-05-28 06:31:58 -07:00
Joyee Cheung
8b0bdc918e
doc: clarify about the Node.js-only extensions in perf_hooks
...
- Add clarifications for Node.js-only extensions
- Explain the Web Performance APIs implemented in Node.js and
clarify that perf_hooks also include other non-Web APIs.
- Prefix exposed interfaces with `perf_hooks.` to distinguish
them from internal classes.
PR-URL: https://github.com/nodejs/node/pull/33199
Refs: https://github.com/nodejs/node/issues/28635
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2020-05-19 22:16:10 +08:00
Matteo Collina
2d5d77306f
Revert "vm: add importModuleDynamically option to compileFunction"
...
This reverts commit 74c393dd93 .
Fixes: https://github.com/nodejs/node/issues/33166
PR-URL: https://github.com/nodejs/node/pull/33364
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2020-05-15 12:14:35 +02:00
rickyes
be7fd2d517
fs: add .ref() and .unref() methods to watcher classes
...
PR-URL: https://github.com/nodejs/node/pull/33134
Fixes: https://github.com/nodejs/node/issues/33096
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-05-09 07:59:08 +02:00
cjihrig
9037ad3e78
tools: update broken types in type parser
...
The links for the ArrayBufferView and WebAssembly.Instance types
appear to be broken. This commit updates them to point to the
correct MDN locations.
PR-URL: https://github.com/nodejs/node/pull/33068
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-04-28 13:01:47 -04:00
Gus Caplan
74c393dd93
vm: add importModuleDynamically option to compileFunction
...
Fixes: https://github.com/nodejs/node/issues/31860
PR-URL: https://github.com/nodejs/node/pull/32985
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2020-04-25 09:49:53 -05:00
Robert Nagy
7b78ff0428
stream: support passing generator functions into pipeline()
...
PR-URL: https://github.com/nodejs/node/pull/31223
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-01-17 16:50:07 -08:00
bcoe
521b2224c3
module: add API for interacting with source maps
...
PR-URL: https://github.com/nodejs/node/pull/31132
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-01-14 12:39:06 -08:00
09b1228c3a
wasi: introduce initial WASI support
...
Co-authored-by: Gus Caplan <me@gus.host >
Co-authored-by: Daniel Bevenius <daniel.bevenius@gmail.com >
Co-authored-by: Jiawen Geng <technicalcute@gmail.com >
Co-authored-by: Tobias Nießen <tniessen@tnie.de >
Co-authored-by: Chengzhong Wu <legendecas@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/30258
Refs: https://github.com/nodejs/node/pull/27850
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Wyatt Preul <wpreul@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2019-11-30 18:06:39 +01:00
Gus Caplan
f9caee986c
vm: add Synthetic modules
...
- Refactor vm.SourceTextModule (again)
- Add vm.Module abstract superclass
- Add vm.SyntheticModule
Refs: https://heycam.github.io/webidl/#synthetic-module-records
PR-URL: https://github.com/nodejs/node/pull/29864
Reviewed-By: Guy Bedford <guybedford@gmail.com >
2019-10-14 14:25:38 -07:00
Jeremiah Senkpiel
cbd8d715b2
fs: introduce opendir() and fs.Dir
...
This adds long-requested methods for asynchronously interacting and
iterating through directory entries by using `uv_fs_opendir`,
`uv_fs_readdir`, and `uv_fs_closedir`.
`fs.opendir()` and friends return an `fs.Dir`, which contains methods
for doing reads and cleanup. `fs.Dir` also has the async iterator
symbol exposed.
The `read()` method and friends only return `fs.Dirent`s for this API.
Having a entry type or doing a `stat` call is deemed to be necessary in
the majority of cases, so just returning dirents seems like the logical
choice for a new api.
Reading when there are no more entries returns `null` instead of a
dirent. However the async iterator hides that (and does automatic
cleanup).
The code lives in separate files from the rest of fs, this is done
partially to prevent over-pollution of those (already very large)
files, but also in the case of js allows loading into `fsPromises`.
Due to async_hooks, this introduces a new handle type of `DIRHANDLE`.
This PR does not attempt to make complete optimization of
this feature. Notable future improvements include:
- Moving promise work into C++ land like FileHandle.
- Possibly adding `readv()` to do multi-entry directory reads.
- Aliasing `fs.readdir` to `fs.scandir` and doing a deprecation.
Refs: https://github.com/nodejs/node-v0.x-archive/issues/388
Refs: https://github.com/nodejs/node/issues/583
Refs: https://github.com/libuv/libuv/pull/2057
PR-URL: https://github.com/nodejs/node/pull/29349
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: David Carlier <devnexen@gmail.com >
2019-10-08 10:34:48 -07:00
exoego
03b7a5a4bf
doc: fix return type for crypto.createDiffieHellmanGroup()
...
PR-URL: https://github.com/nodejs/node/pull/29696
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-10-03 19:43:47 -07:00
Kamat, Trivikram
c746ba4982
doc,crypto: add extends for derived classes
...
PR-URL: https://github.com/nodejs/node/pull/29302
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-08-29 15:19:06 -07:00
Kamat, Trivikram
5c9209bc4d
doc,errors: add extends to derived classes
...
PR-URL: https://github.com/nodejs/node/pull/29303
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2019-08-26 18:49:41 -07:00
Anas Aboureada
e4bbbcc84b
fs: add fs.writev() which exposes syscall writev()
...
fs with writev allow many buffers to be pushed to underlying OS
APIs in one batch, so this should improve write speed to files.
Refs: https://github.com/nodejs/node/issues/2298
PR-URL: https://github.com/nodejs/node/pull/25925
Fixes: https://github.com/nodejs/node/issues/2298
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2019-08-16 23:24:02 -07:00
Vse Mozhet Byt
1afec97130
doc: link bigint type to MDN instead of proposal
...
PR-URL: https://github.com/nodejs/node/pull/27101
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-04-07 22:50:35 +03:00
Vse Mozhet Byt
0a4c69a5c5
doc: fix some nits in perf_hooks
...
PR-URL: https://github.com/nodejs/node/pull/26022
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2019-02-12 05:14:57 +02:00
James M Snell
bcdd228f90
perf_hooks: implement histogram based api
...
Add a sampling-based event loop delay monitor.
```js
const { monitorEventLoopDelay } = require('perf_hooks');
const h = monitorEventLoopDelay();
h.enable();
h.disable();
console.log(h.percentiles);
console.log(h.min);
console.log(h.max);
console.log(h.mean);
console.log(h.stddev);
console.log(h.percentile(50));
```
PR-URL: https://github.com/nodejs/node/pull/25378
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2019-02-08 09:20:18 -08:00
Vse Mozhet Byt
c69ea3b1d5
doc: fix, unify, formalize, and amplify vm.md
...
`vm` module API heavily reuses common code, but the doc seems
to be a bit out of date: some options are listed in wrong places,
some options and history entries are missed.
Also some fragments need to be formalized and unified.
PR-URL: https://github.com/nodejs/node/pull/25422
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
2019-01-11 22:21:44 +02:00
Vse Mozhet Byt
27a03b84c4
doc: make modules.md more accurate
...
PR-URL: https://github.com/nodejs/node/pull/25357
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2019-01-08 01:16:51 +02:00
Anna Henningsen
b91093f0e5
doc: add documentation for brotli support
...
PR-URL: https://github.com/nodejs/node/pull/24938
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2019-01-05 21:36:48 +01:00
Tobias Nießen
823d86c47c
crypto: add key object API
...
This commit makes multiple important changes:
1. A new key object API is introduced. The KeyObject class itself is
not exposed to users, instead, several new APIs can be used to
construct key objects: createSecretKey, createPrivateKey and
createPublicKey. The new API also allows to convert between
different key formats, and even though the API itself is not
compatible to the WebCrypto standard in any way, it makes
interoperability much simpler.
2. Key objects can be used instead of the raw key material in all
relevant crypto APIs.
3. The handling of asymmetric keys has been unified and greatly
improved. Node.js now fully supports both PEM-encoded and
DER-encoded public and private keys.
4. Conversions between buffers and strings have been moved to native
code for sensitive data such as symmetric keys due to security
considerations such as zeroing temporary buffers.
5. For compatibility with older versions of the crypto API, this
change allows to specify Buffers and strings as the "passphrase"
option when reading or writing an encoded key. Note that this
can result in unexpected behavior if the password contains a
null byte.
PR-URL: https://github.com/nodejs/node/pull/24234
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-12-24 14:50:16 +01:00
Timothy Gu and Ivan Filenko
2a7432dade
readline: add support for async iteration
...
Co-authored-by: Ivan Filenko <ivan.filenko@protonmail.com >
Fixes: https://github.com/nodejs/node/issues/18603
Refs: https://github.com/nodejs/node/pull/18904
PR-URL: https://github.com/nodejs/node/pull/23916
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
2018-11-20 15:41:16 -08:00
Ouyang Yadong
5689d55392
doc: add types and their corresponding return values
...
This commit supplements some types and their corresponding return
values in docs, including `AsyncResource`, `DiffieHellman`,
`ECDH`, `https.Server`, `repl.REPLServer`.
PR-URL: https://github.com/nodejs/node/pull/23998
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-11-02 00:36:40 +02:00
Christopher Hiller
80143f616d
process: add allowedNodeEnvironmentFlags property
...
`process.allowedNodeEnvironmentFlags` provides an API to validate and
list flags as specified in `NODE_OPTIONS` from user code.
Refs: https://github.com/nodejs/node/issues/17740
Signed-off-by: Christopher Hiller <boneskull@boneskull.com >
PR-URL: https://github.com/nodejs/node/pull/19335
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com >
Reviewed-By: Sam Ruby <rubys@intertwingly.net >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-08-24 18:15:19 -07:00
Bryan English
c7944a7a7b
fs: readdir optionally returning type information
...
readdir and readdirSync now have a "withFileTypes" option, which, when
enabled, provides an array of DirectoryEntry objects, similar to Stats
objects, which have the filename and the type information.
Refs: https://github.com/nodejs/node/issues/15699
PR-URL: https://github.com/nodejs/node/pull/22020
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com >
2018-08-13 19:18:45 -07:00
Vse Mozhet Byt
811598bcda
doc: specify options parameter type in zlib.md
...
Also, delete now redundant notes and links.
PR-URL: https://github.com/nodejs/node/pull/21920
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2018-07-24 17:01:15 +03:00
Vse Mozhet Byt
2ae45240a2
doc: fix some links
...
PR-URL: https://github.com/nodejs/node/pull/21619
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Yuta Hiroto <hello@hiroppy.me >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-07-02 18:08:17 +03:00
Rich Trott
6ac3c44012
tools: remove unused global types from type-parser
...
`tools/doc/type-parser.js` has several global types that are not
used. Remove the unused global types.
PR-URL: https://github.com/nodejs/node/pull/21135
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2018-06-08 10:09:54 +02:00
Joyee Cheung
f54a598b44
doc: document BigInt support in fs.Stats
...
PR-URL: https://github.com/nodejs/node/pull/20220
Fixes: https://github.com/nodejs/node/issues/12115
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2018-06-07 22:05:24 +08:00
Anna Henningsen
e7a2367471
worker: implement MessagePort and MessageChannel
...
Implement `MessagePort` and `MessageChannel` along the lines of
the DOM classes of the same names. `MessagePort`s initially
support transferring only `ArrayBuffer`s.
Thanks to Stephen Belanger for reviewing this change in its
original form, to Benjamin Gruenbaum for reviewing the
added tests in their original form, and to Olivia Hugger
for reviewing the documentation in its original form.
Refs: https://github.com/ayojs/ayo/pull/98
PR-URL: https://github.com/nodejs/node/pull/20876
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Shingo Inoue <leko.noor@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
2018-06-06 19:43:44 +02:00
Vse Mozhet Byt
c241b7d85c
tools: fix sorting in doc/type-parser.js
...
This section groups type links by their home modules
and sort these groups alphabetically,
so `modules` types should go before the `net` types.
PR-URL: https://github.com/nodejs/node/pull/20976
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-05-26 23:32:03 +03:00
Vse Mozhet Byt
1c530e89ed
tools: dedupe property access in doc/type-parser
...
There is no need to get this property twice in this rather hot spot:
if there is no such key, the `typeUrl` will be `undefined`,
which suffices for the boolean check in the next line.
For consistency, `undefined` can also be made the default value.
PR-URL: https://github.com/nodejs/node/pull/20387
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-05-02 05:50:01 +03:00