Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
meta: merge node/master into node-chakracore/master
Browse files Browse the repository at this point in the history
Merge b20af80 as of 2018-03-05
This commit was automatically generated. For any problems, please contact jackhorton

Reviewed-By: Jack Horton <jahorto@microsoft.com>
  • Loading branch information
chakrabot authored and jackhorton committed Mar 8, 2018
2 parents 591e957 + b20af80 commit 11954ba
Show file tree
Hide file tree
Showing 52 changed files with 1,387 additions and 202 deletions.
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,13 @@ coverage-build: all
$(NODE) ./deps/npm install istanbul-merge --no-save --no-package-lock; fi
if [ ! -d node_modules/nyc ]; then \
$(NODE) ./deps/npm install nyc --no-save --no-package-lock; fi
if [ ! -d gcovr ]; then git clone --depth=1 \
if [ ! -d gcovr ]; then git clone -b 3.4 --depth=1 \
--single-branch git://github.com/gcovr/gcovr.git; fi
if [ ! -d build ]; then git clone --depth=1 \
--single-branch https://github.com/nodejs/build.git; fi
if [ ! -f gcovr/gcovr/gcov.py.orig ]; then \
(cd gcovr && patch -b -N -p1 < \
"$(CURDIR)/build/jenkins/scripts/coverage/gcovr-patches.diff"); fi
if [ ! -f gcovr/scripts/gcovr.orig ]; then \
(cd gcovr && patch -N -p1 < \
"$(CURDIR)/build/jenkins/scripts/coverage/gcovr-patches-3.4.diff"); fi
if [ -d lib_ ]; then $(RM) -r lib; mv lib_ lib; fi
mv lib lib_
$(NODE) ./node_modules/.bin/nyc instrument --extension .js --extension .mjs lib_/ lib/
Expand All @@ -203,7 +203,7 @@ coverage-test: coverage-build
(cd lib && .$(NODE) ../node_modules/.bin/nyc report \
--temp-directory "$(CURDIR)/.cov_tmp" \
--report-dir "../coverage")
-(cd out && PYTHONPATH=$(CURDIR)/gcovr $(PYTHON) -m gcovr --gcov-exclude='.*deps' \
-(cd out && "../gcovr/scripts/gcovr" --gcov-exclude='.*deps' \
--gcov-exclude='.*usr' -v -r Release/obj.target \
--html --html-detail -o ../coverage/cxxcoverage.html \
--gcov-executable="$(GCOV)")
Expand Down
7 changes: 7 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,11 @@ intl_optgroup.add_option('--download-path',

parser.add_option_group(intl_optgroup)

parser.add_option('--debug-lib',
action='store_true',
dest='node_debug_lib',
help='build lib with DCHECK macros')

http2_optgroup.add_option('--debug-http2',
action='store_true',
dest='debug_http2',
Expand Down Expand Up @@ -965,6 +970,8 @@ def configure_node(o):
if options.enable_static:
o['variables']['node_target_type'] = 'static_library'

o['variables']['node_debug_lib'] = b(options.node_debug_lib)

if options.debug_http2:
o['variables']['debug_http2'] = 1
else:
Expand Down
4 changes: 2 additions & 2 deletions doc/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,8 @@ added: v8.0.0

A space-separated list of command line options. `options...` are interpreted as
if they had been specified on the command line before the actual command line
(so they can be overridden). Node will exit with an error if an option that is
not allowed in the environment is used, such as `-p` or a script file.
(so they can be overridden). Node.js will exit with an error if an option
that is not allowed in the environment is used, such as `-p` or a script file.

Node options that are allowed are:
- `--enable-fips`
Expand Down
11 changes: 10 additions & 1 deletion doc/api/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ a V8-inspector based CLI debugger available through `node inspect`.

Type: End-of-Life

DebugContext has been removed in V8 and is not available in Node 10+.
DebugContext has been removed in V8 and is not available in Node.js 10+.

DebugContext was an experimental API.

Expand Down Expand Up @@ -932,6 +932,14 @@ Using the `noAssert` argument has no functionality anymore. All input is going
to be verified, no matter if it is set to true or not. Skipping the verification
could lead to hard to find errors and crashes.
<a id="DEP0XXX"></a>
### DEP0XXX: process.binding('util').is[...] typechecks
Type: Documentation-only (supports [`--pending-deprecation`][])
Using `process.binding()` in general should be avoided. The type checking
methods in particular can be replaced by using [`util.types`][].
[`--pending-deprecation`]: cli.html#cli_pending_deprecation
[`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_class_method_buffer_allocunsafeslow_size
[`Buffer.from(array)`]: buffer.html#buffer_class_method_buffer_from_array
Expand Down Expand Up @@ -1000,6 +1008,7 @@ could lead to hard to find errors and crashes.
[`util.log()`]: util.html#util_util_log_string
[`util.print()`]: util.html#util_util_print_strings
[`util.puts()`]: util.html#util_util_puts_strings
[`util.types`]: util.html#util_util_types
[`util`]: util.html
[`worker.exitedAfterDisconnect`]: cluster.html#cluster_worker_exitedafterdisconnect
[alloc]: buffer.html#buffer_class_method_buffer_alloc_size_fill_encoding
Expand Down
3 changes: 2 additions & 1 deletion doc/api/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ wish to do programmatic things with the documentation.
## Syscalls and man pages

System calls like open(2) and read(2) define the interface between user programs
and the underlying operating system. Node functions which simply wrap a syscall,
and the underlying operating system. Node.js functions
which simply wrap a syscall,
like [`fs.open()`][], will document that. The docs link to the corresponding man
pages (short for manual pages) which describe how the syscalls work.

Expand Down
2 changes: 1 addition & 1 deletion doc/api/domain.md
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ than crashing the program.

## Domains and Promises

As of Node 8.0.0, the handlers of Promises are run inside the domain in
As of Node.js 8.0.0, the handlers of Promises are run inside the domain in
which the call to `.then` or `.catch` itself was made:

```js
Expand Down
4 changes: 2 additions & 2 deletions doc/api/esm.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ fs.readFile('./foo.txt', (err, body) => {
<!-- type=misc -->

To customize the default module resolution, loader hooks can optionally be
provided via a `--loader ./loader-name.mjs` argument to Node.
provided via a `--loader ./loader-name.mjs` argument to Node.js.

When hooks are used they only apply to ES module loading and not to any
CommonJS modules loaded.
Expand Down Expand Up @@ -150,7 +150,7 @@ module. This can be one of the following:
| `"dynamic"` | Use a [dynamic instantiate hook][] |

For example, a dummy loader to load JavaScript restricted to browser resolution
rules with only JS file extension and Node builtin modules support could
rules with only JS file extension and Node.js builtin modules support could
be written:

```js
Expand Down
5 changes: 3 additions & 2 deletions doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ The times in the stat object have the following semantics:
set to an earlier value than the current `birthtime` using the
utimes(2) system call.

Prior to Node v0.12, the `ctime` held the `birthtime` on Windows
Prior to Node.js v0.12, the `ctime` held the `birthtime` on Windows
systems. Note that as of v0.12, `ctime` is not "creation time", and
on Unix systems, it never was.

Expand Down Expand Up @@ -657,7 +657,8 @@ changes:
pr-url: https://github.com/nodejs/node/pull/6534
description: The constants like `fs.R_OK`, etc which were present directly
on `fs` were moved into `fs.constants` as a soft deprecation.
Thus for Node `< v6.3.0` use `fs` to access those constants, or
Thus for Node.js `< v6.3.0` use `fs`
to access those constants, or
do something like `(fs.constants || fs).R_OK` to work with all
versions.
-->
Expand Down
2 changes: 1 addition & 1 deletion doc/api/n-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3489,7 +3489,7 @@ napi_status napi_get_node_version(napi_env env,
```

- `[in] env`: The environment that the API is invoked under.
- `[out] version`: A pointer to version information for Node itself.
- `[out] version`: A pointer to version information for Node.js itself.

Returns `napi_ok` if the API succeeded.

Expand Down
17 changes: 17 additions & 0 deletions doc/api/repl.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,12 @@ global or scoped variable, the input `fs` will be evaluated on-demand as
```

#### Assignment of the `_` (underscore) variable
<!-- YAML
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/18919
description: Added `_error` support.
-->

The default evaluator will, by default, assign the result of the most recently
evaluated expression to the special variable `_` (underscore).
Expand All @@ -162,6 +168,17 @@ Expression assignment to _ now disabled.
4
```

Similarly, `_error` will refer to the last seen error, if there was any.
Explicitly setting `_error` to a value will disable this behavior.

<!-- eslint-skip -->
```js
> throw new Error('foo');
Error: foo
> _error.message
'foo'
```

### Custom Evaluation Functions

When a new `repl.REPLServer` is created, a custom evaluation function may be
Expand Down
9 changes: 5 additions & 4 deletions doc/api/tracing.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!--introduced_in=v7.7.0-->

Trace Event provides a mechanism to centralize tracing information generated by
V8, Node core, and userspace code.
V8, Node.js core, and userspace code.

Tracing can be enabled by passing the `--trace-events-enabled` flag when
starting a Node.js application.
Expand Down Expand Up @@ -42,8 +42,9 @@ string that supports `${rotation}` and `${pid}`. For example:
node --trace-events-enabled --trace-event-file-pattern '${pid}-${rotation}.log' server.js
```

Starting with Node 10.0.0, the tracing system uses the same time source as the
one used by `process.hrtime()` however the trace-event timestamps are expressed
in microseconds, unlike `process.hrtime()` which returns nanoseconds.
Starting with Node.js 10.0.0, the tracing system uses the same time source
as the one used by `process.hrtime()`
however the trace-event timestamps are expressed in microseconds,
unlike `process.hrtime()` which returns nanoseconds.

[Performance API]: perf_hooks.html
Loading

0 comments on commit 11954ba

Please sign in to comment.