Repository navigation
Conversation
`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>
|
Thank you for following the naming conventions! 🙏 |
commit: |
`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>
Merging this PR will not alter performance
|
… 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>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
Summary
vis devandvis buildrun thedevandbuildtargets throughvis run. They share run's options, filters, and caching. A package's own script still wins over the inferred target.vis add -Dinto 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 packruns thepacktarget: 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 previewruns the preview target throughvis run. It offers no tool, since a preview needs a build first.vis rebuildruns the package manager'srebuild. Yarn 1 and Bun have no rebuild command, so they fail with a message instead of exiting 0.packtarget for Rslib and packem.Notes
--filterto choose a project when the workspace has several. From inside a package, the error names the workspace above.package.jsonwarnings (exports,engines,sideEffects). packem exits non-zero on warnings, so the docs say to add the fields it names.vis lint.vis nodeandvis envwere removed for now.Testing
workspace.ts(a generic onreadJsonFileSafe).dev,build, andpacklist their options and install nothing. The interactive build offer installed Vite and wrote its script and files.vis packbuilt the Rslib library todist/index.js, and packem built its output, then failed on thepackage.jsonwarnings as documented.vis previewserved the built app on port 4173 in a terminal.index.html), Rsbuild (src/index.ts), Rspack (src/index.js), Rslib (src/index.ts).🤖 Generated with Claude Code