Weekly GitHub Report for Node: February 24, 2025 - March 03, 2025
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.8.0
1.2 Version Information:
Released on February 13, 2025, this Node.js update introduces several key features, including support for using system CA certificates on macOS and Windows, the implementation of the URL Pattern API, and the addition of the zstd compression algorithm. Notable improvements also include naming threads for better debugging and updating timezone data to 2025a, reflecting changes like Paraguay's adoption of permanent -03 starting in spring 2024.
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. Bot comments are omitted.
-
Support type stripping in
node_modules
: This issue addresses the problem of encountering theERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING
error when importing TypeScript files from other packages, particularly in monorepos where local imports require building the changed package before use. The proposed solution is to introduce an opt-in feature, such as a flag or environment variable, that allows type stripping innode_modules
, thereby supporting TypeScript-only ecosystems in private packages without affecting public package standards.- The comments discuss various workarounds and opinions on the issue, including using loaders like
@nodejs-loaders/tsx
oramaro
, the implications of allowing TypeScript innode_modules
, and the potential impact on the ecosystem. Some contributors suggest using loaders for development but not in production due to performance concerns, while others debate the feasibility and risks of allowing TypeScript packages in the registry. The conversation also touches on alternative tools likets-blank-space
and the challenges of implementing a type-stripping feature in Node.js. - Number of comments this week: 39
- The comments discuss various workarounds and opinions on the issue, including using loaders like
-
Allow granular visibility for modules: This issue is about a request to implement a feature in Node.js that allows for granular visibility of modules, where certain modules can be made visible only to specific sibling or descendant files within a directory structure. The proposed solution involves using an
internal
directive at the top of a file to restrict the visibility of its exports to certain files, similar to how"use strict"
works in JavaScript.- The comments discuss the feasibility of implementing such a feature, with suggestions that it might be better handled by a linter or TypeScript rather than a change in JavaScript syntax. There is a debate about whether Node.js can support this through directives or metadata, and various alternatives like using file extensions or existing linter rules are considered. The conversation also touches on the limitations of current JavaScript specifications and the potential need for changes at the ECMAScript level.
- Number of comments this week: 17
-
import.meta.main: This issue discusses the need for a feature in Node.js that allows developers to easily determine if the current file was executed directly by Node, similar to features available in Deno and Bun. The proposal suggests implementing an
import.meta.main
feature, but there is debate over the naming due to potential confusion with existing concepts in Node.js, such as the "main" field in package.json.- The comments reflect a debate on the appropriateness of naming the feature "main," with some arguing it aligns with conventions in other languages, while others point out potential confusion with Node's existing "main" field. There is a discussion on whether Node should follow other runtimes or develop independently, with some emphasizing the importance of interoperability and others advocating for a unique solution due to Node's specific context.
- Number of comments this week: 8
-
The setInterval function can only be called 66 times per second under Windows.: This issue discusses a limitation in the
setInterval
function on Windows, where it can only be called 66 times per second instead of the expected 100 times. The problem is attributed to the default 64 Hz granularity of timers on Windows, which causes a 10 ms timer to be rounded up to the next interval, affecting the function's performance.- The comments explain that the behavior is not a bug but a result of JavaScript's single-threaded nature and Windows' timer granularity. It is noted that this issue is specific to Windows, as Linux performs better. Suggestions include marking the issue as invalid and possibly improving Node.js by adjusting timer granularity, though this would involve a trade-off between precision and CPU usage.
- Number of comments this week: 5
-
Node hard crash when importing napi module: This issue reports a hard crash occurring when importing a NAPI module built with Node version 22.14.0, which is incompatible with certain other Node versions, causing failures in applications like Electron. The problem is expected to be related to a version mismatch or undocumented changes in the NAPI version matrix, leading to unexpected behavior and crashes despite being within a try-catch block.
- The comments discuss the root cause being related to issues in external tools miscompiling the project due to incorrect version checks, rather than a direct bug in NAPI itself. There is also a mention of missing documentation for NAPI version 10, and a suggestion that the crash should not occur within a try-catch block, indicating a need for better handling of such errors.
- Number of comments this week: 4
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.
- Build error with clang on Mac OS X 10.15.7 (wasm-engine.cc:157:19: error: no viable overloaded '='): This issue involves a build error encountered when attempting to install Node.js version 22.1 on Mac OS X 10.15.7 using the Clang compiler. The error arises from a type mismatch in the
wasm-engine.cc
file, specifically at line 157, where there is no viable overloaded assignment operator to convert astd::unique_ptr
to astd::shared_ptr
, causing the build process to fail consistently. - Prevent [ERR_STREAM_PREMATURE_CLOSE] error log when intentionally closing a stream before end: This issue is about a problem encountered when intentionally closing a stream before it has finished processing, which results in an
[ERR_STREAM_PREMATURE_CLOSE]
error being logged to the console, despite the program terminating successfully with an exit code of 0. The user suspects that the error log might originate from another stream writing to the one being closed and is seeking a way to prevent this error log from appearing, as it does not seem to indicate an actual error in the program's execution. - http.request regression > v16 regression, 400 Bad Request is thrown when GET http.request has a payload: This issue describes a regression problem in the Node.js http.request function, where a 400 Bad Request error is encountered when a GET request is made with a payload, specifically affecting versions above v16. The problem occurs when using v20.13.0 on the client side and v16.16.0 on the server side, and it is suggested that either fixing the error or adding a warning for GET requests with a body could help prevent confusion and debugging difficulties for developers.
- Nodejs process crashed when using
console
to print some object. TypeError: Cannot read properties of undefined (reading 'reloadNavigation'): This issue involves a Node.js process crashing when attempting to use theconsole
to print certain properties of an object, specifically when accessingc.req
in the provided code snippet. The error, "TypeError: Cannot read properties of undefined (reading 'reloadNavigation')", suggests a potential bug in Node.js or incorrect usage of its internals, as indicated by the stack trace provided in the issue description. - Verify that
npm
is runnable in tests: This issue is about ensuring thatnpm
is properly packaged and functional in releases by incorporating checks into the testing process. It highlights past problems, as seen in issues #52682 and #52884, wherenpm
was not correctly included, suggesting that tests should verifynpm
's operability to prevent similar issues in the future.
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:
- Timer Granularity on Windows vs. Linux: The
setInterval
function on Windows is limited to 66 calls per second due to the operating system's default 64 Hz timer granularity, causing a 10 ms timer to round up to the next interval. In contrast, on Linux, the function achieves approximately 97 calls per second, highlighting a discrepancy in performance across operating systems.
- Memory Leak Issues in Node.js: Node.js version 22.0.0 and above experiences a memory leak when using the
Intl.DateTimeFormat
function, causing memory utilization to increase indefinitely. This behavior contrasts with the stable memory usage observed with theDate().toLocaleString(locale, options)
method, indicating a significant issue in memory management.
- Backporting libuv to Address Memory Leak: A request to backport libuv version 1.5 to Node.js version 22 LTS aims to address a memory leak problem affecting many Nuxt.js users on Windows. The issue is believed to be caused by libuv version 1.4, but an attempt to implement this change resulted in a CI failure.
- Test Runner and Test Suite Issues: Enhancements to the test-runner's watch mode include adding a timestamp to help users identify new output. Additionally, a bug in Node.js causes the test suite to fail to skip UCS2 tests on a ZFS filesystem with the
utf8only
option enabled, leading to test failures.
- Node.js Module and Feature Proposals: Proposals for Node.js include an opt-in feature for type stripping in
node_modules
to ease package building in monorepos and a feature for granular module visibility using aninternal
directive. These proposals aim to improve the development experience and module management in Node.js.
- Import Meta and Input Function Proposals: A proposal to introduce an
import.meta.main
feature in Node.js aims to determine if the current file is executed by Node, similar to features in Deno and Bun. Additionally, a Python-likeinput()
function is proposed to simplify standard input handling in Node.js.
- NAPI Module and Test Runner Bugs: Importing a NAPI module causes a hard crash in Node.js when built with version 22.14.0, leading to incompatibility with certain Node versions. Furthermore, the
node:test
module's test runner waits for abeforeExit
event before terminating, causing unexpected test run behavior.
- Flaky Test and Performance Degradation: A flaky test named
test-blob-slice-with-large-size
intermittently fails on the SmartOS platform due to aRangeError
. Additionally, thedeepStrictEqual
function in the Node.jsassert
module has experienced significant performance degradation, with increased execution times and memory usage in recent versions.
- Path Normalization Bug on Windows: A bug in Node.js version 20.18.2 on Windows causes the
path.normalize()
function to unexpectedly add a.\
to paths starting with:\
, potentially breaking functions that spawn or fork execs. This issue is believed to be related to a specific commit.
- QUIC Documentation Link Issue: A broken link to the QUIC documentation on the Node.js website results in a 404 error due to the quic.html file not being generated. Discussions highlight infrastructure and documentation generation challenges, including the use of NGINX and Cloudflare Worker.
- Float16Array Feature Flag Update: The feature flag for Float16Array has been enabled by default by a chromium/v8 contributor, with the change set to be released in Chrome M135. This update serves to inform the community about the status of this development.
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: 17
Summarized Issues:
- Node.js Version-Specific Bugs: Node.js version 23.7.0 has a regression where using the
--test
flag with the--watch
flag fails to display error details, a problem not present in Node 22. Additionally, thefs.rmSync
function in this version incorrectly returns anEACCES
error code instead ofENOTEMPTY
on a Darwin platform when removing a non-empty directory.
- Node.js Timer and DNS Bugs: A bug in the Node.js timers subsystem causes
clearImmediate
to prevent subsequentsetTimeout
callbacks from executing. Another issue in Node.js v23.4.0 on macOS involves a custom DNS lookup function that crashes Node.js with an assertion error when returning an array instead of a string IP address.
- Node.js Documentation and Typings Issues: The
http2.createSecureServer
method lacks documentation forstreamResetBurst
andstreamResetRate
options, leading to incorrect TypeScript typings. Additionally, the Web Crypto documentation page is not responsive on mobile devices, unlike other API documentation pages.
- Node.js Compilation and Assertion Errors: Node.js version 22.13.0 encounters a compilation error with AddressSanitizer due to ambiguous use of overloaded operators in the ICU library. An internal assertion error occurs randomly when starting an Express application on Windows, suspected to be caused by a Node.js bug or incorrect usage of its internals.
- Node.js Module and Package Issues: The
node:sqlite
module needs to support database location paths asString
,Buffer
, andURL
for consistency with other modules likefs
. The@mongodb-js/zstd
package fails to install on Node.js version 22.14 due to an "N-API version undefined" error, resolved by upgradingprebuild-install
.
- Node.js Error Handling and Security Concerns: The
ThrowInvalidURL
function in Node.js incorrectly constructs astd::string
from a null pointer, leading to undefined behavior. The absence of certain compilation options (PIE, SP, FS) in Node.js may introduce security vulnerabilities, though the issue was closed due to lack of explanation.
- Node.js Collaboration and Feature Proposals: @geeksilva97 is nominated to become a Node.js collaborator due to their significant contributions and community support. A proposal suggests adding a
String.prototype.titleCase()
method to JavaScript for native, efficient string formatting.
- Node.js Debugging and Assertion Errors: A user seeks guidance on selectively attaching a debugger to parent and child processes in a Node.js application. An 'ERR_INTERNAL_ASSERTION' error suggests a potential Node.js bug or incorrect usage, but the issue was closed due to a likely third-party module cause.
2.5 Issue Discussion Insights
This section will analyze the tone and sentiment of discussions within this project's open and closed issues that occurred within the past week. It aims to identify potentially heated exchanges and to maintain a constructive project environment.
Based on our analysis, there are no instances of toxic discussions in the project's open or closed issues from the past week.
III. Pull Requests
3.1 Open Pull Requests
This section provides a summary of pull requests that were opened in the repository over the past week. The top three pull requests with the highest number of commits are highlighted as 'key' pull requests. All other pull requests are grouped based on similar characteristics for easier analysis.
Pull Requests Opened This Week: 23
Key Open Pull Requests
1. fix(process): improve error message for process.cwd() when directory is deleted: This pull request aims to enhance the error message generated by process.cwd()
when the current working directory is deleted, by modifying the wrappedCwd()
function to provide a clearer explanation of the issue and suggest using process.chdir()
to resolve it, rather than creating a new error instance.
- URL: pull/57184
- Merged: No
2. child_process: disallow args in execFile/spawn when shell option is true: This pull request proposes changes to the Node.js child_process
module to disallow passing arguments to execFile
or spawn
when the shell
option is set to true, as this previously led to a false impression of argument escaping and potential security vulnerabilities, and it introduces a runtime deprecation warning for such usage, which will break existing code that relies on this behavior.
- URL: pull/57199
- Merged: No
3. lib: expose setupInstance
method on WASI class: This pull request proposes to expose the setupInstance
method on the WASI class to facilitate the use of shared memory in child threads without calling initialize
or start
, addressing the challenges faced in projects like wasip1-threads that require binding a WASI object to a WebAssembly instance and memory in such threads.
- URL: pull/57214
- Merged: No
Other Open Pull Requests
- Runtime Deprecation for Cipheriv and Decipheriv: This topic covers the proposal to deprecate the use of
Cipheriv(...)
andDecipheriv(...)
without thenew
keyword in Node.js. The pull requests suggest that it is safe to proceed with this change and discuss the potential need to deprecate direct creation even withnew
in favor of usingcreateCipheriv(...)
andcreateDecipheriv(...)
.
- Performance Enhancements in Node.js: This topic includes proposals to add a fast path for the
spawn
function in thechild_process
module and optimize thereadUInt16
andreadUInt24
functions in the buffer module. These changes aim to enhance performance by improving function execution speed and utilizing bitwise operators for efficiency.
- Error Handling Improvements: This topic focuses on enhancing error handling mechanisms within the Node.js source code. The pull requests aim to ensure more accurate propagation of errors and improve error handling in scenarios involving cached linked asynchronous module jobs.
- Code Quality and Maintenance: This topic covers various improvements to code quality and maintenance, such as fixing compilation errors, removing unused parameters, and setting code ownership. These changes aim to streamline the codebase and ensure proper configuration and ownership.
- Test Suite Enhancements: This topic involves enhancements to the Node.js test suite, including adding more test cases and marking tests as "flaky" due to potential issues. These pull requests aim to improve the accuracy and reliability of the tests by incorporating more instances of
common.mustNotCall
and addressing test performance issues.
- Configuration and Build System Updates: This topic includes updates to the configuration and build systems, such as adding a configuration subspace and addressing issues with silencing warnings. These changes aim to improve the build process and configuration management within the Node.js project.
- Project Management and Team Updates: This topic covers updates related to project management and team composition, such as adding new members to the triage team and removing unnecessary files. These pull requests aim to streamline project management and ensure efficient team collaboration.
- Code Optimization and Refactoring: This topic involves proposals to optimize and refactor code, such as utilizing cached strings and changing function return types. These changes aim to improve code efficiency and maintainability by reducing redundant operations and simplifying function signatures.
3.2 Closed Pull Requests
This section provides a summary of pull requests that were closed in the repository over the past week. The top three pull requests with the highest number of commits are highlighted as 'key' pull requests. All other pull requests are grouped based on similar characteristics for easier analysis.
Pull Requests Closed This Week: 46
Key Closed Pull Requests
1. timers: (clearImmediate) only accept immediate: This pull request addresses an issue in the Node.js project by modifying the clearImmediate
function to only accept immediate values, as detailed in the associated issue https://github.com/nodejs/node/issues/57063, and includes several commits that refine the implementation, update tests, and ensure code quality through linting and logical simplifications.
- URL: pull/57069
- Merged: 2025-03-01T23:54:52Z
2. sqlite,test,doc: accept Buffer and URL as paths: This pull request enhances the sqlite module by allowing it to accept Buffer and URL objects as valid database locations, as detailed in the commits and documentation updates, and it was successfully merged on February 27, 2025.
- URL: pull/56991
- Merged: 2025-02-27T17:43:14Z
3. esm: Source Phase Imports for WebAssembly: This pull request implements the Stage 3 Source Phase Imports proposal for Node.js, specifically focusing on WebAssembly integration, allowing developers to load uninstantiated Wasm modules through ESM syntax, thereby enabling custom instantiations and updating the VM API to accommodate this new feature, while also addressing related issues and future integration points.
- URL: pull/56919
- Merged: No
Other Closed Pull Requests
- Race Condition Fixes in Node.js Tests: This topic involves addressing a race condition issue in the Node.js project by updating specific tests. The solution includes multiple commits to refine the approach, such as switching to the .end() method and updating test files, with contributions from Matteo Collina and Luigi Pinca.
- Error Message Enhancements: Enhancements were made to error messages in Node.js, specifically for
process.cwd()
when the current directory is deleted. The changes provide clearer context and guidance on resolving the issue without creating a new error instance.
- Configuration File Handling: Node.js behavior was modified to use a
node.json
file as the default configuration with the--experimental-config-file
flag. This change applies unless a specific configuration file path is provided, enhancing script execution flexibility.
- Error Handling Improvements: Various components in Node.js, such as
tcp_wrap.cc
andtty_wrap.cc
, received updates to enhance error handling. These changes prevent process crashes by throwing catchable errors, with examples including custom error handling forObject.prototype
.
- Documentation Updates and Fixes: Several pull requests focused on updating and fixing documentation in the Node.js project. These include correcting broken links, updating function options, and ensuring accurate rendering of descriptions.
- Performance Optimizations: The Node.js library's priority queue was optimized by porting improvements from FastPriorityQueue.js. This resulted in significant performance gains, as shown by benchmark tests, without introducing breaking changes.
- Namespace and Configuration File Updates: Updates were made to namespace configuration file flags and test coverage for
node_config_file
. These changes were part of a follow-up to previous discussions, although not all were merged.
- Bug Fixes and Argument Corrections: A long-standing bug in Node.js was addressed by correcting argument orders in functions like
assertEncoding
. Additional improper uses ofERR_INVALID_ARG_VALUE
were also fixed.
- YAML Configuration Files: Two YAML configuration files were created to automate npm package publishing and set up CodeQL analysis. These files aim to streamline processes within the Node.js project.
- Network Module Enhancements: The network module was updated to emit an ERR_INVALID_IP_ADDRESS error for non-string addresses. This change prevents crashes and refines the implementation by removing unnecessary checks.
- QUIC Support and Build Updates: Node.js build processes were updated to support QUIC by modifying gyp files and test suites. These changes ensure compatibility with opt-in QUIC support and address build issues on Windows.
- Error Handling in Various Components: Error handling improvements were made in components like
spawn_sync
andmodule_wrap
. These changes replaceToLocalChecked()
usage to enhance error management.
- Typographical and Minor Fixes: Minor typographical errors in comments and documentation were corrected across various files. These changes do not alter executable code or impact existing tests.
- Test Enhancements and Additions: New test cases were added to assert return values of methods like
writeBigInt64BE
. These tests ensure methods return expected results, improving test coverage.
- Experimental Features and Flags: An experimental feature was introduced with the
--experimental-strip-node-modules
flag. This aims to address specific issues, although it was not merged into the project.
- README and Collaborator Updates: Updates to the README.md file and collaborator lists were proposed. These changes aim to keep documentation current and reflect recent project contributions.
3.3 Pull Request Discussion Insights
This section will analyze the tone and sentiment of discussions within this project's open and closed pull requests that occurred within the past week. It aims to identify potentially heated exchanges and to maintain a constructive project environment.
-
src: namespace config file flags
- Toxicity Score: 0.55 (Frustration expressed, Defensive responses, Mediation attempts, Escalating tension)
- This GitHub conversation involves several users discussing a pull request, with username1 expressing frustration over the lack of progress and username2 responding defensively. The tone shifts from collaborative to tense as username3 attempts to mediate, but username1's continued dissatisfaction escalates the tension.
-
module: add --experimental-strip-node-modules flag
- Toxicity Score: 0.55 (Defensive responses, unresolved tension, mediation attempts.)
- This GitHub conversation involves username1 proposing a new feature, which is met with initial support from username2, but username3 raises concerns about potential issues. Username1 responds defensively, leading to a back-and-forth with username3, where the tone becomes increasingly tense. Username4 attempts to mediate, suggesting a compromise, but the discussion remains unresolved.
IV. Contributors
4.1 Contributors
Active Contributors:
We consider an active contributor in this project to be any contributor who has made at least 1 commit, opened at least 1 issue, created at least 1 pull request, or made more than 2 comments in the last month.
If there are more than 10 active contributors, the list is truncated to the top 10 based on contribution metrics for better clarity.
Contributor | Commits | Pull Requests | Issues | Comments |
---|---|---|---|---|
jasnell | 45 | 11 | 4 | 60 |
aduh95 | 44 | 2 | 2 | 68 |
joyeecheung | 56 | 6 | 0 | 37 |
targos | 58 | 2 | 3 | 29 |
anonrig | 28 | 4 | 2 | 22 |
gurgunday | 24 | 9 | 0 | 23 |
geeksilva97 | 29 | 3 | 1 | 22 |
marco-ippolito | 21 | 7 | 0 | 18 |
cjihrig | 6 | 1 | 1 | 29 |
dario-piotrowicz | 15 | 1 | 1 | 15 |