はじめにlink 最近DBありのテストを記述していた際に、実はvitestではbeforeEachは必要ないのではないか、という考えに至ったのでその理由と設計についてまとめてみる。 下記のリポジトリで実験する https://github.com/koh110/vitest-beforeeach テストでbeforeEachが欲しくなるシーンlink テストを記述する際にbeforeEachが欲しくなるシーンは主に以下の2点ではないかと考えている。 mockの設定/reset seedsの投入 このうち、前者mockの設定/resetはbeforeEachではなくbeforeAll or すべての個別テストごとに設定すべきなのではと考えている。 これは自分がテスト単体での移植性を重視している(テスト単体をコピペしてもなるべくそのまま動かせる)ので、beforeEachでやってしまうとあるテ
Tiptap 3.0.0 Stable This is the stable release for 3.0.0. Since we accidentially released our 3.0.0 last year and had to deprecateit, we're moving forward with 3.0.1 as our initial release for this major cycle. Since our auto-generated changelog was to big forGithub to handle we have to write this manually. Yikes! @tiptap/core Major ChangesSwitched to tsup forbundling — UMDbuilds are no longe
7/6/2025 Most modernJavaScriptbundlers implement an optimization called "scope hoisting". The idea is that rather than wrapping eachbundled module in a function, a compiler concatenates the modules into a single scope. Say you have a program like this: // index.js import {add} from './math'; console.log(add(2, 3)); // math.js export function add(a, b) { return a + b; } When scope hoisted, the o
Repair invalid JSON documents. Tryit out in a minimal demo: https://josdejong.github.io/jsonrepair/ Useit in a full-fledged application: https://jsoneditoronline.org Read the background article "How to fix JSON and validateit with ease" The following issues can be fixed: Add missing quotes around keys Add missing escape characters Add missing commas Add missing closing brackets Repair truncated
In this article, we’ll show how we cut CKEditor 5’sbundle size by 40% through tree-shaking andbundle size optimizationtechniques and share tricks you can use to slim down your ownJavaScript libraries. We’ll also walk through the tools and processes we used to achieve this, measure improvements, and catch regressions. As any software library author will tell you,building and maintaining is har
JSer.info #739 - Biome v2がリリースされました。 Biome v2—codename: Biotype | Biome 設定ファイルのネスト、Linterプラグインのサポートが追加されています。また、Import OrganizerのようなLinterの範囲を超えた処理を行うAssist機能、HTMLformatterのサポートが含まれています。 破壊的変更として--apply/--apply-unsafeの廃止、設定ファイルのinclude/ignoreからincludesへの変更などが行われています。 Vite 7.0がリリースされました。 Vite 7.0 is out! | Vite require(esm)が利用できるNode.js 20.19+/22.12+をサポート対象に変更し、デフォルトのブラウザターゲットがBaseline Widely Avai
This release includes several important feature additions that we're excited to share with you. First, we're shipping a new experimental high-performance CLI behind a feature flag (--experimental-cli). This CLI was previously only available in prettier@next, but now you can enableitsimply by using a flag. We encourage you to tryit out and share your feedback! If you are interested in the intern
概要本書は、近年モバイルファーストやSEOの観点から再び注目されている「静的サイトジェネレータ」(SSG)による静的サイトの制作に適したフレームワーク「Astro」の解説書です。これまでのJavaScriptフロントエンドフレームワークは、動的サイトの生成(CSR/SSR)を主目的としていましたが、Astroはビルド時にJavaScriptを最大限除去することで、シンプルで高速な静的Webサイトの生成を可能にしています。また、ReactやVueなどのフレームワークと連携することで、静的Webサイトのビルドツールとしても利用できます。本書では、Astroの基本からコンポーネントベースのWebサイト制作の進め方、SSGモードによる静的サイト制作/SSRモードによる動的サイト制作、エンドポイント/アクション/ミドルウェアなどのサーバサイド機能まで、Astroの機能を網羅して解説します。 目次
Storybook’s superpower is showing every possible state of yourUI in one place, from a basic button to anobscure page. That makesit the perfect foundation for automated testing. WithStorybook 9, we partnered with the latest generation of testing tools tobuild the ultimate component testing tool. Vitest ships the fastest test runner available.Playwright delivers unmatched browser fidelity. And
We shipped FinalizationRegistry in Workers: why you should never useit2025-06-11 We’ve recently added support for the FinalizationRegistryAPI inCloudflare Workers. ThisAPI allows developers to request a callback when aJavaScript object is garbage-collected, a feature that can be particularly relevant for managing external resources, such as memory allocated byWebAssembly (Wasm). However, des
Why are 2025/05/28 and 2025-05-28 different days inJavaScript? 2025-05-28 While setting up this siteitself, I ran into the following oddity: console.log(new Date('2025/05/28').toDateString()); // Wed May 28 2025 console.log(new Date('2025-05-28').toDateString()); // Tue May 27 2025 // Bonus: (omit leading 0) console.log(new Date('2025-5-28').toDateString()); // Wed May 28 2025 You may get differ
はじめに 2024年の11月に、札幌で開催された「クラメソさっぽろIT勉強会(仮) #6」という勉強会がありまして、そのライトニングトーク枠に登壇してきました。 タイトルは「minifyの効果を最大限に引き出すTypeScriptコードを書く」です。 昨今のフロントエンド開発では、TypeScriptを使ってコーディングし、それをトランスパイルしてできたJavaScriptファイルのサイズを minify によって削減するのが一般的でしょう。そうしたときに、ふと 「TypeScript の書き方を工夫したら、もっと minify が効率的に効くようになるかも?」 と思いたち、型安全性とコードの読みやすさを壊さない範囲で、どこまでファイルサイズを削れるか挑戦してみた、という話です。 今回はその LT ネタを、改めてブログ記事として共有させて頂きます。 今回のお題:Blazor SplitC
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く