Weekly GitHub Report for Node - 2024-12-30 12:00:12
Weekly GitHub Report for Node
Thank you for subscribing to our weekly newsletter! Each week, we deliver a comprehensive summary of your GitHub project's latest activity right to your inbox, including an overview of your project's issues, pull requests, contributors, and commit activity.
Table of Contents
I. News
1.1 Recent Version Releases:
The current version of this repository is v23.5.0
1.2 Other Noteworthy Updates:
II. Issues
2.1 Top 5 Active Issues:
We consider active issues to be issues that that have been commented on most frequently within the last week.
- Node 22 doesn't honor the --watch-preserve-output command-line parameter: This issue is about a regression in Node.js version 22, where the
--watch-preserve-output
command-line parameter does not function as expected, causing the screen to clear upon restarting, unlike in version 20 where the parameter is honored. The user reports that this behavior occurs consistently on macOS 14.7.2 and seeks clarification on why the--watch
flag is also required for--watch-preserve-output
to work properly.
- The comments discuss potential solutions and clarifications regarding the use of the
--watch-preserve-output
parameter. A suggestion is made to include the--watch
flag, which resolves the issue, but the documentation is noted to be confusing. It is clarified that--watch
is necessary for--watch-preserve-output
to function correctly, as--watch
monitors the main and imported files, while--watch-path
only watches specific paths.- Number of comments this week: None
-
Deadlock at process shutdown: This issue involves a deadlock that occurs during the shutdown of a Node.js process, which prevents the process from exiting and causes timeout failures in continuous integration (CI) environments. The problem is rare but significant enough to disrupt CI processes, and it can be reproduced by running a specific test script in parallel.
- The comments discuss attempts to resolve the deadlock, including applying a patch that temporarily fixes the issue but introduces other problems. Various debugging outputs from different platforms are shared, and contributors suggest potential causes and solutions, such as a task getting stuck during execution. The issue is linked to a V8 task hanging problem, but it is ultimately determined to be a Node.js issue. A label for help is added to attract more attention to the problem, and there is a discussion about whether a similar bug might be related.
- Number of comments this week: None
-
Build:
--fully-static
is broken with 23.5.0: This issue reports a problem with the--fully-static
build option in version 23.5.0 of a project, which fails to successfully build a node binary when running on Docker amd64 on AWS Fargate. The error log provided shows several warnings related to string operations and memory regions, but the actual compile error is not included in the output shared by the user.- The comments include a mention to the build team for attention, a request for the full output of a clean build as the current log only shows warnings, and a response from the issue reporter indicating they will provide the requested information early next year.
- Number of comments this week: None
-
Use system certificate store when running under Windows: This issue addresses the problem of failed certificate verification when using Node.js on Windows systems, particularly when dealing with self-signed certificates from corporate proxies or internal registries, due to the current inability to utilize the Windows certificate store. The proposed solution is to leverage OpenSSL 3.2's support for the Windows certificate store, which would simplify the process by automatically recognizing CA root certificates from the system, thus avoiding manual certificate management.
- The comments highlight various concerns and suggestions regarding the issue. One commenter notes potential build issues with OpenSSL's
winstore
module and suggests that disabling certain build options might not be necessary. Another commenter emphasizes the urgency of the issue due to recent problems with ESET and the longstanding challenges with Node.js and Windows certificates, advocating for support of the Windows certificate store. Additional comments express frustration with the current workaround of disabling certificate validation and the risks it poses, urging for the implementation of the proposed feature.- Number of comments this week: None
-
Writable.write(buf, sourceOffset, sourceLength)
: This issue proposes adding a new API,Writable.write(sourceBuf, sourceOffset, sourceLength)
, to theWritable
class in order to improve performance by avoiding the slow allocation ofBuffer
when using thesubarray
method. The author is uncertain about the potential impact on existing code and suggests that the internal stream implementation would need to support this change through methods like_writeSlice
and_writevSlice
.- The comments discuss the complexity and potential performance impact of the proposed change, with some suggesting it might slow down existing methods or require significant refactoring. There is a suggestion to explore this as a separate open-source module, but others argue that support in the Node.js core is necessary. Benchmark results show that avoiding
subarray
can improve performance, but the change is considered too large for a minor use case. The possibility of optimizingsubarray
orUint8Array
initialization in V8 is mentioned, but deemed unlikely to be feasible. - Number of comments this week: None
- The comments discuss the complexity and potential performance impact of the proposed change, with some suggesting it might slow down existing methods or require significant refactoring. There is a suggestion to explore this as a separate open-source module, but others argue that support in the Node.js core is necessary. Benchmark results show that avoiding
2.2 Top 5 Stale Issues:
We consider stale issues to be issues that has had no activity within the last 30 days. The team should work together to get these issues resolved and closed as soon as possible.
As of our latest update, there are no stale issues for the project this week.
2.3 Open Issues
This section lists, groups, and then summarizes issues that were created within the last week in the repository.
Issues Opened This Week: 16
Summarized Issues:
- Node.js Process Aborts on Error Handling: Several issues in Node.js version 22.11.0 on Linux platforms describe unexpected process aborts instead of handling errors gracefully. These include problems with
initAsyncResource
,port.postMessage
,vm.compileFunction
, socket connections,tls.createSecureContext
, andcrypto.generatePrime
functions. The issues highlight a need for improved error handling mechanisms to prevent abrupt process terminations.
- Node.js Debugging and Worker Threads: An issue in Node.js version 23.4.0 involves the
--inspect-brk
flag causing worker threads to hang. This problem arises because the debugging settings of the parent thread are inherited by the worker thread, which was not the case in earlier versions like 22.1.0. This inheritance leads to the worker thread not executing as expected, causing the code to hang.
- Static Binary Build Failures: Building a fully static Node.js binary using version 23.5.0 on an amd64 platform in AWS Fargate fails due to warnings about string operations and memory overflow. This issue is specific to this version, as other versions do not exhibit the same problem. The failure highlights potential compatibility or configuration issues in the build process for this specific environment.
- Performance Issues with Promises: A performance bug in Node.js version v22.11.0 on Windows affects asynchronous task handling using Promises. Not awaiting a promise results in poor performance, with discrepancies in expected counter values and execution times. This issue suggests inefficiencies in the asynchronous function implementations that need addressing.
- Segmentation Faults and Crashes: Node.js version 22.6.0 experiences segmentation faults when running a Docker container on Kubernetes. The application crashes due to a regular expression operation, sometimes resulting in a corrupted double-linked list error. These crashes indicate potential memory management issues within the Node.js runtime.
- Inconsistent Handling of
-NaN
in DataView: A bug in the Node.js project involves theDataView.setFloat32
method inconsistently handling the-NaN
value. The method sometimes returns different byte patterns,[0, 0, 192, 127]
and[0, 0, 192, 255]
, which should be consistent. This inconsistency can lead to unexpected behavior in applications relying on precise data representation.
- Potential Memory Leak in HTTP2: A potential memory leak is identified in the http2 compatibility response within Node.js, where the
'close'
event is not consistently emitted. This issue may occur when a client aborts a request, leading to resource management problems in production environments. Addressing this leak is crucial for maintaining application stability and performance.
- Internal Assertion Errors: Recurring internal assertion errors, such as "Error [ERR_INTERNAL_ASSERTION]," occur after extended server operation, causing crashes. These errors suggest potential bugs or incorrect usage of Node.js internals. Users are prompted to report these issues to GitHub for further investigation and resolution.
- CommonJS Loader Hook URL Handling: A bug in the Node.js project affects the
nextLoader
callback in the CommonJS loader hook, which does not utilize the modified URL (urlFromHook
). Instead, it relies solely on the original URL, preventing the hook from altering the URL for subsequent loading stages. This limitation restricts the flexibility of the loader hook system.
- Support for TypedArray in SQLite Module: A proposal is made to support using
TypedArray
with thestatement.run
method in the Node.js SQLite module. Currently, a workaround involves adding a wrapper touint8array
, which is not ideal. Implementing direct support would streamline operations and improve module usability.
2.4 Closed Issues
This section lists, groups, and then summarizes issues that were closed within the last week in the repository. This section also links the associated pull requests if applicable.
Issues Closed This Week: 11
Summarized Issues:
- Node.js ESM Integration for WebAssembly: Node.js is enhancing its support for the latest ESM Integration for WebAssembly modules by incorporating V8's upcoming implementation of source phase imports. This enhancement aims to enable more flexible and ergonomic instantiations of WebAssembly modules. The integration is expected to improve the developer experience by aligning with modern JavaScript module standards.
- Flaky Tests in Node.js: Several tests in the Node.js project exhibit flakiness, causing intermittent failures that require investigation. The
parallel/test-runner-coverage
test on Windows ARM64 fails due to an assertion error, while theparallel/test-abortsignal-drop-settled-signals
test fails when dropping settled dependent signals. These issues highlight the need for adjustments in test setups or logic to ensure consistent test outcomes.
- Bugs in Node.js Functions: Node.js has encountered several bugs affecting its functions, such as
assert.partialDeepStrictEqual
not throwing errors for arrays with0
and-0
, andurl.pathToFileURL
generating incorrect URLs on Windows UNC paths. Additionally, thezlib.createGzip()._transform("")
function aborts the process instead of throwing an exception. These bugs necessitate fixes to align with expected behaviors and improve reliability.
- Documentation and Feature Requests: Node.js documentation and feature requests have been identified as areas needing attention. The
zlib.crc32
function is incorrectly documented, leading to potential confusion among developers. A request for a new CLI option,--max-old-space-size-soft
, was closed as it pertains to the V8 engine rather than Node.js, indicating a need for clear communication on feature ownership.
- Platform-Specific Issues: Node.js and related projects face platform-specific issues, such as a TypeScript-based custom loader causing silent exits on Windows arm64 and a React Testing Library bug crashing Node on Windows. These issues highlight the challenges of ensuring cross-platform compatibility and the importance of platform-specific testing and documentation.
- Installation Problems on Windows: Users have reported installation problems with non-licensed software on Windows 11, such as STATISTICA 10, where the process is interrupted with errors. Despite attempts to resolve the issue by running as administrator and in compatibility mode, users continue to seek assistance. This underscores the need for robust installation processes and support for legacy software on new operating systems.