diff --git a/.editorconfig b/.editorconfig
index 4a6b8a6375311b..3a416e87aba4db 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -7,6 +7,7 @@ indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
+quote_type = single
[vcbuild.bat]
end_of_line = crlf
diff --git a/.github/workflows/auto-start-ci.yml b/.github/workflows/auto-start-ci.yml
index 6ca3392720562d..04a620249f0225 100644
--- a/.github/workflows/auto-start-ci.yml
+++ b/.github/workflows/auto-start-ci.yml
@@ -9,6 +9,9 @@ on:
# ./doc/guides/commit-queue.md
- cron: "*/5 * * * *"
+env:
+ NODE_VERSION: 14.x
+
jobs:
startCI:
if: github.repository == 'nodejs/node'
@@ -17,19 +20,17 @@ jobs:
- uses: actions/checkout@v2
# Install dependencies
- - name: Install jq
- run: sudo apt-get install jq -y
- name: Install Node.js
uses: actions/setup-node@v2-beta
with:
- node-version: '12'
+ node-version: ${{ env.NODE_VERSION }}
- name: Install node-core-utils
run: npm install -g node-core-utils
- name: Set variables
run: |
- echo "::set-env name=REPOSITORY::$(echo ${{ github.repository }} | cut -d/ -f2)"
- echo "::set-env name=OWNER::${{ github.repository_owner }}"
+ echo "REPOSITORY=$(echo ${{ github.repository }} | cut -d/ -f2)" >> $GITHUB_ENV
+ echo "OWNER=${{ github.repository_owner }}" >> $GITHUB_ENV
# Get Pull Requests
- name: Get Pull Requests
diff --git a/.github/workflows/build-tarball.yml b/.github/workflows/build-tarball.yml
index 81f121e2cf2ee0..7e91c8fd007284 100644
--- a/.github/workflows/build-tarball.yml
+++ b/.github/workflows/build-tarball.yml
@@ -57,7 +57,7 @@ jobs:
- name: Extract tarball
run: |
tar xzf tarballs/*.tar.gz
- echo "::set-env name=TAR_DIR::`basename tarballs/*.tar.gz .tar.gz`"
+ echo "TAR_DIR=`basename tarballs/*.tar.gz .tar.gz`" >> $GITHUB_ENV
- name: Copy directories needed for testing
run: |
cp -r tools/node_modules $TAR_DIR/tools
diff --git a/.github/workflows/commit-queue.yml b/.github/workflows/commit-queue.yml
index cca9564f6c873b..5b36a358c61533 100644
--- a/.github/workflows/commit-queue.yml
+++ b/.github/workflows/commit-queue.yml
@@ -14,6 +14,9 @@ on:
schedule:
- cron: "*/5 * * * *"
+env:
+ NODE_VERSION: 14.x
+
jobs:
commitQueue:
if: github.repository == 'nodejs/node'
@@ -34,16 +37,14 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v2-beta
with:
- node-version: '12'
- - name: Install dependencies
- run: |
- sudo apt-get install jq -y
- npm install -g node-core-utils@latest
+ node-version: ${{ env.NODE_VERSION }}
+ - name: Install node-core-utils
+ run: npm install -g node-core-utils@latest
- name: Set variables
run: |
- echo "::set-env name=REPOSITORY::$(echo ${{ github.repository }} | cut -d/ -f2)"
- echo "::set-env name=OWNER::${{ github.repository_owner }}"
+ echo "REPOSITORY=$(echo ${{ github.repository }} | cut -d/ -f2)" >> $GITHUB_ENV
+ echo "OWNER=${{ github.repository_owner }}" >> $GITHUB_ENV
- name: Get Pull Requests
uses: octokit/graphql-action@v2.x
diff --git a/.github/workflows/license-builder.yml b/.github/workflows/license-builder.yml
new file mode 100644
index 00000000000000..714aeb1c1499d5
--- /dev/null
+++ b/.github/workflows/license-builder.yml
@@ -0,0 +1,22 @@
+name: license update
+on:
+ schedule:
+ # 00:00:00 every Monday
+ # https://crontab.guru/#0_0_*_*_1
+ - cron: "0 0 * * 1"
+ workflow_dispatch:
+
+jobs:
+ update_routes:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - run: "./tools/license-builder.sh" # run the license builder tool
+ - uses: gr2m/create-or-update-pull-request-action@v1.x # create a PR or update the Action's existing PR
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ title: "doc: run license-builder"
+ body: "License is likely out of date. This is an automatically generated PR by the `license-builder.yml` GitHub Action, which runs `license-builder.sh` and submits a new PR or updates an existing PR."
+ commit-message: 'doc: run license-builder'
+ labels: meta
diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml
index 573057742ce70b..14aed9bfddfdc3 100644
--- a/.github/workflows/linters.yml
+++ b/.github/workflows/linters.yml
@@ -10,7 +10,7 @@ on:
env:
PYTHON_VERSION: 3.9
- NODE_VERSION: 10.x
+ NODE_VERSION: 14.x
jobs:
lint-addon-docs:
@@ -24,7 +24,7 @@ jobs:
- name: Environment Information
run: npx envinfo
- name: Lint addon docs
- run: NODE=$(which node) make lint-addon-docs
+ run: NODE=$(command -v node) make lint-addon-docs
lint-cpp:
runs-on: ubuntu-latest
steps:
@@ -50,7 +50,7 @@ jobs:
- name: Lint docs
run: |
echo "::add-matcher::.github/workflows/remark-lint-problem-matcher.json"
- NODE=$(which node) make lint-md
+ NODE=$(command -v node) make lint-md
lint-js:
runs-on: ubuntu-latest
steps:
@@ -62,7 +62,7 @@ jobs:
- name: Environment Information
run: npx envinfo
- name: Lint JavaScript files
- run: NODE=$(which node) make lint-js
+ run: NODE=$(command -v node) make lint-js
lint-py:
runs-on: ubuntu-latest
steps:
@@ -76,7 +76,7 @@ jobs:
- name: Lint Python
run: |
make lint-py-build || true
- NODE=$(which node) make lint-py
+ NODE=$(command -v node) make lint-py
lint-codeowners:
runs-on: ubuntu-latest
diff --git a/.github/workflows/misc.yml b/.github/workflows/misc.yml
index df33822770523b..1444dff7262819 100644
--- a/.github/workflows/misc.yml
+++ b/.github/workflows/misc.yml
@@ -9,7 +9,7 @@ on:
- v[0-9]+.x
env:
- NODE_VERSION: 12.x
+ NODE_VERSION: 14.x
jobs:
build-docs:
@@ -23,7 +23,7 @@ jobs:
- name: Environment Information
run: npx envinfo
- name: Build
- run: NODE=$(which node) make doc-only
+ run: NODE=$(command -v node) make doc-only
- uses: actions/upload-artifact@v1
with:
name: docs
diff --git a/.github/workflows/test-macos.yml b/.github/workflows/test-macos.yml
index f12de4c5994f88..98a16c88699afa 100644
--- a/.github/workflows/test-macos.yml
+++ b/.github/workflows/test-macos.yml
@@ -25,6 +25,6 @@ jobs:
- name: Environment Information
run: npx envinfo
- name: Build
- run: make build-ci -j8 V=1 CONFIG_FLAGS="--error-on-warn"
+ run: make build-ci -j2 V=1 CONFIG_FLAGS="--error-on-warn"
- name: Test
- run: make run-ci -j8 V=1 TEST_CI_ARGS="-p dots"
+ run: make run-ci -j2 V=1 TEST_CI_ARGS="-p dots"
diff --git a/BSDmakefile b/BSDmakefile
index b2f36fa28720f1..3994ab9efd9a4d 100644
--- a/BSDmakefile
+++ b/BSDmakefile
@@ -3,7 +3,7 @@ FLAGS=${.MAKEFLAGS:C/\-J ([0-9]+,?)+//W}
all: .DEFAULT
.DEFAULT:
- @which gmake > /dev/null 2>&1 ||\
+ @command -v gmake > /dev/null 2>&1 ||\
(echo "GMake is required for node.js to build.\
Install and try again" && exit 1)
@gmake ${.FLAGS} ${.TARGETS}
diff --git a/BUILDING.md b/BUILDING.md
index 17ce593a9dc8bb..8e8f32fff6a064 100644
--- a/BUILDING.md
+++ b/BUILDING.md
@@ -24,6 +24,7 @@ file a new issue.
* [Unix prerequisites](#unix-prerequisites)
* [macOS prerequisites](#macos-prerequisites)
* [Building Node.js](#building-nodejs-1)
+ * [Installing Node.js](#installing-nodejs)
* [Running Tests](#running-tests)
* [Running Coverage](#running-coverage)
* [Building the documentation](#building-the-documentation)
@@ -166,16 +167,16 @@ Depending on the host platform, the selection of toolchains may vary.
Binaries at are produced on:
-| Binary package | Platform and Toolchain |
-| --------------------- | ------------------------------------------------------------------------ |
-| aix-ppc64 | AIX 7.1 TL05 on PPC64BE with GCC 6 |
-| darwin-x64 (and .pkg) | macOS 10.15, Xcode Command Line Tools 11 with -mmacosx-version-min=10.13 |
-| linux-arm64 | CentOS 7 with devtoolset-8 / GCC 8 [8](#fn8) |
-| linux-armv7l | Cross-compiled on Ubuntu 18.04 x64 with [custom GCC toolchain](https://github.com/rvagg/rpi-newer-crosstools) |
-| linux-ppc64le | CentOS 7 with devtoolset-8 / GCC 8 [8](#fn8) |
-| linux-s390x | RHEL 7 with devtoolset-8 / GCC 8 [8](#fn8) |
-| linux-x64 | CentOS 7 with devtoolset-8 / GCC 8 [8](#fn8) |
-| win-x64 and win-x86 | Windows 2012 R2 (x64) with Visual Studio 2019 |
+| Binary package | Platform and Toolchain |
+| --------------------- | ------------------------------------------------------------------------------------------------------------- |
+| aix-ppc64 | AIX 7.1 TL05 on PPC64BE with GCC 6 |
+| darwin-x64 (and .pkg) | macOS 10.15, Xcode Command Line Tools 11 with -mmacosx-version-min=10.13 |
+| linux-arm64 | CentOS 7 with devtoolset-8 / GCC 8 [8](#fn8) |
+| linux-armv7l | Cross-compiled on Ubuntu 18.04 x64 with [custom GCC toolchain](https://github.com/rvagg/rpi-newer-crosstools) |
+| linux-ppc64le | CentOS 7 with devtoolset-8 / GCC 8 [8](#fn8) |
+| linux-s390x | RHEL 7 with devtoolset-8 / GCC 8 [8](#fn8) |
+| linux-x64 | CentOS 7 with devtoolset-8 / GCC 8 [8](#fn8) |
+| win-x64 and win-x86 | Windows 2012 R2 (x64) with Visual Studio 2019 |
8: The Enterprise Linux devtoolset-8 allows us to compile
binaries with GCC 8 but linked to the glibc and libstdc++ versions of the host
@@ -299,6 +300,14 @@ project's root directory.
$ sudo ./tools/macos-firewall.sh
```
+#### Installing Node.js
+
+To install this version of Node.js into a system directory:
+
+```bash
+[sudo] make install
+```
+
#### Running Tests
To verify the build:
@@ -458,12 +467,6 @@ To test if Node.js was built correctly:
./node -e "console.log('Hello from Node.js ' + process.version)"
```
-To install this version of Node.js into a system directory:
-
-```bash
-[sudo] make install
-```
-
#### Building a debug build
If you run into an issue where the information provided by the JS stack trace
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 12ca5b9be08e74..87c9df77b4c80d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -30,7 +30,8 @@ release.
-14.15.1
+14.15.2
+14.15.1
14.15.0
14.14.0
14.13.1
diff --git a/LICENSE b/LICENSE
index 50e6bf6344b0e2..cedae41d607e2f 100644
--- a/LICENSE
+++ b/LICENSE
@@ -53,6 +53,8 @@ The externally maintained libraries used by Node.js are:
- Acorn, located at deps/acorn, is licensed as follows:
"""
+ MIT License
+
Copyright (C) 2012-2018 by various contributors (see AUTHORS)
Permission is hereby granted, free of charge, to any person obtaining a copy
diff --git a/Makefile b/Makefile
index 7d4ecf2ce382b1..93d63110ae2e39 100644
--- a/Makefile
+++ b/Makefile
@@ -65,8 +65,8 @@ V ?= 0
available-node = \
if [ -x $(PWD)/$(NODE) ] && [ -e $(PWD)/$(NODE) ]; then \
$(PWD)/$(NODE) $(1); \
- elif [ -x `which node` ] && [ -e `which node` ] && [ `which node` ]; then \
- `which node` $(1); \
+ elif [ -x `command -v node` ] && [ -e `command -v node` ] && [ `command -v node` ]; then \
+ `command -v node` $(1); \
else \
echo "No available node, cannot run \"node $(1)\""; \
exit 1; \
@@ -123,7 +123,7 @@ $(NODE_G_EXE): config.gypi out/Debug/build.ninja
if [ ! -r $@ -o ! -L $@ ]; then ln -fs out/Debug/$(NODE_EXE) $@; fi
else
$(NODE_EXE) $(NODE_G_EXE):
- echo This Makefile currently only supports building with 'make' or 'ninja'
+ $(warning This Makefile currently only supports building with 'make' or 'ninja')
endif
endif
@@ -133,12 +133,9 @@ CONFIG_FLAGS += --debug
endif
.PHONY: with-code-cache
-with-code-cache:
- echo "'with-code-cache' target is a noop"
-
.PHONY: test-code-cache
-test-code-cache: with-code-cache
- echo "'test-code-cache' target is a noop"
+with-code-cache test-code-cache:
+ $(warning '$@' target is a noop)
out/Makefile: config.gypi common.gypi node.gyp \
deps/uv/uv.gyp deps/llhttp/llhttp.gyp deps/zlib/zlib.gyp \
@@ -468,7 +465,7 @@ benchmark/napi/.buildstamp: $(ADDONS_PREREQS) \
.PHONY: clear-stalled
clear-stalled:
- @echo "Clean up any leftover processes but don't error if found."
+ $(info Clean up any leftover processes but don't error if found.)
ps awwx | grep Release/node | grep -v grep | cat
@PS_OUT=`ps awwx | grep Release/node | grep -v grep | awk '{print $$1}'`; \
if [ "$${PS_OUT}" ]; then \
@@ -519,7 +516,7 @@ test-ci-js: | clear-stalled
$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \
--mode=$(BUILDTYPE_LOWER) --flaky-tests=$(FLAKY_TESTS) \
$(TEST_CI_ARGS) $(CI_JS_SUITES)
- @echo "Clean up any leftover processes, error if found."
+ $(info Clean up any leftover processes, error if found.)
ps awwx | grep Release/node | grep -v grep | cat
@PS_OUT=`ps awwx | grep Release/node | grep -v grep | awk '{print $$1}'`; \
if [ "$${PS_OUT}" ]; then \
@@ -535,7 +532,7 @@ test-ci: | clear-stalled bench-addons-build build-addons build-js-native-api-tes
--mode=$(BUILDTYPE_LOWER) --flaky-tests=$(FLAKY_TESTS) \
$(TEST_CI_ARGS) $(CI_JS_SUITES) $(CI_NATIVE_SUITES) $(CI_DOC)
out/Release/embedtest 'require("./test/embedding/test-embedding.js")'
- @echo "Clean up any leftover processes, error if found."
+ $(info Clean up any leftover processes, error if found.)
ps awwx | grep Release/node | grep -v grep | cat
@PS_OUT=`ps awwx | grep Release/node | grep -v grep | awk '{print $$1}'`; \
if [ "$${PS_OUT}" ]; then \
@@ -599,7 +596,7 @@ test-hash-seed: all
$(NODE) test/pummel/test-hash-seed.js
.PHONY: test-doc
-test-doc: doc-only lint ## Builds, lints, and verifies the docs.
+test-doc: doc-only lint-md ## Builds, lints, and verifies the docs.
@if [ "$(shell $(node_use_openssl))" != "true" ]; then \
echo "Skipping test-doc (no crypto)"; \
else \
@@ -672,7 +669,7 @@ test-v8: v8 ## Runs the V8 test suite on deps/v8.
--mode=$(BUILDTYPE_LOWER) $(V8_TEST_OPTIONS) \
mjsunit cctest debugger inspector message preparser \
$(TAP_V8)
- @echo Testing hash seed
+ $(info Testing hash seed)
$(MAKE) test-hash-seed
test-v8-intl: v8
@@ -692,9 +689,8 @@ test-v8-all: test-v8 test-v8-intl test-v8-benchmarks test-v8-updates
# runs all v8 tests
else
test-v8 test-v8-intl test-v8-benchmarks test-v8-all:
- @echo "Testing v8 is not available through the source tarball."
- @echo "Use the git repo instead:" \
- "$ git clone https://github.com/nodejs/node.git"
+ $(warning Testing V8 is not available through the source tarball.)
+ $(warning Use the git repo instead: $$ git clone https://github.com/nodejs/node.git)
endif
apidoc_dirs = out/doc out/doc/api out/doc/api/assets
@@ -919,7 +915,7 @@ BINARYNAME=$(TARNAME)-$(PLATFORM)-$(ARCH)
endif
BINARYTAR=$(BINARYNAME).tar
# OSX doesn't have xz installed by default, http://macpkg.sourceforge.net/
-HAS_XZ ?= $(shell which xz > /dev/null 2>&1; [ $$? -eq 0 ] && echo 1 || echo 0)
+HAS_XZ ?= $(shell command -v xz > /dev/null 2>&1; [ $$? -eq 0 ] && echo 1 || echo 0)
# Supply SKIP_XZ=1 to explicitly skip .tar.xz creation
SKIP_XZ ?= 0
XZ = $(shell [ $(HAS_XZ) -eq 1 -a $(SKIP_XZ) -eq 0 ] && echo 1 || echo 0)
@@ -929,14 +925,13 @@ MACOSOUTDIR=out/macos
ifeq ($(SKIP_XZ), 1)
check-xz:
- @echo "SKIP_XZ=1 supplied, skipping .tar.xz creation"
+ $(info SKIP_XZ=1 supplied, skipping .tar.xz creation)
else
ifeq ($(HAS_XZ), 1)
check-xz:
else
check-xz:
- @echo "No xz command, cannot continue"
- @exit 1
+ $(error No xz command, cannot continue)
endif
endif
@@ -1169,12 +1164,9 @@ ifeq ($(XZ), 1)
endif
.PHONY: bench-all
-bench-all: bench-addons-build
- @echo "Please use benchmark/run.js or benchmark/compare.js to run the benchmarks."
-
.PHONY: bench
-bench: bench-addons-build
- @echo "Please use benchmark/run.js or benchmark/compare.js to run the benchmarks."
+bench bench-all: bench-addons-build
+ $(warning Please use benchmark/run.js or benchmark/compare.js to run the benchmarks.)
# Build required addons for benchmark before running it.
.PHONY: bench-addons-build
@@ -1198,7 +1190,7 @@ lint-md-clean:
.PHONY: lint-md-build
lint-md-build:
- $(warning "Deprecated no-op target 'lint-md-build'")
+ $(warning Deprecated no-op target 'lint-md-build')
ifeq ("$(wildcard tools/.mdlintstamp)","")
LINT_MD_NEWER =
@@ -1213,19 +1205,19 @@ LINT_MD_FILES = $(shell $(FIND) $(LINT_MD_TARGETS) -type f \
run-lint-md = tools/lint-md.js -q -f --no-stdout $(LINT_MD_FILES)
# Lint all changed markdown files maintained by us
tools/.mdlintstamp: $(LINT_MD_FILES)
- @echo "Running Markdown linter..."
+ $(info Running Markdown linter...)
@$(call available-node,$(run-lint-md))
@touch $@
.PHONY: lint-md
# Lints the markdown documents maintained by us in the codebase.
-lint-md: | tools/.mdlintstamp
+lint-md: lint-js-doc | tools/.mdlintstamp
LINT_JS_TARGETS = .eslintrc.js benchmark doc lib test tools
run-lint-js = tools/node_modules/eslint/bin/eslint.js --cache \
- --report-unused-disable-directives --ext=.js,.mjs,.md $(LINT_JS_TARGETS)
+ --report-unused-disable-directives --ext=$(EXTENSIONS) $(LINT_JS_TARGETS)
run-lint-js-fix = $(run-lint-js) --fix
.PHONY: lint-js-fix
@@ -1233,9 +1225,12 @@ lint-js-fix:
@$(call available-node,$(run-lint-js-fix))
.PHONY: lint-js
+.PHONY: lint-js-doc
# Note that on the CI `lint-js-ci` is run instead.
# Lints the JavaScript code with eslint.
-lint-js:
+lint-js lint-js-fix: EXTENSIONS=.js,.mjs,.md
+lint-js-doc: EXTENSIONS=.md
+lint-js lint-js-doc:
@if [ "$(shell $(node_use_openssl))" != "true" ]; then \
echo "Skipping $@ (no crypto)"; \
else \
@@ -1244,7 +1239,7 @@ lint-js:
fi
jslint: lint-js
- @echo "Please use lint-js instead of jslint"
+ $(warning Please use lint-js instead of jslint)
run-lint-js-ci = tools/node_modules/eslint/bin/eslint.js \
--report-unused-disable-directives --ext=.js,.mjs,.md -f tap \
@@ -1253,11 +1248,11 @@ run-lint-js-ci = tools/node_modules/eslint/bin/eslint.js \
.PHONY: lint-js-ci
# On the CI the output is emitted in the TAP format.
lint-js-ci:
- @echo "Running JS linter..."
+ $(info Running JS linter...)
@$(call available-node,$(run-lint-js-ci))
jslint-ci: lint-js-ci
- @echo "Please use lint-js-ci instead of jslint-ci"
+ $(warning Please use lint-js-ci instead of jslint-ci)
LINT_CPP_ADDON_DOC_FILES_GLOB = test/addons/??_*/*.cc test/addons/??_*/*.h
LINT_CPP_ADDON_DOC_FILES = $(wildcard $(LINT_CPP_ADDON_DOC_FILES_GLOB))
@@ -1314,15 +1309,15 @@ CLANG_FORMAT_START ?= HEAD
# $ CLANG_FORMAT_START=master make format-cpp
format-cpp: ## Format C++ diff from $CLANG_FORMAT_START to current changes
ifneq ("","$(wildcard tools/clang-format/node_modules/)")
- @echo "Formatting C++ diff from $(CLANG_FORMAT_START).."
+ $(info Formatting C++ diff from $(CLANG_FORMAT_START)..)
@$(PYTHON) tools/clang-format/node_modules/.bin/git-clang-format \
--binary=tools/clang-format/node_modules/.bin/clang-format \
--style=file \
$(CLANG_FORMAT_START) -- \
$(LINT_CPP_FILES)
else
- @echo "clang-format is not installed."
- @echo "To install (requires internet access) run: $ make format-cpp-build"
+ $(info clang-format is not installed.)
+ $(info To install (requires internet access) run: $$ make format-cpp-build)
endif
ifeq ($(V),1)
@@ -1335,7 +1330,7 @@ endif
lint-cpp: tools/.cpplintstamp
tools/.cpplintstamp: $(LINT_CPP_FILES)
- @echo "Running C++ linter..."
+ $(info Running C++ linter...)
@$(PYTHON) tools/cpplint.py $(CPPLINT_QUIET) $?
@$(PYTHON) tools/checkimports.py $?
@touch $@
@@ -1344,19 +1339,19 @@ tools/.cpplintstamp: $(LINT_CPP_FILES)
lint-addon-docs: tools/.doclintstamp
tools/.doclintstamp: test/addons/.docbuildstamp
- @echo "Running C++ linter on addon docs..."
+ $(info Running C++ linter on addon docs...)
@$(PYTHON) tools/cpplint.py $(CPPLINT_QUIET) --filter=$(ADDON_DOC_LINT_FLAGS) \
$(LINT_CPP_ADDON_DOC_FILES_GLOB)
@touch $@
cpplint: lint-cpp
- @echo "Please use lint-cpp instead of cpplint"
+ $(warning Please use lint-cpp instead of cpplint)
.PHONY: lint-py-build
# python -m pip install flake8
# Try with '--system' is to overcome systems that blindly set '--user'
lint-py-build:
- @echo "Pip installing flake8 linter on $(shell $(PYTHON) --version)..."
+ $(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
@@ -1368,8 +1363,8 @@ lint-py:
PYTHONPATH=tools/pip $(PYTHON) -m flake8 --count --show-source --statistics .
else
lint-py:
- @echo "Python linting with flake8 is not avalible"
- @echo "Run 'make lint-py-build'"
+ $(warning Python linting with flake8 is not avalible)
+ $(warning Run 'make lint-py-build')
endif
.PHONY: lint
@@ -1395,12 +1390,9 @@ lint-ci: lint-js-ci lint-cpp lint-py lint-md lint-addon-docs
exit 1 ; \
fi
else
-lint:
- @echo "Linting is not available through the source tarball."
- @echo "Use the git repo instead:" \
- "$ git clone https://github.com/nodejs/node.git"
-
-lint-ci: lint
+lint lint-ci:
+ $(info Linting is not available through the source tarball.)
+ $(info Use the git repo instead: $$ git clone https://github.com/nodejs/node.git)
endif
.PHONY: lint-clean
@@ -1408,7 +1400,7 @@ lint-clean:
$(RM) tools/.*lintstamp
$(RM) .eslintcache
-HAS_DOCKER ?= $(shell which docker > /dev/null 2>&1; [ $$? -eq 0 ] && echo 1 || echo 0)
+HAS_DOCKER ?= $(shell command -v docker > /dev/null 2>&1; [ $$? -eq 0 ] && echo 1 || echo 0)
ifeq ($(HAS_DOCKER), 1)
DOCKER_COMMAND ?= docker run -it -v $(PWD):/node
@@ -1420,6 +1412,5 @@ gen-openssl: ## Generate platform dependent openssl files (requires docker)
$(DOCKER_COMMAND) node-openssl-builder make -C deps/openssl/config
else
gen-openssl:
- @echo "No docker command, cannot continue"
- @exit 1
+ $(error No docker command, cannot continue)
endif
diff --git a/README.md b/README.md
index a5066a675f0a8e..b8d5c4c09d2ec9 100644
--- a/README.md
+++ b/README.md
@@ -264,8 +264,6 @@ For information about the governance of the Node.js project, see
**Bradley Farias** <bradley.meck@gmail.com>
* [bmeurer](https://github.com/bmeurer) -
**Benedikt Meurer** <benedikt.meurer@gmail.com>
-* [bnoordhuis](https://github.com/bnoordhuis) -
-**Ben Noordhuis** <info@bnoordhuis.nl>
* [boneskull](https://github.com/boneskull) -
**Christopher Hiller** <boneskull@boneskull.com> (he/him)
* [BridgeAR](https://github.com/BridgeAR) -
@@ -390,8 +388,6 @@ For information about the governance of the Node.js project, see
**Ricky Zhou** <0x19951125@gmail.com> (he/him)
* [ronag](https://github.com/ronag) -
**Robert Nagy** <ronagy@icloud.com>
-* [ronkorving](https://github.com/ronkorving) -
-**Ron Korving** <ron@ronkorving.nl>
* [rubys](https://github.com/rubys) -
**Sam Ruby** <rubys@intertwingly.net>
* [ruyadorno](https://github.com/ruyadorno) -
@@ -406,8 +402,6 @@ For information about the governance of the Node.js project, see
**Santiago Gimeno** <santiago.gimeno@gmail.com>
* [seishun](https://github.com/seishun) -
**Nikolai Vavilov** <vvnicholas@gmail.com>
-* [shigeki](https://github.com/shigeki) -
-**Shigeki Ohtsu** <ohtsu@ohtsu.org> (he/him)
* [shisama](https://github.com/shisama) -
**Masashi Hirano** <shisama07@gmail.com> (he/him)
* [silverwind](https://github.com/silverwind) -
@@ -453,6 +447,8 @@ For information about the governance of the Node.js project, see
**Anna M. Kedzierska** <anna.m.kedzierska@gmail.com>
* [aqrln](https://github.com/aqrln) -
**Alexey Orlenko** <eaglexrlnk@gmail.com> (he/him)
+* [bnoordhuis](https://github.com/bnoordhuis) -
+**Ben Noordhuis** <info@bnoordhuis.nl>
* [brendanashworth](https://github.com/brendanashworth) -
**Brendan Ashworth** <brendan.ashworth@me.com>
* [calvinmetcalf](https://github.com/calvinmetcalf) -
@@ -541,12 +537,16 @@ For information about the governance of the Node.js project, see
**Robert Kowalski** <rok@kowalski.gd>
* [romankl](https://github.com/romankl) -
**Roman Klauke** <romaaan.git@gmail.com>
+* [ronkorving](https://github.com/ronkorving) -
+**Ron Korving** <ron@ronkorving.nl>
* [RReverser](https://github.com/RReverser) -
**Ingvar Stepanyan** <me@rreverser.com>
* [sam-github](https://github.com/sam-github) -
**Sam Roberts** <vieuxtech@gmail.com>
* [sebdeckers](https://github.com/sebdeckers) -
**Sebastiaan Deckers** <sebdeckers83@gmail.com>
+* [shigeki](https://github.com/shigeki) -
+**Shigeki Ohtsu** <ohtsu@ohtsu.org> (he/him)
* [stefanmb](https://github.com/stefanmb) -
**Stefan Budeanu** <stefan@budeanu.com>
* [tellnes](https://github.com/tellnes) -
@@ -583,6 +583,8 @@ Primary GPG keys for Node.js Releasers (some Releasers sign with subkeys):
`4ED778F539E3634C779C87C6D7062848A1AB005C`
* **Colin Ihrig** <cjihrig@gmail.com>
`94AE36675C464D64BAFA68DD7434390BDBE9B9C5`
+* **Danielle Adams** <adamzdanielle@gmail.com>
+`1C050899334244A8AF75E53792EF661D867B9DFA`
* **James M Snell** <jasnell@keybase.io>
`71DCFD284A79C3B38668286BC97EC7A07EDE3FC1`
* **Michaƫl Zasso** <targos@protonmail.com>
@@ -600,11 +602,13 @@ Primary GPG keys for Node.js Releasers (some Releasers sign with subkeys):
* **Shelley Vohr** <shelley.vohr@gmail.com>
`B9E2F5981AA6E0CD28160D9FF13993A75599653C`
-To import the full set of trusted release keys:
+To import the full set of trusted release keys (including subkeys possibly used
+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 71DCFD284A79C3B38668286BC97EC7A07EDE3FC1
gpg --keyserver pool.sks-keyservers.net --recv-keys 8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600
gpg --keyserver pool.sks-keyservers.net --recv-keys C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8
diff --git a/android-configure b/android-configure
index a7cb2b9c8b4a78..e3f4a721827e84 100755
--- a/android-configure
+++ b/android-configure
@@ -50,8 +50,8 @@ esac
HOST_OS="linux"
HOST_ARCH="x86_64"
-export CC_host=$(which gcc)
-export CXX_host=$(which g++)
+export CC_host=$(command -v gcc)
+export CXX_host=$(command -v g++)
host_gcc_version=$($CC_host --version | grep gcc | awk '{print $NF}')
major=$(echo $host_gcc_version | awk -F . '{print $1}')
diff --git a/benchmark/common.js b/benchmark/common.js
index 701a8d6c34f07f..bdccd6605f365e 100644
--- a/benchmark/common.js
+++ b/benchmark/common.js
@@ -4,24 +4,24 @@ const child_process = require('child_process');
const http_benchmarkers = require('./_http-benchmarkers.js');
class Benchmark {
- // Used to make sure a benchmark only start a timer once
- #started = false;
+ constructor(fn, configs, options = {}) {
+ // Used to make sure a benchmark only start a timer once
+ this._started = false;
- // Indicate that the benchmark ended
- #ended = false;
+ // Indicate that the benchmark ended
+ this._ended = false;
- // Holds process.hrtime value
- #time = [0, 0];
+ // Holds process.hrtime value
+ this._time = [0, 0];
- // Use the file name as the name of the benchmark
- name = require.main.filename.slice(__dirname.length + 1);
+ // Use the file name as the name of the benchmark
+ this.name = require.main.filename.slice(__dirname.length + 1);
- // Execution arguments i.e. flags used to run the jobs
- flags = process.env.NODE_BENCHMARK_FLAGS ?
- process.env.NODE_BENCHMARK_FLAGS.split(/\s+/) :
- [];
+ // Execution arguments i.e. flags used to run the jobs
+ this.flags = process.env.NODE_BENCHMARK_FLAGS ?
+ process.env.NODE_BENCHMARK_FLAGS.split(/\s+/) :
+ [];
- constructor(fn, configs, options = {}) {
// Parse job-specific configuration from the command line arguments
const argv = process.argv.slice(2);
const parsed_args = this._parseArgs(argv, configs, options);
@@ -214,21 +214,21 @@ class Benchmark {
}
start() {
- if (this.#started) {
+ if (this._started) {
throw new Error('Called start more than once in a single benchmark');
}
- this.#started = true;
- this.#time = process.hrtime();
+ this._started = true;
+ this._time = process.hrtime();
}
end(operations) {
// Get elapsed time now and do error checking later for accuracy.
- const elapsed = process.hrtime(this.#time);
+ const elapsed = process.hrtime(this._time);
- if (!this.#started) {
+ if (!this._started) {
throw new Error('called end without start');
}
- if (this.#ended) {
+ if (this._ended) {
throw new Error('called end multiple times');
}
if (typeof operations !== 'number') {
@@ -244,7 +244,7 @@ class Benchmark {
elapsed[1] = 1;
}
- this.#ended = true;
+ this._ended = true;
const time = elapsed[0] + elapsed[1] / 1e9;
const rate = operations / time;
this.report(rate, elapsed);
diff --git a/benchmark/fixtures/require-builtins.js b/benchmark/fixtures/require-builtins.js
new file mode 100644
index 00000000000000..685eef1875b301
--- /dev/null
+++ b/benchmark/fixtures/require-builtins.js
@@ -0,0 +1,44 @@
+'use strict';
+
+const list = [
+ 'async_hooks',
+ 'assert',
+ 'buffer',
+ 'child_process',
+ 'console',
+ 'constants',
+ 'crypto',
+ 'cluster',
+ 'dgram',
+ 'dns',
+ 'domain',
+ 'events',
+ 'fs',
+ 'http',
+ 'http2',
+ 'https',
+ 'module',
+ 'net',
+ 'os',
+ 'path',
+ 'perf_hooks',
+ 'process',
+ 'punycode',
+ 'querystring',
+ 'readline',
+ 'repl',
+ 'stream',
+ 'string_decoder',
+ 'timers',
+ 'tls',
+ 'tty',
+ 'url',
+ 'util',
+ 'vm',
+ 'zlib',
+];
+
+for (let i = 0; i < list.length; ++i) {
+ const item = list[i];
+ require(item);
+}
diff --git a/benchmark/misc/startup.js b/benchmark/misc/startup.js
index da24ee65199077..dea5a31753f8fe 100644
--- a/benchmark/misc/startup.js
+++ b/benchmark/misc/startup.js
@@ -7,7 +7,11 @@ let Worker; // Lazy loaded in main
const bench = common.createBenchmark(main, {
dur: [1],
- script: ['benchmark/fixtures/require-cachable', 'test/fixtures/semicolon'],
+ script: [
+ 'benchmark/fixtures/require-builtins',
+ 'benchmark/fixtures/require-cachable',
+ 'test/fixtures/semicolon',
+ ],
mode: ['process', 'worker']
}, {
flags: ['--expose-internals']
diff --git a/benchmark/napi/function_args/binding.cc b/benchmark/napi/function_args/binding.cc
index 2c54dd424d405d..078fe0ee3ea767 100644
--- a/benchmark/napi/function_args/binding.cc
+++ b/benchmark/napi/function_args/binding.cc
@@ -123,7 +123,9 @@ void CallWithArguments(const FunctionCallbackInfo& args) {
}
}
-void Initialize(Local |