vite-plus 1.0.0 → 1.2.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/LICENSE +59 -6
- package/README.md +7 -7
- package/binding/index.cjs +54 -55
- package/binding/index.d.cts +53 -12
- package/dist/{agent-CKMI1a8W.js → agent-KeDc6vmg.js} +2 -2
- package/dist/bin.js +14 -11
- package/dist/command-DaRqSNpP.js +1 -0
- package/dist/comparison-CmVirWIW-DUGaiYqF.js +121 -0
- package/dist/config/bin.js +4 -4
- package/dist/{constants-BqJiMVVU.js → constants-BW3g7VnD.js} +3 -3
- package/dist/create/bin.d.ts +2 -1
- package/dist/create/bin.js +126 -26
- package/dist/{define-config-Cf_5GHmY.d.ts → define-config-Bexdd6RZ.d.ts} +25 -9
- package/dist/{define-config-DhEJaYRc.js → define-config-CIlk9scU.js} +111 -6
- package/dist/{define-config-C_KGDLUZ.cjs → define-config-Dq_23Eyr.cjs} +89 -3
- package/dist/define-config.cjs +1 -1
- package/dist/define-config.d.ts +1 -1
- package/dist/define-config.js +1 -2
- package/dist/{dist-BsAzy8OW.js → dist-Bi7ZEK3c.js} +1 -2
- package/dist/dist-CBWGibx8.js +3 -0
- package/dist/{dist-DfmT__Aw.js → dist-Cqz8OtiO.js} +24 -21
- package/dist/{editor-CHfGUhxP.js → editor-b1XUwt9v.js} +114 -65
- package/dist/fmt.js +1 -2
- package/dist/hooks/bin.js +1 -1
- package/dist/{hooks-C-4gykWR.js → hooks-DhwsWb46.js} +34 -22
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/lint-plugins-dev.js +1 -2
- package/dist/lint-plugins.cjs +1 -1
- package/dist/lint-plugins.js +1 -2
- package/dist/migration/bin.js +63 -57
- package/dist/{oxlint-plugin-config-lMMD5fAC.js → oxlint-plugin-config-Dx-ZY2MN.js} +1 -1
- package/dist/oxlint-plugin.js +2 -2
- package/dist/pack-bin.js +4 -3
- package/dist/{package-Cgdlhamw.js → package-BP16iQby.js} +7 -2
- package/dist/package-overrides-D1RcXSFl.js +411 -0
- package/dist/{prompts-jMH8S4Wp.js → prompts-BGpQtC5z.js} +548 -262
- package/dist/resolve-vite-config-CGzlyhGr.js +1 -0
- package/dist/{resolve-vite-config-BJYYtfY3.js → resolve-vite-config-x47JetlI.js} +2 -2
- package/dist/staged/bin.js +792 -743
- package/dist/sync-versions/bin.js +4761 -3373
- package/dist/sync-versions/bin.mjs +5304 -5083
- package/dist/test/browser/providers/playwright.d.ts +7 -2
- package/dist/test/browser-playwright.d.ts +7 -2
- package/dist/toolchain.js +12 -12
- package/dist/toolchain.json +12 -12
- package/dist/tsconfig-C5PnJfW4.js +1 -0
- package/dist/{tsconfig-BoYTBNX_.js → tsconfig-D2DzAQ_D.js} +2 -2
- package/dist/version.js +2 -2
- package/dist/versions.js +7 -7
- package/docs/config/run.md +9 -5
- package/docs/config/staged.md +1 -1
- package/docs/guide/automatic-data-tracking.md +7 -6
- package/docs/guide/cache.md +3 -3
- package/docs/guide/check.md +7 -7
- package/docs/guide/ci.md +3 -4
- package/docs/guide/commit-hooks.md +3 -1
- package/docs/guide/create.md +14 -4
- package/docs/guide/env.md +19 -7
- package/docs/guide/github-actions-cache.md +2 -4
- package/docs/guide/global-cli.md +36 -10
- package/docs/guide/ide-integration.md +4 -2
- package/docs/guide/implode.md +2 -0
- package/docs/guide/index.md +8 -8
- package/docs/guide/local-cli.md +27 -11
- package/docs/guide/migrate-rules.md +11 -3
- package/docs/guide/migrate.md +11 -11
- package/docs/guide/{install.md → package-management.md} +28 -4
- package/docs/guide/run.md +10 -8
- package/docs/guide/test.md +3 -1
- package/docs/guide/troubleshooting.md +9 -7
- package/docs/guide/upgrade-project.md +2 -6
- package/docs/guide/upgrade.md +6 -0
- package/docs/guide/vitest-v5.md +2 -2
- package/docs/guide/vpx.md +5 -5
- package/package.json +37 -33
- package/templates/generator/bin/index.ts +0 -0
- package/templates/generator/package.json +2 -2
- package/templates/generator/src/template.ts +1 -0
- package/dist/command-CLJK5jGW.js +0 -2
- package/dist/dist-BWiANxFS.js +0 -8052
- package/dist/package-overrides-Dpn4scvN.js +0 -17
- package/dist/resolve-vite-config-BPgpYMYp.js +0 -2
- package/dist/tsconfig-CmKidmRD.js +0 -2
|
@@ -2,7 +2,7 @@ import { CustomComparatorsRegistry } from '../../_at-vitest-browser.js';
|
|
|
2
2
|
export { defineBrowserCommand } from '../../_at-vitest-browser.js';
|
|
3
3
|
import { Page, Frame, FrameLocator, BrowserContext, CDPSession, Browser, LaunchOptions, ConnectOptions, BrowserContextOptions } from 'playwright';
|
|
4
4
|
import { ScreenshotMatcherOptions, ScreenshotComparatorRegistry, Locator } from '../../browser.js';
|
|
5
|
-
import { BrowserProvider, BrowserModuleMocker, TestProject, CDPSession as CDPSession$1, BrowserProviderOption } from '../../node.js';
|
|
5
|
+
import { BrowserProvider, BrowserModuleMocker, TestProject, CDPSession as CDPSession$1, BrowserProviderCloseOptions, BrowserProviderOption } from '../../node.js';
|
|
6
6
|
|
|
7
7
|
declare const playwrightBrowsers: readonly ["firefox", "webkit", "chromium"];
|
|
8
8
|
type PlaywrightBrowser = (typeof playwrightBrowsers)[number];
|
|
@@ -57,13 +57,17 @@ declare class PlaywrightBrowserProvider implements BrowserProvider {
|
|
|
57
57
|
mocker: BrowserModuleMocker;
|
|
58
58
|
browserName: PlaywrightBrowser;
|
|
59
59
|
private browserPromise;
|
|
60
|
+
private launchOptionsJson;
|
|
60
61
|
private closing;
|
|
62
|
+
private armedContexts;
|
|
61
63
|
tracingContexts: Set<string>;
|
|
62
64
|
pendingTraces: Map<string, string>;
|
|
63
65
|
initScripts: string[];
|
|
64
66
|
constructor(project: TestProject, options: PlaywrightProviderOptions);
|
|
65
67
|
private onSIGTERM;
|
|
66
68
|
private openBrowser;
|
|
69
|
+
private armInterception;
|
|
70
|
+
private probeInterception;
|
|
67
71
|
private createMocker;
|
|
68
72
|
private createContext;
|
|
69
73
|
private getContextOptions;
|
|
@@ -80,7 +84,8 @@ declare class PlaywrightBrowserProvider implements BrowserProvider {
|
|
|
80
84
|
}): Promise<void>;
|
|
81
85
|
private _throwIfClosing;
|
|
82
86
|
getCDPSession(sessionid: string): Promise<CDPSession$1>;
|
|
83
|
-
close(): Promise<void>;
|
|
87
|
+
close(options?: BrowserProviderCloseOptions): Promise<void>;
|
|
88
|
+
private closeContexts;
|
|
84
89
|
}
|
|
85
90
|
declare module '../../node.js' {
|
|
86
91
|
interface BrowserCommandContext {
|
|
@@ -2,7 +2,7 @@ import { CustomComparatorsRegistry } from './_at-vitest-browser.js';
|
|
|
2
2
|
export { defineBrowserCommand } from './_at-vitest-browser.js';
|
|
3
3
|
import { Page, Frame, FrameLocator, BrowserContext, CDPSession, Browser, LaunchOptions, ConnectOptions, BrowserContextOptions } from 'playwright';
|
|
4
4
|
import { ScreenshotMatcherOptions, ScreenshotComparatorRegistry, Locator } from './browser.js';
|
|
5
|
-
import { BrowserProvider, BrowserModuleMocker, TestProject, CDPSession as CDPSession$1, BrowserProviderOption } from './node.js';
|
|
5
|
+
import { BrowserProvider, BrowserModuleMocker, TestProject, CDPSession as CDPSession$1, BrowserProviderCloseOptions, BrowserProviderOption } from './node.js';
|
|
6
6
|
|
|
7
7
|
declare const playwrightBrowsers: readonly ["firefox", "webkit", "chromium"];
|
|
8
8
|
type PlaywrightBrowser = (typeof playwrightBrowsers)[number];
|
|
@@ -57,13 +57,17 @@ declare class PlaywrightBrowserProvider implements BrowserProvider {
|
|
|
57
57
|
mocker: BrowserModuleMocker;
|
|
58
58
|
browserName: PlaywrightBrowser;
|
|
59
59
|
private browserPromise;
|
|
60
|
+
private launchOptionsJson;
|
|
60
61
|
private closing;
|
|
62
|
+
private armedContexts;
|
|
61
63
|
tracingContexts: Set<string>;
|
|
62
64
|
pendingTraces: Map<string, string>;
|
|
63
65
|
initScripts: string[];
|
|
64
66
|
constructor(project: TestProject, options: PlaywrightProviderOptions);
|
|
65
67
|
private onSIGTERM;
|
|
66
68
|
private openBrowser;
|
|
69
|
+
private armInterception;
|
|
70
|
+
private probeInterception;
|
|
67
71
|
private createMocker;
|
|
68
72
|
private createContext;
|
|
69
73
|
private getContextOptions;
|
|
@@ -80,7 +84,8 @@ declare class PlaywrightBrowserProvider implements BrowserProvider {
|
|
|
80
84
|
}): Promise<void>;
|
|
81
85
|
private _throwIfClosing;
|
|
82
86
|
getCDPSession(sessionid: string): Promise<CDPSession$1>;
|
|
83
|
-
close(): Promise<void>;
|
|
87
|
+
close(options?: BrowserProviderCloseOptions): Promise<void>;
|
|
88
|
+
private closeContexts;
|
|
84
89
|
}
|
|
85
90
|
declare module './node.js' {
|
|
86
91
|
interface BrowserCommandContext {
|
package/dist/toolchain.js
CHANGED
|
@@ -4,7 +4,7 @@ export const toolchain = {
|
|
|
4
4
|
{
|
|
5
5
|
"id": "vite-plus",
|
|
6
6
|
"name": "vite-plus",
|
|
7
|
-
"version": "1.
|
|
7
|
+
"version": "1.2.0",
|
|
8
8
|
"kind": "package",
|
|
9
9
|
"delivery": [
|
|
10
10
|
"dependency"
|
|
@@ -14,7 +14,7 @@ export const toolchain = {
|
|
|
14
14
|
{
|
|
15
15
|
"id": "vite-plus-core",
|
|
16
16
|
"name": "@voidzero-dev/vite-plus-core",
|
|
17
|
-
"version": "1.
|
|
17
|
+
"version": "1.2.0",
|
|
18
18
|
"kind": "package",
|
|
19
19
|
"delivery": [
|
|
20
20
|
"dependency"
|
|
@@ -26,7 +26,7 @@ export const toolchain = {
|
|
|
26
26
|
{
|
|
27
27
|
"id": "vite",
|
|
28
28
|
"name": "vite",
|
|
29
|
-
"version": "8.3.
|
|
29
|
+
"version": "8.3.4",
|
|
30
30
|
"kind": "tool",
|
|
31
31
|
"delivery": [
|
|
32
32
|
"bundled"
|
|
@@ -36,7 +36,7 @@ export const toolchain = {
|
|
|
36
36
|
{
|
|
37
37
|
"id": "rolldown",
|
|
38
38
|
"name": "rolldown",
|
|
39
|
-
"version": "1.2.
|
|
39
|
+
"version": "1.2.13",
|
|
40
40
|
"kind": "tool",
|
|
41
41
|
"delivery": [
|
|
42
42
|
"bundled",
|
|
@@ -47,7 +47,7 @@ export const toolchain = {
|
|
|
47
47
|
{
|
|
48
48
|
"id": "vitest",
|
|
49
49
|
"name": "vitest",
|
|
50
|
-
"version": "5.0.
|
|
50
|
+
"version": "5.0.4",
|
|
51
51
|
"kind": "tool",
|
|
52
52
|
"delivery": [
|
|
53
53
|
"dependency"
|
|
@@ -57,7 +57,7 @@ export const toolchain = {
|
|
|
57
57
|
{
|
|
58
58
|
"id": "oxlint",
|
|
59
59
|
"name": "oxlint",
|
|
60
|
-
"version": "1.
|
|
60
|
+
"version": "1.88.0",
|
|
61
61
|
"kind": "tool",
|
|
62
62
|
"delivery": [
|
|
63
63
|
"dependency"
|
|
@@ -67,7 +67,7 @@ export const toolchain = {
|
|
|
67
67
|
{
|
|
68
68
|
"id": "oxfmt",
|
|
69
69
|
"name": "oxfmt",
|
|
70
|
-
"version": "0.
|
|
70
|
+
"version": "0.73.0",
|
|
71
71
|
"kind": "tool",
|
|
72
72
|
"delivery": [
|
|
73
73
|
"dependency"
|
|
@@ -77,7 +77,7 @@ export const toolchain = {
|
|
|
77
77
|
{
|
|
78
78
|
"id": "oxlint-tsgolint",
|
|
79
79
|
"name": "oxlint-tsgolint",
|
|
80
|
-
"version": "7.0.
|
|
80
|
+
"version": "7.0.2004",
|
|
81
81
|
"kind": "tool",
|
|
82
82
|
"delivery": [
|
|
83
83
|
"dependency"
|
|
@@ -89,7 +89,7 @@ export const toolchain = {
|
|
|
89
89
|
{
|
|
90
90
|
"id": "tsdown",
|
|
91
91
|
"name": "tsdown",
|
|
92
|
-
"version": "0.23.
|
|
92
|
+
"version": "0.23.1",
|
|
93
93
|
"kind": "tool",
|
|
94
94
|
"delivery": [
|
|
95
95
|
"bundled"
|
|
@@ -99,8 +99,8 @@ export const toolchain = {
|
|
|
99
99
|
{
|
|
100
100
|
"id": "vite-task",
|
|
101
101
|
"name": "vite-task",
|
|
102
|
-
"revision": "
|
|
103
|
-
"builtAt": "2026-
|
|
102
|
+
"revision": "9ba4cc93379cf2d7a6c7e657285bb8a00e8339dc",
|
|
103
|
+
"builtAt": "2026-10-14T08:52:28Z",
|
|
104
104
|
"kind": "tool",
|
|
105
105
|
"delivery": [
|
|
106
106
|
"compiled"
|
|
@@ -110,7 +110,7 @@ export const toolchain = {
|
|
|
110
110
|
{
|
|
111
111
|
"id": "oxc",
|
|
112
112
|
"name": "oxc",
|
|
113
|
-
"version": "0.
|
|
113
|
+
"version": "0.153.0",
|
|
114
114
|
"kind": "engine",
|
|
115
115
|
"delivery": [
|
|
116
116
|
"compiled"
|
package/dist/toolchain.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
{
|
|
5
5
|
"id": "vite-plus",
|
|
6
6
|
"name": "vite-plus",
|
|
7
|
-
"version": "1.
|
|
7
|
+
"version": "1.2.0",
|
|
8
8
|
"kind": "package",
|
|
9
9
|
"delivery": [
|
|
10
10
|
"dependency"
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
{
|
|
15
15
|
"id": "vite-plus-core",
|
|
16
16
|
"name": "@voidzero-dev/vite-plus-core",
|
|
17
|
-
"version": "1.
|
|
17
|
+
"version": "1.2.0",
|
|
18
18
|
"kind": "package",
|
|
19
19
|
"delivery": [
|
|
20
20
|
"dependency"
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
{
|
|
27
27
|
"id": "vite",
|
|
28
28
|
"name": "vite",
|
|
29
|
-
"version": "8.3.
|
|
29
|
+
"version": "8.3.4",
|
|
30
30
|
"kind": "tool",
|
|
31
31
|
"delivery": [
|
|
32
32
|
"bundled"
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
{
|
|
37
37
|
"id": "rolldown",
|
|
38
38
|
"name": "rolldown",
|
|
39
|
-
"version": "1.2.
|
|
39
|
+
"version": "1.2.13",
|
|
40
40
|
"kind": "tool",
|
|
41
41
|
"delivery": [
|
|
42
42
|
"bundled",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
{
|
|
48
48
|
"id": "vitest",
|
|
49
49
|
"name": "vitest",
|
|
50
|
-
"version": "5.0.
|
|
50
|
+
"version": "5.0.4",
|
|
51
51
|
"kind": "tool",
|
|
52
52
|
"delivery": [
|
|
53
53
|
"dependency"
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
{
|
|
58
58
|
"id": "oxlint",
|
|
59
59
|
"name": "oxlint",
|
|
60
|
-
"version": "1.
|
|
60
|
+
"version": "1.88.0",
|
|
61
61
|
"kind": "tool",
|
|
62
62
|
"delivery": [
|
|
63
63
|
"dependency"
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
{
|
|
68
68
|
"id": "oxfmt",
|
|
69
69
|
"name": "oxfmt",
|
|
70
|
-
"version": "0.
|
|
70
|
+
"version": "0.73.0",
|
|
71
71
|
"kind": "tool",
|
|
72
72
|
"delivery": [
|
|
73
73
|
"dependency"
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
{
|
|
78
78
|
"id": "oxlint-tsgolint",
|
|
79
79
|
"name": "oxlint-tsgolint",
|
|
80
|
-
"version": "7.0.
|
|
80
|
+
"version": "7.0.2004",
|
|
81
81
|
"kind": "tool",
|
|
82
82
|
"delivery": [
|
|
83
83
|
"dependency"
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
{
|
|
90
90
|
"id": "tsdown",
|
|
91
91
|
"name": "tsdown",
|
|
92
|
-
"version": "0.23.
|
|
92
|
+
"version": "0.23.1",
|
|
93
93
|
"kind": "tool",
|
|
94
94
|
"delivery": [
|
|
95
95
|
"bundled"
|
|
@@ -99,8 +99,8 @@
|
|
|
99
99
|
{
|
|
100
100
|
"id": "vite-task",
|
|
101
101
|
"name": "vite-task",
|
|
102
|
-
"revision": "
|
|
103
|
-
"builtAt": "2026-
|
|
102
|
+
"revision": "9ba4cc93379cf2d7a6c7e657285bb8a00e8339dc",
|
|
103
|
+
"builtAt": "2026-10-14T08:52:28Z",
|
|
104
104
|
"kind": "tool",
|
|
105
105
|
"delivery": [
|
|
106
106
|
"compiled"
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
{
|
|
111
111
|
"id": "oxc",
|
|
112
112
|
"name": "oxc",
|
|
113
|
-
"version": "0.
|
|
113
|
+
"version": "0.153.0",
|
|
114
114
|
"kind": "engine",
|
|
115
115
|
"delivery": [
|
|
116
116
|
"compiled"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { i as fixBaseUrlInTsconfig, a as hasBaseUrlInTsconfig } from "./tsconfig-D2DzAQ_D.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { p as createBaseUrlTsconfigFixArgs, t as BASEURL_TSCONFIG_FIX_PACKAGE } from "./constants-
|
|
1
|
+
import { p as createBaseUrlTsconfigFixArgs, t as BASEURL_TSCONFIG_FIX_PACKAGE } from "./constants-BW3g7VnD.js";
|
|
2
2
|
import { c as modify, l as parse, o as applyEdits } from "./json-JP24qHUF.js";
|
|
3
3
|
import { t as vitest_v5_entry_points_default } from "./vitest-v5-entry-points-DthU1e_O.js";
|
|
4
|
-
import {
|
|
4
|
+
import { C as confirm, M as isCancel, T as log, t as cancelAndExit } from "./prompts-BGpQtC5z.js";
|
|
5
5
|
import { n as runCommandSilently } from "./command-CguLh2KL.js";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import { styleText } from "node:util";
|
package/dist/version.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as renderCliDoc } from "./help-BmKpeOP9.js";
|
|
2
2
|
import { i as log, o as printHeader, t as accent } from "./terminal-MKGAuy-p.js";
|
|
3
|
-
import { y as version } from "./constants-
|
|
4
|
-
import {
|
|
3
|
+
import { y as version } from "./constants-BW3g7VnD.js";
|
|
4
|
+
import { a as hasVitePlusDependency, n as detectPackageMetadata } from "./package-BP16iQby.js";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { pathToFileURL } from "node:url";
|
|
7
7
|
import fs from "node:fs";
|
package/dist/versions.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export const versions = {
|
|
2
|
-
"vite": "8.3.
|
|
3
|
-
"rolldown": "1.2.
|
|
4
|
-
"vitest": "5.0.
|
|
5
|
-
"oxfmt": "0.
|
|
6
|
-
"oxlint": "1.
|
|
7
|
-
"oxlint-tsgolint": "7.0.
|
|
8
|
-
"tsdown": "0.23.
|
|
2
|
+
"vite": "8.3.4",
|
|
3
|
+
"rolldown": "1.2.13",
|
|
4
|
+
"vitest": "5.0.4",
|
|
5
|
+
"oxfmt": "0.73.0",
|
|
6
|
+
"oxlint": "1.88.0",
|
|
7
|
+
"oxlint-tsgolint": "7.0.2004",
|
|
8
|
+
"tsdown": "0.23.1"
|
|
9
9
|
};
|
package/docs/config/run.md
CHANGED
|
@@ -235,12 +235,16 @@ tasks: {
|
|
|
235
235
|
|
|
236
236
|
Do not put a variable in `untrackedEnv` if its value changes the task result. If a cache-reporting tool covers the variable through [automatic tracking](/guide/automatic-data-tracking#cooperative-tracking), leave it out of both `env` and `untrackedEnv`.
|
|
237
237
|
|
|
238
|
-
Vite Task
|
|
238
|
+
Vite Task includes default untracked patterns for system variables and common tools. Examples include:
|
|
239
239
|
|
|
240
|
-
- **System:** `HOME`, `USER`, `PATH`, `SHELL`, `LANG`, `TZ`
|
|
241
|
-
- **Node.js:** `NODE_OPTIONS`, `
|
|
242
|
-
- **CI
|
|
243
|
-
- **
|
|
240
|
+
- **System:** `HOME`, `USER`, `PATH`, `SHELL`, `LANG`, `TZ`, `TMP`, `TEMP`
|
|
241
|
+
- **Node.js and package managers:** `NODE_OPTIONS`, `NPM_CONFIG_STORE_DIR`, `PNPM_HOME`
|
|
242
|
+
- **CI:** `CI`, `VERCEL_*`, `NEXT_*`, `GITHUB_*`, `RUNNER_*`, `ACTIONS_ID_TOKEN_REQUEST_URL`
|
|
243
|
+
- **Windows:** `APPDATA`, `LOCALAPPDATA`, `SYSTEMROOT`, `USERPROFILE`
|
|
244
|
+
- **Development tools:** `VSCODE_*`, `JB_IDE_*`, `DOCKER_*`, `BUILDKIT_*`, `COMPOSE_*`, `PLAYWRIGHT_*`
|
|
245
|
+
- **Tokens:** `*_TOKEN`, including `ACTIONS_ID_TOKEN_REQUEST_TOKEN`
|
|
246
|
+
|
|
247
|
+
Color variables such as `FORCE_COLOR`, `NO_COLOR`, `COLORTERM`, `TERM`, and `TERM_PROGRAM` require an explicit `env` or `untrackedEnv` entry. If `FORCE_COLOR` isn't listed, Vite Task sets `FORCE_COLOR=1` to keep cached logs colored. Colors are stripped on display when the terminal can't render them.
|
|
244
248
|
|
|
245
249
|
### `cache.input`
|
|
246
250
|
|
package/docs/config/staged.md
CHANGED
|
@@ -10,10 +10,10 @@ Use this page when you need to understand why a task hits or misses the cache, o
|
|
|
10
10
|
|
|
11
11
|
Automatic data tracking has two tiers:
|
|
12
12
|
|
|
13
|
-
| Tier | Applies to
|
|
14
|
-
| -------------------- |
|
|
15
|
-
| File system tracking | All tasks with cache enabled
|
|
16
|
-
| Cooperative tracking | Cache-reporting tools (`vp build`
|
|
13
|
+
| Tier | Applies to | Records |
|
|
14
|
+
| -------------------- | --------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
15
|
+
| File system tracking | All tasks with cache enabled | <ul><li>Files read by the command</li><li>Missing-file probes</li><li>Directory listings</li><li>Written output files</li></ul> |
|
|
16
|
+
| Cooperative tracking | Cache-reporting tools (`vp build`, `vp test`) | <ul><li>Environment variables reported by the tool</li><li>Tool-managed paths that should not be inputs or outputs, such as `node_modules/.vite-temp`</li></ul> |
|
|
17
17
|
|
|
18
18
|
Vite Task starts with file system tracking for any command. A cache-reporting tool can add information that only the tool knows while it runs.
|
|
19
19
|
|
|
@@ -114,9 +114,10 @@ File system tracking records access. It cannot know why a tool used each path.
|
|
|
114
114
|
For a standard Vite build, you do not need to add these entries yourself because Vite reports them automatically at runtime:
|
|
115
115
|
|
|
116
116
|
- `env: ['VITE_*']` or `env: ['NODE_ENV']`
|
|
117
|
-
- `output: ['dist/**']`
|
|
118
117
|
- input or output exclusions for temporary paths like `node_modules/.vite-temp`
|
|
119
118
|
|
|
119
|
+
Build outputs such as `dist` are captured by automatic file-write tracking and restored on cache hits.
|
|
120
|
+
|
|
120
121
|
You only need to define the task with `vp build`:
|
|
121
122
|
|
|
122
123
|
```ts [vite.config.ts]
|
|
@@ -135,7 +136,7 @@ Run this task with `vpr frontendBuild` or `vp run frontendBuild`.
|
|
|
135
136
|
|
|
136
137
|
Manual config overrides reported metadata. Add `cache.input`, `cache.output`, `cache.env`, or `cache.untrackedEnv` when your project has behavior that Vite cannot report.
|
|
137
138
|
|
|
138
|
-
Vite+ supports cooperative tracking for `vp build`
|
|
139
|
+
Vite+ supports cooperative tracking for `vp build` and `vp test`. `vp test` reports Vitest's on-disk cache paths (`node_modules/.vitest-cache` and the results cache under the Vite cache directory) so they neither invalidate the task nor get restored into it. It will extend this support to more first-party tools in the future. Third-party tools can report cache metadata with [`@voidzero-dev/vite-task-client`](https://npmx.dev/package/@voidzero-dev/vite-task-client).
|
|
139
140
|
|
|
140
141
|
## When To Add Manual Config
|
|
141
142
|
|
package/docs/guide/cache.md
CHANGED
|
@@ -15,9 +15,9 @@ When all checks match, Vite Task replays the cached terminal output, restores sa
|
|
|
15
15
|
When a cache miss occurs, Vite Task tells you exactly why:
|
|
16
16
|
|
|
17
17
|
```
|
|
18
|
-
$ vp lint
|
|
19
|
-
$ vp build
|
|
20
|
-
$ vp test
|
|
18
|
+
$ vp lint ○ cache miss: 'src/utils.ts' modified, executing
|
|
19
|
+
$ vp build ○ cache miss: env 'VITE_GREETING' changed, executing
|
|
20
|
+
$ vp test ○ cache miss: args changed, executing
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
## When Is Caching Enabled?
|
package/docs/guide/check.md
CHANGED
|
@@ -6,19 +6,19 @@
|
|
|
6
6
|
|
|
7
7
|
`vp check` is the default command for fast static checks in Vite+. It brings together formatting through [Oxfmt](https://oxc.rs/docs/guide/usage/formatter.html), linting through [Oxlint](https://oxc.rs/docs/guide/usage/linter.html), and TypeScript type checks through [tsgolint](https://github.com/oxc-project/tsgolint). By merging all of these tasks into a single command, `vp check` is faster than running formatting, linting, and type checking as separate tools in separate commands.
|
|
8
8
|
|
|
9
|
-
When `typeCheck`
|
|
9
|
+
When both `typeAware` and `typeCheck` are enabled in the `lint.options` block in `vite.config.ts`, `vp check` also runs TypeScript type checks through the Oxlint type-aware path powered by the TypeScript Go toolchain and [tsgolint](https://github.com/oxc-project/tsgolint). `vp create` and `vp migrate` enable both `typeAware` and `typeCheck` by default.
|
|
10
10
|
|
|
11
|
-
We recommend turning `typeCheck` on so `vp check` becomes the single command for static checks during development.
|
|
11
|
+
We recommend turning both `typeAware` and `typeCheck` on so `vp check` becomes the single command for static checks during development.
|
|
12
12
|
|
|
13
13
|
## Usage
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
16
|
vp check
|
|
17
|
-
vp check --fix
|
|
18
|
-
vp check --quiet
|
|
19
|
-
vp check --no-fmt
|
|
20
|
-
vp check --no-lint
|
|
21
|
-
vp check --no-fmt --no-lint # Type-check only (requires `typeCheck` enabled).
|
|
17
|
+
vp check --fix # Format and run autofixers.
|
|
18
|
+
vp check --quiet # Hide lint warnings; still report and fail on errors.
|
|
19
|
+
vp check --no-fmt # Skip format; run lint (and type-check if enabled).
|
|
20
|
+
vp check --no-lint # Skip lint rules; keep type-check when enabled.
|
|
21
|
+
vp check --no-fmt --no-lint # Type-check only (requires both `typeAware` and `typeCheck` enabled).
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
## Configuration
|
package/docs/guide/ci.md
CHANGED
|
@@ -14,20 +14,19 @@ Run `vp migrate` to replace exact `voidzero-dev/setup-vp@v1` references in GitHu
|
|
|
14
14
|
|
|
15
15
|
## GitHub Actions
|
|
16
16
|
|
|
17
|
-
The GitHub Action sets up Vite+, the required Node.js version, and the package manager. This means you usually do not need separate `setup-node`, package-manager setup, or manual dependency caching steps in your workflow.
|
|
17
|
+
The GitHub Action sets up Vite+, the required Node.js version, and the package manager. This means you usually do not need separate `setup-node`, package-manager setup, dependency installation, or manual dependency caching steps in your workflow.
|
|
18
18
|
|
|
19
19
|
```yaml [.github/workflows/ci.yml]
|
|
20
20
|
- uses: voidzero-dev/setup-vp@<setup-vp-version>
|
|
21
21
|
with:
|
|
22
22
|
node-version: '24'
|
|
23
23
|
cache: true
|
|
24
|
-
- run: vp install
|
|
25
24
|
- run: vp check
|
|
26
25
|
- run: vp test
|
|
27
26
|
- run: vp build
|
|
28
27
|
```
|
|
29
28
|
|
|
30
|
-
With `cache: true`, `setup-vp` handles dependency caching for you automatically.
|
|
29
|
+
`setup-vp` runs `vp install` by default. If you set `run-install: false`, make sure to add a `vp install` step before running other commands. With `cache: true`, `setup-vp` handles dependency caching for you automatically.
|
|
31
30
|
|
|
32
31
|
::: tip
|
|
33
32
|
`setup-vp` caches package-manager data. To reuse Vite Task results across CI runs, add a separate [GitHub Actions cache for Vite Task](/guide/github-actions-cache).
|
|
@@ -151,7 +150,7 @@ If you are migrating an existing GitHub Actions workflow, you can often replace
|
|
|
151
150
|
node-version: '24'
|
|
152
151
|
cache: true
|
|
153
152
|
|
|
154
|
-
- run: vp
|
|
153
|
+
- run: vp run dev:setup
|
|
155
154
|
- run: vp check
|
|
156
155
|
- run: vp test
|
|
157
156
|
```
|
|
@@ -74,6 +74,8 @@ vp config --no-agent
|
|
|
74
74
|
|
|
75
75
|
Use `--no-hooks` when you want `vp config` to leave the Git hook dispatcher unchanged. Use `--no-agent` when you want it to skip updates to existing coding agent instruction files. You can pass both flags when you want `vp config` to skip both setup steps. After `vp hooks disable`, `vp config` skips reinstalling the dispatcher and points you at `vp hooks enable` instead of prompting again.
|
|
76
76
|
|
|
77
|
+
If `core.hooksPath` points to another hook directory, `vp config` skips dispatcher installation to preserve the existing setup. Run `vp hooks status` to inspect the current configuration.
|
|
78
|
+
|
|
77
79
|
You can also set `VP_GIT_HOOKS=0` to disable hook installation from lifecycle scripts such as `prepare` or `postinstall`.
|
|
78
80
|
|
|
79
81
|
Project-owned hook scripts such as `.vite-hooks/pre-commit` should be committed to the repository. The generated dispatcher and shims under `.vite-hooks/_` are ignored and recreated by `vp config` or `vp hooks enable`. Neither command creates or modifies project hook scripts or staged-file configuration.
|
|
@@ -108,7 +110,7 @@ import { defineConfig } from 'vite-plus';
|
|
|
108
110
|
|
|
109
111
|
export default defineConfig({
|
|
110
112
|
staged: {
|
|
111
|
-
'
|
|
113
|
+
'*': 'vp check --fix',
|
|
112
114
|
},
|
|
113
115
|
});
|
|
114
116
|
```
|
package/docs/guide/create.md
CHANGED
|
@@ -42,12 +42,12 @@ Run `vp create --list` to see the built-in templates and the common shorthand te
|
|
|
42
42
|
|
|
43
43
|
## Options
|
|
44
44
|
|
|
45
|
-
- `--directory <dir>` writes the generated project into a specific target directory
|
|
45
|
+
- `--directory <dir>` writes the generated project into a specific target directory. Only built-in templates and bundled `@org` templates support this option.
|
|
46
46
|
- `--agent <name>` creates agent instructions files during scaffolding
|
|
47
47
|
- `--no-agent` skips agent instruction setup
|
|
48
48
|
- `--editor <name>` writes editor config files
|
|
49
49
|
- `--no-editor` skips editor config setup
|
|
50
|
-
- `--git`
|
|
50
|
+
- `--git` initializes a git repository
|
|
51
51
|
- `--no-git` skips git repository initialization
|
|
52
52
|
- `--package-manager <name>` uses a specified package manager (`pnpm`, `npm`, `yarn`, or `bun`)
|
|
53
53
|
- `--approve-builds` approves and runs gated dependency build scripts without prompting
|
|
@@ -57,6 +57,10 @@ Run `vp create --list` to see the built-in templates and the common shorthand te
|
|
|
57
57
|
- `--hooks` enables pre-commit hook setup (dispatcher + `.vite-hooks` + `staged` config)
|
|
58
58
|
- `--no-hooks` skips hook setup
|
|
59
59
|
|
|
60
|
+
::: info
|
|
61
|
+
`--git` and `--no-git` are not available when adding a package to an existing monorepo.
|
|
62
|
+
:::
|
|
63
|
+
|
|
60
64
|
After create, manage the dispatcher with `vp hooks status`, `vp hooks disable`, and `vp hooks enable`. See the [Commit hooks guide](/guide/commit-hooks).
|
|
61
65
|
|
|
62
66
|
### Dependency build scripts
|
|
@@ -130,7 +134,9 @@ If the monorepo has a parent directory matching `generators` or `tools`, the new
|
|
|
130
134
|
|
|
131
135
|
Local generators are declared in [`create.templates`](/config/create#create-templates) in the monorepo's `vite.config.ts`. This is the source of truth: only registered templates appear in the `vp create` picker.
|
|
132
136
|
|
|
133
|
-
`vp create vite:generator` registers the generator for you, adding an entry to `create.templates` in the root `vite.config.ts
|
|
137
|
+
`vp create vite:generator` registers the generator for you, adding an entry to `create.templates` in the root `vite.config.ts`.
|
|
138
|
+
|
|
139
|
+
For example, a generator named `my-generator` created in `generators/my-generator` is registered as follows:
|
|
134
140
|
|
|
135
141
|
```ts
|
|
136
142
|
import { defineConfig } from 'vite-plus';
|
|
@@ -138,7 +144,11 @@ import { defineConfig } from 'vite-plus';
|
|
|
138
144
|
export default defineConfig({
|
|
139
145
|
create: {
|
|
140
146
|
templates: [
|
|
141
|
-
{
|
|
147
|
+
{
|
|
148
|
+
name: 'my-generator',
|
|
149
|
+
description: 'A starter for creating a Vite+ code generator.',
|
|
150
|
+
template: './generators/my-generator',
|
|
151
|
+
},
|
|
142
152
|
],
|
|
143
153
|
},
|
|
144
154
|
});
|
package/docs/guide/env.md
CHANGED
|
@@ -171,14 +171,22 @@ Only `vp env use` needs this alternate command. Other `vp env` commands work nor
|
|
|
171
171
|
|
|
172
172
|
In CI, `vp env use` can run without shell initialization. It writes a temporary session file per runtime or package manager in the resolved state directory, such as `.session-node-version` or `.session-pnpm-version`. Later shim calls in the same job use these files to resolve the same environment.
|
|
173
173
|
|
|
174
|
+
#### Shell completion
|
|
175
|
+
|
|
176
|
+
The global CLI supports Tab completion in Bash, Zsh, Fish, Nushell, and PowerShell. Run `vp env setup` and follow its printed shell setup instructions to enable it. Press Tab to complete commands, or project task names after `vp run` and `vpr`.
|
|
177
|
+
|
|
178
|
+
- **Zsh**: Run `autoload -Uz compinit; compinit` before loading the setup script if your shell has not initialized completion.
|
|
179
|
+
- **Nushell**: Completion requires `fish` on `PATH`.
|
|
180
|
+
|
|
174
181
|
### Manage
|
|
175
182
|
|
|
176
183
|
- `vp env default` shows the global Node.js default and each configured package-manager version. Bare versions set Node.js; qualified specs such as `pnpm@10.18.0` set that package manager's shim default without replacing the defaults for Bun, Yarn, or npm. `--unset` clears all defaults unless scoped.
|
|
184
|
+
- `vp env default <lts|latest>` and `<package-manager>@latest` re-resolve on each use, so the default follows new releases, including new majors. Other versions and ranges, such as `24` or `pnpm@10`, resolve to an exact version when set.
|
|
177
185
|
- `vp env pin` shows or writes project pins. Existing `.node-version` and top-level `packageManager` fields keep being updated for compatibility. An existing `.nvmrc` is updated when it is the effective Node source in the current directory; its comments and other non-version content are preserved. Otherwise Vite+ writes the matching `devEngines` entry. Use `--target node-version`, `--target nvmrc`, `--target dev-engines`, or `--target package-manager` to choose explicitly. Pinning in a child directory does not modify an inherited `.nvmrc`.
|
|
178
186
|
- `vp env unpin` removes both effective pins by default; append a selector to remove one. Lower-priority declarations are not deleted.
|
|
179
187
|
- `vp env use` activates the complete project environment. Explicit specs override selected components; `--unset` clears both unless scoped.
|
|
180
188
|
- `vp env install` installs the complete resolved environment, a selected component, or explicit specs.
|
|
181
|
-
- `vp env uninstall` removes
|
|
189
|
+
- `vp env uninstall` removes the Node.js version resolved from an explicit version or selector, such as `22` or `lts`. Package managers require a qualified exact version, such as `pnpm@10.18.0`.
|
|
182
190
|
- `vp env clean` removes unused installs. Use `clean node`, `clean pm`, or a concrete manager. Current and configured-default versions are preserved.
|
|
183
191
|
- `vp env exec` runs a command in the resolved environment. Use `--node` and `--package-manager`; `--npm` is an alias for `--package-manager npm@…`.
|
|
184
192
|
- `vp node` uses the resolved Node.js runtime and exposes the selected package-manager path to child processes.
|
|
@@ -186,7 +194,7 @@ In CI, `vp env use` can run without shell initialization. It writes a temporary
|
|
|
186
194
|
### Inspect
|
|
187
195
|
|
|
188
196
|
- `vp env current` shows the current resolved environment
|
|
189
|
-
- `vp env doctor` runs environment diagnostics
|
|
197
|
+
- `vp env doctor` runs environment diagnostics. Append `node` to focus on Node.js, `pm` for all package managers, or `npm`, `pnpm`, `yarn`, or `bun` for a specific package manager.
|
|
190
198
|
- `vp env which` shows which tool path will be used
|
|
191
199
|
- `vp env list` shows separate Node.js, npm, pnpm, Yarn, and Bun sections; selectors narrow output
|
|
192
200
|
- `vp env list-remote` fetches Node.js and all four PM registries concurrently; selectors narrow network work. `--lts` implicitly selects Node.js.
|
|
@@ -208,13 +216,17 @@ vp env off pnpm # Prefer system pnpm only
|
|
|
208
216
|
vp env print # Print PATH setup for both components
|
|
209
217
|
|
|
210
218
|
# Manage
|
|
219
|
+
vp env pin lts # Pin Node.js only to an exact version
|
|
211
220
|
vp env pin lts pnpm@10 # Pin both project components to exact versions
|
|
212
221
|
vp env install # Install the complete resolved environment
|
|
213
|
-
vp env default node@24 # Set the global Node.js default
|
|
214
|
-
vp env default pnpm@10 # Set pnpm's global default version
|
|
215
222
|
vp env use 20 pnpm@10 # Override both components for this shell
|
|
216
223
|
vp env use --unset pnpm # Remove only the pnpm session version
|
|
217
224
|
vp env use --unset pm # Remove all package-manager session versions
|
|
225
|
+
|
|
226
|
+
# Manage (global)
|
|
227
|
+
vp env default lts # Always use the latest LTS, including new majors
|
|
228
|
+
vp env default node@24 # Pin the Node.js default to an exact version
|
|
229
|
+
vp env default pnpm@10 # Pin the pnpm default to an exact version
|
|
218
230
|
vp env clean # Remove unused managed Node.js and package manager versions
|
|
219
231
|
|
|
220
232
|
# Inspect
|
|
@@ -244,7 +256,7 @@ The JSON output for `current`, `list`, and `list-remote` is organized by compone
|
|
|
244
256
|
"source": "devEngines.runtime",
|
|
245
257
|
"source_path": "/project/package.json",
|
|
246
258
|
"project_root": "/project",
|
|
247
|
-
"bin_path": "/home/.vite-plus/js_runtime/node/22.0.0/bin/node",
|
|
259
|
+
"bin_path": "/home/.local/share/vite-plus/js_runtime/node/22.0.0/bin/node",
|
|
248
260
|
"installed": true,
|
|
249
261
|
"mode": "managed"
|
|
250
262
|
},
|
|
@@ -255,8 +267,8 @@ The JSON output for `current`, `list`, and `list-remote` is organized by compone
|
|
|
255
267
|
"source_path": "/project/package.json",
|
|
256
268
|
"project_root": "/project",
|
|
257
269
|
"bin_paths": {
|
|
258
|
-
"pnpm": "/home/.vite-plus/package_manager/pnpm/10.18.0/pnpm/bin/pnpm",
|
|
259
|
-
"pnpx": "/home/.vite-plus/package_manager/pnpm/10.18.0/pnpm/bin/pnpx"
|
|
270
|
+
"pnpm": "/home/.local/share/vite-plus/package_manager/pnpm/10.18.0/pnpm/bin/pnpm",
|
|
271
|
+
"pnpx": "/home/.local/share/vite-plus/package_manager/pnpm/10.18.0/pnpm/bin/pnpx"
|
|
260
272
|
},
|
|
261
273
|
"installed": true,
|
|
262
274
|
"mode": "managed"
|
|
@@ -56,12 +56,12 @@ Run each task twice:
|
|
|
56
56
|
vp run build
|
|
57
57
|
vp run build # should print "cache hit"
|
|
58
58
|
vp run lint
|
|
59
|
-
vp run lint
|
|
59
|
+
vp run lint # should print "cache hit"
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
## 2. Restore The Cache After Install
|
|
63
63
|
|
|
64
|
-
Restore `node_modules/.vite/task-cache` after `vp
|
|
64
|
+
Restore `node_modules/.vite/task-cache` after the `setup-vp` step, because package installation can recreate or modify `node_modules`.
|
|
65
65
|
|
|
66
66
|
Set `<setup-vp-version>` below to an exact version from the [`setup-vp` releases page](https://github.com/voidzero-dev/setup-vp/releases). You can use a commit SHA instead.
|
|
67
67
|
|
|
@@ -89,8 +89,6 @@ jobs:
|
|
|
89
89
|
node-version: '24'
|
|
90
90
|
cache: true
|
|
91
91
|
|
|
92
|
-
- run: vp install
|
|
93
|
-
|
|
94
92
|
- name: Restore Vite Task cache
|
|
95
93
|
id: vite-task-cache
|
|
96
94
|
uses: actions/cache/restore@v6
|