|
| 1 | +--- |
| 2 | +title: "2024-06-13のJS: Storybook 8.1、Turborepo 2.0、Node v22.3.0(Snapshot Testing)" |
| 3 | +author: "azu" |
| 4 | +layout: post |
| 5 | +date: 2024-06-13T04:55:14.651Z |
| 6 | +category: JSer |
| 7 | +tags: |
| 8 | +- nodejs |
| 9 | +- TypeScript |
| 10 | +- Tools |
| 11 | +- test |
| 12 | +- RegExp |
| 13 | + |
| 14 | +--- |
| 15 | + |
| 16 | +JSer.info #696 - Storybook 8.1がリリースされました。 |
| 17 | + |
| 18 | +- [Storybook 8.1](https://storybook.js.org/blog/storybook-8-1/) |
| 19 | + |
| 20 | +Storyファイルを作成するUIの追加、Subpath importsを使ったモックの対応、Playwright Component Testの対応しています。 |
| 21 | + |
| 22 | +`pacakge.json`の`imports`フィールドで特定のモジュールを条件分岐して読み分けるための仕組みである[Subpath imports](https://nodejs.org/api/packages.html#subpath-imports)については、次の記事でも解説されています。 |
| 23 | + |
| 24 | +- [Type-safe module mocking in Storybook](https://storybook.js.org/blog/type-safe-module-mocking/?ref=storybookblog.ghost.io) |
| 25 | +- [Mocking modules • Storybook docs](https://storybook.js.org/docs/writing-stories/mocking-modules?ref=storybookblog.ghost.io) |
| 26 | + |
| 27 | +その他には、React 19/Angular 18のサポートなども含まれています。 |
| 28 | + |
| 29 | +--- |
| 30 | + |
| 31 | +Turborepo 2.0がリリースされました。 |
| 32 | + |
| 33 | +- [Turborepo 2.0](https://turbo.build/blog/turbo-2-0) |
| 34 | + |
| 35 | +Turborepoはmonorepo向けのビルド/タスク管理ツールです。 |
| 36 | +Turborepo 2.0ではターミナルUIの刷新、`persistent`オプションの追加、`turbo watch`の追加、ドキュメントの刷新などが行われています。 |
| 37 | + |
| 38 | +--- |
| 39 | + |
| 40 | +Node.js 22.3.0がリリースされました。 |
| 41 | + |
| 42 | +- [Node.js — Node v22.3.0 (Current)](https://nodejs.org/en/blog/release/v22.3.0) |
| 43 | + |
| 44 | +`Buffer`に`bytes()`を実装、experimentalフラグ付きでTest RunnerでのSnapshot Testingが実装されています。 |
| 45 | + |
| 46 | +- https://nodejs.org/api/test.html#snapshot-testing |
| 47 | +- [test_runner: add snapshot testing by cjihrig · Pull Request #53169 · nodejs/node](https://github.com/nodejs/node/pull/53169) |
| 48 | + |
| 49 | +---- |
| 50 | + |
| 51 | +{% include inline-support.html %} |
| 52 | + |
| 53 | +---- |
| 54 | + |
| 55 | +<h1 class="site-genre">ヘッドライン</h1> |
| 56 | + |
| 57 | +---- |
| 58 | + |
| 59 | +## Announcing TypeScript 5.5 RC - TypeScript |
| 60 | +[devblogs.microsoft.com/typescript/announcing-typescript-5-5-rc/](https://devblogs.microsoft.com/typescript/announcing-typescript-5-5-rc/ "Announcing TypeScript 5.5 RC - TypeScript") |
| 61 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">TypeScript</span> <span class="jser-tag">ReleaseNote</span></p> |
| 62 | + |
| 63 | +TypeScript 5.5 RCリリース。 |
| 64 | +関数からtype predicatesを推論できるようになり、`Array.prototype.filter`などでの絞り込みが簡潔に書けるように。 |
| 65 | +Stage 3のSet Methodsをサポート。 |
| 66 | +JSDocで`@import {foo} from "foo"`をサポート、正規表現の基本的な構文チェックをサポート、`isolatedDeclarations`をサポート。 |
| 67 | +設定ファイル内で`${configDir}`のテンプレート値をサポート。 |
| 68 | +`typescript`パッケージのサイズを削減、Named Importをサポート、`transpileDeclaration` APIの追加。 |
| 69 | +`transpileModule`と`transpileDeclaration`でのビルド時間を改善。 |
| 70 | +`out`や`target: ES3`などの非推奨となっていたオプションが無効化され、`ignoreDeprecations`オプションを指定しないと利用できなくなる変更など |
| 71 | + |
| 72 | + |
| 73 | +---- |
| 74 | + |
| 75 | +## Release CLI v1.8.0 · biomejs/biome |
| 76 | +[github.com/biomejs/biome/releases/tag/cli%2Fv1.8.0](https://github.com/biomejs/biome/releases/tag/cli%2Fv1.8.0 "Release CLI v1.8.0 · biomejs/biome") |
| 77 | +<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> |
| 78 | + |
| 79 | +Biome v1.8.0リリース。 |
| 80 | +`biome clean`コマンドを追加、`biome lint`に`--only`と`--skip`フラグを追加、CSSのformatとlintをサポートなど |
| 81 | + |
| 82 | + |
| 83 | +---- |
| 84 | + |
| 85 | +## power-assert-monorepo/packages/node at main · twada/power-assert-monorepo |
| 86 | +[github.com/twada/power-assert-monorepo/tree/main/packages/node](https://github.com/twada/power-assert-monorepo/tree/main/packages/node "power-assert-monorepo/packages/node at main · twada/power-assert-monorepo") |
| 87 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">nodejs</span> <span class="jser-tag">JavaScript</span> <span class="jser-tag">test</span> <span class="jser-tag">library</span></p> |
| 88 | + |
| 89 | +Node.jsの`--import`に対応したpower-assert |
| 90 | + |
| 91 | + |
| 92 | +---- |
| 93 | + |
| 94 | +## Storybook 8.1 |
| 95 | +[storybook.js.org/blog/storybook-8-1/](https://storybook.js.org/blog/storybook-8-1/ "Storybook 8.1") |
| 96 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">JavaScript</span> <span class="jser-tag">UI</span> <span class="jser-tag">test</span> <span class="jser-tag">ReleaseNote</span></p> |
| 97 | + |
| 98 | +Storybook 8.1リリース。 |
| 99 | +Storyファイルを作成するUIの追加、Subpath importsを使ったモックの対応、Playwright Component Testの対応。 |
| 100 | +React 19/Angular 18のサポートなど |
| 101 | + |
| 102 | + |
| 103 | +---- |
| 104 | + |
| 105 | +## Release v1.0.0 · tinylibs/tinypool |
| 106 | +[github.com/tinylibs/tinypool/releases/tag/v1.0.0](https://github.com/tinylibs/tinypool/releases/tag/v1.0.0 "Release v1.0.0 · tinylibs/tinypool") |
| 107 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">nodejs</span> <span class="jser-tag">library</span> <span class="jser-tag">ReleaseNote</span></p> |
| 108 | + |
| 109 | +tinypool 1.0.0リリース。 |
| 110 | +Node.jsの`worker_threads`のWorker Poolの実装ライブラリ |
| 111 | + |
| 112 | + |
| 113 | +---- |
| 114 | + |
| 115 | +## Turborepo 2.0 |
| 116 | +[turbo.build/blog/turbo-2-0](https://turbo.build/blog/turbo-2-0 "Turborepo 2.0") |
| 117 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">JavaScript</span> <span class="jser-tag">monorepo</span> <span class="jser-tag">Tools</span> <span class="jser-tag">ReleaseNote</span></p> |
| 118 | + |
| 119 | +Turborepo 2.0リリース。 |
| 120 | +ターミナルUIの刷新、`persistent`オプションの追加、`turbo watch`の追加、ドキュメントの刷新など。 |
| 121 | + |
| 122 | + |
| 123 | +---- |
| 124 | + |
| 125 | +## Firefox 127.0, See All New Features, Updates and Fixes |
| 126 | +[www.mozilla.org/en-US/firefox/127.0/releasenotes/](https://www.mozilla.org/en-US/firefox/127.0/releasenotes/ "Firefox 127.0, See All New Features, Updates and Fixes") |
| 127 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">Firefox</span> <span class="jser-tag">ReleaseNote</span></p> |
| 128 | + |
| 129 | +Firefox 127リリース。 |
| 130 | +`<base>`要素に`data:`と`javascript:`が指定できないように変更、Stage 3のSet Methodsをサポート、async Clipboard APIのサポートなど |
| 131 | + |
| 132 | +- [Firefox 127 for developers - Mozilla | MDN](https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/127 "Firefox 127 for developers - Mozilla | MDN") |
| 133 | + |
| 134 | +---- |
| 135 | + |
| 136 | +## Node.js — Node v22.3.0 (Current) |
| 137 | +[nodejs.org/en/blog/release/v22.3.0](https://nodejs.org/en/blog/release/v22.3.0 "Node.js — Node v22.3.0 (Current)") |
| 138 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">nodejs</span> <span class="jser-tag">ReleaseNote</span></p> |
| 139 | + |
| 140 | +Node.js v22.3.0リリース。 |
| 141 | +`Buffer`に`bytes()`を実装、experimentalフラグ付きでTest RunnerでのSnapshot Testingを実装、`NODE_RUN_SCRIPT_NAME`を追加など |
| 142 | + |
| 143 | + |
| 144 | +---- |
| 145 | + |
| 146 | +## News from WWDC24: WebKit in Safari 18 beta | WebKit |
| 147 | +[webkit.org/blog/15443/news-from-wwdc24-webkit-in-safari-18-beta/](https://webkit.org/blog/15443/news-from-wwdc24-webkit-in-safari-18-beta/ "News from WWDC24: WebKit in Safari 18 beta | WebKit") |
| 148 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">webkit</span> <span class="jser-tag">safari</span> <span class="jser-tag">ReleaseNote</span></p> |
| 149 | + |
| 150 | +Safari 18 bettaの変更点について。 |
| 151 | +View Transition APIのサポート、Style Queriesのサポート、`@starting-style`と `display: none`の組み合わせをサポート。 |
| 152 | +`justify-content: safe center`のサポート、`content-visibility`をサポート。 |
| 153 | +`<input type=date>`のアクセシビリティの改善、`URL.parse()`のサポート、JPEG2000のサポートを削除など |
| 154 | + |
| 155 | + |
| 156 | +---- |
| 157 | +<h1 class="site-genre">アーティクル</h1> |
| 158 | + |
| 159 | +---- |
| 160 | + |
| 161 | +## Data Fetching Patterns in Single-Page Applications |
| 162 | +[martinfowler.com/articles/data-fetch-spa.html](https://martinfowler.com/articles/data-fetch-spa.html "Data Fetching Patterns in Single-Page Applications") |
| 163 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">React</span> <span class="jser-tag">article</span></p> |
| 164 | + |
| 165 | +ReactのクライアントサイドでのData Fetchのパターンについて |
| 166 | + |
| 167 | + |
| 168 | +---- |
| 169 | + |
| 170 | +## Mastering Node.js Performance Hooks |
| 171 | +[pavel-romanov.com/nodejs-performance-hooks-mastering-the-mental-model](https://pavel-romanov.com/nodejs-performance-hooks-mastering-the-mental-model "Mastering Node.js Performance Hooks") |
| 172 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">nodejs</span> <span class="jser-tag">performance</span> <span class="jser-tag">article</span></p> |
| 173 | + |
| 174 | +ユーザーの端末の影響を受けるwall clockとパフォーマンスの計測に適したmonotonic clockについて。 |
| 175 | +Node.jsの`perf_hooks`モジュールで利用できる`PerformanceObserver`では monotonic clockの時間を取得でき、基本的な使い方についてなど |
| 176 | + |
| 177 | + |
| 178 | +---- |
| 179 | + |
| 180 | +## WebAssembly JSPI has a new API · V8 |
| 181 | +[v8.dev/blog/jspi-newapi](https://v8.dev/blog/jspi-newapi "WebAssembly JSPI has a new API · V8") |
| 182 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">WebAssembly</span> <span class="jser-tag">Promises</span> <span class="jser-tag">article</span></p> |
| 183 | + |
| 184 | +WebAssemblyのJavaScript Promise Integrationについて |
| 185 | + |
| 186 | + |
| 187 | +---- |
| 188 | + |
| 189 | +## TypeScriptの型と値とバリデーション |
| 190 | +[zenn.dev/mizchi/articles/typescript-type-value-validation](https://zenn.dev/mizchi/articles/typescript-type-value-validation "TypeScriptの型と値とバリデーション") |
| 191 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">JavaScript</span> <span class="jser-tag">TypeScript</span> <span class="jser-tag">article</span></p> |
| 192 | + |
| 193 | +TypeScriptは基本的にはJavaScriptへ型情報を付与するだけであるため、Runtimeの動作としてはJavaScriptと変わらないという話。 |
| 194 | +バリデーションと型について |
| 195 | + |
| 196 | +- [TypeScript Design Goals · microsoft/TypeScript Wiki](https://github.com/microsoft/TypeScript/wiki/TypeScript-Design-Goals "TypeScript Design Goals · microsoft/TypeScript Wiki") |
| 197 | + |
| 198 | +---- |
| 199 | +<h1 class="site-genre">ソフトウェア、ツール、ライブラリ関係</h1> |
| 200 | + |
| 201 | +---- |
| 202 | + |
| 203 | +## slevithan/regex: Context-aware regex template tag with best practices built-in and advanced features |
| 204 | +[github.com/slevithan/regex](https://github.com/slevithan/regex "slevithan/regex: Context-aware regex template tag with best practices built-in and advanced features") |
| 205 | +<p class="jser-tags jser-tag-icon"><span class="jser-tag">JavaScript</span> <span class="jser-tag">RegExp</span> <span class="jser-tag">library</span></p> |
| 206 | + |
| 207 | +正規表現をTagged Templateで書けるライブラリ |
| 208 | + |
| 209 | + |
| 210 | +---- |
0 commit comments