Skip to content

Commit

Permalink
Merge branch 'master' into actions/authors-update
Browse files Browse the repository at this point in the history
  • Loading branch information
Trott authored Sep 12, 2021
2 parents 52ceb80 + 5c1adda commit f42bbe9
Show file tree
Hide file tree
Showing 1,230 changed files with 15,901 additions and 18,654 deletions.
2 changes: 2 additions & 0 deletions .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-import-assertions',
'@babel/plugin-syntax-top-level-await',
];
Module._findPath = (request, paths, isMain) => {
Expand All @@ -41,6 +42,7 @@ module.exports = {
babelOptions: {
plugins: [
Module._findPath('@babel/plugin-syntax-class-properties'),
Module._findPath('@babel/plugin-syntax-import-assertions'),
Module._findPath('@babel/plugin-syntax-top-level-await'),
],
},
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/authors.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: "authors update"
on:
schedule:
# Run once a week at 00:05 AM UTC on Sunday.
- cron: '5 0 * * 0'

workflow_dispatch:

jobs:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ env:
jobs:
build-windows:
if: github.event.pull_request.draft == false
runs-on: windows-latest
strategy:
matrix:
windows: [windows-2019, windows-2022]
fail-fast: false
runs-on: ${{ matrix.windows }}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ env.PYTHON_VERSION }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/comment-labeled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- name: Post stalled comment
env:
COMMENTS_URL: ${{ github.event.issue.comments_url || github.event.pull_request.comments_url }}
COMMENTS_URL: ${{ github.event.issue.comments_url || github.event.pull_request.comments_url }}
run: |
curl -X POST $COMMENTS_URL \
-H "Content-Type: application/json" \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Report JS
run: npx c8 report --check-coverage
env:
NODE_OPTIONS: --max-old-space-size=8192
NODE_OPTIONS: --max-old-space-size=8192
- name: Report C++
run: cd out && gcovr --gcov-exclude='.*\b(deps|usr|out|obj|cctest|embedding)\b' -v -r Release/obj.target --xml -o ../coverage/coverage-cxx.xml --root=$(cd ../ && pwd)
# Clean temporary output from gcov and c8, so that it's not uploaded:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/find-inactive-collaborators.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:

jobs:
find:

runs-on: ubuntu-latest

steps:
Expand Down
18 changes: 17 additions & 1 deletion .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,23 @@ jobs:
- name: Lint Python
run: |
make lint-py-build || true
NODE=$(command -v node) make lint-py
make lint-py
lint-yaml:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Environment Information
run: npx envinfo
- name: Lint YAML
run: |
make lint-yaml-build || true
make lint-yaml
lint-sh:
if: github.event.pull_request.draft == false
runs-on: ubuntu-20.04
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/notify-force-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ jobs:
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/${{ github.repository.default_branch }}|${{ github.repository }}@${{ github.repository.default_branch }}> by <https://github.com/${{ github.actor }}|${{ github.actor }}>
- 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/${{ github.repository.default_branch }}|${{ github.repository }}@${{ github.repository.default_branch }}> 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 }}
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 }}
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,19 @@
!deps/**/.*
!test/fixtures/**/.*
!.clang-format
!.cpplint
!.editorconfig
!.eslintignore
!.eslintrc.js
!.eslintrc.yaml
!.flake8
!.gitattributes
!.github
!.gitignore
!.gitkeep
!.mailmap
!.nycrc
!.eslintrc.yaml
!.cpplint
!.yamllint.yaml

# === Rules for root dir ===
/core
Expand Down
7 changes: 6 additions & 1 deletion .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -287,12 +287,16 @@ Micleusanu Nicu <[email protected]>
Miguel Angel Asencio Hurtado <[email protected]>
Mikael Bourges-Sevenier <[email protected]> <[email protected]>
Mike Kaufman <[email protected]> <[email protected]>
Mike MacCana <[email protected]> <[email protected]>
Minqi Pan <[email protected]>
Minuk Park <[email protected]>
Minwoo Jung <[email protected]> <[email protected]>
Minwoo Jung <[email protected]> <[email protected]>
Miroslav Bajtoš <[email protected]> <[email protected]>
Miroslav Bajtoš <[email protected]> <[email protected]>
Miroslav Bajtoš <[email protected]> <[email protected]>
Miroslav Bajtoš <[email protected]> <[email protected]>
Mitar Milutinovic <[email protected]>
Mithun Sasidharan <[email protected]> <[email protected]>
Myles Borins <[email protected]> <[email protected]>
Myles Borins <[email protected]> <[email protected]>
Myles Borins <[email protected]> <[email protected]>
Expand All @@ -301,6 +305,7 @@ Nebu Pookins <[email protected]>
Netto Farah <[email protected]>
Nicholas Kinsey <[email protected]>
Nick Soggin <[email protected]> <[email protected]>
Nigel Kibodeaux <[email protected]> <[email protected]>
Nikola Glavina <[email protected]> <[email protected]>
Nikolai Vavilov <[email protected]>
Nils Kuhnhenn <[email protected]>
Expand Down
8 changes: 8 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
extends: relaxed

rules:
line-length: disable

ignore: |
/deps/
node_modules/
10 changes: 3 additions & 7 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ Ryan Graham <[email protected]>
Kelly Gerber <[email protected]>
Ryan Doenges <[email protected]>
Sean Silva <[email protected]>
Miroslav Bajtoš <[email protected]>
Miroslav Bajtoš <[email protected]>
Olof Johansson <[email protected]>
Sam Roberts <[email protected]>
Kevin Locke <[email protected]>
Expand Down Expand Up @@ -744,7 +744,7 @@ Sakthipriyan Vairamani <[email protected]>
AQNOUCH Mohammed <[email protected]>
Ivan Kozik <[email protected]>
Oleg Elifantiev <[email protected]>
Mike MacCana <mike@certsimple.com>
Mike MacCana <mike.maccana@gmail.com>
Josh Gummersall <[email protected]>
Sam Mikes <[email protected]>
Frederic Hemberger <[email protected]>
Expand Down Expand Up @@ -1242,7 +1242,7 @@ Dan Villa <[email protected]>
CodeTheInternet <[email protected]>
Eric Gonzalez <[email protected]>
rgoodwin <[email protected]>
Nigel Kibodeaux <[email protected]>
Nigel Kibodeaux <[email protected]>
fmizzell <[email protected]>
cdnadmin <[email protected]>
Paul Lucas <[email protected]>
Expand Down Expand Up @@ -1626,7 +1626,6 @@ Pini Houri <[email protected]>
Runite618 <[email protected]>
phisixersai <[email protected]>
hsmtkk <[email protected]>
Miroslav Bajtoš <[email protected]>
Sebastian Murphy <[email protected]>
陈刚 <[email protected]>
Jon Moss <[email protected]>
Expand Down Expand Up @@ -1772,7 +1771,6 @@ Guilherme Akio Sakae <[email protected]>
Martin Michaelis <[email protected]>
Christopher Sidebottom <[email protected]>
Edward Andrew Robinson <[email protected]>
Nigel Kibodeaux <[email protected]>
Shakeel Mohamed <[email protected]>
Tobias Kieslich <[email protected]>
Ruy Adorno <[email protected]>
Expand Down Expand Up @@ -2173,7 +2171,6 @@ Beni von Cheni <[email protected]>
Ilya Sotov <[email protected]>
William Cohen <[email protected]>
Ajido <[email protected]>
Mithun Sasidharan <[email protected]>
kailash k yogeshwar <[email protected]>
Daniel Hritzkiv <[email protected]>
Mark Tiedemann <[email protected]>
Expand Down Expand Up @@ -2783,7 +2780,6 @@ Ivan Villa <[email protected]>
Caleb ツ Everett <[email protected]>
Miken <[email protected]>
Gabriela Niño <[email protected]>
Mike MacCana <[email protected]>
Tim Baverstock <[email protected]>
Walle Cyril <[email protected]>
Xu Meng <[email protected]>
Expand Down
10 changes: 7 additions & 3 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_V16.md#16.8.0">16.8.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V16.md#16.9.1">16.9.1</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V16.md#16.9.0">16.9.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V16.md#16.8.0">16.8.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V16.md#16.7.0">16.7.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V16.md#16.6.2">16.6.2</a><br/>
<a href="doc/changelogs/CHANGELOG_V16.md#16.6.1">16.6.1</a><br/>
Expand All @@ -47,7 +49,8 @@ release.
<a href="doc/changelogs/CHANGELOG_V16.md#16.0.0">16.0.0</a><br/>
</td>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V14.md#14.17.5">14.17.5</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V14.md#14.17.6">14.17.6</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.17.5">14.17.5</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.17.4">14.17.4</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.17.3">14.17.3</a><br/>
<a href="doc/changelogs/CHANGELOG_V14.md#14.17.2">14.17.2</a><br/>
Expand Down Expand Up @@ -80,7 +83,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.22.5">12.22.5</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V12.md#12.22.6">12.22.6</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V12.md#12.22.5">12.22.5</a><br/>
<a href="doc/changelogs/CHANGELOG_V12.md#12.22.4">12.22.4</a><br/>
<a href="doc/changelogs/CHANGELOG_V12.md#12.22.3">12.22.3</a><br/>
<a href="doc/changelogs/CHANGELOG_V12.md#12.22.2">12.22.2</a><br/>
Expand Down
25 changes: 22 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1389,13 +1389,13 @@ cpplint: lint-cpp

.PHONY: lint-py-build
# python -m pip install flake8
# Try with '--system' is to overcome systems that blindly set '--user'
# Try with '--system' if it fails without; the system may have set '--user'
lint-py-build:
$(info Pip installing flake8 linter on $(shell $(PYTHON) --version)...)
$(PYTHON) -m pip install --upgrade -t tools/pip/site-packages flake8 || \
$(PYTHON) -m pip install --upgrade --system -t tools/pip/site-packages flake8

ifneq ("","$(wildcard tools/pip/site-packages)")
ifneq ("","$(wildcard tools/pip/site-packages/flake8)")
.PHONY: lint-py
# Lints the Python code with flake8.
# Flag the build if there are Python syntax errors or undefined names
Expand All @@ -1407,6 +1407,24 @@ lint-py:
$(warning Run 'make lint-py-build')
endif

.PHONY: lint-yaml-build
# python -m pip install yamllint
# Try with '--system' if it fails without; the system may have set '--user'
lint-yaml-build:
$(info Pip installing yamllint on $(shell $(PYTHON) --version)...)
$(PYTHON) -m pip install --upgrade -t tools/pip/site-packages yamllint || \
$(PYTHON) -m pip install --upgrade --system -t tools/pip/site-packages yamllint

.PHONY: lint-yaml
# Lints the YAML files with yamllint.
lint-yaml:
@if [ -d "tools/pip/site-packages/yamllint" ]; then \
PYTHONPATH=tools/pip $(PYTHON) -m yamllint .; \
else \
echo 'YAML linting with yamllint is not available'; \
echo "Run 'make lint-yaml-build'"; \
fi

.PHONY: lint
.PHONY: lint-ci
ifneq ("","$(wildcard tools/node_modules/eslint/)")
Expand All @@ -1416,11 +1434,12 @@ lint: ## Run JS, C++, MD and doc linters.
$(MAKE) lint-cpp || EXIT_STATUS=$$? ; \
$(MAKE) lint-addon-docs || EXIT_STATUS=$$? ; \
$(MAKE) lint-md || EXIT_STATUS=$$? ; \
$(MAKE) lint-yaml || EXIT_STATUS=$$? ; \
exit $$EXIT_STATUS
CONFLICT_RE=^>>>>>>> [[:xdigit:]]+|^<<<<<<< [[:alpha:]]+

# Related CI job: node-test-linter
lint-ci: lint-js-ci lint-cpp lint-py lint-md lint-addon-docs
lint-ci: lint-js-ci lint-cpp lint-py lint-md lint-addon-docs lint-yaml-build lint-yaml
@if ! ( grep -IEqrs "$(CONFLICT_RE)" --exclude="error-message.js" benchmark deps doc lib src test tools ) \
&& ! ( $(FIND) . -maxdepth 1 -type f | xargs grep -IEqs "$(CONFLICT_RE)" ); then \
exit 0 ; \
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,6 @@ For information about the governance of the Node.js project, see
**Colin Ihrig** &lt;[email protected]&gt; (he/him)
* [codebytere](https://github.com/codebytere) -
**Shelley Vohr** &lt;[email protected]&gt; (she/her)
* [danbev](https://github.com/danbev) -
**Daniel Bevenius** &lt;[email protected]&gt; (he/him)
* [danielleadams](https://github.com/danielleadams) -
**Danielle Adams** &lt;[email protected]&gt; (she/her)
* [fhinkel](https://github.com/fhinkel) -
Expand Down Expand Up @@ -214,6 +212,8 @@ For information about the governance of the Node.js project, see
**Ben Noordhuis** &lt;[email protected]&gt;
* [chrisdickinson](https://github.com/chrisdickinson) -
**Chris Dickinson** &lt;[email protected]&gt;
* [danbev](https://github.com/danbev) -
**Daniel Bevenius** &lt;[email protected]&gt; (he/him)
* [evanlucas](https://github.com/evanlucas) -
**Evan Lucas** &lt;[email protected]&gt; (he/him)
* [Fishrock123](https://github.com/Fishrock123) -
Expand Down Expand Up @@ -268,6 +268,8 @@ For information about the governance of the Node.js project, see
**Anatoli Papirovski** &lt;[email protected]&gt; (he/him)
* [AshCripps](https://github.com/AshCripps) -
**Ash Cripps** &lt;[email protected]&gt;
* [Ayase-252](https://github.com/Ayase-252) -
**Qingyu Deng** &lt;[email protected]&gt;
* [bcoe](https://github.com/bcoe) -
**Ben Coe** &lt;[email protected]&gt; (he/him)
* [bengl](https://github.com/bengl) -
Expand Down
21 changes: 21 additions & 0 deletions benchmark/async_hooks/async-local-storage-run.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
'use strict';
const common = require('../common.js');
const { AsyncLocalStorage } = require('async_hooks');

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

async function run(store, n) {
for (let i = 0; i < n; i++) {
await new Promise((resolve) => store.run(i, resolve));
}
}

function main({ n }) {
const store = new AsyncLocalStorage();
bench.start();
run(store, n).then(() => {
bench.end(n);
});
}
3 changes: 2 additions & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,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.9',
'v8_embedder_string': '-node.12',

##### V8 defaults for Node.js #####

Expand Down Expand Up @@ -268,6 +268,7 @@
],
'msvs_settings': {
'VCCLCompilerTool': {
'AdditionalOptions': ['/Zc:__cplusplus'],
'BufferSecurityCheck': 'true',
'DebugInformationFormat': 1, # /Z7 embed info in .obj files
'ExceptionHandling': 0, # /EHsc
Expand Down
Loading

0 comments on commit f42bbe9

Please sign in to comment.