Skip to content

feat(vis): add dev, build, and rebuild commands with Rstack inference - #35

Open
prisis wants to merge 12 commits into
t3/node-runtime-feature-parityfrom
feat/vis-dev-build-rebuild
Open

prisis wants to merge 12 commits into
t3/node-runtime-feature-parityfrom
feat/vis-dev-build-rebuild

Conversation

@prisis

@prisis prisis commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Summary

  • vis dev and vis build run the dev and build targets through vis run. They share run's options, filters, and caching. A package's own script still wins over the inferred target.
  • No target configured: they ask which tool to set up (Vite, Rsbuild, Rspack; or Rslib for build). The choice installs the tool with vis add -D into the project chosen by --filter, or the only project in the workspace. It adds a matching script, and writes the tool's config and entry files unless they already exist.
  • vis pack runs the pack target: the package's pack script, or the inferred Rslib or packem library build. With no target configured, it offers Rslib or packem, with the same flow.
  • vis preview runs the preview target through vis run. It offers no tool, since a preview needs a build first.
  • vis rebuild runs the package manager's rebuild. Yarn 1 and Bun have no rebuild command, so they fail with a message instead of exiting 0.
  • Target inference gains detectors for Rsbuild, Rslib, Rspack, Rstest, and Rslint, and a pack target for Rslib and packem.

Notes

  • vis treats the directory it is run from as the workspace root, so run these from the workspace root. Use --filter to choose a project when the workspace has several. From inside a package, the error names the workspace above.
  • A new packem library fails its first build on package.json warnings (exports, engines, sideEffects). packem exits non-zero on warnings, so the docs say to add the fields it names.
  • Preview and other server targets run only in an interactive terminal. In CI or with piped input, vis skips them.
  • This branch is based on feat(vis)!: add vis test and make vis check a lint, format, and type gate #34, so its diff includes the dev, build, pack, preview, and inference changes.
  • Not included: an rslint adapter for vis lint. vis node and vis env were removed for now.

Testing

  • Typecheck and ESLint are clean on the changed files. One pre-existing lint error remains in workspace.ts (a generic on readJsonFileSafe).
  • Full command, util, inference, and config suites: 243 files, 3033 tests.
  • Against the built CLI: the non-interactive offers for dev, build, and pack list their options and install nothing. The interactive build offer installed Vite and wrote its script and files. vis pack built the Rslib library to dist/index.js, and packem built its output, then failed on the package.json warnings as documented. vis preview served the built app on port 4173 in a terminal.
  • Entry files verified to build with the offered configs: Vite (index.html), Rsbuild (src/index.ts), Rspack (src/index.js), Rslib (src/index.ts).

🤖 Generated with Claude Code

`vis dev` and `vis build` run the dev and build targets through `vis run`,
so they share run's filters, caching, and option definitions. A package's
own `dev` or `build` script still wins over the inferred target.

`vis rebuild` runs the package manager's rebuild. Package managers without
a rebuild command (yarn 1, bun) fail with a message instead of exiting 0.

Target inference gains detectors for Rsbuild (build, dev, preview), Rslib
(library build and watch), Rspack (build, dev, preview), Rstest (test and
test:watch), and Rslint (lint). Each is ordered after the Vite detectors and
before webpack, or after the Vitest and Jest detectors for test.

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:L 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@35
npm i https://pkg.pr.new/@visulima/vis-mcp@35

commit: 7496ddd

`vis dev` and `vis build` used to fail when no project defined the target.
Now, when none does, they ask which tool to set up: Vite, Rsbuild, Rspack,
or Rslib for build. The choice is the consent. The tool is installed with
`vis add -D` into the nearest package, and a matching `dev` or `build`
script is added to that package's package.json, so later runs use it.

The script is what makes the choice stick. Inference needs a config file,
and the offer does not create one. Non-interactive runs, and runs at the
workspace root, stop with an error that lists the options.

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

codspeed Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

⚠️ 9 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 feat/vis-dev-build-rebuild (7496ddd) with t3/node-runtime-feature-parity (7fe78cc)2

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. ↩

  2. No successful run was found on t3/node-runtime-feature-parity (64dca08) during the generation of this report, so 6ea5c77 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@prisis
prisis changed the base branch from main to t3/node-runtime-feature-parity October 17, 2026 22:30
@github-actions github-actions Bot removed the size:L Size of the change, tests and generated files excluded. label Oct 17, 2026
@github-actions github-actions Bot added the size:XL Size of the change, tests and generated files excluded. label Oct 17, 2026
prisis and others added 7 commits October 18, 2026 00:33
… added

When `vis dev` or `vis build` installs a tool, it now also writes that tool's
minimal config file (vite.config.ts, rsbuild.config.ts, rslib.config.ts, or
rspack.config.mjs) next to the new script. The config lets inference find the
target on later runs, not just the script. An existing config file is left
untouched.

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

vis treats the directory it runs from as the workspace root, so walking up
from a package never found the workspace. The offer also refused to write at
the root, so it could not succeed. It now picks the project: the one named by
--filter, or the only project in the workspace. With several projects and no
--filter, it asks for --filter instead of guessing.

Generated TypeScript configs are .mts, so Vite does not load them as
CommonJS. The docs describe the root and --filter behaviour.

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

The offer for a missing dev or build target now writes the entry file each
tool needs as well as its config: index.html for Vite, src/index.ts for
Rsbuild and Rslib, and src/index.js for Rspack. Each is written only when it
does not exist, and missing directories are created. Each was confirmed to
build with these files.

Discovery stores project roots relative to the workspace root. The offer
used them as if they were relative to the current directory, so run from a
package it installed and wrote into the wrong place. Roots are now resolved
against the workspace root.

The vis.config.ts first-run question is no longer asked again by the
`vis add` subprocess the offer starts, and that subprocess skips the sponsor
and MCP promo lines. Running from a package with no workspace now names the
workspace above it, so the next step is clear.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
`vis preview` runs the preview target through `vis run`, the same way `vis
dev` and `vis build` run theirs, and has the same filters and caching. It
offers no tool, since a preview needs a build first.

`vis node` runs the node binary that is running vis, with its arguments
passed through, and exits with its status.

`vis env` prints the Node version and platform, the directory, the workspace
root, and the package manager vis would use from here. It changes nothing.

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

`vis pack` runs the `pack` target: the package's pack script, or the inferred
library build. The Rslib and packem detectors now emit a `pack` target next
to their `build`, so `vis build` for existing packem projects is unchanged.

When no project defines `pack`, `vis pack` offers Rslib or packem, the same
flow as `vis dev` and `vis build`. Rslib installs @rslib/core and typescript.
packem installs @visulima/packem, esbuild (the transformer its config uses),
and typescript. Each writes a minimal config with ESM output, and src/index.ts
as the entry.

A new packem library fails its first build on package.json warnings about
exports, engines, and sideEffects. packem exits non-zero on warnings, so the
docs say to add the fields it names.

`vis preview` docs now note that the server runs in an interactive terminal.

`vis node` and `vis env` are removed for now.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
…and scope (#42)

Co-authored-by: Claude Haiku 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ebf53f82-e205-41e2-9a54-84418c6f12e1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added size:XXL Size of the change, tests and generated files excluded. and removed size:XL Size of the change, tests and generated files excluded. labels Oct 22, 2026

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