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
package/binding/index.d.cts
CHANGED
|
@@ -949,6 +949,39 @@ export interface TsconfigOptions {
|
|
|
949
949
|
references?: 'auto';
|
|
950
950
|
}
|
|
951
951
|
|
|
952
|
+
/** See <https://tc39.es/ecma426/#sec-source-map-format>. */
|
|
953
|
+
export interface JSONSourceMap {
|
|
954
|
+
/** The version field, must be 3. */
|
|
955
|
+
version: number;
|
|
956
|
+
/** An optional name of the generated code that this source map is associated with. */
|
|
957
|
+
file?: string;
|
|
958
|
+
/** A string with the encoded mapping data. */
|
|
959
|
+
mappings: string;
|
|
960
|
+
/**
|
|
961
|
+
* An optional source root, useful for relocating source files on a server or removing repeated values in the "sources" entry.
|
|
962
|
+
* This value is prepended to the individual entries in the "source" field.
|
|
963
|
+
*/
|
|
964
|
+
sourceRoot?: string;
|
|
965
|
+
/** A list of original sources used by the "mappings" entry. */
|
|
966
|
+
sources: Array<string>;
|
|
967
|
+
/**
|
|
968
|
+
* An optional list of source content, useful when the "source" can't be hosted.
|
|
969
|
+
* The contents are listed in the same order as the sources in line 5. "null" may be used if some original sources should be retrieved by name.
|
|
970
|
+
*/
|
|
971
|
+
sourcesContent?: Array<string | undefined | null>;
|
|
972
|
+
/** A list of symbol names used by the "mappings" entry. */
|
|
973
|
+
names: Array<string>;
|
|
974
|
+
/** An optional field containing the debugId for this sourcemap. */
|
|
975
|
+
debugId?: string;
|
|
976
|
+
/**
|
|
977
|
+
* Identifies third-party sources (such as framework code or bundler-generated code), allowing developers to avoid code that they don't want to see or step through, without having to configure this beforehand.
|
|
978
|
+
* The `ignoreList` field refers to the `sources` array, and lists the indices of all the known third-party sources in that source map.
|
|
979
|
+
* When parsing the source map, developer tools can use this to determine sections of the code that the browser loads and runs that could be automatically ignore-listed.
|
|
980
|
+
* JSON input falls back to the deprecated `x_google_ignoreList` when `ignoreList` is missing or null.
|
|
981
|
+
*/
|
|
982
|
+
ignoreList?: Array<number>;
|
|
983
|
+
}
|
|
984
|
+
|
|
952
985
|
export interface SourceMap {
|
|
953
986
|
file?: string;
|
|
954
987
|
mappings: string;
|
|
@@ -957,7 +990,7 @@ export interface SourceMap {
|
|
|
957
990
|
sources: Array<string>;
|
|
958
991
|
sourcesContent?: Array<string>;
|
|
959
992
|
version: number;
|
|
960
|
-
|
|
993
|
+
ignoreList?: Array<number>;
|
|
961
994
|
}
|
|
962
995
|
|
|
963
996
|
export interface ArrowFunctionsOptions {
|
|
@@ -2053,13 +2086,6 @@ export declare class TsconfigCache {
|
|
|
2053
2086
|
size(): number;
|
|
2054
2087
|
}
|
|
2055
2088
|
|
|
2056
|
-
/**
|
|
2057
|
-
* Panics on purpose. CI calls this to check that a published binding can produce a
|
|
2058
|
-
* symbolicated backtrace from its separately published debug info.
|
|
2059
|
-
* See `scripts/misc/verify-debuginfo.mjs` and internal-docs/panic-symbolication/implementation.md
|
|
2060
|
-
*/
|
|
2061
|
-
export declare function __internalForcePanic(): void;
|
|
2062
|
-
|
|
2063
2089
|
export interface AliasItem {
|
|
2064
2090
|
find: string;
|
|
2065
2091
|
replacements: Array<string | undefined | null>;
|
|
@@ -2432,6 +2458,7 @@ export interface BindingExperimentalDevModeOptions {
|
|
|
2432
2458
|
/** @deprecated Common runtime injection will be disabled by default in the future. */
|
|
2433
2459
|
skipCommonRuntimeInjection?: boolean;
|
|
2434
2460
|
lazy?: boolean;
|
|
2461
|
+
hotUpdate?: boolean;
|
|
2435
2462
|
}
|
|
2436
2463
|
|
|
2437
2464
|
export interface BindingExperimentalOptions {
|
|
@@ -2621,6 +2648,15 @@ export interface BindingInjectImportNamespace {
|
|
|
2621
2648
|
from: string;
|
|
2622
2649
|
}
|
|
2623
2650
|
|
|
2651
|
+
/**
|
|
2652
|
+
* `output.codeSplitting.experimentalInlineCommonChunks`. `exclude` entries use the same shape
|
|
2653
|
+
* as `BindingMatchGroup.test`, including the batched function shim.
|
|
2654
|
+
*/
|
|
2655
|
+
export interface BindingInlineCommonChunksOptions {
|
|
2656
|
+
maxSize?: number;
|
|
2657
|
+
exclude?: Array<string | RegExp | ((ids: Array<string>) => Uint8Array)>;
|
|
2658
|
+
}
|
|
2659
|
+
|
|
2624
2660
|
export interface BindingInlineConstConfig {
|
|
2625
2661
|
mode?: string;
|
|
2626
2662
|
pass?: number;
|
|
@@ -2678,6 +2714,7 @@ export interface BindingJsonSourcemap {
|
|
|
2678
2714
|
sourcesContent?: Array<string | undefined | null>;
|
|
2679
2715
|
names?: Array<string>;
|
|
2680
2716
|
debugId?: string;
|
|
2717
|
+
ignoreList?: Array<number>;
|
|
2681
2718
|
x_google_ignoreList?: Array<number>;
|
|
2682
2719
|
}
|
|
2683
2720
|
|
|
@@ -2749,6 +2786,7 @@ export interface BindingManualCodeSplittingOptions {
|
|
|
2749
2786
|
maxSize?: number;
|
|
2750
2787
|
minModuleSize?: number;
|
|
2751
2788
|
maxModuleSize?: number;
|
|
2789
|
+
experimentalInlineCommonChunks?: BindingInlineCommonChunksOptions;
|
|
2752
2790
|
internalInvalidateModuleInfoCache?: () => void;
|
|
2753
2791
|
}
|
|
2754
2792
|
|
|
@@ -3522,6 +3560,11 @@ export interface CliOptions {
|
|
|
3522
3560
|
explicitChdir?: boolean;
|
|
3523
3561
|
/** CLI arguments (should be process.argv.slice(2) from JavaScript) */
|
|
3524
3562
|
args?: Array<string>;
|
|
3563
|
+
/**
|
|
3564
|
+
* Host Node.js version (`process.version`), used for the package-manager
|
|
3565
|
+
* lifecycle env user agent.
|
|
3566
|
+
*/
|
|
3567
|
+
nodeVersion?: string;
|
|
3525
3568
|
/** Generated toolchain manifest shipped with this vite-plus package. */
|
|
3526
3569
|
toolchainManifestPath: string;
|
|
3527
3570
|
/** Root directory of this vite-plus package. */
|
|
@@ -3602,6 +3645,7 @@ export declare function documentationUrl(path: string): string;
|
|
|
3602
3645
|
* - `name`: The name of the package manager
|
|
3603
3646
|
* - `version`: The version of the package manager
|
|
3604
3647
|
* - `expected_hash`: The expected hash of the package manager
|
|
3648
|
+
* - `cwd`: An absolute directory used to load workspace npm configuration
|
|
3605
3649
|
*
|
|
3606
3650
|
* ## Returns
|
|
3607
3651
|
*
|
|
@@ -3634,6 +3678,7 @@ export interface DownloadPackageManagerOptions {
|
|
|
3634
3678
|
name: string;
|
|
3635
3679
|
version: string;
|
|
3636
3680
|
expectedHash?: string;
|
|
3681
|
+
cwd?: string;
|
|
3637
3682
|
}
|
|
3638
3683
|
|
|
3639
3684
|
export interface DownloadPackageManagerResult {
|
|
@@ -3702,7 +3747,6 @@ export interface JsCommandResolvedResult {
|
|
|
3702
3747
|
* Returns a `MergeJsonConfigResult` containing:
|
|
3703
3748
|
* - `content`: The updated vite config content
|
|
3704
3749
|
* - `updated`: Whether any changes were made
|
|
3705
|
-
* - `usesFunctionCallback`: Whether the config uses a function callback
|
|
3706
3750
|
*
|
|
3707
3751
|
* # Example
|
|
3708
3752
|
*
|
|
@@ -3725,8 +3769,6 @@ export interface MergeJsonConfigResult {
|
|
|
3725
3769
|
content: string;
|
|
3726
3770
|
/** Whether any changes were made */
|
|
3727
3771
|
updated: boolean;
|
|
3728
|
-
/** Whether the config uses a function callback */
|
|
3729
|
-
usesFunctionCallback: boolean;
|
|
3730
3772
|
}
|
|
3731
3773
|
|
|
3732
3774
|
/**
|
|
@@ -3745,7 +3787,6 @@ export interface MergeJsonConfigResult {
|
|
|
3745
3787
|
* Returns a `MergeJsonConfigResult` containing:
|
|
3746
3788
|
* - `content`: The updated vite config content
|
|
3747
3789
|
* - `updated`: Whether any changes were made
|
|
3748
|
-
* - `usesFunctionCallback`: Whether the config uses a function callback
|
|
3749
3790
|
*
|
|
3750
3791
|
* # Example
|
|
3751
3792
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as rewriteDocumentationLinks } from "./documentation-DqcZSthV.js";
|
|
2
|
-
import { a as SETUP_VP_VERSION } from "./constants-
|
|
3
|
-
import {
|
|
2
|
+
import { a as SETUP_VP_VERSION } from "./constants-BW3g7VnD.js";
|
|
3
|
+
import { E as multiselect, M as isCancel, O as select, T as log } from "./prompts-BGpQtC5z.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { styleText } from "node:util";
|
|
6
6
|
import fs from "node:fs";
|
package/dist/bin.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as documentationUrl$1 } from "./documentation-DqcZSthV.js";
|
|
2
2
|
import { t as renderCliDoc } from "./help-BmKpeOP9.js";
|
|
3
3
|
import { c as warnMsg, i as log, n as errorMsg, o as printHeader, t as accent } from "./terminal-MKGAuy-p.js";
|
|
4
|
-
import { g as resolveBundled, h as resolve$1, i as DEFAULT_ENVS, l as VITE_CONFIG_FILES, n as BASEURL_TSCONFIG_WARNING, r as CONFIG_METADATA_ENV, u as VITE_PLUS_NAME } from "./constants-
|
|
5
|
-
import { r as createDefaultVitePlusLintConfig } from "./oxlint-plugin-config-
|
|
6
|
-
import {
|
|
7
|
-
import { t as cac } from "./dist-
|
|
4
|
+
import { g as resolveBundled, h as resolve$1, i as DEFAULT_ENVS, l as VITE_CONFIG_FILES, n as BASEURL_TSCONFIG_WARNING, r as CONFIG_METADATA_ENV, u as VITE_PLUS_NAME } from "./constants-BW3g7VnD.js";
|
|
5
|
+
import { r as createDefaultVitePlusLintConfig } from "./oxlint-plugin-config-Dx-ZY2MN.js";
|
|
6
|
+
import { o as readNearestPackageJson } from "./package-BP16iQby.js";
|
|
7
|
+
import { t as cac } from "./dist-Cqz8OtiO.js";
|
|
8
8
|
import { createRequire } from "node:module";
|
|
9
9
|
import path, { dirname, join, resolve } from "node:path";
|
|
10
10
|
import { fileURLToPath } from "node:url";
|
|
@@ -506,7 +506,7 @@ const commandHelpDocs = {
|
|
|
506
506
|
},
|
|
507
507
|
{
|
|
508
508
|
label: "--cache",
|
|
509
|
-
description: "
|
|
509
|
+
description: "Store the results of test runs to run failed and longer test files first (default: true)"
|
|
510
510
|
},
|
|
511
511
|
{
|
|
512
512
|
label: "--maxConcurrency <number>",
|
|
@@ -514,7 +514,7 @@ const commandHelpDocs = {
|
|
|
514
514
|
},
|
|
515
515
|
{
|
|
516
516
|
label: "--fsModuleCache",
|
|
517
|
-
description: "Cache transformed modules on the file system and reuse them between reruns (default:
|
|
517
|
+
description: "Cache transformed modules on the file system and reuse them between reruns (default: true)"
|
|
518
518
|
},
|
|
519
519
|
{
|
|
520
520
|
label: "--fsModuleCachePath <path>",
|
|
@@ -1099,7 +1099,7 @@ const commandHelpDocs = {
|
|
|
1099
1099
|
},
|
|
1100
1100
|
{
|
|
1101
1101
|
label: "--env-prefix <prefix>",
|
|
1102
|
-
description: "Prefix for env variables to inject into the bundle (default: TSDOWN_)"
|
|
1102
|
+
description: "Prefix for env variables to inject into the bundle (default: VITE_PACK_, TSDOWN_)"
|
|
1103
1103
|
},
|
|
1104
1104
|
{
|
|
1105
1105
|
label: "--on-success <command>",
|
|
@@ -1468,7 +1468,7 @@ export default defineConfig({});
|
|
|
1468
1468
|
return viteConfigPath;
|
|
1469
1469
|
}
|
|
1470
1470
|
async function vpFmt(cwd, filePath) {
|
|
1471
|
-
const { runCommandSilently } = await import("./command-
|
|
1471
|
+
const { runCommandSilently } = await import("./command-DaRqSNpP.js");
|
|
1472
1472
|
const { binPath, envs } = await fmt();
|
|
1473
1473
|
const result = await runCommandSilently({
|
|
1474
1474
|
command: binPath,
|
|
@@ -1527,7 +1527,7 @@ async function applyToolInitConfigToViteConfig(command, args, projectPath = proc
|
|
|
1527
1527
|
}
|
|
1528
1528
|
if (spec.configKey === "lint" && hasTriggerFlag(args, ["--init"])) {
|
|
1529
1529
|
const lintInitConfigPath = path.join(projectPath, ".vite-plus-lint-init.oxlintrc.json");
|
|
1530
|
-
const { fixBaseUrlInTsconfig, hasBaseUrlInTsconfig } = await import("./tsconfig-
|
|
1530
|
+
const { fixBaseUrlInTsconfig, hasBaseUrlInTsconfig } = await import("./tsconfig-C5PnJfW4.js");
|
|
1531
1531
|
await fixBaseUrlInTsconfig(projectPath);
|
|
1532
1532
|
const hasBaseUrl = hasBaseUrlInTsconfig(projectPath);
|
|
1533
1533
|
const initConfig = createDefaultVitePlusLintConfig({ includeTypeAwareDefaults: !hasBaseUrl });
|
|
@@ -1857,7 +1857,6 @@ else if (command === "hooks") await import("./hooks/bin.js");
|
|
|
1857
1857
|
else if (command === "--version" || command === "-V") await import("./version.js");
|
|
1858
1858
|
else if (command === "staged") await import("./staged/bin.js");
|
|
1859
1859
|
else try {
|
|
1860
|
-
const { resolveUniversalViteConfig } = await import("./resolve-vite-config-BPgpYMYp.js");
|
|
1861
1860
|
const initInspection = inspectInitCommand(command, args.slice(1));
|
|
1862
1861
|
if (initInspection.handled && initInspection.configKey && initInspection.hasExistingConfigKey && initInspection.existingViteConfigPath) {
|
|
1863
1862
|
log(`Skipped initialization: '${accent(initInspection.configKey)}' already exists in '${accent(path.basename(initInspection.existingViteConfigPath))}'.`);
|
|
@@ -1873,7 +1872,11 @@ else try {
|
|
|
1873
1872
|
doc,
|
|
1874
1873
|
toolchainManifestPath: path.join(cliDistDir, "toolchain.json"),
|
|
1875
1874
|
vitePlusPackagePath,
|
|
1876
|
-
resolveUniversalViteConfig,
|
|
1875
|
+
resolveUniversalViteConfig: async (err, cwd) => {
|
|
1876
|
+
const { resolveUniversalViteConfig } = await import("./resolve-vite-config-CGzlyhGr.js");
|
|
1877
|
+
return resolveUniversalViteConfig(err, cwd);
|
|
1878
|
+
},
|
|
1879
|
+
nodeVersion: process.version,
|
|
1877
1880
|
explicitChdir,
|
|
1878
1881
|
args: rustCliArgs
|
|
1879
1882
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { n as runCommandSilently } from "./command-CguLh2KL.js";
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/verkit@0.5.0/node_modules/verkit/dist/comparison-CmVirWIW.js
|
|
2
|
+
const LETTER_DASH_NUMBER = "[a-zA-Z0-9-]";
|
|
3
|
+
const NUMERIC_IDENTIFIER = String.raw`0|[1-9]\d*`;
|
|
4
|
+
const NUMERIC_IDENTIFIER_LOOSE = String.raw`\d+`;
|
|
5
|
+
const NON_NUMERIC_IDENTIFIER = String.raw`\d*[a-zA-Z-]${LETTER_DASH_NUMBER}*`;
|
|
6
|
+
const MAIN_VERSION = String.raw`(${NUMERIC_IDENTIFIER})\.(${NUMERIC_IDENTIFIER})\.(${NUMERIC_IDENTIFIER})`;
|
|
7
|
+
const MAIN_VERSION_LOOSE = String.raw`(${NUMERIC_IDENTIFIER_LOOSE})\.(${NUMERIC_IDENTIFIER_LOOSE})\.(${NUMERIC_IDENTIFIER_LOOSE})`;
|
|
8
|
+
const PRERELEASE_IDENTIFIER = `(?:${NON_NUMERIC_IDENTIFIER}|${NUMERIC_IDENTIFIER})`;
|
|
9
|
+
const PRERELEASE_IDENTIFIER_LOOSE = `(?:${NON_NUMERIC_IDENTIFIER}|${NUMERIC_IDENTIFIER_LOOSE})`;
|
|
10
|
+
const PRERELEASE = String.raw`(?:-(${PRERELEASE_IDENTIFIER}(?:\.${PRERELEASE_IDENTIFIER})*))`;
|
|
11
|
+
const PRERELEASE_LOOSE = String.raw`(?:-?(${PRERELEASE_IDENTIFIER_LOOSE}(?:\.${PRERELEASE_IDENTIFIER_LOOSE})*))`;
|
|
12
|
+
const BUILD_IDENTIFIER = `${LETTER_DASH_NUMBER}+`;
|
|
13
|
+
const BUILD = String.raw`(?:\+(${BUILD_IDENTIFIER}(?:\.${BUILD_IDENTIFIER})*))`;
|
|
14
|
+
const FULL_PLAIN = `v?${MAIN_VERSION}${PRERELEASE}?${BUILD}?`;
|
|
15
|
+
const LOOSE_PLAIN = String.raw`[v=\s]*${MAIN_VERSION_LOOSE}${PRERELEASE_LOOSE}?${BUILD}?`;
|
|
16
|
+
const GREATER_LESS_THAN = "((?:<|>)?=?)";
|
|
17
|
+
const XRANGE_IDENTIFIER = String.raw`${NUMERIC_IDENTIFIER}|x|X|\*`;
|
|
18
|
+
const XRANGE_IDENTIFIER_LOOSE = String.raw`${NUMERIC_IDENTIFIER_LOOSE}|x|X|\*`;
|
|
19
|
+
const XRANGE_PLAIN = String.raw`[v=\s]*(${XRANGE_IDENTIFIER})(?:\.(${XRANGE_IDENTIFIER})(?:\.(${XRANGE_IDENTIFIER})(?:${PRERELEASE})?${BUILD}?)?)?`;
|
|
20
|
+
const XRANGE_PLAIN_LOOSE = String.raw`[v=\s]*(${XRANGE_IDENTIFIER_LOOSE})(?:\.(${XRANGE_IDENTIFIER_LOOSE})(?:\.(${XRANGE_IDENTIFIER_LOOSE})(?:${PRERELEASE_LOOSE})?${BUILD}?)?)?`;
|
|
21
|
+
const LONE_TILDE = "(?:~>?)";
|
|
22
|
+
const LONE_CARET = String.raw`(?:\^)`;
|
|
23
|
+
const COERCE_PLAIN = String.raw`(^|[^\d])(\d{1,${16}})(?:\.(\d{1,${16}}))?(?:\.(\d{1,${16}}))?`;
|
|
24
|
+
const COERCE = String.raw`${COERCE_PLAIN}(?:$|[^\d])`;
|
|
25
|
+
const COERCE_FULL = String.raw`${COERCE_PLAIN}(?:${PRERELEASE})?(?:${BUILD})?(?:$|[^\d])`;
|
|
26
|
+
function makeSafeRegexSource(source) {
|
|
27
|
+
const replacements = [
|
|
28
|
+
[String.raw`\s`, 1],
|
|
29
|
+
[String.raw`\d`, 256],
|
|
30
|
+
[LETTER_DASH_NUMBER, 250]
|
|
31
|
+
];
|
|
32
|
+
for (const [token, maximum] of replacements) source = source.split(`${token}*`).join(`${token}{0,${maximum}}`).split(`${token}+`).join(`${token}{1,${maximum}}`);
|
|
33
|
+
return source;
|
|
34
|
+
}
|
|
35
|
+
function safeRegex(source, flags) {
|
|
36
|
+
return new RegExp(makeSafeRegexSource(source), flags);
|
|
37
|
+
}
|
|
38
|
+
const FULL = safeRegex(`^${FULL_PLAIN}$`);
|
|
39
|
+
const LOOSE = safeRegex(`^${LOOSE_PLAIN}$`);
|
|
40
|
+
const NUMERIC$1 = /^\d+$/;
|
|
41
|
+
function formatComparableVersion(version) {
|
|
42
|
+
const base = `${version.major}.${version.minor}.${version.patch}`;
|
|
43
|
+
return version.prerelease?.length ? `${base}-${version.prerelease.join(".")}` : base;
|
|
44
|
+
}
|
|
45
|
+
function parse(version, options = {}) {
|
|
46
|
+
if (typeof version !== "string") return version;
|
|
47
|
+
if (version.length > 256) throw new TypeError(`Version exceeds the maximum length of 256 characters`);
|
|
48
|
+
const match = version.trim().match(options.loose ? LOOSE : FULL);
|
|
49
|
+
if (!match) throw new TypeError(`Invalid version syntax: ${version}`);
|
|
50
|
+
const major = Number(match[1]);
|
|
51
|
+
const minor = Number(match[2]);
|
|
52
|
+
const patch = Number(match[3]);
|
|
53
|
+
if (major > Number.MAX_SAFE_INTEGER || major < 0) throw new TypeError(`Invalid major version: ${match[1]}`);
|
|
54
|
+
if (minor > Number.MAX_SAFE_INTEGER || minor < 0) throw new TypeError(`Invalid minor version: ${match[2]}`);
|
|
55
|
+
if (patch > Number.MAX_SAFE_INTEGER || patch < 0) throw new TypeError(`Invalid patch version: ${match[3]}`);
|
|
56
|
+
const prerelease = match[4] ? match[4].split(".").map((identifier) => {
|
|
57
|
+
if (NUMERIC$1.test(identifier)) {
|
|
58
|
+
const numeric = Number(identifier);
|
|
59
|
+
if (numeric >= 0 && numeric < Number.MAX_SAFE_INTEGER) return numeric;
|
|
60
|
+
}
|
|
61
|
+
return identifier;
|
|
62
|
+
}) : void 0;
|
|
63
|
+
return {
|
|
64
|
+
build: match[5]?.split("."),
|
|
65
|
+
major,
|
|
66
|
+
minor,
|
|
67
|
+
patch,
|
|
68
|
+
prerelease
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
function tryParse(version, options = {}) {
|
|
72
|
+
try {
|
|
73
|
+
return parse(version, options);
|
|
74
|
+
} catch {
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
const NUMERIC = /^\d+$/;
|
|
79
|
+
function compareIdentifiers(left, right) {
|
|
80
|
+
if (typeof left === "number" && typeof right === "number") return left === right ? 0 : left < right ? -1 : 1;
|
|
81
|
+
const leftNumeric = NUMERIC.test(String(left));
|
|
82
|
+
const rightNumeric = NUMERIC.test(String(right));
|
|
83
|
+
const normalizedLeft = leftNumeric ? Number(left) : left;
|
|
84
|
+
const normalizedRight = rightNumeric ? Number(right) : right;
|
|
85
|
+
return normalizedLeft === normalizedRight ? 0 : leftNumeric && !rightNumeric ? -1 : rightNumeric && !leftNumeric ? 1 : normalizedLeft < normalizedRight ? -1 : 1;
|
|
86
|
+
}
|
|
87
|
+
function compareMainParsed(left, right) {
|
|
88
|
+
return left.major === right.major ? left.minor === right.minor ? left.patch === right.patch ? 0 : left.patch < right.patch ? -1 : 1 : left.minor < right.minor ? -1 : 1 : left.major < right.major ? -1 : 1;
|
|
89
|
+
}
|
|
90
|
+
function comparePrereleaseParsed(left, right) {
|
|
91
|
+
const leftPrerelease = left.prerelease;
|
|
92
|
+
const rightPrerelease = right.prerelease;
|
|
93
|
+
if (leftPrerelease?.length && !rightPrerelease?.length) return -1;
|
|
94
|
+
if (!leftPrerelease?.length && rightPrerelease?.length) return 1;
|
|
95
|
+
if (!leftPrerelease?.length && !rightPrerelease?.length) return 0;
|
|
96
|
+
for (let index = 0;; index++) {
|
|
97
|
+
const leftIdentifier = leftPrerelease?.[index];
|
|
98
|
+
const rightIdentifier = rightPrerelease?.[index];
|
|
99
|
+
if (leftIdentifier === void 0 && rightIdentifier === void 0) return 0;
|
|
100
|
+
if (rightIdentifier === void 0) return 1;
|
|
101
|
+
if (leftIdentifier === void 0) return -1;
|
|
102
|
+
if (leftIdentifier !== rightIdentifier) return compareIdentifiers(leftIdentifier, rightIdentifier);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
function compareParsed(left, right) {
|
|
106
|
+
return compareMainParsed(left, right) || comparePrereleaseParsed(left, right);
|
|
107
|
+
}
|
|
108
|
+
function compare(left, right, options = {}) {
|
|
109
|
+
return compareParsed(parse(left, options), parse(right, options));
|
|
110
|
+
}
|
|
111
|
+
function compareReversed(left, right, options = {}) {
|
|
112
|
+
return compare(right, left, options);
|
|
113
|
+
}
|
|
114
|
+
function isGreaterThanOrEqual(left, right, options = {}) {
|
|
115
|
+
return compare(left, right, options) >= 0;
|
|
116
|
+
}
|
|
117
|
+
function isLessThanOrEqual(left, right, options = {}) {
|
|
118
|
+
return compare(left, right, options) <= 0;
|
|
119
|
+
}
|
|
120
|
+
//#endregion
|
|
121
|
+
export { isGreaterThanOrEqual as _, GREATER_LESS_THAN as a, safeRegex as b, LOOSE_PLAIN as c, XRANGE_PLAIN as d, XRANGE_PLAIN_LOOSE as f, formatComparableVersion as g, compareReversed as h, FULL_PLAIN as i, PRERELEASE as l, compareParsed as m, COERCE as n, LONE_CARET as o, compare as p, COERCE_FULL as r, LONE_TILDE as s, BUILD as t, PRERELEASE_LOOSE as u, isLessThanOrEqual as v, tryParse as x, parse as y };
|
package/dist/config/bin.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { i as log, n as errorMsg } from "../terminal-MKGAuy-p.js";
|
|
2
|
-
import { i as promptGitHooks, n as defaultInteractive } from "../prompts-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { a as install, c as resolveHooksLocation, o as isGitHooksEnvDisabled, s as isHooksUserDisabled } from "../hooks-
|
|
2
|
+
import { i as promptGitHooks, n as defaultInteractive } from "../prompts-BGpQtC5z.js";
|
|
3
|
+
import { o as updateExistingAgentInstructions } from "../agent-KeDc6vmg.js";
|
|
4
|
+
import { t as require_dist } from "../dist-Bi7ZEK3c.js";
|
|
5
|
+
import { a as install, c as resolveHooksLocation, o as isGitHooksEnvDisabled, s as isHooksUserDisabled } from "../hooks-DhwsWb46.js";
|
|
6
6
|
import { t as unwrapCliParseOutcome } from "../cli-parse-DHE8NrBU.js";
|
|
7
7
|
import path, { join, relative } from "node:path";
|
|
8
8
|
import { parseConfigArgs } from "../../binding/index.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
2
|
//#region package.json
|
|
3
|
-
var version = "1.
|
|
3
|
+
var version = "1.2.0";
|
|
4
4
|
var exports = {
|
|
5
5
|
".": {
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -289,8 +289,8 @@ const VITE_CONFIG_FILES = [
|
|
|
289
289
|
"vite.config.mts",
|
|
290
290
|
"vite.config.cts"
|
|
291
291
|
];
|
|
292
|
-
const VITEST_VERSION = "5.0.
|
|
293
|
-
const SETUP_VP_VERSION = "v1.21.
|
|
292
|
+
const VITEST_VERSION = "5.0.4";
|
|
293
|
+
const SETUP_VP_VERSION = "v1.21.2";
|
|
294
294
|
const TSDOWN_MIGRATION_SKILL_URL = "https://github.com/rolldown/tsdown/blob/main/skills/tsdown-migrate/SKILL.md";
|
|
295
295
|
const VITE_PLUS_OVERRIDE_PACKAGES = process.env.VP_OVERRIDE_PACKAGES ? JSON.parse(process.env.VP_OVERRIDE_PACKAGES) : {
|
|
296
296
|
vite: `npm:@voidzero-dev/vite-plus-core@${VITE_PLUS_VERSION}`,
|
package/dist/create/bin.d.ts
CHANGED