vite-plus 0.1.13 → 0.1.14-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +12 -0
- package/README.md +4 -0
- package/dist/global/{agent-BuEmv_K7.js → agent-DTz-Dh1r.js} +12 -30
- package/dist/global/{cli-truncate-BmIULUG7.js → cli-truncate-Da6Y8aM8.js} +2 -2
- package/dist/global/compat-Ch3iWOnQ.js +14 -0
- package/dist/global/config.js +3 -2
- package/dist/global/create.js +13 -4
- package/dist/global/{log-update-Beldo2tV.js → log-update-C8WCYCbc.js} +3 -3
- package/dist/global/migrate.js +22 -5
- package/dist/global/{package-D0VpX-8d.js → package-Y1UTfJnZ.js} +26 -1
- package/dist/global/report-C7xbSNED.js +28 -0
- package/dist/global/{slice-ansi-1i6Zdm-R.js → slice-ansi-Fap0ehe9.js} +1 -1
- package/dist/global/staged.js +62 -6
- package/dist/global/version.js +1 -1
- package/dist/global/{workspace-CVWspacc.js → workspace-BlrOxcHM.js} +3 -3
- package/dist/global/wrap-ansi-Ou9oAs-a.js +3 -0
- package/dist/global/{wrap-ansi-CnYUWev2.js → wrap-ansi-eywLlPVQ.js} +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/migration/migrator.js +26 -11
- package/dist/pack-bin.js +3 -1
- package/dist/resolve-vite-config.d.ts +9 -1
- package/dist/resolve-vite-config.js +78 -1
- package/dist/utils/constants.d.ts +6 -0
- package/dist/utils/constants.js +8 -0
- package/dist/utils/editor.js +1 -1
- package/dist/utils/package.d.ts +6 -0
- package/dist/utils/package.js +19 -0
- package/package.json +12 -12
- package/skills/vite-plus/docs/config/build.md +21 -0
- package/skills/vite-plus/docs/config/fmt.md +18 -0
- package/skills/vite-plus/docs/config/index.md +31 -0
- package/skills/vite-plus/docs/config/lint.md +24 -0
- package/skills/vite-plus/docs/config/pack.md +17 -0
- package/skills/vite-plus/docs/config/run.md +231 -0
- package/skills/vite-plus/docs/config/staged.md +15 -0
- package/skills/vite-plus/docs/config/test.md +18 -0
- package/skills/vite-plus/docs/guide/build.md +40 -0
- package/skills/vite-plus/docs/guide/cache.md +119 -0
- package/skills/vite-plus/docs/guide/check.md +41 -0
- package/skills/vite-plus/docs/guide/ci.md +64 -0
- package/skills/vite-plus/docs/guide/commit-hooks.md +51 -0
- package/skills/vite-plus/docs/guide/create.md +88 -0
- package/skills/vite-plus/docs/guide/dev.md +24 -0
- package/skills/vite-plus/docs/guide/env.md +84 -0
- package/skills/vite-plus/docs/guide/fmt.md +41 -0
- package/skills/vite-plus/docs/guide/ide-integration.md +36 -0
- package/skills/vite-plus/docs/guide/implode.md +23 -0
- package/skills/vite-plus/docs/guide/index.md +93 -0
- package/skills/vite-plus/docs/guide/install.md +130 -0
- package/skills/vite-plus/docs/guide/lint.md +50 -0
- package/skills/vite-plus/docs/guide/migrate.md +174 -0
- package/skills/vite-plus/docs/guide/pack.md +61 -0
- package/skills/vite-plus/docs/guide/run.md +292 -0
- package/skills/vite-plus/docs/guide/test.md +35 -0
- package/skills/vite-plus/docs/guide/troubleshooting.md +71 -0
- package/skills/vite-plus/docs/guide/upgrade.md +28 -0
- package/skills/vite-plus/docs/guide/vpx.md +66 -0
- package/skills/vite-plus/docs/guide/why.md +39 -0
- package/templates/monorepo/tsconfig.json +2 -2
- package/dist/global/wrap-ansi-DAqB-SZm.js +0 -3
- package/dist/oxfmt-config.d.ts +0 -1
- package/dist/oxfmt-config.js +0 -0
- /package/dist/global/{src-FkMgH-SM.js → src-B-pcmd0F.js} +0 -0
- /package/dist/global/{strip-ansi-DbamwI77.js → strip-ansi-CE-VDMdw.js} +0 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Test
|
|
2
|
+
|
|
3
|
+
`vp test` runs tests with [Vitest](https://vitest.dev).
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
`vp test` is built on [Vitest](https://vitest.dev/), so you get a Vite-native test runner that reuses your Vite config and plugins, supports Jest-style expectations, snapshots, and coverage, and handles modern ESM, TypeScript, and JSX projects cleanly.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
vp test
|
|
13
|
+
vp test watch
|
|
14
|
+
vp test run --coverage
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
::: info
|
|
18
|
+
Unlike Vitest on its own, `vp test` does not stay in watch mode by default. Use `vp test` when you want a normal test run, and use `vp test watch` when you want to jump into watch mode.
|
|
19
|
+
:::
|
|
20
|
+
|
|
21
|
+
## Configuration
|
|
22
|
+
|
|
23
|
+
Put test configuration directly in the `test` block in `vite.config.ts` so all your configuration stays in one place. We do not recommend using `vitest.config.ts` with Vite+.
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
import { defineConfig } from 'vite-plus';
|
|
27
|
+
|
|
28
|
+
export default defineConfig({
|
|
29
|
+
test: {
|
|
30
|
+
include: ['src/**/*.test.ts'],
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
For the full Vitest configuration reference, see the [Vitest config docs](https://vitest.dev/config/).
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Troubleshooting
|
|
2
|
+
|
|
3
|
+
Use this page when something in Vite+ is not behaving the way you expect.
|
|
4
|
+
|
|
5
|
+
::: warning
|
|
6
|
+
Vite+ is still in alpha. We are making frequent changes, adding features quickly, and we want feedback to help make it great.
|
|
7
|
+
:::
|
|
8
|
+
|
|
9
|
+
## Supported Tool Versions
|
|
10
|
+
|
|
11
|
+
Vite+ expects modern upstream tool versions.
|
|
12
|
+
|
|
13
|
+
- Vite 8 or newer
|
|
14
|
+
- Vitest 4.1 or newer
|
|
15
|
+
|
|
16
|
+
If you are migrating an existing project and it still depends on older Vite or Vitest versions, upgrade those first before adopting Vite+.
|
|
17
|
+
|
|
18
|
+
## `vp check` does not run type-aware lint rules or type checks
|
|
19
|
+
|
|
20
|
+
- Confirm that `lint.options.typeAware` and `lint.options.typeCheck` are enabled in `vite.config.ts`
|
|
21
|
+
- Check whether your `tsconfig.json` uses `compilerOptions.baseUrl`
|
|
22
|
+
|
|
23
|
+
The Oxlint type checker path powered by `tsgolint` does not support `baseUrl`, so Vite+ skips `typeAware` and `typeCheck` when that setting is present.
|
|
24
|
+
|
|
25
|
+
## `vp build` does not run my build script
|
|
26
|
+
|
|
27
|
+
Unlike package managers, built-in commands cannot be overwritten. If you are trying to run a `package.json` script use `vp run build` instead.
|
|
28
|
+
|
|
29
|
+
For example:
|
|
30
|
+
|
|
31
|
+
- `vp build` always runs the built-in Vite build
|
|
32
|
+
- `vp test` always runs the built-in Vitest command
|
|
33
|
+
- `vp run build` and `vp run test` run `package.json` scripts instead
|
|
34
|
+
|
|
35
|
+
::: info
|
|
36
|
+
You can also run custom tasks defined in `vite.config.ts` and migrate away from `package.json` scripts entirely.
|
|
37
|
+
:::
|
|
38
|
+
|
|
39
|
+
## Staged Checks and Commit Hooks
|
|
40
|
+
|
|
41
|
+
If `vp staged` fails or your pre-commit hook does not run:
|
|
42
|
+
|
|
43
|
+
- make sure `vite.config.ts` contains a `staged` block
|
|
44
|
+
- run `vp config` to install hooks
|
|
45
|
+
- check whether hook installation was skipped intentionally through `VITE_GIT_HOOKS=0`
|
|
46
|
+
|
|
47
|
+
A minimal staged config looks like this:
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
import { defineConfig } from 'vite-plus';
|
|
51
|
+
|
|
52
|
+
export default defineConfig({
|
|
53
|
+
staged: {
|
|
54
|
+
'*': 'vp check --fix',
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Asking for Help
|
|
60
|
+
|
|
61
|
+
If you are stuck, please reach out:
|
|
62
|
+
|
|
63
|
+
- [Discord](https://discord.gg/cAnsqHh5PX) for real-time discussion and troubleshooting help
|
|
64
|
+
- [GitHub](https://github.com/voidzero-dev/vite-plus) for issues, discussions, and bug reports
|
|
65
|
+
|
|
66
|
+
When reporting a problem, please include:
|
|
67
|
+
|
|
68
|
+
- The full output of `vp env current` and `vp --version`
|
|
69
|
+
- The package manager used by the project
|
|
70
|
+
- The exact steps needed to reproduce the problem and your `vite.config.ts`
|
|
71
|
+
- A minimal reproduction repository or runnable sandbox
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Upgrading Vite+
|
|
2
|
+
|
|
3
|
+
Use `vp upgrade` to update the global `vp` binary, and use Vite+'s package management commands to update the local `vite-plus` package in a project.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
There are two parts to upgrading Vite+:
|
|
8
|
+
|
|
9
|
+
- The global `vp` command installed on your machine
|
|
10
|
+
- The local `vite-plus` package used by an individual project
|
|
11
|
+
|
|
12
|
+
You can upgrade both of them independently.
|
|
13
|
+
|
|
14
|
+
## Global `vp`
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
vp upgrade
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Local `vite-plus`
|
|
21
|
+
|
|
22
|
+
Update the project dependency with the package manager commands in Vite+:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
vp update vite-plus
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
You can also use `vp add vite-plus@latest` if you want to move the dependency explicitly to the latest version.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Running Binaries
|
|
2
|
+
|
|
3
|
+
Use `vpx`, `vp exec`, and `vp dlx` to run binaries without switching between local installs, downloaded packages, and project-specific tools.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
`vpx` executes a command from a local or remote npm package. It can run a package that is already available locally, download a package on demand, or target an explicit package version.
|
|
8
|
+
|
|
9
|
+
Use the other binary commands when you need stricter control:
|
|
10
|
+
|
|
11
|
+
- `vpx` resolves a package binary locally first and can download it when needed
|
|
12
|
+
- `vp exec` runs a binary from the current project's `node_modules/.bin`
|
|
13
|
+
- `vp dlx` runs a package binary without adding it as a dependency
|
|
14
|
+
|
|
15
|
+
## `vpx`
|
|
16
|
+
|
|
17
|
+
Use `vpx` for running any local or remote binary:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
vpx <pkg[@version]> [args...]
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Options
|
|
24
|
+
|
|
25
|
+
- `-p, --package <name>` installs one or more packages before running the command
|
|
26
|
+
- `-c, --shell-mode` executes the command inside a shell
|
|
27
|
+
- `-s, --silent` suppresses Vite+ output and only shows the command output
|
|
28
|
+
|
|
29
|
+
### Examples
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
vpx eslint .
|
|
33
|
+
vpx create-vue my-app
|
|
34
|
+
vpx typescript@5.5.4 tsc --version
|
|
35
|
+
vpx -p cowsay -c 'echo "hi" | cowsay'
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## `vp exec`
|
|
39
|
+
|
|
40
|
+
Use `vp exec` when the binary must come from the current project, for example a binary from a dependency installed in `node_modules/.bin`.
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
vp exec <command> [args...]
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Examples:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
vp exec eslint .
|
|
50
|
+
vp exec tsc --noEmit
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## `vp dlx`
|
|
54
|
+
|
|
55
|
+
Use `vp dlx` for one-off package execution without adding the package to your project dependencies.
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
vp dlx <package> [args...]
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Examples:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
vp dlx create-vite
|
|
65
|
+
vp dlx typescript tsc --version
|
|
66
|
+
```
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Why Vite+?
|
|
2
|
+
|
|
3
|
+
Working in the JavaScript ecosystem today, developers need a runtime such as Node.js, a package manager like pnpm, a dev server, a linter, a formatter, a test runner, a bundler, a task runner, and a growing number of config files.
|
|
4
|
+
|
|
5
|
+
Vite showed that frontend tooling could become dramatically faster by rethinking the architecture instead of accepting the status quo. Vite+ applies that same idea to the rest of the local development workflow, and unifies them all into a single package that speeds up and simplifies development.
|
|
6
|
+
|
|
7
|
+
## The Problem Vite+ is Solving
|
|
8
|
+
|
|
9
|
+
The JavaScript tooling ecosystem has seen its fair share of fragmentation and churn. Web apps keep getting larger, and as a result tooling performance, complexity, and inconsistencies have become real bottlenecks as projects grow.
|
|
10
|
+
|
|
11
|
+
These bottlenecks are amplified in organizations with multiple teams, each using a different tooling stack. Dependency management, build infrastructure, and code quality become fragmented responsibilities, handled team by team and often not owned as a priority by anyone. As a result, dependencies drift out of sync, builds get slower, and code quality declines. Fixing those problems later requires significantly more effort, slows everyone down, and pulls teams away from shipping product.
|
|
12
|
+
|
|
13
|
+
## What's Included in Vite+
|
|
14
|
+
|
|
15
|
+
Vite+ brings the tools needed for modern web development together into a single, integrated toolchain. Instead of assembling and maintaining a custom toolchain, Vite+ provides a consistent entry point that manages the runtime, dependencies, development server, code quality checks, testing, and builds in one place.
|
|
16
|
+
|
|
17
|
+
- **[Vite](https://vite.dev/)** and **[Rolldown](https://rolldown.rs/)** for development and application builds
|
|
18
|
+
- **[Vitest](https://vitest.dev/)** for testing
|
|
19
|
+
- **[Oxlint](https://oxc.rs/docs/guide/usage/linter.html)** and **[Oxfmt](https://oxc.rs/docs/guide/usage/formatter.html)** for linting and formatting
|
|
20
|
+
- **[tsdown](https://tsdown.dev/)** for library builds or standalone executables
|
|
21
|
+
- **[Vite Task](https://github.com/voidzero-dev/vite-task)** for task orchestration
|
|
22
|
+
|
|
23
|
+
In practice, this means developers interact with one consistent workflow: `vp dev`, `vp check`, `vp test`, and `vp build`.
|
|
24
|
+
|
|
25
|
+
This unified toolchain reduces configuration overhead, improves performance, and makes it easier for teams to maintain consistent tooling across projects.
|
|
26
|
+
|
|
27
|
+
## Fast and Scalable by Default
|
|
28
|
+
|
|
29
|
+
Vite+ is built on top of modern tooling such as Vite, Rolldown, Oxc, Vitest, and Vite Task to keep your projects fast and scalable as your codebase grows. By using Rust, we can speed up common tasks by [10× or sometimes even by 100×](https://voidzero.dev/posts/announcing-vite-plus-alpha#performance-scale). However, many Rust-based toolchains are incompatible with existing tools, or aren't extensible using JavaScript.
|
|
30
|
+
|
|
31
|
+
Vite+ bridges Rust to JavaScript via [NAPI-RS](https://napi.rs/) which allows it to provide a familiar, easy-to-configure, and extensible interface in JavaScript with a great ecosystem-compatible developer experience.
|
|
32
|
+
|
|
33
|
+
Unifying the toolchain has performance benefits beyond just using faster tools on their own. For example, many developers set up their linter with "type aware" tools, requiring a full-typecheck to be run during the linting stage. With `vp check` you can format, lint, and type-check your code all in a single pass, speeding up static checks by 2× compared to running type-aware lint rules and type-checks separately.
|
|
34
|
+
|
|
35
|
+
## Fully Open Source
|
|
36
|
+
|
|
37
|
+
Vite+ is fully open source and not a new framework or locked-down platform. Vite+ integrates with the existing Vite ecosystem and the frameworks built on top of it, including React, Vue, Svelte, and others. It can use pnpm, npm, or Yarn, and manages the Node.js runtime for you.
|
|
38
|
+
|
|
39
|
+
We always welcome contributions from the community. See our [Contributing Guidelines](https://github.com/voidzero-dev/vite-plus/blob/main/CONTRIBUTING.md) to get involved.
|
package/dist/oxfmt-config.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { FormatOptions, SortImportsOptions, TailwindcssOptions } from 'oxfmt';
|
package/dist/oxfmt-config.js
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|