Skip to content

Commit 6a14d78

Browse files
authored
Merge branch 'main' into test/e2e-varlet
2 parents 3896e4b + dc53eb3 commit 6a14d78

8 files changed

Lines changed: 219 additions & 85 deletions

File tree

docs/.vitepress/config.mts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ export default extendConfig(
139139
{
140140
text: 'Resources',
141141
items: [
142+
{ text: 'Team', link: '/team' },
142143
{ text: 'GitHub', link: 'https://github.com/voidzero-dev/vite-plus' },
143144
{ text: 'Releases', link: 'https://github.com/voidzero-dev/vite-plus/releases' },
144145
{

docs/_data/team.js

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
/** @type {import('@voidzero-dev/vitepress-theme').TeamMember[]} */
2+
export const core = [
3+
{
4+
avatar: 'https://github.com/fengmk2.png',
5+
name: 'MK',
6+
links: [{ icon: 'github', link: 'https://github.com/fengmk2' },
7+
{ icon: 'x', link: 'https://x.com/fengmk2' },
8+
],
9+
},
10+
{
11+
avatar: 'https://github.com/branchseer.png',
12+
name: 'Wang Chi',
13+
links: [
14+
{ icon: 'github', link: 'https://github.com/branchseer' },
15+
{ icon: 'x', link: 'https://x.com/branchseer' }
16+
],
17+
},
18+
{
19+
avatar: 'https://github.com/Brooooooklyn.png',
20+
name: 'Long Yinan',
21+
links: [
22+
{ icon: 'github', link: 'https://github.com/Brooooooklyn' },
23+
{ icon: 'x', link: 'https://x.com/Brooooook_lyn' },
24+
],
25+
},
26+
{
27+
avatar: 'https://github.com/cpojer.png',
28+
name: 'Christoph Nakazawa',
29+
links: [
30+
{ icon: 'github', link: 'https://github.com/cpojer' },
31+
{ icon: 'x', link: 'https://x.com/cpojer' },
32+
{ icon: 'bluesky', link: 'https://bsky.app/profile/christoph.nkzw.tech' },
33+
],
34+
},
35+
{
36+
avatar: 'https://github.com/TheAlexLichter.png',
37+
name: 'Alexander Lichter',
38+
links: [
39+
{ icon: 'github', link: 'https://github.com/TheAlexLichter' },
40+
{ icon: 'x', link: 'https://x.com/TheAlexLichter' },
41+
{ icon: 'bluesky', link: 'https://bsky.app/profile/thealexlichter.com' },
42+
],
43+
},
44+
{
45+
avatar: 'https://github.com/camc314.png',
46+
name: 'Cameron Clark',
47+
links: [
48+
{ icon: 'github', link: 'https://github.com/camc314' },
49+
{ icon: 'x', link: 'https://x.com/cameron_C2' },
50+
],
51+
},
52+
{
53+
avatar: 'https://github.com/leaysgur.png',
54+
name: 'Yuji Sugiura',
55+
links: [
56+
{ icon: 'github', link: 'https://github.com/leaysgur' },
57+
{ icon: 'x', link: 'https://x.com/leaysgur' },
58+
],
59+
},
60+
{
61+
avatar: 'https://github.com/mdong1909.png',
62+
name: 'Michael Dong',
63+
links: [
64+
{ icon: 'github', link: 'https://github.com/mdong1909' },
65+
{ icon: 'x', link: 'https://x.com/mdong1909' },
66+
{ icon: 'linkedin', link: 'https://www.linkedin.com/in/michael-d-612b5b50/' },
67+
],
68+
},
69+
{
70+
avatar: 'https://github.com/kazupon.png',
71+
name: 'kazupon',
72+
links: [
73+
{ icon: 'github', link: 'https://github.com/kazupon' },
74+
{ icon: 'x', link: 'https://x.com/kazu_pon' },
75+
{ icon: 'bluesky', link: 'https://bsky.app/profile/kazupon.dev' },
76+
],
77+
},
78+
{
79+
avatar: 'https://github.com/ubugeeei.png',
80+
name: 'ubugeeei',
81+
links: [
82+
{ icon: 'github', link: 'https://github.com/ubugeeei' },
83+
{ icon: 'x', link: 'https://x.com/ubugeeei' },
84+
],
85+
},
86+
{
87+
avatar: 'https://github.com/nekomoyi.png',
88+
name: 'nekomoyi',
89+
links: [
90+
{ icon: 'github', link: 'https://github.com/nekomoyi' },
91+
],
92+
},
93+
{
94+
avatar: 'https://github.com/HaasStefan.png',
95+
name: 'Stefan Haas',
96+
links: [
97+
{ icon: 'github', link: 'https://github.com/HaasStefan' },
98+
{ icon: 'x', link: 'https://x.com/StefanvHaas' },
99+
{ icon: 'linkedin', link: 'https://www.linkedin.com/in/stefan-haas-angular' },
100+
],
101+
},
102+
{
103+
avatar: 'https://github.com/naokihaba.png',
104+
name: 'naokihaba',
105+
links: [
106+
{ icon: 'github', link: 'https://github.com/naokihaba' },
107+
{ icon: 'x', link: 'https://x.com/naokihaba' },
108+
{ icon: 'bluesky', link: 'https://bsky.app/profile/naokihaba.com' },
109+
],
110+
},
111+
{
112+
avatar: 'https://github.com/jong-kyung.png',
113+
name: 'JongKyung Lee',
114+
links: [
115+
{ icon: 'github', link: 'https://github.com/jong-kyung' },
116+
{ icon: 'linkedin', link: 'https://www.linkedin.com/in/jong-kyung' },
117+
],
118+
},
119+
]
120+
121+
/** @type {import('@voidzero-dev/vitepress-theme').TeamMember[]} */
122+
export const emeriti = []

docs/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@
2121
"oxc-minify": "^0.120.0",
2222
"tailwindcss": "^4.1.18",
2323
"vitepress": "2.0.0-alpha.15"
24-
}
25-
}
24+
},
25+
"packageManager": "pnpm@10.33.0"
26+
}

docs/team.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
layout: page
3+
title: Meet the Team
4+
description: The development of Vite+ is guided by an international team.
5+
---
6+
7+
<script setup>
8+
import {
9+
VPTeamPage,
10+
VPTeamPageTitle,
11+
VPTeamPageSection,
12+
VPTeamMembers
13+
} from '@voidzero-dev/vitepress-theme'
14+
import { core } from './_data/team'
15+
</script>
16+
17+
<VPTeamPage>
18+
<VPTeamPageTitle>
19+
<template #title>Meet the Team</template>
20+
<template #lead>
21+
The team members who work on Vite+ and are responsible for its development, maintenance, and community engagement.
22+
</template>
23+
</VPTeamPageTitle>
24+
<VPTeamMembers :members="core" />
25+
<!-- <VPTeamPageSection v-if="emeriti.length">
26+
<template #title>Team Emeriti</template>
27+
<template #lead>
28+
Here we honor some no-longer-active team members who have made valuable
29+
contributions in the past.
30+
</template>
31+
<template #members>
32+
<VPTeamMembers size="small" :members="emeriti" />
33+
</template>
34+
</VPTeamPageSection> -->
35+
</VPTeamPage>

packages/cli/AGENTS.md

Lines changed: 9 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -2,87 +2,19 @@
22

33
# Using Vite+, the Unified Toolchain for the Web
44

5-
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`.
6-
7-
## Vite+ Workflow
8-
9-
`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.
10-
11-
### Start
12-
13-
- create - Create a new project from a template
14-
- migrate - Migrate an existing project to Vite+
15-
- config - Configure hooks and agent integration
16-
- staged - Run linters on staged files
17-
- install (`i`) - Install dependencies
18-
- env - Manage Node.js versions
19-
20-
### Develop
21-
22-
- dev - Run the development server
23-
- check - Run format, lint, and TypeScript type checks
24-
- lint - Lint code
25-
- fmt - Format code
26-
- test - Run tests
27-
28-
### Execute
29-
30-
- run - Run monorepo tasks
31-
- exec - Execute a command from local `node_modules/.bin`
32-
- dlx - Execute a package binary without installing it as a dependency
33-
- cache - Manage the task cache
34-
35-
### Build
36-
37-
- build - Build for production
38-
- pack - Build libraries
39-
- preview - Preview production build
40-
41-
### Manage Dependencies
42-
43-
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.
44-
45-
- add - Add packages to dependencies
46-
- remove (`rm`, `un`, `uninstall`) - Remove packages from dependencies
47-
- update (`up`) - Update packages to latest versions
48-
- dedupe - Deduplicate dependencies
49-
- outdated - Check for outdated packages
50-
- list (`ls`) - List installed packages
51-
- why (`explain`) - Show why a package is installed
52-
- info (`view`, `show`) - View package information from the registry
53-
- link (`ln`) / unlink - Manage local package links
54-
- pm - Forward a command to the package manager
55-
56-
### Maintain
57-
58-
- upgrade - Update `vp` itself to the latest version
59-
60-
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.
5+
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, and it invokes Vite through `vp dev` and `vp build`. Run `vp help` to print a list of commands and `vp <command> --help` for information about a specific command.
616

627
## Common Pitfalls
638

64-
- **Using the package manager directly:** Do not use pnpm, npm, or Yarn directly. Vite+ can handle all package manager operations.
65-
- **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.
66-
- **Running scripts:** Vite+ built-in commands (`vp dev`, `vp build`, `vp test`, etc.) always run the Vite+ built-in tool, not any `package.json` script of the same name. To run a custom script that shares a name with a built-in command, use `vp run <script>`. For example, if you have a custom `dev` script that runs multiple services concurrently, run it with `vp run dev`, not `vp dev` (which always starts Vite's dev server).
67-
- **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.
68-
- **Use Vite+ wrappers for one-off binaries:** Use `vp dlx` instead of package-manager-specific `dlx`/`npx` commands.
69-
- **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.
70-
- **Type-Aware Linting:** There is no need to install `oxlint-tsgolint`, `vp lint --type-aware` works out of the box.
71-
72-
## CI Integration
73-
74-
For GitHub Actions, consider using [`voidzero-dev/setup-vp`](https://github.com/voidzero-dev/setup-vp) to replace separate `actions/setup-node`, package-manager setup, cache, and install steps with a single action.
9+
- **Running scripts:** Vite+ built-in commands (`vp lint`, `vp dev`, `vp build`, `vp test`, etc.) always run the Vite+ built-in tool. Use `vp run <script>` to run `package.json` scripts or tasks defined in `vite.config.ts`
10+
- **Do not install Vitest, Oxlint, Oxfmt, or tsdown directly:** Vite+ wraps these tools. Do not install or upgrade them, use Vite+ directly.
11+
- **Import JavaScript modules from `vite-plus`:** Import modules from the `vite-plus` dependency, not from `vite` or `vitest`. 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.
7512

76-
```yaml
77-
- uses: voidzero-dev/setup-vp@v1
78-
with:
79-
cache: true
80-
- run: vp check
81-
- run: vp test
82-
```
83-
84-
## Review Checklist for Agents
13+
## Review Checklist
8514

8615
- [ ] Run `vp install` after pulling remote changes and before getting started.
87-
- [ ] Run `vp check` and `vp test` to validate changes.
16+
- [ ] Run `vp check` and `vp test` to format, lint, type check and test changes.
17+
- [ ] Check if there are tasks or `package.json` scripts necessary for validation, run via `vp run <script>`.
18+
19+
* Docs: https://viteplus.dev/guide/
8820
<!--VITE PLUS END-->

packages/cli/bin/oxfmt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
// This enables IDE extensions (e.g., oxc-vscode) to discover and start the LSP server.
55
// Binary resolution follows the same approach as `src/resolve-fmt.ts`.
66

7-
if (!process.argv.includes('--lsp')) {
8-
console.error('This oxfmt wrapper is for IDE extension use only (--lsp mode).');
7+
const isLSP = process.argv.includes('--lsp');
8+
const isStdin = process.argv.some((arg) => arg.startsWith('--stdin-filepath'));
9+
if (!isLSP && !isStdin) {
10+
console.error('This oxfmt wrapper is for IDE extension use only (lsp or stdin mode).');
911
console.error('To format your code, run: vp fmt');
1012
process.exit(1);
1113
}

packages/cli/snap-tests/bin-oxfmt-wrapper/snap.txt

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,52 @@
11
[1]> node ../node_modules/vite-plus/bin/oxfmt # should reject non-LSP usage
2-
This oxfmt wrapper is for IDE extension use only (--lsp mode).
2+
This oxfmt wrapper is for IDE extension use only (lsp or stdin mode).
33
To format your code, run: vp fmt
44

55
[1]> node ../node_modules/vite-plus/bin/oxfmt --help # should reject non-LSP usage
6-
This oxfmt wrapper is for IDE extension use only (--lsp mode).
6+
This oxfmt wrapper is for IDE extension use only (lsp or stdin mode).
77
To format your code, run: vp fmt
88

9-
> node ../node_modules/vite-plus/bin/oxfmt --lsp --help # should exercise import path
9+
> node ../node_modules/vite-plus/bin/oxfmt --lsp --help # should allow LSP mode
10+
Usage: [-c=PATH] [PATH]...
11+
12+
Mode Options:
13+
--init Initialize `.oxfmtrc.json` with default values
14+
--migrate=SOURCE Migrate configuration to `.oxfmtrc.json` from specified source
15+
Available sources: prettier, biome
16+
--lsp Start language server protocol (LSP) server
17+
--stdin-filepath=PATH Specify the file name to use to infer which parser to use
18+
19+
Output Options:
20+
--write Format and write files in place (default)
21+
--check Check if files are formatted, also show statistics
22+
--list-different List files that would be changed
23+
24+
Config Options
25+
-c, --config=PATH Path to the configuration file (.json, .jsonc, .ts, .mts, .cts, .js,
26+
.mjs, .cjs)
27+
28+
Ignore Options
29+
--ignore-path=PATH Path to ignore file(s). Can be specified multiple times. If not
30+
specified, .gitignore and .prettierignore in the current directory are
31+
used.
32+
--with-node-modules Format code in node_modules directory (skipped by default)
33+
34+
Runtime Options
35+
--no-error-on-unmatched-pattern Do not exit with error when pattern is unmatched
36+
--threads=INT Number of threads to use. Set to 1 for using only 1 CPU core.
37+
38+
Available positional items:
39+
PATH Single file, path or list of paths. Glob patterns are also supported.
40+
(Be sure to quote them, otherwise your shell may expand them before
41+
passing.) Exclude patterns with `!` prefix like `'!**/fixtures/*.js'`
42+
are also supported. If not provided, current working directory is used.
43+
44+
Available options:
45+
-h, --help Prints help information
46+
-V, --version Prints version information
47+
48+
49+
> node ../node_modules/vite-plus/bin/oxfmt --stdin-filepath=a.ts --help # should allow Stdin mode
1050
Usage: [-c=PATH] [PATH]...
1151

1252
Mode Options:

packages/cli/snap-tests/bin-oxfmt-wrapper/steps.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"commands": [
33
"node ../node_modules/vite-plus/bin/oxfmt # should reject non-LSP usage",
44
"node ../node_modules/vite-plus/bin/oxfmt --help # should reject non-LSP usage",
5-
"node ../node_modules/vite-plus/bin/oxfmt --lsp --help # should exercise import path"
5+
"node ../node_modules/vite-plus/bin/oxfmt --lsp --help # should allow LSP mode",
6+
"node ../node_modules/vite-plus/bin/oxfmt --stdin-filepath=a.ts --help # should allow Stdin mode"
67
]
78
}

0 commit comments

Comments
 (0)