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

Commit 11954ba

Browse files
chakrabotjackhorton
authored andcommitted
meta: merge node/master into node-chakracore/master
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>
2 parents 591e957 + b20af80 commit 11954ba

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1387
-202
lines changed

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -172,13 +172,13 @@ coverage-build: all
172172
$(NODE) ./deps/npm install istanbul-merge --no-save --no-package-lock; fi
173173
if [ ! -d node_modules/nyc ]; then \
174174
$(NODE) ./deps/npm install nyc --no-save --no-package-lock; fi
175-
if [ ! -d gcovr ]; then git clone --depth=1 \
175+
if [ ! -d gcovr ]; then git clone -b 3.4 --depth=1 \
176176
--single-branch git://github.com/gcovr/gcovr.git; fi
177177
if [ ! -d build ]; then git clone --depth=1 \
178178
--single-branch https://github.com/nodejs/build.git; fi
179-
if [ ! -f gcovr/gcovr/gcov.py.orig ]; then \
180-
(cd gcovr && patch -b -N -p1 < \
181-
"$(CURDIR)/build/jenkins/scripts/coverage/gcovr-patches.diff"); fi
179+
if [ ! -f gcovr/scripts/gcovr.orig ]; then \
180+
(cd gcovr && patch -N -p1 < \
181+
"$(CURDIR)/build/jenkins/scripts/coverage/gcovr-patches-3.4.diff"); fi
182182
if [ -d lib_ ]; then $(RM) -r lib; mv lib_ lib; fi
183183
mv lib lib_
184184
$(NODE) ./node_modules/.bin/nyc instrument --extension .js --extension .mjs lib_/ lib/
@@ -203,7 +203,7 @@ coverage-test: coverage-build
203203
(cd lib && .$(NODE) ../node_modules/.bin/nyc report \
204204
--temp-directory "$(CURDIR)/.cov_tmp" \
205205
--report-dir "../coverage")
206-
-(cd out && PYTHONPATH=$(CURDIR)/gcovr $(PYTHON) -m gcovr --gcov-exclude='.*deps' \
206+
-(cd out && "../gcovr/scripts/gcovr" --gcov-exclude='.*deps' \
207207
--gcov-exclude='.*usr' -v -r Release/obj.target \
208208
--html --html-detail -o ../coverage/cxxcoverage.html \
209209
--gcov-executable="$(GCOV)")

configure

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,11 @@ intl_optgroup.add_option('--download-path',
434434

435435
parser.add_option_group(intl_optgroup)
436436

437+
parser.add_option('--debug-lib',
438+
action='store_true',
439+
dest='node_debug_lib',
440+
help='build lib with DCHECK macros')
441+
437442
http2_optgroup.add_option('--debug-http2',
438443
action='store_true',
439444
dest='debug_http2',
@@ -965,6 +970,8 @@ def configure_node(o):
965970
if options.enable_static:
966971
o['variables']['node_target_type'] = 'static_library'
967972

973+
o['variables']['node_debug_lib'] = b(options.node_debug_lib)
974+
968975
if options.debug_http2:
969976
o['variables']['debug_http2'] = 1
970977
else:

doc/api/cli.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,8 +452,8 @@ added: v8.0.0
452452

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

458458
Node options that are allowed are:
459459
- `--enable-fips`

doc/api/deprecations.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ a V8-inspector based CLI debugger available through `node inspect`.
610610

611611
Type: End-of-Life
612612

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

615615
DebugContext was an experimental API.
616616

@@ -932,6 +932,14 @@ Using the `noAssert` argument has no functionality anymore. All input is going
932932
to be verified, no matter if it is set to true or not. Skipping the verification
933933
could lead to hard to find errors and crashes.
934934
935+
<a id="DEP0XXX"></a>
936+
### DEP0XXX: process.binding('util').is[...] typechecks
937+
938+
Type: Documentation-only (supports [`--pending-deprecation`][])
939+
940+
Using `process.binding()` in general should be avoided. The type checking
941+
methods in particular can be replaced by using [`util.types`][].
942+
935943
[`--pending-deprecation`]: cli.html#cli_pending_deprecation
936944
[`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_class_method_buffer_allocunsafeslow_size
937945
[`Buffer.from(array)`]: buffer.html#buffer_class_method_buffer_from_array
@@ -1000,6 +1008,7 @@ could lead to hard to find errors and crashes.
10001008
[`util.log()`]: util.html#util_util_log_string
10011009
[`util.print()`]: util.html#util_util_print_strings
10021010
[`util.puts()`]: util.html#util_util_puts_strings
1011+
[`util.types`]: util.html#util_util_types
10031012
[`util`]: util.html
10041013
[`worker.exitedAfterDisconnect`]: cluster.html#cluster_worker_exitedafterdisconnect
10051014
[alloc]: buffer.html#buffer_class_method_buffer_alloc_size_fill_encoding

doc/api/documentation.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ wish to do programmatic things with the documentation.
8080
## Syscalls and man pages
8181

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

doc/api/domain.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ than crashing the program.
443443

444444
## Domains and Promises
445445

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

449449
```js

doc/api/esm.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ fs.readFile('./foo.txt', (err, body) => {
106106
<!-- type=misc -->
107107

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

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

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

156156
```js

doc/api/fs.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ The times in the stat object have the following semantics:
600600
set to an earlier value than the current `birthtime` using the
601601
utimes(2) system call.
602602

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

@@ -657,7 +657,8 @@ changes:
657657
pr-url: https://github.com/nodejs/node/pull/6534
658658
description: The constants like `fs.R_OK`, etc which were present directly
659659
on `fs` were moved into `fs.constants` as a soft deprecation.
660-
Thus for Node `< v6.3.0` use `fs` to access those constants, or
660+
Thus for Node.js `< v6.3.0` use `fs`
661+
to access those constants, or
661662
do something like `(fs.constants || fs).R_OK` to work with all
662663
versions.
663664
-->

doc/api/n-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3489,7 +3489,7 @@ napi_status napi_get_node_version(napi_env env,
34893489
```
34903490

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

34943494
Returns `napi_ok` if the API succeeded.
34953495

doc/api/repl.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,12 @@ global or scoped variable, the input `fs` will be evaluated on-demand as
142142
```
143143

144144
#### Assignment of the `_` (underscore) variable
145+
<!-- YAML
146+
changes:
147+
- version: REPLACEME
148+
pr-url: https://github.com/nodejs/node/pull/18919
149+
description: Added `_error` support.
150+
-->
145151

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

171+
Similarly, `_error` will refer to the last seen error, if there was any.
172+
Explicitly setting `_error` to a value will disable this behavior.
173+
174+
<!-- eslint-skip -->
175+
```js
176+
> throw new Error('foo');
177+
Error: foo
178+
> _error.message
179+
'foo'
180+
```
181+
165182
### Custom Evaluation Functions
166183

167184
When a new `repl.REPLServer` is created, a custom evaluation function may be

0 commit comments

Comments
 (0)