Skip to content

Commit 1895614

Browse files
authored
Merge pull request #1279 from jser/jser-week-734
2025-05-07のJS: koa v3.0.0、Node.js 24とNode.js 18 EOL、`//# allFunctionsCalledOnLoad`
2 parents 89d36d9 + f3667b2 commit 1895614

File tree

1 file changed

+245
-0
lines changed

1 file changed

+245
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,245 @@
1+
---
2+
title: "2025-05-07のJS: koa v3.0.0、Node.js 24とNode.js 18 EOL、`//# allFunctionsCalledOnLoad`"
3+
author: "azu"
4+
layout: post
5+
date: 2025-05-07T00:31:48.346Z
6+
category: JSer
7+
tags:
8+
- nodejs
9+
- React
10+
- esbuild
11+
- Firefox
12+
- polyfill
13+
14+
---
15+
16+
JSer.info #734 - Koa v3.0.0がリリースされました。
17+
18+
- [Release v3.0.0 · koajs/koa](https://github.com/koajs/koa/releases/tag/v3.0.0)
19+
- [koa/docs/migration-v2-to-v3.md at master · koajs/koa](https://github.com/koajs/koa/blob/master/docs/migration-v2-to-v3.md)
20+
21+
Node.js 18未満のサポート終了、Generatorを使ったMiddlewareのサポートを終了など破壊的な変更が含まれています。新機能として、`app.currentContext`でAsyncLocalStorageを使用した現在のコンテキスト取得をサポート、`Blob`/`ReadableStream`/`Response`のサポート、カスタムストリームのサポートなどが追加されています。
22+
23+
----
24+
25+
Node.jsのv24がリリースされました。
26+
27+
- [Node.js — Node v24.0.0 (Current)](https://nodejs.org/en/blog/release/v24.0.0)
28+
29+
Node.js 24では、V8 13.6へアップデート、npm 11の同梱、AsyncLocalStorageのAsyncContextFrameのデフォルト化、`URLPattern`のグローバル追加などの変更が含まれています。また、パーミッションモデルが`--permission`フラグで利用できるようになりました。
30+
31+
また、Node.js 18は2025年4月30日でEOL(End Of Support)となりました。
32+
33+
- [Node.js — Node.js Releases](https://nodejs.org/en/about/previous-releases)
34+
35+
----
36+
37+
V8エンジンに新しいコンパイルヒントの仕組みが実装されています。
38+
39+
- [Giving V8 a Heads-Up: Faster JavaScript Startup with Explicit Compile Hints · V8](https://v8.dev/blog/explicit-compile-hints)
40+
41+
`//# allFunctionsCalledOnLoad`というコメントによって、JavaScriptファイルのeager compilationを指定できる仕組みが実装されています。これにより、ファイル内の関数のコンパイルタイミングを制御でき、起動時のパフォーマンス最適化が可能になります。
42+
一方で、なんでもコンパイルすると時間とメモリを消費してしまう問題があることについても触れられています。
43+
44+
- [WICG/explicit-javascript-compile-hints-file-based: This proposal introduces a new magic comment that signals to browsers that the functions in a JavaScript file are likely to be needed by the website. Spec draft: https://wicg.github.io/explicit-javascript-compile-hints-file-based/](https://github.com/WICG/explicit-javascript-compile-hints-file-based)
45+
46+
----
47+
48+
{% include inline-support.html %}
49+
50+
----
51+
52+
<h1 class="site-genre">ヘッドライン</h1>
53+
54+
----
55+
56+
## react-router/CHANGELOG.md at main · remix-run/react-router
57+
[github.com/remix-run/react-router/blob/main/CHANGELOG.md#v752](https://github.com/remix-run/react-router/blob/main/CHANGELOG.md#v752 "react-router/CHANGELOG.md at main · remix-run/react-router")
58+
<p class="jser-tags jser-tag-icon"><span class="jser-tag">React</span> <span class="jser-tag">library</span> <span class="jser-tag">ReleaseNote</span></p>
59+
60+
React Router v7.5.2リリース。
61+
`X-React-Router-Prerender-Data`ヘッダーと`X--React-Router-SPA-Mode`ヘッダーに関する脆弱性を修正するセキュリティ修正
62+
63+
- [URL manipulation via Host / X-Forwarded-Host headers · Advisory · remix-run/react-router](https://github.com/remix-run/react-router/security/advisories/GHSA-4q56-crqp-v477 "URL manipulation via Host / X-Forwarded-Host headers · Advisory · remix-run/react-router")
64+
- [React Router and the Remix’ed path - zhero\_web\_security](https://zhero-web-sec.github.io/research-and-things/react-router-and-the-remixed-path "React Router and the Remix’ed path - zhero\_web\_security")
65+
66+
----
67+
68+
## Release v0.25.3 · evanw/esbuild
69+
[github.com/evanw/esbuild/releases/tag/v0.25.3](https://github.com/evanw/esbuild/releases/tag/v0.25.3 "Release v0.25.3 · evanw/esbuild")
70+
<p class="jser-tags jser-tag-icon"><span class="jser-tag">esbuild</span> <span class="jser-tag">ReleaseNote</span></p>
71+
72+
esbuild v0.25.3リリース。
73+
`--serve=`オプションでカスタムホストの指定を許可するように、CSS Nestingの制限を追加など
74+
75+
76+
----
77+
78+
## Firefox 138.0, See All New Features, Updates and Fixes
79+
[www.mozilla.org/en-US/firefox/138.0/releasenotes/](https://www.mozilla.org/en-US/firefox/138.0/releasenotes/ "Firefox 138.0, See All New Features, Updates and Fixes")
80+
<p class="jser-tags jser-tag-icon"><span class="jser-tag">Firefox</span> <span class="jser-tag">ReleaseNote</span></p>
81+
82+
Firefox 138リリース。
83+
`importmap``integrity`をサポート、`Error.captureStackTrace()`をサポート、ES Proposal Stage 3の`Error.isError()`をサポート。
84+
Import Attributesを使ったJSONのimportをサポート、`Clear-Site-Data``cache`ディレクティブをサポート。
85+
FedCM APIのLogin Status APIをサポート、Web Audio APIのMessage Portをサポート。
86+
フラグ付きでMutationEventの削除、HTML Sanitizer APIのサポートなど
87+
88+
- [Firefox 138 for developers - Mozilla | MDN](https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/138 "Firefox 138 for developers - Mozilla | MDN")
89+
90+
----
91+
92+
## Release 3.42.0 - 2025.04.30 · zloirock/core-js
93+
[github.com/zloirock/core-js/releases/tag/v3.42.0](https://github.com/zloirock/core-js/releases/tag/v3.42.0 "Release 3.42.0 - 2025.04.30 · zloirock/core-js")
94+
<p class="jser-tags jser-tag-icon"><span class="jser-tag">JavaScript</span> <span class="jser-tag">polyfill</span> <span class="jser-tag">ReleaseNote</span></p>
95+
96+
core-js v3.42.0リリース。
97+
Map upsert proposalの更新、Iterator HelpersをES2025の仕様に合わせた変更など
98+
99+
100+
----
101+
102+
## Deno 2.3: Improved deno compile, local npm packages, and more
103+
[deno.com/blog/v2.3](https://deno.com/blog/v2.3 "Deno 2.3: Improved deno compile, local npm packages, and more")
104+
<p class="jser-tags jser-tag-icon"><span class="jser-tag">deno</span> <span class="jser-tag">ReleaseNote</span></p>
105+
106+
Deno v2.3リリース。
107+
`deno compile`でFFIとNode.js Native Addonのサポート、ローカルのnpmパッケージを参照できるように、`deno fmt`のオプションを追加。
108+
Windowsの`deno`バイナリにコード署名をするように変更など
109+
110+
111+
----
112+
113+
## ESLint v9.26.0 released - ESLint - Pluggable JavaScript Linter
114+
[eslint.org/blog/2025/05/eslint-v9.26.0-released/](https://eslint.org/blog/2025/05/eslint-v9.26.0-released/ "ESLint v9.26.0 released - ESLint - Pluggable JavaScript Linter")
115+
<p class="jser-tags jser-tag-icon"><span class="jser-tag">ESLint</span> <span class="jser-tag">ReleaseNote</span></p>
116+
117+
ESLint v9.26.0リリース。
118+
`eslint --mcp`でMCPサーバとして起動できるように、`no-unused-expressions`ルールに`ignoreDirectives`オプションを追加など
119+
120+
121+
----
122+
123+
## Electron 36.0.0 | Electron
124+
[www.electronjs.org/blog/electron-36-0](https://www.electronjs.org/blog/electron-36-0 "Electron 36.0.0 | Electron")
125+
<p class="jser-tags jser-tag-icon"><span class="jser-tag">Electron</span> <span class="jser-tag">ReleaseNote</span></p>
126+
127+
Electron 36.0.0リリース。
128+
Chromium 136、V8 13.6、Node 22.14.0にアップグレード。
129+
macOSのWriting ToolsやAutofill、Servicesメニューをサポートする新しい`menu.popup`オプションを追加。
130+
GTK 4がGNOMEでのデフォルトに変更。`NativeImage.getBitmap()`が非推奨に、`session.loadExtension`などが非推奨となり`Extensions`オブジェクトに移動された。
131+
132+
133+
----
134+
135+
## Release v3.0.0 · koajs/koa
136+
[github.com/koajs/koa/releases/tag/v3.0.0](https://github.com/koajs/koa/releases/tag/v3.0.0 "Release v3.0.0 · koajs/koa")
137+
<p class="jser-tags jser-tag-icon"><span class="jser-tag">nodejs</span> <span class="jser-tag">ReleaseNote</span></p>
138+
139+
Koa v3.0.0リリース。
140+
Node.js 18未満のサポート終了、Generatorを使ったMiddlewaのサポートを終了、`res.redirect('back')`を削除し`ctx.back()`を追加。
141+
`app.currentContext`でAsyncLocalStorageを使用した現在のコンテキスト取得をサポート。`Blob`/`ReadableStream`/`Response`のサポート、カスタムストリームのサポートなど
142+
143+
- [koa/docs/migration-v2-to-v3.md at master · koajs/koa](https://github.com/koajs/koa/blob/master/docs/migration-v2-to-v3.md "koa/docs/migration-v2-to-v3.md at master · koajs/koa")
144+
145+
----
146+
147+
## Node.js — Node.js Releases
148+
[nodejs.org/en/about/previous-releases](https://nodejs.org/en/about/previous-releases "Node.js — Node.js Releases")
149+
<p class="jser-tags jser-tag-icon"><span class="jser-tag">nodejs</span> <span class="jser-tag">news</span></p>
150+
151+
Node.js 18は2025年4月30日でEOL(End Of Support)となった。
152+
153+
154+
----
155+
156+
## Release 21.0.0 · nrwl/nx
157+
[github.com/nrwl/nx/releases/tag/21.0.0](https://github.com/nrwl/nx/releases/tag/21.0.0 "Release 21.0.0 · nrwl/nx")
158+
<p class="jser-tags jser-tag-icon"><span class="jser-tag">JavaScript</span> <span class="jser-tag">Tools</span> <span class="jser-tag">ReleaseNote</span></p>
159+
160+
Nx 21.0.0リリース。
161+
Node.js 20.19.0以上が必要となり、`outputStyle=compact`の削除、`readWorkspaceConfig`の廃止などの破壊的変更を含む。
162+
continuous taskの追加、タスク用のTerminal UI機能の追加、GitLabリリースのサポートなど
163+
164+
- [RFC: Continuous Tasks · nrwl/nx · Discussion #29025](https://github.com/nrwl/nx/discussions/29025 "RFC: Continuous Tasks · nrwl/nx · Discussion #29025")
165+
166+
----
167+
168+
## Release v0.25.4 · evanw/esbuild
169+
[github.com/evanw/esbuild/releases/tag/v0.25.4](https://github.com/evanw/esbuild/releases/tag/v0.25.4 "Release v0.25.4 · evanw/esbuild")
170+
<p class="jser-tags jser-tag-icon"><span class="jser-tag">esbuild</span> <span class="jser-tag">ReleaseNote</span></p>
171+
172+
esbuild v0.25.4リリース。
173+
開発サーバーに`cors`オプションで`Access-Control-Allow-Origin`ヘッダを設定できるように。
174+
175+
176+
----
177+
178+
## Node.js — Node v24.0.0 (Current)
179+
[nodejs.org/en/blog/release/v24.0.0](https://nodejs.org/en/blog/release/v24.0.0 "Node.js — Node v24.0.0 (Current)")
180+
<p class="jser-tags jser-tag-icon"><span class="jser-tag">nodejs</span> <span class="jser-tag">ReleaseNote</span></p>
181+
182+
Node.js v24.0.0リリース。
183+
V8 13.6へアップデート、npm 11を同梱、AsyncLocalStorageがAsyncContextFrameをデフォルトで使用するように。
184+
`URLPattern`をグローバルに追加、パーミッションモデルが`--permission`フラグで利用できるように、テストランナーの改善、Undici 7を同梱。
185+
`url.parse()`を非推奨に変更など。
186+
2025年10月にLTSとなる予定。
187+
188+
- [What’s New with Node.js 24 | OpenJS Foundation](https://openjsf.org/blog/nodejs-24-released "What’s New with Node.js 24 | OpenJS Foundation")
189+
190+
----
191+
<h1 class="site-genre">アーティクル</h1>
192+
193+
----
194+
195+
## フロントエンド API コール時のエラーハンドリングを軽く整理(Fetch API・typescript-fetch・TanStack Query) - カミナシ エンジニアブログ
196+
[kaminashi-developer.hatenablog.jp/entry/2025/04/30/080000](https://kaminashi-developer.hatenablog.jp/entry/2025/04/30/080000 "フロントエンド API コール時のエラーハンドリングを軽く整理(Fetch API・typescript-fetch・TanStack Query) - カミナシ エンジニアブログ")
197+
<p class="jser-tags jser-tag-icon"><span class="jser-tag">Fetch</span> <span class="jser-tag">TypeScript</span> <span class="jser-tag">JavaScript</span> <span class="jser-tag">article</span> <span class="jser-tag">HTTP</span></p>
198+
199+
Fetch API/Open APIの`typescript-fetch`、TanStack QueryのFetchの例外処理について
200+
201+
202+
----
203+
204+
## Giving V8 a Heads-Up: Faster JavaScript Startup with Explicit Compile Hints · V8
205+
[v8.dev/blog/explicit-compile-hints](https://v8.dev/blog/explicit-compile-hints "Giving V8 a Heads-Up: Faster JavaScript Startup with Explicit Compile Hints · V8")
206+
<p class="jser-tags jser-tag-icon"><span class="jser-tag">JavaScript</span> <span class="jser-tag">V8</span> <span class="jser-tag">article</span></p>
207+
208+
`//# allFunctionsCalledOnLoad` のコメントで、JavaScriptファイルをeager compilationをする仕組みをV8に実装している話。
209+
JavaScriptは関数をコンパイルするにはファイルをパースをする必要があるため、コンパイルが必要かを判断するにも時間がかかってしまう。そのため、ファイルの先頭のコメントでコンパイルするべきかを判断できるようにするための仕組み
210+
211+
212+
----
213+
<h1 class="site-genre">ソフトウェア、ツール、ライブラリ関係</h1>
214+
215+
----
216+
217+
## Intent UI
218+
[intentui.com/](https://intentui.com/ "Intent UI")
219+
<p class="jser-tags jser-tag-icon"><span class="jser-tag">React</span> <span class="jser-tag">UI</span> <span class="jser-tag">library</span></p>
220+
221+
React Aria Componentsベースのshadcnライクなコピーペースト可能なコンポーネントライブラリ
222+
223+
224+
----
225+
226+
## zumerlab/snapdom: snapDOM captures DOM nodes as images with exceptional speed and accuracy.
227+
[github.com/zumerlab/snapdom](https://github.com/zumerlab/snapdom "zumerlab/snapdom: snapDOM captures DOM nodes as images with exceptional speed and accuracy.")
228+
<p class="jser-tags jser-tag-icon"><span class="jser-tag">JavaScript</span> <span class="jser-tag">SVG</span> <span class="jser-tag">Image</span> <span class="jser-tag">library</span></p>
229+
230+
SVGの`<foreignObject>`を使いDOM要素を画像にするライブラリ。
231+
Shadow DOM、疑似要素、背景画像、フォントの埋め込みやdata属性での除外などに対応している
232+
233+
- [bubkoo/html-to-image: ✂️ Generates an image from a DOM node using HTML5 canvas and SVG.](https://github.com/bubkoo/html-to-image "bubkoo/html-to-image: ✂️ Generates an image from a DOM node using HTML5 canvas and SVG.")
234+
235+
----
236+
237+
## pulsar-edit/pulsar: A Community-led Hyper-Hackable Text Editor
238+
[github.com/pulsar-edit/pulsar](https://github.com/pulsar-edit/pulsar "pulsar-edit/pulsar: A Community-led Hyper-Hackable Text Editor")
239+
<p class="jser-tags jser-tag-icon"><span class="jser-tag">atom</span> <span class="jser-tag">editor</span> <span class="jser-tag">JavaScript</span></p>
240+
241+
Atom EditorをForkしたエディタ。
242+
Atom向けに作られたパッケージも動くようにしている
243+
244+
245+
----

0 commit comments

Comments
 (0)