Rich Trott
f623d5d377
doc: use _code name_ rather than _codename_
...
This is excrutiatingly minor, but every authoritative resource I've
checked (which is to say, a few dictionaries) uses "code name" primarily
or exclusively. Let's follow suit.
PR-URL: https://github.com/nodejs/node/pull/36611
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2021-01-12 07:09:27 -05:00
Michael Chen
1ed517c176
doc: document return value of https.request
...
Add missing topic about what https.request() returns.
PR-URL: https://github.com/nodejs/node/pull/36370
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Pooja D P <Pooja.D.P@ibm.com >
2021-01-12 07:09:26 -05:00
ExE Boss and raisinten
5645b21e23
doc: document "http: lazy create IncomingMessage.headers"
...
Refs: https://github.com/nodejs/node/pull/35281
Refs: https://github.com/nodejs/node/issues/36550
Co-authored-by: raisinten <raisinten@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/36601
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2021-01-12 07:09:23 -05:00
Maksym Baranovskyi
3ee4cfc7d7
doc: fix bugs in _construct() example
...
PR-URL: https://github.com/nodejs/node/pull/36509
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
2021-01-12 07:09:22 -05:00
Benjamin Gruenbaum
a8a427f646
child_process: support AbortSignal in fork
...
PR-URL: https://github.com/nodejs/node/pull/36603
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2021-01-12 07:09:20 -05:00
Michaël Zasso
f978628b80
2020-12-22, Version 15.5.0 (Current)
...
Notable changes:
child_process:
* (SEMVER-MINOR) add signal support to spawn (Benjamin Gruenbaum) https://github.com/nodejs/node/pull/36432
doc:
* add PoojaDurgad to collaborators (Pooja D P) https://github.com/nodejs/node/pull/36511
lib:
* (SEMVER-MINOR) support BigInt in querystring.stringify (raisinten) https://github.com/nodejs/node/pull/36499
src:
* (SEMVER-MINOR) add way to get IsolateData and allocator from Environment (Anna Henningsen) https://github.com/nodejs/node/pull/36441
* (SEMVER-MINOR) allow preventing SetPrepareStackTraceCallback (Shelley Vohr) https://github.com/nodejs/node/pull/36447
stream:
* (SEMVER-MINOR) support abortsignal in constructor (Benjamin Gruenbaum) https://github.com/nodejs/node/pull/36431
PR-URL: https://github.com/nodejs/node/pull/36597
2020-12-22 15:00:08 +01:00
Michaël Zasso
19c233232f
doc: fix AbortSignal example for stream.Readable
...
PR-URL: https://github.com/nodejs/node/pull/36596
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2020-12-22 14:51:42 +01:00
raisinten
5481be8cbd
lib: support BigInt in querystring.stringify
...
Fixes: https://github.com/nodejs/node/issues/36080
PR-URL: https://github.com/nodejs/node/pull/36499
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2020-12-21 18:24:30 +01:00
Rich Trott
c5602fb166
doc: simplify worker_threads.md text
...
PR-URL: https://github.com/nodejs/node/pull/36545
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
2020-12-21 18:24:30 +01:00
Tobias Nießen
ad75c78c32
doc: add note about timingSafeEqual for TypedArray
...
PR-URL: https://github.com/nodejs/node/pull/36323
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
2020-12-21 18:24:29 +01:00
Rock
f09985d42a
doc: update url.md
...
Add missing 's' to example URL.
PR-URL: https://github.com/nodejs/node/pull/36147
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Harshitha K P <harshitha014@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-12-21 18:24:26 +01:00
Rich Trott
22f039339f
doc: revise addon mulitple initializations text
...
PR-URL: https://github.com/nodejs/node/pull/36457
Reviewed-By: Harshitha K P <harshitha014@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
2020-12-21 18:24:25 +01:00
Rich Trott
98918110a1
doc: edit addon text about event loop blocking
...
PR-URL: https://github.com/nodejs/node/pull/36448
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Shelley Vohr <codebytere@gmail.com >
2020-12-21 16:49:24 +01:00
Benjamin Gruenbaum
e449571230
child_process: add signal support to spawn
...
PR-URL: https://github.com/nodejs/node/pull/36432
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-12-21 16:49:23 +01:00
kai zhu
62bfe3d313
doc: note v15.0.0 changed default --unhandled-rejections=throw
...
PR-URL: https://github.com/nodejs/node/pull/36361
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Mary Marchini <oss@mmarchini.me >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-12-21 16:49:22 +01:00
Benjamin Gruenbaum
6ecbc1dcb3
stream: support abortsignal in constructor
...
PR-URL: https://github.com/nodejs/node/pull/36431
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2020-12-21 16:49:21 +01:00
Rich Trott
e331de2571
doc: reword POSIX threads text in addons.md
...
PR-URL: https://github.com/nodejs/node/pull/36436
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2020-12-21 16:49:20 +01:00
Benjamin Gruenbaum
3341b2cb9d
doc: document ABORT_ERR code
...
We added an `AbortError` with the same code and name as the web's as
part of the consensus in https://github.com/nodejs/node/issues/36084 but
never actually documented the error in our error codes list.
This PR adds the error code.
PR-URL: https://github.com/nodejs/node/pull/36319
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-12-21 16:49:05 +01:00
Danielle Adams
5e5927ec2e
2020-12-09, Version 15.4.0 (Current)
...
PR-URL: https://github.com/nodejs/node/pull/36435
Notable changes:
* child_processes:
* add AbortSignal support (Benjamin Gruenbaum) (https://github.com/nodejs/node/pull/36308 )
* deps:
* update ICU to 68.1 (Michaël Zasso) (https://github.com/nodejs/node/pull/36187 )
* events:
* support signal in EventTarget (Benjamin Gruenbaum) (https://github.com/nodejs/node/pull/36258 )
* graduate Event, EventTarget, AbortController (James M Snell) (https://github.com/nodejs/node/pull/35949 )
* http:
* enable call chaining with setHeader() (pooja d.p) (https://github.com/nodejs/node/pull/35924 )
* module:
* add isPreloading indicator (James M Snell) (https://github.com/nodejs/node/pull/36263 )
* stream:
* support abort signal (Benjamin Gruenbaum) (https://github.com/nodejs/node/pull/36061 )
* add FileHandle support to Read/WriteStream (Momtchil Momtchev) (https://github.com/nodejs/node/pull/35922 )
* worker:
* add experimental BroadcastChannel (James M Snell) (https://github.com/nodejs/node/pull/36271 )
2020-12-09 06:02:52 -05:00
Benjamin Gruenbaum
197ba21279
stream: support abort signal
...
PR-URL: https://github.com/nodejs/node/pull/36061
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
2020-12-07 13:55:51 -05:00
cjihrig
2649c384c6
doc: add version metadata to timers/promises
...
Refs: https://github.com/nodejs/node/pull/33950
PR-URL: https://github.com/nodejs/node/pull/36378
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Beth Griggs <bgriggs@redhat.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
2020-12-07 13:55:48 -05:00
Benjamin Gruenbaum
224a6471cc
child_process: add AbortSignal support
...
PR-URL: https://github.com/nodejs/node/pull/36308
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-12-07 13:55:48 -05:00
Momtchil Momtchev
6033d30361
stream: add FileHandle support to Read/WriteStream
...
Support creating a Read/WriteStream from a
FileHandle instead of a raw file descriptor
Add an EventEmitter to FileHandle with a single
'close' event.
Fixes: https://github.com/nodejs/node/issues/35240
PR-URL: https://github.com/nodejs/node/pull/35922
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-12-07 13:55:24 -05:00
James M Snell
802d44b1a9
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-07 13:55:16 -05:00
bcoe
c14512b9a5
errors: display original symbol name
...
If symbol names array has been populated in source map, include
original symbol name in error message.
Fixes https://github.com/nodejs/node/issues/35325
PR-URL: https://github.com/nodejs/node/pull/36042
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2020-12-07 13:55:15 -05:00
James M Snell
d4de7c7eb9
module: add isPreloading indicator
...
Adds a `module.isPreloading` property that is `true` only during the
preload (`-r`) phase of Node.js bootstrap. This provides modules an
easy, non-hacky way of knowing if they are being loaded during preload.
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/36263
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-12-07 13:55:12 -05:00
pooja d.p
58abdcaceb
http: enable call chaining with setHeader()
...
Make `response.setHeader` return the response object itself
so that multiple header setting can be chained.
Fixes: https://github.com/nodejs/node/issues/33148
PR-URL: https://github.com/nodejs/node/pull/35924
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ricky Zhou <0x19951125@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-12-07 13:55:11 -05:00
Rich Trott
3e5fcda13e
doc: add table header in intl.md
...
An empty header element in a table is an accessibility issue. In this
case, specifying the column as containing a feature seems to be the way
to go.
PR-URL: https://github.com/nodejs/node/pull/36261
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2020-12-07 13:55:09 -05:00
naortedgi
65d89fdd69
doc: adding example to Buffer.isBuffer method
...
PR-URL: https://github.com/nodejs/node/pull/36233
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
2020-12-07 13:55:04 -05:00
Luigi Pinca
03cf8dbc0e
doc: fix typo in events.md
...
PR-URL: https://github.com/nodejs/node/pull/36231
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-12-07 13:48:33 -05:00
cjihrig
b176d61e8c
doc: fix --experimental-wasm-modules text location
...
The text for --experimental-wasm-modules had drifted to under the
--force-context-aware text. This commit moves it back to the
proper location.
PR-URL: https://github.com/nodejs/node/pull/36220
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2020-12-07 13:48:30 -05:00
Guy Bedford
44c4aaddad
doc: stabilize subpath patterns
...
PR-URL: https://github.com/nodejs/node/pull/36177
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-12-07 13:48:29 -05:00
James M Snell
dc1930923b
events: graduate Event, EventTarget, AbortController
...
Graduate these from experimental status
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/35949
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2020-12-07 13:48:28 -05:00
James M Snell
186ad24fdf
doc: cleanup events.md structure
...
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/36100
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-12-07 13:48:22 -05:00
Shelley Vohr
63e7dc1e5c
2020-11-24, Version 15.3.0 (Current)
...
Notable changes:
dns:
* (SEMVER-MINOR) add a cancel() method to the promise Resolver (Szymon Marczak) https://github.com/nodejs/node/pull/33099
events:
* (SEMVER-MINOR) add max listener warning for EventTarget (James M Snell) https://github.com/nodejs/node/pull/36001
http:
* (SEMVER-MINOR) add support for abortsignal to http.request (Benjamin Gruenbaum) https://github.com/nodejs/node/pull/36048
http2:
* (SEMVER-MINOR) allow setting the local window size of a session (Yongsheng Zhang) https://github.com/nodejs/node/pull/35978
lib:
* (SEMVER-MINOR) add throws option to fs.f/l/statSync (Andrew Casey) https://github.com/nodejs/node/pull/33716
path:
* (SEMVER-MINOR) add `path/posix` and `path/win32` alias modules (ExE Boss) https://github.com/nodejs/node/pull/34962
readline:
* (SEMVER-MINOR) add getPrompt to get the current prompt (Mattias Runge-Broberg) https://github.com/nodejs/node/pull/33675
src:
* (SEMVER-MINOR) add loop idle time in diagnostic report (Gireesh Punathil) https://github.com/nodejs/node/pull/35940
util:
* (SEMVER-MINOR) add `util/types` alias module (ExE Boss) https://github.com/nodejs/node/pull/34055
PR-URL: https://github.com/nodejs/node/pull/36232
2020-11-24 04:45:05 -08:00
Rich Trott
42dfda8f78
doc: remove stray comma in url.md
...
PR-URL: https://github.com/nodejs/node/pull/36175
Reviewed-By: Richard Lau <rlau@redhat.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2020-11-22 13:21:40 -08:00
Rich Trott
8bbdbccbb6
doc: revise agent.destroy() text
...
PR-URL: https://github.com/nodejs/node/pull/36163
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Harshitha K P <harshitha014@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2020-11-22 13:21:00 -08:00
Madara Uchiha
48bf59bb8b
http2: add support for AbortSignal to http2Session.request
...
- Add support
- Add test
- Docs once PR is up
PR-URL: https://github.com/nodejs/node/pull/36070
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2020-11-22 13:20:50 -08:00
Rich Trott
545ac1fec5
doc: fix punctuation in v8.md
...
Two minor punctuation fixes for v8.md.
PR-URL: https://github.com/nodejs/node/pull/36192
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
2020-11-22 13:20:18 -08:00
Gabriel Schulhof and Rich Trott
4ab4a99900
doc: de-emphasize wrapping in napi_define_class
...
Change the documentation for `napi_define_class` in such a way that
it mentions wrapping C++ class instances as a possible use for the API,
rather than making the assumption that it is the use case for the API.
Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com >
Co-authored-by: Rich Trott <rtrott@gmail.com >
Fixes: https://github.com/nodejs/node/issues/36150
PR-URL: https://github.com/nodejs/node/pull/36159
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
2020-11-22 13:16:18 -08:00
Antoine du Hamel
f0aed8c01c
http2: add support for TypedArray to getUnpackedSettings
...
PR-URL: https://github.com/nodejs/node/pull/36141
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-11-22 13:15:49 -08:00
Anders Kaseorg
3691eccf0a
fs: remove experimental from promises.rmdir recursive
...
This was missed in commit 35b17d9abd .
Refs: https://github.com/nodejs/node/issues/34278
Refs: https://github.com/nodejs/node/pull/35171
Signed-off-by: Anders Kaseorg <andersk@mit.edu >
PR-URL: https://github.com/nodejs/node/pull/36131
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Ben Coe <bencoe@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-11-22 13:15:45 -08:00
Benjamin Gruenbaum
8390f8a86b
http: add support for abortsignal to http.request
...
PR-URL: https://github.com/nodejs/node/pull/36048
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: Ricky Zhou <0x19951125@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-11-22 13:15:37 -08:00
Rich Trott
bb29508e8f
doc: add link for v8.takeCoverage()
...
PR-URL: https://github.com/nodejs/node/pull/36135
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Harshitha K P <harshitha014@gmail.com >
2020-11-22 13:15:16 -08:00
Guy Bedford
24065b92f1
doc: mark modules implementation as stable
...
PR-URL: https://github.com/nodejs/node/pull/35781
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is >
2020-11-22 13:15:01 -08:00
Andrew Casey
15ff155c12
lib: add throws option to fs.f/l/statSync
...
For consumers that aren't interested in *why* a `statSync` call failed,
allocating and throwing an exception is an unnecessary expense. This PR
adds an option that will cause it to return `undefined` in such cases
instead.
As a motivating example, the JavaScript & TypeScript language service
shared between Visual Studio and Visual Studio Code is stuck with
synchronous file IO for architectural and backward-compatibility
reasons. It frequently needs to speculatively check for the existence
of files and directories that may not exist (and cares about file vs
directory, so `existsSync` is insufficient), but ignores file system
entries it can't access, regardless of the reason.
Benchmarking the language service is difficult because it's so hard to
get good coverage of both code bases and user behaviors, but, as a
representative metric, we measured batch compilation of a few hundred
popular projects (by star count) from GitHub and found that, on average,
we saved about 1-2% of total compilation time. We speculate that the
savings could be even more significant in interactive (language service
or watch mode) scenarios, where the same (non-existent) files need to be
polled over and over again. It's not a huge improvement, but it's a
very small change and it will affect a lot of users (and CI runs).
For reference, our measurements were against `v12.x` (3637a061a at the
time) on an Ubuntu Server desktop with an SSD.
PR-URL: https://github.com/nodejs/node/pull/33716
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2020-11-22 13:14:57 -08:00
Rishabh Mehan
a8dab217eb
doc,url: fix url.hostname example
...
PR-URL: https://github.com/nodejs/node/pull/33735
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2020-11-22 12:58:34 -08:00
Rich Trott
142cacdc63
doc: clarify text about process not responding
...
The existing text about processes not responding is unclear, at least to
me. Suggestions for clarification welcome, but I think the best thing
might be to state that the process may stop responding and leave it at
that. The explanantion (about asynchronous listeners) is not clear to
me. (Why would the fact that the listeners are asynchronous matter?) If
it's an unnecessary detail (as seems likely), let's remove it.
PR-URL: https://github.com/nodejs/node/pull/36117
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2020-11-22 12:57:59 -08:00
James M Snell
9ce9b016e6
events: add max listener warning for EventTarget
...
Signed-off-by: James M Snell <jasnell@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/36001
Fixes: https://github.com/nodejs/node/issues/35990
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-11-22 12:56:33 -08:00
Guy Bedford
0ff384b0be
doc: esm docs consolidation and reordering
...
PR-URL: https://github.com/nodejs/node/pull/36046
Reviewed-By: Bradley Farias <bradley.meck@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com >
2020-11-22 12:43:37 -08:00