Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v11.6.0 proposal #25175

Merged
merged 59 commits into from Dec 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
0057af2
deps: cherry-pick http_parser_set_max_header_size
cjihrig Nov 29, 2018
c80ac7f
src: add kUInteger parsing
mcollina Dec 18, 2018
edd8bd0
cli: add --max-http-header-size flag
cjihrig Dec 3, 2018
0cde1a4
lib: remove unused NativeModule/NativeModule wraps
joyeecheung Dec 8, 2018
7f34c76
src: remove internalBinding('config').warningFile
joyeecheung Dec 11, 2018
96bdd47
lib: refactor argument validation using validateString
ZYSzys Dec 11, 2018
7b2eefc
child_process: spawn ignores options in case args is undefined
eduardbme Dec 8, 2018
85a1369
perf_hooks: make GC tracking state per-Environment
addaleax Dec 14, 2018
74e08c0
vm: simplify Script constructor options validation
cjihrig Dec 15, 2018
09a99c6
src: mark some global state as const
addaleax Dec 14, 2018
ed3303b
tools: enable no-useless-constructor lint rule
cjihrig Dec 15, 2018
30b6155
test: merge test with unnecessary child process
sam-github Dec 13, 2018
4513516
build: add a space to clarify skipping crypto msg
danbev Dec 13, 2018
2516e9c
doc,lib,test: capitalize comment sentences
BridgeAR Dec 10, 2018
e340b8f
tls: re-define max supported version as 1.2
sam-github Nov 28, 2018
a4505c6
src: extract common Bind method
maclover7 Aug 14, 2018
9ad6bc2
test: remove magic numbers in test-gc-http-client-onerror
Trott Dec 10, 2018
3f82144
process: move environment variable proxy code into node_env_var.cc
joyeecheung Dec 15, 2018
4561e2c
doc: revise "Breaking Changes" section of Collaborator Guide
Trott Dec 16, 2018
a5bccc2
tools: make apilinks building more robust
joyeecheung Dec 13, 2018
5eb5d1d
test: test internal/util/types in vm
ZYSzys Dec 15, 2018
a9ab28d
assert: inspect getters
BridgeAR Dec 13, 2018
3e1fe19
test: add missing tmpdir.refresh() in recently-added test
Trott Dec 17, 2018
6f3b421
src: schedule destroy hooks in BeforeExit early during bootstrap
joyeecheung Dec 13, 2018
1f45b23
test: add signal check to test-esm-cjs-main
Trott Dec 16, 2018
4f28da8
worker: fix nullptr deref after MessagePort deser failure
addaleax Dec 16, 2018
155d1d5
deps: upgrade to libuv 1.24.1
cjihrig Dec 16, 2018
8279826
test: verify input flags
BridgeAR Dec 6, 2018
d09e333
test: remove obsolete eslint comments
cjihrig Dec 17, 2018
d1a98a8
events: simplify stack compare function
BridgeAR Nov 18, 2018
c6388ed
src: handle empty Maybe in uv binding initialize
addaleax Dec 17, 2018
7df59f8
vm: reuse validateString of internal/validators
ZYSzys Dec 16, 2018
fd0361b
src: mark options parsers as const
addaleax Dec 15, 2018
54e42f0
src: port GetLoadedLibraries for freebsd
gireeshpunathil Dec 18, 2018
2fc43fb
lib: switch to object spread where possible
BridgeAR Dec 18, 2018
ae50f48
http: add maxHeaderSize property
cjihrig Dec 6, 2018
add566e
os: use uv_os_gethostname() in hostname()
cjihrig Dec 18, 2018
b801b03
src: use std::vector for setting up process.execPath
addaleax Dec 15, 2018
9b38bbf
build: correct fi indentation in Makefile
danbev Dec 18, 2018
9b941da
tools: update certdata.txt
sam-github Dec 18, 2018
6f6f339
crypto: update root certificates
sam-github Dec 18, 2018
4ca0951
doc: describe root cert update process
sam-github Dec 18, 2018
6a690ee
doc: revise "Breaking Changes and Deprecations"
Trott Dec 18, 2018
175f7b6
test: remove unnecessary eslint-disable comments
Trott Dec 19, 2018
073a512
tools: report unused disable-directives for ESLint
Trott Dec 19, 2018
b3f45da
lib: make internal API warning more direct
Trott Dec 19, 2018
a28cae0
test: add hasCrypto check to common flags check
danbev Dec 20, 2018
db54531
test: remove Files: comment processing from Python test runner
Trott Dec 22, 2018
c6bfa66
buffer: simplify code
BridgeAR Dec 20, 2018
c9f809e
src: add DCHECK macros
kiyomizumia Nov 14, 2018
b78d487
doc: fix links in test/common/README.md
vsemozhetbyt Dec 21, 2018
3b53df0
crypto: add key object API
tniessen Sep 20, 2018
e6c1e8d
crypto: always accept certificates as public keys
tniessen Dec 19, 2018
c7fa132
tools: alphabetize IGNORED_SUITES in tools/test.py
Trott Dec 22, 2018
6557ea1
test: mark test-trace-events-api-worker-disabled flaky
Trott Dec 23, 2018
8ab0a48
tools: update ESLint to 5.11.0
cjihrig Dec 23, 2018
45d4851
test: fix test-tls-session-timeout
Trott Dec 23, 2018
e855018
deps: upgrade npm to 6.5.0
Nov 29, 2018
968e901
2018-12-26, Version 11.6.0 (Current)
MylesBorins Dec 21, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 3 additions & 2 deletions .eslintrc.js
Expand Up @@ -60,9 +60,9 @@ module.exports = {
'brace-style': ['error', '1tbs', { allowSingleLine: true }],
'capitalized-comments': ['error', 'always', {
line: {
// Ignore all lines that have less characters than 62 and all lines that
// Ignore all lines that have less characters than 50 and all lines that
// start with something that looks like a variable name or code.
ignorePattern: '^.{0,62}$|^ [a-z]+ ?[0-9A-Z_.(/=:-]',
ignorePattern: '^.{0,50}$|^ [a-z]+ ?[0-9A-Z_.(/=:[#-]',
ignoreInlineComments: true,
ignoreConsecutiveComments: true
},
Expand Down Expand Up @@ -235,6 +235,7 @@ module.exports = {
}],
'no-useless-call': 'error',
'no-useless-concat': 'error',
'no-useless-constructor': 'error',
'no-useless-escape': 'error',
'no-useless-return': 'error',
'no-void': 'error',
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Expand Up @@ -28,7 +28,8 @@ release.
</tr>
<tr>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V11.md#11.5.0">11.5.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V11.md#11.6.0">11.6.0</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V11.md#11.5.0">11.5.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V11.md#11.4.0">11.4.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V11.md#11.3.0">11.3.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V11.md#11.2.0">11.2.0</a><br/>
Expand Down
38 changes: 8 additions & 30 deletions COLLABORATOR_GUIDE.md
Expand Up @@ -242,8 +242,8 @@ For undocumented APIs that are public, open a pull request documenting the API.

### Breaking Changes

Backwards-incompatible changes may land on the master branch at any time after
sufficient review by Collaborators and approval of at least two TSC members.
At least two TSC members must approve backward-incompatible changes to the
master branch.

Examples of breaking changes include:

Expand All @@ -254,38 +254,16 @@ Examples of breaking changes include:
* altering expected timing of an event
* changing the side effects of using a particular API

Purely additive changes (e.g. adding new events to `EventEmitter`
implementations, adding new arguments to a method in a way that allows
existing code to continue working without modification, or adding new
properties to an options argument) are semver-minor changes.

#### Breaking Changes and Deprecations

With a few exceptions outlined below, when backward-incompatible changes to a
*Public* API are necessary, the existing API *must* be deprecated *first* and
the new API either introduced in parallel or added after the next major Node.js
version following the deprecation as a replacement for the deprecated API. In
other words, as a general rule, existing *Public* APIs *must not* change (in a
backward-incompatible way) without a deprecation.

Exceptions to this rule may be made in the following cases:
Existing stable public APIs that change in a backward-incompatible way must
undergo deprecation. The exceptions to this rule are:

* Adding or removing errors thrown or reported by a Public API;
* Adding or removing errors thrown or reported by a public API;
* Changing error messages for errors without error code;
* Altering the timing and non-internal side effects of the Public API.

Such changes *must* be handled as semver-major changes but MAY be landed
without a [Deprecation cycle](#deprecation-cycle).

Note that errors thrown, along with behaviors and APIs implemented by
dependencies of Node.js (e.g. those originating from V8) are generally not
under the control of Node.js and therefore *are not directly subject to this
policy*. However, care should still be taken when landing updates to
dependencies when it is known or expected that breaking changes to error
handling may have been made. Additional CI testing may be required.

From time-to-time, in particularly exceptional cases, the TSC may be asked to
consider and approve additional exceptions to this rule.
* Altering the timing and non-internal side effects of the public API;
* Changes to errors thrown by dependencies of Node.js, such as V8;
* One-time exceptions granted by the TSC.

For more information, see [Deprecations](#deprecations).

Expand Down
16 changes: 8 additions & 8 deletions Makefile
Expand Up @@ -344,7 +344,7 @@ test/addons/.docbuildstamp: $(DOCBUILDSTAMP_PREREQS) tools/doc/node_modules
$(RM) -r test/addons/??_*/; \
[ -x $(NODE) ] && $(NODE) $< || node $< ; \
touch $@; \
fi
fi

ADDONS_BINDING_GYPS := \
$(filter-out test/addons/??_*/binding.gyp, \
Expand Down Expand Up @@ -661,7 +661,7 @@ tools/doc/node_modules: tools/doc/package.json
echo "Skipping tools/doc/node_modules (no crypto)"; \
else \
cd tools/doc && $(call available-node,$(run-npm-ci)) \
fi
fi

.PHONY: doc-only
doc-only: tools/doc/node_modules \
Expand Down Expand Up @@ -692,16 +692,16 @@ out/doc/api/assets/%: doc/api_assets/% out/doc/api/assets

run-npm-ci = $(PWD)/$(NPM) ci

LINK_DATA = out/doc/apilinks.json
gen-api = tools/doc/generate.js --node-version=$(FULLVERSION) \
--apilinks=out/apilinks.json $< --output-directory=out/doc/api
gen-apilink = tools/doc/apilinks.js $(wildcard lib/*.js) > $@
--apilinks=$(LINK_DATA) $< --output-directory=out/doc/api
gen-apilink = tools/doc/apilinks.js $(LINK_DATA) $(wildcard lib/*.js)

out/apilinks.json: $(wildcard lib/*.js) tools/doc/apilinks.js
$(LINK_DATA): $(wildcard lib/*.js) tools/doc/apilinks.js
$(call available-node, $(gen-apilink))

out/doc/api/%.json out/doc/api/%.html: doc/api/%.md tools/doc/generate.js \
tools/doc/html.js tools/doc/json.js tools/doc/apilinks.js | \
out/apilinks.json
tools/doc/html.js tools/doc/json.js tools/doc/apilinks.js | $(LINK_DATA)
$(call available-node, $(gen-api))

out/doc/api/all.html: $(apidocs_html) tools/doc/allhtml.js \
Expand Down Expand Up @@ -1159,7 +1159,7 @@ lint-md: | tools/.mdlintstamp
LINT_JS_TARGETS = .eslintrc.js benchmark doc lib test tools

run-lint-js = tools/node_modules/eslint/bin/eslint.js --cache \
--ext=.js,.mjs,.md $(LINT_JS_TARGETS)
--report-unused-disable-directives --ext=.js,.mjs,.md $(LINT_JS_TARGETS)
run-lint-js-fix = $(run-lint-js) --fix

.PHONY: lint-js-fix
Expand Down
2 changes: 1 addition & 1 deletion benchmark/_benchmark_progress.js
Expand Up @@ -40,7 +40,7 @@ class BenchmarkProgress {
this.completedConfig = 0;
// Total number of configurations for the current file
this.scheduledConfig = 0;
this.interval = 0; // result of setInterval for updating the elapsed time
this.interval; // Updates the elapsed time.
}

startQueue(index) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/napi/function_args/index.js
@@ -1,4 +1,4 @@
// show the difference between calling a V8 binding C++ function
// Show the difference between calling a V8 binding C++ function
// relative to a comparable N-API C++ function,
// in various types/numbers of arguments.
// Reports n of calls per second.
Expand Down
2 changes: 1 addition & 1 deletion benchmark/napi/function_call/index.js
@@ -1,4 +1,4 @@
// show the difference between calling a short js function
// Show the difference between calling a short js function
// relative to a comparable C++ function.
// Reports n of calls per second.
// Note that JS speed goes up, while cxx speed stays about the same.
Expand Down
2 changes: 1 addition & 1 deletion benchmark/net/net-pipe.js
Expand Up @@ -48,7 +48,7 @@ function main({ dur, len, type }) {
socket.pipe(writer);

setTimeout(function() {
// multiply by 2 since we're sending it first one way
// Multiply by 2 since we're sending it first one way
// then then back again.
const bytes = writer.received * 2;
const gbits = (bytes * 8) / (1024 * 1024 * 1024);
Expand Down
6 changes: 3 additions & 3 deletions benchmark/net/tcp-raw-c2s.js
Expand Up @@ -47,12 +47,12 @@ function main({ dur, len, type }) {
}, dur * 1000);

clientHandle.onread = function(buffer) {
// we're not expecting to ever get an EOF from the client.
// just lots of data forever.
// We're not expecting to ever get an EOF from the client.
// Just lots of data forever.
if (!buffer)
fail('read');

// don't slice the buffer. the point of this is to isolate, not
// Don't slice the buffer. The point of this is to isolate, not
// simulate real traffic.
bytes += buffer.byteLength;
};
Expand Down
6 changes: 3 additions & 3 deletions benchmark/net/tcp-raw-pipe.js
Expand Up @@ -44,8 +44,8 @@ function main({ dur, len, type }) {
fail(err, 'connect');

clientHandle.onread = function(buffer) {
// we're not expecting to ever get an EOF from the client.
// just lots of data forever.
// We're not expecting to ever get an EOF from the client.
// Just lots of data forever.
if (!buffer)
fail('read');

Expand Down Expand Up @@ -105,7 +105,7 @@ function main({ dur, len, type }) {
clientHandle.readStart();

setTimeout(function() {
// multiply by 2 since we're sending it first one way
// Multiply by 2 since we're sending it first one way
// then then back again.
bench.end(2 * (bytes * 8) / (1024 * 1024 * 1024));
process.exit(0);
Expand Down
6 changes: 3 additions & 3 deletions benchmark/net/tcp-raw-s2c.js
Expand Up @@ -110,12 +110,12 @@ function main({ dur, len, type }) {
connectReq.oncomplete = function() {
var bytes = 0;
clientHandle.onread = function(buffer) {
// we're not expecting to ever get an EOF from the client.
// just lots of data forever.
// We're not expecting to ever get an EOF from the client.
// Just lots of data forever.
if (!buffer)
fail('read');

// don't slice the buffer. the point of this is to isolate, not
// Don't slice the buffer. The point of this is to isolate, not
// simulate real traffic.
bytes += buffer.byteLength;
};
Expand Down
2 changes: 1 addition & 1 deletion benchmark/tls/tls-connect.js
Expand Up @@ -59,7 +59,7 @@ function makeConnection() {

function done() {
running = false;
// it's only an established connection if they both saw it.
// It's only an established connection if they both saw it.
// because we destroy the server somewhat abruptly, these
// don't always match. Generally, serverConn will be
// the smaller number, but take the min just to be sure.
Expand Down
15 changes: 11 additions & 4 deletions deps/http_parser/http_parser.c
Expand Up @@ -25,6 +25,8 @@
#include <string.h>
#include <limits.h>

static uint32_t max_header_size = HTTP_MAX_HEADER_SIZE;

#ifndef ULLONG_MAX
# define ULLONG_MAX ((uint64_t) -1) /* 2^64-1 */
#endif
Expand Down Expand Up @@ -137,20 +139,20 @@ do { \
} while (0)

/* Don't allow the total size of the HTTP headers (including the status
* line) to exceed HTTP_MAX_HEADER_SIZE. This check is here to protect
* line) to exceed max_header_size. This check is here to protect
* embedders against denial-of-service attacks where the attacker feeds
* us a never-ending header that the embedder keeps buffering.
*
* This check is arguably the responsibility of embedders but we're doing
* it on the embedder's behalf because most won't bother and this way we
* make the web a little safer. HTTP_MAX_HEADER_SIZE is still far bigger
* make the web a little safer. max_header_size is still far bigger
* than any reasonable request or response so this should never affect
* day-to-day operation.
*/
#define COUNT_HEADER_SIZE(V) \
do { \
parser->nread += (V); \
if (UNLIKELY(parser->nread > (HTTP_MAX_HEADER_SIZE))) { \
if (UNLIKELY(parser->nread > max_header_size)) { \
SET_ERRNO(HPE_HEADER_OVERFLOW); \
goto error; \
} \
Expand Down Expand Up @@ -1471,7 +1473,7 @@ size_t http_parser_execute (http_parser *parser,
const char* p_lf;
size_t limit = data + len - p;

limit = MIN(limit, HTTP_MAX_HEADER_SIZE);
limit = MIN(limit, max_header_size);

p_cr = (const char*) memchr(p, CR, limit);
p_lf = (const char*) memchr(p, LF, limit);
Expand Down Expand Up @@ -2437,3 +2439,8 @@ http_parser_version(void) {
HTTP_PARSER_VERSION_MINOR * 0x00100 |
HTTP_PARSER_VERSION_PATCH * 0x00001;
}

void
http_parser_set_max_header_size(uint32_t size) {
max_header_size = size;
}
3 changes: 3 additions & 0 deletions deps/http_parser/http_parser.h
Expand Up @@ -427,6 +427,9 @@ void http_parser_pause(http_parser *parser, int paused);
/* Checks if this is the final chunk of the body. */
int http_body_is_final(const http_parser *parser);

/* Change the maximum header size provided at compile time. */
void http_parser_set_max_header_size(uint32_t size);

#ifdef __cplusplus
}
#endif
Expand Down
9 changes: 9 additions & 0 deletions deps/npm/.licensee.json
@@ -0,0 +1,9 @@
{
"license": "(MIT OR BSD-2-Clause OR BSD-3-Clause OR Apache-2.0 OR ISC OR Unlicense OR CC-BY-3.0 OR CC0-1.0 OR Artistic-2.0)",
"whitelist": {
"config-chain": "1.1.12",
"cyclist": "0.2.2",
"json-schema": "0.2.3",
"qrcode-terminal": "0.12.0"
}
}
1 change: 1 addition & 0 deletions deps/npm/.travis.yml
Expand Up @@ -33,3 +33,4 @@ install:
- "node . install"
script:
- "node . run tap -- \"test/tap/*.js\" \"test/broken-under-nyc/*.js\""
- "node . run licenses"
11 changes: 11 additions & 0 deletions deps/npm/AUTHORS
Expand Up @@ -601,3 +601,14 @@ SneakyFish5 <32284796+SneakyFish5@users.noreply.github.com>
Nikki Everett <neverett@users.noreply.github.com>
Erik Price <github@erikprice.net>
Lars Willighagen <lars.willighagen@gmail.com>
Kevin Gibbons <bakkot@gmail.com>
Maarten Balliauw <maarten@balliauw.be>
Mehdy Dara <mdara@eleven-labs.com>
Robert Kielty <rob.kielty@gmail.com>
Scott Trinh <scottyparade@gmail.com>
Hugo <hugovk@users.noreply.github.com>
Jacob <jakeincanada@icloud.com>
Joe Bottigliero <joe@bottigliero.com>
Nikolai Vavilov <vvnicholas@gmail.com>
Kelvin Jin <kelvinjin@google.com>
乱序 <midare@utakana.de>