vite-plus 1.1.0 → 1.3.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 +58 -1
- package/binding/index.cjs +54 -54
- package/binding/index.d.cts +7 -0
- package/dist/{agent-eISuMXJb.js → agent-97KmGCyL.js} +4 -4
- package/dist/bin.js +12 -12
- package/dist/{command-CguLh2KL.js → command-CdMBoZFD.js} +13 -13
- package/dist/command-DVTILtS-.js +1 -0
- package/dist/comparison-CmVirWIW-DUGaiYqF.js +121 -0
- package/dist/config/bin.js +4 -4
- package/dist/{constants-CCQkpaxK.js → constants-DR55DpRm.js} +3 -3
- package/dist/create/bin.d.ts +2 -1
- package/dist/create/bin.js +112 -29
- package/dist/{define-config-CeW9DETl.d.ts → define-config-Bexdd6RZ.d.ts} +1 -1
- package/dist/{define-config-CREUiMmM.cjs → define-config-BxDc_9BK.cjs} +89 -3
- package/dist/{define-config-Ro6PS4dP.js → define-config-CvE5pHqB.js} +111 -6
- 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-DfmT__Aw.js → dist-Cqz8OtiO.js} +24 -21
- package/dist/{dist-BsAzy8OW.js → dist-DIpm7mot.js} +6 -7
- package/dist/dist-Dhu07wmN.js +3 -0
- package/dist/{editor-B8tkz7nL.js → editor-CtJGQP7C.js} +34 -27
- 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 +18 -16
- package/dist/{oxlint-plugin-config-CbG58Kzr.js → oxlint-plugin-config-BIzrO2y2.js} +1 -1
- package/dist/oxlint-plugin.js +2 -2
- package/dist/pack-bin.js +2 -2
- package/dist/{package-BS84eWrW.js → package-CQDXTm6j.js} +1 -1
- package/dist/{package-overrides-CpoQngt3.js → package-overrides-D1RcXSFl.js} +1 -1
- package/dist/{prompts-ByOzbMBG.js → prompts-1xNz_ne0.js} +103 -208
- package/dist/resolve-vite-config-7WDtXO4G.js +1 -0
- package/dist/{resolve-vite-config-Be237LWp.js → resolve-vite-config-BVr1SUNg.js} +2 -2
- package/dist/{rolldown-runtime-CMFfr-1z.js → rolldown-runtime-kJ_i4yPo.js} +1 -1
- package/dist/staged/bin.js +33 -5
- package/dist/sync-versions/bin.js +4760 -3369
- package/dist/sync-versions/bin.mjs +4899 -3505
- 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-DzZ-nrx2.js → tsconfig-BZu7kl-x.js} +3 -3
- package/dist/tsconfig-zWgHiQ3X.js +1 -0
- 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/commit-hooks.md +3 -1
- package/docs/guide/create.md +48 -4
- package/docs/guide/env.md +25 -11
- package/docs/guide/github-actions-cache.md +1 -1
- package/docs/guide/global-cli.md +36 -10
- package/docs/guide/ide-integration.md +1 -1
- package/docs/guide/index.md +8 -8
- package/docs/guide/local-cli.md +24 -8
- package/docs/guide/migrate-rules.md +3 -3
- package/docs/guide/migrate.md +9 -9
- package/docs/guide/{install.md → package-management.md} +42 -4
- package/docs/guide/run.md +10 -8
- package/docs/guide/test.md +3 -1
- package/docs/guide/troubleshooting.md +7 -5
- package/docs/guide/upgrade-project.md +1 -5
- package/docs/guide/upgrade.md +6 -0
- package/docs/guide/vitest-v5.md +2 -2
- package/docs/guide/vpx.md +3 -3
- package/package.json +32 -31
- 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-DUsqQuw8.js +0 -6774
- package/dist/resolve-vite-config-CofpYgnY.js +0 -2
- package/dist/tsconfig-3ONY2k2K.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.3.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.3.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.14",
|
|
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.5",
|
|
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-10-
|
|
102
|
+
"revision": "9ba4cc93379cf2d7a6c7e657285bb8a00e8339dc",
|
|
103
|
+
"builtAt": "2026-10-16T05:08:44Z",
|
|
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.154.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.3.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.3.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.14",
|
|
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.5",
|
|
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-10-
|
|
102
|
+
"revision": "9ba4cc93379cf2d7a6c7e657285bb8a00e8339dc",
|
|
103
|
+
"builtAt": "2026-10-16T05:08:44Z",
|
|
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.154.0",
|
|
114
114
|
"kind": "engine",
|
|
115
115
|
"delivery": [
|
|
116
116
|
"compiled"
|
|
@@ -1,8 +1,8 @@
|
|
|
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-DR55DpRm.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 { C as confirm, M as isCancel, T as log, t as cancelAndExit } from "./prompts-
|
|
5
|
-
import { n as runCommandSilently } from "./command-
|
|
4
|
+
import { C as confirm, M as isCancel, T as log, t as cancelAndExit } from "./prompts-1xNz_ne0.js";
|
|
5
|
+
import { n as runCommandSilently } from "./command-CdMBoZFD.js";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import { styleText } from "node:util";
|
|
8
8
|
import fs from "node:fs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { i as fixBaseUrlInTsconfig, a as hasBaseUrlInTsconfig } from "./tsconfig-BZu7kl-x.js";
|
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 { a as hasVitePlusDependency, n as detectPackageMetadata } from "./package-
|
|
3
|
+
import { y as version } from "./constants-DR55DpRm.js";
|
|
4
|
+
import { a as hasVitePlusDependency, n as detectPackageMetadata } from "./package-CQDXTm6j.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.14",
|
|
4
|
+
"vitest": "5.0.5",
|
|
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
|
|
@@ -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
|
@@ -20,6 +20,40 @@ vp create <template>
|
|
|
20
20
|
vp create <template> -- <template-options>
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
+
### Without the Global CLI
|
|
24
|
+
|
|
25
|
+
If you haven't installed [the global `vp`](/guide/global-cli) yet. Vite+ provides `create-vite-plus` package running `vp create` through your package manager.
|
|
26
|
+
|
|
27
|
+
::: code-group
|
|
28
|
+
|
|
29
|
+
```bash [pnpm]
|
|
30
|
+
pnpm create vite-plus
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
```bash [npm]
|
|
34
|
+
npm create vite-plus@latest
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
```bash [Yarn]
|
|
38
|
+
yarn create vite-plus
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
```bash [Bun]
|
|
42
|
+
bun create vite-plus
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
:::
|
|
46
|
+
|
|
47
|
+
The new project uses the package manager that ran the command, unless you pass `--package-manager` or create it inside an existing workspace. Arguments are forwarded to `vp create` unchanged, so the first argument is the template, not the target directory:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
pnpm create vite-plus vite:application --directory my-app
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
If you are using npm, there is a `--` needed before options meant for `vp create`, for example `npm create vite-plus@latest -- vite:application --directory my-app`.
|
|
54
|
+
|
|
55
|
+
After creating the project, run `vp` through your package manager, for example `pnpm exec vp run`.
|
|
56
|
+
|
|
23
57
|
## Built-in Templates
|
|
24
58
|
|
|
25
59
|
Vite+ ships with these built-in templates:
|
|
@@ -42,12 +76,12 @@ Run `vp create --list` to see the built-in templates and the common shorthand te
|
|
|
42
76
|
|
|
43
77
|
## Options
|
|
44
78
|
|
|
45
|
-
- `--directory <dir>` writes the generated project into a specific target directory
|
|
79
|
+
- `--directory <dir>` writes the generated project into a specific target directory. Only built-in templates and bundled `@org` templates support this option.
|
|
46
80
|
- `--agent <name>` creates agent instructions files during scaffolding
|
|
47
81
|
- `--no-agent` skips agent instruction setup
|
|
48
82
|
- `--editor <name>` writes editor config files
|
|
49
83
|
- `--no-editor` skips editor config setup
|
|
50
|
-
- `--git`
|
|
84
|
+
- `--git` initializes a git repository
|
|
51
85
|
- `--no-git` skips git repository initialization
|
|
52
86
|
- `--package-manager <name>` uses a specified package manager (`pnpm`, `npm`, `yarn`, or `bun`)
|
|
53
87
|
- `--approve-builds` approves and runs gated dependency build scripts without prompting
|
|
@@ -57,6 +91,10 @@ Run `vp create --list` to see the built-in templates and the common shorthand te
|
|
|
57
91
|
- `--hooks` enables pre-commit hook setup (dispatcher + `.vite-hooks` + `staged` config)
|
|
58
92
|
- `--no-hooks` skips hook setup
|
|
59
93
|
|
|
94
|
+
::: info
|
|
95
|
+
`--git` and `--no-git` are not available when adding a package to an existing monorepo.
|
|
96
|
+
:::
|
|
97
|
+
|
|
60
98
|
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
99
|
|
|
62
100
|
### Dependency build scripts
|
|
@@ -130,7 +168,9 @@ If the monorepo has a parent directory matching `generators` or `tools`, the new
|
|
|
130
168
|
|
|
131
169
|
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
170
|
|
|
133
|
-
`vp create vite:generator` registers the generator for you, adding an entry to `create.templates` in the root `vite.config.ts
|
|
171
|
+
`vp create vite:generator` registers the generator for you, adding an entry to `create.templates` in the root `vite.config.ts`.
|
|
172
|
+
|
|
173
|
+
For example, a generator named `my-generator` created in `generators/my-generator` is registered as follows:
|
|
134
174
|
|
|
135
175
|
```ts
|
|
136
176
|
import { defineConfig } from 'vite-plus';
|
|
@@ -138,7 +178,11 @@ import { defineConfig } from 'vite-plus';
|
|
|
138
178
|
export default defineConfig({
|
|
139
179
|
create: {
|
|
140
180
|
templates: [
|
|
141
|
-
{
|
|
181
|
+
{
|
|
182
|
+
name: 'my-generator',
|
|
183
|
+
description: 'A starter for creating a Vite+ code generator.',
|
|
184
|
+
template: './generators/my-generator',
|
|
185
|
+
},
|
|
142
186
|
],
|
|
143
187
|
},
|
|
144
188
|
});
|
package/docs/guide/env.md
CHANGED
|
@@ -46,13 +46,16 @@ If no directory declares a version, Vite+ uses the global default (`vp env defau
|
|
|
46
46
|
::: tip Using pnpm with Vite+ runtime management
|
|
47
47
|
pnpm can also manage the runtime declared in `devEngines.runtime`. When both pnpm and Vite+ manage Node.js, they can download the same version separately or select different versions, causing inconsistent behavior between commands.
|
|
48
48
|
|
|
49
|
-
If
|
|
49
|
+
If your project uses Vite+ to manage Node.js and pnpm versions, add these settings to the project's `pnpm-workspace.yaml` (pnpm 11+):
|
|
50
50
|
|
|
51
|
-
```
|
|
52
|
-
|
|
51
|
+
```yaml
|
|
52
|
+
runtimeOnFail: ignore
|
|
53
|
+
pmOnFail: ignore
|
|
53
54
|
```
|
|
54
55
|
|
|
55
|
-
|
|
56
|
+
[`runtimeOnFail`](https://pnpm.io/settings/cli#runtimeonfail) disables pnpm's automatic management of declared runtimes. [`pmOnFail`](https://pnpm.io/settings/cli#pmonfail) prevents pnpm from switching to the package-manager version declared in `package.json`. Commit these settings so the project shares the same policy.
|
|
57
|
+
|
|
58
|
+
`runtimeOnFail: ignore` also affects other declared runtimes, including Bun and Deno. If the project relies on pnpm to manage them, consider that before enabling this setting. Switching an existing project to this policy can change runtime entries in `pnpm-lock.yaml` on the next install; review and commit those changes with the configuration.
|
|
56
59
|
:::
|
|
57
60
|
|
|
58
61
|
## Package-Manager Selection
|
|
@@ -76,7 +79,7 @@ Package-manager selection uses this priority:
|
|
|
76
79
|
| `VP_YARN_VERSION` | `yarn`, `yarnpkg` |
|
|
77
80
|
| `VP_BUN_VERSION` | `bun`, `bunx` |
|
|
78
81
|
|
|
79
|
-
These variables accept a version or
|
|
82
|
+
These variables accept a version, range, or npm dist-tag, such as `10.18.0`, `10`, `latest`, or `latest-10`, and override the matching shim's project and default versions. They do not change the manager or version selected by `vp install`.
|
|
80
83
|
|
|
81
84
|
`vp env use pnpm@10.20.0` sets `VP_PNPM_VERSION` for the current shell, just as `vp env use node@22` sets `VP_NODE_VERSION`. Each package manager has its own override, so switching Yarn does not clear a pnpm override. `vp env use` does not set or clear `VP_PACKAGE_MANAGER`.
|
|
82
85
|
|
|
@@ -87,12 +90,14 @@ VP_PACKAGE_MANAGER=pnpm@10.18.0 vp install
|
|
|
87
90
|
VP_PNPM_VERSION=10.20.0 pnpm --version
|
|
88
91
|
```
|
|
89
92
|
|
|
90
|
-
The overrides apply in managed mode. A package manager can also perform its own version switching after Vite+ launches it; for example, pnpm's `
|
|
93
|
+
The overrides apply in managed mode. A package manager can also perform its own version switching after Vite+ launches it; for example, pnpm 11+'s [`pmOnFail`](https://pnpm.io/settings/cli#pmonfail) defaults to `download` and may switch back to the version in `package.json`. To let Vite+ control the pnpm version, set `pmOnFail: ignore` in the project's `pnpm-workspace.yaml`. In pnpm 10, the corresponding setting is `managePackageManagerVersions`.
|
|
91
94
|
|
|
92
95
|
A project selection applies only to its matching shims. For example, pnpm controls `pnpm`, `pnpx`, `pn`, and `pnx`; invoking `npm` still resolves npm independently. Without a matching project selection, a named shim uses its configured default version and otherwise uses the latest release without prompting. The npm shim falls back to Node's bundled npm. `vp env use npm` selects standalone npm's latest release for the current shell when no project version or global default is configured.
|
|
93
96
|
|
|
94
|
-
|
|
95
|
-
|
|
97
|
+
Package-manager specs follow npm's order: an exact version, then a semver range, then a dist-tag. `default` is an alias of `latest`, except for npm, where it selects the npm on `PATH`.
|
|
98
|
+
|
|
99
|
+
::: details Dist-tag caching
|
|
100
|
+
When a package-manager dist-tag such as `latest` or `latest-10` is resolved, including a named shim falling back to the latest release, the resolved version is cached for one hour. An expired cache remains available when the registry cannot be reached.
|
|
96
101
|
:::
|
|
97
102
|
|
|
98
103
|
`pn` runs the same managed binary as `pnpm`, and `pnx` runs the same managed binary as `pnpx` (`pnpm dlx`). These aliases also work with managed pnpm versions older than v11.
|
|
@@ -171,15 +176,22 @@ Only `vp env use` needs this alternate command. Other `vp env` commands work nor
|
|
|
171
176
|
|
|
172
177
|
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
178
|
|
|
179
|
+
#### Shell completion
|
|
180
|
+
|
|
181
|
+
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`.
|
|
182
|
+
|
|
183
|
+
- **Zsh**: Run `autoload -Uz compinit; compinit` before loading the setup script if your shell has not initialized completion.
|
|
184
|
+
- **Nushell**: Completion requires `fish` on `PATH`.
|
|
185
|
+
|
|
174
186
|
### Manage
|
|
175
187
|
|
|
176
188
|
- `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.
|
|
177
|
-
- `vp env default <lts|latest>` and
|
|
189
|
+
- `vp env default <lts|latest>` and package-manager dist-tags such as `pnpm@latest` or `pnpm@latest-10` re-resolve on each use, so the default follows the tag, including new majors for `latest`. Other versions and ranges, such as `24` or `pnpm@10`, resolve to an exact version when set.
|
|
178
190
|
- `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`.
|
|
179
191
|
- `vp env unpin` removes both effective pins by default; append a selector to remove one. Lower-priority declarations are not deleted.
|
|
180
192
|
- `vp env use` activates the complete project environment. Explicit specs override selected components; `--unset` clears both unless scoped.
|
|
181
193
|
- `vp env install` installs the complete resolved environment, a selected component, or explicit specs.
|
|
182
|
-
- `vp env uninstall` removes
|
|
194
|
+
- `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`.
|
|
183
195
|
- `vp env clean` removes unused installs. Use `clean node`, `clean pm`, or a concrete manager. Current and configured-default versions are preserved.
|
|
184
196
|
- `vp env exec` runs a command in the resolved environment. Use `--node` and `--package-manager`; `--npm` is an alias for `--package-manager npm@…`.
|
|
185
197
|
- `vp node` uses the resolved Node.js runtime and exposes the selected package-manager path to child processes.
|
|
@@ -187,7 +199,7 @@ In CI, `vp env use` can run without shell initialization. It writes a temporary
|
|
|
187
199
|
### Inspect
|
|
188
200
|
|
|
189
201
|
- `vp env current` shows the current resolved environment
|
|
190
|
-
- `vp env doctor` runs environment diagnostics
|
|
202
|
+
- `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.
|
|
191
203
|
- `vp env which` shows which tool path will be used
|
|
192
204
|
- `vp env list` shows separate Node.js, npm, pnpm, Yarn, and Bun sections; selectors narrow output
|
|
193
205
|
- `vp env list-remote` fetches Node.js and all four PM registries concurrently; selectors narrow network work. `--lts` implicitly selects Node.js.
|
|
@@ -210,7 +222,9 @@ vp env print # Print PATH setup for both components
|
|
|
210
222
|
|
|
211
223
|
# Manage
|
|
212
224
|
vp env pin lts # Pin Node.js only to an exact version
|
|
225
|
+
vp env pin node@26 # Pin Node.js 26 to an exact version
|
|
213
226
|
vp env pin lts pnpm@10 # Pin both project components to exact versions
|
|
227
|
+
vp env pin pnpm@latest-10 # Pin pnpm to the version of its latest-10 dist-tag
|
|
214
228
|
vp env install # Install the complete resolved environment
|
|
215
229
|
vp env use 20 pnpm@10 # Override both components for this shell
|
|
216
230
|
vp env use --unset pnpm # Remove only the pnpm session version
|