Node 25.4.0 solves the import require mess and adds more features


Node.js 25.4.0, the latest version of the current branch, is now available for download. This update focuses on moving many performance and debug features out of experimental status and marking them as stable. This update is therefore ideal for large and high-performance applications.
The biggest new thing here is the stabilization of the module’s compile cache. Node.js now officially marks the module’s build cache as stable, a move that should immediately impact performance, particularly startup times for large codebases. This feature allows you to compile modules in advance. This reduces the parsing and compilation overhead that often slows down initialization.
Besides this, the --build-snapshot And --build-snapshot-config Command line options are also marked as production ready. These snapshot tools work with the build cache to allow you to build precompiled environments. This is a huge win in terms of speed optimization, and it means we can start using these tools reliably without worrying about them changing or disappearing.
Module interoperability also takes a big step forward in this release. The ability to require(esm) is now officially stable. This feature has been long overdue for developers working in mixed environments. This significantly simplifies the process of integrating ES modules into existing CommonJS applications.
You can expect much smoother transitions when mixing module formats in the future. We’re also seeing some added flexibility to module paths. The update also allows imports of subpaths starting with a pound symbol, like #/. This provides a more flexible way to define and reference internal package paths.
The debugging and profiling tools are also seeing stability improvements, which is fantastic for diagnosing tricky memory issues. THE --heapsnapshot-near-heap-limit This option finally left experimental status. This option automatically triggers a heap snapshot when memory usage approaches a predefined limit. Furthermore, the v8.queryObjects() The method is also marked as stable, which gives you a nice tool for inspecting V8 objects at runtime.
On the networking side, Node.js adds a small but important quality of life feature for those working behind enterprise or complex network setups. The new http.setGlobalProxyFromEnv() the feature is included as a minor change. This feature allows you to configure a global HTTP proxy directly through environment variables, which is much more convenient than manually configuring proxy configurations in your application code. This is especially useful for developers working in enterprise environments where proxy settings are mandatory.
We also see a general improvement in the main utilities. THE util the module has a new function called convertProcessSignalToExitCode. This utility helps you handle process signals more predictably, by converting termination signals to standard exit codes. The internal assertion and utility functions have also been updated, with the team specifically focusing on comparison speed and fixing issues with deep comparison of invalid dates. This makes the kernel more reliable and faster.
As always, the release includes important dependency updates. Node.js 25.4.0 upgrades the bundled npm package to version 11.7.0. It also includes an update to the root certificates used by the encryption module, moving to NSS 3.117.
You can download and test these stable features today. Node.js 25.4.0 is available on all major platforms, including Windows, macOS (Intel and Apple Silicon), and various Linux distributions. You can find the installers and binaries directly on the Node.js site.
Source: Nodejs Blog



