Skip to content

Commit

Permalink
2024-04 (#279)
Browse files Browse the repository at this point in the history
* add base

* Update 04.md

* add monthly article (#280)

* add Monthly Articles

* add notable by sajikix

* add notable b4h0_c4t (#281)

* fix horizon

* add stream url

---------

Co-authored-by: Naohiro Nakajima <nakajima.jmg@gmail.com>
Co-authored-by: saji-ryu <rsajiki@gmail.com>
  • Loading branch information
3 people committed Apr 30, 2024
1 parent f88ce17 commit 8d4fdb9
Showing 1 changed file with 180 additions and 0 deletions.
180 changes: 180 additions & 0 deletions src/content/posts/2024/04.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
---
title: Cybozu Frontend Monthly
date: "2024-04-30T17:00:00+09:00"
slug: "2024-04"
connpass: "https://cybozu.connpass.com/event/315490/"
streamUrl: "https://www.youtube.com/watch?v=cVLPKaS8fO0"
no: 46
members:
- name: "@nakajmg"
link: https://twitter.com/nakajmg
- name: "@sajikix"
link: https://twitter.com/sajikix
- name: "@b4h0_c4t"
link: https://twitter.com/b4h0_c4t
guest:
---

## 👀 Notable Articles

### [fetchLater API オリジン トライアル](https://developer.chrome.com/blog/fetch-later-api-origin-trial?hl=ja)

- 共有者: @nakajmg

ビーコン送信のようなウェブページからサーバへとデータを送信する新しい API である fetchLater API のオリジントライアルが Chrome で開始されています。

fetchLater API はデータ解析などに必要なデータをサーバに送信する際の信頼性の向上を目的としています。従来`pagehide``visibilitychange`といったページイベントや、`sendBeacon()`などを使って送信するといった方法をとっていましたが、これらはブラウザやデバイスによっては著しく信頼性が低い状態にあります。

この問題は fetchLater API を使うことでブラウザがビーコンを送信することが保証されるようになります。(ただし現状の実装ではブラウザのクラッシュした場合にはビーコンの送信が行われないなどの制限事項もあるようです。

---

### [TypeScript 5.5 Iteration Plan](https://github.com/microsoft/TypeScript/issues/57475)

- 共有者: @sajikix

TypeScript 5.5 では多くの便利で意欲的な機能が追加される予定です。その中でも特に注目しているものを紹介します。

1 : [Infer type predicates from function bodies using control flow analysis](https://github.com/microsoft/TypeScript/pull/57465)

一時期 x などでもかなり話題になった機能です。制御フロー解析を利用して、boolean を返す関数に対する型述語を推論できるようになります。これにより今までユーザー定義型ガードでしか推論できなかった Array.filter() などでも推論が効くようになります。細かい挙動などに関しては以下の記事がわかりやすかったです。

- https://zenn.dev/ubie_dev/articles/ts-infer-type-predicates

2 : [Isolated declarations errors](https://github.com/microsoft/TypeScript/pull/58201)

Isolated declarations は以前から提案されているコンパイラオプションで、今まで型検査およびそのための型依存解決と同時に行なってきた型定義ファイルの出力を独立させるオプションです。これにより型定義の出力と各ファイルでの検査を並列に行うことができ、大幅な検査の高速化とファイル単位でのキャッシュが行えるとしています。

一方で型検査をせずに型定義ファイルを出力するためには今まで推論に頼ってきた多くの型情報を明示的に書かなくてはならず、大きな制限が生まれるオプションとなりそうです。また型定義の出力を TS 内部でどう行うかなどは議論中でありアップデートを待っている状態です。

今回はその先駆けとして、`--isolatedDeclarations` が有効な際に明示的なアノテーションがないと容易に推論できない要素に対してエラーが発生するようになります。

3 : [Regex Syntax Validation](https://github.com/microsoft/TypeScript/pull/55600)

この変更により正規表現に対して構文チェックが行われるようになります。具体的には無効な正規表現フラグや無効なエスケープの記法などをチェックし、report してくれるようになります。またこの構文チェックは以下の二つの新しい EcmaScript Proposal もサポートしています。

- [Duplicate Named Capturing Groups](https://github.com/tc39/proposal-duplicate-named-capturing-groups) (TC39 の 101st meeting で Stage 4 になった)
- [Regular Expression Pattern Modifiers](https://github.com/tc39/proposal-regexp-modifiers) (Stage 3)

構文自体も複雑で、フラグも多く存在する正規表現に対してこのようなチェックを行なってくれるのはユーザーとして非常にありがたいのではないでしょうか。

---

### [Learn JavaScript](https://web.dev/learn/javascript)

- 共有者: @b4h0_c4t

web.dev の Learn コンテンツに JavaScript が追加されました。
web.dev Learn はこれまでも HTML や CSS といった Web 開発の根本的な知識からプライバシーやアクセシビリティといった観点まで学習コンテンツを提供してきました。

今回追加された JavaScript のコンテンツは全 28 章で構成されており、大きく 6 部に分けられています。

- データ型と構造
- 比較演算子と制御フロー
- 関数
- オブジェクト
- コレクション
- クラス

それぞれ参考となるプログラムだけでなく可読性を高めるプラクティスについても言及されており、全てを網羅するのは少々重いですが学習者は一件の価値があると思います。

最近では、[MDN の Web 開発を学ぶ](https://developer.mozilla.org/ja/docs/Learn)[React の Rules of React](https://react.dev/reference/rules) など学習者に向けたコンテンツが多くリリースされ始めているのでこの機会に学び始めるのはタイミングが良いかもしれません。

---

## 🗓 Monthly Articles

### 📖 Framework, Library

- [Bun 1.1](https://bun.sh/blog/bun-v1.1)
- Bun 1.1 リリース。Windows 対応や Node.js 互換性の向上、WebSocket サポートといったアップデートが盛り込まれています。
- [React Server Components now in RedwoodJS](https://redwoodjs.com/blog/rsc-now-in-redwoodjs)
- RedwoodJS が Bighorn エポックのプレビューにて RSC をサポート
- [Deno 1.42: Better dependency management with JSR](https://deno.com/blog/v1.42)
- Deno 1.42 リリース。JSR での依存管理や npm との互換性についてのアップデートが盛り込まれています。
- [tailwindcss-signals : Signals for Tailwind CSS](https://github.com/brandonmcconnell/tailwindcss-signals/)
- Tailwind で style queries を利用したカスタマイズを可能にするプラグイン
- [Pragmatic drag and drop](https://atlassian.design/components/pragmatic-drag-and-drop/about)
- `react-beautiful-dnd` の開発元である Atlassian が新たにリリースした D&D ライブラリ
- [ESLint v9.0.0 released](https://eslint.org/blog/2024/04/eslint-v9.0.0-released/)
- ESLint の v9 リリース。FlatConfig のデフォルト化など
- [tailwindcss-mixins](https://github.com/brandonmcconnell/tailwindcss-mixins)
- Tailwind CSS で、複数の要素に同時に適用するユーティリティのグループを定義できるプラグイン
- [pnpm v9.0.0-rc.0](https://github.com/pnpm/pnpm/releases/tag/v9.0.0-rc.0)
- pnpm の v9.0.0-rc.0 リリース。Node v16 のサポート終了や `pnpm licenses list --json` の出力変更など
- [node-unicode-data](https://github.com/node-unicode/node-unicode-data)
- JavaScript 互換の Unicode データジェネレータ
- [next-view-transitions](https://github.com/shuding/next-view-transitions)
- Next.js の App Router で View Transitions API を使うためのライブラリ
- [Biome v1.7](https://biomejs.dev/blog/biome-v1-7/)
- Biome v1.7 リリース。ESLint や Prettier から Biome
- [Next.js 14.2](https://nextjs.org/blog/next-14-2)
- Next.js 14.2 リリース。パフォーマンスの向上や、キャッシュ機能の強化など

---

### ⚡️ Services

- [Making state easy with D1 GA, Hyperdrive, Queues and Workers Analytics Engine updates](https://blog.cloudflare.com/making-full-stack-easier-d1-ga-hyperdrive-queues)
- Cloudflare の D1 と Hyperdrive が GA に。価格も発表されており、無料枠については今後有料化の予定はないと明言しています。
- [How we built JSR](https://deno.com/blog/how-we-built-jsr)
- The JavaScript Registry で採用されている技術構成を紹介している記事
- [In Slidev 0.49 (currently in beta), we will get draggable elements just like what you have in Keynote/PowerPoint!](https://twitter.com/Slidevjs/status/1777886096124248241)
- Slidev の v0.49 beta にて、ドラッグで回転・移動・サイズ変更ができる要素が利用可能に
- [Vitest - Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=vitest.explorer)
- Vitest の VSCode 拡張。Vitest のテストを実行、デバッグ、監視などができます。

---

### 💬 Languages

- [ECMAScript excitement in TC39 101st meeting](https://x.com/robpalmer2/status/1778836605341446634)
- 4月に開催された TC39 101st meeting で決定された proposal stage アップデートまとめ

---

### 🖥 Browsers

- [Release Notes for Safari Technology Preview 192](https://webkit.org/blog/15260/release-notes-for-safari-technology-preview-192/)
- Safari Technology Preview 192 リリース。View Transitions サポートなど
- [Intent to Ship: CSS Anchor Positioning](https://groups.google.com/a/chromium.org/g/blink-dev/c/jGTYNuidPRs/m/-jB4agJ7AAAJ?pli=1)
- Chrome 125 にて実装予定である CSS Anchor Positioning の仕様に関する記録
- [Firefox Release Notes 125.0.1](https://www.mozilla.org/en-US/firefox/125.0.1/releasenotes/)
- Firefox 125 がリリース。popoverAPI や Intl.Segmenter のサポートなど

---

### 🦆 Others

- [【2024 年 4 月 1 日の TypeScript ニュース】次期バージョンでオブジェクト型に追加される新機能の紹介](https://qiita.com/uhyo/items/787a475bb618811d3771)
- TypeScript の新機能追加を元にしたエイプリルフール記事。バージョン 5.5.555 に実装予定の Arranged Field Definition という存在しない機能の紹介をしています。
- [【告知】「フロントエンドカンファレンス北海道 2024」を、2024 年 8 月 24 日(土)に開催します! ](https://note.com/fec_hokkaido/n/nbb62b53069a5)
- 2024 年 8 月 24 日土曜日に北海道札幌市にて「フロントエンドカンファレンス北海道 2024」が開催されます。
- [On disabled and aria-disabled attributes](https://kittygiraudel.com/2024/03/29/on-disabled-and-aria-disabled-attributes/)
- disabled と aria-disabled 属性の使い分け方について解説している記事
- [Introducing “pages router”](https://waku.gg/blog/introducing-pages-router)
- RSC のミニマムフレームワーク Waku がファイルベースルーティングをサポート
- [React フレームワークの 動向と選定基準](https://speakerdeck.com/azukiazusa1/react-huremuwakuno-dong-xiang-toxuan-ding-ji-zhun)
- React フレームワークの動向と選定基準について解説しているスライド
- [CSS color-scheme-dependent colors with light-dark()](https://web.dev/articles/light-dark)
- CSS Module Level 5 で追加された `light-dark()` でダークモード対応をするための記事
- [Power of Partial Prerendering with Bun](https://aralroca.com/blog/partial-prerendering)
- Bun の Prerendering macro プラグインを使って Next.js の Partial Prerendering のような挙動を実現できるという記事
- [SPA モードの Remix を GitHub Pages にデプロイする](https://zenn.dev/cybozu_frontend/articles/remix-spa-mode-gh-page)
- SPA モードの Remix を GitHub Pages にデプロイする GitHub Actions の紹介
- [!important で上書きできないブラウザのスタイルとは](https://zenn.dev/cybozu_frontend/articles/user-agent-stylesheet)
- 強力なスタイルの適用優先度をもつ `!important` でも上書きができない場合がある `Important user agent declarations` やその他の優先度に関するルールの紹介
- [New Flow Language Features for React](https://medium.com/flow-type/announcing-component-syntax-b6c5285660d0)
- Flow が React 向けに追加した独自構文についての紹介
- [フロントエンドにおけるフィーチャーフラグ標準化のための「OpenFeature Web SDK v1」がリリース。CNCF から](https://www.publickey1.jp/blog/24/openfeature_web_sdk_v1cncf.html)
- Cloud Native Computing Foundation が Feature flag の標準化を目指す一環として OpenFeature Web SDK v1 をリリース
- [SolidStart now works with Deno](https://twitter.com/undefined_void/status/1774075965557133508)
- Deno が SolidStart サポートを開始
- [Learn JavaScript | web.dev](https://web.dev/learn/javascript)
- web.dev の公開している講義シリーズに JavaScript のコースが追加
- [History of JS interop in Dart](https://medium.com/dartlang/history-of-js-interop-in-dart-98b06991158f)
- Dart 3.3 で WasmGC に対応したのを機に Dart がこれまで実施してきた JS との相互運用性の取り組みをまとめた記事
- [Japanese Svelte Companies](https://github.com/svelte-jp/japanese-svelte-companies)
- Svelte/SvelteKit を採用している日本企業がまとめられた記事
- [Trip report: Node.js collaboration summit (2024 London)](https://nodejs.org/en/blog/events/collab-summit-2024-london)
- Node.js のコントリビュータやコミュニティメンバーが集まる Node.js [コラボレーションサミット](https://nodejs.org/en/about/get-involved/collab-summit)で話された内容のまとめ

0 comments on commit 8d4fdb9

Please sign in to comment.