Skip to content

Commit 41f070d

Browse files
authored
Merge branch 'main' into without-node-options
2 parents fd2e0c8 + 5879e9b commit 41f070d

File tree

156 files changed

+9660
-6770
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

156 files changed

+9660
-6770
lines changed

.cpplint

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
set noparent
2-
filter=-build/include_alpha,-build/include_subdir,-build/include_what_you_use,-legal/copyright,-readability/nolint,-readability/braces
2+
filter=-build/c++17,-build/include_alpha,-build/include_subdir,-build/include_what_you_use,-legal/copyright,-readability/nolint,-readability/braces,-whitespace/indent_namespace
33
linelength=80

.github/workflows/build-tarball.yml

Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,59 @@ on:
44
pull_request:
55
types: [opened, synchronize, reopened, ready_for_review]
66
paths-ignore:
7-
- .mailmap
87
- '**.md'
98
- '**.nix'
10-
- AUTHORS
9+
- eslint.config.mjs
10+
- '**/eslint.config_partial.mjs'
11+
- android-configure
12+
- android-configure.py
13+
- android-patches/**
14+
- benchmarks/**
15+
- codecov.yml
1116
- doc/**
17+
- pyproject.yml
18+
- tsconfig.json
1219
- test/internet/**
13-
- .github/**
20+
- tools/actions/**
21+
- tools/bootstrap/**
22+
- tools/dep_updaters/**
23+
- tools/doc/**
24+
- tools/eslint-rules/**
25+
- tools/eslint/**
26+
- tools/lint-md/**
27+
- typings/**
28+
- vcbuild.bat
29+
- .**
1430
- '!.github/workflows/build-tarball.yml'
1531
push:
1632
branches:
1733
- main
1834
- v[0-9]+.x-staging
1935
- v[0-9]+.x
2036
paths-ignore:
21-
- .mailmap
2237
- '**.md'
2338
- '**.nix'
24-
- AUTHORS
39+
- eslint.config.mjs
40+
- '**/eslint.config_partial.mjs'
41+
- android-configure
42+
- android-configure.py
43+
- android-patches/**
44+
- benchmarks/**
45+
- codecov.yml
2546
- doc/**
47+
- pyproject.yml
48+
- tsconfig.json
2649
- test/internet/**
27-
- .github/**
50+
- tools/actions/**
51+
- tools/bootstrap/**
52+
- tools/dep_updaters/**
53+
- tools/doc/**
54+
- tools/eslint-rules/**
55+
- tools/eslint/**
56+
- tools/lint-md/**
57+
- typings/**
58+
- vcbuild.bat
59+
- .**
2860
- '!.github/workflows/build-tarball.yml'
2961

3062
concurrency:

.github/workflows/test-macos.yml

Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,29 @@ on:
44
pull_request:
55
types: [opened, synchronize, reopened, ready_for_review]
66
paths-ignore:
7-
- .mailmap
87
- '**.md'
98
- '**.nix'
10-
- AUTHORS
9+
- eslint.config.mjs
10+
- '**/eslint.config_partial.mjs'
11+
- android-configure
12+
- android-configure.py
13+
- android-patches/**
14+
- benchmarks/**
15+
- codecov.yml
1116
- doc/**
17+
- pyproject.yml
18+
- tsconfig.json
1219
- test/internet/**
13-
- .github/**
20+
- tools/actions/**
21+
- tools/bootstrap/**
22+
- tools/dep_updaters/**
23+
- tools/doc/**
24+
- tools/eslint-rules/**
25+
- tools/eslint/**
26+
- tools/lint-md/**
27+
- typings/**
28+
- vcbuild.bat
29+
- .**
1430
- '!.github/workflows/test-macos.yml'
1531
push:
1632
branches:
@@ -19,13 +35,29 @@ on:
1935
- v[0-9]+.x-staging
2036
- v[0-9]+.x
2137
paths-ignore:
22-
- .mailmap
2338
- '**.md'
2439
- '**.nix'
25-
- AUTHORS
40+
- eslint.config.mjs
41+
- '**/eslint.config_partial.mjs'
42+
- android-configure
43+
- android-configure.py
44+
- android-patches/**
45+
- benchmarks/**
46+
- codecov.yml
2647
- doc/**
48+
- pyproject.yml
49+
- tsconfig.json
2750
- test/internet/**
28-
- .github/**
51+
- tools/actions/**
52+
- tools/bootstrap/**
53+
- tools/dep_updaters/**
54+
- tools/doc/**
55+
- tools/eslint-rules/**
56+
- tools/eslint/**
57+
- tools/lint-md/**
58+
- typings/**
59+
- vcbuild.bat
60+
- .**
2961
- '!.github/workflows/test-macos.yml'
3062

3163
concurrency:

.github/workflows/test-shared.yml

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@ name: Test Shared libraries
55
on:
66
pull_request:
77
paths-ignore:
8-
- .mailmap
98
- '**.md'
10-
- AUTHORS
9+
- eslint.config.mjs
10+
- '**/eslint.config_partial.mjs'
11+
- android-configure
12+
- android-configure.py
13+
- android-patches/**
14+
- benchmarks/**
15+
- codecov.yml
1116
- deps/ada/**
1217
- deps/brotli/**
1318
- deps/cares/**
@@ -26,8 +31,17 @@ on:
2631
- deps/zlib/**
2732
- deps/zstd/**
2833
- doc/**
34+
- pyproject.yml
35+
- tsconfig.json
2936
- test/internet/**
30-
- .github/**
37+
- tools/**
38+
- '!tools/gyp/**'
39+
- '!tools/nix/**'
40+
- '!tools/v8/**'
41+
- '!tools/v8_gypfiles/**'
42+
- typings/**
43+
- vcbuild.bat
44+
- .**
3145
- '!.github/workflows/test-shared.yml'
3246
types: [opened, synchronize, reopened, ready_for_review]
3347
push:
@@ -37,9 +51,14 @@ on:
3751
- v[0-9]+.x-staging
3852
- v[0-9]+.x
3953
paths-ignore:
40-
- .mailmap
4154
- '**.md'
42-
- AUTHORS
55+
- eslint.config.mjs
56+
- '**/eslint.config_partial.mjs'
57+
- android-configure
58+
- android-configure.py
59+
- android-patches/**
60+
- benchmarks/**
61+
- codecov.yml
4362
- deps/ada/**
4463
- deps/brotli/**
4564
- deps/cares/**
@@ -58,8 +77,17 @@ on:
5877
- deps/zlib/**
5978
- deps/zstd/**
6079
- doc/**
80+
- pyproject.yml
81+
- tsconfig.json
6182
- test/internet/**
62-
- .github/**
83+
- tools/**
84+
- '!tools/gyp/**'
85+
- '!tools/nix/**'
86+
- '!tools/v8/**'
87+
- '!tools/v8_gypfiles/**'
88+
- typings/**
89+
- vcbuild.bat
90+
- .**
6391
- '!.github/workflows/test-shared.yml'
6492

6593
concurrency:
@@ -164,7 +192,7 @@ jobs:
164192
--arg ccache '(import <nixpkgs> {}).sccache' \
165193
--arg devTools '[]' \
166194
--arg benchmarkTools '[]' \
167-
${{ endsWith(matrix.system, '-darwin') && '--arg extraConfigFlags ''["--without-inspector" "--without-node-options"]'' \' || '\' }}
195+
${{ endsWith(matrix.system, '-darwin') && '--arg extraConfigFlags ''["--without-amaro" "--without-inspector" "--without-node-options"]'' \' || '\' }}
168196
--run '
169197
make -C "$TAR_DIR" run-ci -j4 V=1 TEST_CI_ARGS="-p actions --measure-flakiness 9 --skip-tests=$CI_SKIP_TESTS"
170198
'

Makefile

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,17 @@ EXEEXT := $(shell $(PYTHON) -c \
7878
"import sys; print('.exe' if sys.platform == 'win32' else '')")
7979

8080
NODE_EXE = node$(EXEEXT)
81-
# Use $(PWD) so we can cd to anywhere before calling this
82-
NODE ?= "$(PWD)/$(NODE_EXE)"
8381
NODE_G_EXE = node_g$(EXEEXT)
8482
NPM ?= ./deps/npm/bin/npm-cli.js
8583

84+
# Release build of node.
85+
# Use $(PWD) so we can cd to anywhere before calling this.
86+
NODE ?= "$(PWD)/$(NODE_EXE)"
87+
# Prefer $(OUT_NODE) when running tests. Use $(NODE)
88+
# when generating coverage reports or running toolings as
89+
# debug build is be slower.
90+
OUT_NODE ?= "$(PWD)/out/$(BUILDTYPE)/node$(EXEEXT)"
91+
8692
# Flags for packaging.
8793
BUILD_DOWNLOAD_FLAGS ?= --download=all
8894
BUILD_INTL_FLAGS ?= --with-intl=full-icu
@@ -108,8 +114,10 @@ available-node = \
108114
# just the debug build, run `make -C out BUILDTYPE=Debug` instead.
109115
ifeq ($(BUILDTYPE),Release)
110116
all: $(NODE_EXE) ## Build node in out/Release/node (Default).
117+
$(OUT_NODE): $(NODE_EXE)
111118
else
112119
all: $(NODE_EXE) $(NODE_G_EXE)
120+
$(OUT_NODE): $(NODE_G_EXE)
113121
endif
114122

115123
.PHONY: help
@@ -293,7 +301,7 @@ coverage-report-js: ## Report JavaScript coverage results.
293301

294302
cctest: all ## Run the C++ tests using the built `cctest` executable.
295303
@out/$(BUILDTYPE)/$@ --gtest_filter=$(GTEST_FILTER)
296-
$(NODE) ./test/embedding/test-embedding.js
304+
$(OUT_NODE) ./test/embedding/test-embedding.js
297305

298306
.PHONY: list-gtests
299307
list-gtests: ## List all available C++ gtests.
@@ -605,7 +613,7 @@ test-ci: | clear-stalled bench-addons-build build-addons build-js-native-api-tes
605613
$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \
606614
--mode=$(BUILDTYPE_LOWER) --flaky-tests=$(FLAKY_TESTS) \
607615
$(TEST_CI_ARGS) $(CI_JS_SUITES) $(CI_NATIVE_SUITES) $(CI_DOC)
608-
$(NODE) ./test/embedding/test-embedding.js
616+
$(OUT_NODE) ./test/embedding/test-embedding.js
609617
$(info Clean up any leftover processes, error if found.)
610618
ps awwx | grep Release/node | grep -v grep | cat
611619
@PS_OUT=`ps awwx | grep Release/node | grep -v grep | awk '{print $$1}'`; \
@@ -651,7 +659,7 @@ test-wpt: all ## Run the Web Platform Tests.
651659
test-wpt-report: ## Run the Web Platform Tests and generate a report.
652660
$(RM) -r out/wpt
653661
mkdir -p out/wpt
654-
-WPT_REPORT=1 $(PYTHON) tools/test.py --shell $(NODE) $(PARALLEL_ARGS) wpt
662+
-WPT_REPORT=1 $(PYTHON) tools/test.py --shell $(OUT_NODE) $(PARALLEL_ARGS) wpt
655663
$(NODE) "$$PWD/tools/merge-wpt-reports.mjs"
656664

657665
.PHONY: test-internet
@@ -680,12 +688,12 @@ test-known-issues: all ## Run tests for known issues.
680688

681689
# Related CI job: node-test-npm
682690
.PHONY: test-npm
683-
test-npm: $(NODE_EXE) ## Run the npm test suite on deps/npm.
684-
$(NODE) tools/test-npm-package --install --logfile=test-npm.tap deps/npm test
691+
test-npm: $(OUT_NODE) ## Run the npm test suite on deps/npm.
692+
$(OUT_NODE) tools/test-npm-package --install --logfile=test-npm.tap deps/npm test
685693

686694
.PHONY: test-npm-publish
687-
test-npm-publish: $(NODE_EXE) ## Test the `npm publish` command.
688-
npm_package_config_publishtest=true $(NODE) deps/npm/test/run.js
695+
test-npm-publish: $(OUT_NODE) ## Test the `npm publish` command.
696+
npm_package_config_publishtest=true $(OUT_NODE) deps/npm/test/run.js
689697

690698
.PHONY: test-js-native-api
691699
test-js-native-api: test-build-js-native-api ## Run JS Native-API tests.

benchmark/buffers/buffer-bytelength-string.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const chars = {
2222
function getInput(type, repeat, encoding) {
2323
const original = (repeat === 1) ? chars[type] : chars[type].repeat(repeat);
2424
if (encoding === 'base64') {
25-
Buffer.from(original, 'utf8').toString('base64');
25+
return Buffer.from(original, 'utf8').toString('base64');
2626
}
2727
return original;
2828
}

deps/ncrypto/ncrypto.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@ namespace ncrypto {
6666
#define NCRYPTO_STR(x) #x
6767
#define NCRYPTO_REQUIRE(EXPR) \
6868
{ \
69-
if (!(EXPR) { abort(); }) }
69+
if (!(EXPR)) { \
70+
abort(); \
71+
} \
72+
}
7073

7174
#define NCRYPTO_FAIL(MESSAGE) \
7275
do { \

0 commit comments

Comments
 (0)