Skip to content

v1.0.0

Latest

Choose a tag to compare

@github-actions github-actions released this 25 Aug 11:27

v1.0.0

First stable release of @vitest/istanbuljs, a fork of istanbuljs/istanbuljs maintained by the Vitest team. The fork starts at upstream commit 28ffdbc (see vitest-dev/vitest#9433 for background). Upstream test suites and fixtures are retained and passing.

Packages

Upstream This release
istanbul-lib-coverage @vitest/istanbul-lib-coverage
istanbul-lib-instrument @vitest/istanbul-lib-instrument
istanbul-lib-report + istanbul-reports @vitest/istanbul-lib-report (merged)
istanbul-lib-source-maps @vitest/istanbul-lib-source-maps
istanbul-lib-hook, nyc-config-* not included

🚨 Breaking changes

  • ESM only. All packages ship "type": "module" with a single exports entry; there is no CommonJS build. (57205e2)
  • Node.js 22+ required. (20dd348, 3b69680)
  • istanbul-reports merged into @vitest/istanbul-lib-report. Built-in reports are created with create(name, opts) from the same package that provides createContext(). (3b69680)
  • create() is sync and only accepts built-in report names. Use the new createAsync() to load custom reporters. (#6)
  • Babel 8 is used for instrumentation in @vitest/istanbul-lib-instrument. (#2)
  • Packages are scoped under @vitest/* and versioned together. Contributions from the fork point onward are MIT licensed; upstream code remains under its original ISC / BSD-3-Clause terms (see each package's LICENSE). (6c07541)

✨ Features

  • Rewritten in TypeScript with strict mode. All packages ship .d.mts declarations, so @types/istanbul-* is no longer needed. Public types include CoverageMapData, FileCoverageData, InstrumenterOptions, ContextOptions, per-report option interfaces (HtmlOptions, CoberturaOptions, …), plus ReportOptions / ReportType maps for the built-in reports. (ff62edd)
  • ESM custom reporters via createAsync(name, opts). Accepts a built-in name, a package name, an absolute path, or a file:// URL, and unwraps ESM default exports, plain module.exports, and __esModule-transpiled CommonJS. (#6)
  • /* istanbul ignore start *//* istanbul ignore stop */ hints, cherry-picked from istanbuljs/istanbuljs#835. (44e9374)
  • sideEffects: false on every package for bundler tree-shaking. (ab8fa51)
  • html-spa report rebuilt with Preact + tsdown instead of React + webpack + Babel; SPA source ported to typed .tsx. (#1)

📦 Dependency reduction

Runtime dependencies were replaced with Node built-ins or inlined helpers, enforced going forward by e18e/ban-dependencies in lint. (#1)

Package Runtime dependencies
@vitest/istanbul-lib-coverage none
@vitest/istanbul-lib-report none (besides @vitest/istanbul-lib-coverage)
@vitest/istanbul-lib-source-maps @jridgewell/trace-mapping, obug
@vitest/istanbul-lib-instrument @babel/core, @babel/parser, @istanbuljs/schema, @jridgewell/trace-mapping

Removed: semver, make-dir, supports-color, html-escaper, debug (→ obug), clone, is-windows, rimraf, js-yaml, nopt, webpack, babel-loader, react, react-dom.

🐞 Bug fixes

  • Coverage classes no longer rely on instanceof; CoverageMap, FileCoverage and CoverageSummary objects from a different copy of the package (e.g. upstream istanbul-lib-coverage) are recognised structurally and merge correctly. (#8)
  • text report honours FORCE_COLOR. (#7)
  • cobertura report handles fnMap entries without decl. (#7)
  • Source maps: functions without a closing-brace mapping are now mapped, cherry-picked from istanbuljs/istanbuljs#837. (a8915bd)

🏗️ Infrastructure

  • pnpm workspace with catalog: pinned versions.
  • Tests run on Vitest, including a browser-mode suite with Playwright for the html-spa components.
  • oxlint + oxfmt replace ESLint + Prettier; tsc --noEmit typechecks all packages.
  • CI matrix on Node 22 / 24 / 26 (Linux) plus Windows and macOS; pkg-pr-new preview releases on every PR; npm publishing with OIDC provenance and changelogithub release notes. (#4, #5)

Credits

Thanks to the istanbuljs organization and its contributors for the original work this fork builds on.