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/linters.yml b/.github/workflows/linters.yml
index 6c25e775d34a1e..14aed9bfddfdc3 100644
--- a/.github/workflows/linters.yml
+++ b/.github/workflows/linters.yml
@@ -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 4ee135c5ebc43e..1444dff7262819 100644
--- a/.github/workflows/misc.yml
+++ b/.github/workflows/misc.yml
@@ -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 5c5f2b2a1953b8..08e6e91e8f4fbd 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 --experimental-quic"
+ run: make build-ci -j2 V=1 CONFIG_FLAGS="--error-on-warn --experimental-quic"
- name: Test
- run: make run-ci -j8 V=1 TEST_CI_ARGS="-p actions"
+ run: make run-ci -j2 V=1 TEST_CI_ARGS="-p actions"
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 6452e3ebd780fa..1d26ec520a8f7d 100644
--- a/BUILDING.md
+++ b/BUILDING.md
@@ -113,6 +113,7 @@ platforms. This is true regardless of entries in the table below.
| Windows | x64, x86 | Windows Server 2012 (not R2) | Experimental | |
| Windows | arm64 | >= Windows 10 | Tier 2 (compiling) / Experimental (running) | |
| macOS | x64 | >= 10.13 | Tier 1 | |
+| macOS | arm64 | >= 11 | Experimental | |
| SmartOS | x64 | >= 18 | Tier 2 | |
| AIX | ppc64be >=power7 | >= 7.2 TL02 | Tier 2 | |
| FreeBSD | x64 | >= 11 | Experimental | Downgraded as of Node.js 12 [7](#fn7) |
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d3d003ba375792..cbe9ccfd7f5019 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -32,7 +32,8 @@ release.
-15.2.1
+15.3.0
+15.2.1
15.2.0
15.1.0
15.0.1
diff --git a/Makefile b/Makefile
index 7db5b3320f6181..6379f06a2e0b6d 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; \
@@ -898,7 +898,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)
@@ -1383,7 +1383,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
diff --git a/README.md b/README.md
index 2d0e58655810a9..b8d5c4c09d2ec9 100644
--- a/README.md
+++ b/README.md
@@ -402,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) -
@@ -547,6 +545,8 @@ For information about the governance of the Node.js project, see
**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) -
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/fs/bench-statSync-failure.js b/benchmark/fs/bench-statSync-failure.js
new file mode 100644
index 00000000000000..82cb24c09f4af2
--- /dev/null
+++ b/benchmark/fs/bench-statSync-failure.js
@@ -0,0 +1,28 @@
+'use strict';
+
+const common = require('../common');
+const fs = require('fs');
+const path = require('path');
+
+const bench = common.createBenchmark(main, {
+ n: [1e6],
+ statSyncType: ['throw', 'noThrow']
+});
+
+
+function main({ n, statSyncType }) {
+ const arg = path.join(__dirname, 'non.existent');
+
+ bench.start();
+ for (let i = 0; i < n; i++) {
+ if (statSyncType === 'noThrow') {
+ fs.statSync(arg, { throwIfNoEntry: false });
+ } else {
+ try {
+ fs.statSync(arg);
+ } catch {
+ }
+ }
+ }
+ bench.end(n);
+}
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 |