Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
c943cd0
test: fix repl-tab-complete --without-ssl
danbev Dec 26, 2017
9510540
doc: lowercase primitives in test/common/README.md
vsemozhetbyt Feb 19, 2018
e74e422
crypto: add cert.fingerprint256 as SHA256 fingerprint
bjori Dec 14, 2017
ef8f90f
http2: fix condition where data is lost
mcollina Feb 19, 2018
28a5362
build: fix lint-md-build dependency
joyeecheung Feb 24, 2018
71d09ec
doc: make the background section concise and improve its formality
Feb 22, 2018
4d5cd5c
src: fix error message in async_hooks constructor
danbev Feb 26, 2018
44d80c5
build: fix coverage after gcovr update
killagu Feb 23, 2018
59547cc
loader: fix --inspect-brk
devsnek Feb 23, 2018
ae4d83f
http: prevent aborted event when already completed
billywhizz Feb 17, 2018
0789eec
http: prevent aborted event when already completed
billywhizz Feb 17, 2018
eca333a
test: refactor test after review
billywhizz Feb 27, 2018
fd27165
test: specify 'dir' for directory symlinks
kfarnung Feb 27, 2018
68c1337
doc: add RegExp Unicode Property Escapes to intl
vsemozhetbyt Feb 28, 2018
12856b0
lib: change hook -> hooks in code comment
danbev Feb 28, 2018
4471369
http2: send error text in case of ALPN mismatch
addaleax Feb 25, 2018
a455006
test: allow running with `NODE_PENDING_DEPRECATION`
addaleax Feb 25, 2018
aa0fca9
http2: use original error for cancelling pending streams
addaleax Feb 25, 2018
8bc930c
http2: fix endless loop when writing empty string
addaleax Feb 22, 2018
8d595bb
test: check endless loop while writing empty string
XadillaX Feb 11, 2018
08b83ee
src: refactor setting JS properties on WriteWrap
addaleax Feb 23, 2018
1b32fc3
n-api: fix object test
Feb 27, 2018
459f209
doc: Readable unpipe on Writable error event
GeorgeSapkin Feb 8, 2018
77154cd
doc: update list of re-exported symbols
richardlau Feb 26, 2018
cc90bbd
test: fix flaky inspector-stop-profile-after-done
Trott Mar 2, 2018
551d975
http2: fix flaky test-http2-https-fallback
mcollina Mar 2, 2018
bfa894c
doc: add MoonBall to collaborators
MoonBall Mar 3, 2018
a4462b7
doc: fix n-api asynchronous threading docs
ebickle Mar 1, 2018
6d17383
buffer: fix typo in lib/buffer.js
ryzokuken Mar 4, 2018
23107ba
test: remove assert message and add block scope
wuweiweiwu Feb 28, 2018
d883376
test: refactor test-async-wrap-getasyncid
santigimeno Feb 12, 2018
cab6c8e
doc: add URL.format() example
zeke Feb 20, 2018
f864509
test,benchmark: use new Buffer API where appropriate
ChALkeR Feb 24, 2018
a938e52
build: disable openssl build warnings on macos
bnoordhuis Feb 27, 2018
db8d197
lib,test: remove yoda statements
BridgeAR Mar 2, 2018
5b8c97f
events: show throw stack trace for uncaught exception
addaleax Feb 26, 2018
5c4f703
n-api: update reference test
Mar 2, 2018
96f0bec
repl: make last error available as `_error`
addaleax Feb 21, 2018
e584113
lib: re-fix v8_prof_processor
addaleax Feb 28, 2018
479b622
tls,http2: handle writes after SSL destroy more gracefully
addaleax Feb 25, 2018
4ecf5bb
doc: fix a typo in util.isDeepStrictEqual
Feb 14, 2018
e42600f
doc: add missing `Returns` in fs & util
Feb 14, 2018
3d4cda3
trace_events: add file pattern cli option
AndreasMadsen Jan 31, 2018
6ae2caf
buffer: coerce offset to integer
BridgeAR Jan 17, 2018
5bbf009
test: check symbols in shared lib
yhwang Feb 15, 2018
89edbae
src: clean up process.dlopen()
bnoordhuis Feb 22, 2018
4fae6e3
src: make process.dlopen() load well-known symbol
bnoordhuis Feb 22, 2018
4b34b2e
build: fix gocvr version used for coverage
mhdawson Mar 2, 2018
95f6467
module: fix cyclical dynamic import
bmeck Feb 23, 2018
0e4f426
doc: add simple example to rename function
punteek Feb 16, 2018
ae2dabb
doc: new team for bundlers or delivery of Node.js
mhdawson Mar 2, 2018
056001d
deps: cherry-pick 0bcb1d6f from upstream V8
jakobkummerow Dec 5, 2017
9d2de16
doc: add introduced_in metadata to _toc.md
Trott Mar 4, 2018
f03079f
doc: update cc list
BridgeAR Mar 2, 2018
d3a70e9
doc: remove tentativeness in pull-requests.md
Trott Mar 4, 2018
6852461
doc: remove subsystem from pull request template
Trott Mar 4, 2018
f10470c
src: refactor GetPeerCertificate
danbev Mar 2, 2018
2f17c52
src: use std::unique_ptr for STACK_OF(X509)
bnoordhuis Mar 2, 2018
ee653ec
test: move require http2 to after crypto check
danbev Mar 3, 2018
cc52dae
src: #include <stdio.h>" to iculslocs
srl295 Mar 5, 2018
28880cf
perf_hooks: fix timing
TimothyGu Feb 25, 2018
6787913
test: add more information to assert.strictEqual
ryzokuken Mar 6, 2018
08bcdde
src: handle exceptions in env->SetImmediates
jasnell Jan 26, 2018
67a9742
src: prevent persistent handle resource leaks
bnoordhuis Feb 21, 2018
f89f659
src: remove unnecessary Reset() calls
bnoordhuis Feb 21, 2018
420d56c
src: don't touch js object in Http2Session dtor
bnoordhuis Feb 21, 2018
50d1233
http2: no stream destroy while its data is on the wire
addaleax Feb 26, 2018
f3e3429
module: support main w/o extension, pjson cache
guybedford Feb 12, 2018
39e032f
module: fix main lookup regression from #18728
guybedford Feb 14, 2018
3e8e152
util: use blue on non-windows systems for number
devsnek Feb 22, 2018
1fadb2e
doc: fix/add link to Android info
vsemozhetbyt Feb 26, 2018
ef4714c
net: inline and simplify onSocketEnd
addaleax Feb 6, 2018
27ba6e2
2018-03-07, Version 9.8.0 (Current)
MylesBorins Mar 6, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,3 @@ Contributors guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md
- [ ] tests and/or benchmarks are included
- [ ] documentation is changed or added
- [ ] commit message follows [commit guidelines](https://github.com/nodejs/node/blob/master/doc/guides/contributing/pull-requests.md#commit-message-guidelines)

##### Affected core subsystem(s)
<!-- Provide affected core subsystem(s) (like doc, cluster, crypto, etc). -->
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ release.
</tr>
<tr>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V9.md#9.7.0">9.7.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V9.md#9.8.0">9.8.0</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V9.md#9.7.1">9.7.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V9.md#9.7.0">9.7.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V9.md#9.6.1">9.6.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V9.md#9.6.0">9.6.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V9.md#9.5.0">9.5.0</a><br/>
Expand Down
23 changes: 13 additions & 10 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/scripts/gcovr.orig ]; then \
(cd gcovr && patch -N -p1 < \
"$(CURDIR)/build/jenkins/scripts/coverage/gcovr-patches.diff"); fi
"$(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 Down Expand Up @@ -1056,15 +1056,18 @@ lint-md-clean:
$(RM) -r tools/remark-preset-lint-node/node_modules
$(RM) tools/.*mdlintstamp

.PHONY: lint-md-build
lint-md-build:
@if [ ! -d tools/remark-cli/node_modules ]; then \
echo "Markdown linter: installing remark-cli into tools/"; \
cd tools/remark-cli && $(call available-node,$(run-npm-install)) fi
@if [ ! -d tools/remark-preset-lint-node/node_modules ]; then \
echo "Markdown linter: installing remark-preset-lint-node into tools/"; \
cd tools/remark-preset-lint-node && $(call available-node,$(run-npm-install)) fi
tools/remark-cli/node_modules: tools/remark-cli/package.json
@echo "Markdown linter: installing remark-cli into tools/"
@cd tools/remark-cli && $(call available-node,$(run-npm-install))

tools/remark-preset-lint-node/node_modules: \
tools/remark-preset-lint-node/package.json
@echo "Markdown linter: installing remark-preset-lint-node into tools/"
@cd tools/remark-preset-lint-node && $(call available-node,$(run-npm-install))

.PHONY: lint-md-build
lint-md-build: tools/remark-cli/node_modules \
tools/remark-preset-lint-node/node_modules

.PHONY: lint-md
ifneq ("","$(wildcard tools/remark-cli/node_modules/)")
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,8 @@ For more information about the governance of the Node.js project, see
**Julien Gilli** &lt;[email protected]&gt;
* [mmarchini](https://github.com/mmarchini) -
**Matheus Marchini** &lt;[email protected]&gt;
* [MoonBall](https://github.com/MoonBall) -
**Chen Gang** &lt;[email protected]&gt;
* [mscdex](https://github.com/mscdex) -
**Brian White** &lt;[email protected]&gt;
* [MylesBorins](https://github.com/MylesBorins) -
Expand Down
2 changes: 1 addition & 1 deletion benchmark/streams/pipe.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const bench = common.createBenchmark(main, {
});

function main({ n }) {
const b = new Buffer(1024);
const b = Buffer.alloc(1024);
const r = new Readable();
const w = new Writable();

Expand Down
2 changes: 1 addition & 1 deletion benchmark/streams/readable-bigread.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const bench = common.createBenchmark(main, {
});

function main({ n }) {
const b = new Buffer(32);
const b = Buffer.alloc(32);
const s = new Readable();
function noop() {}
s._read = noop;
Expand Down
2 changes: 1 addition & 1 deletion benchmark/streams/readable-bigunevenread.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const bench = common.createBenchmark(main, {
});

function main({ n }) {
const b = new Buffer(32);
const b = Buffer.alloc(32);
const s = new Readable();
function noop() {}
s._read = noop;
Expand Down
2 changes: 1 addition & 1 deletion benchmark/streams/readable-readall.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const bench = common.createBenchmark(main, {
});

function main({ n }) {
const b = new Buffer(32);
const b = Buffer.alloc(32);
const s = new Readable();
function noop() {}
s._read = noop;
Expand Down
2 changes: 1 addition & 1 deletion benchmark/streams/readable-unevenread.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const bench = common.createBenchmark(main, {
});

function main({ n }) {
const b = new Buffer(32);
const b = Buffer.alloc(32);
const s = new Readable();
function noop() {}
s._read = noop;
Expand Down
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.20',
'v8_embedder_string': '-node.21',

# Enable disassembler for `--print-code` v8 options
'v8_enable_disassembler': 1,
Expand Down
3 changes: 3 additions & 0 deletions deps/openssl/openssl.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@
}, {
'defines': ['<@(openssl_default_defines_not_win)'],
'cflags': ['-Wno-missing-field-initializers'],
'xcode_settings': {
'WARNING_CFLAGS': ['-Wno-missing-field-initializers'],
},
'conditions': [
['OS=="mac"', {
'defines': ['<@(openssl_default_defines_mac)'],
Expand Down
5 changes: 5 additions & 0 deletions deps/v8/src/bootstrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5299,6 +5299,11 @@ Genesis::Genesis(
if (!InstallDebuggerNatives()) return;
}

if (FLAG_disallow_code_generation_from_strings) {
native_context()->set_allow_code_gen_from_strings(
isolate->heap()->false_value());
}

ConfigureUtilsObject(context_type);

// Check that the script context table is empty except for the 'this' binding.
Expand Down
2 changes: 2 additions & 0 deletions deps/v8/src/flag-definitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,8 @@ DEFINE_BOOL(expose_trigger_failure, false, "expose trigger-failure extension")
DEFINE_INT(stack_trace_limit, 10, "number of stack frames to capture")
DEFINE_BOOL(builtins_in_stack_traces, false,
"show built-in functions in stack traces")
DEFINE_BOOL(disallow_code_generation_from_strings, false,
"disallow eval and friends")

// builtins.cc
DEFINE_BOOL(allow_unsafe_function_constructor, false,
Expand Down
9 changes: 9 additions & 0 deletions deps/v8/test/mjsunit/disallow-codegen-from-strings.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Copyright 2017 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Flags: --disallow-code-generation-from-strings

assertThrows("1 + 1", EvalError);
assertThrows(() => eval("1 + 1"), EvalError);
assertThrows(() => Function("x", "return x + 1"), EvalError);
4 changes: 4 additions & 0 deletions doc/api/_toc.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
@// NB(chrisdickinson): if you move this file, be sure to update tools/doc/html.js to
@// point at the new location.
@// tools/doc/html.js to point at the new location.

<!--introduced_in=v0.10.0-->

* [About these Docs](documentation.html)
* [Usage & Example](synopsis.html)

Expand Down
5 changes: 3 additions & 2 deletions doc/api/addons.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ involving knowledge of several components and APIs :

- Node.js includes a number of other statically linked libraries including
OpenSSL. These other libraries are located in the `deps/` directory in the
Node.js source tree. Only the V8 and OpenSSL symbols are purposefully
re-exported by Node.js and may be used to various extents by Addons.
Node.js source tree. Only the libuv, OpenSSL, V8 and zlib symbols are
purposefully re-exported by Node.js and may be used to various extents by
Addons.
See [Linking to Node.js' own dependencies][] for additional information.

All of the following examples are available for [download][] and may
Expand Down
9 changes: 9 additions & 0 deletions doc/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,14 @@ added: v7.7.0
A comma separated list of categories that should be traced when trace event
tracing is enabled using `--trace-events-enabled`.

### `--trace-event-file-pattern`
<!-- YAML
added: v9.8.0
-->

Template string specifying the filepath for the trace event data, it
supports `${rotation}` and `${pid}`.

### `--zero-fill-buffers`
<!-- YAML
added: v6.0.0
Expand Down Expand Up @@ -464,6 +472,7 @@ Node options that are allowed are:
- `--trace-deprecation`
- `--trace-events-categories`
- `--trace-events-enabled`
- `--trace-event-file-pattern`
- `--trace-sync-io`
- `--trace-warnings`
- `--track-heap-objects`
Expand Down
16 changes: 12 additions & 4 deletions doc/api/esm.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,17 +113,22 @@ The resolve hook returns the resolved file URL and module format for a
given module specifier and parent file URL:

```js
import url from 'url';
const baseURL = new URL('file://');
baseURL.pathname = process.cwd() + '/';

export async function resolve(specifier, parentModuleURL, defaultResolver) {
export async function resolve(specifier,
parentModuleURL = baseURL,
defaultResolver) {
return {
url: new URL(specifier, parentModuleURL).href,
format: 'esm'
};
}
```

The default NodeJS ES module resolution function is provided as a third
The parentURL is provided as `undefined` when performing main Node.js load itself.

The default Node.js ES module resolution function is provided as a third
argument to the resolver for easy compatibility workflows.

In addition to returning the resolved file URL value, the resolve hook also
Expand Down Expand Up @@ -152,7 +157,10 @@ import Module from 'module';
const builtins = Module.builtinModules;
const JS_EXTENSIONS = new Set(['.js', '.mjs']);

export function resolve(specifier, parentModuleURL/*, defaultResolve */) {
const baseURL = new URL('file://');
baseURL.pathname = process.cwd() + '/';

export function resolve(specifier, parentModuleURL = baseURL, defaultResolve) {
if (builtins.includes(specifier)) {
return {
url: specifier,
Expand Down
31 changes: 29 additions & 2 deletions doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -1198,6 +1198,7 @@ changes:
* `start` {integer}
* `end` {integer}
* `highWaterMark` {integer}
* Returns: {ReadStream}

Returns a new [`ReadStream`][] object. (See [Readable Streams][]).

Expand Down Expand Up @@ -1273,6 +1274,7 @@ changes:
* `mode` {integer}
* `autoClose` {boolean}
* `start` {integer}
* Returns: {WriteStream}

Returns a new [`WriteStream`][] object. (See [Writable Stream][]).

Expand Down Expand Up @@ -1428,6 +1430,7 @@ changes:
-->

* `path` {string|Buffer|URL}
* Returns: {boolean}

Synchronous version of [`fs.exists()`][].
Returns `true` if the path exists, `false` otherwise.
Expand Down Expand Up @@ -1546,6 +1549,7 @@ added: v0.1.95
-->

* `fd` {integer}
* Returns: {fs.Stats}

Synchronous fstat(2). Returns an instance of [`fs.Stats`][].

Expand Down Expand Up @@ -1820,6 +1824,7 @@ changes:
-->

* `path` {string|Buffer|URL}
* Returns: {fs.Stats}

Synchronous lstat(2). Returns an instance of [`fs.Stats`][].

Expand Down Expand Up @@ -1945,6 +1950,7 @@ added: v5.10.0
* `prefix` {string}
* `options` {string|Object}
* `encoding` {string} **Default:** `'utf8'`
* Returns: {string}

The synchronous version of [`fs.mkdtemp()`][]. Returns the created
folder path.
Expand Down Expand Up @@ -2069,6 +2075,7 @@ changes:
* `path` {string|Buffer|URL}
* `flags` {string|number}
* `mode` {integer} **Default:** `0o666`
* Returns: {number}

Synchronous version of [`fs.open()`][]. Returns an integer representing the file
descriptor.
Expand Down Expand Up @@ -2159,6 +2166,7 @@ changes:
* `path` {string|Buffer|URL}
* `options` {string|Object}
* `encoding` {string} **Default:** `'utf8'`
* Returns: {Array} An array of filenames

Synchronous readdir(3). Returns an array of filenames excluding `'.'` and
`'..'`.
Expand Down Expand Up @@ -2260,6 +2268,7 @@ changes:
* `options` {Object|string}
* `encoding` {string|null} **Default:** `null`
* `flag` {string} **Default:** `'r'`
* Returns: {string|Buffer}

Synchronous version of [`fs.readFile()`][]. Returns the contents of the `path`.

Expand Down Expand Up @@ -2320,6 +2329,7 @@ changes:
* `path` {string|Buffer|URL}
* `options` {string|Object}
* `encoding` {string} **Default:** `'utf8'`
* Returns: {string|Buffer}

Synchronous readlink(2). Returns the symbolic link's string value.

Expand All @@ -2342,6 +2352,7 @@ changes:
* `offset` {integer}
* `length` {integer}
* `position` {integer}
* Returns: {number}

Synchronous version of [`fs.read()`][]. Returns the number of `bytesRead`.

Expand Down Expand Up @@ -2452,6 +2463,7 @@ changes:
* `path` {string|Buffer|URL}
* `options` {string|Object}
* `encoding` {string} **Default:** `'utf8'`
* Returns: {string|Buffer}

Synchronously computes the canonical pathname by resolving `.`, `..` and
symbolic links.
Expand Down Expand Up @@ -2482,6 +2494,7 @@ added: v9.2.0
* `path` {string|Buffer|URL}
* `options` {string|Object}
* `encoding` {string} **Default:** `'utf8'`
* Returns: {string|Buffer}

Synchronous realpath(3).

Expand Down Expand Up @@ -2516,8 +2529,19 @@ changes:
* `callback` {Function}
* `err` {Error}

Asynchronous rename(2). No arguments other than a possible exception are given
to the completion callback.
Asynchronously rename file at `oldPath` to the pathname provided
as `newPath`. In the case that `newPath` already exists, it will
be overwritten. No arguments other than a possible exception are
given to the completion callback.

See also: rename(2).

```js
fs.rename('oldFile.txt', 'newFile.txt', (err) => {
if (err) throw err;
console.log('Rename complete!');
});
```

## fs.renameSync(oldPath, newPath)
<!-- YAML
Expand Down Expand Up @@ -2619,6 +2643,7 @@ changes:
-->

* `path` {string|Buffer|URL}
* Returns: {fs.Stats}

Synchronous stat(2). Returns an instance of [`fs.Stats`][].

Expand Down Expand Up @@ -3197,6 +3222,7 @@ changes:
* `offset` {integer}
* `length` {integer}
* `position` {integer}
* Returns: {number}

## fs.writeSync(fd, string[, position[, encoding]])
<!-- YAML
Expand All @@ -3211,6 +3237,7 @@ changes:
* `string` {string}
* `position` {integer}
* `encoding` {string}
* Returns: {number}

Synchronous versions of [`fs.write()`][]. Returns the number of bytes written.

Expand Down
Loading