The latest JavaScript runtime update also supports requiring code coverage thresholds are met before a process can exit. Credit: Aon Khanisorn Node.js 22.8.0, the latest release of the event-driven JavaScript runtime, adds a JavaScript API to enable on-disk caching of all modules loaded after the API is called, presenting a caching option for code. The API is called module.enable.CompileCache(). It overrides the NODE_COMPILE_CACHE environment variable, which only end users could use to enable on-disk caching. The new API lets tool and library authors manage the caching of their own code. The solution is a built-in alternative to v8-compile-cache packages, offering better performance and support for ESM (ECMAScript Modules). Introduced on September 3, Node 22.8.0 can be downloaded from Nodejs.org. It is classified as a current release rather than an LTS (long-term support) release. With this update, Node now supports requiring code coverage to meet a specific threshold before a process successfully exits. Developers who want to use this capability must set the –experimental-test-coverage flag. Thresholds can be set for types of coverage including branch, function, and line coverages. Also in version 22.8.0, a flavor of vm.createContext() has been added to create a context without contextifying its global object when vm.constants.DONT_CONTEXTIFY is used. This is suitable when users want to freeze the context or speed up global access if they do not need the interceptor behavior. Node 22.8.0 follows the August 22 release of Node 22.7.0, which featured experimental transform types support. Node 22 itself was announced April 24, emphasizing ESM and an improved WebSocket client. Related content feature 14 great preprocessors for developers who love to code Sometimes it seems like the rules of programming are designed to make coding a chore. Here are 14 ways preprocessors can help make software development fun again. By Peter Wayner Nov 18, 2024 10 mins Development Tools Software Development feature Designing the APIs that accidentally power businesses Well-designed APIs, even those often-neglected internal APIs, make developers more productive and businesses more agile. By Jean Yang Nov 18, 2024 6 mins APIs Software Development news Spin 3.0 supports polyglot development using Wasm components Fermyon’s open source framework for building server-side WebAssembly apps allows developers to compose apps from components created with different languages. By Paul Krill Nov 18, 2024 2 mins Microservices Serverless Computing Development Libraries and Frameworks news Go language evolving for future hardware, AI workloads The Go team is working to adapt Go to large multicore systems, the latest hardware instructions, and the needs of developers of large-scale AI systems. By Paul Krill Nov 15, 2024 3 mins Google Go Generative AI Programming Languages Resources Videos