Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Node V18 について
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
ryota kise
August 25, 2022
77
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Node V18 について
Node V18 でどんな変更があったのかについて共有しました。
ryota kise
August 25, 2022
More Decks by ryota kise
See All by ryota kise
構造体初期化の方法について
mmmommm
0
240
Node.jsデザインパターンを読んで
mmmommm
2
11k
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
230
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.9k
Exploring anti-patterns in Rails
aemeredith
3
500
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
320
Crafting Experiences
bethany
1
310
sira's awesome portfolio website redesign presentation
elsirapls
0
410
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
520
Transcript
Node V18について 社名:CAM 名前:吉瀬遼太
変更点 - fetchがフラグなしで使えるようになった - web stream APIの一連のクラスが追加された - Blob BloadcastChannelがグローバルで使用可能になった
node:buffer からimportする必要がなくなった - 標準のテストが追加された - V8のバージョンが 10.1 になった - server.headersTimeoutがデフォルトで 0->60000ms(1分)になった クライアントからのヘッダー受信のタイムアウト - server.requestTimeoutがデフォルトで 0->300000ms(5分)になった クライアントからのリクエスト受信のタイムアウト
fetch 元々ブラウザ側に存在していた fetch API をサーバー側にも追加した形 XHRで行うAPIへのリクエストの代替だけではなく imgタグ用の画像のバイナリデータ取 得を行ったりするため、用途として完全に同じではないがインターフェースとしては同じ です
Web Stream API 元々Node.jsにあったStream API はブラウザとの互換性がなかったため、従来の Stream API を残しつつブラウザに互換性のある Stream
API を追加 以前は ‘node:stream/web’ から import しないといけなかったがグローバルに追加
標準のテスト node:test モジュールが追加、最低限の assert などが生えています まだ単一ファイルの実行しかできないですが機能が揃って来れば最低限のテストなら Jestとかをインストールせずにできるので便利そうです
V8のバージョンアップ 配列の新たなメソッド findLast() findLastIndex() が追加 find() や findIndex() は前からですが後ろから数えられるように
Intl.Locale API Intl.supportedValuesOf 関数 が追加 Intl.Locale オブジェクトに calendars や timeZones
などのプロパティがあり そのロケールで使用されているものをみることができる Intl.supportedValuesOf() を使用するとそれらのプロパティがどんな値をサポートしてい るのか確認することができる i18n対応をする際に使用されているようです、ギリシャの暦に対応しなくてはならないみ たいな時に - https://v8.dev/blog/v8-release-99#intl.locale-extensions - https://v8.dev/blog/v8-release-99#intl-enumeration
node: プレフィックスとは? このプレフィックスをつけることで、Nodeのコアモジュールであることを明示することがで きる Nodeのコアモジュールに対してつけることができ、このプレフィックスのあるなしで動作 は変わらない V18の変更点である、node:test は node: プレフィックスが必須のモジュールになってい
る 実はnodeV14 からあったらしい