JS Tooling Weekly: vlt Open npm Mirror, <style module> in webpack 5.113, Migrating to Vite+, jest-dom 8.0, and Jimp 2.0Thematic roundup · digest for November 25
High-speed assembly bench with optimized conveyor lines and a graphics module
Thematic roundup5 sections≈ 5 min

JS Tooling Weekly: vlt Open npm Mirror, <style module> in webpack 5.113, Migrating to Vite+, jest-dom 8.0, and Jimp 2.0

JavaScript installs and builds often drag because of extra baggage: bloated JSON manifests, sprawling plugin chains, and aging runtimes. Five recent releases and case studies show how to trim that weight: a free tokenless npm mirror, built-in style scoping in webpack, Vite+ benchmarks on a large app, and major updates to jest-dom and Jimp.

vlt Opens a Public npm Mirror and Ships 1.8.1: 20–70% Faster Installs

During a clean install, package managers waste plenty of time downloading huge JSON metadata blobs. It's like walking into a hardware store for two screws and being handed ten years of paper supply catalogs. The vlt team opened a free public npm mirror that strips metadata by up to 70% and speeds up cold installs by 20–70%.

No signup or tokens required: https://registry.vlt.io/upstream/npm/ works with npm, pnpm, yarn, bun, deno, and vlt, while blocking known malicious packages via databases like OSV.

# Point a project to the vlt mirror
npm config set registry https://registry.vlt.io/upstream/npm/ \
  --location=project
pnpm config set registry https://registry.vlt.io/upstream/npm/ \
  --location=project

Local and CI installs speed up immediately with no script changes, though the mirror is read-only—you still publish packages to main npm. Alongside it, vlt 1.8.1 sped up repeat installs on current trees, added manifest caching, and fixed semver prerelease ranges and vlt pack exclusions.

webpack 5.113: Built-In Class Scoping for <style module>

webpack 5.113 expands built-in HTML and CSS handling. When index.html is your entry point, you can write <style module>, named <style module="card">, or import .module.css straight inside HTML. webpack generates scoped class names and updates class, local id, label, and ARIA attributes automatically.

<!-- src/index.html -->
<style module="card">
  .button { background: navy; color: white; }
</style>
<!-- Classes rewrite automatically; bind JS to data-action instead -->
<button class="card.button" data-action="save">Save card</button>

You no longer need css-loader for this isolation, though webpack won't rewrite JS selectors like document.querySelector(".button")—stick to data-* attributes for scripts. The release also adds a built-in SVG/XML optimizer (optimization.minimizeOptions.xml: {}), better CommonJS tree shaking, HMR fixes when modules move between chunks, single-pass TypeScript parsing, and a sourceTest filter in loader rules.

// webpack.config.js
export default {
  entry: "./src/index.html",
  module: {
    rules: [{
      test: /\.js$/i,
      // Loader runs only on files containing @instrument
      use: [{ loader: "./loaders/inst.js", sourceTest: /@instrument/ }],
    }],
  },
};

sourceTest keeps heavy loaders from running needlessly on every .js file, triggering them only when the source actually contains the target marker.

Why Switch to Vite+: Lessons From Migrating a 97,000-Line App

Vue team member Ben Hong tested Vite+ 1.0 on a real Vue 3 + Node codebase with ~1,400 .ts/.vue files and 97,000 lines of code. The full MIT-licensed suite (Vite 8 on Rolldown, Oxlint, Oxfmt, Vitest, tsdown, cached Vite Task, and vp env) lives in one vite.config.ts driven by the vp CLI.

Median of 3 Warm Runs on Apple M1 Max (Vue 3 + Node)

The chart shows clearly where migration pays off and where it doesn't. Rust-powered tools deliver huge speedups in formatting, linting, and .ts checking, while replacing lint-staged and Husky configs with staged and vp hooks. However, vue-tsc and Vitest test runs stay roughly the same, and mixed repos using Python, Ruby, or Go still need separate tools.

jest-dom 8.0: New Vitest 5+ Requirement and DOM Matcher Updates

Major release @testing-library/jest-dom 8.0 adds Vitest 5 support. Jest users won't hit breaking changes, but Vitest users face a strict cutoff: support for everything below Vitest 5 has been dropped.

// vitest.setup.ts (for Vitest 5+ and @testing-library/jest-dom@8.0.0)
import "@testing-library/jest-dom/vitest";

expect(saveButton).toBeVisible();
expect(saveButton).toBeDisabled();

If your project is still on Vitest 4, hold off on updating jest-dom—upgrade your test runner to v5 first, then run npm install -D @testing-library/jest-dom@8.0.0.

Jimp 2.0: Pure-JavaScript Image Processing and Animated GIFs

For projects avoiding native C++ dependencies like sharp, Jimp 2.0 is out. The pure-JS library now reads and writes animated GIFs and multi-page TIFFs, draws vector shapes via @jimp/plugin-draw, renders TTF/OTF/WOFF fonts, and adds morphology (erode(), dilate(), open(), close()), skew(), affine(), sepia(amount), and WASM plugins for JPEG XL, SVG reading, and JPEG 2000.

// Install: npm install jimp@2.0.0 (requires Node.js 22+)
import { Jimp } from "jimp";

const image = await Jimp.read(inputBytes, { exifRotate: true });
image.resize({ w: 800, premultiplyAlpha: true }).sepia(0.5);
await image.write("output.png");

The baseline requirement moved up: Jimp 2.0 needs at least Node.js 22. Version 2 also adds extension-based write() option typing, removes broken parameters, and fixes edge math—setPixelColor outside the canvas no longer colors border pixels, and blank lines in text rendering are preserved.

Want a deep diveVotes help us choose what to break down in detail. This material has 0 votes.
Sources · 7