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

v10.18.1 proposal #30796

Closed
wants to merge 14 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ release.
<a href="doc/changelogs/CHANGELOG_V12.md#12.0.0">12.0.0</a><br/>
</td>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V10.md#10.17.0">10.17.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V10.md#10.17.1">10.17.1</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V10.md#10.17.0">10.17.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V10.md#10.16.3">10.16.3</a><br/>
<a href="doc/changelogs/CHANGELOG_V10.md#10.16.2">10.16.2</a><br/>
<a href="doc/changelogs/CHANGELOG_V10.md#10.16.1">10.16.1</a><br/>
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@ test-all: test-build ## Run everything in test/.
test-all-valgrind: test-build
$(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=debug,release --valgrind

# CI_* variables should be kept synchronized with the ones in vcbuild.bat
CI_NATIVE_SUITES ?= addons addons-napi
CI_JS_SUITES ?= default
CI_DOC := doctool
Expand Down
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,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.54',
'v8_embedder_string': '-node.55',

# Enable disassembler for `--print-code` v8 options
'v8_enable_disassembler': 1,
Expand Down
2 changes: 1 addition & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ def get_llvm_version(cc):

def get_xcode_version(cc):
return get_version_helper(
cc, r"(^Apple LLVM version) ([0-9]+\.[0-9]+)")
cc, r"(^Apple (?:clang|LLVM) version) ([0-9]+\.[0-9]+)")

def get_gas_version(cc):
try:
Expand Down
Binary file modified deps/icu-small/source/data/in/icudt64l.dat
Binary file not shown.
4 changes: 3 additions & 1 deletion deps/v8/src/objects/intl-objects.cc
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ icu::SimpleDateFormat* CreateICUDateFormat(Isolate* isolate,
status));
icu::UnicodeString pattern;
if (U_SUCCESS(status))
pattern = generator->getBestPattern(skeleton, status);
pattern = generator->getBestPattern(skeleton,
UDATPG_MATCH_HOUR_FIELD_LENGTH,
status);

date_format = new icu::SimpleDateFormat(pattern, icu_locale, status);
if (U_SUCCESS(status)) {
Expand Down
19 changes: 19 additions & 0 deletions deps/v8/test/intl/regress-527926.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright 2019 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.

let date = new Date(2015, 8, 1, 3, 0, 0);
var fmt = new Intl.DateTimeFormat('ru', {hour:'2-digit', minute: '2-digit'})
assertEquals("03:00", fmt.format(date));

fmt = new Intl.DateTimeFormat(
'en', {hour:'2-digit', minute: '2-digit', hour12: false});
assertEquals("03:00", fmt.format(date));

fmt = new Intl.DateTimeFormat(
'ru', {hour:'2-digit', minute: '2-digit', hour12: false});
assertEquals("03:00", fmt.format(date));

fmt = new Intl.DateTimeFormat(
'ru', {hour:'2-digit', minute: '2-digit', hour12: true});
assertEquals("03:00 AM", fmt.format(date));
24 changes: 24 additions & 0 deletions doc/changelogs/CHANGELOG_V10.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
</tr>
<tr>
<td valign="top">
<a href="#10.17.1">10.17.1</a><br/>
<a href="#10.17.0">10.17.0</a><br/>
<a href="#10.16.3">10.16.3</a><br/>
<a href="#10.16.2">10.16.2</a><br/>
Expand Down Expand Up @@ -56,6 +57,29 @@
* [io.js](CHANGELOG_IOJS.md)
* [Archive](CHANGELOG_ARCHIVE.md)

<a id="10.17.1"></a>
## 2019-12-10, Version 10.17.1 'Dubnium' (LTS), @BethGriggs

### Notable changes

* TBD

### Commits

* [[`61d6ac7f05`](https://github.com/nodejs/node/commit/61d6ac7f05)] - **build**: fix configure script to work with Apple Clang 11 (Saagar Jha) [#28071](https://github.com/nodejs/node/pull/28071)
* [[`4d3ec1a43e`](https://github.com/nodejs/node/commit/4d3ec1a43e)] - **build,win**: propagate error codes in vcbuild (João Reis) [#30724](https://github.com/nodejs/node/pull/30724)
* [[`c3e386284e`](https://github.com/nodejs/node/commit/c3e386284e)] - **build,win**: add test-ci-native and test-ci-js (João Reis) [#30724](https://github.com/nodejs/node/pull/30724)
* [[`0a7f6fa6b8`](https://github.com/nodejs/node/commit/0a7f6fa6b8)] - **deps**: V8: backport fb63e5cf55e9 (Michaël Zasso)
* [[`99915bcdd6`](https://github.com/nodejs/node/commit/99915bcdd6)] - **http2**: fix session memory accounting after pausing (Michael Lehenbauer) [#30684](https://github.com/nodejs/node/pull/30684)
* [[`8e0ea6ddc4`](https://github.com/nodejs/node/commit/8e0ea6ddc4)] - **http2**: use the latest settings (ZYSzys) [#29780](https://github.com/nodejs/node/pull/29780)
* [[`efeac48ee7`](https://github.com/nodejs/node/commit/efeac48ee7)] - **lib**: fix comment nits in bootstrap\\loaders.js (Vse Mozhet Byt) [#24641](https://github.com/nodejs/node/pull/24641)
* [[`14e7a35e95`](https://github.com/nodejs/node/commit/14e7a35e95)] - **n-api**: correct bug in napi\_get\_last\_error (Octavian Soldea) [#28702](https://github.com/nodejs/node/pull/28702)
* [[`c4dc53c479`](https://github.com/nodejs/node/commit/c4dc53c479)] - **stream**: extract Readable.from in its own file (Matteo Collina) [#30140](https://github.com/nodejs/node/pull/30140)
* [[`fabbc76928`](https://github.com/nodejs/node/commit/fabbc76928)] - **test**: do not fail SLOW tests if they are not slow (Yang Guo) [#25868](https://github.com/nodejs/node/pull/25868)
* [[`501ebbbcf4`](https://github.com/nodejs/node/commit/501ebbbcf4)] - **tools**: update tzdata to 2019c (Myles Borins) [#30479](https://github.com/nodejs/node/pull/30479)
* [[`7ff19bec50`](https://github.com/nodejs/node/commit/7ff19bec50)] - **tools**: move python code out of jenkins shell (Sam Roberts) [#28458](https://github.com/nodejs/node/pull/28458)
* [[`7066335cf0`](https://github.com/nodejs/node/commit/7066335cf0)] - **tools**: fix v8 testing with devtoolset on ppcle (Sam Roberts) [#28458](https://github.com/nodejs/node/pull/28458)

<a id="10.17.0"></a>
## 2019-10-22, Version 10.17.0 'Dubnium' (LTS), @BethGriggs

Expand Down
39 changes: 4 additions & 35 deletions lib/_stream_readable.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ const {
// Lazy loaded to improve the startup performance.
let StringDecoder;
let createReadableStreamAsyncIterator;
let from;

util.inherits(Readable, Stream);

Expand Down Expand Up @@ -1154,40 +1155,8 @@ function endReadableNT(state, stream) {
}

Readable.from = function(iterable, opts) {
let iterator;
if (iterable && iterable[Symbol.asyncIterator])
iterator = iterable[Symbol.asyncIterator]();
else if (iterable && iterable[Symbol.iterator])
iterator = iterable[Symbol.iterator]();
else
throw new ERR_INVALID_ARG_TYPE('iterable', ['Iterable'], iterable);

const readable = new Readable({
objectMode: true,
...opts
});
// Reading boolean to protect against _read
// being called before last iteration completion.
let reading = false;
readable._read = function() {
if (!reading) {
reading = true;
next();
}
};
async function next() {
try {
const { value, done } = await iterator.next();
if (done) {
readable.push(null);
} else if (readable.push(await value)) {
next();
} else {
reading = false;
}
} catch (err) {
readable.destroy(err);
}
if (from === undefined) {
from = require('internal/streams/from');
}
return readable;
return from(Readable, iterable, opts);
};
22 changes: 11 additions & 11 deletions lib/internal/bootstrap/loaders.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// can be created using NODE_MODULE_CONTEXT_AWARE_CPP() with the flag
// NM_F_LINKED.
// - internalBinding(): the private internal C++ binding loader, inaccessible
// from user land because they are only available from NativeModule.require()
// from user land because they are only available from NativeModule.require().
// These C++ bindings are created using NODE_MODULE_CONTEXT_AWARE_INTERNAL()
// and have their nm_flags set to NM_F_INTERNAL.
//
Expand Down Expand Up @@ -61,7 +61,7 @@
keys: ObjectKeys,
} = Object;

// Set up process.moduleLoadList
// Set up process.moduleLoadList.
const moduleLoadList = [];
ObjectDefineProperty(process, 'moduleLoadList', {
value: moduleLoadList,
Expand All @@ -70,7 +70,7 @@
writable: false
});

// Set up process.binding() and process._linkedBinding()
// Set up process.binding() and process._linkedBinding().
{
const bindingObj = ObjectCreate(null);

Expand All @@ -93,7 +93,7 @@
};
}

// Set up internalBinding() in the closure
// Set up internalBinding() in the closure.
let internalBinding;
{
const bindingObj = ObjectCreate(null);
Expand All @@ -115,11 +115,11 @@
};
}

// Create this WeakMap in js-land because V8 has no C++ API for WeakMap
// Create this WeakMap in js-land because V8 has no C++ API for WeakMap.
internalBinding('module_wrap').callbackMap = new WeakMap();
const { ContextifyScript } = process.binding('contextify');

// Set up NativeModule
// Set up NativeModule.
function NativeModule(id) {
this.filename = `${id}.js`;
this.id = id;
Expand All @@ -128,7 +128,7 @@
this.exportKeys = undefined;
this.loaded = false;
this.loading = false;
this.script = null; // The ContextifyScript of the module
this.script = null; // The ContextifyScript of the module.
}

NativeModule._source = getBinding('natives');
Expand Down Expand Up @@ -160,7 +160,7 @@
if (!NativeModule.exists(id)) {
// Model the error off the internal/errors.js model, but
// do not use that module given that it could actually be
// the one causing the error if there's a bug in Node.js
// the one causing the error if there's a bug in Node.js.
// eslint-disable-next-line no-restricted-syntax
const err = new Error(`No such built-in module: ${id}`);
err.code = 'ERR_UNKNOWN_BUILTIN_MODULE';
Expand Down Expand Up @@ -201,15 +201,15 @@

if (config.exposeInternals) {
NativeModule.nonInternalExists = function(id) {
// Do not expose this to user land even with --expose-internals
// Do not expose this to user land even with --expose-internals.
if (id === loaderId) {
return false;
}
return NativeModule.exists(id);
};

NativeModule.isInternal = function(id) {
// Do not expose this to user land even with --expose-internals
// Do not expose this to user land even with --expose-internals.
return id === loaderId;
};
} else {
Expand Down Expand Up @@ -243,7 +243,7 @@
};

// Provide named exports for all builtin libraries so that the libraries
// may be imported in a nicer way for esm users. The default export is left
// may be imported in a nicer way for ESM users. The default export is left
// as the entire namespace (module.exports) and wrapped in a proxy such
// that APMs and other behavior are still left intact.
NativeModule.prototype.proxifyExports = function() {
Expand Down
1 change: 1 addition & 0 deletions lib/internal/http2/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,7 @@ function onSettings() {
return;
session[kUpdateTimer]();
debugSessionObj(session, 'new settings received');
session[kRemoteSettings] = undefined;
session.emit('remoteSettings', session.remoteSettings);
}

Expand Down
46 changes: 46 additions & 0 deletions lib/internal/streams/from.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
'use strict';

const {
ERR_INVALID_ARG_TYPE
} = require('internal/errors').codes;

function from(Readable, iterable, opts) {
let iterator;
if (iterable && iterable[Symbol.asyncIterator])
iterator = iterable[Symbol.asyncIterator]();
else if (iterable && iterable[Symbol.iterator])
iterator = iterable[Symbol.iterator]();
else
throw new ERR_INVALID_ARG_TYPE('iterable', ['Iterable'], iterable);

const readable = new Readable({
objectMode: true,
...opts
});
// Reading boolean to protect against _read
// being called before last iteration completion.
let reading = false;
readable._read = function() {
if (!reading) {
reading = true;
next();
}
};
async function next() {
try {
const { value, done } = await iterator.next();
if (done) {
readable.push(null);
} else if (readable.push(await value)) {
next();
} else {
reading = false;
}
} catch (err) {
readable.destroy(err);
}
}
return readable;
}

module.exports = from;
1 change: 1 addition & 0 deletions node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@
'lib/internal/streams/async_iterator.js',
'lib/internal/streams/buffer_list.js',
'lib/internal/streams/duplexpair.js',
'lib/internal/streams/from.js',
'lib/internal/streams/legacy.js',
'lib/internal/streams/destroy.js',
'lib/internal/streams/state.js',
Expand Down
10 changes: 6 additions & 4 deletions src/node_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1407,14 +1407,16 @@ napi_status napi_get_last_error_info(napi_env env,
CHECK_ENV(env);
CHECK_ARG(env, result);

// you must update this assert to reference the last message
// in the napi_status enum each time a new error message is added.
// The value of the constant below must be updated to reference the last
// message in the `napi_status` enum each time a new error message is added.
// We don't have a napi_status_last as this would result in an ABI
// change each time a message was added.
const int last_status = napi_date_expected;

static_assert(
node::arraysize(error_messages) == napi_date_expected + 1,
node::arraysize(error_messages) == last_status + 1,
"Count of error messages must match count of error values");
CHECK_LE(env->last_error.error_code, napi_callback_scope_mismatch);
CHECK_LE(env->last_error.error_code, last_status);

// Wait until someone requests the last error information to fetch the error
// message string
Expand Down
4 changes: 4 additions & 0 deletions src/node_api_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ typedef enum {
napi_bigint_expected,
napi_date_expected,
} napi_status;
// Note: when adding a new enum value to `napi_status`, please also update
// `const int last_status` in `napi_get_last_error_info()' definition,
// in file js_native_api_v8.cc. Please also update the definition of
// `napi_status` in doc/api/n-api.md to reflect the newly added value(s).

#if NAPI_VERSION >= 4
typedef enum {
Expand Down
5 changes: 4 additions & 1 deletion src/node_http2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1937,7 +1937,10 @@ void Http2Session::OnStreamRead(ssize_t nread, const uv_buf_t& buf_) {
buf = uv_buf_init(new_buf, nread);
stream_buf_offset_ = 0;
stream_buf_ab_.Reset();
DecrementCurrentSessionMemory(stream_buf_offset_);

// We have now fully processed the stream_buf_ input chunk (by moving the
// remaining part into buf, which will be accounted for below).
DecrementCurrentSessionMemory(stream_buf_.len);
}

// Shrink to the actual amount of used data.
Expand Down
2 changes: 1 addition & 1 deletion src/node_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define NODE_VERSION_IS_LTS 1
#define NODE_VERSION_LTS_CODENAME "Dubnium"

#define NODE_VERSION_IS_RELEASE 0
#define NODE_VERSION_IS_RELEASE 1

#ifndef NODE_STRINGIFY
#define NODE_STRINGIFY(n) NODE_STRINGIFY_HELPER(n)
Expand Down
Loading