vite-plus 0.2.1 → 0.2.3
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/bin/oxfmt +6 -3
- package/bin/oxlint +6 -3
- package/bin/vpr +9 -0
- package/binding/index.cjs +53 -53
- package/binding/index.d.cts +86 -144
- package/dist/agent-D3nZAMGI.js +9456 -0
- package/dist/bin.js +10 -7
- package/dist/{cli-truncate-CWsmbK3p.js → cli-truncate-BVOlIIPy.js} +1 -1
- package/dist/config/bin.js +2 -2
- package/dist/{constants-CrfJQIUX.js → constants-CZ7Mnq-C.js} +7 -3
- package/dist/create/bin.js +800 -806
- package/dist/{define-config-2tfJoXr1.d.ts → define-config-BuMs_LKa.d.ts} +64 -9
- package/dist/{define-config-DJUehepE.js → define-config-D2jo1xVA.js} +43 -18
- package/dist/{define-config-BGSjF6Xp.cjs → define-config-Dut6XD42.cjs} +61 -22
- package/dist/define-config.cjs +2 -1
- package/dist/define-config.d.ts +2 -2
- package/dist/define-config.js +2 -2
- package/dist/{dist-Oxo16Y0q.js → dist-CKz3vcoG.js} +4 -4
- package/dist/dist-CtM2JRbM.js +3 -0
- package/dist/editor-D1BZiU1h.js +584 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{json-Dn87fvjk.js → json-DiRs8ceZ.js} +13 -1
- package/dist/{log-update-lyIiuflf.js → log-update-DHZRyJ2m.js} +2 -2
- package/dist/migration/bin.d.ts +1 -10
- package/dist/migration/bin.js +531 -170
- package/dist/migration/compat/worker.d.ts +1 -0
- package/dist/migration/compat/worker.js +35 -0
- package/dist/{oxlint-plugin-config-q8a5PFch.js → oxlint-plugin-config-BSbv66Qn.js} +1 -1
- package/dist/oxlint-plugin.js +78 -9
- package/dist/pack-bin.js +1 -1
- package/dist/{package-BHirM1_v.js → package-Cpo2ei_V.js} +52 -3
- package/dist/protocol-D99W10Qi.js +4 -0
- package/dist/{report-BHSkWqRR.js → report-BS7ULx7A.js} +2 -0
- package/dist/{resolve-vite-config-CmdsfQzS.js → resolve-vite-config-DX2o0SWM.js} +14 -10
- package/dist/{rolldown-runtime-DnnnRqeS.js → rolldown-runtime-C7HZzL1F.js} +1 -1
- package/dist/staged/bin.js +23 -19
- package/dist/{tsconfig-BWQPmGKz.js → tsconfig-D6sTl0dN.js} +439 -208
- package/dist/version.js +2 -5
- package/dist/versions.js +5 -5
- package/dist/{wrap-ansi-k7Dn4VtV.js → wrap-ansi-DNjkuBEp.js} +1 -1
- package/dist/wrap-ansi-DUi52C6W.js +2 -0
- package/docs/_data/team.ts +9 -0
- package/docs/config/check.md +35 -0
- package/docs/config/index.md +2 -0
- package/docs/config/run.md +61 -12
- package/docs/guide/automatic-data-tracking.md +145 -0
- package/docs/guide/cache.md +14 -35
- package/docs/guide/check.md +16 -0
- package/docs/guide/ci.md +4 -0
- package/docs/guide/docker.md +175 -0
- package/docs/guide/env.md +13 -1
- package/docs/guide/github-actions-cache.md +165 -0
- package/docs/guide/install.md +12 -2
- package/docs/guide/migrate-rules.md +347 -0
- package/docs/guide/migrate.md +14 -0
- package/docs/guide/pack.md +8 -0
- package/docs/guide/run.md +33 -3
- package/docs/guide/troubleshooting.md +3 -3
- package/docs/guide/upgrade.md +43 -21
- package/docs/package.json +3 -2
- package/docs/vite.config.ts +17 -0
- package/package.json +19 -18
- package/dist/agent--cKmgD_n.js +0 -3341
- package/dist/compat-Cql3K40m.js +0 -14
- package/dist/dist-DRJUd9bL.js +0 -3
- package/dist/workspace-D0AVy4fu.js +0 -5830
- package/dist/wrap-ansi-CeQuiQ31.js +0 -2
|
@@ -17,13 +17,16 @@ interface CreateTemplateEntry {
|
|
|
17
17
|
}
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region src/run-config.d.ts
|
|
20
|
-
type
|
|
20
|
+
type AutoTracking = {
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* Enable automatic file tracking for this input or output list.
|
|
23
23
|
*/
|
|
24
24
|
auto: boolean;
|
|
25
25
|
};
|
|
26
26
|
type Command = string | Array<string>;
|
|
27
|
+
type DependencyType = "dependencies" | "devDependencies" | "peerDependencies";
|
|
28
|
+
type DependsOnEntry = string | UserPackageDependency;
|
|
29
|
+
type DependsOnFrom = DependencyType | Array<DependencyType>;
|
|
27
30
|
type GlobWithBase = {
|
|
28
31
|
/**
|
|
29
32
|
* The glob pattern (positive or negative starting with `!`)
|
|
@@ -45,9 +48,16 @@ type Task = {
|
|
|
45
48
|
*/
|
|
46
49
|
cwd?: string;
|
|
47
50
|
/**
|
|
48
|
-
*
|
|
51
|
+
* Tasks that must run before this task.
|
|
52
|
+
*
|
|
53
|
+
* - A string runs one named task, such as `"build"` in the same package or
|
|
54
|
+
* `"package-name#build"` in another package.
|
|
55
|
+
* - An object runs a task in direct workspace dependency packages selected
|
|
56
|
+
* from package.json fields. For example,
|
|
57
|
+
* `{ "task": "build", "from": "dependencies" }` runs `build` in each
|
|
58
|
+
* direct workspace dependency that defines a `build` task.
|
|
49
59
|
*/
|
|
50
|
-
dependsOn?: Array<
|
|
60
|
+
dependsOn?: Array<DependsOnEntry>;
|
|
51
61
|
} & ({
|
|
52
62
|
/**
|
|
53
63
|
* Whether to cache the task
|
|
@@ -71,16 +81,18 @@ type Task = {
|
|
|
71
81
|
* - `{auto: true}` enables automatic file tracking
|
|
72
82
|
* - Negative patterns (e.g. `"!dist/**"`) exclude matched files
|
|
73
83
|
*/
|
|
74
|
-
input?: Array<string | GlobWithBase |
|
|
84
|
+
input?: Array<string | GlobWithBase | AutoTracking>;
|
|
75
85
|
/**
|
|
76
|
-
* Output files to archive
|
|
86
|
+
* Output files to archive and restore on cache hit.
|
|
77
87
|
*
|
|
78
|
-
* - Omitted
|
|
88
|
+
* - Omitted: automatically tracks which files the task writes
|
|
89
|
+
* - `[]` (empty): disables output restoration entirely
|
|
79
90
|
* - Glob patterns (e.g. `"dist/**"`) select specific output files, relative to the package directory
|
|
80
91
|
* - `{pattern: "...", base: "workspace" | "package"}` specifies a glob with an explicit base directory
|
|
92
|
+
* - `{auto: true}` enables automatic output tracking
|
|
81
93
|
* - Negative patterns (e.g. `"!dist/cache/**"`) exclude matched files
|
|
82
94
|
*/
|
|
83
|
-
output?: Array<string | GlobWithBase>;
|
|
95
|
+
output?: Array<string | GlobWithBase | AutoTracking>;
|
|
84
96
|
} | {
|
|
85
97
|
/**
|
|
86
98
|
* Whether to cache the task
|
|
@@ -109,6 +121,16 @@ type UserGlobalCacheConfig = boolean | {
|
|
|
109
121
|
*/
|
|
110
122
|
tasks?: boolean;
|
|
111
123
|
};
|
|
124
|
+
type UserPackageDependency = {
|
|
125
|
+
/**
|
|
126
|
+
* Task name to run in dependency packages.
|
|
127
|
+
*/
|
|
128
|
+
task: string;
|
|
129
|
+
/**
|
|
130
|
+
* Package.json dependency field or fields to use when selecting direct dependency packages.
|
|
131
|
+
*/
|
|
132
|
+
from: DependsOnFrom;
|
|
133
|
+
};
|
|
112
134
|
type RunConfig = {
|
|
113
135
|
/**
|
|
114
136
|
* Root-level cache configuration.
|
|
@@ -155,6 +177,24 @@ declare module '@voidzero-dev/vite-plus-core' {
|
|
|
155
177
|
*/
|
|
156
178
|
lint?: OxlintConfig;
|
|
157
179
|
fmt?: OxfmtConfig;
|
|
180
|
+
/**
|
|
181
|
+
* Defaults for the `vp check` composite command. Each flag mirrors the
|
|
182
|
+
* matching CLI option (`--no-fmt` / `--no-lint`) and only affects
|
|
183
|
+
* `vp check`; standalone `vp fmt` / `vp lint` are unaffected.
|
|
184
|
+
*/
|
|
185
|
+
check?: {
|
|
186
|
+
/**
|
|
187
|
+
* Run the format step in `vp check`.
|
|
188
|
+
* @default true
|
|
189
|
+
*/
|
|
190
|
+
fmt?: boolean;
|
|
191
|
+
/**
|
|
192
|
+
* Run the lint step in `vp check`. Type-check still runs when both
|
|
193
|
+
* `lint.options.typeAware` and `lint.options.typeCheck` are enabled.
|
|
194
|
+
* @default true
|
|
195
|
+
*/
|
|
196
|
+
lint?: boolean;
|
|
197
|
+
};
|
|
158
198
|
pack?: PackUserConfig | PackUserConfig[];
|
|
159
199
|
run?: RunConfig;
|
|
160
200
|
staged?: StagedConfig;
|
|
@@ -299,7 +339,22 @@ declare function defineProject$1(config: UserWorkspaceConfig): UserWorkspaceConf
|
|
|
299
339
|
declare function defineProject$1(config: Promise<UserWorkspaceConfig>): Promise<UserWorkspaceConfig>;
|
|
300
340
|
declare function defineProject$1(config: UserProjectConfigFn): UserProjectConfigFn;
|
|
301
341
|
declare function defineProject$1(config: UserProjectConfigExport): UserProjectConfigExport;
|
|
342
|
+
/**
|
|
343
|
+
* Run a config-metadata resolution (a `resolveConfig` call that loads the
|
|
344
|
+
* user's config purely to read a non-plugin block) with the metadata marker
|
|
345
|
+
* set, so any `lazyPlugins` evaluated during it skips the plugin factory.
|
|
346
|
+
*
|
|
347
|
+
* The marker is scoped in time, not by command name: it is set only while at
|
|
348
|
+
* least one resolution is in flight (ref-counted so overlapping/nested
|
|
349
|
+
* resolutions compose) and the prior value is restored afterwards. By the time
|
|
350
|
+
* the task runner spawns a child (a verbatim `vp run` build, a `vp exec`
|
|
351
|
+
* child), the marker is already gone, so those builds correctly load plugins.
|
|
352
|
+
* Keying on the resolution itself — rather than guessing from the command
|
|
353
|
+
* name — also means command aliases (`vp format`) and not-yet-known commands
|
|
354
|
+
* all load plugins.
|
|
355
|
+
*/
|
|
356
|
+
declare function withConfigMetadataResolution<T>(fn: () => Promise<T>): Promise<T>;
|
|
302
357
|
declare function lazyPlugins(cb: () => PluginOption[]): PluginOption[] | undefined;
|
|
303
358
|
declare function lazyPlugins(cb: () => Promise<PluginOption[]>): PluginOption[] | undefined;
|
|
304
359
|
//#endregion
|
|
305
|
-
export { defineConfig$1 as a, lazyPlugins as c, computeAutoInlineList as i, resolveCoverageProviderToCheck as l, assertCoverageProviderVersionMatch as n, defineProject$1 as o, checkCoverageProviderVersion as r, isVitestFamilySpecifier as s, AUTO_INLINE_DEPS as t };
|
|
360
|
+
export { defineConfig$1 as a, lazyPlugins as c, computeAutoInlineList as i, resolveCoverageProviderToCheck as l, assertCoverageProviderVersionMatch as n, defineProject$1 as o, checkCoverageProviderVersion as r, isVitestFamilySpecifier as s, AUTO_INLINE_DEPS as t, withConfigMetadataResolution as u };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { o as VITEST_VERSION, r as CONFIG_METADATA_ENV } from "./constants-CZ7Mnq-C.js";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { readFileSync } from "node:fs";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
6
|
import { defineConfig, defineProject } from "vitest/config";
|
|
7
|
-
//#region ../../node_modules/.pnpm/tsdown@0.22.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.3_@tsdown+exe@0.22.3_@
|
|
7
|
+
//#region ../../node_modules/.pnpm/tsdown@0.22.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.3_@tsdown+exe@0.22.3_@type_b3805a6765df28d505319221a7193e18/node_modules/tsdown/esm-shims.js
|
|
8
8
|
const getFilename = () => fileURLToPath(import.meta.url);
|
|
9
9
|
const getDirname = () => path.dirname(getFilename());
|
|
10
10
|
const __dirname = /* @__PURE__ */ getDirname();
|
|
@@ -215,7 +215,7 @@ function vitePlusAutoInlineMatcherPlugin() {
|
|
|
215
215
|
};
|
|
216
216
|
}
|
|
217
217
|
/** Coverage providers vite-plus can version-check against the bundled runner. */
|
|
218
|
-
const KNOWN_COVERAGE_PROVIDERS = new Set(["v8", "istanbul"]);
|
|
218
|
+
const KNOWN_COVERAGE_PROVIDERS = /* @__PURE__ */ new Set(["v8", "istanbul"]);
|
|
219
219
|
/**
|
|
220
220
|
* Resolve the coverage provider package name that should be version-checked, or
|
|
221
221
|
* `null` when no check applies (coverage off, or a `custom`/unknown provider
|
|
@@ -417,29 +417,54 @@ function defineConfig$1(config) {
|
|
|
417
417
|
* [[injectPluginIntoConfig]] does).
|
|
418
418
|
*/
|
|
419
419
|
function injectPluginIntoProjectExport(config) {
|
|
420
|
-
if (typeof config === "function") return (
|
|
420
|
+
if (typeof config === "function") return (env) => {
|
|
421
421
|
const result = config(env);
|
|
422
422
|
return result instanceof Promise ? result.then(injectPluginIntoInlineConfig) : injectPluginIntoInlineConfig(result);
|
|
423
|
-
}
|
|
423
|
+
};
|
|
424
424
|
if (config instanceof Promise) return config.then(injectPluginIntoInlineConfig);
|
|
425
425
|
return injectPluginIntoInlineConfig(config);
|
|
426
426
|
}
|
|
427
427
|
function defineProject$1(config) {
|
|
428
428
|
return defineProject(injectPluginIntoProjectExport(config));
|
|
429
429
|
}
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
430
|
+
let configMetadataDepth = 0;
|
|
431
|
+
let configMetadataSavedValue;
|
|
432
|
+
/**
|
|
433
|
+
* Run a config-metadata resolution (a `resolveConfig` call that loads the
|
|
434
|
+
* user's config purely to read a non-plugin block) with the metadata marker
|
|
435
|
+
* set, so any `lazyPlugins` evaluated during it skips the plugin factory.
|
|
436
|
+
*
|
|
437
|
+
* The marker is scoped in time, not by command name: it is set only while at
|
|
438
|
+
* least one resolution is in flight (ref-counted so overlapping/nested
|
|
439
|
+
* resolutions compose) and the prior value is restored afterwards. By the time
|
|
440
|
+
* the task runner spawns a child (a verbatim `vp run` build, a `vp exec`
|
|
441
|
+
* child), the marker is already gone, so those builds correctly load plugins.
|
|
442
|
+
* Keying on the resolution itself — rather than guessing from the command
|
|
443
|
+
* name — also means command aliases (`vp format`) and not-yet-known commands
|
|
444
|
+
* all load plugins.
|
|
445
|
+
*/
|
|
446
|
+
async function withConfigMetadataResolution(fn) {
|
|
447
|
+
if (configMetadataDepth === 0) {
|
|
448
|
+
configMetadataSavedValue = process.env[CONFIG_METADATA_ENV];
|
|
449
|
+
process.env[CONFIG_METADATA_ENV] = "1";
|
|
442
450
|
}
|
|
451
|
+
configMetadataDepth++;
|
|
452
|
+
try {
|
|
453
|
+
return await fn();
|
|
454
|
+
} finally {
|
|
455
|
+
configMetadataDepth--;
|
|
456
|
+
if (configMetadataDepth === 0) {
|
|
457
|
+
if (configMetadataSavedValue === void 0) delete process.env[CONFIG_METADATA_ENV];
|
|
458
|
+
else process.env[CONFIG_METADATA_ENV] = configMetadataSavedValue;
|
|
459
|
+
configMetadataSavedValue = void 0;
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
function lazyPlugins(cb) {
|
|
464
|
+
if (process.env["VP_RESOLVING_CONFIG_METADATA"] === "1") return;
|
|
465
|
+
const result = cb();
|
|
466
|
+
if (result instanceof Promise) return [result];
|
|
467
|
+
return result;
|
|
443
468
|
}
|
|
444
469
|
//#endregion
|
|
445
|
-
export { defineConfig$1 as a, lazyPlugins as c, computeAutoInlineList as i, resolveCoverageProviderToCheck as l, assertCoverageProviderVersionMatch as n, defineProject$1 as o, checkCoverageProviderVersion as r, isVitestFamilySpecifier as s, AUTO_INLINE_DEPS as t };
|
|
470
|
+
export { defineConfig$1 as a, lazyPlugins as c, computeAutoInlineList as i, resolveCoverageProviderToCheck as l, assertCoverageProviderVersionMatch as n, defineProject$1 as o, checkCoverageProviderVersion as r, isVitestFamilySpecifier as s, AUTO_INLINE_DEPS as t, withConfigMetadataResolution as u };
|
|
@@ -3,7 +3,14 @@ var __defProp = Object.defineProperty;
|
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __esmMin = (fn, res) => () =>
|
|
6
|
+
var __esmMin = (fn, res, err) => () => {
|
|
7
|
+
if (err) throw err[0];
|
|
8
|
+
try {
|
|
9
|
+
return fn && (res = fn(fn = 0)), res;
|
|
10
|
+
} catch (e) {
|
|
11
|
+
throw err = [e], e;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
7
14
|
var __exportAll = (all, no_symbols) => {
|
|
8
15
|
let target = {};
|
|
9
16
|
for (var name in all) __defProp(target, name, {
|
|
@@ -29,14 +36,15 @@ let node_fs = require("node:fs");
|
|
|
29
36
|
let node_module = require("node:module");
|
|
30
37
|
let node_url = require("node:url");
|
|
31
38
|
let vitest_config = require("vitest/config");
|
|
32
|
-
//#region
|
|
33
|
-
var VITEST_VERSION;
|
|
39
|
+
//#region package.json
|
|
40
|
+
var version = "0.2.3", VITE_PLUS_VERSION, VITEST_VERSION, CONFIG_METADATA_ENV;
|
|
34
41
|
var init_constants = __esmMin((() => {
|
|
35
|
-
process.env.VP_VERSION;
|
|
42
|
+
VITE_PLUS_VERSION = process.env.VP_VERSION || version;
|
|
36
43
|
VITEST_VERSION = "4.1.9";
|
|
37
|
-
process.env.VP_OVERRIDE_PACKAGES
|
|
44
|
+
process.env.VP_OVERRIDE_PACKAGES ? JSON.parse(process.env.VP_OVERRIDE_PACKAGES) : `${VITE_PLUS_VERSION}`;
|
|
38
45
|
(0, node_module.createRequire)(require("url").pathToFileURL(__filename).href);
|
|
39
46
|
process.versions.node, process.release.name;
|
|
47
|
+
CONFIG_METADATA_ENV = "VP_RESOLVING_CONFIG_METADATA";
|
|
40
48
|
}));
|
|
41
49
|
//#endregion
|
|
42
50
|
//#region src/define-config.ts
|
|
@@ -49,7 +57,8 @@ var define_config_exports = /* @__PURE__ */ __exportAll({
|
|
|
49
57
|
defineProject: () => defineProject,
|
|
50
58
|
isVitestFamilySpecifier: () => isVitestFamilySpecifier,
|
|
51
59
|
lazyPlugins: () => lazyPlugins,
|
|
52
|
-
resolveCoverageProviderToCheck: () => resolveCoverageProviderToCheck
|
|
60
|
+
resolveCoverageProviderToCheck: () => resolveCoverageProviderToCheck,
|
|
61
|
+
withConfigMetadataResolution: () => withConfigMetadataResolution
|
|
53
62
|
});
|
|
54
63
|
function getVitestAnchor() {
|
|
55
64
|
if (vitestAnchor !== void 0) return vitestAnchor;
|
|
@@ -376,25 +385,54 @@ function defineConfig(config) {
|
|
|
376
385
|
* [[injectPluginIntoConfig]] does).
|
|
377
386
|
*/
|
|
378
387
|
function injectPluginIntoProjectExport(config) {
|
|
379
|
-
if (typeof config === "function") return (
|
|
388
|
+
if (typeof config === "function") return (env) => {
|
|
380
389
|
const result = config(env);
|
|
381
390
|
return result instanceof Promise ? result.then(injectPluginIntoInlineConfig) : injectPluginIntoInlineConfig(result);
|
|
382
|
-
}
|
|
391
|
+
};
|
|
383
392
|
if (config instanceof Promise) return config.then(injectPluginIntoInlineConfig);
|
|
384
393
|
return injectPluginIntoInlineConfig(config);
|
|
385
394
|
}
|
|
386
395
|
function defineProject(config) {
|
|
387
396
|
return (0, vitest_config.defineProject)(injectPluginIntoProjectExport(config));
|
|
388
397
|
}
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
398
|
+
/**
|
|
399
|
+
* Run a config-metadata resolution (a `resolveConfig` call that loads the
|
|
400
|
+
* user's config purely to read a non-plugin block) with the metadata marker
|
|
401
|
+
* set, so any `lazyPlugins` evaluated during it skips the plugin factory.
|
|
402
|
+
*
|
|
403
|
+
* The marker is scoped in time, not by command name: it is set only while at
|
|
404
|
+
* least one resolution is in flight (ref-counted so overlapping/nested
|
|
405
|
+
* resolutions compose) and the prior value is restored afterwards. By the time
|
|
406
|
+
* the task runner spawns a child (a verbatim `vp run` build, a `vp exec`
|
|
407
|
+
* child), the marker is already gone, so those builds correctly load plugins.
|
|
408
|
+
* Keying on the resolution itself — rather than guessing from the command
|
|
409
|
+
* name — also means command aliases (`vp format`) and not-yet-known commands
|
|
410
|
+
* all load plugins.
|
|
411
|
+
*/
|
|
412
|
+
async function withConfigMetadataResolution(fn) {
|
|
413
|
+
if (configMetadataDepth === 0) {
|
|
414
|
+
configMetadataSavedValue = process.env[CONFIG_METADATA_ENV];
|
|
415
|
+
process.env[CONFIG_METADATA_ENV] = "1";
|
|
395
416
|
}
|
|
417
|
+
configMetadataDepth++;
|
|
418
|
+
try {
|
|
419
|
+
return await fn();
|
|
420
|
+
} finally {
|
|
421
|
+
configMetadataDepth--;
|
|
422
|
+
if (configMetadataDepth === 0) {
|
|
423
|
+
if (configMetadataSavedValue === void 0) delete process.env[CONFIG_METADATA_ENV];
|
|
424
|
+
else process.env[CONFIG_METADATA_ENV] = configMetadataSavedValue;
|
|
425
|
+
configMetadataSavedValue = void 0;
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
function lazyPlugins(cb) {
|
|
430
|
+
if (process.env["VP_RESOLVING_CONFIG_METADATA"] === "1") return;
|
|
431
|
+
const result = cb();
|
|
432
|
+
if (result instanceof Promise) return [result];
|
|
433
|
+
return result;
|
|
396
434
|
}
|
|
397
|
-
var vitePlusRequire, vitePlusModuleFile, vitestAnchor, AUTO_INLINE_DEPS, KNOWN_COVERAGE_PROVIDERS, bundledVitestAnchorCache, coverageGuardedVitestInstances,
|
|
435
|
+
var vitePlusRequire, vitePlusModuleFile, vitestAnchor, AUTO_INLINE_DEPS, KNOWN_COVERAGE_PROVIDERS, bundledVitestAnchorCache, coverageGuardedVitestInstances, configMetadataDepth, configMetadataSavedValue;
|
|
398
436
|
var init_define_config = __esmMin((() => {
|
|
399
437
|
init_constants();
|
|
400
438
|
vitePlusRequire = (0, node_module.createRequire)(typeof __dirname !== "undefined" ? __dirname : require("url").pathToFileURL(__filename).href);
|
|
@@ -404,14 +442,9 @@ var init_define_config = __esmMin((() => {
|
|
|
404
442
|
"@storybook/test",
|
|
405
443
|
"jest-extended"
|
|
406
444
|
];
|
|
407
|
-
KNOWN_COVERAGE_PROVIDERS = new Set(["v8", "istanbul"]);
|
|
445
|
+
KNOWN_COVERAGE_PROVIDERS = /* @__PURE__ */ new Set(["v8", "istanbul"]);
|
|
408
446
|
coverageGuardedVitestInstances = /* @__PURE__ */ new WeakSet();
|
|
409
|
-
|
|
410
|
-
"dev",
|
|
411
|
-
"build",
|
|
412
|
-
"test",
|
|
413
|
-
"preview"
|
|
414
|
-
]);
|
|
447
|
+
configMetadataDepth = 0;
|
|
415
448
|
}));
|
|
416
449
|
//#endregion
|
|
417
450
|
Object.defineProperty(exports, "AUTO_INLINE_DEPS", {
|
|
@@ -486,3 +519,9 @@ Object.defineProperty(exports, "resolveCoverageProviderToCheck", {
|
|
|
486
519
|
return resolveCoverageProviderToCheck;
|
|
487
520
|
}
|
|
488
521
|
});
|
|
522
|
+
Object.defineProperty(exports, "withConfigMetadataResolution", {
|
|
523
|
+
enumerable: true,
|
|
524
|
+
get: function() {
|
|
525
|
+
return withConfigMetadataResolution;
|
|
526
|
+
}
|
|
527
|
+
});
|
package/dist/define-config.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_define_config = require("./define-config-
|
|
2
|
+
const require_define_config = require("./define-config-Dut6XD42.cjs");
|
|
3
3
|
require_define_config.init_define_config();
|
|
4
4
|
exports.AUTO_INLINE_DEPS = require_define_config.AUTO_INLINE_DEPS;
|
|
5
5
|
exports.assertCoverageProviderVersionMatch = require_define_config.assertCoverageProviderVersionMatch;
|
|
@@ -10,3 +10,4 @@ exports.defineProject = require_define_config.defineProject;
|
|
|
10
10
|
exports.isVitestFamilySpecifier = require_define_config.isVitestFamilySpecifier;
|
|
11
11
|
exports.lazyPlugins = require_define_config.lazyPlugins;
|
|
12
12
|
exports.resolveCoverageProviderToCheck = require_define_config.resolveCoverageProviderToCheck;
|
|
13
|
+
exports.withConfigMetadataResolution = require_define_config.withConfigMetadataResolution;
|
package/dist/define-config.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as defineConfig, c as lazyPlugins, i as computeAutoInlineList, l as resolveCoverageProviderToCheck, n as assertCoverageProviderVersionMatch, o as defineProject, r as checkCoverageProviderVersion, s as isVitestFamilySpecifier, t as AUTO_INLINE_DEPS } from "./define-config-
|
|
2
|
-
export { AUTO_INLINE_DEPS, assertCoverageProviderVersionMatch, checkCoverageProviderVersion, computeAutoInlineList, defineConfig, defineProject, isVitestFamilySpecifier, lazyPlugins, resolveCoverageProviderToCheck };
|
|
1
|
+
import { a as defineConfig, c as lazyPlugins, i as computeAutoInlineList, l as resolveCoverageProviderToCheck, n as assertCoverageProviderVersionMatch, o as defineProject, r as checkCoverageProviderVersion, s as isVitestFamilySpecifier, t as AUTO_INLINE_DEPS, u as withConfigMetadataResolution } from "./define-config-BuMs_LKa.js";
|
|
2
|
+
export { AUTO_INLINE_DEPS, assertCoverageProviderVersionMatch, checkCoverageProviderVersion, computeAutoInlineList, defineConfig, defineProject, isVitestFamilySpecifier, lazyPlugins, resolveCoverageProviderToCheck, withConfigMetadataResolution };
|
package/dist/define-config.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as defineConfig, c as lazyPlugins, i as computeAutoInlineList, l as resolveCoverageProviderToCheck, n as assertCoverageProviderVersionMatch, o as defineProject, r as checkCoverageProviderVersion, s as isVitestFamilySpecifier, t as AUTO_INLINE_DEPS } from "./define-config-
|
|
2
|
-
export { AUTO_INLINE_DEPS, assertCoverageProviderVersionMatch, checkCoverageProviderVersion, computeAutoInlineList, defineConfig, defineProject, isVitestFamilySpecifier, lazyPlugins, resolveCoverageProviderToCheck };
|
|
1
|
+
import { a as defineConfig, c as lazyPlugins, i as computeAutoInlineList, l as resolveCoverageProviderToCheck, n as assertCoverageProviderVersionMatch, o as defineProject, r as checkCoverageProviderVersion, s as isVitestFamilySpecifier, t as AUTO_INLINE_DEPS, u as withConfigMetadataResolution } from "./define-config-D2jo1xVA.js";
|
|
2
|
+
export { AUTO_INLINE_DEPS, assertCoverageProviderVersionMatch, checkCoverageProviderVersion, computeAutoInlineList, defineConfig, defineProject, isVitestFamilySpecifier, lazyPlugins, resolveCoverageProviderToCheck, withConfigMetadataResolution };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as __require, t as __commonJSMin } from "./rolldown-runtime-
|
|
1
|
+
import { n as __require, t as __commonJSMin } from "./rolldown-runtime-C7HZzL1F.js";
|
|
2
2
|
//#region ../../node_modules/.pnpm/yaml@2.9.0/node_modules/yaml/dist/nodes/identity.js
|
|
3
3
|
var require_identity = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4
4
|
const ALIAS = Symbol.for("yaml.alias");
|
|
@@ -779,7 +779,7 @@ var require_Collection = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
779
779
|
const a = [];
|
|
780
780
|
a[k] = v;
|
|
781
781
|
v = a;
|
|
782
|
-
} else v = new Map([[k, v]]);
|
|
782
|
+
} else v = /* @__PURE__ */ new Map([[k, v]]);
|
|
783
783
|
}
|
|
784
784
|
return createNode.createNode(v, void 0, {
|
|
785
785
|
aliasDuplicateObjects: false,
|
|
@@ -1338,7 +1338,7 @@ var require_stringify = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
1338
1338
|
if (ctx.resolvedAliases?.has(item)) throw new TypeError(`Cannot stringify circular structure without alias nodes`);
|
|
1339
1339
|
else {
|
|
1340
1340
|
if (ctx.resolvedAliases) ctx.resolvedAliases.add(item);
|
|
1341
|
-
else ctx.resolvedAliases = new Set([item]);
|
|
1341
|
+
else ctx.resolvedAliases = /* @__PURE__ */ new Set([item]);
|
|
1342
1342
|
item = item.resolve(ctx.doc);
|
|
1343
1343
|
}
|
|
1344
1344
|
}
|
|
@@ -2732,7 +2732,7 @@ var require_tags = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
2732
2732
|
var schema$2 = require_schema();
|
|
2733
2733
|
var set = require_set();
|
|
2734
2734
|
var timestamp = require_timestamp();
|
|
2735
|
-
const schemas = new Map([
|
|
2735
|
+
const schemas = /* @__PURE__ */ new Map([
|
|
2736
2736
|
["core", schema.schema],
|
|
2737
2737
|
["failsafe", [
|
|
2738
2738
|
map.map,
|