Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v14.13.0 proposal #35419

Merged
merged 42 commits into from
Sep 29, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
c09f3dc
doc: put release script specifics in details
MylesBorins Sep 18, 2020
2a4ae09
doc: update crypto.createSecretKey accepted types
panva Sep 17, 2020
68ea7f5
module: fix crash on multiline named cjs imports
ctavan Sep 18, 2020
9d91842
tools,doc: upgrade dependencies
aduh95 Sep 17, 2020
c5d27e1
tools,doc: enforce alphabetical order for md refs
aduh95 Sep 17, 2020
ec6b78a
doc: add `socket.readyState`
clarkkozak Sep 18, 2020
0c4540b
doc: fix heading space bug in assert.md
tlhunter Sep 23, 2020
7f35573
tools: ignore build folder when checking links
Sep 23, 2020
1893449
doc: revise dependency redirection text in policy.md
Trott Sep 20, 2020
b4514d4
doc: replace "this guide" link text with guide title
Trott Sep 21, 2020
b9d767c
doc: change type of child_process.signalCode to string
Sep 16, 2020
ef0d2ef
doc: move package config docs to separate page
aduh95 Aug 7, 2020
ab7d0e9
meta: update module pages in CODEOWNERS
aduh95 Aug 26, 2020
1d1ce1f
doc: document support for package.json fields
aduh95 Aug 7, 2020
5057318
module: exports pattern support
guybedford Aug 12, 2020
d7282c0
doc: edit subpath export patterns introduction
Trott Sep 18, 2020
dd53036
doc: fixup lutimes metadata
addaleax Sep 24, 2020
a8d3a7f
doc: put landing specifics in details tag
Trott Sep 25, 2020
0a847ca
doc: update napi_make_callback documentation
Flarna Sep 23, 2020
6dc6dad
doc: avoid referring to C array size
tniessen Sep 22, 2020
482ce6c
doc: improve N-API string-to-native doc
Sep 23, 2020
5da5d41
doc: refine require/import conditions constraints
guybedford Sep 23, 2020
353a567
deps: upgrade to c-ares v1.16.1
codebytere Sep 24, 2020
0d8eaa3
src: allow N-API addon in `AddLinkedBinding()`
addaleax Sep 22, 2020
1e1cb94
src: fix incorrect SIGSEGV handling in NODE_USE_V8_WASM_TRAP_HANDLER
korniltsev Sep 21, 2020
d7c28c9
test,child_process: add tests for signalCode value
Trott Sep 24, 2020
1758ac8
doc: added version 7 to N-API version matrix
NickNaso Sep 23, 2020
87dfed0
doc: add gpg key export directions to releases doc
danielleadams Sep 22, 2020
19b95a7
deps: upgrade to libuv 1.40.0
cjihrig Sep 25, 2020
f2635b3
test: replace annonymous functions with arrow
PoojaDurgad Aug 25, 2020
857e321
doc: set encoding to hex before piping hash
vbarzana Sep 25, 2020
86ac749
doc: add history entry for breaking destroy() change
kanongil Sep 24, 2020
0f4ecaa
repl: standardize Control key indications
Trott Sep 19, 2020
010173a
doc: edit n-api.md for minor improvements
Trott Sep 26, 2020
f551f52
module: named exports for CJS via static analysis
guybedford May 15, 2020
80eb221
tools: update ESLint to 7.10.0
cjihrig Sep 26, 2020
70ad69b
doc: outline when origin is set to unhandledRejection
mlarcher Sep 22, 2020
99a79e3
fs: fix fs.promises.writeFile with typed arrays
targos Sep 27, 2020
46a4154
doc: packages docs feedback
guybedford Sep 27, 2020
02db136
doc: alphabetize error list
Trott Sep 15, 2020
2e10616
doc: remove http2 non-link anchor tags
Trott Sep 12, 2020
c048607
2020-09-29, Version 14.13.0 (Current)
MylesBorins Sep 29, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
deps: upgrade to libuv 1.40.0
Notable changes:

- The UV_UDP_MMSG_FREE flag has been added.
- UV__EPROTO has been remapped from 4046 to -4046 for
  consistency with other error codes.
- On Windows, UTF-16 surrogate pairs are no longer
  replaced with the Unicode replacement character.
- uv_timer_get_due_in() has been added.

PR-URL: #35333
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
  • Loading branch information
cjihrig authored and MylesBorins committed Sep 29, 2020
commit 19b95a7fa9c704820c515b2020e443dc8d0ee6fd
5 changes: 5 additions & 0 deletions deps/uv/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -443,3 +443,8 @@ escherstair <ernestviga@gmail.com>
Evan Lucas <evanlucas@me.com>
tjarlama <59913901+tjarlama@users.noreply.github.com>
司徒玟琅 <sanjusss@qq.com>
YuMeiJie <yumeijie@huawei.com>
Aleksej Lebedev <root@zta.lk>
Nikolay Mitev <github@hmel.org>
Ulrik Strid <ulrik.strid@outlook.com>
Elad Lahav <elahav@qnx.com>
29 changes: 27 additions & 2 deletions deps/uv/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ if(WIN32)
list(APPEND uv_test_sources src/win/snprintf.c test/runner-win.c)
else()
list(APPEND uv_defines _FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE)
if(NOT CMAKE_SYSTEM_NAME MATCHES "Android|OS390")
if(NOT CMAKE_SYSTEM_NAME MATCHES "Android|OS390|QNX")
# TODO: This should be replaced with find_package(Threads) if possible
# Android has pthread as part of its c library, not as a separate
# libpthread.so.
Expand Down Expand Up @@ -298,6 +298,30 @@ if(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
list(APPEND uv_sources src/unix/no-proctitle.c src/unix/sunos.c)
endif()

if(CMAKE_SYSTEM_NAME STREQUAL "Haiku")
list(APPEND uv_defines _BSD_SOURCE)
list(APPEND uv_libraries bsd network)
list(APPEND uv_sources
src/unix/haiku.c
src/unix/bsd-ifaddrs.c
src/unix/no-fsevents.c
src/unix/no-proctitle.c
src/unix/posix-hrtime.c
src/unix/posix-poll.c)
endif()

if(CMAKE_SYSTEM_NAME STREQUAL "QNX")
list(APPEND uv_sources
src/unix/posix-hrtime.c
src/unix/posix-poll.c
src/unix/qnx.c
src/unix/bsd-ifaddrs.c
src/unix/no-proctitle.c
src/unix/no-fsevents.c)
list(APPEND uv_cflags -fno-strict-aliasing)
list(APPEND uv_libraries socket)
endif()

if(APPLE OR CMAKE_SYSTEM_NAME MATCHES "DragonFly|FreeBSD|Linux|NetBSD|OpenBSD")
list(APPEND uv_test_libraries util)
endif()
Expand Down Expand Up @@ -568,10 +592,11 @@ if(UNIX OR MINGW)
set(libdir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
set(prefix ${CMAKE_INSTALL_PREFIX})
configure_file(libuv.pc.in libuv.pc @ONLY)
configure_file(libuv-static.pc.in libuv-static.pc @ONLY)

install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR})
install(FILES ${PROJECT_BINARY_DIR}/libuv.pc
install(FILES ${PROJECT_BINARY_DIR}/libuv.pc ${PROJECT_BINARY_DIR}/libuv-static.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
install(TARGETS uv LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(TARGETS uv_a ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
Expand Down
35 changes: 35 additions & 0 deletions deps/uv/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,38 @@
2020.09.26, Version 1.40.0 (Stable), 4e69e333252693bd82d6338d6124f0416538dbfc

Changes since version 1.39.0:

* udp: add UV_UDP_MMSG_FREE recv_cb flag (Ryan Liptak)

* include: re-map UV__EPROTO from 4046 to -4046 (YuMeiJie)

* doc: correct UV_UDP_MMSG_FREE version added (cjihrig)

* doc: add uv_metrics_idle_time() version metadata (Ryan Liptak)

* win,tty: pass through utf-16 surrogate pairs (Mustafa M)

* unix: fix DragonFly BSD build (Aleksej Lebedev)

* win,udp: fix error code returned by connect() (Santiago Gimeno)

* src: suppress user_timeout maybe-uninitialized (Daniel Bevenius)

* test: fix compiler warning (Vladimír Čunát)

* build: fix the Haiku cmake build (David Carlier)

* linux: fix i386 sendmmsg/recvmmsg support (Ben Noordhuis)

* build: add libuv-static pkg-config file (Nikolay Mitev)

* unix,win: add uv_timer_get_due_in() (Ulrik Strid)

* build,unix: add QNX support (Elad Lahav)

* include: remove incorrect UV__ERR() for EPROTO (cjihrig)


2020.08.26, Version 1.39.0 (Stable), 25f4b8b8a3c0f934158cd37a37b0525d75ca488e

Changes since version 1.38.1:
Expand Down
2 changes: 1 addition & 1 deletion deps/uv/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

AC_PREREQ(2.57)
AC_INIT([libuv], [1.39.0], [https://github.com/libuv/libuv/issues])
AC_INIT([libuv], [1.40.0], [https://github.com/libuv/libuv/issues])
AC_CONFIG_MACRO_DIR([m4])
m4_include([m4/libuv-extra-automake-flags.m4])
m4_include([m4/as_case.m4])
Expand Down
2 changes: 2 additions & 0 deletions deps/uv/docs/src/loop.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ API

This option is necessary to use :c:func:`uv_metrics_idle_time`.

.. versionchanged:: 1.39.0 added the UV_METRICS_IDLE_TIME option.

.. c:function:: int uv_loop_close(uv_loop_t* loop)
Releases all internal loop resources. Call this function only when the loop
Expand Down
2 changes: 2 additions & 0 deletions deps/uv/docs/src/metrics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ API
The event loop will not begin accumulating the event provider's idle
time until calling :c:type:`uv_loop_configure` with
:c:type:`UV_METRICS_IDLE_TIME`.

.. versionadded:: 1.39.0
7 changes: 7 additions & 0 deletions deps/uv/docs/src/timer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,11 @@ API
Get the timer repeat value.
.. c:function:: uint64_t uv_timer_get_due_in(const uv_timer_t* handle)
Get the timer due value or 0 if it has expired. The time is relative to
:c:func:`uv_now()`.
.. versionadded:: 1.40.0
.. seealso:: The :c:type:`uv_handle_t` API functions also apply.
14 changes: 11 additions & 3 deletions deps/uv/docs/src/udp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ Data types
* must not be freed by the recv_cb callback.
*/
UV_UDP_MMSG_CHUNK = 8,
/*
* Indicates that the buffer provided has been fully utilized by recvmmsg and
* that it should now be freed by the recv_cb callback. When this flag is set
* in uv_udp_recv_cb, nread will always be 0 and addr will always be NULL.
*/
UV_UDP_MMSG_FREE = 16,
/*
* Indicates that recvmmsg should be used, if available.
*/
Expand Down Expand Up @@ -80,8 +86,10 @@ Data types
When using :man:`recvmmsg(2)`, chunks will have the `UV_UDP_MMSG_CHUNK` flag set,
those must not be freed. There will be a final callback with `nread` set to 0,
`addr` set to NULL and the buffer pointing at the initially allocated data with
the `UV_UDP_MMSG_CHUNK` flag cleared. This is a good chance for the callee to
free the provided buffer.
the `UV_UDP_MMSG_CHUNK` flag cleared and the `UV_UDP_MMSG_FREE` flag set.
The callee can now safely free the provided buffer.

.. versionchanged:: 1.40.0 added the `UV_UDP_MMSG_FREE` flag.

.. note::
The receive callback will be called with `nread` == 0 and `addr` == NULL when there is
Expand Down Expand Up @@ -392,7 +400,7 @@ API
it must be explicitly requested by passing the `UV_UDP_RECVMMSG` flag to
:c:func:`uv_udp_init_ex`.
.. versionchanged:: 1.39.0 :c:func:`uv_udp_using_recvmmsg` can be used in `alloc_cb` to
determine if a buffer sized for use with :man:`recvmmsg(2)` should be
determine if a buffer sized for use with :man:`recvmmsg(2)` should be
allocated for the current handle/platform.

.. c:function:: int uv_udp_using_recvmmsg(uv_udp_t* handle)
Expand Down
7 changes: 7 additions & 0 deletions deps/uv/include/uv.h
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,12 @@ enum uv_udp_flags {
* must not be freed by the recv_cb callback.
*/
UV_UDP_MMSG_CHUNK = 8,
/*
* Indicates that the buffer provided has been fully utilized by recvmmsg and
* that it should now be freed by the recv_cb callback. When this flag is set
* in uv_udp_recv_cb, nread will always be 0 and addr will always be NULL.
*/
UV_UDP_MMSG_FREE = 16,

/*
* Indicates that recvmmsg should be used, if available.
Expand Down Expand Up @@ -865,6 +871,7 @@ UV_EXTERN int uv_timer_stop(uv_timer_t* handle);
UV_EXTERN int uv_timer_again(uv_timer_t* handle);
UV_EXTERN void uv_timer_set_repeat(uv_timer_t* handle, uint64_t repeat);
UV_EXTERN uint64_t uv_timer_get_repeat(const uv_timer_t* handle);
UV_EXTERN uint64_t uv_timer_get_due_in(const uv_timer_t* handle);


/*
Expand Down
2 changes: 1 addition & 1 deletion deps/uv/include/uv/errno.h
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@
#if defined(EPROTO) && !defined(_WIN32)
# define UV__EPROTO UV__ERR(EPROTO)
#else
# define UV__EPROTO UV__ERR(4046)
# define UV__EPROTO (-4046)
#endif

#if defined(EPROTONOSUPPORT) && !defined(_WIN32)
Expand Down
2 changes: 2 additions & 0 deletions deps/uv/include/uv/unix.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@
# include "uv/posix.h"
#elif defined(__HAIKU__)
# include "uv/posix.h"
#elif defined(__QNX__)
# include "uv/posix.h"
#endif

#ifndef NI_MAXHOST
Expand Down
2 changes: 1 addition & 1 deletion deps/uv/include/uv/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
*/

#define UV_VERSION_MAJOR 1
#define UV_VERSION_MINOR 39
#define UV_VERSION_MINOR 40
#define UV_VERSION_PATCH 0
#define UV_VERSION_IS_RELEASE 1
#define UV_VERSION_SUFFIX ""
Expand Down
12 changes: 12 additions & 0 deletions deps/uv/libuv-static.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
prefix=@prefix@
exec_prefix=${prefix}
libdir=@libdir@
includedir=@includedir@

Name: libuv-static
Version: @PACKAGE_VERSION@
Description: multi-platform support library with a focus on asynchronous I/O.
URL: http://libuv.org/

Libs: -L${libdir} -luv_a @LIBS@
Cflags: -I${includedir}
2 changes: 1 addition & 1 deletion deps/uv/src/random.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ static int uv__random(void* buf, size_t buflen) {

#if defined(__PASE__)
rc = uv__random_readpath("/dev/urandom", buf, buflen);
#elif defined(_AIX)
#elif defined(_AIX) || defined(__QNX__)
rc = uv__random_readpath("/dev/random", buf, buflen);
#elif defined(__APPLE__) || defined(__OpenBSD__) || \
(defined(__ANDROID_API__) && __ANDROID_API__ >= 28)
Expand Down
8 changes: 8 additions & 0 deletions deps/uv/src/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,14 @@ uint64_t uv_timer_get_repeat(const uv_timer_t* handle) {
}


uint64_t uv_timer_get_due_in(const uv_timer_t* handle) {
if (handle->loop->time >= handle->timeout)
return 0;

return handle->timeout - handle->loop->time;
}


int uv__next_timeout(const uv_loop_t* loop) {
const struct heap_node* heap_node;
const uv_timer_t* handle;
Expand Down
4 changes: 3 additions & 1 deletion deps/uv/src/unix/bsd-ifaddrs.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ int uv_interface_addresses(uv_interface_address_t** addresses, int* count) {
address->address.address4 = *((struct sockaddr_in*) ent->ifa_addr);
}

if (ent->ifa_netmask->sa_family == AF_INET6) {
if (ent->ifa_netmask == NULL) {
memset(&address->netmask, 0, sizeof(address->netmask));
} else if (ent->ifa_netmask->sa_family == AF_INET6) {
address->netmask.netmask6 = *((struct sockaddr_in6*) ent->ifa_netmask);
} else {
address->netmask.netmask4 = *((struct sockaddr_in*) ent->ifa_netmask);
Expand Down
41 changes: 4 additions & 37 deletions deps/uv/src/unix/freebsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,31 +56,6 @@ int uv__platform_loop_init(uv_loop_t* loop) {
void uv__platform_loop_delete(uv_loop_t* loop) {
}


#ifdef __DragonFly__
int uv_exepath(char* buffer, size_t* size) {
char abspath[PATH_MAX * 2 + 1];
ssize_t abspath_size;

if (buffer == NULL || size == NULL || *size == 0)
return UV_EINVAL;

abspath_size = readlink("/proc/curproc/file", abspath, sizeof(abspath));
if (abspath_size < 0)
return UV__ERR(errno);

assert(abspath_size > 0);
*size -= 1;

if (*size > abspath_size)
*size = abspath_size;

memcpy(buffer, abspath, *size);
buffer[*size] = '\0';

return 0;
}
#else
int uv_exepath(char* buffer, size_t* size) {
char abspath[PATH_MAX * 2 + 1];
int mib[4];
Expand Down Expand Up @@ -110,7 +85,6 @@ int uv_exepath(char* buffer, size_t* size) {

return 0;
}
#endif

uint64_t uv_get_free_memory(void) {
int freecount;
Expand Down Expand Up @@ -290,25 +264,18 @@ int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) {
}


int uv__sendmmsg(int fd,
struct uv__mmsghdr* mmsg,
unsigned int vlen,
unsigned int flags) {
int uv__sendmmsg(int fd, struct uv__mmsghdr* mmsg, unsigned int vlen) {
#if __FreeBSD__ >= 11
return sendmmsg(fd, mmsg, vlen, flags);
return sendmmsg(fd, mmsg, vlen, /* flags */ 0);
#else
return errno = ENOSYS, -1;
#endif
}


int uv__recvmmsg(int fd,
struct uv__mmsghdr* mmsg,
unsigned int vlen,
unsigned int flags,
struct timespec* timeout) {
int uv__recvmmsg(int fd, struct uv__mmsghdr* mmsg, unsigned int vlen) {
#if __FreeBSD__ >= 11
return recvmmsg(fd, mmsg, vlen, flags, timeout);
return recvmmsg(fd, mmsg, vlen, 0 /* flags */, NULL /* timeout */);
#else
return errno = ENOSYS, -1;
#endif
Expand Down
19 changes: 16 additions & 3 deletions deps/uv/src/unix/fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@
defined(__NetBSD__)
# include <sys/param.h>
# include <sys/mount.h>
#elif defined(__sun) || defined(__MVS__) || defined(__NetBSD__) || defined(__HAIKU__)
#elif defined(__sun) || \
defined(__MVS__) || \
defined(__NetBSD__) || \
defined(__HAIKU__) || \
defined(__QNX__)
# include <sys/statvfs.h>
#else
# include <sys/statfs.h>
Expand Down Expand Up @@ -629,7 +633,11 @@ static int uv__fs_closedir(uv_fs_t* req) {

static int uv__fs_statfs(uv_fs_t* req) {
uv_statfs_t* stat_fs;
#if defined(__sun) || defined(__MVS__) || defined(__NetBSD__) || defined(__HAIKU__)
#if defined(__sun) || \
defined(__MVS__) || \
defined(__NetBSD__) || \
defined(__HAIKU__) || \
defined(__QNX__)
struct statvfs buf;

if (0 != statvfs(req->path, &buf))
Expand All @@ -646,7 +654,12 @@ static int uv__fs_statfs(uv_fs_t* req) {
return -1;
}

#if defined(__sun) || defined(__MVS__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__HAIKU__)
#if defined(__sun) || \
defined(__MVS__) || \
defined(__OpenBSD__) || \
defined(__NetBSD__) || \
defined(__HAIKU__) || \
defined(__QNX__)
stat_fs->f_type = 0; /* f_type is not supported. */
#else
stat_fs->f_type = buf.f_type;
Expand Down
11 changes: 2 additions & 9 deletions deps/uv/src/unix/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -334,15 +334,8 @@ struct uv__mmsghdr {
unsigned int msg_len;
};

int uv__recvmmsg(int fd,
struct uv__mmsghdr* mmsg,
unsigned int vlen,
unsigned int flags,
struct timespec* timeout);
int uv__sendmmsg(int fd,
struct uv__mmsghdr* mmsg,
unsigned int vlen,
unsigned int flags);
int uv__recvmmsg(int fd, struct uv__mmsghdr* mmsg, unsigned int vlen);
int uv__sendmmsg(int fd, struct uv__mmsghdr* mmsg, unsigned int vlen);
#else
#define HAVE_MMSG 0
#endif
Expand Down
Loading