Skip to content

feat(vis)!: add vis test and make vis check a lint, format, and type gate - #34

Open
prisis wants to merge 7 commits into
mainfrom
t3/node-runtime-feature-parity
Open

prisis wants to merge 7 commits into
mainfrom
t3/node-runtime-feature-parity

Conversation

@prisis

@prisis prisis commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Summary

  • vis test runs the package's test script when one exists, through the detected package manager. A warning is printed first. Otherwise it runs Vitest, or Rstest when Vitest is not installed. Both are found by walking up node_modules.
  • No runner installed: vis test asks whether to add Vitest or Rstest as a devDependency, then runs it. Non-interactive runs stop with an error that lists the install commands. Cancelling installs nothing.
  • --watch is rejected when a test script is used, so the flag is never dropped silently.
  • vis check is now a gate: it runs vis lint, then vis fmt --check, over the same scope. The type check runs when TypeScript is detected, unless lint.adapters.typecheck.enabled is false.
  • vis outdated is the catalog dependency check, previously vis check.

Breaking change

vis check no longer reports outdated dependencies. Scripts and CI that use vis check for that now need vis outdated. Old flags on vis check (--exit-code, --security, --format json) fail as unknown options. vis check <package> fails with a message that points to vis outdated. The c alias is removed.

Testing

  • Typecheck and ESLint are clean.
  • The native addons (vis, secret-scanner, task-runner) build locally, and the command, util, and inference suites pass: 214 files, 2794 tests.
  • vis check was run against the built CLI in sandboxes: exit 1 on a type error, exit 0 on a clean project, and a clear error for vis check react.
  • vis test was run against the built CLI: it lists the runners and installs nothing when non-interactive. The Rstest fallback forwards arguments and propagates the exit code.

prisis and others added 3 commits October 17, 2026 23:07
`vis test` runs the project's tests with Vitest without needing a `test`
script or a vis config entry. It finds the nearest `vitest` install by
walking up from the current directory, so a hoisted install works from a
workspace package. Arguments and unknown flags are forwarded to Vitest,
`--watch` keeps Vitest in watch mode, and the exit code is Vitest's.

Vitest is not bundled; the command errors with the `vis add -D vitest`
hint when it is missing.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
`vis check` now runs `vis lint` and then `vis fmt --check` over the same
scope, so one command gates a change on every source check. The type
check runs too when TypeScript is detected, unless
`lint.adapters.typecheck.enabled` is set to `false`. `--fix`, `--since`,
`--staged`, and file arguments are forwarded to both tools.

The catalog dependency check moves to `vis outdated`, which is now its
primary name. It keeps its options, including `--security-config`.

A bare file-like argument that does not exist (for example
`vis check react`) is rejected with a pointer to `vis outdated`, so a
dependency name cannot be skipped silently as a path.

BREAKING CHANGE: `vis check` no longer reports outdated dependencies.
Replace `vis check` with `vis outdated` in scripts, CI, and hooks, and
replace `vis check <packages>` and flags such as `--exit-code`,
`--security`, and `--format json` the same way. The `c` alias is removed
from the dependency check, so `vis c` no longer runs anything. Old flags
on `vis check` fail as unknown options.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
`vis test` now prefers the package's own `test` script over the Vitest
fallback, so the command a team already runs stays the source of truth.
It runs `<pm> run test` with the detected package manager, forwards
arguments after `--`, and prints a warning first so it is clear which
runner ran. npm's `init` placeholder does not count as a script.

`--watch` is rejected when a test script is used: it only applies to
Vitest, and dropping it silently would look like it had worked.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for following the naming conventions! 🙏

@github-actions github-actions Bot added package: vis size:XXL Size of the change, tests and generated files excluded. vouch:trusted PR author is a collaborator, a bot or on the VOUCHED list. labels Oct 17, 2026
@pkg-pr-new

pkg-pr-new Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@visulima/vis@34
npm i https://pkg.pr.new/@visulima/vis-mcp@34

commit: 1b11bf9

@codspeed

codspeed Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

⚠️ 8 benchmarks spent significant time in system calls

System calls cannot be consistently instrumented, so they are not included in the measure, which understates the real cost. Please switch to the Walltime instrument to accurately measure system calls.

Measurement and system calls

✅ 12 untouched benchmarks
⏩ 101 skipped benchmarks1


Comparing t3/node-runtime-feature-parity (1b11bf9) with main (c71b539)

Open in CodSpeed

Footnotes

  1. 101 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

prisis and others added 4 commits October 17, 2026 23:59
`vis test` still runs the package's own `test` script first, then Vitest.
When Vitest is not installed, it now runs Rstest (`rstest run`, or
`rstest watch` with `--watch`) instead of failing. Vitest keeps priority
when both are installed, the same order the target inference uses.

The bin lookup is shared between the two runners, so a hoisted install
is found from a workspace package for either one.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
`vis test` used to fail when neither Vitest nor Rstest was installed. Now,
when the package has no `test` script and no runner, it asks which runner to
add: Vitest or Rstest. The choice is the consent. The install goes through
`vis add -D`, so workspace root handling and the supply-chain checks apply,
and nothing runs after a failed install.

Outside an interactive terminal it does not choose for the user. It stops
with an error listing each runner and its install command. Cancelling (Enter,
`q`, or an out-of-range number) stops before anything is installed.

The prompt and installer are shared helpers in `util/tool-choice`, so the
dev and build commands can use the same flow.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: vis size:XXL Size of the change, tests and generated files excluded. vouch:trusted PR author is a collaborator, a bot or on the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant