vite-plus 0.1.13 → 0.1.14-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +12 -0
- package/README.md +4 -0
- package/dist/global/{agent-BuEmv_K7.js → agent-DTz-Dh1r.js} +12 -30
- package/dist/global/{cli-truncate-BmIULUG7.js → cli-truncate-Da6Y8aM8.js} +2 -2
- package/dist/global/compat-Ch3iWOnQ.js +14 -0
- package/dist/global/config.js +1 -3
- package/dist/global/create.js +37 -8
- package/dist/global/{log-update-Beldo2tV.js → log-update-C8WCYCbc.js} +3 -3
- package/dist/global/migrate.js +22 -6
- package/dist/global/{package-D0VpX-8d.js → package-Y1UTfJnZ.js} +26 -1
- package/dist/global/report-C7xbSNED.js +28 -0
- package/dist/global/{slice-ansi-1i6Zdm-R.js → slice-ansi-Fap0ehe9.js} +1 -1
- package/dist/global/staged.js +62 -6
- package/dist/global/version.js +1 -1
- package/dist/global/{workspace-CVWspacc.js → workspace-BlrOxcHM.js} +3 -3
- package/dist/global/{wrap-ansi-CnYUWev2.js → wrap-ansi-eywLlPVQ.js} +1 -1
- package/dist/global/wrap-ansi-yd4eUCl_.js +2 -0
- package/dist/index.d.ts +2 -2
- package/dist/migration/migrator.js +26 -11
- package/dist/pack-bin.js +3 -1
- package/dist/resolve-vite-config.d.ts +9 -1
- package/dist/resolve-vite-config.js +78 -1
- package/dist/test/optional-runtime-types.js.d.ts +2 -0
- package/dist/utils/constants.d.ts +6 -0
- package/dist/utils/constants.js +8 -0
- package/dist/utils/editor.js +1 -1
- package/dist/utils/package.d.ts +6 -0
- package/dist/utils/package.js +19 -0
- package/package.json +21 -14
- package/skills/vite-plus/docs/config/build.md +21 -0
- package/skills/vite-plus/docs/config/fmt.md +18 -0
- package/skills/vite-plus/docs/config/index.md +31 -0
- package/skills/vite-plus/docs/config/lint.md +24 -0
- package/skills/vite-plus/docs/config/pack.md +17 -0
- package/skills/vite-plus/docs/config/run.md +231 -0
- package/skills/vite-plus/docs/config/staged.md +15 -0
- package/skills/vite-plus/docs/config/test.md +18 -0
- package/skills/vite-plus/docs/guide/build.md +40 -0
- package/skills/vite-plus/docs/guide/cache.md +119 -0
- package/skills/vite-plus/docs/guide/check.md +41 -0
- package/skills/vite-plus/docs/guide/ci.md +64 -0
- package/skills/vite-plus/docs/guide/commit-hooks.md +51 -0
- package/skills/vite-plus/docs/guide/create.md +88 -0
- package/skills/vite-plus/docs/guide/dev.md +24 -0
- package/skills/vite-plus/docs/guide/env.md +84 -0
- package/skills/vite-plus/docs/guide/fmt.md +41 -0
- package/skills/vite-plus/docs/guide/ide-integration.md +36 -0
- package/skills/vite-plus/docs/guide/implode.md +23 -0
- package/skills/vite-plus/docs/guide/index.md +114 -0
- package/skills/vite-plus/docs/guide/install.md +130 -0
- package/skills/vite-plus/docs/guide/lint.md +50 -0
- package/skills/vite-plus/docs/guide/migrate.md +174 -0
- package/skills/vite-plus/docs/guide/pack.md +61 -0
- package/skills/vite-plus/docs/guide/run.md +292 -0
- package/skills/vite-plus/docs/guide/test.md +35 -0
- package/skills/vite-plus/docs/guide/troubleshooting.md +71 -0
- package/skills/vite-plus/docs/guide/upgrade.md +28 -0
- package/skills/vite-plus/docs/guide/vpx.md +66 -0
- package/skills/vite-plus/docs/guide/why.md +39 -0
- package/dist/global/wrap-ansi-DAqB-SZm.js +0 -3
- package/dist/oxfmt-config.d.ts +0 -1
- package/dist/oxfmt-config.js +0 -0
- /package/dist/global/{src-FkMgH-SM.js → src-B-pcmd0F.js} +0 -0
- /package/dist/global/{strip-ansi-DbamwI77.js → strip-ansi-CE-VDMdw.js} +0 -0
package/AGENTS.md
CHANGED
|
@@ -69,6 +69,18 @@ These commands map to their corresponding tools. For example, `vp dev --port 300
|
|
|
69
69
|
- **Import JavaScript modules from `vite-plus`:** Instead of importing from `vite` or `vitest`, all modules should be imported from the project's `vite-plus` dependency. For example, `import { defineConfig } from 'vite-plus';` or `import { expect, test, vi } from 'vite-plus/test';`. You must not install `vitest` to import test utilities.
|
|
70
70
|
- **Type-Aware Linting:** There is no need to install `oxlint-tsgolint`, `vp lint --type-aware` works out of the box.
|
|
71
71
|
|
|
72
|
+
## CI Integration
|
|
73
|
+
|
|
74
|
+
For GitHub Actions, consider using [`voidzero-dev/setup-vp`](https://github.com/voidzero-dev/setup-vp) to replace separate `actions/setup-node`, package-manager setup, cache, and install steps with a single action.
|
|
75
|
+
|
|
76
|
+
```yaml
|
|
77
|
+
- uses: voidzero-dev/setup-vp@v1
|
|
78
|
+
with:
|
|
79
|
+
cache: true
|
|
80
|
+
- run: vp check
|
|
81
|
+
- run: vp test
|
|
82
|
+
```
|
|
83
|
+
|
|
72
84
|
## Review Checklist for Agents
|
|
73
85
|
|
|
74
86
|
- [ ] Run `vp install` after pulling remote changes and before getting started.
|
package/README.md
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { r as __toESM, t as __commonJSMin } from "./chunk-BoAXSpZd.js";
|
|
2
2
|
import { _ as YAMLMap, g as YAMLSeq, i as parseDocument, n as parse, y as Scalar } from "./browser-09BZLUYM.js";
|
|
3
|
-
import {
|
|
3
|
+
import { c as readJsonFile, d as VITE_PLUS_NAME, f as VITE_PLUS_OVERRIDE_PACKAGES, m as isForceOverrideMode, n as detectPackageMetadata, o as editJsonFile, p as VITE_PLUS_VERSION, s as isJsonFile, u as BASEURL_TSCONFIG_WARNING } from "./package-Y1UTfJnZ.js";
|
|
4
4
|
import { n as accent } from "./help-HviKaKAU.js";
|
|
5
|
+
import { n as addMigrationWarning, t as addManualStep } from "./report-C7xbSNED.js";
|
|
5
6
|
import path from "node:path";
|
|
6
7
|
import { stripVTControlCharacters, styleText } from "node:util";
|
|
7
8
|
import process$1, { stdin, stdout } from "node:process";
|
|
@@ -3176,33 +3177,6 @@ function detectConfigs(projectPath) {
|
|
|
3176
3177
|
return configs;
|
|
3177
3178
|
}
|
|
3178
3179
|
//#endregion
|
|
3179
|
-
//#region src/migration/report.ts
|
|
3180
|
-
function createMigrationReport() {
|
|
3181
|
-
return {
|
|
3182
|
-
createdViteConfigCount: 0,
|
|
3183
|
-
mergedConfigCount: 0,
|
|
3184
|
-
mergedStagedConfigCount: 0,
|
|
3185
|
-
inlinedLintStagedConfigCount: 0,
|
|
3186
|
-
removedConfigCount: 0,
|
|
3187
|
-
tsdownImportCount: 0,
|
|
3188
|
-
rewrittenImportFileCount: 0,
|
|
3189
|
-
rewrittenImportErrors: [],
|
|
3190
|
-
eslintMigrated: false,
|
|
3191
|
-
prettierMigrated: false,
|
|
3192
|
-
gitHooksConfigured: false,
|
|
3193
|
-
warnings: [],
|
|
3194
|
-
manualSteps: []
|
|
3195
|
-
};
|
|
3196
|
-
}
|
|
3197
|
-
function addMigrationWarning(report, warning) {
|
|
3198
|
-
if (!report || report.warnings.includes(warning)) return;
|
|
3199
|
-
report.warnings.push(warning);
|
|
3200
|
-
}
|
|
3201
|
-
function addManualStep(report, step) {
|
|
3202
|
-
if (!report || report.manualSteps.includes(step)) return;
|
|
3203
|
-
report.manualSteps.push(step);
|
|
3204
|
-
}
|
|
3205
|
-
//#endregion
|
|
3206
3180
|
//#region src/migration/migrator.ts
|
|
3207
3181
|
var import_semver = /* @__PURE__ */ __toESM(require_semver(), 1);
|
|
3208
3182
|
const LINT_STAGED_JSON_CONFIG_FILES = [".lintstagedrc.json", ".lintstagedrc"];
|
|
@@ -3734,7 +3708,15 @@ function rewriteRootWorkspacePackageJson(projectPath, packageManager, skipStaged
|
|
|
3734
3708
|
...VITE_PLUS_OVERRIDE_PACKAGES
|
|
3735
3709
|
};
|
|
3736
3710
|
else if (packageManager === PackageManager.pnpm) {
|
|
3737
|
-
|
|
3711
|
+
if (isForceOverrideMode()) pkg.pnpm = {
|
|
3712
|
+
...pkg.pnpm,
|
|
3713
|
+
overrides: {
|
|
3714
|
+
...pkg.pnpm?.overrides,
|
|
3715
|
+
...VITE_PLUS_OVERRIDE_PACKAGES,
|
|
3716
|
+
[VITE_PLUS_NAME]: VITE_PLUS_VERSION
|
|
3717
|
+
}
|
|
3718
|
+
};
|
|
3719
|
+
else for (const key of [...Object.keys(VITE_PLUS_OVERRIDE_PACKAGES), ...REMOVE_PACKAGES]) {
|
|
3738
3720
|
if (pkg.pnpm?.overrides?.[key]) delete pkg.pnpm.overrides[key];
|
|
3739
3721
|
if (pkg.resolutions?.[key]) delete pkg.resolutions[key];
|
|
3740
3722
|
}
|
|
@@ -4605,4 +4587,4 @@ function getMarkedRange(content, startMarker, endMarker) {
|
|
|
4605
4587
|
};
|
|
4606
4588
|
}
|
|
4607
4589
|
//#endregion
|
|
4608
|
-
export {
|
|
4590
|
+
export { templatesDir as A, select as B, downloadPackageManager$1 as C, selectPackageManager as D, runViteInstall as E, confirm as F, text as H, intro as I, log as L, PackageManager as M, require_semver as N, upgradeYarn as O, cancel as P, multiselect as R, defaultInteractive as S, runViteFmt as T, Ct as U, spinner as V, rewriteMonorepoProject as _, writeAgentInstructions as a, readYamlFile as b, detectEslintProject as c, installGitHooks as d, mergeViteConfigFiles as f, rewriteMonorepo as g, preflightGitHooksSetup as h, updateExistingAgentInstructions as i, DependencyType as j, displayRelative as k, detectPrettierProject as l, migratePrettierToOxfmt as m, detectExistingAgentTargetPaths as n, checkViteVersion as o, migrateEslintToOxlint as p, selectAgentTargetPaths as r, checkVitestVersion as s, detectAgentConflicts as t, ensurePreCommitHook as u, rewriteStandaloneProject as v, promptGitHooks as w, cancelAndExit as x, editYamlFile as y, outro as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as eastAsianWidth, t as stripAnsi } from "./strip-ansi-
|
|
2
|
-
import { t as sliceAnsi } from "./slice-ansi-
|
|
1
|
+
import { n as eastAsianWidth, t as stripAnsi } from "./strip-ansi-CE-VDMdw.js";
|
|
2
|
+
import { t as sliceAnsi } from "./slice-ansi-Fap0ehe9.js";
|
|
3
3
|
//#region ../../node_modules/.pnpm/string-width@8.1.0/node_modules/string-width/index.js
|
|
4
4
|
/**
|
|
5
5
|
Logic:
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { n as addMigrationWarning } from "./report-C7xbSNED.js";
|
|
2
|
+
//#region src/migration/compat.ts
|
|
3
|
+
/**
|
|
4
|
+
* Check for Rolldown-incompatible manualChunks config patterns.
|
|
5
|
+
*/
|
|
6
|
+
function checkManualChunksCompat(output, report) {
|
|
7
|
+
const outputs = Array.isArray(output) ? output : output ? [output] : [];
|
|
8
|
+
for (const out of outputs) if (out.manualChunks != null && typeof out.manualChunks !== "function") {
|
|
9
|
+
addMigrationWarning(report, "Object-form `build.rollupOptions.output.manualChunks` is not supported by Rolldown. Convert it to function form or use `build.rolldownOptions.output.codeSplitting`. See: https://rolldown.rs/options/output#manualchunks and https://rolldown.rs/in-depth/manual-code-splitting");
|
|
10
|
+
break;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { checkManualChunksCompat };
|
package/dist/global/config.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { S as defaultInteractive, i as updateExistingAgentInstructions, u as ensurePreCommitHook, w as promptGitHooks } from "./agent-DTz-Dh1r.js";
|
|
2
2
|
import { t as lib_default } from "./lib-DxappLRQ.js";
|
|
3
|
-
import "./browser-09BZLUYM.js";
|
|
4
|
-
import "./package-D0VpX-8d.js";
|
|
5
3
|
import { i as log, t as renderCliDoc } from "./help-HviKaKAU.js";
|
|
6
4
|
import { join } from "node:path";
|
|
7
5
|
import { existsSync, mkdirSync, rmSync, writeFileSync } from "node:fs";
|
package/dist/global/create.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { r as __toESM, t as __commonJSMin } from "./chunk-BoAXSpZd.js";
|
|
2
|
-
import { A as
|
|
2
|
+
import { A as templatesDir, B as select, C as downloadPackageManager$1, D as selectPackageManager, E as runViteInstall, F as confirm, H as text, I as intro, L as log, M as PackageManager, P as cancel, R as multiselect, S as defaultInteractive, T as runViteFmt, U as Ct, V as spinner, _ as rewriteMonorepoProject, a as writeAgentInstructions, d as installGitHooks, g as rewriteMonorepo, j as DependencyType, k as displayRelative, n as detectExistingAgentTargetPaths, r as selectAgentTargetPaths, v as rewriteStandaloneProject, w as promptGitHooks } from "./agent-DTz-Dh1r.js";
|
|
3
3
|
import { t as lib_default } from "./lib-DxappLRQ.js";
|
|
4
|
-
import "./
|
|
5
|
-
import { a as editJsonFile, s as readJsonFile } from "./package-D0VpX-8d.js";
|
|
4
|
+
import { c as readJsonFile, o as editJsonFile, t as checkNpmPackageExists } from "./package-Y1UTfJnZ.js";
|
|
6
5
|
import { a as muted, i as log$1, n as accent, o as success, t as renderCliDoc } from "./help-HviKaKAU.js";
|
|
7
|
-
import { a as detectExistingEditor, n as updatePackageJsonWithDeps, o as selectEditor, r as updateWorkspaceConfig, s as writeEditorConfigs, t as detectWorkspace$1 } from "./workspace-
|
|
6
|
+
import { a as detectExistingEditor, n as updatePackageJsonWithDeps, o as selectEditor, r as updateWorkspaceConfig, s as writeEditorConfigs, t as detectWorkspace$1 } from "./workspace-BlrOxcHM.js";
|
|
8
7
|
import path from "node:path";
|
|
9
8
|
import { styleText } from "node:util";
|
|
10
9
|
import color from "picocolors";
|
|
@@ -3183,12 +3182,12 @@ function copyDir(srcDir, destDir) {
|
|
|
3183
3182
|
* Examples:
|
|
3184
3183
|
* ```
|
|
3185
3184
|
* # invalid target directories
|
|
3186
|
-
* ./ -> { directory: '', packageName: '', error: 'Invalid target directory' }
|
|
3187
3185
|
* /foo/bar -> { directory: '', packageName: '', error: 'Absolute path is not allowed' }
|
|
3188
3186
|
* @scope/ -> { directory: '', packageName: '', error: 'Invalid target directory' }
|
|
3189
3187
|
* ../../foo/bar -> { directory: '', packageName: '', error: 'Invalid target directory' }
|
|
3190
3188
|
*
|
|
3191
3189
|
* # valid target directories
|
|
3190
|
+
* . -> { directory: '.', packageName: '' }
|
|
3192
3191
|
* ./my-package -> { directory: './my-package', packageName: 'my-package' }
|
|
3193
3192
|
* ./foo/bar-package -> { directory: './foo/bar-package', packageName: 'bar-package' }
|
|
3194
3193
|
* ./foo/bar-package/ -> { directory: './foo/bar-package', packageName: 'bar-package' }
|
|
@@ -3201,6 +3200,10 @@ function copyDir(srcDir, destDir) {
|
|
|
3201
3200
|
*/
|
|
3202
3201
|
function formatTargetDir(input) {
|
|
3203
3202
|
let targetDir = path.normalize(input.trim());
|
|
3203
|
+
if (targetDir === "." || targetDir === `.${path.sep}`) return {
|
|
3204
|
+
directory: ".",
|
|
3205
|
+
packageName: ""
|
|
3206
|
+
};
|
|
3204
3207
|
const parsed = path.parse(targetDir);
|
|
3205
3208
|
if (parsed.root || path.isAbsolute(targetDir)) return {
|
|
3206
3209
|
directory: "",
|
|
@@ -3248,6 +3251,14 @@ function formatDisplayTargetDir(targetDir) {
|
|
|
3248
3251
|
if (normalized.startsWith("./") || normalized.startsWith("../") || normalized.startsWith("/") || normalized.startsWith("~")) return normalized;
|
|
3249
3252
|
return `./${normalized}`;
|
|
3250
3253
|
}
|
|
3254
|
+
function deriveDefaultPackageName(cwd, scope, fallbackName) {
|
|
3255
|
+
const dirName = path.basename(cwd);
|
|
3256
|
+
const candidate = scope ? `${scope}/${dirName}` : dirName;
|
|
3257
|
+
return (0, import_lib.default)(candidate).validForNewPackages ? candidate : getRandomProjectName({
|
|
3258
|
+
scope,
|
|
3259
|
+
fallbackName
|
|
3260
|
+
});
|
|
3261
|
+
}
|
|
3251
3262
|
//#endregion
|
|
3252
3263
|
//#region src/create/prompts.ts
|
|
3253
3264
|
async function promptPackageNameAndTargetDir(defaultPackageName, interactive) {
|
|
@@ -3421,7 +3432,15 @@ async function executeRemoteTemplate(workspaceInfo, templateInfo, options) {
|
|
|
3421
3432
|
cwd: workspaceInfo.rootDir,
|
|
3422
3433
|
envs
|
|
3423
3434
|
}, templateInfo.parentDir);
|
|
3424
|
-
} else
|
|
3435
|
+
} else {
|
|
3436
|
+
if (!isGitHubTemplate) {
|
|
3437
|
+
if (!await checkNpmPackageExists(templateInfo.command)) {
|
|
3438
|
+
if (!silent) log.error(`Template "${templateInfo.command}" not found on npm. Run ${yellow("vp create --list")} to see available templates.`);
|
|
3439
|
+
return { exitCode: 1 };
|
|
3440
|
+
}
|
|
3441
|
+
}
|
|
3442
|
+
result = await runRemoteTemplateCommand(workspaceInfo, workspaceInfo.rootDir, templateInfo, true, silent);
|
|
3443
|
+
}
|
|
3425
3444
|
const exitCode = result.exitCode;
|
|
3426
3445
|
if (exitCode === 127) {
|
|
3427
3446
|
log.info(yellow("\nTroubleshooting:"));
|
|
@@ -3998,7 +4017,17 @@ Use \`vp create --list\` to list all available templates, or run \`vp create --h
|
|
|
3998
4017
|
remoteTargetDir = await promptTargetDir(defaultTargetDir, options.interactive, { cwd: remoteTargetBaseDir });
|
|
3999
4018
|
selectedTemplateArgs = [remoteTargetDir, ...selectedTemplateArgs];
|
|
4000
4019
|
}
|
|
4001
|
-
if (isBuiltinTemplate && !targetDir) if (
|
|
4020
|
+
if (isBuiltinTemplate && (!targetDir || targetDir === ".")) if (targetDir === ".") {
|
|
4021
|
+
const fallbackName = selectedTemplateName === BuiltinTemplate.monorepo ? "vite-plus-monorepo" : `vite-plus-${selectedTemplateName.split(":")[1]}`;
|
|
4022
|
+
packageName = deriveDefaultPackageName(cwd, workspaceInfoOptional.monorepoScope, fallbackName);
|
|
4023
|
+
if (isMonorepo) {
|
|
4024
|
+
if (!cwdRelativeToRoot) cancelAndExit("Cannot scaffold into the monorepo root directory. Use --directory to specify a target directory", 1);
|
|
4025
|
+
const enclosingPackage = workspaceInfoOptional.packages.find((pkg) => cwdRelativeToRoot === pkg.path || cwdRelativeToRoot.startsWith(`${pkg.path}/`));
|
|
4026
|
+
if (enclosingPackage) cancelAndExit(`Cannot scaffold inside existing package "${enclosingPackage.name}" (${enclosingPackage.path}). Use --directory to specify a different location`, 1);
|
|
4027
|
+
targetDir = cwdRelativeToRoot;
|
|
4028
|
+
}
|
|
4029
|
+
log.info(`Using package name: ${accent(packageName)}`);
|
|
4030
|
+
} else if (selectedTemplateName === BuiltinTemplate.monorepo) {
|
|
4002
4031
|
const selected = await promptPackageNameAndTargetDir(getRandomProjectName({ fallbackName: "vite-plus-monorepo" }), options.interactive);
|
|
4003
4032
|
packageName = selected.packageName;
|
|
4004
4033
|
targetDir = selected.targetDir;
|
|
@@ -4139,7 +4168,7 @@ Use \`vp create --list\` to list all available templates, or run \`vp create --h
|
|
|
4139
4168
|
targetDir = templateInfo.parentDir ? path.join(templateInfo.parentDir, selected.targetDir).split(path.sep).join("/") : selected.targetDir;
|
|
4140
4169
|
}
|
|
4141
4170
|
pauseCreateProgress();
|
|
4142
|
-
await checkProjectDirExists(targetDir, options.interactive);
|
|
4171
|
+
await checkProjectDirExists(path.join(workspaceInfo.rootDir, targetDir), options.interactive);
|
|
4143
4172
|
resumeCreateProgress();
|
|
4144
4173
|
updateCreateProgress("Generating project");
|
|
4145
4174
|
result = await executeBuiltinTemplate(workspaceInfo, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as stripAnsi } from "./strip-ansi-
|
|
2
|
-
import { t as sliceAnsi } from "./slice-ansi-
|
|
3
|
-
import { t as wrapAnsi } from "./wrap-ansi-
|
|
1
|
+
import { t as stripAnsi } from "./strip-ansi-CE-VDMdw.js";
|
|
2
|
+
import { t as sliceAnsi } from "./slice-ansi-Fap0ehe9.js";
|
|
3
|
+
import { t as wrapAnsi } from "./wrap-ansi-eywLlPVQ.js";
|
|
4
4
|
import process$1 from "node:process";
|
|
5
5
|
import nodeos__default from "node:os";
|
|
6
6
|
//#region ../../node_modules/.pnpm/environment@1.1.0/node_modules/environment/index.js
|
package/dist/global/migrate.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as __toESM } from "./chunk-BoAXSpZd.js";
|
|
2
|
-
import {
|
|
2
|
+
import { B as select, C as downloadPackageManager$1, D as selectPackageManager, E as runViteInstall, F as confirm, L as log, M as PackageManager, N as require_semver, O as upgradeYarn, S as defaultInteractive, U as Ct, V as spinner, a as writeAgentInstructions, c as detectEslintProject, d as installGitHooks, f as mergeViteConfigFiles, g as rewriteMonorepo, h as preflightGitHooksSetup, k as displayRelative, l as detectPrettierProject, m as migratePrettierToOxfmt, n as detectExistingAgentTargetPaths, o as checkViteVersion, p as migrateEslintToOxlint, r as selectAgentTargetPaths, s as checkVitestVersion, t as detectAgentConflicts, v as rewriteStandaloneProject, w as promptGitHooks, x as cancelAndExit, z as outro } from "./agent-DTz-Dh1r.js";
|
|
3
3
|
import { t as lib_default } from "./lib-DxappLRQ.js";
|
|
4
|
-
import "./
|
|
5
|
-
import { i as readNearestPackageJson, r as hasVitePlusDependency } from "./package-D0VpX-8d.js";
|
|
4
|
+
import { a as readNearestPackageJson, i as hasVitePlusDependency, m as isForceOverrideMode } from "./package-Y1UTfJnZ.js";
|
|
6
5
|
import { a as muted, i as log$1, n as accent, t as renderCliDoc } from "./help-HviKaKAU.js";
|
|
7
|
-
import {
|
|
6
|
+
import { r as createMigrationReport } from "./report-C7xbSNED.js";
|
|
7
|
+
import { i as detectEditorConflicts, o as selectEditor, s as writeEditorConfigs, t as detectWorkspace$1 } from "./workspace-BlrOxcHM.js";
|
|
8
8
|
import path from "node:path";
|
|
9
9
|
import { styleText } from "node:util";
|
|
10
10
|
import { vitePlusHeader } from "../../binding/index.js";
|
|
@@ -315,6 +315,17 @@ function showMigrationSummary(options) {
|
|
|
315
315
|
for (const step of report.manualSteps) log$1(` - ${step}`);
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
|
+
async function checkRolldownCompatibility(rootDir, report) {
|
|
319
|
+
try {
|
|
320
|
+
const { resolveConfig } = await import("./src-B-pcmd0F.js");
|
|
321
|
+
const { checkManualChunksCompat } = await import("./compat-Ch3iWOnQ.js");
|
|
322
|
+
checkManualChunksCompat((await resolveConfig({
|
|
323
|
+
root: rootDir,
|
|
324
|
+
logLevel: "silent",
|
|
325
|
+
configLoader: "runner"
|
|
326
|
+
}, "build")).build?.rollupOptions?.output, report);
|
|
327
|
+
} catch {}
|
|
328
|
+
}
|
|
318
329
|
async function executeMigrationPlan(workspaceInfoOptional, plan, interactive) {
|
|
319
330
|
const report = createMigrationReport();
|
|
320
331
|
const migrationProgress = interactive ? spinner({ indicator: "timer" }) : void 0;
|
|
@@ -368,6 +379,9 @@ async function executeMigrationPlan(workspaceInfoOptional, plan, interactive) {
|
|
|
368
379
|
failMigrationProgress("Migration failed");
|
|
369
380
|
cancelAndExit("Vite+ cannot automatically migrate this project yet.", 1);
|
|
370
381
|
}
|
|
382
|
+
updateMigrationProgress("Checking config compatibility");
|
|
383
|
+
await checkRolldownCompatibility(workspaceInfo.rootDir, report);
|
|
384
|
+
if (workspaceInfo.packages) for (const pkg of workspaceInfo.packages) await checkRolldownCompatibility(path.join(workspaceInfo.rootDir, pkg.path), report);
|
|
371
385
|
if (plan.migrateEslint) {
|
|
372
386
|
updateMigrationProgress("Migrating ESLint");
|
|
373
387
|
if (!await migrateEslintToOxlint(workspaceInfo.rootDir, interactive, plan.eslintConfigFile, workspaceInfo.packages, {
|
|
@@ -433,7 +447,7 @@ async function main() {
|
|
|
433
447
|
const workspaceInfoOptional = await detectWorkspace$1(projectPath);
|
|
434
448
|
const resolvedPackageManager = workspaceInfoOptional.packageManager ?? "unknown";
|
|
435
449
|
const rootPkg = readNearestPackageJson(workspaceInfoOptional.rootDir);
|
|
436
|
-
if (hasVitePlusDependency(rootPkg)) {
|
|
450
|
+
if (hasVitePlusDependency(rootPkg) && !isForceOverrideMode()) {
|
|
437
451
|
let didMigrate = false;
|
|
438
452
|
let installDurationMs = 0;
|
|
439
453
|
const report = createMigrationReport();
|
|
@@ -471,7 +485,9 @@ async function main() {
|
|
|
471
485
|
if (shouldSetupHooks) updateMigrationProgress("Configuring git hooks");
|
|
472
486
|
if (shouldSetupHooks && installGitHooks(workspaceInfoOptional.rootDir, true, report)) didMigrate = true;
|
|
473
487
|
}
|
|
474
|
-
|
|
488
|
+
await checkRolldownCompatibility(workspaceInfoOptional.rootDir, report);
|
|
489
|
+
if (workspaceInfoOptional.packages) for (const pkg of workspaceInfoOptional.packages) await checkRolldownCompatibility(path.join(workspaceInfoOptional.rootDir, pkg.path), report);
|
|
490
|
+
if (didMigrate || report.warnings.length > 0) {
|
|
475
491
|
clearMigrationProgress();
|
|
476
492
|
showMigrationSummary({
|
|
477
493
|
projectRoot: workspaceInfoOptional.rootDir,
|
|
@@ -8,6 +8,14 @@ const VITE_PLUS_OVERRIDE_PACKAGES = process.env.VITE_PLUS_OVERRIDE_PACKAGES ? JS
|
|
|
8
8
|
vite: "npm:@voidzero-dev/vite-plus-core@latest",
|
|
9
9
|
vitest: "npm:@voidzero-dev/vite-plus-test@latest"
|
|
10
10
|
};
|
|
11
|
+
/**
|
|
12
|
+
* When VITE_PLUS_FORCE_MIGRATE is set, force full dependency rewriting
|
|
13
|
+
* even for projects already using vite-plus. Used by ecosystem CI to
|
|
14
|
+
* override dependencies with locally built tgz packages.
|
|
15
|
+
*/
|
|
16
|
+
function isForceOverrideMode() {
|
|
17
|
+
return process.env.VITE_PLUS_FORCE_MIGRATE === "1";
|
|
18
|
+
}
|
|
11
19
|
createRequire(import.meta.url);
|
|
12
20
|
const BASEURL_TSCONFIG_WARNING = "Skipped typeAware/typeCheck: tsconfig.json contains baseUrl which is not yet supported by the oxlint type checker.\n Run `npx @andrewbranch/ts5to6 --fixBaseUrl .` to remove baseUrl from your tsconfig.";
|
|
13
21
|
process.versions.node, process.release.name;
|
|
@@ -930,5 +938,22 @@ function readNearestPackageJson(currentDir) {
|
|
|
930
938
|
function hasVitePlusDependency(pkg) {
|
|
931
939
|
return Boolean(pkg?.dependencies?.["vite-plus"] || pkg?.devDependencies?.["vite-plus"]);
|
|
932
940
|
}
|
|
941
|
+
/**
|
|
942
|
+
* Check if an npm package exists in the public registry.
|
|
943
|
+
* Returns true if the package exists or if the check could not be performed (network error, timeout).
|
|
944
|
+
* Returns false only if the registry definitively responds with 404.
|
|
945
|
+
*/
|
|
946
|
+
async function checkNpmPackageExists(packageName) {
|
|
947
|
+
const atIndex = packageName.indexOf("@", 2);
|
|
948
|
+
const name = atIndex === -1 ? packageName : packageName.slice(0, atIndex);
|
|
949
|
+
try {
|
|
950
|
+
return (await fetch(`https://registry.npmjs.org/${name}`, {
|
|
951
|
+
method: "HEAD",
|
|
952
|
+
signal: AbortSignal.timeout(3e3)
|
|
953
|
+
})).status !== 404;
|
|
954
|
+
} catch {
|
|
955
|
+
return true;
|
|
956
|
+
}
|
|
957
|
+
}
|
|
933
958
|
//#endregion
|
|
934
|
-
export {
|
|
959
|
+
export { readNearestPackageJson as a, readJsonFile as c, VITE_PLUS_NAME as d, VITE_PLUS_OVERRIDE_PACKAGES as f, hasVitePlusDependency as i, writeJsonFile as l, isForceOverrideMode as m, detectPackageMetadata as n, editJsonFile as o, VITE_PLUS_VERSION as p, getScopeFromPackageName as r, isJsonFile as s, checkNpmPackageExists as t, BASEURL_TSCONFIG_WARNING as u };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
//#region src/migration/report.ts
|
|
2
|
+
function createMigrationReport() {
|
|
3
|
+
return {
|
|
4
|
+
createdViteConfigCount: 0,
|
|
5
|
+
mergedConfigCount: 0,
|
|
6
|
+
mergedStagedConfigCount: 0,
|
|
7
|
+
inlinedLintStagedConfigCount: 0,
|
|
8
|
+
removedConfigCount: 0,
|
|
9
|
+
tsdownImportCount: 0,
|
|
10
|
+
rewrittenImportFileCount: 0,
|
|
11
|
+
rewrittenImportErrors: [],
|
|
12
|
+
eslintMigrated: false,
|
|
13
|
+
prettierMigrated: false,
|
|
14
|
+
gitHooksConfigured: false,
|
|
15
|
+
warnings: [],
|
|
16
|
+
manualSteps: []
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
function addMigrationWarning(report, warning) {
|
|
20
|
+
if (!report || report.warnings.includes(warning)) return;
|
|
21
|
+
report.warnings.push(warning);
|
|
22
|
+
}
|
|
23
|
+
function addManualStep(report, step) {
|
|
24
|
+
if (!report || report.manualSteps.includes(step)) return;
|
|
25
|
+
report.manualSteps.push(step);
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
export { addMigrationWarning as n, createMigrationReport as r, addManualStep as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as ansiStyles, i as isWide, r as isFullWidth } from "./strip-ansi-
|
|
1
|
+
import { a as ansiStyles, i as isWide, r as isFullWidth } from "./strip-ansi-CE-VDMdw.js";
|
|
2
2
|
//#region ../../node_modules/.pnpm/is-fullwidth-code-point@5.1.0/node_modules/is-fullwidth-code-point/index.js
|
|
3
3
|
function isFullwidthCodePoint(codePoint) {
|
|
4
4
|
if (!Number.isInteger(codePoint)) return false;
|
package/dist/global/staged.js
CHANGED
|
@@ -6,7 +6,7 @@ import { formatWithOptions, inspect, promisify } from "node:util";
|
|
|
6
6
|
import { cwd } from "node:process";
|
|
7
7
|
import c from "node:readline";
|
|
8
8
|
import nodeTty from "node:tty";
|
|
9
|
-
import { constants } from "node:fs";
|
|
9
|
+
import fs, { constants } from "node:fs";
|
|
10
10
|
import { vitePlusHeader } from "../../binding/index.js";
|
|
11
11
|
import { createRequire } from "node:module";
|
|
12
12
|
import fsPromises, { constants as constants$1 } from "node:fs/promises";
|
|
@@ -1817,9 +1817,9 @@ var DefaultRenderer = class DefaultRenderer {
|
|
|
1817
1817
|
this.logger.options.color = this.options.color;
|
|
1818
1818
|
}
|
|
1819
1819
|
async render() {
|
|
1820
|
-
const { createLogUpdate } = await import("./log-update-
|
|
1821
|
-
const { default: truncate } = await import("./cli-truncate-
|
|
1822
|
-
const { default: wrap } = await import("./wrap-ansi-
|
|
1820
|
+
const { createLogUpdate } = await import("./log-update-C8WCYCbc.js");
|
|
1821
|
+
const { default: truncate } = await import("./cli-truncate-Da6Y8aM8.js");
|
|
1822
|
+
const { default: wrap } = await import("./wrap-ansi-yd4eUCl_.js");
|
|
1823
1823
|
this.updater = createLogUpdate(this.logger.process.stdout);
|
|
1824
1824
|
this.truncate = truncate;
|
|
1825
1825
|
this.wrap = wrap;
|
|
@@ -6653,11 +6653,67 @@ const lintStaged = async ({ allowEmpty = false, color = SUPPORTS_COLOR, concurre
|
|
|
6653
6653
|
};
|
|
6654
6654
|
//#endregion
|
|
6655
6655
|
//#region src/resolve-vite-config.ts
|
|
6656
|
+
const VITE_CONFIG_FILES = [
|
|
6657
|
+
"vite.config.ts",
|
|
6658
|
+
"vite.config.js",
|
|
6659
|
+
"vite.config.mjs",
|
|
6660
|
+
"vite.config.mts",
|
|
6661
|
+
"vite.config.cjs",
|
|
6662
|
+
"vite.config.cts"
|
|
6663
|
+
];
|
|
6664
|
+
/**
|
|
6665
|
+
* Find a vite config file by walking up from `startDir` to `stopDir`.
|
|
6666
|
+
* Returns the absolute path of the first config file found, or undefined.
|
|
6667
|
+
*/
|
|
6668
|
+
function findViteConfigUp(startDir, stopDir) {
|
|
6669
|
+
let dir = path.resolve(startDir);
|
|
6670
|
+
const stop = path.resolve(stopDir);
|
|
6671
|
+
while (true) {
|
|
6672
|
+
for (const filename of VITE_CONFIG_FILES) {
|
|
6673
|
+
const filePath = path.join(dir, filename);
|
|
6674
|
+
if (fs.existsSync(filePath)) return filePath;
|
|
6675
|
+
}
|
|
6676
|
+
const parent = path.dirname(dir);
|
|
6677
|
+
if (parent === dir || !parent.startsWith(stop)) break;
|
|
6678
|
+
dir = parent;
|
|
6679
|
+
}
|
|
6680
|
+
}
|
|
6681
|
+
function hasViteConfig(dir) {
|
|
6682
|
+
return VITE_CONFIG_FILES.some((f) => fs.existsSync(path.join(dir, f)));
|
|
6683
|
+
}
|
|
6684
|
+
/**
|
|
6685
|
+
* Find the workspace root by walking up from `startDir` looking for
|
|
6686
|
+
* monorepo indicators (pnpm-workspace.yaml, workspaces in package.json, lerna.json).
|
|
6687
|
+
*/
|
|
6688
|
+
function findWorkspaceRoot(startDir) {
|
|
6689
|
+
let dir = path.resolve(startDir);
|
|
6690
|
+
while (true) {
|
|
6691
|
+
if (fs.existsSync(path.join(dir, "pnpm-workspace.yaml"))) return dir;
|
|
6692
|
+
const pkgPath = path.join(dir, "package.json");
|
|
6693
|
+
if (fs.existsSync(pkgPath)) try {
|
|
6694
|
+
if (JSON.parse(fs.readFileSync(pkgPath, "utf-8")).workspaces) return dir;
|
|
6695
|
+
} catch {}
|
|
6696
|
+
if (fs.existsSync(path.join(dir, "lerna.json"))) return dir;
|
|
6697
|
+
const parent = path.dirname(dir);
|
|
6698
|
+
if (parent === dir) break;
|
|
6699
|
+
dir = parent;
|
|
6700
|
+
}
|
|
6701
|
+
}
|
|
6656
6702
|
/**
|
|
6657
6703
|
* Resolve vite.config.ts and return the config object.
|
|
6658
6704
|
*/
|
|
6659
|
-
async function resolveViteConfig(cwd) {
|
|
6660
|
-
const { resolveConfig } = await import("./src-
|
|
6705
|
+
async function resolveViteConfig(cwd, options) {
|
|
6706
|
+
const { resolveConfig } = await import("./src-B-pcmd0F.js");
|
|
6707
|
+
if (options?.traverseUp && !hasViteConfig(cwd)) {
|
|
6708
|
+
const workspaceRoot = findWorkspaceRoot(cwd);
|
|
6709
|
+
if (workspaceRoot) {
|
|
6710
|
+
const configFile = findViteConfigUp(path.dirname(cwd), workspaceRoot);
|
|
6711
|
+
if (configFile) return resolveConfig({
|
|
6712
|
+
root: cwd,
|
|
6713
|
+
configFile
|
|
6714
|
+
}, "build");
|
|
6715
|
+
}
|
|
6716
|
+
}
|
|
6661
6717
|
return resolveConfig({ root: cwd }, "build");
|
|
6662
6718
|
}
|
|
6663
6719
|
//#endregion
|
package/dist/global/version.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as VITE_PLUS_NAME, i as hasVitePlusDependency, n as detectPackageMetadata } from "./package-Y1UTfJnZ.js";
|
|
2
2
|
import { i as log, n as accent, t as renderCliDoc } from "./help-HviKaKAU.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import fs from "node:fs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { B as select, L as log, M as PackageManager, U as Ct, b as readYamlFile, y as editYamlFile } from "./agent-DTz-Dh1r.js";
|
|
2
2
|
import { g as YAMLSeq, y as Scalar } from "./browser-09BZLUYM.js";
|
|
3
|
-
import {
|
|
3
|
+
import { c as readJsonFile, l as writeJsonFile, o as editJsonFile, r as getScopeFromPackageName } from "./package-Y1UTfJnZ.js";
|
|
4
4
|
import path, { posix, win32 } from "node:path";
|
|
5
5
|
import * as actualFS from "node:fs";
|
|
6
6
|
import fs from "node:fs";
|
|
@@ -112,7 +112,7 @@ const ZED_SETTINGS = {
|
|
|
112
112
|
prettier: { allowed: false },
|
|
113
113
|
formatter: [{ language_server: { name: "oxfmt" } }]
|
|
114
114
|
},
|
|
115
|
-
Vue: {
|
|
115
|
+
"Vue.js": {
|
|
116
116
|
format_on_save: "on",
|
|
117
117
|
prettier: { allowed: false },
|
|
118
118
|
formatter: [{ language_server: { name: "oxfmt" } }]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as ansiStyles, n as eastAsianWidth, t as stripAnsi } from "./strip-ansi-
|
|
1
|
+
import { a as ansiStyles, n as eastAsianWidth, t as stripAnsi } from "./strip-ansi-CE-VDMdw.js";
|
|
2
2
|
//#region ../../node_modules/.pnpm/emoji-regex@10.6.0/node_modules/emoji-regex/index.mjs
|
|
3
3
|
var emoji_regex_default = () => {
|
|
4
4
|
return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Plugin as VitestPlugin } from '@voidzero-dev/vite-plus-test/config';
|
|
2
|
+
import type { OxfmtConfig } from 'oxfmt';
|
|
2
3
|
import type { OxlintConfig } from 'oxlint';
|
|
3
4
|
import { defineConfig } from './define-config.js';
|
|
4
|
-
import type { FormatOptions } from './oxfmt-config';
|
|
5
5
|
import type { PackUserConfig } from './pack';
|
|
6
6
|
import type { RunConfig } from './run-config';
|
|
7
7
|
import type { StagedConfig } from './staged-config';
|
|
@@ -11,7 +11,7 @@ declare module '@voidzero-dev/vite-plus-core' {
|
|
|
11
11
|
* Options for oxlint
|
|
12
12
|
*/
|
|
13
13
|
lint?: OxlintConfig;
|
|
14
|
-
fmt?:
|
|
14
|
+
fmt?: OxfmtConfig;
|
|
15
15
|
pack?: PackUserConfig | PackUserConfig[];
|
|
16
16
|
run?: RunConfig;
|
|
17
17
|
staged?: StagedConfig;
|
|
@@ -7,7 +7,7 @@ import { Scalar, YAMLMap, YAMLSeq } from 'yaml';
|
|
|
7
7
|
import { mergeJsonConfig, mergeTsdownConfig, rewriteEslint, rewritePrettier, rewriteScripts, rewriteImportsInDirectory, } from '../../binding/index.js';
|
|
8
8
|
import { PackageManager } from '../types/index.js';
|
|
9
9
|
import { runCommandSilently } from '../utils/command.js';
|
|
10
|
-
import { BASEURL_TSCONFIG_WARNING, VITE_PLUS_NAME, VITE_PLUS_OVERRIDE_PACKAGES, VITE_PLUS_VERSION, } from '../utils/constants.js';
|
|
10
|
+
import { BASEURL_TSCONFIG_WARNING, VITE_PLUS_NAME, VITE_PLUS_OVERRIDE_PACKAGES, VITE_PLUS_VERSION, isForceOverrideMode, } from '../utils/constants.js';
|
|
11
11
|
import { editJsonFile, isJsonFile, readJsonFile } from '../utils/json.js';
|
|
12
12
|
import { detectPackageMetadata } from '../utils/package.js';
|
|
13
13
|
import { displayRelative, rulesDir } from '../utils/path.js';
|
|
@@ -741,16 +741,31 @@ function rewriteRootWorkspacePackageJson(projectPath, packageManager, skipStaged
|
|
|
741
741
|
};
|
|
742
742
|
}
|
|
743
743
|
else if (packageManager === PackageManager.pnpm) {
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
744
|
+
if (isForceOverrideMode()) {
|
|
745
|
+
// In force-override mode, keep overrides in package.json pnpm.overrides
|
|
746
|
+
// because pnpm ignores pnpm-workspace.yaml overrides when pnpm.overrides
|
|
747
|
+
// exists in package.json (even with unrelated entries like rollup).
|
|
748
|
+
pkg.pnpm = {
|
|
749
|
+
...pkg.pnpm,
|
|
750
|
+
overrides: {
|
|
751
|
+
...pkg.pnpm?.overrides,
|
|
752
|
+
...VITE_PLUS_OVERRIDE_PACKAGES,
|
|
753
|
+
[VITE_PLUS_NAME]: VITE_PLUS_VERSION,
|
|
754
|
+
},
|
|
755
|
+
};
|
|
756
|
+
}
|
|
757
|
+
else {
|
|
758
|
+
// pnpm use overrides field at pnpm-workspace.yaml
|
|
759
|
+
// so we don't need to set overrides field at package.json
|
|
760
|
+
// remove packages from `resolutions` field and `pnpm.overrides` field if they exist
|
|
761
|
+
// https://pnpm.io/9.x/package_json#resolutions
|
|
762
|
+
for (const key of [...Object.keys(VITE_PLUS_OVERRIDE_PACKAGES), ...REMOVE_PACKAGES]) {
|
|
763
|
+
if (pkg.pnpm?.overrides?.[key]) {
|
|
764
|
+
delete pkg.pnpm.overrides[key];
|
|
765
|
+
}
|
|
766
|
+
if (pkg.resolutions?.[key]) {
|
|
767
|
+
delete pkg.resolutions[key];
|
|
768
|
+
}
|
|
754
769
|
}
|
|
755
770
|
}
|
|
756
771
|
// remove dependency selector from vite, e.g. "vite-plugin-svgr>vite": "npm:vite@7.0.12"
|
package/dist/pack-bin.js
CHANGED
|
@@ -104,7 +104,9 @@ cli
|
|
|
104
104
|
flags.envPrefix = DEFAULT_ENV_PREFIXES;
|
|
105
105
|
}
|
|
106
106
|
async function runBuild() {
|
|
107
|
-
const viteConfig = await resolveViteConfig(process.cwd()
|
|
107
|
+
const viteConfig = await resolveViteConfig(process.cwd(), {
|
|
108
|
+
traverseUp: flags.config !== false,
|
|
109
|
+
});
|
|
108
110
|
const configFiles = [];
|
|
109
111
|
if (viteConfig.configFile) {
|
|
110
112
|
configFiles.push(viteConfig.configFile);
|