Skip to content

Commit 98a7b74

Browse files
Merge pull request #1030 from nodejs/main
Create a new pull request by comparing changes across two branches
2 parents 94d4ad7 + e2242b4 commit 98a7b74

File tree

329 files changed

+45332
-43464
lines changed

Some content is hidden

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

329 files changed

+45332
-43464
lines changed

BUILDING.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ file a new issue.
3535
* [Windows](#windows)
3636
* [Windows Prerequisites](#windows-prerequisites)
3737
* [Option 1: Manual install](#option-1-manual-install)
38-
* [Option 2: Automated install with Boxstarter](#option-2-automated-install-with-boxstarter)
38+
* [Option 2: Automated install with WinGet](#option-2-automated-install-with-winget)
39+
* [Option 3: Automated install with Boxstarter](#option-3-automated-install-with-boxstarter)
3940
* [Building Node.js](#building-nodejs-2)
4041
* [Android](#android)
4142
* [`Intl` (ECMA-402) support](#intl-ecma-402-support)
@@ -666,7 +667,34 @@ Optional requirements for compiling with ClangCL:
666667

667668
NOTE: Currently we only support compiling with Clang that comes from Visual Studio.
668669

669-
##### Option 2: Automated install with Boxstarter
670+
##### Option 2: Automated install with WinGet
671+
672+
[WinGet configuration files](https://github.com/nodejs/node/tree/main/.configurations)
673+
can be used to install all the required prerequisites for Node.js development
674+
easily. These files will install the following
675+
[WinGet](https://learn.microsoft.com/en-us/windows/package-manager/winget/) packages:
676+
677+
* Git for Windows with the `git` and Unix tools added to the `PATH`
678+
* `Python 3.12`
679+
* `Visual Studio 2022` (Community, Enterprise or Professional)
680+
* `Visual Studio 2022 Build Tools` with Visual C++ workload, Clang and ClangToolset
681+
* `NetWide Assembler`
682+
683+
To install Node.js prerequisites from Powershell Terminal:
684+
685+
```powershell
686+
winget configure .\configuration.dsc.yaml
687+
```
688+
689+
Alternatively, you can use [Dev Home](https://learn.microsoft.com/en-us/windows/dev-home/)
690+
to install the prerequisites:
691+
692+
* Switch to `Machine Configuration` tab
693+
* Click on `Configuration File`
694+
* Choose the corresponding WinGet configuration file
695+
* Click on `Set up as admin`
696+
697+
##### Option 3: Automated install with Boxstarter
670698

671699
A [Boxstarter](https://boxstarter.org/) script can be used for easy setup of
672700
Windows systems with all the required prerequisites for Node.js development.

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
Select a Node.js version below to view the changelog history:
44

5+
* [Node.js 23](doc/changelogs/CHANGELOG_V23.md) **Current**
56
* [Node.js 22](doc/changelogs/CHANGELOG_V22.md) **Current**
67
* [Node.js 21](doc/changelogs/CHANGELOG_V21.md) End-of-Life
78
* [Node.js 20](doc/changelogs/CHANGELOG_V20.md) **Long Term Support**
@@ -31,13 +32,17 @@ release.
3132

3233
<table>
3334
<tr>
35+
<th title="Current"><a href="doc/changelogs/CHANGELOG_V23.md">23</a> (Current)</th>
3436
<th title="Current"><a href="doc/changelogs/CHANGELOG_V22.md">22</a> (Current)</th>
3537
<th title="LTS Until 2026-04"><a href="doc/changelogs/CHANGELOG_V20.md">20</a> (LTS)</th>
3638
<th title="LTS Until 2025-04"><a href="doc/changelogs/CHANGELOG_V18.md">18</a> (LTS)</th>
3739
</tr>
3840
<tr>
41+
<b><a href="doc/changelogs/CHANGELOG_V23.md#23.0.0">23.0.0</a></b><br/>
42+
</td>
3943
<td valign="top">
40-
<b><a href="doc/changelogs/CHANGELOG_V22.md#22.9.0">22.9.0</a></b><br/>
44+
<b><a href="doc/changelogs/CHANGELOG_V22.md#22.10.0">22.10.0</a></b><br/>
45+
<a href="doc/changelogs/CHANGELOG_V22.md#22.9.0">22.9.0</a><br/>
4146
<a href="doc/changelogs/CHANGELOG_V22.md#22.8.0">22.8.0</a><br/>
4247
<a href="doc/changelogs/CHANGELOG_V22.md#22.7.0">22.7.0</a><br/>
4348
<a href="doc/changelogs/CHANGELOG_V22.md#22.6.0">22.6.0</a><br/>

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ coverage-clean: ## Remove coverage artifacts.
243243
$(RM) -r coverage/tmp
244244
@if [ -d "out/Release/obj.target" ]; then \
245245
$(FIND) out/$(BUILDTYPE)/obj.target \( -name "*.gcda" -o -name "*.gcno" \) \
246-
-type f -exec $(RM) {};\
246+
-type f | xargs $(RM); \
247247
fi
248248

249249
.PHONY: coverage
@@ -269,7 +269,7 @@ coverage-build-js: ## Build JavaScript coverage files.
269269
.PHONY: coverage-test
270270
coverage-test: coverage-build ## Run the tests and generate a coverage report.
271271
@if [ -d "out/Release/obj.target" ]; then \
272-
$(FIND) out/$(BUILDTYPE)/obj.target -name "*.gcda" -type f -exec $(RM) {}; \
272+
$(FIND) out/$(BUILDTYPE)/obj.target -name "*.gcda" -type f | xargs $(RM); \
273273
fi
274274
-NODE_V8_COVERAGE=coverage/tmp \
275275
TEST_CI_ARGS="$(TEST_CI_ARGS) --type=coverage" $(MAKE) $(COVTESTS)

benchmark/buffers/buffer-copy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
const common = require('../common.js');
33

44
const bench = common.createBenchmark(main, {
5-
bytes: [0, 8, 128, 32 * 1024],
5+
bytes: [8, 128, 1024],
66
partial: ['true', 'false'],
77
n: [6e6],
88
});
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
'use strict';
2+
const common = require('../common.js');
3+
4+
const bench = common.createBenchmark(main, {
5+
n: [1e5],
6+
nListener: [1, 5, 10],
7+
});
8+
9+
function main({ n, nListener }) {
10+
const target = new EventTarget();
11+
const listeners = [];
12+
for (let k = 0; k < nListener; k += 1)
13+
listeners.push(() => {});
14+
15+
bench.start();
16+
for (let i = 0; i < n; i += 1) {
17+
for (let k = listeners.length; --k >= 0;) {
18+
target.addEventListener('abort', listeners[k]);
19+
}
20+
for (let k = listeners.length; --k >= 0;) {
21+
target.removeEventListener('abort', listeners[k]);
22+
}
23+
}
24+
bench.end(n);
25+
}

benchmark/events/eventtarget-add-remove.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
const common = require('../common.js');
33

44
const bench = common.createBenchmark(main, {
5-
n: [1e6],
6-
nListener: [5, 10],
5+
n: [1e5],
6+
nListener: [1, 5, 10],
77
});
88

99
function main({ n, nListener }) {

deps/cares/CMakeLists.txt

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ INCLUDE (CheckCSourceCompiles)
1212
INCLUDE (CheckStructHasMember)
1313
INCLUDE (CheckLibraryExists)
1414

15-
PROJECT (c-ares LANGUAGES C VERSION "1.33.1" )
15+
PROJECT (c-ares LANGUAGES C VERSION "1.34.1" )
1616

1717
# Set this version before release
1818
SET (CARES_VERSION "${PROJECT_VERSION}")
@@ -30,7 +30,7 @@ INCLUDE (GNUInstallDirs) # include this *AFTER* PROJECT(), otherwise paths are w
3030
# For example, a version of 4:0:2 would generate output such as:
3131
# libname.so -> libname.so.2
3232
# libname.so.2 -> libname.so.2.2.0
33-
SET (CARES_LIB_VERSIONINFO "20:1:18")
33+
SET (CARES_LIB_VERSIONINFO "21:1:19")
3434

3535

3636
OPTION (CARES_STATIC "Build as a static library" OFF)
@@ -406,7 +406,7 @@ ENDIF ()
406406

407407
CHECK_STRUCT_HAS_MEMBER("struct sockaddr_in6" sin6_scope_id "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID LANGUAGE C)
408408

409-
409+
CHECK_SYMBOL_EXISTS (memmem "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_MEMMEM)
410410
CHECK_SYMBOL_EXISTS (closesocket "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_CLOSESOCKET)
411411
CHECK_SYMBOL_EXISTS (CloseSocket "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_CLOSESOCKET_CAMEL)
412412
CHECK_SYMBOL_EXISTS (connect "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_CONNECT)
@@ -443,6 +443,7 @@ CHECK_SYMBOL_EXISTS (IoctlSocket "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_IOCTLSO
443443
CHECK_SYMBOL_EXISTS (recv "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_RECV)
444444
CHECK_SYMBOL_EXISTS (recvfrom "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_RECVFROM)
445445
CHECK_SYMBOL_EXISTS (send "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_SEND)
446+
CHECK_SYMBOL_EXISTS (sendto "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_SENDTO)
446447
CHECK_SYMBOL_EXISTS (setsockopt "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_SETSOCKOPT)
447448
CHECK_SYMBOL_EXISTS (socket "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_SOCKET)
448449
CHECK_SYMBOL_EXISTS (strcasecmp "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_STRCASECMP)
@@ -500,7 +501,10 @@ IF (CARES_THREADS)
500501
CARES_EXTRAINCLUDE_IFSET (HAVE_PTHREAD_NP_H pthread_np.h)
501502
CHECK_SYMBOL_EXISTS (pthread_init "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_PTHREAD_INIT)
502503
# Make sure libcares.pc.cmake knows about thread libraries on static builds
503-
LIST (APPEND CARES_DEPENDENT_LIBS ${CMAKE_THREAD_LIBS_INIT})
504+
# The variable set by FIND_PACKAGE(Threads) has a -l prefix on it, we need
505+
# to strip that first since CARES_DEPENDENT_LIBS doesn't expect that.
506+
STRING (REPLACE "-l" "" CARES_THREAD_LIBRARY "${CMAKE_THREAD_LIBS_INIT}")
507+
LIST (APPEND CARES_DEPENDENT_LIBS ${CARES_THREAD_LIBRARY})
504508
ELSE ()
505509
MESSAGE (WARNING "Threading support not found, disabling...")
506510
SET (CARES_THREADS OFF)
@@ -688,7 +692,6 @@ IF (HAVE_ARPA_NAMESER_COMPAT_H)
688692
SET (CARES_HAVE_ARPA_NAMESER_COMPAT_H 1)
689693
ENDIF()
690694

691-
692695
# Coverage
693696
IF (CARES_COVERAGE)
694697
# set compiler flags
@@ -755,9 +758,6 @@ IF (CARES_BUILD_TESTS OR CARES_BUILD_CONTAINER_TESTS)
755758
ADD_SUBDIRECTORY (test)
756759
ENDIF ()
757760

758-
759-
760-
761761
# Export targets
762762
IF (CARES_INSTALL)
763763
SET (CMAKECONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
@@ -781,7 +781,6 @@ IF (CARES_INSTALL)
781781
INSTALL (FILES "${CMAKE_CURRENT_BINARY_DIR}/libcares.pc" COMPONENT Devel DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
782782
ENDIF ()
783783

784-
785784
# Legacy chain-building variables (provided for compatibility with old code).
786785
# Don't use these, external code should be updated to refer to the aliases directly (e.g., Cares::cares).
787786
SET (CARES_FOUND 1 CACHE INTERNAL "CARES LIBRARY FOUND")

deps/cares/Makefile.Watcom

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ CP = copy
4343

4444
CFLAGS = -3r -mf -hc -zff -zgf -zq -zm -zc -s -fr=con -w2 -fpi -oilrtfm -aa &
4545
-wcd=201 -bt=nt -d+ -dCARES_BUILDING_LIBRARY &
46-
-dNTDDI_VERSION=0x06020000 -I. -I.\include -I.\src\lib $(SYS_INCL)
46+
-dNTDDI_VERSION=0x06020000 -I. -I.\include -I.\src\lib -I.\src\lib\include &
47+
$(SYS_INCL)
4748

4849
LFLAGS = option quiet, map, caseexact, eliminate
4950

@@ -124,7 +125,7 @@ $(LIBNAME).lib: $(OBJS_STAT) $(LIB_ARG)
124125
$(OBJ_BASE)\tools\ares_getopt.obj:
125126
$(CC) $(CFLAGS) -DCARES_STATICLIB .\src\tools\ares_getopt.c -fo=$^@
126127

127-
adig.exe: $(OBJ_BASE)\tools\ares_getopt.obj $(LIBNAME).lib
128+
adig.exe: $(LIBNAME).lib
128129
$(CC) $(CFLAGS) src\tools\adig.c -fo=$(OBJ_BASE)\tools\adig.obj
129130
$(LD) name $^@ system nt $(LFLAGS) file { $(OBJ_BASE)\tools\adig.obj $[@ } library $]@, ws2_32.lib, iphlpapi.lib
130131

deps/cares/Makefile.dj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ VPATH = src/lib src/tools
2323
WATT32_ROOT = $(realpath $(WATT_ROOT))
2424
WATT32_LIB = $(WATT32_ROOT)/lib/libwatt.a
2525

26-
CFLAGS = -g -O2 -I./include -I./src/lib \
26+
CFLAGS = -g -O2 -I./include -I./src/lib -I./src/lib/include \
2727
-I$(WATT32_ROOT)/inc \
2828
-Wall \
2929
-Wextra \

deps/cares/Makefile.m32

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ RANLIB = $(CROSSPREFIX)ranlib
1919
#RM = rm -f
2020
CP = cp -afv
2121

22-
CFLAGS = $(CARES_CFLAG_EXTRAS) -O2 -Wall -I./include -I./src/lib -D_WIN32_WINNT=0x0602
22+
CFLAGS = $(CARES_CFLAG_EXTRAS) -O2 -Wall -I./include -I./src/lib -I./src/lib/include -D_WIN32_WINNT=0x0602
2323
CFLAGS += -DCARES_STATICLIB
2424
LDFLAGS = $(CARES_LDFLAG_EXTRAS) -s
2525
LIBS = -lws2_32 -liphlpapi

0 commit comments

Comments
 (0)