Weekly GitHub Report for Node - 2024-12-09 12:00:15
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.3.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.
- Expose an
id
for concurrent test runners (likeJEST_WORKER_ID
): This issue is about proposing a feature to expose anid
for concurrent test runners in Node.js, similar to environment variables likeJEST_WORKER_ID
in Jest, to facilitate the setup of separate resources for parallel test execution. The feature aims to provide a sequential integer ID for each test worker, which is crucial for setting up databases and other resources in a way that avoids conflicts and improves test performance.
- The comments discuss the feasibility and necessity of adding a sequential worker ID for concurrent test runners, with contributors debating the use of existing features like
threadId
versus the proposed environment variable. The conversation highlights the need for a deterministic ID to optimize database setup and teardown processes, with some contributors offering to implement the feature and others suggesting alternative approaches. The discussion also touches on the challenges of maintaining efficient test setups and the potential impact on test execution times, with contributors sharing their experiences and preferences for handling database migrations and test isolation.- Number of comments this week: None
-
Regression after updating to 22.12.0 (getting ERR_REQUIRE_CYCLE_MODULE): This issue describes a regression encountered after updating to version 22.12.0, where an error (ERR_REQUIRE_CYCLE_MODULE) occurs during the build process of Storybook stories, which previously worked fine in version 22.11.0. The problem seems to be related to module loading, specifically involving a conflict between CommonJS (CJS) and ECMAScript Modules (ESM), leading to a critical preset load error in Storybook.
- The comments discuss potential causes and solutions for the issue, including a suggestion to increase the stack trace limit for better debugging. It is identified that the problem may stem from a bug in the addon-webpack5-compiler-babel package, which incorrectly uses CJS in an ESM context, and a bug in esbuild-register that affects module loading. A workaround involving renaming a file extension resolves the issue for one user, while another user finds success by modifying the package.json file. The discussion highlights the complexity of module resolution and the impact of recent internal changes in Node.js.
- Number of comments this week: None
-
Incompatibility with Node.js v22.12.0: ReferenceError: require is not defined (But Works with v22.11.0): This issue highlights a compatibility problem with Node.js version 22.12.0, where the application fails to start due to a "ReferenceError: require is not defined" error, while it works correctly with version 22.11.0. The problem is attributed to stricter module handling in the newer Node.js version, and a workaround is suggested by downgrading to Node.js v22.11.0.
- The comments discuss the absence of a repository link and suggest that the issue might be related to the use of
"type": "module"
inpackage.json
while usingrequire
in.js
files. A user shares a similar problem and provides a minimal reproducible repository, noting that renaming files to.cjs
resolves the issue but questions if it's the only solution. The discussion explores the use of extensionless imports and the potential monkey patching by Tailwind, with users sharing their experiences and findings on how different Node.js versions handle these imports. The conversation concludes with a mention of Tailwind using a module calledjiti
, which might be causing the issue due to its complex handling of Node.js internals. - Number of comments this week: None
- The comments discuss the absence of a repository link and suggest that the issue might be related to the use of
-
Proposal: Add a method to check if a string is a OneByteString: This issue proposes adding a method to the JavaScript Buffer module to determine if a string is a OneByteString, aiming to improve performance in string processing by reducing the overhead of encoding checks. The proposal includes implementing a JavaScript function
isOneByteString
and corresponding C++ functionsGetIsOneByteSlow
andGetIsOneByteFast
to handle the string encoding checks efficiently.- The comments discuss the purpose and implementation details of the proposed utility, with suggestions to clarify its target use case, such as whether it checks for fast path invocation or Latin-1 character containment. There is a consensus that the utility should be V8-specific, and a suggestion is made to encapsulate the functionality better by returning both byte length and encoding, which would aid in serialization. The discussion also touches on potential issues if V8 changes its string representation and agrees on using UTF-16 for two-byte strings.
- Number of comments this week: None
-
FATAL ERROR: v8::FromJust Maybe value is Nothing: This issue reports a fatal error encountered in a Node.js project when running a specific branch of a repository, where the error message "FATAL ERROR: v8::FromJust Maybe value is Nothing" is consistently produced. The error seems to be related to the handling of a shutdown process in Node.js, which is expected to be managed differently to avoid such a crash.
- The comments discuss the need for a complete backtrace and a smaller reproduction case, with the reporter providing the full log and explaining the minimum reproduction steps. Contributors analyze the error, suspecting it might be due to a race condition or unsafe code execution, particularly involving the
v8::Object::Set
function, and question the necessity of certain operations during thread disposal.- Number of comments this week: None
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: 17
Summarized Issues:
- Node.js Build System Issues: The Node.js build system has encountered several issues across different versions and platforms. One problem involves the incorrect use of the abseil-cpp library bundled with protobuf 25.3 during the compilation of Node.js version 22.11.0 on a Linux OpenWrt platform, leading to linker errors. Another issue is the failure of the address sanitizer on all tests when using NodeJS version 20.x or higher on MacOS 15 with ARM64 architecture, resulting in segmentation faults and container-overflow errors. Additionally, the "Hello World" example code for Addons in the Node.js documentation fails to build using
node-gyp
on a Darwin platform due to a missing member function call to 'Set'.
- Node.js Module and API Compatibility: Compatibility issues have arisen with Node.js versions 22.12.0 and 22.11.0, affecting module loading and API usage. A regression in version 22.12.0 causes an error (ERR_REQUIRE_CYCLE_MODULE) during the build process of Storybook stories due to conflicts between CommonJS and ECMAScript Modules. The "ReferenceError: require is not defined" error in Tailwind CSS configuration and other projects suggests stricter module handling in newer Node.js versions, impacting the use of CommonJS modules. There is also a request to not deprecate the
napi_module_register
andnode::Start
APIs to avoid complicating the embedding of Node.js.
- Node.js Stream and File Handling Bugs: Several bugs have been reported in the Node.js stream and file handling subsystems. The
fileHandle.readableWebStream
function crashes when handling large files due to premature garbage collection of the file handle. The stream subsystem's.pipeTo(Writable.toWeb(process.stdout))
results in a promise that never resolves, causing a warning about an unsettled top-level await. Additionally, using the--watch
CLI option in Node.js version 20.17.0 on Windows x64 prevents a Worker thread from sending a message to the main thread.
- Node.js DNS and CLI Issues on Windows: Node.js has encountered DNS and CLI issues specifically on Windows platforms. In Node.js v22.12, the
dns.lookup('localhost', { all: true })
function only returns the IPv6 address::1
, causing connection failures when a local server is listening on IPv4. Additionally, using an escaped space instead of quotes in the command line path results in a "MODULE_NOT_FOUND" error. The--run
argument fails to execute a script from apackage.json
file if the directory path contains an umlaut character.
- Node.js Debugger and Performance Enhancements: The Node.js Debugger has malfunctioned in versions 23.2.0 and 23.3.0, where breakpoints fail to activate correctly, causing the application to run without stopping at the defined breakpoints. A proposed enhancement to the
Writable
class API aims to improve performance by avoiding the slowsubarray
call, though concerns exist about the potential complexity and performance impact. Additionally, a test failure in thetest/parallel/test-crypto-oneshot-hash.js
file is caused by breaking changes in OpenSSL 3.4.0, requiring an output length to be specified.
- Node.js Pull Request Review Process: Concerns have been raised about the current guidelines for waiting times on pull requests in the Node.js project. The waiting times are calculated from the PR creation date rather than the date of the most recent commit. This can lead to PRs being merged immediately after a new commit is pushed if the PR was initially opened more than seven days ago, prompting proposals for solutions to ensure adequate review time after significant changes.
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: 18
Summarized Issues:
- Internal Compiler Error in
build-windows
Job: This issue involves an internal compiler error occurring in thebuild-windows
job on GitHub Actions for the Node.js project. The error is specifically related to dereferencing an operand of type 'v8::internal::compiler::turboshaft::WordRepresentation' in the V8 engine's code. It was resolved by downgrading Visual Studio from version 17.10 to 17.9, and a fix is expected in the next Visual Studio update.
- Lack of
Float16Array
Support: This issue concerns the lack of support forFloat16Array
in Node.js version 8's V8 engine. It results in aReferenceError
during serialization attempts. A potential interim solution is suggested by modifying thearrayBufferViewTypeToIndex
function to accommodateFloat16Array
once it becomes supported.
- Node.js Streams Event Emission: This issue discusses a behavior in Node.js streams where both 'readable' and 'data' event handlers are added. This results in both events being emitted, which seems to allow the buffer to be read in both flowing and paused modes simultaneously. This behavior is contrary to the expected behavior described in the documentation.
- Nomination of @ljharb as Collaborator: This issue involves the nomination of @ljharb to become a collaborator for the Node.js project. It highlights his extensive contributions and positive influence within the community. The nomination was successfully accepted, and plans for onboarding were made.
fs.readdir
Synchronous Execution: This issue addresses a problem in the Node.js project where thefs.readdir(path, { recursive: true })
function is executing synchronously even when called asynchronously. Discussions are ongoing on whether to document this behavior as a legacy issue or to implement a fix. A contributor has indicated they have a pull request nearly ready to resolve it.
chai.expect()
Error Properties Missing: This issue involves a bug in thetest_runner
subsystem where thechai.expect()
function's error properties, such asactual
andexpected
, are missing in the test reporter when functions are involved. This is due to limitations in process communication when usingnode --test
. It can be resolved by running with--test --experimental-test-isolation=none
.
- Security Vulnerability in Chromium's Web Streams: This issue addresses a security vulnerability in Chromium's implementation of web streams. A user could exploit JavaScript's synchronous execution to disrupt the invariants of
ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue
. It has been resolved by updating the Streams standard to delay certain method calls until the stream reaches a stable state, with Node.js being unaffected by this issue.
useSnapshot
Feature Bug on Darwin Platform: This issue involves a bug in Node.js version v22.11.0 on the Darwin platform, where using theuseSnapshot
feature in the SEA subsystem prevents the successful initiation of a worker thread. It consistently results in a native stack trace error, and it is suggested that the SEA functionality should be bypassed for worker threads during the bootstrap process as it is intended for the main thread.
- Incorrect CPU Model Name on Raspberry Pi 2: This issue involves a bug where the CPU model name is incorrectly resolved as "unknown" for a Raspberry Pi 2 running a specific Linux kernel. This is due to a mismatch in the marker string used by Node.js's libuv library to parse CPU information from
/proc/cpuinfo
. It can be fixed by updating the marker string to correctly identify the "model name" field for ARM processors.
csprng
Package Abort on Linux: This issue involves a bug where using thecsprng
package in Node.js version 22.11.0 on a Linux platform results in an abort due to a fatal JavaScript invalid size error. This is linked to a V8 engine limitation on string size. The expected behavior would be to throw an exception or provide a clear error message instead of aborting the entire Node process.
- Unhandled Rejection During
require
Call: This issue involves a bug in Node.js version 22 where an error thrown during arequire
call in a script is not caught by a try/catch block. This causes the process to exit with code 1, unlike in version 20 where it exits with code 0. The problem is due to module syntax detection treating the module as ESM and triggering an unhandled rejection.
- [ERR_ITERNAL_ASSERTION] JavaScript Error: This issue involves a JavaScript error labeled [ERR_ITERNAL_ASSERTION] occurring in a Node.js environment. It has been identified as a duplicate of a previously fixed bug in Node.js version 20.12+. It is suggested that the error, likely originating from an Electron app, should be reported to the Electron developers for a Node.js version update.
- Flame Graph Prefix Identifiers: This issue is about understanding the meaning of the prefix identifiers (JS:*, JS:+, and JS:^) that appear in the source functions of a flame graph when using the perf tool for JavaScript application performance analysis. A comment explains that these prefixes represent different compiler tiers.
Intl.NumberFormat
Incorrect Formatting: This issue involves a bug in Node.js version 22.12.0 where theIntl.NumberFormat
function for the "it-IT" locale incorrectly formats the number1000.99
as1000,99
instead of the expected1.000,99
. It has been identified that the problem may be related to an update to ICU 76.1, prompting a report to the ICU project for further investigation.
node -p
Command Promise Resolution: This issue discusses a change in Node.js 22 where thenode -p
command resolves promises earlier than in previous releases. This leads to a test failure in the pscript Python module's test suite. It is not considered a bug but rather a feature introduced in a semver-major update.
- Revert Discussion for Pull Request #55623: This issue involves a discussion about whether to revert a previously merged pull request (nodejs/node#55623) that introduced a bug in the Node.js project. A decision is required from the Technical Steering Committee (TSC) on whether to proceed with a fix or a revert, considering the implications on semantic versioning and the project's release process.
- Node.js KT Discussion: This issue, titled "Node js KT," appears to involve a discussion or documentation related to Node.js. The title and the presence of image attachments indicate this, but it lacks detailed information or comments to provide further context.
- Support for riscv64-linux Architecture: This issue requests the official support for the riscv64-linux architecture in Node.js. It highlights the need to compile Node from scratch or rely on existing packages. With Debian's recent official support for riscv64, it suggests that Node.js should consider following suit, offering financial support for hardware if needed.