0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

30105 Commits

Author SHA1 Message Date
Jan Krems
9129ab1996
module: expose exports conditions to loaders
PR-URL: https://github.com/nodejs/node/pull/31303
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com>
2020-04-03 01:29:39 +02:00
Myles Borins
f36e248758
test: fix python-version selection with actions
s/PYTHON\_VERSION/python-version

Refs: https://github.com/actions/setup-python

PR-URL: https://github.com/nodejs/node/pull/32609
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-04-03 01:26:10 +02:00
Nick Kreeger
12a2997bed
src: fix extra includes of "env.h" and "env-inl.h"
Due to how the Environment class is used throughout the codebase, there
are a log of includes referencing eitehr env.h or env-inl.h.

This commit cleans up the remaining extra includes of 'env.h' or
'env-inl.h' and adds forward declarations of the Environment class.

PR-URL: https://github.com/nodejs/node/pull/32293
Refs: https://github.com/nodejs/node/issues/27531

Fixes: https://github.com/nodejs/node/issues/27531
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-04-03 01:17:38 +02:00
Harshitha KP
a4dce9ab86
test: add a missing common.mustCall
PR-URL: https://github.com/nodejs/node/pull/32305
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2020-04-03 01:16:22 +02:00
Juan José Arboleda
9a914ff264
test: remove unnecessary console.log() calls
PR-URL: https://github.com/nodejs/node/pull/32541
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-04-03 01:15:31 +02:00
Juan José Arboleda
ff2f47d786
worker: support MessagePort to workers data
PR-URL: https://github.com/nodejs/node/pull/32278
Fixes: https://github.com/nodejs/node/issues/32250
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-04-03 01:12:19 +02:00
Juan José Arboleda
579e6b95ae
test: replace console.log() with debuglog()
PR-URL: https://github.com/nodejs/node/pull/32550
Refs: https://github.com/nodejs/node/pull/32541
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
2020-04-03 01:11:37 +02:00
Andrés M. Gómez
6480f89b77
test: validate util.format when the value is 'Infinity'
PR-URL: https://github.com/nodejs/node/pull/32573
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-04-03 01:10:39 +02:00
Anna Henningsen
5661121ae4
doc: add missing changes: entry for dns.ALL
Refs: https://github.com/nodejs/node/pull/32183

PR-URL: https://github.com/nodejs/node/pull/32617
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-04-03 01:06:32 +02:00
Robert Nagy
efefdd668d net: autoDestroy Socket
Refactors net.Socket into using autoDestroy functionality
of streams.

PR-URL: https://github.com/nodejs/node/pull/31806
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2020-04-02 23:38:32 +02:00
Alba Mendez
882b61a7ee doc: fix more links
Fix broken links found by the checker, and exclude
test/fixtures as it contains invalid links.

Also exclude doc/changelogs because they're huge files
which take very long to parse, and (IIRC) are auto-generated
anyway.

(Oh and also a nit at the README next to my link)

PR-URL: https://github.com/nodejs/node/pull/32586
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-04-02 23:36:34 +02:00
Alba Mendez
77f9e0c814 doc: improve markdown link checker
- Test link definitions too
- Report all broken links in a file, not just the first one
- Avoid use of workers (launching ~90 workers has substantial
  overhead, and in my 4-core machine it is slower than not using
  them at all) & other simplifications

Refs: https://github.com/nodejs/node/pull/32359

PR-URL: https://github.com/nodejs/node/pull/32586
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-04-02 23:36:22 +02:00
Gerhard Stoebich
98007329ef doc: add flarna to collaborators
PR-URL: https://github.com/nodejs/node/pull/32620
Fixes: https://github.com/nodejs/node/issues/32333
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-04-02 19:56:03 +02:00
Ruben Bridgewater
6baddcfddf
util: only inspect error properties that are not visible otherwise
Inspecting errors results in duplicated information in case an error
is created with enumerable `name`, `message` or `stack` properties.
In that case, check if the output already contains that information
and prevent listing that property.

This reduces the noise as receiver.

PR-URL: https://github.com/nodejs/node/pull/32327
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2020-04-02 18:41:57 +02:00
Ben Noordhuis
e20b4f918a
test: fix fs test-fs-utimes strictEqual arg order
`actual` is the first argument, `expected` the second, but the test
flipped them around and was producing confusing assertion messages
as a result.

Refs: https://github.com/nodejs/node/pull/32408#issuecomment-602170887

PR-URL: https://github.com/nodejs/node/pull/32420
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-04-02 18:41:26 +02:00
Lucas Holmquist
88b4e86fd7
fs: make parameters optional for readSync
This makes the offset, length and position parameters optional by
passing in an options object.

PR-URL: https://github.com/nodejs/node/pull/32460
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-04-02 18:34:31 +02:00
James M Snell
05da0bbadc
src: avoid using elevated v8 namespaces in node_perf.h
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/32468
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-04-02 18:33:25 +02:00
James M Snell
04c9a983de
src: avoid using elevated v8 namespaces in node_errors.h
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/32468
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2020-04-02 18:33:24 +02:00
cjihrig
23a34089aa
tools: update ESLint to 7.0.0-alpha.3
Update ESLint to 7.0.0-alpha.3

PR-URL: https://github.com/nodejs/node/pull/32533
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-04-02 18:29:48 +02:00
Juan José Arboleda
7534477786
test: replace flag expose_internals to expose-internals
PR-URL: https://github.com/nodejs/node/pull/32542
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-04-02 18:28:23 +02:00
himself65
060a170e29
test: use common.mustCall in test-worker-esm-exit
PR-URL: https://github.com/nodejs/node/pull/32544
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-04-02 18:26:59 +02:00
Daniel Estiven Rico Posada
a6ab883eaa
test: use template strings in parallel tests
PR-URL: https://github.com/nodejs/node/pull/32549
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-04-02 18:25:30 +02:00
James M Snell
0be9ebb722
src: minor http2 refactorings
* Simplify Http2Priority struct
* BooleanValue => IsTrue/IsFalse

Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/32551
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-04-02 18:15:38 +02:00
James M Snell
5f5d3805f0
src: rename http2 class and suppress compile warnings
Suppress compile warnings on Windows, rename class for
consistent styling.

Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/32551
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-04-02 18:15:36 +02:00
James M Snell
8f8bbc6798
src: use smart pointers for nghttp2 objects
Signed-off-by: James M Snell <jasnell@gmail.com>

PR-URL: https://github.com/nodejs/node/pull/32551
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2020-04-02 18:15:34 +02:00
Anna Henningsen
f558a765da
src: remove loop_init_failed_ from Worker class
There’s no reason for this to not be stored alongside the loop
data structure itself.

PR-URL: https://github.com/nodejs/node/pull/32562
Refs: https://github.com/nodejs/node/pull/32344
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-04-02 18:13:09 +02:00
Anna Henningsen
be876510bf
src: clean up worker thread creation code
Instead of setting and then in the case of error un-setting properties,
only set them when no error occurs.

Refs: https://github.com/nodejs/node/pull/32344

PR-URL: https://github.com/nodejs/node/pull/32562
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-04-02 18:13:07 +02:00
Hachimi Aa (Sfeir)
0c70e8c6e4
doc: improve fs.read documentation
PR-URL: https://github.com/nodejs/node/pull/29270
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2020-04-02 18:09:46 +02:00
Ben Noordhuis
6f94221884
test: add known issues test for #31733
Authenticated decryption works for file streams up to 32768 bytes but
not beyond. Other streams and direct decryption are not affected.

Refs: https://github.com/nodejs/node/issues/31733

PR-URL: https://github.com/nodejs/node/pull/31734
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2020-04-02 18:00:07 +02:00
Anna Henningsen
e06512b9b7
report: add missing locks for report_on_fatalerror accessors
Overlooked in 2fa74e3e38.

Refs: https://github.com/nodejs/node/pull/32207

PR-URL: https://github.com/nodejs/node/pull/32535
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2020-04-02 17:46:30 +02:00
Anna Henningsen
2a885151e9
src: include AsyncWrap provider strings in snapshot
… and move them to `IsolateData`, because they should exist once
per Isolate.

PR-URL: https://github.com/nodejs/node/pull/32572
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2020-04-02 17:45:41 +02:00
Anna Henningsen
6246f90375
test: wait for message from parent in embedding cctest
I’ve seen this fail a few times in CI, presumably because the
inspector commmand did not reach the child thread in time.
Explicitly waiting seems to solve that.

Refs: https://github.com/nodejs/node/pull/30467

PR-URL: https://github.com/nodejs/node/pull/32563
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-04-02 17:44:25 +02:00
Anna Henningsen
72e521f5e8
src: move JSONWriter into its own file
The JSONWriter feature is not inherently related to the report
feature in any way.

As a drive-by fix, remove a number of unused header includes.

PR-URL: https://github.com/nodejs/node/pull/32552
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2020-04-02 17:25:57 +02:00
Anna Henningsen
c4b381a131
src: align PerformanceState class name with conventions
Class names are written in UpperCamelCase. Otherwise, this looks like
it’s a variable, not a class name.

PR-URL: https://github.com/nodejs/node/pull/32539
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-04-02 17:25:29 +02:00
Anna Henningsen
037ac99ed5
embedding: make Stop() stop Workers
This makes sense given that terminating execution of the parent thread
this way likely also is supposed to stop all running Worker threads
spawned by it.

PR-URL: https://github.com/nodejs/node/pull/32531
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-04-02 17:23:19 +02:00
Anna Henningsen
d812f16234
embedding: provide hook for custom process.exit() behaviour
Embedders may not want to terminate the process when `process.exit()`
is called. This provides a hook for more flexible handling of that
situation.

Refs: https://github.com/nodejs/node/pull/30467#issuecomment-603689644

PR-URL: https://github.com/nodejs/node/pull/32531
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-04-02 17:23:15 +02:00
Andrey Pechkurov
7e664a554a benchmark: fix error on server close in AsyncLocalStorage benchmark
PR-URL: https://github.com/nodejs/node/pull/32503
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2020-04-02 14:53:24 +02:00
Alex R
b149eefa82 http: fix incorrect headersTimeout measurement
For keep-alive connections, the headersTimeout may fire during
subsequent request because the measurement was reset after
a request and not before a request.

PR-URL: https://github.com/nodejs/node/pull/32329
Fixes: https://github.com/nodejs/node/issues/27363
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2020-04-02 14:50:20 +02:00
Anna Henningsen
8b9e877435
worker: do not emit 'exit' events during process.exit()
Do not emit `'exit'` events caused by recursively stopping all
running Workers from inside the `process.exit()` call.

PR-URL: https://github.com/nodejs/node/pull/32546
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2020-04-02 02:46:14 +02:00
Anna Henningsen
d3a4865417
tracing: do not attempt to call into JS when disallowed
PR-URL: https://github.com/nodejs/node/pull/32548
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-04-02 02:45:16 +02:00
Myles Borins
ac08249971
doc: update releaser list in README.md
Moved emeritus members keys and fixed alphabetization issues

PR-URL: https://github.com/nodejs/node/pull/32577
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@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>
2020-04-01 19:11:08 -04:00
Hassaan Pasha
881c932bf2 deps: update archs files for OpenSSL-1.1.1f
After an OpenSSL source update, all the config files need to be
 regenerated and comitted by:
    $ cd deps/openssl/config
    $ make
    $ git add deps/openssl/config/archs
    $ git add deps/openssl/openssl/include/crypto/bn_conf.h
    $ git add deps/openssl/openssl/include/crypto/dso_conf.h
    $ git add deps/openssl/openssl/include/openssl/opensslconf.h
    $ git commit

PR-URL: https://github.com/nodejs/node/pull/32583
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2020-04-01 14:13:16 -07:00
Hassaan Pasha
5318fe58f6 deps: upgrade openssl sources to 1.1.1f
This updates all sources in deps/openssl/openssl by:
    $ cd deps/openssl/
    $ rm -rf openssl
    $ tar zxf ~/tmp/openssl-1.1.1f.tar.gz
    $ mv openssl-1.1.0h openssl
    $ git add --all openssl
    $ git commit openssl

PR-URL: https://github.com/nodejs/node/pull/32583
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2020-04-01 14:12:48 -07:00
Myles Borins
9d82c5501c
test: mark test-http2-reset-flood flaky on bsd
This test is somewhat regularly flaky on 12.x and it appears master as
well. There appears to be an issue tracking flakes for 6+ months. Seems
reasonable to mark this to keep us from having red CI.

Refs: https://github.com/nodejs/node/issues/29802

PR-URL: https://github.com/nodejs/node/pull/32595
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2020-04-01 12:54:17 -04:00
Matheus Marchini
f6dcd63b29
deps: revert whitespace changes on V8
While landing the upgrade to V8 8.1, something went wrong and git made
unecessary (and incorrect) whitespace changes to test fixtures, which
broke V8 tests. Revert those changes to fix our tests.

PR-URL: https://github.com/nodejs/node/pull/32587
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2020-04-01 09:24:38 -07:00
Myles Borins
18b3383526
test: add test-worker-prof to the SLOW list for debug
Consistently failing on ubuntu1804_sharedlibs_debug_x64

Refs: https://github.com/nodejs/node/issues/26401

PR-URL: https://github.com/nodejs/node/pull/32589
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2020-04-01 10:39:38 -04:00
Robert Nagy
138eb32be1 net: wait for shutdown to complete before closing
When not allowing half open, handle.close would be
invoked before shutdown has been called and
completed causing a potential data race.

Fixes: https://github.com/nodejs/node/issues/32486#issuecomment-604072559

PR-URL: https://github.com/nodejs/node/pull/32491
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2020-04-01 13:05:10 +02:00
gengjiawen
9c00af0716 doc: add ASAN build instructions
PR-URL: https://github.com/nodejs/node/pull/32436
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
2020-04-01 02:54:30 +00:00
Guy Bedford
534c204e22 module: path-only CJS exports extension searching
PR-URL: https://github.com/nodejs/node/pull/32351
Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2020-03-31 20:39:01 -06:00
cjihrig
60c4c2b6c5
src: runtime deprecate process.umask()
This commit runtime deprecates calling process.umask() with
no arguments.

PR-URL: https://github.com/nodejs/node/pull/32499
Fixes: https://github.com/nodejs/node/issues/32321
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2020-03-31 22:05:07 -04:00