Node.js: 2023-11-14, Version 21.2.0 (Current), @targos
Component: nodejs · Channel: stable. Automated analysis, not a compatibility certification. How this works.
Analysis updated: 2026-11-29.
Node.js v21.2.0 introduces new SEMVER-MINOR capabilities including `import.meta.dirname` and `import.meta.filename` for ES modules, navigator API expansions, and a built-in lcov reporter for the test runner. Upgrading provides useful platform improvements and diagnostic additions without requiring immediate code migrations.
💻 Software Engineers & Devs
You can now leverage `import.meta.dirname` and `import.meta.filename` in ES modules alongside expanded navigator properties and test runner capabilities like the built-in lcov reporter and `--test-timeout` flag.
📊 Product & Engineering Leads
Feature velocity increases as developers gain standardized ways to inspect directory metadata in ES modules and improved testing and coverage toolsets natively within Node.js.
⚙️ DevOps & Security
Ensure your build and test pipelines account for the new CLI flags and test runner enhancements, such as `--no-experimental-global-navigator` and `--test-timeout`.
✨ New Features & Capabilities (9)
- esm: add import.meta.dirname and import.meta.filename
- lib: add `--no-experimental-global-navigator` CLI flag
- lib: add navigator.language & navigator.languages
- lib: add navigator.platform
- stream: add support for `deflate-raw` format to webstreams compression
- test_runner: adds built in lcov reporter
- test_runner: add Date to the supported mock APIs
- test_runner, cli: add --test-timeout flag
- fs: add stacktrace to fs/promises
⚡ Performance & Enhancements (4)
- buffer: improve Buffer.equals performance
- stream: use Array for Readable buffer
- stream: optimize creation
- perf_hooks: reduce overhead of createHistogram
🔧 Bug Fixes & Patches (1)
- lib: fix assert shows diff messages in ESM and CJS
❓ Frequently Asked Questions
Does Node.js v21.2.0 contain breaking changes?
No, there are no documented breaking changes in v21.2.0; it introduces SEMVER-MINOR additions and enhancements.
What is the primary highlight of v21.2.0?
The primary highlights include the addition of `import.meta.dirname` and `import.meta.filename` for ES modules, new navigator properties, and a built-in lcov reporter for the test runner.
How should teams prepare to upgrade to v21.2.0?
Teams should review their test suites and tooling to take advantage of the new test runner flags and reporting capabilities, while verifying compatibility in their staging environments.