vite-plus 1.5.1 → 1.6.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/binding/index.cjs +57 -56
- package/binding/index.d.cts +9 -0
- package/dist/{agent-CowvWq3j.js → agent-CTG3B-ec.js} +2 -2
- package/dist/bin.js +21 -6
- package/dist/{comparison-CmVirWIW-UlEf2maz.js → comparison-CmVirWIW-Z8p6CfWL.js} +4 -1
- package/dist/config/bin.js +2 -2
- package/dist/constants-DXqV1vWL.js +77 -0
- package/dist/create/bin.js +29 -34
- package/dist/{define-config-XKYhw0xH.js → define-config-CeYkQCqG.js} +1 -1
- package/dist/{define-config-BGCfAiIo.cjs → define-config-jt2Hyhp2.cjs} +1 -1
- package/dist/define-config.cjs +1 -1
- package/dist/define-config.js +1 -1
- package/dist/{editor-BVaNnIey.js → editor-C0U0Ymqk.js} +213 -83
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/lint-plugins.cjs +1 -1
- package/dist/migration/bin.js +9 -8
- package/dist/{oxlint-plugin-config-5hVqz4kj.js → oxlint-plugin-config-DvBRM_Se.js} +1 -1
- package/dist/oxlint-plugin.js +2 -2
- package/dist/pack-bin.js +1 -1
- package/dist/{package-DLUCo6L_.js → package-CK48ZXBV.js} +1 -1
- package/dist/{constants-D5f7inVN.js → package-Cc9gI1u1.js} +2 -77
- package/dist/{package-overrides-Ci8GXouY.js → package-overrides-nw4zcITi.js} +1 -1
- package/dist/{prompts-DLpJGhfK.js → prompts-JkuWOV60.js} +9 -5
- package/dist/{resolve-vite-config-D7IUZYKq.js → resolve-vite-config-CfUvxuCo.js} +1 -1
- package/dist/{resolve-vite-config-D-JtjGRa.js → resolve-vite-config-x5QVnaf4.js} +2 -2
- package/dist/staged/bin.js +1 -1
- package/dist/sync-versions/bin.js +1 -1
- package/dist/toolchain.js +7 -7
- package/dist/toolchain.json +7 -7
- package/dist/{tsconfig-DLERIAbF.js → tsconfig-CZlh956U.js} +1 -1
- package/dist/{tsconfig-D3DiCiW6.js → tsconfig-DUR3fhIX.js} +2 -2
- package/dist/user-agent-CpEaSTwI.js +6 -0
- package/dist/version.js +3 -2
- package/dist/versions.js +3 -3
- package/dist/vpx-bin.js +2 -0
- package/docs/config/run.md +8 -7
- package/docs/guide/automatic-data-tracking.md +138 -0
- package/docs/guide/check.md +13 -0
- package/docs/guide/global-cli.md +12 -2
- package/docs/guide/migrate-rules.md +3 -1
- package/docs/guide/migrate.md +4 -4
- package/docs/guide/run.md +22 -0
- package/package.json +17 -17
package/dist/create/bin.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { r as __toESM, t as __commonJSMin } from "../rolldown-runtime-DegdyBIC.js";
|
|
2
|
-
import { A as text, E as multiselect, M as isCancel, O as select, S as normalize$1, T as log, a as resolveGitInit, c as selectPackageManager, d as readYamlFile, h as resolveApproveBuildTargets, i as promptGitHooks, j as require_picocolors, k as spinner, m as detectGatedBuilds, n as defaultInteractive, o as runViteFmt, p as approveBuilds, r as downloadPackageManager$1, s as runViteInstall, t as cancelAndExit, u as editYamlFile, v as DependencyType, w as intro, y as PackageManager } from "../prompts-
|
|
3
|
-
import { $ as promptTsupMigration, B as isBingoTemplate, G as initGitRepository, H as updateWorkspaceConfig, I as createCatalogDependencyResolver, J as detectFramework, L as supportsCatalog, R as detectWorkspace$1, V as updatePackageJsonWithDeps, W as findGitRoot, Y as hasFrameworkShim, Z as detectTsupProject, a as selectEditors, c as rewriteMonorepoProject, h as setPackageManager, it as promptPrettierMigration, l as rewriteStandaloneProject, n as detectExistingEditors, nt as detectPrettierProject, o as writeEditorConfigs, q as addFrameworkShim, s as rewriteMonorepo, st as detectEslintProject, ut as promptEslintMigration, v as installGitHooks, w as injectCreateDefaultTemplate, x as shouldSkipStagedMigrationForHooks, z as discoverWorkspacePackages } from "../editor-
|
|
4
|
-
import { a as selectAgentTargets, c as writeCopilotSetupWorkflow, d as templatesDir, l as displayRelative, r as detectExistingAgentTargetPaths, s as writeAgentInstructions, t as COPILOT_AGENT_ID } from "../agent-
|
|
2
|
+
import { A as text, E as multiselect, M as isCancel, O as select, S as normalize$1, T as log, a as resolveGitInit, c as selectPackageManager, d as readYamlFile, h as resolveApproveBuildTargets, i as promptGitHooks, j as require_picocolors, k as spinner, m as detectGatedBuilds, n as defaultInteractive, o as runViteFmt, p as approveBuilds, r as downloadPackageManager$1, s as runViteInstall, t as cancelAndExit, u as editYamlFile, v as DependencyType, w as intro, y as PackageManager } from "../prompts-JkuWOV60.js";
|
|
3
|
+
import { $ as promptTsupMigration, B as isBingoTemplate, G as initGitRepository, H as updateWorkspaceConfig, I as createCatalogDependencyResolver, J as detectFramework, L as supportsCatalog, R as detectWorkspace$1, V as updatePackageJsonWithDeps, W as findGitRoot, Y as hasFrameworkShim, Z as detectTsupProject, a as selectEditors, c as rewriteMonorepoProject, h as setPackageManager, it as promptPrettierMigration, l as rewriteStandaloneProject, n as detectExistingEditors, nt as detectPrettierProject, o as writeEditorConfigs, q as addFrameworkShim, s as rewriteMonorepo, st as detectEslintProject, ut as promptEslintMigration, v as installGitHooks, w as injectCreateDefaultTemplate, x as shouldSkipStagedMigrationForHooks, z as discoverWorkspacePackages } from "../editor-C0U0Ymqk.js";
|
|
4
|
+
import { a as selectAgentTargets, c as writeCopilotSetupWorkflow, d as templatesDir, l as displayRelative, r as detectExistingAgentTargetPaths, s as writeAgentInstructions, t as COPILOT_AGENT_ID } from "../agent-CTG3B-ec.js";
|
|
5
5
|
import { t as unwrapCliParseOutcome } from "../cli-parse-aeUeFDlC.js";
|
|
6
6
|
import { t as documentationUrl$1 } from "../documentation-cv_y0Auv.js";
|
|
7
7
|
import { t as renderCliDoc } from "../help-B03t_iQ4.js";
|
|
8
8
|
import { i as readJsonFile, n as editJsonFile } from "../json-kl84kDyH.js";
|
|
9
9
|
import { a as muted, i as log$1, o as printHeader, r as formatDuration, s as success, t as accent } from "../terminal-BcuPUy-j.js";
|
|
10
|
-
import { c as getNpmRegistry, r as getScopeFromPackageName, s as fetchNpmResource, t as checkNpmPackageExists } from "../package-
|
|
11
|
-
import { a as resolveViteConfig, r as hasViteConfig, t as findViteConfig } from "../resolve-vite-config-
|
|
10
|
+
import { c as getNpmRegistry, r as getScopeFromPackageName, s as fetchNpmResource, t as checkNpmPackageExists } from "../package-CK48ZXBV.js";
|
|
11
|
+
import { a as resolveViteConfig, r as hasViteConfig, t as findViteConfig } from "../resolve-vite-config-x5QVnaf4.js";
|
|
12
12
|
import { t as require_dist } from "../dist-Bs0SObNC.js";
|
|
13
|
-
import { d as VITE_PLUS_OVERRIDE_PACKAGES, f as VITE_PLUS_VERSION, u as VITE_PLUS_NAME } from "../constants-
|
|
13
|
+
import { d as VITE_PLUS_OVERRIDE_PACKAGES, f as VITE_PLUS_VERSION, u as VITE_PLUS_NAME } from "../constants-DXqV1vWL.js";
|
|
14
14
|
import { i as runCommandSilently, r as runCommand$1 } from "../command-rY79K5NI.js";
|
|
15
15
|
import path from "node:path";
|
|
16
|
-
import { findMonorepoRoot, getVpDirs, parseCreateArgs, removeConfigKey, runCommand, upsertJsonConfig, vitePlusHeader } from "../../binding/index.js";
|
|
16
|
+
import { findMonorepoRoot, getPackageManagerOverride, getVpDirs, parseCreateArgs, removeConfigKey, runCommand, upsertJsonConfig, vitePlusHeader } from "../../binding/index.js";
|
|
17
17
|
import { promisify, styleText } from "node:util";
|
|
18
18
|
import fs from "node:fs";
|
|
19
19
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -5178,18 +5178,33 @@ Use \`vp create --list\` to list all available templates, or run \`vp create --h
|
|
|
5178
5178
|
targetDir = selectedParentDir ? path.join(selectedParentDir, selected.targetDir).split(path.sep).join("/") : selected.targetDir;
|
|
5179
5179
|
}
|
|
5180
5180
|
}
|
|
5181
|
+
const packageManagerOverride = getPackageManagerOverride();
|
|
5181
5182
|
const requestedPackageManager = options.packageManager;
|
|
5182
5183
|
const detectedPackageManager = workspaceInfoOptional.packageManager;
|
|
5184
|
+
const preferredPackageManager = isMonorepo ? detectedPackageManager ?? requestedPackageManager : requestedPackageManager ?? detectedPackageManager;
|
|
5183
5185
|
const launcherPackageManager = detectLauncherPackageManager();
|
|
5184
|
-
const packageManager =
|
|
5185
|
-
const packageManagerVersion = packageManager === detectedPackageManager ? workspaceInfoOptional.packageManagerVersion : "latest";
|
|
5186
|
+
const packageManager = packageManagerOverride?.name ?? preferredPackageManager ?? launcherPackageManager ?? await selectPackageManager(options.interactive, compactOutput);
|
|
5187
|
+
const packageManagerVersion = packageManagerOverride?.version ?? (packageManager === detectedPackageManager ? workspaceInfoOptional.packageManagerVersion : "latest");
|
|
5186
5188
|
const shouldSilencePackageManagerInstallLog = compactOutput || isMonorepo && workspaceInfoOptional.packageManager !== void 0;
|
|
5187
|
-
const downloadResult = await downloadPackageManager$1(packageManager, packageManagerVersion, options.interactive, shouldSilencePackageManagerInstallLog, workspaceInfoOptional.rootDir);
|
|
5189
|
+
const downloadResult = await downloadPackageManager$1(packageManager, packageManagerVersion, options.interactive, shouldSilencePackageManagerInstallLog, workspaceInfoOptional.rootDir, packageManagerOverride?.expectedHash ?? void 0);
|
|
5190
|
+
let resolvedPackageManagerOverride;
|
|
5191
|
+
if (packageManagerOverride) {
|
|
5192
|
+
resolvedPackageManagerOverride = `${packageManager}@${downloadResult.version}`;
|
|
5193
|
+
if (packageManagerOverride.expectedHash) resolvedPackageManagerOverride += `+${packageManagerOverride.expectedHash}`;
|
|
5194
|
+
}
|
|
5188
5195
|
const workspaceInfo = {
|
|
5189
5196
|
...workspaceInfoOptional,
|
|
5190
5197
|
packageManager,
|
|
5198
|
+
packageManagerVersion: downloadResult.version,
|
|
5191
5199
|
downloadPackageManager: downloadResult
|
|
5192
5200
|
};
|
|
5201
|
+
const installOptions = {
|
|
5202
|
+
silent: compactOutput,
|
|
5203
|
+
packageManager,
|
|
5204
|
+
packageManagerVersion: downloadResult.version,
|
|
5205
|
+
packageManagerOverride: resolvedPackageManagerOverride,
|
|
5206
|
+
detectIgnoredBuilds: true
|
|
5207
|
+
};
|
|
5193
5208
|
const vpRunCommand = launcherPackageManager ? formatLocalVpCommand(packageManager, "vp run") : "vp run";
|
|
5194
5209
|
const existingAgentTargetPaths = options.agent !== void 0 || !options.interactive ? void 0 : detectExistingAgentTargetPaths(workspaceInfoOptional.rootDir);
|
|
5195
5210
|
if (existingAgentTargetPaths !== void 0) selectedAgentTargetPaths = existingAgentTargetPaths;
|
|
@@ -5342,12 +5357,7 @@ Use \`vp create --list\` to list all available templates, or run \`vp create --h
|
|
|
5342
5357
|
if (bundled?.monorepo) injectCreateDefaultTemplate(fullPath, bundled.scope, compactOutput);
|
|
5343
5358
|
if (shouldSetupHooks) installGitHooks(fullPath, compactOutput, void 0, workspaceInfo.packageManager, workspaceInfo.packages);
|
|
5344
5359
|
updateCreateProgress("Installing dependencies");
|
|
5345
|
-
const installSummary = await runViteInstall(fullPath, options.interactive, installArgs,
|
|
5346
|
-
silent: compactOutput,
|
|
5347
|
-
packageManager: workspaceInfo.packageManager,
|
|
5348
|
-
packageManagerVersion: workspaceInfo.downloadPackageManager.version,
|
|
5349
|
-
detectIgnoredBuilds: true
|
|
5350
|
-
});
|
|
5360
|
+
const installSummary = await runViteInstall(fullPath, options.interactive, installArgs, installOptions);
|
|
5351
5361
|
await handleIgnoredBuilds(fullPath, fullPath, installSummary);
|
|
5352
5362
|
updateCreateProgress("Formatting code");
|
|
5353
5363
|
await runViteFmt(fullPath, options.interactive, void 0, { silent: compactOutput });
|
|
@@ -5464,12 +5474,7 @@ Use \`vp create --list\` to list all available templates, or run \`vp create --h
|
|
|
5464
5474
|
if (!fs.existsSync(yarnrcPath)) fs.writeFileSync(yarnrcPath, "nodeLinker: node-modules\n");
|
|
5465
5475
|
}
|
|
5466
5476
|
updateCreateProgress("Installing dependencies");
|
|
5467
|
-
installSummary = await runViteInstall(installCwd, options.interactive, installArgs,
|
|
5468
|
-
silent: compactOutput,
|
|
5469
|
-
packageManager: workspaceInfo.packageManager,
|
|
5470
|
-
packageManagerVersion: workspaceInfo.downloadPackageManager.version,
|
|
5471
|
-
detectIgnoredBuilds: true
|
|
5472
|
-
});
|
|
5477
|
+
installSummary = await runViteInstall(installCwd, options.interactive, installArgs, installOptions);
|
|
5473
5478
|
if (installSummary.status !== "installed") return;
|
|
5474
5479
|
if (installSummary.pendingBuilds && installSummary.pendingBuilds.length > 0) migratePendingBuilds = installSummary.pendingBuilds;
|
|
5475
5480
|
updateCreateProgress("Migrating lint, format & pack tools");
|
|
@@ -5523,12 +5528,7 @@ Use \`vp create --list\` to list all available templates, or run \`vp create --h
|
|
|
5523
5528
|
if (workspaceInfo.packageManager === PackageManager.pnpm) ensurePnpmCreateCatalogEntries(workspaceInfo.rootDir, fullPath);
|
|
5524
5529
|
for (const framework of detectFramework(fullPath)) if (!hasFrameworkShim(fullPath, framework)) addFrameworkShim(fullPath, framework);
|
|
5525
5530
|
updateCreateProgress("Installing dependencies");
|
|
5526
|
-
installSummary = await runViteInstall(workspaceInfo.rootDir, options.interactive, installArgs,
|
|
5527
|
-
silent: compactOutput,
|
|
5528
|
-
packageManager: workspaceInfo.packageManager,
|
|
5529
|
-
packageManagerVersion: workspaceInfo.downloadPackageManager.version,
|
|
5530
|
-
detectIgnoredBuilds: true
|
|
5531
|
-
});
|
|
5531
|
+
installSummary = await runViteInstall(workspaceInfo.rootDir, options.interactive, installArgs, installOptions);
|
|
5532
5532
|
await handleIgnoredBuilds(fullPath, workspaceInfo.rootDir, installSummary);
|
|
5533
5533
|
updateCreateProgress("Formatting code");
|
|
5534
5534
|
const fmtPaths = registeredConfigPath ? [projectDir, path.relative(workspaceInfo.rootDir, registeredConfigPath)] : [projectDir];
|
|
@@ -5547,12 +5547,7 @@ Use \`vp create --list\` to list all available templates, or run \`vp create --h
|
|
|
5547
5547
|
for (const framework of detectFramework(fullPath)) if (!hasFrameworkShim(fullPath, framework)) addFrameworkShim(fullPath, framework);
|
|
5548
5548
|
if (shouldSetupHooks) installGitHooks(fullPath, compactOutput, void 0, workspaceInfo.packageManager);
|
|
5549
5549
|
updateCreateProgress("Installing dependencies");
|
|
5550
|
-
installSummary = await runViteInstall(fullPath, options.interactive, installArgs,
|
|
5551
|
-
silent: compactOutput,
|
|
5552
|
-
packageManager: workspaceInfo.packageManager,
|
|
5553
|
-
packageManagerVersion: workspaceInfo.downloadPackageManager.version,
|
|
5554
|
-
detectIgnoredBuilds: true
|
|
5555
|
-
});
|
|
5550
|
+
installSummary = await runViteInstall(fullPath, options.interactive, installArgs, installOptions);
|
|
5556
5551
|
await handleIgnoredBuilds(fullPath, fullPath, installSummary);
|
|
5557
5552
|
updateCreateProgress("Formatting code");
|
|
5558
5553
|
await runViteFmt(fullPath, options.interactive, void 0, { silent: compactOutput });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as VITEST_VERSION, r as CONFIG_METADATA_ENV } from "./constants-
|
|
1
|
+
import { c as VITEST_VERSION, r as CONFIG_METADATA_ENV } from "./constants-DXqV1vWL.js";
|
|
2
2
|
import { t as VITEST_RESOLVER_PACKAGES } from "./vitest-ecosystem-BeEYz-qF.js";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import path, { dirname, join, resolve } from "node:path";
|
|
@@ -75,7 +75,7 @@ function ignoreOutput(path) {
|
|
|
75
75
|
var addon;
|
|
76
76
|
var init_src = __esmMin((() => {}));
|
|
77
77
|
// package.json
|
|
78
|
-
var version = "1.
|
|
78
|
+
var version = "1.6.0", VITE_PLUS_VERSION, VITEST_VERSION, CONFIG_METADATA_ENV;
|
|
79
79
|
var init_constants = __esmMin((() => {
|
|
80
80
|
VITE_PLUS_VERSION = process.env.VP_VERSION || version;
|
|
81
81
|
VITEST_VERSION = "5.1.0";
|
package/dist/define-config.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_define_config = require("./define-config-
|
|
2
|
+
const require_define_config = require("./define-config-jt2Hyhp2.cjs");
|
|
3
3
|
require_define_config.init_define_config();
|
|
4
4
|
exports.AUTO_INLINE_DEPS = require_define_config.AUTO_INLINE_DEPS;
|
|
5
5
|
exports.assertCoverageProviderVersionMatch = require_define_config.assertCoverageProviderVersionMatch;
|
package/dist/define-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as AUTO_INLINE_DEPS, n as assertCoverageProviderVersionMatch, r as checkCoverageProviderVersion, i as computeAutoInlineList, a as defineConfig, o as defineProject, s as isVitestFamilySpecifier, c as lazyPlugins, l as resolveConfigFromFile, u as resolveCoverageProviderToCheck, d as withConfigMetadataResolution } from "./define-config-
|
|
1
|
+
export { t as AUTO_INLINE_DEPS, n as assertCoverageProviderVersionMatch, r as checkCoverageProviderVersion, i as computeAutoInlineList, a as defineConfig, o as defineProject, s as isVitestFamilySpecifier, c as lazyPlugins, l as resolveConfigFromFile, u as resolveCoverageProviderToCheck, d as withConfigMetadataResolution } from "./define-config-CeYkQCqG.js";
|