Commit d5753b1b authored by Jérémy Lal's avatar Jérémy Lal

New upstream version 12.1.0~dfsg

parent f4ac25a8
......@@ -2,7 +2,8 @@
Select a Node.js version below to view the changelog history:
* [Node.js 11](doc/changelogs/CHANGELOG_V11.md) - **Current**
* [Node.js 12](doc/changelogs/CHANGELOG_V12.md) - **Current**
* [Node.js 11](doc/changelogs/CHANGELOG_V11.md) - Current
* [Node.js 10](doc/changelogs/CHANGELOG_V10.md)**Long Term Support**
* [Node.js 9](doc/changelogs/CHANGELOG_V9.md) — End-of-Life
* [Node.js 8](doc/changelogs/CHANGELOG_V8.md) — Long Term Support
......@@ -29,7 +30,8 @@ release.
</tr>
<tr>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V12.md#12.0.0">12.0.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V12.md#12.1.0">12.1.0</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V12.md#12.0.0">12.0.0</a><br/>
</td>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V11.md#11.14.0">11.14.0</a></b><br/>
......
......@@ -139,30 +139,28 @@ the nomination.
The nomination passes if no Collaborators oppose it after one week. Otherwise,
the nomination fails.
Prior to the public nomination, the Collaborator initiating it can seek
feedback from other Collaborators in private using
[the GitHub discussion page][collaborators-discussions] of the
Collaborators team, and work with the nominee to improve the nominee's
contribution profile, in order to make the nomination as frictionless
as possible.
There are steps a nominator can take in advance to make a nomination as
frictionless as possible. Use the [Collaborators discussion page][] to request
feedback from other Collaborators in private. A nominator may also work with the
nominee to improve their contribution profile.
If individuals making valuable contributions do not believe they have been
considered for a nomination, they may log an issue or contact a Collaborator
directly.
It is possible that Collaborators will overlook someone with valuable
contributions. In that case, the contributor may open an issue or contact a
Collaborator to request a nomination.
### Onboarding
When the nomination is accepted, the new Collaborator will be onboarded
by a TSC member. See [the onboarding guide](./doc/onboarding.md) on
details of the onboarding process. In general, the onboarding should be
completed within a month after the nomination is accepted.
After the nomination passes, a TSC member onboards the new Collaborator. See
[the onboarding guide](./doc/onboarding.md) on details of the onboarding
process. In general, the onboarding should occur within a month after the
nomination passes.
## Consensus Seeking Process
The TSC follows a [Consensus Seeking][] decision-making model as described by
the [TSC Charter][].
The TSC follows a [Consensus Seeking][] decision-making model per the
[TSC Charter][].
[collaborators-discussions]: https://github.com/orgs/nodejs/teams/collaborators/discussions
[Collaborators discussion page]: https://github.com/orgs/nodejs/teams/collaborators/discussions
[Consensus Seeking]: https://en.wikipedia.org/wiki/Consensus-seeking_decision-making
[TSC Charter]: https://github.com/nodejs/TSC/blob/master/TSC-Charter.md
[nodejs/node]: https://github.com/nodejs/node
......@@ -118,8 +118,8 @@ The externally maintained libraries used by Node.js are:
"""
COPYRIGHT AND PERMISSION NOTICE (ICU 58 and later)
Copyright © 1991-2018 Unicode, Inc. All rights reserved.
Distributed under the Terms of Use in http://www.unicode.org/copyright.html.
Copyright © 1991-2019 Unicode, Inc. All rights reserved.
Distributed under the Terms of Use in https://www.unicode.org/copyright.html.
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Unicode data files and any associated documentation
......@@ -1103,7 +1103,7 @@ The externally maintained libraries used by Node.js are:
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""
- jinja2, located at tools/jinja2, is licensed as follows:
- jinja2, located at tools/inspector_protocol/jinja2, is licensed as follows:
"""
Copyright (c) 2009 by the Jinja Team, see AUTHORS for more details.
......@@ -1138,7 +1138,7 @@ The externally maintained libraries used by Node.js are:
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""
- markupsafe, located at tools/markupsafe, is licensed as follows:
- markupsafe, located at tools/inspector_protocol/markupsafe, is licensed as follows:
"""
Copyright (c) 2010 by Armin Ronacher and contributors. See AUTHORS
for more details.
......@@ -1255,7 +1255,7 @@ The externally maintained libraries used by Node.js are:
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
"""
- gtest, located at deps/gtest, is licensed as follows:
- gtest, located at test/cctest/gtest, is licensed as follows:
"""
Copyright 2008, Google Inc.
All rights reserved.
......
......@@ -1226,6 +1226,8 @@ LINT_CPP_FILES = $(filter-out $(LINT_CPP_EXCLUDE), $(wildcard \
tools/icu/*.h \
tools/code_cache/*.cc \
tools/code_cache/*.h \
tools/snapshot/*.cc \
tools/snapshot/*.h \
))
# Code blocks don't have newline at the end,
......
......@@ -24,7 +24,7 @@ function main({ len, n }) {
bench.start();
for (var i = 0; i < n; i++) {
parser.execute(header, 0, header.length);
parser.reinitialize(REQUEST, i > 0);
parser.initialize(REQUEST, header);
}
bench.end(n);
}
......
......@@ -421,6 +421,11 @@ parser.add_option('--with-ltcg',
dest='with_ltcg',
help='Use Link Time Code Generation. This feature is only available on Windows.')
parser.add_option('--with-node-snapshot',
action='store_true',
dest='with_node_snapshot',
help='Turn on V8 snapshot integration. Currently experimental.')
intl_optgroup.add_option('--download',
action='store',
dest='download_list',
......@@ -928,6 +933,13 @@ def configure_node(o):
o['variables']['want_separate_host_toolset'] = int(
cross_compiling and want_snapshots)
if options.with_node_snapshot:
o['variables']['node_use_node_snapshot'] = 'true'
else:
# Default to false for now.
# TODO(joyeecheung): enable it once we fix the hashseed uniqueness
o['variables']['node_use_node_snapshot'] = 'false'
if target_arch == 'arm':
configure_arm(o)
......@@ -1249,7 +1261,8 @@ def glob_to_var(dir_base, dir_sub, patch_dir):
def configure_intl(o):
def icu_download(path):
with open('tools/icu/current_ver.dep') as f:
depFile = 'tools/icu/current_ver.dep';
with open(depFile) as f:
icus = json.load(f)
# download ICU, if needed
if not os.access(options.download_path, os.W_OK):
......@@ -1258,7 +1271,12 @@ def configure_intl(o):
attemptdownload = nodedownload.candownload(auto_downloads, "icu")
for icu in icus:
url = icu['url']
md5 = icu['md5']
(expectHash, hashAlgo, allAlgos) = nodedownload.findHash(icu)
if not expectHash:
error('''Could not find a hash to verify ICU download.
%s may be incorrect.
For the entry %s,
Expected one of these keys: %s''' % (depFile, url, ' '.join(allAlgos)))
local = url.split('/')[-1]
targetfile = os.path.join(options.download_path, local)
if not os.path.isfile(targetfile):
......@@ -1267,13 +1285,13 @@ def configure_intl(o):
else:
print('Re-using existing %s' % targetfile)
if os.path.isfile(targetfile):
print('Checking file integrity with MD5:\r')
gotmd5 = nodedownload.md5sum(targetfile)
print('MD5: %s %s' % (gotmd5, targetfile))
if (md5 == gotmd5):
print('Checking file integrity with %s:\r' % hashAlgo)
gotHash = nodedownload.checkHash(targetfile, hashAlgo)
print('%s: %s %s' % (hashAlgo, gotHash, targetfile))
if (expectHash == gotHash):
return targetfile
else:
warn('Expected: %s *MISMATCH*' % md5)
warn('Expected: %s *MISMATCH*' % expectHash)
warn('\n ** Corrupted ZIP? Delete %s to retry download.\n' % targetfile)
return None
icu_config = {
......
......@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>C++ Addons | Node.js v12.0.0 Documentation</title>
<title>C++ Addons | Node.js v12.1.0 Documentation</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic">
<link rel="stylesheet" href="assets/style.css">
<link rel="stylesheet" href="assets/sh.css">
......@@ -81,7 +81,7 @@
<div id="column1" data-id="addons" class="interior">
<header>
<h1>Node.js v12.0.0 Documentation</h1>
<h1>Node.js v12.1.0 Documentation</h1>
<div id="gtoc">
<ul>
<li>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
......@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Async Hooks | Node.js v12.0.0 Documentation</title>
<title>Async Hooks | Node.js v12.1.0 Documentation</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic">
<link rel="stylesheet" href="assets/style.css">
<link rel="stylesheet" href="assets/sh.css">
......@@ -81,7 +81,7 @@
<div id="column1" data-id="async_hooks" class="interior">
<header>
<h1>Node.js v12.0.0 Documentation</h1>
<h1>Node.js v12.1.0 Documentation</h1>
<div id="gtoc">
<ul>
<li>
......@@ -242,7 +242,7 @@ function destroy(asyncId) { }
// (either directly or through other means of resolving a promise).
function promiseResolve(asyncId) { }
</code></pre>
<h4>async_hooks.createHook(callbacks)<a class="srclink" href="https://github.com/nodejs/node/blob/2f45ad8060e13d5ac912335096d21526f2f9602b/lib/async_hooks.js#L124">[src]</a><span><a class="mark" href="#async_hooks_async_hooks_createhook_callbacks" id="async_hooks_async_hooks_createhook_callbacks">#</a></span></h4>
<h4>async_hooks.createHook(callbacks)<a class="srclink" href="https://github.com/nodejs/node/blob/bf12414bbf4295cb47c4c8b69bc2aa6828778453/lib/async_hooks.js#L124">[src]</a><span><a class="mark" href="#async_hooks_async_hooks_createhook_callbacks" id="async_hooks_async_hooks_createhook_callbacks">#</a></span></h4>
<div class="api_metadata">
<span>Added in: v8.1.0</span>
</div>
......@@ -647,7 +647,7 @@ see the details of the V8 <a href="https://docs.google.com/document/d/1rda3yKGHi
<p>Library developers that handle their own asynchronous resources performing tasks
like I/O, connection pooling, or managing callback queues may use the
<code>AsyncWrap</code> JavaScript API so that all the appropriate callbacks are called.</p>
<h3>Class: AsyncResource<a class="srclink" href="https://github.com/nodejs/node/blob/2f45ad8060e13d5ac912335096d21526f2f9602b/lib/async_hooks.js#L133">[src]</a><span><a class="mark" href="#async_hooks_class_asyncresource" id="async_hooks_class_asyncresource">#</a></span></h3>
<h3>Class: AsyncResource<a class="srclink" href="https://github.com/nodejs/node/blob/bf12414bbf4295cb47c4c8b69bc2aa6828778453/lib/async_hooks.js#L133">[src]</a><span><a class="mark" href="#async_hooks_class_asyncresource" id="async_hooks_class_asyncresource">#</a></span></h3>
<p>The class <code>AsyncResource</code> is designed to be extended by the embedder's async
resources. Using this, users can easily trigger the lifetime events of their
own resources.</p>
......@@ -679,7 +679,7 @@ asyncResource.asyncId();
// Return the trigger ID for the AsyncResource instance.
asyncResource.triggerAsyncId();
</code></pre>
<h4>new AsyncResource(type[, options])<a class="srclink" href="https://github.com/nodejs/node/blob/2f45ad8060e13d5ac912335096d21526f2f9602b/lib/async_hooks.js#L134">[src]</a><span><a class="mark" href="#async_hooks_new_asyncresource_type_options" id="async_hooks_new_asyncresource_type_options">#</a></span></h4>
<h4>new AsyncResource(type[, options])<a class="srclink" href="https://github.com/nodejs/node/blob/bf12414bbf4295cb47c4c8b69bc2aa6828778453/lib/async_hooks.js#L134">[src]</a><span><a class="mark" href="#async_hooks_new_asyncresource_type_options" id="async_hooks_new_asyncresource_type_options">#</a></span></h4>
<ul>
<li><code>type</code> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type" class="type">&#x3C;string></a> The type of async event.</li>
<li>
......@@ -714,7 +714,7 @@ retrieved and the sensitive API's <code>emitDestroy</code> is called with it.
}
}
</code></pre>
<h4>asyncResource.runInAsyncScope(fn[, thisArg, ...args])<a class="srclink" href="https://github.com/nodejs/node/blob/2f45ad8060e13d5ac912335096d21526f2f9602b/lib/async_hooks.js#L167">[src]</a><span><a class="mark" href="#async_hooks_asyncresource_runinasyncscope_fn_thisarg_args" id="async_hooks_asyncresource_runinasyncscope_fn_thisarg_args">#</a></span></h4>
<h4>asyncResource.runInAsyncScope(fn[, thisArg, ...args])<a class="srclink" href="https://github.com/nodejs/node/blob/bf12414bbf4295cb47c4c8b69bc2aa6828778453/lib/async_hooks.js#L167">[src]</a><span><a class="mark" href="#async_hooks_asyncresource_runinasyncscope_fn_thisarg_args" id="async_hooks_asyncresource_runinasyncscope_fn_thisarg_args">#</a></span></h4>
<div class="api_metadata">
<span>Added in: v9.6.0</span>
</div>
......@@ -728,7 +728,7 @@ resource.</li>
of the async resource. This will establish the context, trigger the AsyncHooks
before callbacks, call the function, trigger the AsyncHooks after callbacks, and
then restore the original execution context.</p>
<h4>asyncResource.emitDestroy()<a class="srclink" href="https://github.com/nodejs/node/blob/2f45ad8060e13d5ac912335096d21526f2f9602b/lib/async_hooks.js#L177">[src]</a><span><a class="mark" href="#async_hooks_asyncresource_emitdestroy" id="async_hooks_asyncresource_emitdestroy">#</a></span></h4>
<h4>asyncResource.emitDestroy()<a class="srclink" href="https://github.com/nodejs/node/blob/bf12414bbf4295cb47c4c8b69bc2aa6828778453/lib/async_hooks.js#L177">[src]</a><span><a class="mark" href="#async_hooks_asyncresource_emitdestroy" id="async_hooks_asyncresource_emitdestroy">#</a></span></h4>
<ul>
<li>Returns: <a href="async_hooks.html#async_hooks_class_asyncresource" class="type">&#x3C;AsyncResource></a> A reference to <code>asyncResource</code>.</li>
</ul>
......@@ -736,11 +736,11 @@ then restore the original execution context.</p>
be thrown if it is called more than once. This <strong>must</strong> be manually called. If
the resource is left to be collected by the GC then the <code>destroy</code> hooks will
never be called.</p>
<h4>asyncResource.asyncId()<a class="srclink" href="https://github.com/nodejs/node/blob/2f45ad8060e13d5ac912335096d21526f2f9602b/lib/async_hooks.js#L183">[src]</a><span><a class="mark" href="#async_hooks_asyncresource_asyncid" id="async_hooks_asyncresource_asyncid">#</a></span></h4>
<h4>asyncResource.asyncId()<a class="srclink" href="https://github.com/nodejs/node/blob/bf12414bbf4295cb47c4c8b69bc2aa6828778453/lib/async_hooks.js#L183">[src]</a><span><a class="mark" href="#async_hooks_asyncresource_asyncid" id="async_hooks_asyncresource_asyncid">#</a></span></h4>
<ul>
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type">&#x3C;number></a> The unique <code>asyncId</code> assigned to the resource.</li>
</ul>
<h4>asyncResource.triggerAsyncId()<a class="srclink" href="https://github.com/nodejs/node/blob/2f45ad8060e13d5ac912335096d21526f2f9602b/lib/async_hooks.js#L187">[src]</a><span><a class="mark" href="#async_hooks_asyncresource_triggerasyncid" id="async_hooks_asyncresource_triggerasyncid">#</a></span></h4>
<h4>asyncResource.triggerAsyncId()<a class="srclink" href="https://github.com/nodejs/node/blob/bf12414bbf4295cb47c4c8b69bc2aa6828778453/lib/async_hooks.js#L187">[src]</a><span><a class="mark" href="#async_hooks_asyncresource_triggerasyncid" id="async_hooks_asyncresource_triggerasyncid">#</a></span></h4>
<ul>
<li>Returns: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type" class="type">&#x3C;number></a> The same <code>triggerAsyncId</code> that is passed to the
<code>AsyncResource</code> constructor.</li>
......
This diff is collapsed.
......@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Child Process | Node.js v12.0.0 Documentation</title>
<title>Child Process | Node.js v12.1.0 Documentation</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic">
<link rel="stylesheet" href="assets/style.css">
<link rel="stylesheet" href="assets/sh.css">
......@@ -81,7 +81,7 @@
<div id="column1" data-id="child_process" class="interior">
<header>
<h1>Node.js v12.0.0 Documentation</h1>
<h1>Node.js v12.1.0 Documentation</h1>
<div id="gtoc">
<ul>
<li>
......@@ -294,7 +294,7 @@ exec('"my script.cmd" a b', (err, stdout, stderr) => {
// ...
});
</code></pre>
<h3>child_process.exec(command[, options][, callback])<a class="srclink" href="https://github.com/nodejs/node/blob/2f45ad8060e13d5ac912335096d21526f2f9602b/lib/child_process.js#L157">[src]</a><span><a class="mark" href="#child_process_child_process_exec_command_options_callback" id="child_process_child_process_exec_command_options_callback">#</a></span></h3>
<h3>child_process.exec(command[, options][, callback])<a class="srclink" href="https://github.com/nodejs/node/blob/bf12414bbf4295cb47c4c8b69bc2aa6828778453/lib/child_process.js#L157">[src]</a><span><a class="mark" href="#child_process_child_process_exec_command_options_callback" id="child_process_child_process_exec_command_options_callback">#</a></span></h3>
<div class="api_metadata">
<details class="changelog"><summary>History</summary>
<table>
......@@ -396,7 +396,7 @@ async function lsExample() {
}
lsExample();
</code></pre>
<h3>child_process.execFile(file[, args][, options][, callback])<a class="srclink" href="https://github.com/nodejs/node/blob/2f45ad8060e13d5ac912335096d21526f2f9602b/lib/child_process.js#L185">[src]</a><span><a class="mark" href="#child_process_child_process_execfile_file_args_options_callback" id="child_process_child_process_execfile_file_args_options_callback">#</a></span></h3>
<h3>child_process.execFile(file[, args][, options][, callback])<a class="srclink" href="https://github.com/nodejs/node/blob/bf12414bbf4295cb47c4c8b69bc2aa6828778453/lib/child_process.js#L185">[src]</a><span><a class="mark" href="#child_process_child_process_execfile_file_args_options_callback" id="child_process_child_process_execfile_file_args_options_callback">#</a></span></h3>
<div class="api_metadata">
<details class="changelog"><summary>History</summary>
<table>
......@@ -482,7 +482,7 @@ getVersion();
<p><strong>If the <code>shell</code> option is enabled, do not pass unsanitized user input to this
function. Any input containing shell metacharacters may be used to trigger
arbitrary command execution.</strong></p>
<h3>child_process.fork(modulePath[, args][, options])<a class="srclink" href="https://github.com/nodejs/node/blob/2f45ad8060e13d5ac912335096d21526f2f9602b/lib/child_process.js#L67">[src]</a><span><a class="mark" href="#child_process_child_process_fork_modulepath_args_options" id="child_process_child_process_fork_modulepath_args_options">#</a></span></h3>
<h3>child_process.fork(modulePath[, args][, options])<a class="srclink" href="https://github.com/nodejs/node/blob/bf12414bbf4295cb47c4c8b69bc2aa6828778453/lib/child_process.js#L67">[src]</a><span><a class="mark" href="#child_process_child_process_fork_modulepath_args_options" id="child_process_child_process_fork_modulepath_args_options">#</a></span></h3>
<div class="api_metadata">
<details class="changelog"><summary>History</summary>
<table>
......@@ -548,7 +548,7 @@ environment variable <code>NODE_CHANNEL_FD</code> on the child process.</p>
current process.</p>
<p>The <code>shell</code> option available in <a href="#child_process_child_process_spawn_command_args_options"><code>child_process.spawn()</code></a> is not supported by
<code>child_process.fork()</code> and will be ignored if set.</p>
<h3>child_process.spawn(command[, args][, options])<a class="srclink" href="https://github.com/nodejs/node/blob/2f45ad8060e13d5ac912335096d21526f2f9602b/lib/child_process.js#L542">[src]</a><span><a class="mark" href="#child_process_child_process_spawn_command_args_options" id="child_process_child_process_spawn_command_args_options">#</a></span></h3>
<h3>child_process.spawn(command[, args][, options])<a class="srclink" href="https://github.com/nodejs/node/blob/bf12414bbf4295cb47c4c8b69bc2aa6828778453/lib/child_process.js#L542">[src]</a><span><a class="mark" href="#child_process_child_process_spawn_command_args_options" id="child_process_child_process_spawn_command_args_options">#</a></span></h3>
<div class="api_metadata">
<details class="changelog"><summary>History</summary>
<table>
......@@ -835,7 +835,7 @@ process exits.</p>
<p>Blocking calls like these are mostly useful for simplifying general-purpose
scripting tasks and for simplifying the loading/processing of application
configuration at startup.</p>
<h3>child_process.execFileSync(file[, args][, options])<a class="srclink" href="https://github.com/nodejs/node/blob/2f45ad8060e13d5ac912335096d21526f2f9602b/lib/child_process.js#L640">[src]</a><span><a class="mark" href="#child_process_child_process_execfilesync_file_args_options" id="child_process_child_process_execfilesync_file_args_options">#</a></span></h3>
<h3>child_process.execFileSync(file[, args][, options])<a class="srclink" href="https://github.com/nodejs/node/blob/bf12414bbf4295cb47c4c8b69bc2aa6828778453/lib/child_process.js#L640">[src]</a><span><a class="mark" href="#child_process_child_process_execfilesync_file_args_options" id="child_process_child_process_execfilesync_file_args_options">#</a></span></h3>
<div class="api_metadata">
<details class="changelog"><summary>History</summary>
<table>
......@@ -902,7 +902,7 @@ exited.</p>
<p><strong>If the <code>shell</code> option is enabled, do not pass unsanitized user input to this
function. Any input containing shell metacharacters may be used to trigger
arbitrary command execution.</strong></p>
<h3>child_process.execSync(command[, options])<a class="srclink" href="https://github.com/nodejs/node/blob/2f45ad8060e13d5ac912335096d21526f2f9602b/lib/child_process.js#L659">[src]</a><span><a class="mark" href="#child_process_child_process_execsync_command_options" id="child_process_child_process_execsync_command_options">#</a></span></h3>
<h3>child_process.execSync(command[, options])<a class="srclink" href="https://github.com/nodejs/node/blob/bf12414bbf4295cb47c4c8b69bc2aa6828778453/lib/child_process.js#L659">[src]</a><span><a class="mark" href="#child_process_child_process_execsync_command_options" id="child_process_child_process_execsync_command_options">#</a></span></h3>
<div class="api_metadata">
<details class="changelog"><summary>History</summary>
<table>
......@@ -964,7 +964,7 @@ The <a href="errors.html#errors_class_error"><code>Error</code></a> object will
<a href="#child_process_child_process_spawnsync_command_args_options"><code>child_process.spawnSync()</code></a>.</p>
<p><strong>Never pass unsanitized user input to this function. Any input containing shell
metacharacters may be used to trigger arbitrary command execution.</strong></p>
<h3>child_process.spawnSync(command[, args][, options])<a class="srclink" href="https://github.com/nodejs/node/blob/2f45ad8060e13d5ac912335096d21526f2f9602b/lib/child_process.js#L565">[src]</a><span><a class="mark" href="#child_process_child_process_spawnsync_command_args_options" id="child_process_child_process_spawnsync_command_args_options">#</a></span></h3>
<h3>child_process.spawnSync(command[, args][, options])<a class="srclink" href="https://github.com/nodejs/node/blob/bf12414bbf4295cb47c4c8b69bc2aa6828778453/lib/child_process.js#L565">[src]</a><span><a class="mark" href="#child_process_child_process_spawnsync_command_args_options" id="child_process_child_process_spawnsync_command_args_options">#</a></span></h3>
<div class="api_metadata">
<details class="changelog"><summary>History</summary>
<table>
......
......@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Command Line Options | Node.js v12.0.0 Documentation</title>
<title>Command Line Options | Node.js v12.1.0 Documentation</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic">
<link rel="stylesheet" href="assets/style.css">
<link rel="stylesheet" href="assets/sh.css">
......@@ -81,7 +81,7 @@
<div id="column1" data-id="cli" class="interior">
<header>
<h1>Node.js v12.0.0 Documentation</h1>
<h1>Node.js v12.1.0 Documentation</h1>
<div id="gtoc">
<ul>
<li>
......
......@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Cluster | Node.js v12.0.0 Documentation</title>
<title>Cluster | Node.js v12.1.0 Documentation</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic">
<link rel="stylesheet" href="assets/style.css">
<link rel="stylesheet" href="assets/sh.css">
......@@ -81,7 +81,7 @@
<div id="column1" data-id="cluster" class="interior">
<header>
<h1>Node.js v12.0.0 Documentation</h1>
<h1>Node.js v12.1.0 Documentation</h1>
<div id="gtoc">
<ul>
<li>
......
......@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Console | Node.js v12.0.0 Documentation</title>
<title>Console | Node.js v12.1.0 Documentation</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic">
<link rel="stylesheet" href="assets/style.css">
<link rel="stylesheet" href="assets/sh.css">
......@@ -81,7 +81,7 @@
<div id="column1" data-id="console" class="interior">
<header>
<h1>Node.js v12.0.0 Documentation</h1>
<h1>Node.js v12.1.0 Documentation</h1>
<div id="gtoc">
<ul>
<li>
......
This diff is collapsed.
......@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Debugger | Node.js v12.0.0 Documentation</title>
<title>Debugger | Node.js v12.1.0 Documentation</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic">
<link rel="stylesheet" href="assets/style.css">
<link rel="stylesheet" href="assets/sh.css">
......@@ -81,7 +81,7 @@
<div id="column1" data-id="debugger" class="interior">
<header>
<h1>Node.js v12.0.0 Documentation</h1>
<h1>Node.js v12.1.0 Documentation</h1>
<div id="gtoc">
<ul>
<li>
......
This diff is collapsed.
This diff is collapsed.
......@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>DNS | Node.js v12.0.0 Documentation</title>
<title>DNS | Node.js v12.1.0 Documentation</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic">
<link rel="stylesheet" href="assets/style.css">
<link rel="stylesheet" href="assets/sh.css">
......@@ -81,7 +81,7 @@
<div id="column1" data-id="dns" class="interior">
<header>
<h1>Node.js v12.0.0 Documentation</h1>
<h1>Node.js v12.1.0 Documentation</h1>
<div id="gtoc">
<ul>
<li>
......@@ -290,7 +290,7 @@ section if a custom port is used.</p>
'[2001:4860:4860::8888]:1053'
]
</code></pre>
<h2>dns.lookup(hostname[, options], callback)<a class="srclink" href="https://github.com/nodejs/node/blob/2f45ad8060e13d5ac912335096d21526f2f9602b/lib/dns.js#L90">[src]</a><span><a class="mark" href="#dns_dns_lookup_hostname_options_callback" id="dns_dns_lookup_hostname_options_callback">#</a></span></h2>
<h2>dns.lookup(hostname[, options], callback)<a class="srclink" href="https://github.com/nodejs/node/blob/bf12414bbf4295cb47c4c8b69bc2aa6828778453/lib/dns.js#L90">[src]</a><span><a class="mark" href="#dns_dns_lookup_hostname_options_callback" id="dns_dns_lookup_hostname_options_callback">#</a></span></h2>
<div class="api_metadata">
<details class="changelog"><summary>History</summary>
<table>
......@@ -381,7 +381,7 @@ configured. Loopback addresses are not considered.</li>
found, then return IPv4 mapped IPv6 addresses. Note that it is not supported
on some operating systems (e.g FreeBSD 10.1).</li>
</ul>
<h2>dns.lookupService(address, port, callback)<a class="srclink" href="https://github.com/nodejs/node/blob/2f45ad8060e13d5ac912335096d21526f2f9602b/lib/dns.js#L168">[src]</a><span><a class="mark" href="#dns_dns_lookupservice_address_port_callback" id="dns_dns_lookupservice_address_port_callback">#</a></span></h2>
<h2>dns.lookupService(address, port, callback)<a class="srclink" href="https://github.com/nodejs/node/blob/bf12414bbf4295cb47c4c8b69bc2aa6828778453/lib/dns.js#L168">[src]</a><span><a class="mark" href="#dns_dns_lookupservice_address_port_callback" id="dns_dns_lookupservice_address_port_callback">#</a></span></h2>
<div class="api_metadata">
<span>Added in: v0.11.14</span>
</div>
......
......@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>About this Documentation | Node.js v12.0.0 Documentation</title>
<title>About this Documentation | Node.js v12.1.0 Documentation</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic">
<link rel="stylesheet" href="assets/style.css">
<link rel="stylesheet" href="assets/sh.css">
......@@ -81,7 +81,7 @@
<div id="column1" data-id="documentation" class="interior">
<header>
<h1>Node.js v12.0.0 Documentation</h1>
<h1>Node.js v12.1.0 Documentation</h1>
<div id="gtoc">
<ul>
<li>
......
......@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Domain | Node.js v12.0.0 Documentation</title>
<title>Domain | Node.js v12.1.0 Documentation</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic">
<link rel="stylesheet" href="assets/style.css">
<link rel="stylesheet" href="assets/sh.css">
......@@ -81,7 +81,7 @@
<div id="column1" data-id="domain" class="interior">
<header>
<h1>Node.js v12.0.0 Documentation</h1>
<h1>Node.js v12.1.0 Documentation</h1>
<div id="gtoc">
<ul>
<li>
......
......@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Errors | Node.js v12.0.0 Documentation</title>
<title>Errors | Node.js v12.1.0 Documentation</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic">
<link rel="stylesheet" href="assets/style.css">
<link rel="stylesheet" href="assets/sh.css">
......@@ -81,7 +81,7 @@
<div id="column1" data-id="errors" class="interior">
<header>
<h1>Node.js v12.0.0 Documentation</h1>
<h1>Node.js v12.1.0 Documentation</h1>
<div id="gtoc">
<ul>
<li>
......@@ -260,6 +260,7 @@
<li><a href="#errors_err_http2_trailers_already_sent">ERR_HTTP2_TRAILERS_ALREADY_SENT</a></li>
<li><a href="#errors_err_http2_trailers_not_ready">ERR_HTTP2_TRAILERS_NOT_READY</a></li>
<li><a href="#errors_err_http2_unsupported_protocol">ERR_HTTP2_UNSUPPORTED_PROTOCOL</a></li>
<li><a href="#errors_err_internal_assertion">ERR_INTERNAL_ASSERTION</a></li>
<li><a href="#errors_err_incompatible_option_pair">ERR_INCOMPATIBLE_OPTION_PAIR</a></li>
<li><a href="#errors_err_input_type_not_allowed">ERR_INPUT_TYPE_NOT_ALLOWED</a></li>
<li><a href="#errors_err_inspector_already_connected">ERR_INSPECTOR_ALREADY_CONNECTED</a></li>
......@@ -1321,6 +1322,10 @@ is set for the <code>Http2Stream</code>.</p>
<h3>ERR_HTTP2_UNSUPPORTED_PROTOCOL<span><a class="mark" href="#errors_err_http2_unsupported_protocol" id="errors_err_http2_unsupported_protocol">#</a></span><span><a class="mark" href="#ERR_HTTP2_UNSUPPORTED_PROTOCOL" id="ERR_HTTP2_UNSUPPORTED_PROTOCOL">#</a></span></h3>
<p><code>http2.connect()</code> was passed a URL that uses any protocol other than <code>http:</code> or
<code>https:</code>.</p>
<p><a id="ERR_INTERNAL_ASSERTION"></a></p>
<h3>ERR_INTERNAL_ASSERTION<span><a class="mark" href="#errors_err_internal_assertion" id="errors_err_internal_assertion">#</a></span><span><a class="mark" href="#ERR_INTERNAL_ASSERTION" id="ERR_INTERNAL_ASSERTION">#</a></span></h3>
<p>There was a bug in Node.js or incorrect usage of Node.js internals.
To fix the error, open an issue at <a href="https://github.com/nodejs/node/issues">https://github.com/nodejs/node/issues</a>.</p>
<p><a id="ERR_INCOMPATIBLE_OPTION_PAIR"></a></p>
<h3>ERR_INCOMPATIBLE_OPTION_PAIR<span><a class="mark" href="#errors_err_incompatible_option_pair" id="errors_err_incompatible_option_pair">#</a></span><span><a class="mark" href="#ERR_INCOMPATIBLE_OPTION_PAIR" id="ERR_INCOMPATIBLE_OPTION_PAIR">#</a></span></h3>
<p>An option pair is incompatible with each other and can not be used at the same
......
......@@ -876,10 +876,17 @@
{
"textRaw": "ERR_HTTP2_UNSUPPORTED_PROTOCOL",
"name": "err_http2_unsupported_protocol",
"desc": "<p><code>http2.connect()</code> was passed a URL that uses any protocol other than <code>http:</code> or\n<code>https:</code>.</p>\n<p><a id=\"ERR_INCOMPATIBLE_OPTION_PAIR\"></a></p>",
"desc": "<p><code>http2.connect()</code> was passed a URL that uses any protocol other than <code>http:</code> or\n<code>https:</code>.</p>\n<p><a id=\"ERR_INTERNAL_ASSERTION\"></a></p>",
"type": "module",
"displayName": "ERR_HTTP2_UNSUPPORTED_PROTOCOL"
},
{
"textRaw": "ERR_INTERNAL_ASSERTION",
"name": "err_internal_assertion",
"desc": "<p>There was a bug in Node.js or incorrect usage of Node.js internals.\nTo fix the error, open an issue at <a href=\"https://github.com/nodejs/node/issues\">https://github.com/nodejs/node/issues</a>.</p>\n<p><a id=\"ERR_INCOMPATIBLE_OPTION_PAIR\"></a></p>",
"type": "module",
"displayName": "ERR_INTERNAL_ASSERTION"
},
{
"textRaw": "ERR_INCOMPATIBLE_OPTION_PAIR",
"name": "err_incompatible_option_pair",
......
......@@ -1148,6 +1148,12 @@ is set for the `Http2Stream`.
`http2.connect()` was passed a URL that uses any protocol other than `http:` or
`https:`.
<a id="ERR_INTERNAL_ASSERTION"></a>
### ERR_INTERNAL_ASSERTION
There was a bug in Node.js or incorrect usage of Node.js internals.
To fix the error, open an issue at https://github.com/nodejs/node/issues.
<a id="ERR_INCOMPATIBLE_OPTION_PAIR"></a>
### ERR_INCOMPATIBLE_OPTION_PAIR
......
......@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>ECMAScript Modules | Node.js v12.0.0 Documentation</title>
<title>ECMAScript Modules | Node.js v12.1.0 Documentation</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic">
<link rel="stylesheet" href="assets/style.css">
<link rel="stylesheet" href="assets/sh.css">
......@@ -81,7 +81,7 @@
<div id="column1" data-id="esm" class="interior">
<header>
<h1>Node.js v12.0.0 Documentation</h1>
<h1>Node.js v12.1.0 Documentation</h1>
<div id="gtoc">
<ul>
<li>
......
......@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Events | Node.js v12.0.0 Documentation</title>
<title>Events | Node.js v12.1.0 Documentation</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700,400italic">
<link rel="stylesheet" href="assets/style.css">
<link rel="stylesheet" href="assets/sh.css">
......@@ -81,7 +81,7 @@
<div id="column1" data-id="events" class="interior">
<header>
<h1>Node.js v12.0.0 Documentation</h1>
<h1>Node.js v12.1.0 Documentation</h1>
<div id="gtoc">
<ul>
<li>
......@@ -712,7 +712,7 @@ const newListeners = emitter.rawListeners('log');
newListeners[0]();
emitter.emit('log');
</code></pre>
<h2>events.once(emitter, name)<a class="srclink" href="https://github.com/nodejs/node/blob/2f45ad8060e13d5ac912335096d21526f2f9602b/lib/events.js#L483">[src]</a><span><a class="mark" href="#events_events_once_emitter_name" id="events_events_once_emitter_name">#</a></span></h2>
<h2>events.once(emitter, name)<a class="srclink" href="https://github.com/nodejs/node/blob/bf12414bbf4295cb47c4c8b69bc2aa6828778453/lib/events.js#L483">[src]</a><span><a class="mark" href="#events_events_once_emitter_name" id="events_events_once_emitter_name">#</a></span></h2>
<div class="api_metadata">
<span>Added in: v11.13.0</span>
</div>
......
This diff is collapsed.
......@@ -6685,14 +6685,14 @@
]
}
],
"desc": "<p>Asynchronously writes data to a file, replacing the file if it already exists.\n<code>data</code> can be a string or a buffer.</p>\n<p>The <code>encoding</code> option is ignored if <code>data</code> is a buffer.</p>\n<pre><code class=\"language-js\">const data = new Uint8Array(Buffer.from('Hello Node.js'));\nfs.writeFile('message.txt', data, (err) => {\n if (err) throw err;\n console.log('The file has been saved!');\n});\n</code></pre>\n<p>If <code>options</code> is a string, then it specifies the encoding:</p>\n<pre><code class=\"language-js\">fs.writeFile('message.txt', 'Hello Node.js', 'utf8', callback);\n</code></pre>\n<p>It is unsafe to use <code>fs.writeFile()</code> multiple times on the same file without\nwaiting for the callback. For this scenario, <a href=\"#fs_fs_createwritestream_path_options\"><code>fs.createWriteStream()</code></a> is\nrecommended.</p>",
"desc": "<p>When <code>file</code> is a filename, asynchronously writes data to the file, replacing the\nfile if it already exists. <code>data</code> can be a string or a buffer.</p>\n<p>When <code>file</code> is a file descriptor, the behavior is similar to calling\n<code>fs.write()</code> directly (which is recommended). See the notes below on using\na file descriptor.</p>\n<p>The <code>encoding</code> option is ignored if <code>data</code> is a buffer.</p>\n<pre><code class=\"language-js\">const data = new Uint8Array(Buffer.from('Hello Node.js'));\nfs.writeFile('message.txt', data, (err) => {\n if (err) throw err;\n console.log('The file has been saved!');\n});\n</code></pre>\n<p>If <code>options</code> is a string, then it specifies the encoding:</p>\n<pre><code class=\"language-js\">fs.writeFile('message.txt', 'Hello Node.js', 'utf8', callback);\n</code></pre>\n<p>It is unsafe to use <code>fs.writeFile()</code> multiple times on the same file without\nwaiting for the callback. For this scenario, <a href=\"#fs_fs_createwritestream_path_options\"><code>fs.createWriteStream()</code></a> is\nrecommended.</p>",
"modules": [
{
"textRaw": "File Descriptors",
"name": "file_descriptors",
"desc": "<ol>\n<li>Any specified file descriptor has to support writing.</li>\n<li>If a file descriptor is specified as the <code>file</code>, it will not be closed\nautomatically.</li>\n<li>The writing will begin at the current position. For example, if the string\n<code>'Hello'</code> is written to the file descriptor, and if <code>', World'</code> is written with\n<code>fs.writeFile()</code> to the same file descriptor, the contents of the file would\nbecome <code>'Hello, World'</code>, instead of just <code>', World'</code>.</li>\n</ol>",
"textRaw": "Using `fs.writeFile()` with File Descriptors",
"name": "using_`fs.writefile()`_with_file_descriptors",
"desc": "<p>When <code>file</code> is a file descriptor, the behavior is almost identical to directly\ncalling <code>fs.write()</code> like:</p>\n<pre><code class=\"language-javascript\">fs.write(fd, Buffer.from(data, options.encoding), callback);\n</code></pre>\n<p>The difference from directly calling <code>fs.write()</code> is that under some unusual\nconditions, <code>fs.write()</code> may write only part of the buffer and will need to be\nretried to write the remaining data, whereas <code>fs.writeFile()</code> will retry until\nthe data is entirely written (or an error occurs).</p>\n<p>Since the implications of this are a common source of confusion, note that in\nthe file descriptor case the file is not replaced! The data is not necessarily\nwritten to the beginning of the file, and the file's original data may remain\nbefore and/or after the newly written data.</p>\n<p>For example, if <code>fs.writeFile()</code> is called twice in a row, first to write the\nstring <code>'Hello'</code>, then to write the string <code>', World'</code>, the file would contain\n<code>'Hello, World'</code>, and might contain some of the file's original data (depending\non the size of the original file, and the position of the file descriptor). If\na file name had been used instead of a descriptor, the file would be guaranteed\nto contain only <code>', World'</code>.</p>",
"type": "module",