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

v13.10.1 proposal #32099

Merged
merged 17 commits into from
Mar 5, 2020
Merged
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
20 changes: 20 additions & 0 deletions .github/workflows/ASAN.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: node ASAN

on: [push, pull_request]

jobs:
ubuntu-build:
runs-on: ubuntu-latest
container: gengjiawen/node-build:2020-02-14
steps:
- uses: actions/checkout@v2
- name: Build
run: |
npx envinfo
./configure --debug --enable-asan --ninja && ninja -C out/Debug
- name: Test
env:
ASAN_OPTIONS: halt_on_error=0
continue-on-error: true
run: |
python3 tools/test.py -J --mode=debug
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ release.
</tr>
<tr>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V13.md#13.10.0">13.10.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V13.md#13.10.1">13.10.1</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V13.md#13.10.0">13.10.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V13.md#13.9.0">13.9.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V13.md#13.8.0">13.8.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V13.md#13.7.0">13.7.0</a><br/>
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
* [Pull Requests](#pull-requests)
* [Developer's Certificate of Origin 1.1](#developers-certificate-of-origin)

## [Code of Conduct](./doc/guides/contributing/coc.md)
## [Code of Conduct](./doc/guides/contributing/code-of-conduct.md)

The Node.js project has a
[Code of Conduct](https://github.com/nodejs/admin/blob/master/CODE_OF_CONDUCT.md)
to which all contributors must adhere.

See [details on our policy on Code of Conduct](./doc/guides/contributing/coc.md).
See [details on our policy on Code of Conduct](./doc/guides/contributing/code-of-conduct.md).

## [Issues](./doc/guides/contributing/issues.md)

Expand Down
6 changes: 3 additions & 3 deletions GOVERNANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* [Technical Steering Committee](#technical-steering-committee)
* [TSC Meetings](#tsc-meetings)
* [Collaborator Nominations](#collaborator-nominations)
* [Onboarding](#onboarding)
* [Onboarding](#./onboarding)
* [Consensus Seeking Process](#consensus-seeking-process)

<!-- /TOC -->
Expand Down Expand Up @@ -39,7 +39,7 @@ result in Collaborators removing their opposition.
See:

* [List of Collaborators](./README.md#current-project-team-members)
* [A guide for Collaborators](./COLLABORATOR_GUIDE.md)
* [A guide for Collaborators](./doc/guides/collaborator-guide.md)

### Collaborator Activities

Expand Down Expand Up @@ -148,7 +148,7 @@ nomination.
### Onboarding

After the nomination passes, a TSC member onboards the new Collaborator. See
[the onboarding guide](./doc/onboarding.md) for details of the onboarding
[the onboarding guide](./onboarding.md) for details of the onboarding
process.

## Consensus Seeking Process
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -924,12 +924,12 @@ endif
.PHONY: release-only
release-only: check-xz
@if [ "$(DISTTYPE)" = "release" ] && `grep -q REPLACEME doc/api/*.md`; then \
echo 'Please update REPLACEME in Added: tags in doc/api/*.md (See doc/releases.md)' ; \
echo 'Please update REPLACEME in Added: tags in doc/api/*.md (See doc/guides/releases.md)' ; \
exit 1 ; \
fi
@if [ "$(DISTTYPE)" = "release" ] && \
`grep -q DEP...X doc/api/deprecations.md`; then \
echo 'Please update DEP...X in doc/api/deprecations.md (See doc/releases.md)' ; \
echo 'Please update DEP...X in doc/api/deprecations.md (See doc/guides/releases.md)' ; \
exit 1 ; \
fi
@if [ "$(shell git status --porcelain | egrep -v '^\?\? ')" = "" ]; then \
Expand Down Expand Up @@ -1032,7 +1032,6 @@ $(TARBALL): release-only $(NODE_EXE) doc
$(RM) -r $(TARNAME)/deps/v8/samples
$(RM) -r $(TARNAME)/deps/v8/tools/profviz
$(RM) -r $(TARNAME)/deps/v8/tools/run-tests.py
$(RM) -r $(TARNAME)/deps/zlib/contrib # too big, unused
$(RM) -r $(TARNAME)/doc/images # too big
$(RM) -r $(TARNAME)/test*.tap
$(RM) -r $(TARNAME)/tools/cpplint.py
Expand All @@ -1043,6 +1042,7 @@ $(TARBALL): release-only $(NODE_EXE) doc
$(RM) -r $(TARNAME)/tools/osx-pkg.pmdoc
find $(TARNAME)/deps/v8/test/* -type d ! -regex '.*/test/torque$$' | xargs $(RM) -r
find $(TARNAME)/deps/v8/test -type f ! -regex '.*/test/torque/.*' | xargs $(RM)
find $(TARNAME)/deps/zlib/contrib/* -type d ! -regex '.*/contrib/optimizations$$' | xargs $(RM) -r
find $(TARNAME)/ -name ".eslint*" -maxdepth 2 | xargs $(RM)
find $(TARNAME)/ -type l | xargs $(RM) # annoying on windows
tar -cf $(TARNAME).tar $(TARNAME)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ For information about the governance of the Node.js project, see
* [whitlockjc](https://github.com/whitlockjc) -
**Jeremy Whitlock** &lt;[email protected]&gt;

Collaborators follow the [COLLABORATOR_GUIDE.md](./COLLABORATOR_GUIDE.md) in
Collaborators follow the [Collaborator Guide](./doc/guides/collaborator-guide.md) in
maintaining the Node.js project.

### Release Keys
Expand Down
8 changes: 4 additions & 4 deletions benchmark/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ of different Node.js implementations and different ways of
writing JavaScript run by the built-in JavaScript engine.

For a detailed guide on how to write and run benchmarks in this
directory, see [the guide on benchmarks](writing-and-running-benchmarks.md).
directory, see [the guide on benchmarks](../doc/guides/writing-and-running-benchmarks.md).

## Table of Contents

Expand Down Expand Up @@ -76,17 +76,17 @@ writing benchmarks.

### `createBenchmark(fn, configs[, options])`

See [the guide on writing benchmarks](writing-and-running-benchmarks.md#basics-of-a-benchmark).
See [the guide on writing benchmarks](../doc/guides/contributing/writing-and-running-benchmarks.md#basics-of-a-benchmark).

### `default_http_benchmarker`

The default benchmarker used to run HTTP benchmarks.
See [the guide on writing HTTP benchmarks](writing-and-running-benchmarks.md#creating-an-http-benchmark).
See [the guide on writing HTTP benchmarks](../doc/guides/contributing/writing-and-running-benchmarks.md#creating-an-http-benchmark).

### `PORT`

The default port used to run HTTP benchmarks.
See [the guide on writing HTTP benchmarks](writing-and-running-benchmarks.md#creating-an-http-benchmark).
See [the guide on writing HTTP benchmarks](../doc/guides/contributing/writing-and-running-benchmarks.md#creating-an-http-benchmark).

### `sendResult(data)`

Expand Down
2 changes: 1 addition & 1 deletion doc/api/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -1555,7 +1555,7 @@ const cleanup = finished(rs, (err) => {
});
```

### `stream.pipeline(source, ...transforms, destination, callback)`
### `stream.pipeline(source[, ...transforms], destination, callback)`
<!-- YAML
added: v10.0.0
changes:
Expand Down
5 changes: 5 additions & 0 deletions doc/api/worker_threads.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ correlation between tasks and their outcomes. See
["Using `AsyncResource` for a `Worker` thread pool"][async-resource-worker-pool]
in the `async_hooks` documentation for an example implementation.

Worker threads inherit non-process-specific options by default. Refer to
[`Worker constructor options`][] to know how to customize worker thread options,
specifically `argv` and `execArgv` options.

## `worker.isMainThread`
<!-- YAML
added: v10.5.0
Expand Down Expand Up @@ -768,6 +772,7 @@ active handle in the event system. If the worker is already `unref()`ed calling
[`trace_events`]: tracing.html
[`v8.getHeapSnapshot()`]: v8.html#v8_v8_getheapsnapshot
[`vm`]: vm.html
[`Worker constructor options`]: #worker_threads_new_worker_filename_options
[`worker.on('message')`]: #worker_threads_event_message_1
[`worker.postMessage()`]: #worker_threads_worker_postmessage_value_transferlist
[`worker.SHARE_ENV`]: #worker_threads_worker_share_env
Expand Down
31 changes: 31 additions & 0 deletions doc/changelogs/CHANGELOG_V13.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
</tr>
<tr>
<td>
<a href="#13.10.1">13.10.1</a><br/>
<a href="#13.10.0">13.10.0</a><br/>
<a href="#13.9.0">13.9.0</a><br/>
<a href="#13.8.0">13.8.0</a><br/>
<a href="#13.7.0">13.7.0</a><br/>
Expand Down Expand Up @@ -39,6 +41,35 @@
* [io.js](CHANGELOG_IOJS.md)
* [Archive](CHANGELOG_ARCHIVE.md)

<a id="13.10.1"></a>
## 2020-03-04, Version 13.10.1 (Current), @MylesBorins

### Notable Changes

In Node.js 13.9.0 deps/zlib was switched to the chromium maintained implementation. This change
had the unforseen consequence of breaking building from the tarballs we release as we were too
aggressively removing `unneccessary files` from the `deps/zlib` folder. This release includes
a patch that ensures that individuals will once again be able to build Node.js from source.

### Commits

* [[`723aa41d96`](https://github.com/nodejs/node/commit/723aa41d96)] - **build**: fix zlib tarball generation (Shelley Vohr) [#32094](https://github.com/nodejs/node/pull/32094)
* [[`9c1ac50fc5`](https://github.com/nodejs/node/commit/9c1ac50fc5)] - **build**: fix building with ninja (Richard Lau) [#32071](https://github.com/nodejs/node/pull/32071)
* [[`478450d6b3`](https://github.com/nodejs/node/commit/478450d6b3)] - **build**: add asan check in Github action (gengjiawen) [#31902](https://github.com/nodejs/node/pull/31902)
* [[`0fc45f80b5`](https://github.com/nodejs/node/commit/0fc45f80b5)] - **crypto**: simplify exportKeyingMaterial (Tobias Nießen) [#31922](https://github.com/nodejs/node/pull/31922)
* [[`4dc59b91a7`](https://github.com/nodejs/node/commit/4dc59b91a7)] - **dgram**: make UDPWrap more reusable (Anna Henningsen) [#31871](https://github.com/nodejs/node/pull/31871)
* [[`4ed720e940`](https://github.com/nodejs/node/commit/4ed720e940)] - **doc**: visibility of Worker threads cli options (Harshitha KP) [#31380](https://github.com/nodejs/node/pull/31380)
* [[`2518213a1b`](https://github.com/nodejs/node/commit/2518213a1b)] - **doc**: improve doc/markdown file organization coherence (ConorDavenport) [#31792](https://github.com/nodejs/node/pull/31792)
* [[`ba3f7ff94d`](https://github.com/nodejs/node/commit/ba3f7ff94d)] - **doc**: update stream.pipeline() signature (vsemozhetbyt) [#31789](https://github.com/nodejs/node/pull/31789)
* [[`3c8daa3aa0`](https://github.com/nodejs/node/commit/3c8daa3aa0)] - **events**: convert errorMonitor to a normal property (Gerhard Stoebich) [#31848](https://github.com/nodejs/node/pull/31848)
* [[`6b44df2415`](https://github.com/nodejs/node/commit/6b44df2415)] - **perf,src**: add HistogramBase and internal/histogram.js (James M Snell) [#31988](https://github.com/nodejs/node/pull/31988)
* [[`6a9cea9ed2`](https://github.com/nodejs/node/commit/6a9cea9ed2)] - **src**: pass resource object along with InternalMakeCallback (Anna Henningsen) [#32063](https://github.com/nodejs/node/pull/32063)
* [[`70f046010c`](https://github.com/nodejs/node/commit/70f046010c)] - **src**: start the .text section with an asm symbol (Gabriel Schulhof) [#31981](https://github.com/nodejs/node/pull/31981)
* [[`755da035ce`](https://github.com/nodejs/node/commit/755da035ce)] - **src**: add node\_crypto\_common and refactor (James M Snell) [#32016](https://github.com/nodejs/node/pull/32016)
* [[`4d5318c164`](https://github.com/nodejs/node/commit/4d5318c164)] - **src**: improve handling of internal field counting (James M Snell) [#31960](https://github.com/nodejs/node/pull/31960)
* [[`1539928ed9`](https://github.com/nodejs/node/commit/1539928ed9)] - **test**: add GC test for disabled AsyncLocalStorage (Andrey Pechkurov) [#31995](https://github.com/nodejs/node/pull/31995)
* [[`be90817558`](https://github.com/nodejs/node/commit/be90817558)] - **test**: remove common.port from test-tls-securepair-client (Rich Trott) [#32024](https://github.com/nodejs/node/pull/32024)

<a id="13.10.0"></a>
## 2020-03-04, Version 13.10.0 (Current), @codebytere

Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions doc/guides/contributing/pull-requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,13 @@ If you are modifying code, please be sure to run `make lint` from time to
time to ensure that the changes follow the Node.js code style guide.

Any documentation you write (including code comments and API documentation)
should follow the [Style Guide](../../STYLE_GUIDE.md). Code samples included
in the API docs will also be checked when running `make lint` (or
should follow the [Style Guide](../doc-style-guide.md). Code samples
included in the API docs will also be checked when running `make lint` (or
`vcbuild.bat lint` on Windows). If you are adding to or deprecating an API,
use `REPLACEME` for the version number in the documentation YAML.

For contributing C++ code, you may want to look at the
[C++ Style Guide](../../../CPP_STYLE_GUIDE.md), as well as the
[C++ Style Guide](../../cpp-style-guide.md), as well as the
[README of `src/`](../../../src/README.md) for an overview over Node.js
C++ internals.

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Updating the Root Certificates
# Maintaining the Root Certificates

Node.js contains a compiled-in set of root certificates used as trust anchors
for TLS certificate validation.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 3 additions & 1 deletion lib/dgram.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,9 @@ Socket.prototype.bind = function(port_, address_ /* , callback */) {
this.on('listening', onListening);
}

if (port instanceof UDP) {
if (port !== null &&
typeof port === 'object' &&
typeof port.recvStart === 'function') {
replaceHandle(this, port);
startListening(this);
return this;
Expand Down
7 changes: 1 addition & 6 deletions lib/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,7 @@ ObjectDefineProperty(EventEmitter, 'captureRejections', {
enumerable: true
});

ObjectDefineProperty(EventEmitter, 'errorMonitor', {
value: kErrorMonitor,
writable: false,
configurable: true,
enumerable: true
});
EventEmitter.errorMonitor = kErrorMonitor;

// The default for captureRejections is false
ObjectDefineProperty(EventEmitter.prototype, kCapture, {
Expand Down
94 changes: 94 additions & 0 deletions lib/internal/histogram.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
'use strict';

const {
customInspectSymbol: kInspect,
} = require('internal/util');

const { format } = require('util');
const { Map, Symbol } = primordials;

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

const kDestroy = Symbol('kDestroy');
const kHandle = Symbol('kHandle');

// Histograms are created internally by Node.js and used to
// record various metrics. This Histogram class provides a
// generally read-only view of the internal histogram.
class Histogram {
#handle = undefined;
#map = new Map();

constructor(internal) {
this.#handle = internal;
}

[kInspect]() {
const obj = {
min: this.min,
max: this.max,
mean: this.mean,
exceeds: this.exceeds,
stddev: this.stddev,
percentiles: this.percentiles,
};
return `Histogram ${format(obj)}`;
}

get min() {
return this.#handle ? this.#handle.min() : undefined;
}

get max() {
return this.#handle ? this.#handle.max() : undefined;
}

get mean() {
return this.#handle ? this.#handle.mean() : undefined;
}

get exceeds() {
return this.#handle ? this.#handle.exceeds() : undefined;
}

get stddev() {
return this.#handle ? this.#handle.stddev() : undefined;
}

percentile(percentile) {
if (typeof percentile !== 'number')
throw new ERR_INVALID_ARG_TYPE('percentile', 'number', percentile);

if (percentile <= 0 || percentile > 100)
throw new ERR_INVALID_ARG_VALUE.RangeError('percentile', percentile);

return this.#handle ? this.#handle.percentile(percentile) : undefined;
}

get percentiles() {
this.#map.clear();
if (this.#handle)
this.#handle.percentiles(this.#map);
return this.#map;
}

reset() {
if (this.#handle)
this.#handle.reset();
}

[kDestroy]() {
this.#handle = undefined;
}

get [kHandle]() { return this.#handle; }
}

module.exports = {
Histogram,
kDestroy,
kHandle,
};
Loading