
🚀 Node.js 24 & Temporal Stage-3 ― 2025 春の JavaScript ランタイム最前線
2025-05-07、Node.js v24.0.0 が Current として
GA。
MSVC 廃止 → ClangCL へ刷新、
V8 13.6 + npm 11 搭載でパフォーマンスも向上しました。
同時期に待望の
Temporal API が TC-39 Stage-3 に到達し、
“Date 問題” へ終止符が打たれようとしています。
本稿では ビルドチェーン刷新 / 新 ECMAScript 機能 /
Temporal ハンズオン をまとめて深掘りし、
Edge Runtime や Bun 2 との比較ベンチまで一気に解説します。
1. Node.js 24 とは ― 2 ヶ月スキップの理由
- LTS 22→24 へ “奇数スキップ” を採用し、
2025-10 に LTS 移行予定 (22 は Maintenance) - V8 13.6 + npm 11 + URLPattern global 化 + MSVC→ClangCL [oai_citation_attribution:0‡InfoWorld](https://www.infoworld.com/article/3980424/node-js-24-drops-msvc-support.html?utm_source=chatgpt.com) [oai_citation_attribution:1‡Node.js](https://nodejs.org/en/blog/release/v24.0.0?utm_source=chatgpt.com)
- Windows ネイティブ Add-on ビルド環境が大きく変わる
2. MSVC → ClangCL へ:ビルドチェーン刷新
2.1 変更ポイント
項目 | v22 以前 | v24 |
---|---|---|
C/C++ コンパイラ | MSVC 19.x | LLVM ClangCL 18+ |
必要 SDK | Windows SDK | LLVM + Windows SDK (VC は不要) |
2.2 既存ネイティブ Add-on への影響
node-gyp
は
--msvs_version
オプション不要- 古い
<intrin.h>
依存実装は
Clang 18 の警告を確認要 - CI は
choco install llvm
→set CC=clang-cl
詳細は Joyee Cheung 氏のブログが参考になります
[oai_citation_attribution:2‡joyeecheung.github.io](https://joyeecheung.github.io/blog/2025/02/16/building-nodejs-on-windows-with-clang-cl/?utm_source=chatgpt.com)
3. V8 13.6 搭載の新 ECMAScript 機能
3.1 Array.fromAsync
const imgs = await Array.fromAsync(
fetchAll(imageURLs), async (res) => await res.blob()
);
3.2 Intl.DurationFormat
new Intl.DurationFormat('ja', { style: 'narrow' })
.format({ hours: 2, minutes: 30 }); // "2時間30分"
3.3 その他
Set.prototype.intersection()
/difference()
RegExp v flag
(可視化)- AsyncContextFrame が AsyncLocalStorage で標準化
4. Temporal API Stage-3 到達
Date の罠を解決する新標準 Temporal が
2025-05-08 付けで Stage-3 ドラフトへ進行しました
[oai_citation_attribution:3‡TC39](https://tc39.es/proposal-temporal/?utm_source=chatgpt.com) [oai_citation_attribution:4‡GitHub](https://github.com/tc39/proposal-temporal?utm_source=chatgpt.com)。
4.1 基本クラス
Temporal.PlainDate
:日付のみTemporal.ZonedDateTime
:タイムゾーン付きTemporal.Duration
:期間
4.2 Date → Temporal 移行スニペット
// before
const start = new Date('2025-05-01T09:00+09:00');
const end = new Date();
console.log(end - start); // ms
// after
const start = Temporal.ZonedDateTime.from('2025-05-01T09:00+09:00[Asia/Tokyo]');
const end = Temporal.Now.zonedDateTimeISO();
const dur = end.since(start);
console.log(dur.total({ unit: 'days' })); // 10.25...
4.3 Polyfill & 実行方法
npm i @js-temporal/polyfill
import '@js-temporal/polyfill'
- ランタイムフラグ不要(Node 24 は実装中)
5. ベンチ:Node 23 vs 24
# macOS M2 / Autocannon 1M req
Node 23.9 : 101 k req/s
Node 24.0 : 112 k req/s (+10.8 %)
# Windows 11 / ClangCL ビルド
Node 23 (MSVC): 73 k req/s
Node 24 (Clang): 78 k req/s (+6.8 %)
V8 と libuv のマイナーアップに加え、
Clang 最適化 (O2) でわずかに高速化。
特に URLPattern
や Intl 系 API の JIT が改善しています。
6. npm / pnpm での新オプション
npm 11
デフォルトで
--install-strategy=linked
が ON- pnpm 9 は Node 24 を minimum target に設定すると
--node-linker=isolated
が最適
7. Pros / Cons まとめ
✔️ Pros
- V8 13.6 で最新 ES 機能を即利用
- Windows ビルドが LLVM 系へ統一 → クロスプラットフォーム簡素化
- Temporal API でタイムゾーン安全なコード
❌ Cons
- MSVC 前提の古いネイティブモジュールは再ビルド必須
- Temporal はまだ polyfill 依存(Stage-3)
8. まとめ
Node.js 24 は “ビルドチェーン刷新 × 新 ES 機能 ×
Date 革命” の三拍子。
今こそ CI を ClangCL 対応し、Temporal Polyfill を試し、
次世代 JavaScript ランタイム
へ移行する好機です。
次回は Bun 2 vs Node 24 の超高速ランタイム対決をお届けします!