Skip to content

Commit

Permalink
Merge branch 'master' of github.com:nodejs/node
Browse files Browse the repository at this point in the history
  • Loading branch information
Bar Admoni committed Jan 22, 2021
2 parents be257c3 + a35b32e commit a226e5a
Show file tree
Hide file tree
Showing 1,078 changed files with 48,043 additions and 27,656 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
node_modules
lib/internal/v8_prof_polyfill.js
lib/punycode.js
test/addons/??_*
test/fixtures
Expand Down
7 changes: 6 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const hacks = [
'eslint-plugin-markdown',
'@babel/eslint-parser',
'@babel/plugin-syntax-class-properties',
'@babel/plugin-syntax-top-level-await',
];
Module._findPath = (request, paths, isMain) => {
const r = ModuleFindPath(request, paths, isMain);
Expand All @@ -41,7 +42,10 @@ module.exports = {
parser: '@babel/eslint-parser',
parserOptions: {
babelOptions: {
plugins: [Module._findPath('@babel/plugin-syntax-class-properties')],
plugins: [
Module._findPath('@babel/plugin-syntax-class-properties'),
Module._findPath('@babel/plugin-syntax-top-level-await'),
],
},
requireConfigFile: false,
sourceType: 'script',
Expand All @@ -53,6 +57,7 @@ module.exports = {
'doc/api/module.md',
'doc/api/modules.md',
'doc/api/packages.md',
'doc/api/wasi.md',
'test/es-module/test-esm-type-flag.js',
'test/es-module/test-esm-type-flag-alias.js',
'*.mjs',
Expand Down
22 changes: 8 additions & 14 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
<!--
Thank you for your pull request. Please provide a description above and review
the requirements below.
Before submitting a pull request, please read
https://github.com/nodejs/node/blob/master/CONTRIBUTING.md.
Bug fixes and new features should include tests and possibly benchmarks.
Commit message formatting guidelines:
https://github.com/nodejs/node/blob/master/doc/guides/contributing/pull-requests.md#commit-message-guidelines
Contributors guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md
-->

##### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->
For code changes:
1. Include tests for any bug fixes or new features.
2. Update documentation if relevant.
3. Ensure that `make -j4 test` (UNIX), or `vcbuild test` (Windows) passes.
- [ ] `make -j4 test` (UNIX), or `vcbuild test` (Windows) passes
- [ ] 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)

<!--
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/notify-force-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
on:
push:
branches:
- master

name: Notify on Force Push
jobs:
slackNotification:
name: Slack Notification
if: ${{ github.event.forced && github.repository == 'nodejs/node' }}
runs-on: ubuntu-latest
steps:
- name: Slack Notification
uses: rtCamp/action-slack-notify@master
env:
SLACK_COLOR: '#DE512A'
SLACK_ICON: https://github.com/nodejs.png?size=48
SLACK_TITLE: '${{ github.actor }} force-pushed to ${{ github.ref }}'
SLACK_MESSAGE: |
A commit was force-pushed to <https://github.com/${{ github.repository }}/tree/master|${{ github.repository }}@master> by <https://github.com/${{ github.actor }}|${{ github.actor }}>
Before: <https://github.com/${{ github.repository }}/commit/${{ github.event.before }}|${{ github.event.before }}>
After: <https://github.com/${{ github.repository }}/commit/${{ github.event.after }}|${{ github.event.after }}>
SLACK_USERNAME: nodejs-bot
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
13 changes: 9 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ release.
</tr>
<tr>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V15.md#15.5.0">15.5.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V15.md#15.6.0">15.6.0</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V15.md#15.5.1">15.5.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V15.md#15.5.0">15.5.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V15.md#15.4.0">15.4.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V15.md#15.3.0">15.3.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V15.md#15.2.1">15.2.1</a><br/>
Expand All @@ -42,7 +44,8 @@ release.
<a href="doc/changelogs/CHANGELOG_V15.md#15.0.0">15.0.0</a><br/>
</td>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V14.md#14.15.3">14.15.3</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V14.md#14.15.4">14.15.4</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.15.3">14.15.3</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.15.2">14.15.2</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.15.1">14.15.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.15.0">14.15.0</a><br/>
Expand All @@ -65,7 +68,8 @@ release.
<a href="doc/changelogs/CHANGELOG_V14.md#14.0.0">14.0.0</a><br/>
</td>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V12.md#12.20.0">12.20.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V12.md#12.20.1">12.20.1</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V12.md#12.20.0">12.20.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V12.md#12.19.1">12.19.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V12.md#12.19.0">12.19.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V12.md#12.18.4">12.18.4</a><br/>
Expand Down Expand Up @@ -102,7 +106,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.23.0">10.23.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V10.md#10.23.1">10.23.1</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V10.md#10.23.0">10.23.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V10.md#10.22.1">10.22.1</a><br/>
<a href="doc/changelogs/CHANGELOG_V10.md#10.22.0">10.22.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V10.md#10.21.0">10.21.0</a><br/>
Expand Down
2 changes: 0 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@ See [details on our policy on Code of Conduct](./doc/guides/contributing/code-of

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

* [How to Contribute in Issues](./doc/guides/contributing/issues.md#how-to-contribute-in-issues)
* [Asking for General Help](./doc/guides/contributing/issues.md#asking-for-general-help)
* [Discussing non-technical topics](./doc/guides/contributing/issues.md#discussing-non-technical-topics)
* [Submitting a Bug Report](./doc/guides/contributing/issues.md#submitting-a-bug-report)
* [Triaging a Bug Report](./doc/guides/contributing/issues.md#triaging-a-bug-report)
* [Resolving a Bug Report](./doc/guides/contributing/issues.md#resolving-a-bug-report)

## [Pull Requests](./doc/guides/contributing/pull-requests.md)

Expand Down
18 changes: 11 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ FLAKY_TESTS ?= run
TEST_CI_ARGS ?=
STAGINGSERVER ?= node-www
LOGLEVEL ?= silent
OSTYPE := $(shell uname -s | tr '[A-Z]' '[a-z]')
OSTYPE := $(shell uname -s | tr '[:upper:]' '[:lower:]')
COVTESTS ?= test-cov
COV_SKIP_TESTS ?= core_line_numbers.js,testFinalizer.js,test_function/test.js
GTEST_FILTER ?= "*"
Expand Down Expand Up @@ -40,7 +40,7 @@ ifeq ($(OSTYPE), darwin)
GCOV = xcrun llvm-cov gcov
endif

BUILDTYPE_LOWER := $(shell echo $(BUILDTYPE) | tr '[A-Z]' '[a-z]')
BUILDTYPE_LOWER := $(shell echo $(BUILDTYPE) | tr '[:upper:]' '[:lower:]')

# Determine EXEEXT
EXEEXT := $(shell $(PYTHON) -c \
Expand Down Expand Up @@ -85,7 +85,7 @@ endif
# To add a target to the help, add a double comment (##) on the target line.
help: ## Print help for targets with comments.
@printf "For more targets and info see the comments in the Makefile.\n\n"
@grep -E '^[a-zA-Z0-9._-]+:.*?## .*$$' Makefile | sort | \
@grep -E '^[[:alnum:]._-]+:.*?## .*$$' Makefile | sort | \
awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}'

# The .PHONY is needed to ensure that we recursively use the out/Makefile
Expand Down Expand Up @@ -243,10 +243,10 @@ coverage-test: coverage-build
--gcov-exclude='.*\b(deps|usr|out|cctest|embedding)\b' -v \
-r Release/obj.target --html --html-detail -o ../coverage/cxxcoverage.html \
--gcov-executable="$(GCOV)")
@echo -n "Javascript coverage %: "
@printf "Javascript coverage %%: "
@grep -B1 Lines coverage/index.html | head -n1 \
| sed 's/<[^>]*>//g'| sed 's/ //g'
@echo -n "C++ coverage %: "
@printf "C++ coverage %%: "
@grep -A3 Lines coverage/cxxcoverage.html | grep style \
| sed 's/<[^>]*>//g'| sed 's/ //g'

Expand Down Expand Up @@ -696,7 +696,7 @@ doc-only: tools/doc/node_modules \
@if [ "$(shell $(node_use_openssl))" != "true" ]; then \
echo "Skipping doc-only (no crypto)"; \
else \
$(MAKE) out/doc/api/all.html out/doc/api/all.json; \
$(MAKE) out/doc/api/all.html out/doc/api/all.json out/doc/api/stability; \
fi

.PHONY: doc
Expand Down Expand Up @@ -749,6 +749,10 @@ out/doc/api/all.html: $(apidocs_html) tools/doc/allhtml.js \
out/doc/api/all.json: $(apidocs_json) tools/doc/alljson.js | out/doc/api
$(call available-node, tools/doc/alljson.js)

.PHONY: out/doc/api/stability
out/doc/api/stability: out/doc/api/all.json tools/doc/stability.js | out/doc/api
$(call available-node, tools/doc/stability.js)

.PHONY: docopen
docopen: out/doc/api/all.html
@$(PYTHON) -mwebbrowser file://$(abspath $<)
Expand Down Expand Up @@ -1360,7 +1364,7 @@ lint: ## Run JS, C++, MD and doc linters.
$(MAKE) lint-addon-docs || EXIT_STATUS=$$? ; \
$(MAKE) lint-md || EXIT_STATUS=$$? ; \
exit $$EXIT_STATUS
CONFLICT_RE=^>>>>>>> [0-9A-Fa-f]+|^<<<<<<< [A-Za-z]+
CONFLICT_RE=^>>>>>>> [[:xdigit:]]+|^<<<<<<< [[:alpha:]]+

# Related CI job: node-test-linter
lint-ci: lint-js-ci lint-cpp lint-py lint-md lint-addon-docs
Expand Down
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,8 @@ For information about the governance of the Node.js project, see
**David Carlier** &lt;[email protected]&gt;
* [devsnek](https://github.com/devsnek) -
**Gus Caplan** &lt;[email protected]&gt; (they/them)
* [dnlup](https://github.com/dnlup)
**Daniele Belardi** &lt;[email protected]&gt; (he/him)
* [edsadr](https://github.com/edsadr) -
**Adrian Estrada** &lt;[email protected]&gt; (he/him)
* [eugeneo](https://github.com/eugeneo) -
Expand Down Expand Up @@ -323,6 +325,8 @@ For information about the governance of the Node.js project, see
**Zeyu Yang** &lt;[email protected]&gt; (he/him)
* [hiroppy](https://github.com/hiroppy) -
**Yuta Hiroto** &lt;[email protected]&gt; (he/him)
* [iansu](https://github.com/iansu) -
**Ian Sutherland** &lt;[email protected]&gt;
* [indutny](https://github.com/indutny) -
**Fedor Indutny** &lt;[email protected]&gt;
* [JacksonTian](https://github.com/JacksonTian) -
Expand Down Expand Up @@ -357,6 +361,8 @@ For information about the governance of the Node.js project, see
**Matteo Collina** &lt;[email protected]&gt; (he/him)
* [mhdawson](https://github.com/mhdawson) -
**Michael Dawson** &lt;[email protected]&gt; (he/him)
* [miladfarca](https://github.com/miladfarca) -
**Milad Fa** &lt;[email protected]&gt; (he/him)
* [mildsunrise](https://github.com/mildsunrise) -
**Alba Mendez** &lt;[email protected]&gt; (she/her)
* [misterdjules](https://github.com/misterdjules) -
Expand All @@ -371,6 +377,8 @@ For information about the governance of the Node.js project, see
**Ali Ijaz Sheikh** &lt;[email protected]&gt; (he/him)
* [oyyd](https://github.com/oyyd) -
**Ouyang Yadong** &lt;[email protected]&gt; (he/him)
* [panva](https://github.com/panva) -
**Filip Skokan** &lt;[email protected]&gt;
* [PoojaDurgad](https://github.com/PoojaDurgad) -
**Pooja D P** &lt;[email protected]&gt; (she/her)
* [psmarshall](https://github.com/psmarshall) -
Expand All @@ -379,6 +387,8 @@ For information about the governance of the Node.js project, see
**Andrey Pechkurov** &lt;[email protected]&gt; (he/him)
* [Qard](https://github.com/Qard) -
**Stephen Belanger** &lt;[email protected]&gt; (he/him)
* [RaisinTen](https://github.com/RaisinTen) -
**Darshan Sen** &lt;[email protected]&gt; (he/him)
* [refack](https://github.com/refack) -
**Refael Ackermann (רפאל פלחי)** &lt;[email protected]&gt; (he/him/הוא/אתה)
* [rexagod](https://github.com/rexagod) -
Expand Down Expand Up @@ -591,7 +601,7 @@ Primary GPG keys for Node.js Releasers (some Releasers sign with subkeys):
* **Colin Ihrig** &lt;[email protected]&gt;
`94AE36675C464D64BAFA68DD7434390BDBE9B9C5`
* **Danielle Adams** &lt;[email protected]&gt;
`1C050899334244A8AF75E53792EF661D867B9DFA`
`74F12602B6F1C4E913FAA37AD3A89613643B6201`
* **James M Snell** &lt;[email protected]&gt;
`71DCFD284A79C3B38668286BC97EC7A07EDE3FC1`
* **Michaël Zasso** &lt;[email protected]&gt;
Expand All @@ -615,7 +625,7 @@ to sign releases):
```bash
gpg --keyserver pool.sks-keyservers.net --recv-keys 4ED778F539E3634C779C87C6D7062848A1AB005C
gpg --keyserver pool.sks-keyservers.net --recv-keys 94AE36675C464D64BAFA68DD7434390BDBE9B9C5
gpg --keyserver pool.sks-keyservers.net --recv-keys 1C050899334244A8AF75E53792EF661D867B9DFA
gpg --keyserver pool.sks-keyservers.net --recv-keys 74F12602B6F1C4E913FAA37AD3A89613643B6201
gpg --keyserver pool.sks-keyservers.net --recv-keys 71DCFD284A79C3B38668286BC97EC7A07EDE3FC1
gpg --keyserver pool.sks-keyservers.net --recv-keys 8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600
gpg --keyserver pool.sks-keyservers.net --recv-keys C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8
Expand All @@ -633,6 +643,8 @@ Other keys used to sign some previous releases:

* **Chris Dickinson** &lt;[email protected]&gt;
`9554F04D7259F04124DE6B476D5A82AC7E37093B`
* **Danielle Adams** &lt;[email protected]&gt;
`1C050899334244A8AF75E53792EF661D867B9DFA`
* **Evan Lucas** &lt;[email protected]&gt;
`B9AE9905FFD7803F25714661B63B535A4C206CA9`
* **Gibson Fahnestock** &lt;[email protected]&gt;
Expand Down
2 changes: 1 addition & 1 deletion benchmark/_test-double-benchmarker.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function run() {
}
} else { // HTTP/2
const client = http.connect(url);
client.on('error', (e) => { throw e; });
client.on('error', () => {});
request(client.request(), client);
}
}
Expand Down
17 changes: 17 additions & 0 deletions benchmark/crypto/randomUUID.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
'use strict';

const common = require('../common.js');
const { randomUUID } = require('crypto');

const bench = common.createBenchmark(main, {
n: [1e7],
disableEntropyCache: [0, 1],
});

function main({ n, disableEntropyCache }) {
disableEntropyCache = !!disableEntropyCache;
bench.start();
for (let i = 0; i < n; ++i)
randomUUID({ disableEntropyCache });
bench.end(n);
}
2 changes: 1 addition & 1 deletion benchmark/http/headers.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const common = require('../common.js');
const http = require('http');

const bench = common.createBenchmark(main, {
n: [10, 1000],
n: [10, 600],
len: [1, 100],
duration: 5
});
Expand Down
3 changes: 2 additions & 1 deletion benchmark/http2/compat.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ function main({ requests, streams, clients, duration }) {
res.destroy();
});
});
server.listen(common.PORT, () => {
server.listen(0, () => {
bench.http({
path: '/',
port: server.address().port,
requests,
maxConcurrentStreams: streams,
clients,
Expand Down
5 changes: 2 additions & 3 deletions benchmark/http2/headers.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

const common = require('../common.js');
const PORT = common.PORT;

const bench = common.createBenchmark(main, {
n: [1e3],
Expand Down Expand Up @@ -32,8 +31,8 @@ function main({ n, nheaders }) {
stream.respond();
stream.end('Hi!');
});
server.listen(PORT, () => {
const client = http2.connect(`http://localhost:${PORT}/`, {
server.listen(0, () => {
const client = http2.connect(`http://localhost:${server.address().port}/`, {
maxHeaderListPairs: 20000
});

Expand Down
3 changes: 2 additions & 1 deletion benchmark/http2/respond-with-fd.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ function main({ requests, streams, clients, duration }) {
stream.respondWithFD(fd);
stream.on('error', (err) => {});
});
server.listen(common.PORT, () => {
server.listen(0, () => {
bench.http({
path: '/',
requests,
port: server.address().port,
maxConcurrentStreams: streams,
clients,
duration,
Expand Down
3 changes: 2 additions & 1 deletion benchmark/http2/simple.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ function main({ requests, streams, clients, duration }) {
out.pipe(stream);
stream.on('error', (err) => {});
});
server.listen(common.PORT, () => {
server.listen(0, () => {
bench.http({
path: '/',
port: server.address().port,
requests,
maxConcurrentStreams: streams,
clients,
Expand Down
3 changes: 2 additions & 1 deletion benchmark/http2/write.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ function main({ streams, length, size, duration }) {
}
write();
});
server.listen(common.PORT, () => {
server.listen(0, () => {
bench.http({
path: '/',
port: server.address().port,
requests: 10000,
duration,
maxConcurrentStreams: streams,
Expand Down
1 change: 0 additions & 1 deletion benchmark/url/legacy-vs-whatwg-url-searchparams-parse.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict';
const common = require('../common.js');
const { URLSearchParams } = require('url');
const querystring = require('querystring');
const searchParams = common.searchParams;

Expand Down
Loading

0 comments on commit a226e5a

Please sign in to comment.