npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

vite8-doctor

v0.1.0

Published

Vite 8 / Rolldown migration diagnostics with safe build probes.

Readme

vite8-doctor

Check a Vite app before moving it to Vite 8 / Rolldown.

vite8-doctor scans local config, checks Vite plugin peer ranges, and can run build probes in temp directories. The goal is simple: separate "this project is already broken" from "the Vite 8 build changed something worth looking at".

It does not prove that an app is compatible. It gives you a short report with evidence.

Skip This README

If you are using an AI coding agent, give it this:

Use vite8-doctor to triage this project before a Vite 8 / Rolldown migration.

Run:
npx vite8-doctor . --probe-build --report json

If dependency installs are acceptable in a temporary copy, also run:
npx vite8-doctor . --probe-build --probe-vite8 --allow-install --report json

Read the JSON contract before acting on the report:
https://raw.githubusercontent.com/artemxknpv/vite8-doctor/refs/heads/main/docs/json-contract.md

Use summary.status for routing and migrationHints[].agentAction for follow-up planning.
Do not automatically edit config or dependencies based only on vite8-doctor hints.
Treat the report as migration triage, not compatibility proof.

Usage

Requires Node ^20.19.0 || >=22.12.0.

npx vite8-doctor /path/to/project

JSON output:

npx vite8-doctor /path/to/project --json

GitHub-ready report:

npx vite8-doctor /path/to/project --report github

Run the current Vite build in a temporary output directory:

npx vite8-doctor /path/to/project --probe-build

Compare it with Vite 8 in a temporary project copy:

npx vite8-doctor /path/to/project --probe-build --probe-vite8 --allow-install

--probe-vite8 requires --allow-install because it installs dependencies in the temporary copy. The original project is not modified.

What It Checks

  • Vite version/range from package.json
  • root-level vite.config.* files, including alternate names such as electron.vite.config.ts
  • Vite plugin imports
  • installed plugin versions and peerDependencies.vite
  • migration-sensitive config such as optimizeDeps, manualChunks, rollupOptions, esbuild, plugin-legacy, and custom build targets
  • workspace project shape
  • framework wrappers with no direct Vite dependency, such as Astro or Nuxt, as scope limitations
  • current build status when --probe-build is enabled
  • temporary Vite 8 build status when --probe-vite8 --allow-install is enabled
  • migration hints with source URLs or local evidence
  • build output deltas when both current and Vite 8 builds run

Report Formats

  • --report markdown: default terminal-friendly markdown.
  • --report json: structured report for scripts.
  • --report github: paste-ready issue or discussion report.
  • --json: backward-compatible alias for --report json.

The JSON report is meant to be consumed by scripts and AI agents. It includes schemaVersion, tool metadata, a machine-oriented summary, stable hint ids, and conservative agentAction objects. See docs/json-contract.md.

Migration Hints

Hints are prompts for review. They are not compatibility guarantees.

0.1 covers these signals:

  • optimizeDeps and optimizeDeps.esbuildOptions
  • rollupOptions and manualChunks
  • esbuild, plugin-legacy, and custom build targets
  • package and Vite plugin peer metadata that excludes Vite 8
  • unavailable plugin metadata when dependencies are missing
  • dynamic config-loading scope limits
  • framework-wrapper scope limits
  • workspace scope limits
  • current build failures
  • unsupported package managers for temporary Vite 8 comparison
  • disabled Yarn Vite 8 comparison
  • missing declared dependencies in the temporary Vite 8 copy
  • warnings introduced by the temporary Vite 8 build
  • Vite large chunk warnings

External migration hints link to Vite docs. Local hints cite package metadata, build output, or tool limitations.

Probe Classifications

  • passed: current build passed and no static risks were detected.
  • passed-with-risks: build passed, but config or plugin metadata deserves review.
  • baseline-broken: the current build already fails; this is not classified as a Vite 8 migration failure.
  • vite8-build-failed: current build passed, but the temporary Vite 8 build failed.
  • probe-inconclusive: the probe was skipped or could not complete.

Build Output Delta

When both builds run, vite8-doctor compares asset count, total bytes, largest assets, warnings, and changed/added/removed asset names.

Asset paths are relative to each build outDir. The report should not expose absolute temporary paths.

Safety Model

Static scanning only reads local files.

Probe mode executes project build tooling. Use it only on projects you trust. It is not a sandbox.

--probe-build prefers the existing local Vite binary and can fall back to package-manager exec with a temporary outDir.

--probe-vite8 --allow-install copies the project to a temporary directory, skips .git, .nx, node_modules, .omx, .tasks, .ai, .omc, common build output, .env*, .npmrc, .yarnrc*, and .pnpmfile.cjs, then installs Vite 8 inside that copy.

npm and pnpm installs use --ignore-scripts. Other package managers, including Yarn and Bun, are rejected in 0.1 because lifecycle-script suppression is not handled safely yet.

Probe subprocesses run with a reduced environment. Known secret values from the parent environment are redacted from captured output, but project tooling can still print sensitive data from files it reads itself. Review reports before pasting them into public issues.

Workspace Scope

0.1 supports standalone package probes.

Workspace roots are reported as workspace-root with detected child packages. Workspace child packages are reported as workspace-child; probe mode returns probe-inconclusive with unsupported-workspace-child.

This avoids a bad result from copying one child package without the workspace around it.

Example

# vite8-doctor report

project: oklch-picker
package manager: pnpm
vite range: ^8.0.8
project shape: standalone

## config risks
- [medium] rollup-options: rollupOptions are worth probing because Vite 8 routes build behavior through Rolldown.
  evidence: vite.config.ts:15 `rollupOptions: {`

## plugin peer ranges
- vite-plugin-pug-transformer: 1.0.8, peer vite ^2.5.10 || ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0; does not declare vite 8 support
  note: peer metadata can lag behind actual compatibility; this is a review signal, not proof of breakage.

Limitations

  • Static findings are review signals, not failures.
  • Peer dependency metadata can lag behind actual compatibility.
  • Missing plugin metadata means the dependency graph is not installed or not inspectable; it is not a compatibility signal.
  • Frameworks that wrap Vite without a direct Vite dependency or vite.config.* are outside 0.1's direct migration scope.
  • A missing dependency in the temporary Vite 8 copy can be a temp install artifact. Reproduce it on a normal branch before treating it as a migration failure.
  • A temporary Vite 8 build failure is not proof by itself because the temp copy installs with lifecycle scripts disabled.
  • Plugin detection covers common ESM imports and CommonJS require(...) calls, but it is still a static scan. Dynamic plugin loading is reported as a scope limitation, not resolved automatically.
  • AI agents should use JSON output for triage, issue drafting, and migration planning. They should not automatically edit config or dependencies based only on vite8-doctor hints.
  • Runtime correctness still requires the project's own tests.
  • Workspace-aware temp probes are not supported in 0.1.
  • Hints are a small initial catalog, not a full Vite 8 issue database.
  • Plug'n'Play-specific detection is deferred until there is a real signal and a fixture.

Case Studies

Local development cases live under docs/cases/. They are excluded from the npm package by the package files allowlist.

See docs/validation.md for the generated and real-project validation notes behind the 0.1 scope.

Development

node --test
node ./bin/vite8-doctor.mjs --help
node ./bin/vite8-doctor.mjs fixtures/vite-basic --json
node ./bin/vite8-doctor.mjs fixtures/vite-baseline-broken --probe-build --json
node ./bin/vite8-doctor.mjs fixtures/vite-dual-build --probe-build --probe-vite8 --allow-install --report github
npm pack --dry-run --json