cjihrig
fd78d04188
doc: remove extra backtick
...
PR-URL: https://github.com/nodejs/node/pull/31186
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2020-02-06 02:49:35 +00:00
Ruben Bridgewater
808f025bea
doc: use code markup/markdown in headers
...
This also allows us to remove backslash escaping for `[` and `]`
inside of header code, which makes the bare markdown more readable.
Refs: https://github.com/nodejs/node/pull/31086
PR-URL: https://github.com/nodejs/node/pull/31149
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-02-06 02:49:35 +00:00
telenord
73717f2d7e
http: http_outgoing rename var to let and const
...
PR-URL: https://github.com/nodejs/node/pull/30284
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2020-02-06 02:49:35 +00:00
Robert Nagy
350cfa7333
http: free listeners on free sockets
...
Reduced memory usage by ensuring free sockets don't have extra
listeners while in the pool.
PR-URL: https://github.com/nodejs/node/pull/29259
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2020-02-06 02:49:35 +00:00
antsmartian
aad2578325
stream: group all properties using defineProperties
...
PR-URL: https://github.com/nodejs/node/pull/31144
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-02-06 02:49:35 +00:00
Kamat, Trivikram
a2fa0318be
zlib: use for...of
...
PR-URL: https://github.com/nodejs/node/pull/31051
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-02-06 02:49:35 +00:00
cjihrig
6bec620efc
wasi: fix serdes bugs from snapshot1 migration
...
During the migration to WASI snapshot1, a field was removed
from the subscription type. The field was removed from the
code, but the bounds checking logic was not updated. This
commit updates that check.
Similarly, __wasi_linkcount_t changed from a uint32_t to a
uint64_t. However, the bounds checks were missed, and the code
was still writing uint32_t's (to the new correct offset) instead
of uint64_t's. This commit updates that logic as well.
Refs: https://github.com/nodejs/node/pull/30980
PR-URL: https://github.com/nodejs/node/pull/31122
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-02-06 02:49:35 +00:00
kresimirfranin
59101b5a2a
lib: replace var with let/const
...
PR-URL: https://github.com/nodejs/node/pull/30394
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2020-02-06 02:49:34 +00:00
Rich Trott
255e3cdd40
doc,wasi: use code markup/markdown in headers
...
PR-URL: https://github.com/nodejs/node/pull/31086
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2020-02-06 02:49:34 +00:00
cjihrig
0d212fc9c1
wasi: throw on failed uvwasi_init()
...
Prior to this commit, if uvwasi_init() failed in any way, Node
would abort due to a failed CHECK_EQ(). This commit changes
that behavior to a thrown exception.
PR-URL: https://github.com/nodejs/node/pull/31076
Fixes: https://github.com/nodejs/node/issues/30878
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-02-06 02:49:34 +00:00
cjihrig
6de77d3f09
deps: uvwasi: cherry-pick 75b389c
...
Original commit message:
This commit changes the memory management in
uvwasi_fd_table_init() such that ENOMEM errors can be
handled better in uvwasi_fd_table_free().
PR-URL: https://github.com/nodejs/node/pull/31076
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-02-06 02:49:34 +00:00
cjihrig
8f4339b8af
deps: uvwasi: cherry-pick 64e59d5
...
Original commit message:
This commit ensures that multiple calls to uvwasi_destroy()
are possible. Prior to this commit, subsequent calls to
destroy() would abort because the file table's rwlock was
incorrectly being destroyed multiple times.
PR-URL: https://github.com/nodejs/node/pull/31076
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-02-06 02:49:34 +00:00
legendecas
a4c7eba474
src: prevent hard coding stack trace limit
...
Refer to Environment::stack_trace_limit() while printing fresh
stacktraces in c++ land.
PR-URL: https://github.com/nodejs/node/pull/30752
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2020-02-06 02:49:34 +00:00
Anatoli Papirovski
f86862a2f5
timers: fix refresh for expired timers
...
Expired timers were not being refresh correctly and
would always act as unrefed if refresh was called.
PR-URL: https://github.com/nodejs/node/pull/27345
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-02-06 02:49:34 +00:00
Anatoli Papirovski
a4cbd57356
timers: do less work in insert
...
Most of the code in insert is only applicable to scheduling
non-timers or re-scheduling timers. We can skip most of it
in the case of setTimeout, setInterval & setUnrefTimeout.
PR-URL: https://github.com/nodejs/node/pull/27345
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-02-06 02:49:34 +00:00
Robert Nagy
823ee2be05
stream: reset flowing state if no 'readable' or 'data' listeners
...
If we don't have any 'readable' or 'data' listeners and we are
not about to resume. Then reset flowing state to initial null state.
PR-URL: https://github.com/nodejs/node/pull/31036
Fixes: https://github.com/nodejs/node/issues/24474
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-02-06 02:49:33 +00:00
Robert Nagy
b12b9305f0
stream: simplify isBuf
...
PR-URL: https://github.com/nodejs/node/pull/31067
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
2020-02-06 02:49:33 +00:00
A. Volgin
25d96ecd4b
dgram: test to add and to drop specific membership
...
Test of addSourceSpecificMembership and dropSourceSpecificMembership
for correct arguments with sourceAddress, groupAddress.
PR-URL: https://github.com/nodejs/node/pull/31047
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2020-02-06 02:49:33 +00:00
Rich Trott
ffe92267fc
doc,vm,test: remove _sandbox_ from vm documentation
...
The vm documentation uses the word _sandbox_ but has a significant
disclaimer about how that should not be interpreted to connote security
guarantees. Remove the term "sandbox" from documentation. As a result,
some code and tests also need to change.
PR-URL: https://github.com/nodejs/node/pull/31057
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2020-02-06 02:49:33 +00:00
Anna Henningsen
e7829758dd
lib: further simplify assertions in vm/module
...
Refs: https://github.com/nodejs/node/pull/30755
PR-URL: https://github.com/nodejs/node/pull/30815
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2020-02-06 02:49:33 +00:00
Matteo Collina
eb82683538
events: add EventEmitter.on to async iterate over events
...
Fixes: https://github.com/nodejs/node/issues/27847
PR-URL: https://github.com/nodejs/node/pull/27994
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-02-06 02:49:33 +00:00
cjihrig
b3e0bc2e91
test: get lib/wasi.js coverage to 100%
...
This commit covers the last remaining uncovered code in
lib/wasi.js.
PR-URL: https://github.com/nodejs/node/pull/31039
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
2020-02-06 02:49:32 +00:00
David Newman
02fc95d3d7
lib: improve spelling and grammar in comment
...
PR-URL: https://github.com/nodejs/node/pull/31026
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2020-02-06 02:49:32 +00:00
Andrew Kuzmenko
07d195ab5f
test: cover vm with negative tests
...
Test the impossibility of creating
an abstract instance of the Module.
Test of SyntheticModule to throw exception
if invalid params in constructor
PR-URL: https://github.com/nodejs/node/pull/31028
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-02-06 02:49:32 +00:00
Joyee Cheung
b4509170f4
bootstrap: use different scripts to setup different configurations
...
This patch splits the handling of `isMainThread` and
`ownsProcessState` from conditionals in
`lib/internal/bootstrap/node.js` into different scripts under
`lib/internal/bootstrap/switches/`, and call them accordingly
from C++ after `node.js` is run.
This:
- Creates a common denominator of the main thread and the worker
thread bootstrap that can be snapshotted and shared by
both.
- Makes it possible to override the configurations on-the-fly.
PR-URL: https://github.com/nodejs/node/pull/30862
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2020-02-06 02:49:32 +00:00
Ruben Bridgewater
df94cfb67c
errors: improve ERR_INVALID_ARG_TYPE
...
ERR_INVALID_ARG_TYPE is the most common error used throughout the
code base. This improves the error message by providing more details
to the user and by indicating more precisely which values are allowed
ones and which ones are not.
It adds the actual input to the error message in case it's a primitive.
If it's a class instance, it'll print the class name instead of
"object" and "falsy" or similar entries are not named "type" anymore.
PR-URL: https://github.com/nodejs/node/pull/29675
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-02-06 02:49:32 +00:00
Ruben Bridgewater
ae3459af9f
buffer: improve .from() error details
...
This makes sure the original input is passed to the error in case
no matching inputs are found. Instead of passing along all values,
only valid or possibliy valid values are passed through. That way
invalid values end up in the error case with the original input.
PR-URL: https://github.com/nodejs/node/pull/29675
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-02-06 02:49:32 +00:00
Gerhard Stoebich
5cb0de948d
events: allow monitoring error events
...
Installing an error listener has a side effect that emitted errors are
considered as handled. This is quite bad for monitoring/logging tools
which tend to be interested in errors but don't want to cause side
effects like swallow an exception.
There are some workarounds in the wild like monkey patching emit or
remit the error if monitoring tool detects that it is the only listener
but this is error prone and risky.
This PR allows to install a listener to monitor errors with the side
effect to consume the error. To avoid conflicts with other events it
exports a symbol on EventEmitter which owns this special meaning.
Refs: https://github.com/open-telemetry/opentelemetry-js/issues/225
PR-URL: https://github.com/nodejs/node/pull/30932
Refs: https://github.com/open-telemetry/opentelemetry-js/issues/225
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-02-06 02:49:32 +00:00
cjihrig
b2caac25a7
test: remove obsolete WASI test
...
test-wasi-binding.js was added during the initial WASI
development, but it is now considered obsolete. It also does
not provide any additional test coverage. This commit removes
it.
PR-URL: https://github.com/nodejs/node/pull/30980
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-02-06 02:49:31 +00:00
cjihrig
3454f65ebe
doc,lib,src,test: rename WASI CLI flag
...
The WASI API has moved from preview0 to preview1. This commit
updates the CLI flag accordingly.
PR-URL: https://github.com/nodejs/node/pull/30980
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-02-06 02:49:31 +00:00
cjihrig
bf4f516eea
deps,src,test: update to uvwasi 0.0.3
...
This commit updates to uvwasi 0.0.3, which implements a newer
version of the WASI spec, snapshot_1. Since the WASI API has
changed, this also requires updating the WebAssembly memory
interfacing logic and recompiling the WASI tests with a
version of wasi-libc that supports snapshot_1.
PR-URL: https://github.com/nodejs/node/pull/30980
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-02-06 02:49:31 +00:00
Soar
6909e3e656
assert: use for...of
...
Refs: #30960
PR-URL: https://github.com/nodejs/node/pull/30983
Refs: https://github.com/nodejs/node/pull/30960
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2020-02-06 02:49:31 +00:00
Trivikram Kamat
4cc10d5fd4
http: use for...of in http library code
...
PR-URL: https://github.com/nodejs/node/pull/30958
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-02-06 02:49:31 +00:00
Trivikram Kamat
cd700ffcba
tls: for...of in _tls_common.js
...
PR-URL: https://github.com/nodejs/node/pull/30961
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-02-06 02:49:31 +00:00
Anatoli Papirovski
a9fad8524c
async_hooks: ensure proper handling in runInAsyncScope
...
We should never try to manually run emitAfter in case of an error,
the exception handler will do it for us, if we're going to recover.
PR-URL: https://github.com/nodejs/node/pull/30965
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-02-06 02:49:31 +00:00
Robert Nagy
95eb1c2884
doc: add note about fs.close() about undefined behavior
...
Add notes to fs.close and fs.closeSync() about udnefined behavior.
PR-URL: https://github.com/nodejs/node/pull/30966
Refs: https://github.com/nodejs/node/issues/30864
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-02-06 02:49:31 +00:00
cjihrig
ceca54940b
test: simplify test-wasi-start-validation.js
...
This commit removes an extra block scope, and avoid reading
the simple.wasm file for every test case.
PR-URL: https://github.com/nodejs/node/pull/30972
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-02-06 02:49:30 +00:00
cjihrig
be3fd2e714
test: improve WASI start() coverage
...
This commit adds additional test cases to
test-wasi-start-validation.js, which gets the JS test coverage
of start() to 100%.
PR-URL: https://github.com/nodejs/node/pull/30972
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-02-06 02:49:30 +00:00
cjihrig
d31e6d9ee6
wasi: require CLI flag to require() wasi module
...
This commit ensures that the WASI module cannot be require()'ed
without a CLI flag while the module is still experimental.
This fixes a regression from
https://github.com/nodejs/node/pull/30778 .
PR-URL: https://github.com/nodejs/node/pull/30963
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
2020-02-06 02:49:30 +00:00
Trivikram Kamat
3872a02020
stream: use for...of
...
PR-URL: https://github.com/nodejs/node/pull/30960
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2020-02-06 02:49:30 +00:00
Jeremy Albright
7a8232a041
readline: promote _getCursorPos to public api
...
Alias _getCursorPos() = getCursorPos() for backwards
compatibility.
Refs: https://github.com/nodejs/node/issues/30347
PR-URL: https://github.com/nodejs/node/pull/30687
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2020-02-06 02:49:30 +00:00
cjihrig
a4b6668877
test: add missing test flags
...
test-wasi-start-validation.js should require the
--experimental-wasi-unstable-preview0 flag in order to run.
However, due to a recent regression, that hasn't been enforced.
https://github.com/nodejs/node/pull/30963 fixes the regression
and will cause this test to start (correctly) failing. This
commit adds the missing flag.
PR-URL: https://github.com/nodejs/node/pull/30971
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
2020-02-06 02:49:30 +00:00
Rich Trott
8f5ffffb61
test: add test for validation for wasi.start() argument
...
PR-URL: https://github.com/nodejs/node/pull/30919
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
2020-02-06 02:49:30 +00:00
Anna Henningsen
65e5a8a90c
src: unregister Isolate with platform before disposing
...
I previously thought the order of these calls was no longer
relevant. I was wrong.
This commit undoes the changes from 312c02d25e , adds a comment
explaining why I was wrong, and flips the order of the calls
elsewhere for consistency, the latter having been the goal
of 312c02d25e .
Fixes: https://github.com/nodejs/node/issues/30846
Refs: https://github.com/nodejs/node/pull/30181
PR-URL: https://github.com/nodejs/node/pull/30909
Reviewed-By: Shelley Vohr <codebytere@gmail.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: David Carlier <devnexen@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-02-06 02:49:30 +00:00
Matteo Collina
322912aa65
stream: do not chunk strings and Buffer in Readable.from
...
PR-URL: https://github.com/nodejs/node/pull/30912
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-02-06 02:49:29 +00:00
rene.herrmann
d19316d2d9
lib: change var to let/const
...
PR-URL: https://github.com/nodejs/node/pull/30910
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2020-02-06 02:49:29 +00:00
Stephen Gallagher
ada7624e6b
build: auto-load ICU data from --with-icu-default-data-dir
...
When compiled with `--with-intl=small` and
`--with-icu-default-data-dir=PATH`, Node.js will use PATH as a
fallback location for the ICU data.
We will first perform an access check using fopen(PATH, 'r') to
ensure that the file is readable. If it is, we'll set the
icu_data_directory and proceed. There's a slight overhead for the
fopen() check, but it should be barely measurable.
This will be useful for Linux distribution packagers who want to
be able to ship a minimal node binary in a container image but
also be able to add on the full i18n support where needed. With
this patch, it becomes possible to ship the interpreter as
/usr/bin/node in one package for the distribution and to ship the
data files in another package (without a strict dependency
between the two). This means that users of the distribution will
not need to explicitly direct Node.js to locate the ICU data. It
also means that in environments where full internationalization is
not required, they do not need to carry the extra content (with
the associated storage costs).
Refs: https://github.com/nodejs/node/issues/3460
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com >
PR-URL: https://github.com/nodejs/node/pull/30825
Reviewed-By: Steven R Loomis <srloomis@us.ibm.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-02-06 02:49:29 +00:00
Joyee Cheung
84c9e4f1b5
lib: refactor NativeModule
...
Refactor the internal NativeModule class to a JS class and add
more documentation about its properties.
PR-URL: https://github.com/nodejs/node/pull/30856
Reviewed-By: Denys Otrishko <shishugi@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-02-06 02:49:29 +00:00
Ben Noordhuis
5fff46a531
test: work around ENOTEMPTY when cleaning tmp dir
...
Replace the homegrown rimrafsync implementation in test/common with
a call to `fs.rmdirSync(path, { recursive: true })`.
Fixes: https://github.com/nodejs/node/issues/30620
Fixes: https://github.com/nodejs/node/issues/30844
PR-URL: https://github.com/nodejs/node/pull/30849
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-02-06 02:49:29 +00:00
Juan José Arboleda
cfe30aebe1
doc: add code example to inspector.url() method
...
PR-URL: https://github.com/nodejs/node/pull/29496
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2020-02-06 02:49:29 +00:00