@vizejs/vite-plugin 0.429.1 → 0.429.2
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/dist/{editor-D3tfVb0Z.mjs → editor-Dtf01qrY.mjs} +9 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/internal/config-bridge.d.mts +1 -1
- package/dist/internal/vite-plus-task.mjs +1 -1
- package/dist/{plugin-DfwtlJyA.mjs → plugin-Bu9B_IUr.mjs} +45 -19
- package/dist/plugin-DZDCjcNO.mjs +2 -0
- package/dist/{runner-8x__0QxE.mjs → runner-Tb17R9ol.mjs} +46 -7
- package/dist/{types-CwtUr1uY.d.mts → types-VGJL5xEW.d.mts} +4 -0
- package/dist/vite-plus.d.mts +1 -1
- package/dist/vite-plus.mjs +5 -4
- package/package.json +6 -5
- package/dist/plugin-Cxx-XPU9.mjs +0 -2
|
@@ -28,7 +28,15 @@ function recommendEditor(source, extensions) {
|
|
|
28
28
|
};
|
|
29
29
|
if (extensions) {
|
|
30
30
|
if (parsed.recommendations !== void 0 && (!Array.isArray(parsed.recommendations) || !parsed.recommendations.every((value) => typeof value === "string"))) throw new Error("extensions.json recommendations must be a string array.");
|
|
31
|
-
const merged = [...
|
|
31
|
+
const merged = [...parsed.recommendations ?? []];
|
|
32
|
+
const seen = new Set(merged.map((id) => id.toLowerCase()));
|
|
33
|
+
for (const recommendation of recommendations) {
|
|
34
|
+
const id = recommendation.toLowerCase();
|
|
35
|
+
if (!seen.has(id)) {
|
|
36
|
+
merged.push(recommendation);
|
|
37
|
+
seen.add(id);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
32
40
|
if (JSON.stringify(merged) !== JSON.stringify(parsed.recommendations)) set(["recommendations"], merged);
|
|
33
41
|
} else for (const [keys, value] of defaults) if (keys.reduce((object, key) => object?.[key], parsed) === void 0) set(keys, value);
|
|
34
42
|
return result;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as VizeInspectorLintPlanProvider, c as VizeCompatibilityOptions, d as LoadConfigOptions, f as ResolvedVizeConfig, i as VizeVueFeatures, l as VizeVueVersion, m as UserConfigExport, n as CompiledModule, o as VizeInspectorLintPlanRequest, r as MacroArtifact, s as VizeInspectorOptions, t as VizeOptions, u as ConfigEnv, y as VizeConfig } from "./types-
|
|
1
|
+
import { a as VizeInspectorLintPlanProvider, c as VizeCompatibilityOptions, d as LoadConfigOptions, f as ResolvedVizeConfig, i as VizeVueFeatures, l as VizeVueVersion, m as UserConfigExport, n as CompiledModule, o as VizeInspectorLintPlanRequest, r as MacroArtifact, s as VizeInspectorOptions, t as VizeOptions, u as ConfigEnv, y as VizeConfig } from "./types-VGJL5xEW.mjs";
|
|
2
2
|
import { Plugin } from "vite";
|
|
3
3
|
|
|
4
4
|
//#region src/virtual.d.ts
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as rewriteStaticAssetUrls, t as vize } from "./plugin-
|
|
1
|
+
import { n as rewriteStaticAssetUrls, t as vize } from "./plugin-Bu9B_IUr.mjs";
|
|
2
2
|
import { a as vizeConfigStore, i as resolveConfigExport, n as defineConfig, r as loadConfig, t as VIZE_CONFIG_FILE_ENV } from "./config-PP6EAmWc.mjs";
|
|
3
3
|
//#region src/index.ts
|
|
4
4
|
const __internal = { rewriteStaticAssetUrls };
|
|
@@ -634,15 +634,11 @@ function generateOutputWithMap(compiled, options) {
|
|
|
634
634
|
} else if (hasExportDefault && hasSfcMainDefined) {
|
|
635
635
|
if (compiled.hasScoped && compiled.scopeId) emitted.edit(insertBeforeSfcMainDefaultExport(emitted.code, `_sfc_main.__scopeId = "data-v-${compiled.scopeId}";`, { moduleInfo }));
|
|
636
636
|
} else if (!hasExportDefault && !hasSfcMainDefined && hasNamedRenderExport) {
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
emitted.edit(`${emitted.code}\n_sfc_main.render = render;`);
|
|
640
|
-
emitted.edit(`${emitted.code}\nexport default _sfc_main;`);
|
|
637
|
+
const scope = compiled.hasScoped && compiled.scopeId ? `, __scopeId: "data-v-${compiled.scopeId}"` : "";
|
|
638
|
+
emitted.edit(`${emitted.code}\nconst _sfc_main = { render${scope} };\nexport default _sfc_main;`);
|
|
641
639
|
} else if (!hasExportDefault && !hasSfcMainDefined && hasNamedSsrRenderExport) {
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
emitted.edit(`${emitted.code}\n_sfc_main.ssrRender = ssrRender;`);
|
|
645
|
-
emitted.edit(`${emitted.code}\nexport default _sfc_main;`);
|
|
640
|
+
const scope = compiled.hasScoped && compiled.scopeId ? `, __scopeId: "data-v-${compiled.scopeId}"` : "";
|
|
641
|
+
emitted.edit(`${emitted.code}\nconst _sfc_main = { ssrRender${scope} };\nexport default _sfc_main;`);
|
|
646
642
|
}
|
|
647
643
|
if (usesStyleImports(compiled, options)) {
|
|
648
644
|
const styleImports = [];
|
|
@@ -915,6 +911,10 @@ function getCompileOptionsForRequest(state, ssr) {
|
|
|
915
911
|
if (state.mergedOptions?.experimentalSelfComponent) options.experimentalSelfComponent = true;
|
|
916
912
|
if (state.mergedOptions?.experimentalStrictSlotChildren) options.experimentalStrictSlotChildren = true;
|
|
917
913
|
if (state.mergedOptions?.experimentalServerScript) options.experimentalServerScript = true;
|
|
914
|
+
if (state.isProduction) {
|
|
915
|
+
options.isProd = true;
|
|
916
|
+
if (!ssr && options.mode !== "function") options.inlineTemplate = true;
|
|
917
|
+
}
|
|
918
918
|
return options;
|
|
919
919
|
}
|
|
920
920
|
function syncCollectedCssForFile(state, filePath, compiled) {
|
|
@@ -1057,6 +1057,8 @@ function buildCompileFileOptions(filePath, options) {
|
|
|
1057
1057
|
...options.templateComments === void 0 ? {} : { templateComments: options.templateComments },
|
|
1058
1058
|
...options.templateHoistStatic === void 0 ? {} : { templateHoistStatic: options.templateHoistStatic },
|
|
1059
1059
|
...options.templatePrefixIdentifiers === void 0 ? {} : { templatePrefixIdentifiers: options.templatePrefixIdentifiers },
|
|
1060
|
+
...options.inlineTemplate === void 0 ? {} : { inlineTemplate: options.inlineTemplate },
|
|
1061
|
+
...options.isProd === void 0 ? {} : { isProd: options.isProd },
|
|
1060
1062
|
...options.mode === void 0 ? {} : { mode: options.mode },
|
|
1061
1063
|
...options.templateSyntax === void 0 ? {} : { templateSyntax: options.templateSyntax },
|
|
1062
1064
|
...options.runtimeModuleName === void 0 ? {} : { runtimeModuleName: options.runtimeModuleName },
|
|
@@ -1085,6 +1087,8 @@ function buildCompileBatchOptions(options) {
|
|
|
1085
1087
|
...options.templateComments === void 0 ? {} : { templateComments: options.templateComments },
|
|
1086
1088
|
...options.templateHoistStatic === void 0 ? {} : { templateHoistStatic: options.templateHoistStatic },
|
|
1087
1089
|
...options.templatePrefixIdentifiers === void 0 ? {} : { templatePrefixIdentifiers: options.templatePrefixIdentifiers },
|
|
1090
|
+
...options.inlineTemplate === void 0 ? {} : { inlineTemplate: options.inlineTemplate },
|
|
1091
|
+
...options.isProd === void 0 ? {} : { isProd: options.isProd },
|
|
1088
1092
|
...options.mode === void 0 ? {} : { mode: options.mode },
|
|
1089
1093
|
...options.templateSyntax === void 0 ? {} : { templateSyntax: options.templateSyntax },
|
|
1090
1094
|
...options.runtimeModuleName === void 0 ? {} : { runtimeModuleName: options.runtimeModuleName },
|
|
@@ -1331,7 +1335,7 @@ function resolveCompilerIdentity() {
|
|
|
1331
1335
|
*/
|
|
1332
1336
|
function computePrecompileCacheKey(compileOptions) {
|
|
1333
1337
|
const material = stableStringify({
|
|
1334
|
-
format:
|
|
1338
|
+
format: 4,
|
|
1335
1339
|
compiler: resolveCompilerIdentity(),
|
|
1336
1340
|
options: compileOptions
|
|
1337
1341
|
});
|
|
@@ -1450,7 +1454,7 @@ function encodePrecompileManifest(options) {
|
|
|
1450
1454
|
const indexBody = compressBody(Buffer.from(JSON.stringify(index), "utf8"));
|
|
1451
1455
|
const payloadBody = compressBody(Buffer.concat(records));
|
|
1452
1456
|
const header = Buffer.from(JSON.stringify({
|
|
1453
|
-
format:
|
|
1457
|
+
format: 4,
|
|
1454
1458
|
key,
|
|
1455
1459
|
codec: hasZstd ? "zstd" : "gzip",
|
|
1456
1460
|
index: indexBody.length,
|
|
@@ -1526,7 +1530,7 @@ function decodePrecompileManifest(bytes, options) {
|
|
|
1526
1530
|
return reject("unparsable header");
|
|
1527
1531
|
}
|
|
1528
1532
|
if (typeof header !== "object" || header === null || Array.isArray(header)) return reject("unrecognized header");
|
|
1529
|
-
if (header.format !==
|
|
1533
|
+
if (header.format !== 4 || header.key !== key) return reject("foreign format or key");
|
|
1530
1534
|
if (!isByteLength(header.index) || !isByteLength(header.payload)) return reject("unrecognized body lengths");
|
|
1531
1535
|
const indexStart = headerEnd + 1;
|
|
1532
1536
|
const payloadStart = indexStart + header.index;
|
|
@@ -1763,7 +1767,9 @@ function resolvePrecompileBatchOptions(state) {
|
|
|
1763
1767
|
templateCacheHandlers: requestOptions.templateCacheHandlers,
|
|
1764
1768
|
templateComments: requestOptions.templateComments,
|
|
1765
1769
|
templateHoistStatic: requestOptions.templateHoistStatic,
|
|
1766
|
-
templatePrefixIdentifiers: requestOptions.templatePrefixIdentifiers
|
|
1770
|
+
templatePrefixIdentifiers: requestOptions.templatePrefixIdentifiers,
|
|
1771
|
+
inlineTemplate: requestOptions.inlineTemplate,
|
|
1772
|
+
isProd: requestOptions.isProd
|
|
1767
1773
|
};
|
|
1768
1774
|
}
|
|
1769
1775
|
function openCacheForRun(state, batchOptions) {
|
|
@@ -1878,7 +1884,8 @@ async function compileAll(state) {
|
|
|
1878
1884
|
if (metadata) state.precompileMetadata.set(fileResult.path, metadata);
|
|
1879
1885
|
const compiled = state.cache.get(fileResult.path);
|
|
1880
1886
|
const sourceHash = sourceHashes.get(fileResult.path);
|
|
1881
|
-
if (
|
|
1887
|
+
if (fileResult.warnings.length > 0) cache.delete(fileResult.path);
|
|
1888
|
+
else if (compiled && sourceHash !== void 0) cache.set(fileResult.path, sourceHash, compiled);
|
|
1882
1889
|
syncCollectedCssForFile({
|
|
1883
1890
|
...state,
|
|
1884
1891
|
extractCss: state.extractCss && !isPluginVueCustomElement(state.mergedOptions, fileResult.path)
|
|
@@ -2060,6 +2067,27 @@ async function resolveRelativeVueSfcImport(ctx, state, id, cleanImporter, isSsrR
|
|
|
2060
2067
|
return isDependencyScan ? resolvedPath : toPluginVisibleVirtualId(resolvedPath, isSsrRequest, effectiveQuery);
|
|
2061
2068
|
}
|
|
2062
2069
|
//#endregion
|
|
2070
|
+
//#region src/plugin/tree-shaking.ts
|
|
2071
|
+
/** Template-only client output has no authored top-level script effects. */
|
|
2072
|
+
function isPureTemplateOnlyModule(compiled) {
|
|
2073
|
+
const shape = compiled?.moduleShape;
|
|
2074
|
+
return !!(shape?.hasNamedRenderExport && !shape.hasDefaultExport && !shape.hasSfcMainDefined);
|
|
2075
|
+
}
|
|
2076
|
+
function resolveTemplateOnlySfcId(state, source, isSsr, querySuffix) {
|
|
2077
|
+
const id = toPluginVisibleVirtualId(source, isSsr, querySuffix);
|
|
2078
|
+
return state.isProduction && !isSsr && isPureTemplateOnlyModule(state.cache.get(source)) ? {
|
|
2079
|
+
id,
|
|
2080
|
+
moduleSideEffects: false
|
|
2081
|
+
} : id;
|
|
2082
|
+
}
|
|
2083
|
+
function loadedSfcModule(code, map, isProduction, isSsr, compiled) {
|
|
2084
|
+
return {
|
|
2085
|
+
code,
|
|
2086
|
+
map,
|
|
2087
|
+
...isProduction && !isSsr && isPureTemplateOnlyModule(compiled) ? { moduleSideEffects: false } : {}
|
|
2088
|
+
};
|
|
2089
|
+
}
|
|
2090
|
+
//#endregion
|
|
2063
2091
|
//#region src/plugin/resolve.ts
|
|
2064
2092
|
function resolveVuePath(state, id, importer) {
|
|
2065
2093
|
return resolveViteVuePath(state.root, id, importer);
|
|
@@ -2320,7 +2348,7 @@ function resolveProjectNuxtVuePeerRuntimeEntryWithNode(state, id) {
|
|
|
2320
2348
|
if (!nuxtPackageJson) return null;
|
|
2321
2349
|
const nuxtPackageRoot = path.dirname(splitViteIdQuery(nuxtPackageJson).request);
|
|
2322
2350
|
if (!resolveProjectLocalResolvedPath(state, nuxtPackageRoot)) return null;
|
|
2323
|
-
return resolveVuePeerRuntimeEntryFromBaseWithNode(state, id, path.join(nuxtPackageRoot, "package.json"));
|
|
2351
|
+
return resolveVuePeerRuntimeEntryFromBaseWithNode(state, id, path.join(state.root, "package.json")) ?? resolveVuePeerRuntimeEntryFromBaseWithNode(state, id, path.join(nuxtPackageRoot, "package.json"));
|
|
2324
2352
|
}
|
|
2325
2353
|
function isOptimizedVueDependency(id) {
|
|
2326
2354
|
const { request } = splitViteIdQuery(id);
|
|
@@ -2709,7 +2737,8 @@ async function resolveIdHook(ctx, state, id, importer, options) {
|
|
|
2709
2737
|
state.logger.log(`resolveId: id=${id}, resolved=${resolved}, hasCache=${hasCache}, fileExists=${fileExists}, importer=${importer ?? "none"}`);
|
|
2710
2738
|
if (hasCache || fileExists) {
|
|
2711
2739
|
if (preserveQueryAsPath) return `${resolved}${request.querySuffix}`;
|
|
2712
|
-
|
|
2740
|
+
if (isDependencyScan) return resolved;
|
|
2741
|
+
return resolveTemplateOnlySfcId(state, resolved, isSsrRequest, request.querySuffix);
|
|
2713
2742
|
}
|
|
2714
2743
|
}
|
|
2715
2744
|
return null;
|
|
@@ -3009,10 +3038,7 @@ function loadCompiledSfcModule(state, realPath, isSsr, currentBase, loadOptions)
|
|
|
3009
3038
|
rewritten.edit(rewriteStaticAssetUrls(rewritten.code, state.dynamicImportAliasRules));
|
|
3010
3039
|
rewritten.edit(rewriteImportMetaGlobBase(rewritten.code, realPath, state.root));
|
|
3011
3040
|
rewritten.edit(registerSfcModule(state, rewritten.code, realPath, isSsr));
|
|
3012
|
-
return
|
|
3013
|
-
code: rewritten.code,
|
|
3014
|
-
map: rewritten.map
|
|
3015
|
-
};
|
|
3041
|
+
return loadedSfcModule(rewritten.code, rewritten.map, state.isProduction, isSsr, compiled);
|
|
3016
3042
|
}
|
|
3017
3043
|
function loadDefinePageArtifact(state, realPath, ssr) {
|
|
3018
3044
|
return {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { i as resolveConfigExport, r as loadConfig } from "./config-PP6EAmWc.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
|
-
import { randomUUID } from "node:crypto";
|
|
3
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
4
4
|
import path from "node:path";
|
|
5
|
-
import { mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
5
|
+
import { mkdirSync, mkdtempSync, readFileSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
6
6
|
import { glob } from "tinyglobby";
|
|
7
7
|
import { spawn, spawnSync } from "node:child_process";
|
|
8
8
|
import os from "node:os";
|
|
@@ -27,11 +27,43 @@ function resolveVitePlus() {
|
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
29
|
const catalogs = /* @__PURE__ */ new Map();
|
|
30
|
+
function catalogCacheFile(binary) {
|
|
31
|
+
try {
|
|
32
|
+
const stat = statSync(binary);
|
|
33
|
+
const key = createHash("sha256").update(binary).update("\0").update(String(stat.mtimeMs)).update("\0").update(String(stat.size)).digest("hex");
|
|
34
|
+
return path.join(os.tmpdir(), "vize-oxlint-rules", `${key}.json`);
|
|
35
|
+
} catch {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
function readCatalogCache(file) {
|
|
40
|
+
if (!file) return void 0;
|
|
41
|
+
try {
|
|
42
|
+
const parsed = JSON.parse(readFileSync(file, "utf8"));
|
|
43
|
+
if (!Array.isArray(parsed) || parsed.some((rule) => typeof rule !== "string")) return void 0;
|
|
44
|
+
return new Set(parsed);
|
|
45
|
+
} catch {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
function writeCatalogCache(file, rules) {
|
|
50
|
+
if (!file) return;
|
|
51
|
+
try {
|
|
52
|
+
mkdirSync(path.dirname(file), { recursive: true });
|
|
53
|
+
writeFileSync(file, JSON.stringify([...rules].sort()), { mode: 384 });
|
|
54
|
+
} catch {}
|
|
55
|
+
}
|
|
30
56
|
/** Only disable rules supported by the consumer's bundled Oxlint. */
|
|
31
57
|
function availableVueRules() {
|
|
32
58
|
const { binary } = resolveVitePlus();
|
|
33
59
|
const cached = catalogs.get(binary);
|
|
34
60
|
if (cached) return cached;
|
|
61
|
+
const cacheFile = catalogCacheFile(binary);
|
|
62
|
+
const stored = readCatalogCache(cacheFile);
|
|
63
|
+
if (stored) {
|
|
64
|
+
catalogs.set(binary, stored);
|
|
65
|
+
return stored;
|
|
66
|
+
}
|
|
35
67
|
const directory = mkdtempSync(path.join(os.tmpdir(), "vize-oxlint-rules-"));
|
|
36
68
|
try {
|
|
37
69
|
writeFileSync(path.join(directory, "package.json"), "{\"name\":\"vize-rule-catalog\",\"private\":true}");
|
|
@@ -43,14 +75,20 @@ function availableVueRules() {
|
|
|
43
75
|
], {
|
|
44
76
|
cwd: directory,
|
|
45
77
|
encoding: "utf8",
|
|
46
|
-
timeout:
|
|
78
|
+
timeout: 6e4,
|
|
47
79
|
maxBuffer: 4 * 1024 * 1024
|
|
48
80
|
});
|
|
81
|
+
if (result.error && "code" in result.error && result.error.code === "ETIMEDOUT") {
|
|
82
|
+
const available = /* @__PURE__ */ new Set();
|
|
83
|
+
catalogs.set(binary, available);
|
|
84
|
+
return available;
|
|
85
|
+
}
|
|
49
86
|
if (result.error || result.status !== 0) throw new Error(`Cannot read installed Vite+ lint rules: ${result.error?.message ?? result.stderr}`);
|
|
50
87
|
const rules = JSON.parse(result.stdout);
|
|
51
88
|
if (!Array.isArray(rules)) throw new Error("Installed Vite+ returned an invalid lint rule catalog");
|
|
52
89
|
const available = new Set(rules.filter((rule) => rule.scope === "vue").map((rule) => rule.value));
|
|
53
90
|
catalogs.set(binary, available);
|
|
91
|
+
writeCatalogCache(cacheFile, available);
|
|
54
92
|
return available;
|
|
55
93
|
} finally {
|
|
56
94
|
rmSync(directory, {
|
|
@@ -106,10 +144,11 @@ async function runTools(task, args, metadata, vp, native, execute) {
|
|
|
106
144
|
})).filter((file) => file.endsWith(".vue"));
|
|
107
145
|
if (vue.length) await vize("fmt", [formatCheck ? "--check" : "--write", ...vue]);
|
|
108
146
|
}
|
|
109
|
-
|
|
147
|
+
const oxfmtPatterns = patterns.filter((pattern) => !pattern.endsWith(".vue"));
|
|
148
|
+
if (oxfmtPatterns.length || patterns.length === 0) await run(vp, [
|
|
110
149
|
"fmt",
|
|
111
150
|
formatCheck ? "--check" : "--write",
|
|
112
|
-
...
|
|
151
|
+
...oxfmtPatterns
|
|
113
152
|
]);
|
|
114
153
|
}
|
|
115
154
|
return status;
|
|
@@ -118,7 +157,7 @@ async function runTask(argv) {
|
|
|
118
157
|
const [task, ...rest] = argv;
|
|
119
158
|
const args = rest[0] === "--" ? rest.slice(1) : rest;
|
|
120
159
|
if (task === "editor:setup") {
|
|
121
|
-
const { setupEditor } = await import("./editor-
|
|
160
|
+
const { setupEditor } = await import("./editor-Dtf01qrY.mjs");
|
|
122
161
|
await setupEditor();
|
|
123
162
|
return 0;
|
|
124
163
|
}
|
|
@@ -182,7 +221,7 @@ async function runNative(command, argv, metadata, native = nativeBinary(), spawn
|
|
|
182
221
|
command
|
|
183
222
|
};
|
|
184
223
|
const config = metadata.config === void 0 ? await loadConfig(process.cwd(), { env }) ?? {} : await resolveConfigExport(metadata.config, env);
|
|
185
|
-
const file = path.
|
|
224
|
+
const file = path.join(os.tmpdir(), `.vize-vp-${randomUUID()}.json`);
|
|
186
225
|
try {
|
|
187
226
|
await writeFile(file, JSON.stringify(config), {
|
|
188
227
|
flag: "wx",
|
|
@@ -333,6 +333,10 @@ interface TypeCheckerConfig {
|
|
|
333
333
|
* Reserved Corsa server count. The direct project-session runner currently supports only 1.
|
|
334
334
|
*/
|
|
335
335
|
servers?: number;
|
|
336
|
+
/**
|
|
337
|
+
* Hard bound in milliseconds for each editor Corsa request. Defaults to 60000; use a larger value for large cold projects.
|
|
338
|
+
*/
|
|
339
|
+
lspRequestTimeoutMs?: number;
|
|
336
340
|
}
|
|
337
341
|
/**
|
|
338
342
|
* Formatter options
|
package/dist/vite-plus.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as LinterConfig, g as FormatterConfig, h as CompilerConfig, m as UserConfigExport, p as UserConfig$1, t as VizeOptions, v as TypeCheckerConfig } from "./types-
|
|
1
|
+
import { _ as LinterConfig, g as FormatterConfig, h as CompilerConfig, m as UserConfigExport, p as UserConfig$1, t as VizeOptions, v as TypeCheckerConfig } from "./types-VGJL5xEW.mjs";
|
|
2
2
|
import { ConfigEnv, UserConfig, defineConfig as defineConfig$1 } from "vite-plus";
|
|
3
3
|
|
|
4
4
|
//#region src/vite-plus/types.d.ts
|
package/dist/vite-plus.mjs
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { i as resolveConfigExport, r as loadConfig } from "./config-PP6EAmWc.mjs";
|
|
2
2
|
import { t as mergeSharedConfig } from "./shared-config-dMxrrTkb.mjs";
|
|
3
|
-
import { a as sourceConfigKey, i as resolveVitePlus, o as taskConfigKey, r as availableVueRules, t as runNative } from "./runner-
|
|
3
|
+
import { a as sourceConfigKey, i as resolveVitePlus, o as taskConfigKey, r as availableVueRules, t as runNative } from "./runner-Tb17R9ol.mjs";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { readFileSync } from "node:fs";
|
|
7
7
|
import { fileURLToPath } from "node:url";
|
|
8
|
+
import os from "node:os";
|
|
8
9
|
import { readFile, rm, stat, writeFile } from "node:fs/promises";
|
|
9
10
|
import { parse } from "jsonc-parser";
|
|
10
11
|
//#region src/vite-plus/conflicts.ts
|
|
@@ -230,7 +231,7 @@ async function emitDeclarations(options, metadata) {
|
|
|
230
231
|
const errors = [];
|
|
231
232
|
const source = parse(await readFile(file, "utf8"), errors, { allowTrailingComma: true });
|
|
232
233
|
if (errors.length || !source || typeof source !== "object") throw new Error(`Invalid TypeScript config: ${file}`);
|
|
233
|
-
const temporary = path.join(
|
|
234
|
+
const temporary = path.join(os.tmpdir(), `.vize-vp-${randomUUID()}.json`);
|
|
234
235
|
copies.set(file, temporary);
|
|
235
236
|
const references = source.references ? await Promise.all(source.references.map(async (reference) => ({
|
|
236
237
|
...reference,
|
|
@@ -321,8 +322,8 @@ function defineConfig(config = {}, integration = {}) {
|
|
|
321
322
|
const { options } = metadata;
|
|
322
323
|
const plugins = compiler === false ? [...vp.plugins ?? []] : await withoutVueCompiler(vp.plugins ?? []);
|
|
323
324
|
if (compiler !== false) {
|
|
324
|
-
const { vize } = await import("./plugin-
|
|
325
|
-
plugins.
|
|
325
|
+
const { vize } = await import("./plugin-DZDCjcNO.mjs");
|
|
326
|
+
plugins.push(vize({
|
|
326
327
|
...compiler,
|
|
327
328
|
configMode: false,
|
|
328
329
|
config: metadata.config
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vizejs/vite-plugin",
|
|
3
|
-
"version": "0.429.
|
|
3
|
+
"version": "0.429.2",
|
|
4
4
|
"description": "High-performance native Vite plugin for Vue SFC compilation powered by Vize",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"compiler",
|
|
@@ -51,12 +51,12 @@
|
|
|
51
51
|
"access": "public"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@vizejs/native": "0.429.
|
|
55
|
-
"@vizejs/unplugin": "0.429.
|
|
54
|
+
"@vizejs/native": "0.429.2",
|
|
55
|
+
"@vizejs/unplugin": "0.429.2",
|
|
56
56
|
"jsonc-parser": "^3.3.1",
|
|
57
57
|
"oxc-parser": "0.144.0",
|
|
58
58
|
"tinyglobby": "0.2.17",
|
|
59
|
-
"vize": "0.429.
|
|
59
|
+
"vize": "0.429.2"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@types/node": "25.9.2",
|
|
@@ -89,7 +89,8 @@
|
|
|
89
89
|
"check": "vp check src vite.config.ts",
|
|
90
90
|
"check:fix": "vp check --fix src vite.config.ts",
|
|
91
91
|
"fmt": "vp fmt --write src vite.config.ts",
|
|
92
|
-
"test": "
|
|
92
|
+
"test": "node scripts/run-tests.mjs",
|
|
93
|
+
"test:prepared": "node scripts/run-tests.mjs --require-prepared && node src/test.ts && node --test src/vite-plus/*.test.ts",
|
|
93
94
|
"test:types:real-vite": "vp exec node type-tests/plugin-vue/check.mjs"
|
|
94
95
|
}
|
|
95
96
|
}
|
package/dist/plugin-Cxx-XPU9.mjs
DELETED