More precisely, make them untransferable if they were created through
*our* APIs, because those do not follow the improved free callback
mechanism that V8 uses now. All other ArrayBuffers can be transferred
between threads now, the assumption being that they were created in a
clean way that follows the V8 API on this.
This addresses a TODO comment.
Refs: https://github.com/nodejs/node/pull/30339#issuecomment-552225353
PR-URL: https://github.com/nodejs/node/pull/30475
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Previously `internal/bootstrap/pre_execution.js` requires
`internal/modules/cjs/loader.js` which in turn requires
`internal/bootstrap/pre_execution.js`. This patch moves the
entry point execution logic out of `pre_execution.js` and
puts it into `internal/modules/run_main.js`. It also tests
that `Module.runMain` can be monkey-patched before further
deprecation/refactoring can be done.
Also added an internal assertion `hasLoadedAnyUserCJSModule`
for documentation purposes.
PR-URL: https://github.com/nodejs/node/pull/30349
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
C1 control characters will from now on also be escaped to prevent
altering the terminal behavior.
Fixes: https://github.com/nodejs/node/issues/29450
PR-URL: https://github.com/nodejs/node/pull/29826
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Notable changes:
* Experimental support for building Node.js with Python 3 is improved.
* ICU time zone data is updated to version 2019c. This fixes the date
offset in Brazil.
PR-URL: https://github.com/nodejs/node/issues/30352
PR-URL: https://github.com/nodejs/node/pull/30466
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/30465
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This adds `CHECK`s verifying that bootstrapping has finished
before environment variables are accessed or handles/requests
are created. The latter complements a pair of existent checks,
but fails earlier and thus gives information about the call
site, effectively addressing the TODO comment there.
PR-URL: https://github.com/nodejs/node/pull/30452
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Building Node.js without a ccache cache takes longer than the 50 minute
Travis time limit for jobs for public repositories. To mitigate this we
added a job to compile V8 on the basis that in the worst case it would
complete within 50 minutes and provide a cache that could be used by a
restarted `Compile Node.js` job.
Recent PRs have exceeded the 50 minute time limit for the `Compile V8`
job. When Travis times out a build the cache is not stored.
This commit drops the `Compile V8` job and adds a manual timeout to the
`Compile Node.js` job which will allow the cache to be stored and used
in restarts of the job.
PR-URL: https://github.com/nodejs/node/pull/30469
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
If there is a file 'path' in the root dir, the test
will fail with the 'ENOTDIR' instead of 'ENOENT'.
Change path to something more unlikely.
PR-URL: https://github.com/nodejs/node/pull/30280
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@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>
Changed outdated var to const in the test file
repl-unexpected-token-recoverable.js
PR-URL: https://github.com/nodejs/node/pull/30434
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@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>
Co-Authored-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/30345
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
On some platforms the `'end'` event might not be emitted because the
socket could be destroyed by the other peer while the client is still
sending the data triggering an error. Use the `'close'` event instead.
PR-URL: https://github.com/nodejs/node/pull/30360
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Document that returned `pathname` is now `/` when the URL to parse has
no path and the protocol scheme is`ws:` or `wss:`.
PR-URL: https://github.com/nodejs/node/pull/30348
Fixes: https://github.com/nodejs/node/issues/30154
Refs: https://github.com/nodejs/node/pull/26941
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Mostly, this replaces "It is recommended to do X" with "Do X."
PR-URL: https://github.com/nodejs/node/pull/30458
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
The statement that tests for tier 1 platforms are run on multiple
variants is not true. We usually only run on one variant of macOS.
Remove "multiple", which simplifies and clarifies the statements anyway.
PR-URL: https://github.com/nodejs/node/pull/30366
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
The "maintenance is supported by" stuff in BUILDING.md is unclear. It
seems unnecessary so I propose removing it.
I don't understand what it means to, in this context, support
maintenance. Does it mean that you simply do the maintenance? Does that
mean it really just means "maintain"? Do we really mean that we mantain
support, rather than support maintenance?
That information does not seem necessary to include. I'm not sure it's
meaningful. With (for example) Windows, is it accurate to say that the
Node.js core team maintains support for it? Or is it accurate to say
that support is maintaned by smaller groups or individuals within the
Node.js core team? Both could be considered accurate. So is the
difference meaningful?
I think the more important elements of determinig tier support are the
other listed elements.
PR-URL: https://github.com/nodejs/node/pull/30365
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>