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

Commit b6b3ed8

Browse files
committed
meta: merge node/master into node-chakracore/master
Merge d597317 as of 2017-11-08 This commit was automatically generated. For any problems, please contact jackhorton Reviewed-By: Jack Horton <jahorto@microsoft.com>
2 parents 188e4c2 + d597317 commit b6b3ed8

30 files changed

+398
-169
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ release.
3333
<a href="doc/changelogs/CHANGELOG_V9.md#9.0.0">9.0.0</a><br/>
3434
</td>
3535
<td valign="top">
36-
<b><a href="doc/changelogs/CHANGELOG_V8.md#8.9.0">8.9.0</a></b><br/>
36+
<b><a href="doc/changelogs/CHANGELOG_V8.md#8.9.1">8.9.1</a></b><br/>
37+
<a href="doc/changelogs/CHANGELOG_V8.md#8.9.0">8.9.0</a><br/>
3738
<a href="doc/changelogs/CHANGELOG_V8.md#8.8.1">8.8.1</a><br/>
3839
<a href="doc/changelogs/CHANGELOG_V8.md#8.8.0">8.8.0</a><br/>
3940
<a href="doc/changelogs/CHANGELOG_V8.md#8.7.0">8.7.0</a><br/>

Makefile

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -974,6 +974,7 @@ bench-ci: bench
974974
lint-md-clean:
975975
$(RM) -r tools/remark-cli/node_modules
976976
$(RM) -r tools/remark-preset-lint-node/node_modules
977+
$(RM) tools/.*mdlintstamp
977978

978979
lint-md-build:
979980
@if [ ! -d tools/remark-cli/node_modules ]; then \
@@ -983,10 +984,25 @@ lint-md-build:
983984
echo "Markdown linter: installing remark-preset-lint-node into tools/"; \
984985
cd tools/remark-preset-lint-node && ../../$(NODE) ../../$(NPM) install; fi
985986

986-
lint-md: lint-md-build
987-
@echo "Running Markdown linter..."
988-
$(NODE) tools/remark-cli/cli.js -q -f \
989-
./*.md doc src lib benchmark tools/doc/ tools/icu/
987+
LINT_MD_TARGETS = src lib benchmark tools/doc tools/icu
988+
LINT_MD_ROOT_DOCS := $(wildcard *.md)
989+
LINT_MD_FILES := $(shell find $(LINT_MD_TARGETS) -type f \
990+
-not -path '*node_modules*' -name '*.md') $(LINT_MD_ROOT_DOCS)
991+
LINT_DOC_MD_FILES = $(shell ls doc/**/*.md)
992+
993+
tools/.docmdlintstamp: $(LINT_DOC_MD_FILES)
994+
@echo "Running Markdown linter on docs..."
995+
@$(NODE) tools/remark-cli/cli.js -q -f $(LINT_DOC_MD_FILES)
996+
@touch $@
997+
998+
tools/.miscmdlintstamp: $(LINT_MD_FILES)
999+
@echo "Running Markdown linter on misc docs..."
1000+
@$(NODE) tools/remark-cli/cli.js -q -f $(LINT_MD_FILES)
1001+
@touch $@
1002+
1003+
tools/.mdlintstamp: tools/.miscmdlintstamp tools/.docmdlintstamp
1004+
1005+
lint-md: | lint-md-build tools/.mdlintstamp
9901006

9911007
LINT_JS_TARGETS = benchmark doc lib test tools
9921008
LINT_JS_CMD = tools/eslint/bin/eslint.js --cache \
@@ -1048,10 +1064,13 @@ LINT_CPP_FILES = $(filter-out $(LINT_CPP_EXCLUDE), $(wildcard \
10481064
# and the actual filename is generated so it won't match header guards
10491065
ADDON_DOC_LINT_FLAGS=-whitespace/ending_newline,-build/header_guard
10501066

1051-
lint-cpp:
1067+
lint-cpp: tools/.cpplintstamp
1068+
1069+
tools/.cpplintstamp: $(LINT_CPP_FILES)
10521070
@echo "Running C++ linter..."
1053-
@$(PYTHON) tools/cpplint.py $(LINT_CPP_FILES)
1071+
@$(PYTHON) tools/cpplint.py $?
10541072
@$(PYTHON) tools/check-imports.py
1073+
@touch $@
10551074

10561075
lint-addon-docs: test/addons/.docbuildstamp
10571076
@echo "Running C++ linter on addon docs..."
@@ -1087,6 +1106,10 @@ lint:
10871106
lint-ci: lint
10881107
endif
10891108

1109+
lint-clean:
1110+
$(RM) tools/.*lintstamp
1111+
$(RM) .eslintcache
1112+
10901113
.PHONY: $(TARBALL)-headers \
10911114
all \
10921115
bench \
@@ -1127,6 +1150,7 @@ endif
11271150
install-bin \
11281151
install-includes \
11291152
lint \
1153+
lint-clean \
11301154
lint-ci \
11311155
lint-cpp \
11321156
lint-js \

doc/api/assert.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ assert.fail(1, 2, new TypeError('need array'));
337337
// TypeError: need array
338338
```
339339

340-
*Note*: Is the last two cases `actual`, `expected`, and `operator` have no
340+
*Note*: In the last two cases `actual`, `expected`, and `operator` have no
341341
influence on the error message.
342342

343343
```js

doc/api/child_process.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,10 +1044,11 @@ added: v0.5.10
10441044
-->
10451045

10461046
* {boolean} Set to `true` after `subprocess.kill()` is used to successfully
1047-
terminate the child process.
1047+
send a signal to the child process.
10481048

1049-
The `subprocess.killed` property indicates whether the child process was
1050-
successfully terminated using `subprocess.kill()`.
1049+
The `subprocess.killed` property indicates whether the child process
1050+
successfully received a signal from `subprocess.kill()`. The `killed` property
1051+
does not indicate that the child process has been terminated.
10511052

10521053
### subprocess.pid
10531054
<!-- YAML

doc/api/n-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ must be called in order to determine if an exception is pending or not.
293293

294294
When an exception is pending one of two approaches can be employed.
295295

296-
The first appoach is to do any appropriate cleanup and then return so that
296+
The first approach is to do any appropriate cleanup and then return so that
297297
execution will return to JavaScript. As part of the transition back to
298298
JavaScript the exception will be thrown at the point in the JavaScript
299299
code where the native method was invoked. The behavior of most N-API calls

doc/changelogs/CHANGELOG_V8.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
</tr>
88
<tr>
99
<td valign="top">
10+
<a href="#8.9.1">8.9.1</a><br/>
1011
<a href="#8.9.0">8.9.0</a><br/>
1112
</td>
1213
<td valign="top">
@@ -44,6 +45,32 @@
4445
[Node.js Long Term Support Plan](https://github.com/nodejs/LTS) and
4546
will be supported actively until April 2019 and maintained until December 2019.
4647

48+
<a id="8.9.1"></a>
49+
## 2017-11-07, Version 8.9.1 'Carbon' (LTS), @gibfahn
50+
51+
### Notable Changes
52+
53+
- **openssl**:
54+
- upgrade openssl sources to 1.0.2m (Shigeki Ohtsu) [#16691](https://github.com/nodejs/node/pull/16691)
55+
- ***Revert*** "**https**:
56+
- refactor to use http internals" (Myles Borins) [#16660](https://github.com/nodejs/node/pull/16660)
57+
58+
### Commits
59+
60+
* [[`6a7e5ceaa9`](https://github.com/nodejs/node/commit/6a7e5ceaa9)] - **deps**: V8: cherry-pick 32141e9 from upstream (Ali Ijaz Sheikh) [#16704](https://github.com/nodejs/node/pull/16704)
61+
* [[`a815e1b6a2`](https://github.com/nodejs/node/commit/a815e1b6a2)] - **deps**: cherry-pick e7f4e9e from upstream libuv (Bartosz Sosnowski) [#16724](https://github.com/nodejs/node/pull/16724)
62+
* [[`7f86e8190c`](https://github.com/nodejs/node/commit/7f86e8190c)] - **deps**: update openssl asm and asm_obsolete files (Shigeki Ohtsu) [#16691](https://github.com/nodejs/node/pull/16691)
63+
* [[`1af2244020`](https://github.com/nodejs/node/commit/1af2244020)] - **deps**: add -no_rand_screen to openssl s_client (Shigeki Ohtsu) [nodejs/io.js#1836](https://github.com/nodejs/io.js/pull/1836)
64+
* [[`9d98dcc395`](https://github.com/nodejs/node/commit/9d98dcc395)] - **deps**: fix asm build error of openssl in x86_win32 (Shigeki Ohtsu) [iojs/io.js#1389](https://github.com/iojs/io.js/pull/1389)
65+
* [[`99319efc45`](https://github.com/nodejs/node/commit/99319efc45)] - **deps**: fix openssl assembly error on ia32 win32 (Fedor Indutny) [iojs/io.js#1389](https://github.com/iojs/io.js/pull/1389)
66+
* [[`151a8da4b7`](https://github.com/nodejs/node/commit/151a8da4b7)] - **deps**: copy all openssl header files to include dir (Shigeki Ohtsu) [#16691](https://github.com/nodejs/node/pull/16691)
67+
* [[`d68e53452c`](https://github.com/nodejs/node/commit/d68e53452c)] - **deps**: upgrade openssl sources to 1.0.2m (Shigeki Ohtsu) [#16691](https://github.com/nodejs/node/pull/16691)
68+
* [[`a3be5bc560`](https://github.com/nodejs/node/commit/a3be5bc560)] - **doc**: add 9.x to version picker and mark 8.x as LTS (Chris Young) [#16672](https://github.com/nodejs/node/pull/16672)
69+
* [[`08b75c1591`](https://github.com/nodejs/node/commit/08b75c1591)] - ***Revert*** "**https**: refactor to use http internals" (Myles Borins) [#16660](https://github.com/nodejs/node/pull/16660)
70+
* [[`d334a95834`](https://github.com/nodejs/node/commit/d334a95834)] - **openssl**: fix keypress requirement in apps on win32 (Shigeki Ohtsu) [iojs/io.js#1389](https://github.com/iojs/io.js/pull/1389)
71+
* [[`bf26b96fd6`](https://github.com/nodejs/node/commit/bf26b96fd6)] - **src**: add 'dynamic' process.release.lts property (Rod Vagg) [#16656](https://github.com/nodejs/node/pull/16656)
72+
* [[`dfac6cc0bb`](https://github.com/nodejs/node/commit/dfac6cc0bb)] - **test**: update process-release for Node 8 Carbon (Jeremiah Senkpiel) [#16656](https://github.com/nodejs/node/pull/16656)
73+
4774
<a id="8.9.0"></a>
4875
## 2017-10-31, Version 8.9.0 'Carbon' (LTS), @gibfahn
4976

lib/console.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,10 @@ function createWriteErrorHandler(stream) {
8484
// an `error` event. Adding a `once` listener will keep that error
8585
// from becoming an uncaught exception, but since the handler is
8686
// removed after the event, non-console.* writes won’t be affected.
87-
stream.once('error', noop);
87+
// we are only adding noop if there is no one else listening for 'error'
88+
if (stream.listenerCount('error') === 0) {
89+
stream.on('error', noop);
90+
}
8891
}
8992
};
9093
}

lib/repl.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ function hasOwnProperty(obj, prop) {
100100

101101
// Can overridden with custom print functions, such as `probe` or `eyes.js`.
102102
// This is the default "writer" value if none is passed in the REPL options.
103-
exports.writer = util.inspect;
103+
const writer = exports.writer = (obj) => util.inspect(obj, writer.options);
104+
writer.options =
105+
Object.assign(util.inspect.defaultOptions, { showProxy: true });
104106

105107
exports._builtinLibs = internalModule.builtinLibs;
106108

@@ -373,11 +375,10 @@ function REPLServer(prompt,
373375
}
374376
self.useColors = !!options.useColors;
375377

376-
if (self.useColors && self.writer === util.inspect) {
378+
if (self.useColors && self.writer === writer) {
377379
// Turn on ANSI coloring.
378-
self.writer = function(obj, showHidden, depth) {
379-
return util.inspect(obj, showHidden, depth, true);
380-
};
380+
self.writer = (obj) => util.inspect(obj, self.writer.options);
381+
self.writer.options = Object.assign(writer.options, { colors: true });
381382
}
382383

383384
function filterInternalStackFrames(error, structuredStack) {

src/process_wrap.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,8 @@ class ProcessWrap : public HandleWrap {
185185
if (!argv_v.IsEmpty() && argv_v->IsArray()) {
186186
Local<Array> js_argv = Local<Array>::Cast(argv_v);
187187
int argc = js_argv->Length();
188+
CHECK_GT(argc + 1, 0); // Check for overflow.
189+
188190
// Heap allocate to detect errors. +1 is for nullptr.
189191
options.args = new char*[argc + 1];
190192
for (int i = 0; i < argc; i++) {
@@ -211,6 +213,7 @@ class ProcessWrap : public HandleWrap {
211213
if (!env_v.IsEmpty() && env_v->IsArray()) {
212214
Local<Array> env_opt = Local<Array>::Cast(env_v);
213215
int envc = env_opt->Length();
216+
CHECK_GT(envc + 1, 0); // Check for overflow.
214217
options.env = new char*[envc + 1]; // Heap allocated to detect errors.
215218
for (int i = 0; i < envc; i++) {
216219
node::Utf8Value pair(env->isolate(),

test/addons-napi/test_exception/test.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ assert.strictEqual(test_exception.wasPending(), true,
3333
// Test that the native side does not capture a non-existing exception
3434
returnedError = test_exception.returnException(common.mustCall());
3535
assert.strictEqual(undefined, returnedError,
36-
'Returned error is undefined when no exception is thrown');
36+
'Returned error should be undefined when no exception is' +
37+
` thrown, but ${returnedError} was passed`);
3738

3839
// Test that no exception appears that was not thrown by us
3940
try {
@@ -42,7 +43,8 @@ try {
4243
caughtError = anError;
4344
}
4445
assert.strictEqual(undefined, caughtError,
45-
'No exception originated on the native side');
46+
'No exception originated on the native side, but' +
47+
` ${caughtError} was passed`);
4648

4749
// Test that the exception state remains clear when no exception is thrown
4850
assert.strictEqual(test_exception.wasPending(), false,

0 commit comments

Comments
 (0)