Michael Dawson
e2bea73b03
doc: clarify N-API version 1
...
Refs: https://github.com/nodejs/node-addon-api/issues/760
Clarify which version of 8.x in which N-API version 1
matches the shape in later versions like 10.x
Signed-off-by: Michael Dawson <michael_dawson@ca.ibm.com >
PR-URL: https://github.com/nodejs/node/pull/34344
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com >
2020-08-05 09:13:24 -07:00
Gireesh Punathil
335cb0d1d1
lib: absorb path error cases
...
Absorb low level libuv failure in
the process initialization phase
Fixes: https://github.com/nodejs/node/issues/33759
Refs: https://github.com/nodejs/node/issues/33759#issuecomment-663980558
PR-URL: https://github.com/nodejs/node/pull/34519
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Zeyu Yang <himself65@outlook.com >
Reviewed-By: Harshitha K P <harshitha014@gmail.com >
2020-08-05 08:54:29 -07:00
Anna Henningsen
c4457d873f
benchmark: always throw the same Error instance
...
Stack trace capturing currently accounts for 40 % of the benchmark
running time. Always throwing the same exception object removes
that overhead and lets the benchmark be more focused on what it is
supposed to measure.
Refs: https://github.com/nodejs/node/pull/34512#issuecomment-663977271
PR-URL: https://github.com/nodejs/node/pull/34523
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
2020-08-05 08:49:27 -07:00
Derek Lewis
44e6c010b4
esm: fix hook mistypes and links to types
...
Prior to this commit, the custom loader hooks were:
* missing the Node.js API ref docs types
* missing the function signature from their sections
* linking directly to the specification (not customary)
* had an inconsistent non-nullable JSDoc promise return
* had JSDoc object properties that weren't alpha-sorted
* designated set of non-nullable types when single was fine
Notes:
https://www.typescriptlang.org/play/index.html?strictNullChecks=true&useJavaScript=true#code/PQKhCgAIUgBAHAhgJ0QW0gbwM4BdkCWAdgOYC+k28ApgMYEBmB1yUMCK6WmbkftAeyIATArgJDsALkgBCAILJUATwA8eQqQB8AGl58kyakVwBVAEoAZGbIAUG4iUgAfSAFcR1JkWrCAlHrQkGQUgibUAB64vByoGJgAYh604kIUwl6IbgA2uObU2ALZAG7UMUa4bshE2FgACsgCaATY1KqY7sjZMg6kwVpkbMDgkfACyLiQiNjKRLSQDMmpRJBGhSXU9jT0TCw6kGG4kbj7GQxZufnrpX5YUAeSkx2GxmZWkAC8kEQ52cGfD3CUQA3PdGJBbABZRC4AAWADpUCImrZblpIAAGeEAVluHWAwEgAGUmtRAaJlvD7nwCZAEuNKKTIAzENk-lQ6IxmMhsKcBIy0GTaG48E1INkBCQCPMGAy1kVio4qXwaYT5NkAO6IZS1CpVFaIFYCABGACs6JMBAxIHCybLkPEqt1IOp8I4BsqVXrqncVSqnTIXiYLJZIAB+al+77UDWQENbTm7ZD7INvSx+eGwozWqSRv0+WPxjk7bkZrNeQIqsigviDPjgqEwhFI4Qo26qTE4vGQWnyIgCW3IcliCRET2qyAAdVhxgOrOyjkgAAMzhc8gUFdQl-tbVNkCQ3IKTLVaIbIMayWgBKJdsJ4ZAAJIrOEtSO00+tSBiADktUQwlEPpDQHGch2KVk3DtBk0BhWhYUXMIKVHVlIFGcZcGwcdVmoSofVXHJ12uTZiy5PZfSjeFKMOY5Kz9RCR0kGQAG1KPhaiojYoQkMkfZv2AwcAFp6OWb8AF1aOCPwa2Ce5aQAES8FgbX5AA5a9qHhU1antKY2WZQdKG2UieU9b0Vnwy4Nw2BMSzI9iTkgCzCM3KTwDIIA
https://closure-compiler.appspot.com/home#code%3D%252F%252F%2520%253D%253DClosureCompiler%253D%253D%250A%252F%252F%2520%2540compilation_level%2520ADVANCED_OPTIMIZATIONS%250A%252F%252F%2520%2540warning_level%2520VERBOSE%250A%252F%252F%2520%2540jscomp_error%2520strictCheckTypes%250A%252F%252F%2520%2540language_out%2520ECMASCRIPT_NEXT%250A%252F%252F%2520%2540checks_only%250A%252F%252F%2520%253D%253D%252FClosureCompiler%253D%253D%250A%250A%252F**%250A%2520*%2520%2540param%2520%257Bstring%257D%2520specifier%250A%2520*%2520%2540param%2520%257B%257B%250A%2520*%2520%2520%2520conditions%253A%2520!Array%253Cstring%253E%252C%250A%2520*%2520%2520%2520parentURL%253A%2520!(string%2520%257C%2520undefined)%252C%250A%2520*%2520%257D%257D%2520context%250A%2520*%2520%2540param%2520%257BFunction%257D%2520defaultResolve%250A%2520*%2520%2540returns%2520%257BPromise%253C%257B%2520url%253A%2520string%2520%257D%253E%257D%250A%2520*%252F%250Aexport%2520async%2520function%2520resolve(specifier%252C%2520context%252C%2520defaultResolve)%2520%257B%250A%2520%2520const%2520%257B%2520parentURL%2520%253D%2520null%2520%257D%2520%253D%2520context%253B%250A%2520%2520if%2520(Math.random()%2520%253E%25200.5)%2520%257B%2520%252F%252F%2520Some%2520condition.%250A%2520%2520%2520%2520%252F%252F%2520For%2520some%2520or%2520all%2520specifiers%252C%2520do%2520some%2520custom%2520logic%2520for%2520resolving.%250A%2520%2520%2520%2520%252F%252F%2520Always%2520return%2520an%2520object%2520of%2520the%2520form%2520%257Burl%253A%2520%253Cstring%253E%257D.%250A%2520%2520%2520%2520return%2520%257B%250A%2520%2520%2520%2520%2520%2520url%253A%2520parentURL%2520%253F%250A%2520%2520%2520%2520%2520%2520%2520%2520new%2520URL(specifier%252C%2520parentURL).href%2520%253A%250A%2520%2520%2520%2520%2520%2520%2520%2520new%2520URL(specifier).href%252C%250A%2520%2520%2520%2520%257D%253B%250A%2520%2520%257D%250A%2520%2520if%2520(Math.random()%2520%253C%25200.5)%2520%257B%2520%252F%252F%2520Another%2520condition.%250A%2520%2520%2520%2520%252F%252F%2520When%2520calling%2520%2560defaultResolve%2560%252C%2520the%2520arguments%2520can%2520be%2520modified.%2520In%2520this%250A%2520%2520%2520%2520%252F%252F%2520case%2520it's%2520adding%2520another%2520value%2520for%2520matching%2520conditional%2520exports.%250A%2520%2520%2520%2520return%2520defaultResolve(specifier%252C%2520%257B%250A%2520%2520%2520%2520%2520%2520...context%252C%250A%2520%2520%2520%2520%2520%2520conditions%253A%2520%255B...context.conditions%252C%2520'another-condition'%255D%252C%250A%2520%2520%2520%2520%257D)%253B%250A%2520%2520%257D%250A%2520%2520%252F%252F%2520Defer%2520to%2520Node.js%2520for%2520all%2520other%2520specifiers.%250A%2520%2520return%2520defaultResolve(specifier%252C%2520context%252C%2520defaultResolve)%253B%250A%257D
PR-URL: https://github.com/nodejs/node/pull/34240
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
2020-08-05 08:41:48 -07:00
Mary Marchini
befbaf384e
build: don't run auto-start-ci on push
...
PR-URL: https://github.com/nodejs/node/pull/34588
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2020-08-05 08:41:48 -07:00
Mary Marchini
4af5dbd3bf
build: fix auto-start-ci script path
...
PR-URL: https://github.com/nodejs/node/pull/34588
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2020-08-05 08:41:48 -07:00
Rich Trott
be23e23361
doc: use consistent spelling for "falsy"
...
We use "falsy" in multiple places in our docs, but only use "false-y" in
one place in url.md. Replace it with "falsy".
PR-URL: https://github.com/nodejs/node/pull/34545
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Pranshu Srivastava <rexagod@gmail.com >
Reviewed-By: Ron Korving <ron@ronkorving.nl >
Reviewed-By: Yuta Hiroto <hello@hiroppy.me >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2020-08-05 08:41:48 -07:00
Rich Trott
f393ae9296
doc: simplify and clarify console.assert() documentation
...
PR-URL: https://github.com/nodejs/node/pull/34544
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2020-08-05 08:41:47 -07:00
Rich Trott
b69ff2ff60
doc: use consistent capitalization for addons
...
Sometimes _addon_ is capitalized and sometimes not. Capitalizing it
seems peculiar and hard to justify. Standardize on treating it like
other common nouns.
PR-URL: https://github.com/nodejs/node/pull/34536
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
2020-08-05 08:41:47 -07:00
Gabriel Schulhof and Anna Henningsen
8cc9e5eb52
n-api: support type-tagging objects
...
`napi_instanceof()` is insufficient for reliably establishing the data
type to which a pointer stored with `napi_wrap()` or
`napi_create_external()` inside a JavaScript object points. Thus, we
need a way to "mark" an object with a value that, when later retrieved,
can unambiguously tell us whether it is safe to cast the pointer stored
inside it to a certain structure.
Such a check must survive loading/unloading/multiple instances of an
addon, so we use UUIDs chosen *a priori*.
Fixes: https://github.com/nodejs/node/issues/28164
Co-authored-by: Anna Henningsen <github@addaleax.net >
PR-URL: https://github.com/nodejs/node/pull/28237
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com >
2020-08-05 08:41:47 -07:00
Mary Marchini
212d17fa06
doc: add mmarchini pronouns
...
PR-URL: https://github.com/nodejs/node/pull/34586
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-08-05 08:41:47 -07:00
Mary Marchini
7a28c3d543
doc: update mmarchini contact info
...
PR-URL: https://github.com/nodejs/node/pull/34586
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-08-05 08:41:46 -07:00
Mary Marchini
c8104f3d10
doc: update .mailmap for mmarchini
...
PR-URL: https://github.com/nodejs/node/pull/34586
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-08-05 08:41:46 -07:00
Mary Marchini
70cf3cbdfa
build: auto start Jenkins CI via PR labels
...
Add an Action that will find every PR with the `request-ci` label and
will start a Jenkins CI for each of these Pull Requests. The scheduler
event is used to circumvent GitHub Actions limitations on Pull Requests
from forks (where secrets are not accessible and the GITHUB_TOKEN is
read-only).
If the Action fails to start a CI, it will add a `request-ci-failed`
label and will leave a comment with the error message from NCU.
Fixes: https://github.com/nodejs/github-bot/issues/234
PR-URL: https://github.com/nodejs/node/pull/34089
Reviewed-By: Christian Clauss <cclauss@me.com >
2020-08-05 08:41:46 -07:00
Gabriel Schulhof
2703fe498e
n-api: simplify bigint-from-word creation
...
Macro `CHECK_MAYBE_EMPTY_WITH_PREAMBLE()` does the work of checking
the `TryCatch` and returning `napi_pending_exception` so this change
reuses it for `napi_create_bigint_words()`.
Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com >
PR-URL: https://github.com/nodejs/node/pull/34554
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2020-08-05 08:41:46 -07:00
Rich Trott
9c442f9786
test: remove unneeded flag check in test-vm-memleak
...
The `common` module checks that necessary flags are being used, so a
check in the test itself is no longer necessary.
PR-URL: https://github.com/nodejs/node/pull/34528
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2020-08-05 08:41:45 -07:00
Andrey Pechkurov
14656e1703
async_hooks: don't reuse resource in HttpAgent when queued
...
PR-URL: https://github.com/nodejs/node/pull/34439
Fixes: https://github.com/nodejs/node/issues/34401
Refs: https://github.com/nodejs/node/pull/27581
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
2020-08-05 08:41:45 -07:00
iandrc
70e9eceeee
build: toolchain.gypi and node_gyp.py cleanup
...
Removed `linux_use_gold_flag`, `linux_use_bundled_gold` and `linux_use_bundled_binutils` flags from
`tools/v8_gypfiles/toolchain.gypi` and `/tools/gyp_node.py`.
Fixes: https://github.com/nodejs/node/issues/34256
PR-URL: https://github.com/nodejs/node/pull/34268
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-08-05 08:41:45 -07:00
Rich Trott
692a735881
doc: use sentence-case for headers in SECURITY.md
...
Our doc style guide calls for sentence-case in headers.
PR-URL: https://github.com/nodejs/node/pull/34525
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Stewart X Addison <sxa@uk.ibm.com >
2020-08-04 22:12:39 -07:00
iandrc
465968c5f8
console: document the behavior of console.assert()
...
Add a description and an example of console.assert() call with
no arguments. If called like this, the method should output:
"Assertion failed".
Fixes: https://github.com/nodejs/node/issues/34500
Refs: https://nodejs.org/dist/latest-v14.x/docs/api/console.html#console_console_assert_value_message
Refs: https://console.spec.whatwg.org/#assert
PR-URL: https://github.com/nodejs/node/pull/34501
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
Reviewed-By: Zeyu Yang <himself65@outlook.com >
2020-08-04 22:12:33 -07:00
unknown
f46649bc5b
util: print External address from inspect
...
Fixes: https://github.com/nodejs/node/issues/28250
PR-URL: https://github.com/nodejs/node/pull/34398
Backport-PR-URL: https://github.com/nodejs/node/pull/34583
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2020-08-04 11:26:23 -04:00
Myles Borins
d9106724a6
Working on v14.7.1
...
PR-URL: https://github.com/nodejs/node/pull/34542
2020-07-29 14:35:56 -04:00
Ruy Adorno
61712651a6
2020-07-29, Version 14.7.0 (Current)
...
Notable changes:
deps:
* upgrade npm to 6.14.7 (claudiahdz) https://github.com/nodejs/node/pull/34468
dgram:
* (SEMVER-MINOR) add IPv6 scope id suffix to received udp6 dgrams (Pekka Nikander) https://github.com/nodejs/node/pull/14500
doc:
* add AshCripps to collaborators (AshCripps) https://github.com/nodejs/node/pull/34494
* add HarshithaKP to collaborators (Harshitha K P) https://github.com/nodejs/node/pull/34417
* add rexagod to collaborators (Pranshu Srivastava) https://github.com/nodejs/node/pull/34457
* add release key for Richard Lau (Richard Lau) https://github.com/nodejs/node/pull/34397
events:
* (SEMVER-MINOR) expand NodeEventTarget functionality (Anna Henningsen) https://github.com/nodejs/node/pull/34057
src:
* (SEMVER-MINOR) allow preventing SetPromiseRejectCallback (Shelley Vohr) https://github.com/nodejs/node/pull/34387
* (SEMVER-MINOR) allow setting a dir for all diagnostic output (AshCripps) https://github.com/nodejs/node/pull/33584
worker:
* (SEMVER-MINOR) make MessagePort inherit from EventTarget (Anna Henningsen) https://github.com/nodejs/node/pull/34057
zlib:
* switch to lazy init for zlib streams (Andrey Pechkurov) https://github.com/nodejs/node/pull/34048
PR-URL: https://github.com/nodejs/node/pull/34542
v14.7.0
2020-07-29 11:33:10 -04:00
Rich Trott
358b934284
build: fix test-ci-js task in Makefile
...
Move benchmark CI to native suite since it requires building an addon.
Refs: https://github.com/nodejs/node/issues/34427#issuecomment-660760789
PR-URL: https://github.com/nodejs/node/pull/34433
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-07-29 11:21:00 -04:00
Rich Trott
24e1beb829
build: do not run benchmark tests on 'make test'
...
Fixes: https://github.com/nodejs/node/issues/34427
PR-URL: https://github.com/nodejs/node/pull/34434
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-07-29 11:21:00 -04:00
Rich Trott
b24f254472
build: add benchmark tests to CI runs
...
Closes: https://github.com/nodejs/node/issues/34321
PR-URL: https://github.com/nodejs/node/pull/34288
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matheus Marchini <mat@mmarchini.me >
2020-07-29 11:20:59 -04:00
Rich Trott
fced3ce5ad
test: add ref comment to test-regress-GH-814_2
...
Because the GitHub issue referred to by the test name is in an old
repository, put a link to it in a comment in
test/pummel/test-regress-GH-814_2.js.
PR-URL: https://github.com/nodejs/node/pull/34516
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2020-07-29 11:20:59 -04:00
Rich Trott
d5c8b386c6
test: add ref comment to test-regress-GH-814
...
Because the GitHub issue referred to by the test name is in an old
repository, put a link to it in a comment in
test/pummel/test-regress-GH-814.js.
PR-URL: https://github.com/nodejs/node/pull/34516
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2020-07-29 11:20:59 -04:00
Andrey Pechkurov
dd2988917f
async_hooks: optimize fast-path promise hook for ALS
...
Remove unnecessary native-to-JS code switches in fast-path for
PromiseHooks. Those switches happen even if a certain type of
hook (say, before) is not installed, which may lead to sub-optimal
performance in the AsyncLocalStorage scenario, i.e. when there is
only an init hook.
PR-URL: https://github.com/nodejs/node/pull/34512
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
2020-07-29 11:20:59 -04:00
Rich Trott
e5f380052f
Revert "doc: move ronkorving to emeritus"
...
This reverts commit c5ef4389ab .
Ron emailed asking to be reinstated.
PR-URL: https://github.com/nodejs/node/pull/34507
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-07-29 11:20:59 -04:00
Anna Henningsen
d90967b346
events: re-use the same isTrusted getter
...
Creating a new function each time the property descriptor is set
comes with performance overhead, since these functions have different
identities, even if they contain the same code.
Refs: https://twitter.com/tverwaes/status/1285496612618473472
PR-URL: https://github.com/nodejs/node/pull/34459
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
2020-07-29 11:20:58 -04:00
Anna Henningsen
0aa3809b6b
worker: make MessagePort inherit from EventTarget
...
Use `NodeEventTarget` to provide a mixed `EventEmitter`/`EventTarget`
API interface.
PR-URL: https://github.com/nodejs/node/pull/34057
Refs: https://twitter.com/addaleax/status/1276289101671608320
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2020-07-29 11:20:46 -04:00
Anna Henningsen
c93a898028
events: expand NodeEventTarget functionality
...
Enable `NodeEventTarget` as a base class for `MessagePort`,
by enabling special processing of events for Node.js listeners,
and removing implicit constructors/private properties so that
classes can be made subclasses of `NodeEventTarget` after they
are created.
PR-URL: https://github.com/nodejs/node/pull/34057
Refs: https://twitter.com/addaleax/status/1276289101671608320
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2020-07-28 01:47:34 +02:00
Joyee Cheung
3024927c9b
lib: initialize instance members in class constructors
...
Since V8 snapshot does not currently support instance member
initialization, initialize them in ordianry class constructors
for now so that these classes can be included in the snapshot.
This may be reverted once
https://bugs.chromium.org/p/v8/issues/detail?id=10704
is fixed and backported.
PR-URL: https://github.com/nodejs/node/pull/32984
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2020-07-28 01:47:23 +02:00
Denys Otrishko
098b193eab
http2: avoid unnecessary buffer resize
...
Refs: https://github.com/nodejs/node/pull/34315
Refs: https://github.com/nodejs/node/pull/30351
PR-URL: https://github.com/nodejs/node/pull/34480
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: David Carlier <devnexen@gmail.com >
2020-07-27 18:23:47 -04:00
Richard Lau
a4806e2d12
build: speed up source tarball creation
...
Avoid building the node binary when building the source tarball. We
need a node binary to build the docs, but it doesn't have to be one
we build from scratch and can reuse any available node binary.
Skip building the xz compressed tarball in the build-tarball workflow
as we only use the gzip compressed tarball in the subsequent build
jobs.
PR-URL: https://github.com/nodejs/node/pull/34508
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Zeyu Yang <himself65@outlook.com >
2020-07-27 18:23:47 -04:00
claudiahdz
f7600d5ab6
deps: upgrade npm to 6.14.7
...
PR-URL: https://github.com/nodejs/node/pull/34468
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruy Adorno <ruyadorno@github.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Shelley Vohr <codebytere@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-07-27 18:23:47 -04:00
Richard Lau
cce1f3e3a8
build: don't run test-asan workflow on non-master pushes
...
PR-URL: https://github.com/nodejs/node/pull/34509
Refs: https://github.com/nodejs/node/pull/34464
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matheus Marchini <mat@mmarchini.me >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
2020-07-27 18:23:46 -04:00
Rich Trott
17bca62428
doc: use sentence-case for GOVERNANCE.md headers
...
Use sentence-case in headers per style guide.
PR-URL: https://github.com/nodejs/node/pull/34503
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2020-07-27 18:23:46 -04:00
Rich Trott
37752cde43
doc: revise onboarding-extras
...
Revise onboarding-extras for style guide conformance and minor wording
improvements.
PR-URL: https://github.com/nodejs/node/pull/34496
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2020-07-27 18:23:46 -04:00
Rich Trott
050866ddf1
doc: remove breaking-change-helper from onboarding-extras
...
I don't think anyone uses the breaking change helper code that is in
onboarding-extras. I'm not sure it works for us anyway as I think it
will fail if there are any breaking changes since the last release. That
may be helpful to releasers, but that is not helpful in determining if
an individual commit is semver-major or not. Regardless, I don't think
it gets used and I'm interested in not weighing down the onboarding
process with a bunch of things that we don't actually use/do.
PR-URL: https://github.com/nodejs/node/pull/34497
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Pranshu Srivastava <rexagod@gmail.com >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
2020-07-27 18:23:46 -04:00
Anna Henningsen
c05b63d8b2
src: skip weak references for memory tracking
...
The memory tracking is supposed to represent the “keeps-alive”
relations between objects for a heap dump, in order to enable
developers to figure out which objects keep which other objects
on the heap.
Weak references do not participate in that relation. Therefore,
we should not be tracking them.
PR-URL: https://github.com/nodejs/node/pull/34469
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2020-07-27 18:23:46 -04:00
Anna Henningsen
b12211eeca
src: prefer internal fields in ModuleWrap
...
Use internal fields instead of `v8::Global`s where possible, since
they generally come with lower overhead and it’s much harder to
introduce memory leaks with them.
PR-URL: https://github.com/nodejs/node/pull/34470
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
2020-07-27 18:23:45 -04:00
Robert Nagy
9b91467aac
http: don't write error to socket
...
The state of the connection is unknown at this point and
writing to it can corrupt client state before it is aware
of an error.
PR-URL: https://github.com/nodejs/node/pull/34465
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-07-27 18:23:45 -04:00
Rich Trott
cc279db29f
test: remove superfluous check in pummel/test-timers
...
If setTimeout is not a function, this test and most other tests would
fail. There is no need to check it.
PR-URL: https://github.com/nodejs/node/pull/34488
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Pranshu Srivastava <rexagod@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2020-07-27 18:23:45 -04:00
Rich Trott
2297d74fd8
doc: add Triagers section to table of contents in GOVERNANCE.md
...
PR-URL: https://github.com/nodejs/node/pull/34504
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Harshitha K P <harshitha014@gmail.com >
2020-07-27 18:23:45 -04:00
Gabriel Schulhof
e7c64af404
n-api: run all finalizers via SetImmediate()
...
Throwing an exception from a finalizer can cause the following fatal
error:
Error: async hook stack has become corrupted (actual: 2, expected: 0)
1: 0x970b5a node::InternalCallbackScope::~InternalCallbackScope()
[./node]
2: 0x99dda0 node::Environment::RunTimers(uv_timer_s*) [./node]
3: 0x13d8b22 [./node]
4: 0x13dbe42 uv_run [./node]
5: 0xa57974 node::NodeMainInstance::Run() [./node]
6: 0x9dbc17 node::Start(int, char**) [./node]
7: 0x7f4965417f43 __libc_start_main [/lib64/libc.so.6]
8: 0x96f4ae _start [./node]
By https://github.com/nodejs/node/issues/34341#issuecomment-658426281 ,
calling into JS from a finalizer and/or throwing exceptions from there
is not advised, because the stack may or may not be set up for JS
execution. The best solution is to run the user's finalizer from a
`SetImmediate()` callback.
Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com >
Fixes: https://github.com/nodejs/node/issues/34341
PR-URL: https://github.com/nodejs/node/pull/34386
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
2020-07-27 18:23:45 -04:00
Andrey Pechkurov
3f11ba1c69
test: fix test-heapdump-zlib
...
PR-URL: https://github.com/nodejs/node/pull/34499
Refs: https://github.com/nodejs/node/pull/34048
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-07-27 18:23:45 -04:00
Gireesh Punathil
99a648738c
doc: onboarding process extras
...
Callout some practices explicitly, so that
the process is followed in a similar manner
PR-URL: https://github.com/nodejs/node/pull/34455
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com >
2020-07-27 18:23:44 -04:00
Gireesh Punathil
bbc7eeadd9
doc: mention triage in GOVERNANCE.md
...
Refs: https://github.com/nodejs/node/pull/34295#issuecomment-660495710
PR-URL: https://github.com/nodejs/node/pull/34426
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Michael Dawson <Michael_Dawson@ca.ibm.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2020-07-27 18:23:44 -04:00