Gustav Hansen

Gustav Hansen

@stav.dev

Engineering @sanity, living in Berlin. More questions than answers.

138 followers700 following76 posts

Gustav Hansen reposted

Some speed & memory improvements you'll see with TypeScript 7.1 Beta. We're hoping to land more before RC & stable.

TypeScript@typescriptlang.org

TypeScript 7.1 Beta is now available! Now with a preview API, content mapper support, new features, and some great optimizations. Give it a try and give us some feedback!

Gustav Hansen reposted

tsrs is a fast new TypeScript compiler port 🔥 This deep-dive blog post by the tsrs creator Max Schwenk explains how he created the compiler and what makes it so fast. Contains excellent infographic animations. building.owner.com/tsrs

Gustav Hansen reposted

🧪 We've expanded Core Web Vitals to include support for soft navigation (SPA)! Since SPAs are handled differently in implementation, they have required bespoke custom measurement, making it hard to compare directly across sites. Measuring performance is a little art, a little science. 1/2

web.devExperimental soft navigation metrics now available in CrUX  |  Blog  |  web.devLearn about the new experimental soft navigation metrics in CrUX and how they will impact your Core Web Vital metrics.

Gustav Hansen reposted

Gustav Hansen reposted

TanStack Start 1.0 is officially stable! 🎉 A full-stack web framework for React and Solid, already used to build millions of apps, from Fortune 500 companies to your favorite tools and weekend projects. tanstack.com/blog/tanstac...

Gustav Hansen reposted

Gustav Hansen reposted

Introducing 📦upm: 🪶A fast, tiny package manager for the npm registry. ✨Written in TypeScript, it installs at native-class speed and has a JS API, at a fraction of the size of native tools. 🤝Compatible with your existing .npmrc and lockfiles. 👉 Try at upm.sh

Gustav Hansen reposted

If you can write CSS, you can write GSS { ● } I've been dreaming of this for years: a language to build 3D scenes like you write CSS. Selectors, cascade, :hover, keyframes… compiled to one GPU shader. Meet GSS: GPU Style Sheets. gss-lang.dev #shader #glsl #gss

Gustav Hansen reposted

Excited to see the platform slowly catching up to the UI we are expected to build.

CodePen@codepen.io

"<rich-input> demo" by Bramus codepen.io/editor/bramu... Pretty impressive combination of new web tech to make this happen: <datalist>, the OpaqueRange API, and the CSS Custom Highlight API.

Gustav Hansen reposted

Integrating MSW into Vite-based projects has become silly simple with the new "msw/vite" plugin! And yes, this works with Vitest, too. The plugin integrates MSW client and server-side and keeps the worker script up-to-date for you, automatically.

Gustav Hansen reposted

Preact 11 is out 🎉 We’ve been hard at work at making our diffing use modern features like moveBefore , leveraging ESM for tree-shaking Preact Compat and ensuring you have a great experience with resumed hydration.

Gustav Hansen reposted

Just published github.com/unjs/oxbox 🐂 🛠️ A tiny, portable JS library for parsing and transforming JS/TS/JSX, powered by oxc. ⚡ Optimized wasm build in a single JS chunk 🪞 Same API as oxc-parser + oxc-transform 🤝 Works in browsers and Node.js 💾 Fits on a floppy disk

Gustav Hansen reposted

For those who may be watching... you may have noticed all the new performance analysis work I've been doing lately. This is really all intended to make zero-dependency perf analysis possible / more useful in general. Consider this example for instance: github.com/jasnell/fast...

github.comGitHub - jasnell/fastify-sliding-health: An example using latest perf_hooks featuresAn example using latest perf_hooks features. Contribute to jasnell/fastify-sliding-health development by creating an account on GitHub.
James Snell@jasnell.me

Several nice additions here. util.debounce(fn, ...) util.throttle(fn, ...) SlidingWindowHistogram More FFI, net, and vfs goodness nodejs.org/en/blog/rele...

Gustav Hansen reposted

After about a year, on and off, I am veeeery happy to release TWINKLEPLOP, a syntax highlighter of tremendous power! The speed of prism with the customisation of Shiki. twinkleplop.pngwn.at

Gustav Hansen reposted

This is such a silly mistake and yet I see you making it all the time in your tests. ❌ Do NOT run cleanup after assertions ✅ Schedule the cleanup via hooks or use Disposable Objects A seemingly tiny change that'll have tremendous impact on your tests, especially memory-wise.

Gustav Hansen reposted

Quick reminder, if you're working on a SaaS product that requires a login, please check if you've defined the well-known URL to change passwords. Password managers will check `/.well-known/change-password` to offer a quick way to change passwords. https://www.w3.org/TR/ch...

I’ve never heard of twoslash but it looks amazing to create self-documenting code samples: twoslash.netlify.app

twoslash.netlify.appTwoslashMarkup for generating rich type information in your documentations ahead of time.
Artem Zakharchenko@kettanaito.com

In the new version of MSW docs, all code snippets will feature type definitions for all APIs thanks to Shiki's fantastic Twoslash. This will also allow us to drop redundant explanations as you can inspect the types yourself now.

Gustav Hansen reposted

Make your logo brighter than white. Chris Bennett built a tool that turns a logo into a gain-map JPEG, so the colors you pick shine up to 7.5 times brighter than plain white on HDR screens and stay a normal JPEG everywhere else. #color #image www.soverybright.com/

Gustav Hansen reposted

Every MCP callTool in TypeScript takes a string and returns unknown, mcp-tada reads the server once and ensures every tool-call has the proper names, input- and output types.

Jovi 🐨@jovidecroock.com

Introducing mcp-tada: typed MCP tool calls for TypeScript. Snapshot a server's tools/list and every call gets a narrowed tool name, args inferred from inputSchema, and structuredContent typed from outputSchema. github.com/JoviDeCroock...

Gustav Hansen reposted

🆕 pnpm-exclude-newer Update package.json ranges to the latest versions permitted by your age policy (minimumReleaseAge, minimumReleaseAgeExclude) including transitive dependencies. $ pnpm dlx @webpro/pnpm-exclude-newer → github.com/webpro/pnpm-... Using this for a while now, little QoL bumper

Gustav Hansen reposted

“If you're feeling like your work is simultaneously more productive and less satisfying, you're not broken. The feedback loop is broken. And I think we need to start treating that as an engineering problem in its own right, not a personal failure.”

Gustav Hansen reposted

⛰️ mountx :: mount JavaScript as a real filesystem! Write ~6 lines of JS, get a real directory any process can read & write: editors, CLIs, AI agents. Rootless on Linux (FUSE) and macOS (NFSv3 with no kernel extensions). ~Pure JS, zero deps. mountx.vercel.app

Gustav Hansen reposted

If you make websites for a living, stop what you're doing and read this research by @tammyeverts.com; it shows what many of us have been saying for a long time: even if there is such a thing as "fast enough", it's generally *much* faster than you are targeting: embrace.io/blog/research-co…

embrace.ioNew research: The Core Web Vitals thresholds you trust might be wrong for your siteCore Web Vitals data from ten leading online retailers reveals that "good" for Google may not be good enough for your users or your business.

Gustav Hansen reposted

Safari shipped `display: grid-lanes` and Chromium's working on it. But what does it mean for accessibility when grid items reorder themselves? Can an adjusted `flow-tolerance` help? Manuel cautiously proposes a very interesting solution. https://matuzo.at/blog/2...