Archive
Writing
Articles on JavaScript, TypeScript, and the runtimes, frameworks and tooling underneath them.
- Articles
- 15
- Sections
- 5
- Latest
- №015
Language internalsYour Array Chain Called the Mapper a Million Times
Two chains return the same five numbers. One calls the mapper 1,000,000 times and allocates 13.73 MB; the other calls it 13 times and allocates nothing measurable.
- №014
The V8 object modelFour Maps Is Polymorphic. Five Is Not.
Monomorphic, polymorphic and megamorphic are counted states with a threshold of four. Here is the transition log, the V8 line that decides it, and the cost.
- №013
The software supply chainrequire(esm) Killed the Second Build, Not the Second Copy
Being able to require() an ES module removes the reason most packages shipped two builds. The dual package hazard is a layout problem, and it survived.
- №012
ReactivityYour Reactive Graph Computed 4,11. That State Never Existed.
A single-pass push through a diamond recomputes the leaf twice, and the first result mixes a fresh value with a stale one. Two passes are what remove it.
- №011
The TypeScript type systemYour Conditional Type Answered Twice. Both Answers Are Right.
A naked type parameter splits its union before the conditional runs, so IsArray<string[] | number> comes back as 'no' | 'yes'. Read out of TypeScript 7.0.2.
- №010
The build pipelineVite 8 Ships One Bundler, Not One Pipeline
Vite 7 depends on esbuild and Rollup; Vite 8 on neither. Serving one module from both majors shows what the swap to Rolldown changed and what it left alone.
- №009
The V8 object modelObject Shapes Are a Tree, and the Tree Is Shared
A hidden class is a node in a transition tree V8 keeps for the whole isolate — which is why an unrelated function can decide how your object is stored.
- №008
Async machineryWhat await Compiles To, and What It Costs
One async function compiled three ways — TypeScript's ES5 emit, V8's bytecode and the spec's Await steps — and the microtask turns each one predicts.
- №007
The software supply chainThe Provenance Was Valid. The Commit Was Not.
An npm provenance attestation binds a tarball to a repository, a workflow and a commit. Reading the payload shows what it never claims.
- №006
The software supply chainReading a Lockfile: Supply Chain in Practice
What package-lock.json actually records, what its integrity hashes do and do not prove, and where the real install-time risk sits.