Frontend Weekly 2025-04-11
Express.js v5.1.0のLTSリリース、ESLint v9.24.0のバルクサプレッション機能、Next.js 15.3のTurbopack build対応と新しいhooks、Bun v1.2.9のRedisクライアント追加について。
Express v5.1.0 LTSリリース
日付:2025年3月31日
Express 5.1.0がリリースされた。Uint8Array
のres.send()
サポート、依存関係のバージョンロック解除、ETagオプション追加、パフォーマンス改善を含む。
LTS戦略が更新され、メジャーバージョンのサポートフェーズを3段階(CURRENT、ACTIVE、MAINTENANCE)に定義。v4.xは2025年4月1日からMAINTENANCEフェーズに移行し、2026年10月1日以降にEOL。v5.xは2025年3月31日からACTIVEフェーズに移行。v6.xの開発は2026年1月1日以降のリリースを予定。
出展:Express.js v5.1.0: Now the Default on npm with LTS Timeline
ESLint v9.24.0リリース
日付:2025年4月4日
ESLint v9.24.0がリリースされた。バルクサプレッション機能を追加。新しいルールを"error"
として有効化する際に、既存の違反を一度に抑制可能。TypeScriptの構文サポートが4つのコアルールに追加。Node.js 22.10.0以上で--experimental-strip-types
フラグを使用してTypeScript設定ファイルをネイティブに読み込み可能。
バルクサプレッションの仕組み
バルクサプレッションはeslint-suppressions.json
ファイルに違反を記録。各ファイルごとのルール違反数を記録する。
{
"src/file1.js": {
"no-undef": {
"count": 1
}
},
"src/file2.js": {
"no-unused-expressions": {
"count": 2
}
}
}
以下のコマンドで使用可能:
# すべての自動修正可能な違反を修正し、残りを抑制
eslint --suppress-all --fix
# 特定のルールの違反のみを抑制
eslint --suppress-rule <rule-name> --fix
出展:Introducing bulk suppressions
Next.js 15.3リリース
日付:2025年4月9日
Next.js 15.3がリリースされた。Turbopackのnext buildでのサポート。実験的な機能としてRspackのサポート。Client Instrumentation hookとNavigation hooksを追加。TypeScript pluginの改善により大規模なcodebaseでのサポートを向上など。
出展:Next.js 15.3
Client Instrumentation hook
instrumentation-client.js|ts
ファイルでフロントエンドコード実行前にmonitoringやanalyticsコードを追加可能。
// instrumentation-client.js
performance.mark('app-init');
console.log('Analytics initialized');
window.addEventListener('error', (event) => {
reportError(event.error);
});
出展:Next.js 15.3#client-instrumentation-hook
Navigation hooks
onNavigate
はLink
コンポーネントの新しいプロパティ。client-side navigation中に実行される。
<Link
href="/about"
onNavigate={(e) => {
startTransitionAnimation();
if (shouldCancelNavigation) {
e.preventDefault();
}
}}
>
About
</Link>
useLinkStatus
はClient Component hook。navigationの進行状況を監視可能。
function LoadingIndicator() {
const { pending } = useLinkStatus();
return pending ? <div>Loading...</div> : null;
}
<Link href="/about">
About
<LoadingIndicator />
</Link>
出展:Next.js 15.3#navigation-hooks
Bun v1.2.9リリース
日付:2025年4月9日
Bun v1.2.9がリリースされた。組み込みのRedisクライアントを追加。Bun.redis
はioredis
と比較して最大85%高速。1000件のバッチ処理でioredis
が10.095秒、Bun.redis
が4.22秒。
import { redis, RedisClient } from "bun";
await redis.set("foo", "bar");
const value = await redis.get("foo");
console.log(value); // "bar"
const custom = new RedisClient("redis://localhost:6379");
Bun.S3Client
にListObjectsV2
のサポートを追加。libuv
のシンボル追加、require.extensions
の互換性改善、node:http
やAsyncLocalStorage
のバグ修正を含む。
出展:Bun v1.2.9