Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"mcpServers": {
"vite-plus": {
"command": "npx",
"args": ["vp", "mcp"]
Comment on lines +4 to +5
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using npx vp mcp can execute a downloaded package when vp isn’t available locally, which introduces a supply-chain risk and can make behavior non-deterministic. Prefer executing a known binary (e.g., command: \"vp\" with args: [\"mcp\"], or a repo-local path like node_modules/.bin/vp if that’s the intended source).

Suggested change
"command": "npx",
"args": ["vp", "mcp"]
"command": "vp",
"args": ["mcp"]

Copilot uses AI. Check for mistakes.
}
}
}
1 change: 1 addition & 0 deletions .claude/skills/vite-plus
1 change: 0 additions & 1 deletion .husky/pre-commit

This file was deleted.

1 change: 1 addition & 0 deletions .vite-hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vp staged
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Git hook scripts are typically executed as standalone files and should include a shell shebang (and often set -e) to ensure consistent execution across environments. Add an explicit shebang (e.g., #!/usr/bin/env sh) so the hook runs reliably regardless of how it’s invoked.

Copilot uses AI. Check for mistakes.
80 changes: 80 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,83 @@ Vite+ automatically detects and wraps the underlying package manager such as pnp
- [ ] Run `vite install` after pulling remote changes and before getting started.
- [ ] Run `vite lint`, `vite fmt`, and `vite test` to validate changes.
<!--VITE PLUS END-->

<!--injected-by-vite-plus-v0.1.4-->
<!--VITE PLUS START-->

# Using Vite+, the Unified Toolchain for the Web

This project is using Vite+, a unified toolchain built on top of Vite, Rolldown, Vitest, tsdown, Oxlint, Oxfmt, and Vite Task. Vite+ wraps runtime management, package management, and frontend tooling in a single global CLI called `vp`. Vite+ is distinct from Vite, but it invokes Vite through `vp dev` and `vp build`.

## Vite+ Workflow

`vp` is a global binary that handles the full development lifecycle. Run `vp help` to print a list of commands and `vp <command> --help` for information about a specific command.

### Start

Comment on lines +140 to +152
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This adds a second <!--VITE PLUS START--> ... <!--VITE PLUS END--> block immediately after an existing <!--VITE PLUS END-->, which makes the document contain two Vite+ sections and looks like an accidental duplicate injection. Consider keeping a single Vite+ block (remove the older one or avoid committing the injected block) to prevent confusing/duplicated guidance.

Suggested change
<!--injected-by-vite-plus-v0.1.4-->
<!--VITE PLUS START-->
# Using Vite+, the Unified Toolchain for the Web
This project is using Vite+, a unified toolchain built on top of Vite, Rolldown, Vitest, tsdown, Oxlint, Oxfmt, and Vite Task. Vite+ wraps runtime management, package management, and frontend tooling in a single global CLI called `vp`. Vite+ is distinct from Vite, but it invokes Vite through `vp dev` and `vp build`.
## Vite+ Workflow
`vp` is a global binary that handles the full development lifecycle. Run `vp help` to print a list of commands and `vp <command> --help` for information about a specific command.
### Start

Copilot uses AI. Check for mistakes.
- create - Create a new project from a template
- migrate - Migrate an existing project to Vite+
- config - Configure hooks and agent integration
- staged - Run linters on staged files
- install (`i`) - Install dependencies
- env - Manage Node.js versions

### Develop

- dev - Run the development server
- check - Run format, lint, and TypeScript type checks
- lint - Lint code
- fmt - Format code
- test - Run tests

### Execute

- run - Run monorepo tasks
- exec - Execute a command from local `node_modules/.bin`
- dlx - Execute a package binary without installing it as a dependency
- cache - Manage the task cache

### Build

- build - Build for production
- pack - Build libraries
- preview - Preview production build

### Manage Dependencies

Vite+ automatically detects and wraps the underlying package manager such as pnpm, npm, or Yarn through the `packageManager` field in `package.json` or package manager-specific lockfiles.

- add - Add packages to dependencies
- remove (`rm`, `un`, `uninstall`) - Remove packages from dependencies
- update (`up`) - Update packages to latest versions
- dedupe - Deduplicate dependencies
- outdated - Check for outdated packages
- list (`ls`) - List installed packages
- why (`explain`) - Show why a package is installed
- info (`view`, `show`) - View package information from the registry
- link (`ln`) / unlink - Manage local package links
- pm - Forward a command to the package manager

### Maintain

- upgrade - Update `vp` itself to the latest version

These commands map to their corresponding tools. For example, `vp dev --port 3000` runs Vite's dev server and works the same as Vite. `vp test` runs JavaScript tests through the bundled Vitest. The version of all tools can be checked using `vp --version`. This is useful when researching documentation, features, and bugs.

## Common Pitfalls

- **Using the package manager directly:** Do not use pnpm, npm, or Yarn directly. Vite+ can handle all package manager operations.
- **Always use Vite commands to run tools:** Don't attempt to run `vp vitest` or `vp oxlint`. They do not exist. Use `vp test` and `vp lint` instead.
- **Running scripts:** Vite+ commands take precedence over `package.json` scripts. If there is a `test` script defined in `scripts` that conflicts with the built-in `vp test` command, run it using `vp run test`.
- **Do not install Vitest, Oxlint, Oxfmt, or tsdown directly:** Vite+ wraps these tools. They must not be installed directly. You cannot upgrade these tools by installing their latest versions. Always use Vite+ commands.
- **Use Vite+ wrappers for one-off binaries:** Use `vp dlx` instead of package-manager-specific `dlx`/`npx` commands.
- **Import JavaScript modules from `vite-plus`:** Instead of importing from `vite` or `vitest`, all modules should be imported from the project's `vite-plus` dependency. For example, `import { defineConfig } from 'vite-plus';` or `import { expect, test, vi } from 'vite-plus/test';`. You must not install `vitest` to import test utilities.
- **Type-Aware Linting:** There is no need to install `oxlint-tsgolint`, `vp lint --type-aware` works out of the box.

## Review Checklist for Agents

- [ ] Run `vp install` after pulling remote changes and before getting started.
- [ ] Run `vp check` and `vp test` to validate changes.
<!--VITE PLUS END-->
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This adds a second <!--VITE PLUS START--> ... <!--VITE PLUS END--> block immediately after an existing <!--VITE PLUS END-->, which makes the document contain two Vite+ sections and looks like an accidental duplicate injection. Consider keeping a single Vite+ block (remove the older one or avoid committing the injected block) to prevent confusing/duplicated guidance.

Suggested change
<!--VITE PLUS END-->
<!-- Duplicate Vite+ block end marker removed; keep a single VITE PLUS section -->

Copilot uses AI. Check for mistakes.

<!--/injected-by-vite-plus-->
Comment on lines +140 to +218
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This newly injected documentation block for Vite+ appears to be a complete replacement for the older section on lines 86-138. To prevent confusion from having duplicated and potentially conflicting information, the old <!--VITE PLUS START-->...<!--VITE PLUS END--> block should be removed.

23 changes: 9 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"ci": "vp run cov && vp run prepublishOnly && npm pack && attw --pack",
"clean": "rm -rf dist && tsc -b --clean",
"prepublishOnly": "vp run build",
"prepare": "husky",
"prepare": "vp config",
Comment thread
fengmk2 marked this conversation as resolved.
Outdated
"check": "vp check",
"check:fix": "vp check --fix"
},
Expand All @@ -84,35 +84,30 @@
"@eggjs/tsconfig": "^2.0.0",
"@types/busboy": "^1.5.4",
"@types/mime-types": "^2.1.4",
"@types/node": "^22.19.11",
"@types/node": "^22.19.15",
"@types/proxy": "^1.0.4",
"@types/qs": "^6.14.0",
"@types/qs": "^6.15.0",
"@types/selfsigned": "^2.1.0",
"@types/tar-stream": "^2.2.3",
"@typescript/native-preview": "7.0.0-dev.20260308.1",
"@ungap/structured-clone": "^1.3.0",
"@vitest/coverage-v8": "^4.0.18",
"busboy": "^1.6.0",
"cross-env": "^10.1.0",
"husky": "^9.1.7",
"iconv-lite": "^0.6.3",
"lint-staged": "^16.2.7",
"proxy": "^1.0.2",
"selfsigned": "^3.0.1",
"string.prototype.towellformed": "^1.0.2",
"tar-stream": "^2.2.0",
"tshy": "^3.3.2",
"tshy-after": "^1.4.1",
"typescript": "^5.9.3",
"vite-plus": "^0.1.1",
"vitest": "npm:@voidzero-dev/vite-plus-test@^0.1.1"
"vite-plus": "^0.1.4",
"vitest": "npm:@voidzero-dev/vite-plus-test@^0.1.4"
},
"overrides": {
"vite": "npm:@voidzero-dev/vite-plus-core@^0.1.1",
"vitest": "npm:@voidzero-dev/vite-plus-test@^0.1.1"
},
"lint-staged": {
"*": "vp check --fix"
"vite": "npm:@voidzero-dev/vite-plus-core@^0.1.4",
"vitest": "npm:@voidzero-dev/vite-plus-test@^0.1.4"
},
Comment on lines 108 to 111
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The overrides still pin vite-plus-core / vite-plus-test to ^0.1.1 while this PR updates the main vite-plus / vitest wrapper deps to ^0.1.4. This will likely force older underlying tooling and can negate the upgrade (or create mismatched behavior). Update these override versions to match the upgraded Vite+ ecosystem (or remove the overrides if they’re no longer needed).

Copilot uses AI. Check for mistakes.
Comment thread
coderabbitai[bot] marked this conversation as resolved.
"tshy": {
"exports": {
Expand All @@ -126,8 +121,8 @@
"packageManager": "pnpm@10.31.0",
"pnpm": {
"overrides": {
"vite": "npm:@voidzero-dev/vite-plus-core@^0.1.1",
"vitest": "npm:@voidzero-dev/vite-plus-test@^0.1.1"
"vite": "npm:@voidzero-dev/vite-plus-core@^0.1.4",
"vitest": "npm:@voidzero-dev/vite-plus-test@^0.1.4"
},
"peerDependencyRules": {
"allowAny": [
Expand Down
Loading
Loading