O hirunewani blog

Frontend Weekly 2024-11-01

Created at

MSW v2.6.0、Baseline status web components、 Chrome 130、Next.js use cache、Github Universe'24、State of CSS 2024について

MSW v2.6.0

MSW v2.6.0がリリースされた。

https://github.com/mswjs/msw/releases/tag/v2.6.0

WebSockets APIのモックが可能になった。

https://mswjs.io/docs/basics/handling-websocket-events

import { ws } from "msw";

const chat = ws.link("wss://chat.example.com");

export const handlers = [
  chat.addEventListener("connection", () => {
    console.log("outgoing WebSocket connection");
  }),
];

Show Baseline status on your blog posts and presentations | web.dev

Baselineのステータスを表示できるweb componentが公開された。

https://web.dev/blog/show-baseline-status?hl=en

次のように表示される。

利用方法は以下のリポジトリを参照。

https://github.com/web-platform-dx/baseline-status

Chrome 130

Chrome 130がリリースされた。

https://developer.chrome.com/blog/new-in-chrome-130

CSS Nestingの挙動変更

CSS Nestingの挙動が変更された。 今までは、宣言のホイスティングが行われなれていたが、Chrome 130からは行われなくなる。

https://web.dev/blog/css-nesting-cssnesteddeclarations?hl=en

Document Picture-in-Picture

preferInitialWindowPlacementオプションが追加された。

これを指定すると、以前のウィンドウの位置やサイズを再利用するのではなく、ピクチャー イン ピクチャー ウィンドウを常にデフォルトの位置とサイズで開くように 指示できる。

Player

Document Picture-in-Picture APIは、次のように利用できる。

const player = document.querySelector("#player");

const pipWindow = await documentPictureInPicture.requestWindow({
  preferInitialWindowPlacement: true,
});

pipWindow.document.body.append(player);

pipWindow.addEventListener("unload", event => {
  const pipPlayer = event.target.querySelector("#player");
  playerContainer.append(pipPlayer);
});

box-decoration-break

box-decoration-breakがサポートされた。

値にはslicecloneがあり、sliceはデフォルトで、cloneは次のように断片化された要素が個別に描画される。

The
quick
orange fox

Our Journey with Caching | Next.js

デフォルトキャッシュが無効化された背景と、代替手段としてのuse cacheについて解説した記事。

https://nextjs.org/blog/our-journey-with-caching

Github Universe’24で発表された機能

Github Universe’24が開催され、様々な機能の発表が行われた。

Actions performance metrics

Github Actionsのパフォーマンスメトリクスを全てのユーザーが利用できるようになった。

https://github.blog/changelog/2024-10-31-actions-performance-metrics-in-public-preview/

GitHub Copilotのマルチモデル対応

次のような複数のモデルが選択可能になった。

  • AnthropicのClaude 3.5 Sonnet
  • GoogleのGemini 1.5 Pro
  • OpenAIのGPT-4o、o1-preview、o1-mini

Copilot Autofix for CodeQL

Copilot Autofix for CodeQLは、セキュリティ問題の修正を提案する。 CodeQLを利用する全てのパブリックリポジトリに展開された。

https://github.blog/changelog/2024-09-18-now-available-for-free-on-all-public-repositories-copilot-autofix-for-codeql-code-scanning-alerts/

GitHub Spark

自然言語でアプリを構築するAIネイティブツールGitHub Sparkが発表された。

https://githubnext.com/projects/github-spark

VSCodeでのGithub Copilotによる複数ファイル編集

VSCodeでGithub Copilotを利用して複数ファイルを編集できるモードの提供が開始された。

https://github.blog/changelog/2024-10-29-multi-file-editing-code-review-custom-instructions-and-more-for-github-copilot-in-vs-code-october-release-v0-22/

https://code.visualstudio.com/updates/v1_95#_start-a-code-editing-session-with-copilot-edits

GitHub Copilotのカスタマイズ

含めるコンテキストの制御や、ワークスペースのローカルインデックス作成、 PRやIssueなどのリポジトリの情報の参照、Webから追加コンテキストを取得する機能などが追加された。

https://github.blog/changelog/2024-10-29-web-search-in-github-copilot-chat-now-available-for-copilot-individual/

https://code.visualstudio.com/updates/v1_95

State of CSS 2024

State of CSS 2024の結果が公開された。

https://2024.stateofcss.com/en-US/