vite 6.0.3 → 6.0.5
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.
Potentially problematic release.
This version of vite might be problematic. Click here for more details.
- package/dist/client/client.mjs +4 -4
- package/dist/node/chunks/{dep-yUJfKD1i.js → dep-BZMjGe_U.js} +453 -195
- package/dist/node/chunks/{dep-CjE1AkI6.js → dep-CrWUFq3l.js} +1 -1
- package/dist/node/chunks/{dep-BiVmWRQp.js → dep-pSQn2Hds.js} +1 -1
- package/dist/node/cli.js +5 -5
- package/dist/node/index.d.ts +12 -7
- package/dist/node/index.js +2 -2
- package/dist/node/module-runner.js +2 -2
- package/dist/node-cjs/publicUtils.cjs +104 -66
- package/package.json +14 -13
@@ -1,4 +1,4 @@
|
|
1
|
-
import { O as commonjsGlobal, N as getDefaultExportFromCjs } from './dep-
|
1
|
+
import { O as commonjsGlobal, N as getDefaultExportFromCjs } from './dep-BZMjGe_U.js';
|
2
2
|
import require$$0$2 from 'fs';
|
3
3
|
import require$$0 from 'postcss';
|
4
4
|
import require$$0$1 from 'path';
|
package/dist/node/cli.js
CHANGED
@@ -2,7 +2,7 @@ import path from 'node:path';
|
|
2
2
|
import fs__default from 'node:fs';
|
3
3
|
import { performance } from 'node:perf_hooks';
|
4
4
|
import { EventEmitter } from 'events';
|
5
|
-
import { M as colors, G as createLogger, r as resolveConfig } from './chunks/dep-
|
5
|
+
import { M as colors, G as createLogger, r as resolveConfig } from './chunks/dep-BZMjGe_U.js';
|
6
6
|
import { VERSION } from './constants.js';
|
7
7
|
import 'node:fs/promises';
|
8
8
|
import 'node:url';
|
@@ -740,7 +740,7 @@ cli.command("[root]", "start dev server").alias("serve").alias("dev").option("--
|
|
740
740
|
`[boolean] force the optimizer to ignore the cache and re-bundle`
|
741
741
|
).action(async (root, options) => {
|
742
742
|
filterDuplicateOptions(options);
|
743
|
-
const { createServer } = await import('./chunks/dep-
|
743
|
+
const { createServer } = await import('./chunks/dep-BZMjGe_U.js').then(function (n) { return n.Q; });
|
744
744
|
try {
|
745
745
|
const server = await createServer({
|
746
746
|
root,
|
@@ -833,7 +833,7 @@ cli.command("build [root]", "build for production").option("--target <target>",
|
|
833
833
|
).option("-w, --watch", `[boolean] rebuilds when modules have changed on disk`).option("--app", `[boolean] same as \`builder: {}\``).action(
|
834
834
|
async (root, options) => {
|
835
835
|
filterDuplicateOptions(options);
|
836
|
-
const { createBuilder } = await import('./chunks/dep-
|
836
|
+
const { createBuilder } = await import('./chunks/dep-BZMjGe_U.js').then(function (n) { return n.R; });
|
837
837
|
const buildOptions = cleanGlobalCLIOptions(
|
838
838
|
cleanBuilderCLIOptions(options)
|
839
839
|
);
|
@@ -868,7 +868,7 @@ cli.command("optimize [root]", "pre-bundle dependencies").option(
|
|
868
868
|
).action(
|
869
869
|
async (root, options) => {
|
870
870
|
filterDuplicateOptions(options);
|
871
|
-
const { optimizeDeps } = await import('./chunks/dep-
|
871
|
+
const { optimizeDeps } = await import('./chunks/dep-BZMjGe_U.js').then(function (n) { return n.P; });
|
872
872
|
try {
|
873
873
|
const config = await resolveConfig(
|
874
874
|
{
|
@@ -894,7 +894,7 @@ ${e.stack}`),
|
|
894
894
|
cli.command("preview [root]", "locally preview production build").option("--host [host]", `[string] specify hostname`, { type: [convertHost] }).option("--port <port>", `[number] specify port`).option("--strictPort", `[boolean] exit if specified port is already in use`).option("--open [path]", `[boolean | string] open browser on startup`).option("--outDir <dir>", `[string] output directory (default: dist)`).action(
|
895
895
|
async (root, options) => {
|
896
896
|
filterDuplicateOptions(options);
|
897
|
-
const { preview } = await import('./chunks/dep-
|
897
|
+
const { preview } = await import('./chunks/dep-BZMjGe_U.js').then(function (n) { return n.S; });
|
898
898
|
try {
|
899
899
|
const server = await preview({
|
900
900
|
root,
|
package/dist/node/index.d.ts
CHANGED
@@ -1087,12 +1087,6 @@ declare class EnvironmentModuleGraph {
|
|
1087
1087
|
getModuleByEtag(etag: string): EnvironmentModuleNode | undefined;
|
1088
1088
|
}
|
1089
1089
|
|
1090
|
-
/**
|
1091
|
-
* Backward compatible ModuleNode and ModuleGraph with mixed nodes from both the client and ssr environments
|
1092
|
-
* It would be good to take the types names for the new EnvironmentModuleNode and EnvironmentModuleGraph but we can't
|
1093
|
-
* do that at this point without breaking to much code in the ecosystem.
|
1094
|
-
* We are going to deprecate these types and we can try to use them back in the future.
|
1095
|
-
*/
|
1096
1090
|
declare class ModuleNode {
|
1097
1091
|
_moduleGraph: ModuleGraph;
|
1098
1092
|
_clientModule: EnvironmentModuleNode | undefined;
|
@@ -1102,6 +1096,8 @@ declare class ModuleNode {
|
|
1102
1096
|
_set<T extends keyof EnvironmentModuleNode>(prop: T, value: EnvironmentModuleNode[T]): void;
|
1103
1097
|
_wrapModuleSet(prop: ModuleSetNames, module: EnvironmentModuleNode | undefined): Set<ModuleNode>;
|
1104
1098
|
_getModuleSetUnion(prop: 'importedModules' | 'importers'): Set<ModuleNode>;
|
1099
|
+
_getModuleInfoUnion(prop: 'info'): ModuleInfo | undefined;
|
1100
|
+
_getModuleObjectUnion(prop: 'meta'): Record<string, any> | undefined;
|
1105
1101
|
get url(): string;
|
1106
1102
|
set url(value: string);
|
1107
1103
|
get id(): string | null;
|
@@ -2780,6 +2776,11 @@ type Environment = DevEnvironment | BuildEnvironment | UnknownEnvironment;
|
|
2780
2776
|
*/
|
2781
2777
|
declare function perEnvironmentState<State>(initial: (environment: Environment) => State): (context: PluginContext) => State;
|
2782
2778
|
|
2779
|
+
type SkipInformation = {
|
2780
|
+
id: string;
|
2781
|
+
importer: string | undefined;
|
2782
|
+
plugin: Plugin;
|
2783
|
+
};
|
2783
2784
|
declare class EnvironmentPluginContainer {
|
2784
2785
|
environment: Environment;
|
2785
2786
|
plugins: Plugin[];
|
@@ -2809,7 +2810,9 @@ declare class EnvironmentPluginContainer {
|
|
2809
2810
|
resolveId(rawId: string, importer?: string | undefined, options?: {
|
2810
2811
|
attributes?: Record<string, string>;
|
2811
2812
|
custom?: CustomPluginOptions;
|
2813
|
+
/** @deprecated use `skipCalls` instead */
|
2812
2814
|
skip?: Set<Plugin>;
|
2815
|
+
skipCalls?: readonly SkipInformation[];
|
2813
2816
|
isEntry?: boolean;
|
2814
2817
|
}): Promise<PartialResolvedId | null>;
|
2815
2818
|
load(id: string): Promise<LoadResult | null>;
|
@@ -2840,7 +2843,9 @@ declare class PluginContainer {
|
|
2840
2843
|
resolveId(rawId: string, importer?: string, options?: {
|
2841
2844
|
attributes?: Record<string, string>;
|
2842
2845
|
custom?: CustomPluginOptions;
|
2846
|
+
/** @deprecated use `skipCalls` instead */
|
2843
2847
|
skip?: Set<Plugin>;
|
2848
|
+
skipCalls?: readonly SkipInformation[];
|
2844
2849
|
ssr?: boolean;
|
2845
2850
|
isEntry?: boolean;
|
2846
2851
|
}): Promise<PartialResolvedId | null>;
|
@@ -4102,4 +4107,4 @@ interface ManifestChunk {
|
|
4102
4107
|
dynamicImports?: string[];
|
4103
4108
|
}
|
4104
4109
|
|
4105
|
-
export { type Alias, type AliasOptions, type AnymatchFn, type AnymatchPattern, type AppType, type BindCLIShortcutsOptions, BuildEnvironment, type BuildEnvironmentOptions, type BuildOptions, type BuilderOptions, type CLIShortcut, type CSSModulesOptions, type CSSOptions, type CommonServerOptions, type ConfigEnv, Connect, type CorsOptions, type CorsOrigin, type DepOptimizationConfig, type DepOptimizationMetadata, type DepOptimizationOptions, DevEnvironment, type DevEnvironmentContext, type DevEnvironmentOptions, type ESBuildOptions, type ESBuildTransformResult, type Environment, EnvironmentModuleGraph, EnvironmentModuleNode, type EnvironmentOptions, type ExperimentalOptions, type ExportsData, FSWatcher, type FetchModuleOptions, type FileSystemServeOptions, type FilterPattern, type HMRBroadcaster, type HMRBroadcasterClient, type HMRChannel, type HTMLOptions, type HmrContext, type HmrOptions, type HookHandler, type HotChannel, type HotChannelClient, type HotChannelListener, type HotUpdateOptions, type HtmlTagDescriptor, HttpProxy, type HttpServer, type IndexHtmlTransform, type IndexHtmlTransformContext, type IndexHtmlTransformHook, type IndexHtmlTransformResult, type InlineConfig, type InternalResolveOptions, type JsonOptions, type LegacyOptions, type LessPreprocessorOptions, type LibraryFormats, type LibraryOptions, type LogErrorOptions, type LogLevel, type LogOptions, type LogType, type Logger, type LoggerOptions, type Manifest, type ManifestChunk, type MapToFunction, type AnymatchMatcher as Matcher, ModuleGraph, ModuleNode, type ModulePreloadOptions, type ModuleRunnerTransformOptions, type OptimizedDepInfo, type Plugin, PluginContainer, type PluginHookUtils, type PluginOption, type PreprocessCSSResult, type PreviewOptions, type PreviewServer, type PreviewServerHook, type ProxyOptions, type RenderBuiltAssetUrl, type ResolveFn, type ResolveModulePreloadDependenciesFn, type ResolveOptions, type ResolvedBuildEnvironmentOptions, type ResolvedBuildOptions, type ResolvedCSSOptions, type ResolvedConfig, type ResolvedDevEnvironmentOptions, type ResolvedModulePreloadOptions, type ResolvedPreviewOptions, type ResolvedSSROptions, type ResolvedServerOptions, type ResolvedServerUrls, type ResolvedUrl, type ResolvedWorkerOptions, type ResolverFunction, type ResolverObject, type RollupCommonJSOptions, type RollupDynamicImportVarsOptions, RunnableDevEnvironment, type RunnableDevEnvironmentContext, type SSROptions, type SSRTarget, type SassPreprocessorOptions, type SendOptions, type ServerHMRChannel, type ServerHook, type ServerHotChannel, type ServerModuleRunnerOptions, type ServerOptions, SplitVendorChunkCache, type SsrDepOptimizationConfig, type StylusPreprocessorOptions, Terser, type TerserOptions, type TransformOptions, type TransformResult, type UserConfig, type UserConfigExport, type UserConfigFn, type UserConfigFnObject, type UserConfigFnPromise, type ViteBuilder, type ViteDevServer, type WatchOptions, WebSocket, WebSocketAlias, type WebSocketClient, type WebSocketCustomListener, WebSocketServer, build, buildErrorMessage, createBuilder, createFilter, createIdResolver, createLogger, createRunnableDevEnvironment, createServer, createServerHotChannel, createServerModuleRunner, DEFAULT_CLIENT_CONDITIONS as defaultClientConditions, DEFAULT_CLIENT_MAIN_FIELDS as defaultClientMainFields, DEFAULT_SERVER_CONDITIONS as defaultServerConditions, DEFAULT_SERVER_MAIN_FIELDS as defaultServerMainFields, defineConfig, fetchModule, formatPostcssSourceMap, isCSSRequest, isFileLoadingAllowed, isFileServingAllowed, isRunnableDevEnvironment, loadConfigFromFile, loadEnv, mergeAlias, mergeConfig, ssrTransform as moduleRunnerTransform, normalizePath, optimizeDeps, perEnvironmentPlugin, perEnvironmentState, preprocessCSS, preview, resolveConfig, resolveEnvPrefix, rollupVersion, searchForWorkspaceRoot, send, sortUserPlugins, splitVendorChunk, splitVendorChunkPlugin, transformWithEsbuild, VERSION as version };
|
4110
|
+
export { type Alias, type AliasOptions, type AnymatchFn, type AnymatchPattern, type AppType, type BindCLIShortcutsOptions, BuildEnvironment, type BuildEnvironmentOptions, type BuildOptions, type BuilderOptions, type CLIShortcut, type CSSModulesOptions, type CSSOptions, type CommonServerOptions, type ConfigEnv, Connect, type CorsOptions, type CorsOrigin, type DepOptimizationConfig, type DepOptimizationMetadata, type DepOptimizationOptions, DevEnvironment, type DevEnvironmentContext, type DevEnvironmentOptions, type ESBuildOptions, type ESBuildTransformResult, type Environment, EnvironmentModuleGraph, EnvironmentModuleNode, type EnvironmentOptions, type ExperimentalOptions, type ExportsData, FSWatcher, type FetchModuleOptions, type FileSystemServeOptions, type FilterPattern, type HMRBroadcaster, type HMRBroadcasterClient, type HMRChannel, type HTMLOptions, type HmrContext, type HmrOptions, type HookHandler, type HotChannel, type HotChannelClient, type HotChannelListener, type HotUpdateOptions, type HtmlTagDescriptor, HttpProxy, type HttpServer, type IndexHtmlTransform, type IndexHtmlTransformContext, type IndexHtmlTransformHook, type IndexHtmlTransformResult, type InlineConfig, type InternalResolveOptions, type JsonOptions, type LegacyOptions, type LessPreprocessorOptions, type LibraryFormats, type LibraryOptions, type LogErrorOptions, type LogLevel, type LogOptions, type LogType, type Logger, type LoggerOptions, type Manifest, type ManifestChunk, type MapToFunction, type AnymatchMatcher as Matcher, ModuleGraph, ModuleNode, type ModulePreloadOptions, type ModuleRunnerTransformOptions, type OptimizedDepInfo, type Plugin, PluginContainer, type PluginHookUtils, type PluginOption, type PreprocessCSSResult, type PreviewOptions, type PreviewServer, type PreviewServerHook, type ProxyOptions, type RenderBuiltAssetUrl, type ResolveFn, type ResolveModulePreloadDependenciesFn, type ResolveOptions, type ResolvedBuildEnvironmentOptions, type ResolvedBuildOptions, type ResolvedCSSOptions, type ResolvedConfig, type ResolvedDevEnvironmentOptions, type ResolvedModulePreloadOptions, type ResolvedPreviewOptions, type ResolvedSSROptions, type ResolvedServerOptions, type ResolvedServerUrls, type ResolvedUrl, type ResolvedWorkerOptions, type ResolverFunction, type ResolverObject, type RollupCommonJSOptions, type RollupDynamicImportVarsOptions, RunnableDevEnvironment, type RunnableDevEnvironmentContext, type SSROptions, type SSRTarget, type SassPreprocessorOptions, type SendOptions, type ServerHMRChannel, type ServerHook, type ServerHotChannel, type ServerModuleRunnerOptions, type ServerOptions, type SkipInformation, SplitVendorChunkCache, type SsrDepOptimizationConfig, type StylusPreprocessorOptions, Terser, type TerserOptions, type TransformOptions, type TransformResult, type UserConfig, type UserConfigExport, type UserConfigFn, type UserConfigFnObject, type UserConfigFnPromise, type ViteBuilder, type ViteDevServer, type WatchOptions, WebSocket, WebSocketAlias, type WebSocketClient, type WebSocketCustomListener, WebSocketServer, build, buildErrorMessage, createBuilder, createFilter, createIdResolver, createLogger, createRunnableDevEnvironment, createServer, createServerHotChannel, createServerModuleRunner, DEFAULT_CLIENT_CONDITIONS as defaultClientConditions, DEFAULT_CLIENT_MAIN_FIELDS as defaultClientMainFields, DEFAULT_SERVER_CONDITIONS as defaultServerConditions, DEFAULT_SERVER_MAIN_FIELDS as defaultServerMainFields, defineConfig, fetchModule, formatPostcssSourceMap, isCSSRequest, isFileLoadingAllowed, isFileServingAllowed, isRunnableDevEnvironment, loadConfigFromFile, loadEnv, mergeAlias, mergeConfig, ssrTransform as moduleRunnerTransform, normalizePath, optimizeDeps, perEnvironmentPlugin, perEnvironmentState, preprocessCSS, preview, resolveConfig, resolveEnvPrefix, rollupVersion, searchForWorkspaceRoot, send, sortUserPlugins, splitVendorChunk, splitVendorChunkPlugin, transformWithEsbuild, VERSION as version };
|
package/dist/node/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
export { parseAst, parseAstAsync } from 'rollup/parseAst';
|
2
|
-
import { i as isInNodeModules, a as arraify } from './chunks/dep-
|
3
|
-
export { B as BuildEnvironment, D as DevEnvironment, f as build, m as buildErrorMessage, g as createBuilder, C as createFilter, h as createIdResolver, G as createLogger, n as createRunnableDevEnvironment, c as createServer, w as createServerHotChannel, v as createServerModuleRunner, d as defineConfig, u as fetchModule, j as formatPostcssSourceMap, J as isFileLoadingAllowed, I as isFileServingAllowed, q as isRunnableDevEnvironment, l as loadConfigFromFile, K as loadEnv, A as mergeAlias, z as mergeConfig, x as moduleRunnerTransform, y as normalizePath, o as optimizeDeps, p as perEnvironmentPlugin, b as perEnvironmentState, k as preprocessCSS, e as preview, r as resolveConfig, L as resolveEnvPrefix, E as rollupVersion, H as searchForWorkspaceRoot, F as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-
|
2
|
+
import { i as isInNodeModules, a as arraify } from './chunks/dep-BZMjGe_U.js';
|
3
|
+
export { B as BuildEnvironment, D as DevEnvironment, f as build, m as buildErrorMessage, g as createBuilder, C as createFilter, h as createIdResolver, G as createLogger, n as createRunnableDevEnvironment, c as createServer, w as createServerHotChannel, v as createServerModuleRunner, d as defineConfig, u as fetchModule, j as formatPostcssSourceMap, J as isFileLoadingAllowed, I as isFileServingAllowed, q as isRunnableDevEnvironment, l as loadConfigFromFile, K as loadEnv, A as mergeAlias, z as mergeConfig, x as moduleRunnerTransform, y as normalizePath, o as optimizeDeps, p as perEnvironmentPlugin, b as perEnvironmentState, k as preprocessCSS, e as preview, r as resolveConfig, L as resolveEnvPrefix, E as rollupVersion, H as searchForWorkspaceRoot, F as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-BZMjGe_U.js';
|
4
4
|
export { DEFAULT_CLIENT_CONDITIONS as defaultClientConditions, DEFAULT_CLIENT_MAIN_FIELDS as defaultClientMainFields, DEFAULT_SERVER_CONDITIONS as defaultServerConditions, DEFAULT_SERVER_MAIN_FIELDS as defaultServerMainFields, VERSION as version } from './constants.js';
|
5
5
|
export { version as esbuildVersion } from 'esbuild';
|
6
6
|
import 'node:fs';
|
@@ -580,8 +580,8 @@ const createInvokeableTransport = (transport) => {
|
|
580
580
|
const invokeId = data.id.slice(9), promise = rpcPromises.get(invokeId);
|
581
581
|
if (!promise) return;
|
582
582
|
promise.timeoutId && clearTimeout(promise.timeoutId), rpcPromises.delete(invokeId);
|
583
|
-
const {
|
584
|
-
|
583
|
+
const { error, result } = data.data;
|
584
|
+
error ? promise.reject(error) : promise.resolve(result);
|
585
585
|
return;
|
586
586
|
}
|
587
587
|
}
|
@@ -574,24 +574,62 @@ function requireCommon () {
|
|
574
574
|
createDebug.names = [];
|
575
575
|
createDebug.skips = [];
|
576
576
|
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
577
|
+
const split = (typeof namespaces === 'string' ? namespaces : '')
|
578
|
+
.trim()
|
579
|
+
.replace(' ', ',')
|
580
|
+
.split(',')
|
581
|
+
.filter(Boolean);
|
582
|
+
|
583
|
+
for (const ns of split) {
|
584
|
+
if (ns[0] === '-') {
|
585
|
+
createDebug.skips.push(ns.slice(1));
|
586
|
+
} else {
|
587
|
+
createDebug.names.push(ns);
|
585
588
|
}
|
589
|
+
}
|
590
|
+
}
|
586
591
|
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
592
|
+
/**
|
593
|
+
* Checks if the given string matches a namespace template, honoring
|
594
|
+
* asterisks as wildcards.
|
595
|
+
*
|
596
|
+
* @param {String} search
|
597
|
+
* @param {String} template
|
598
|
+
* @return {Boolean}
|
599
|
+
*/
|
600
|
+
function matchesTemplate(search, template) {
|
601
|
+
let searchIndex = 0;
|
602
|
+
let templateIndex = 0;
|
603
|
+
let starIndex = -1;
|
604
|
+
let matchIndex = 0;
|
605
|
+
|
606
|
+
while (searchIndex < search.length) {
|
607
|
+
if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) {
|
608
|
+
// Match character or proceed with wildcard
|
609
|
+
if (template[templateIndex] === '*') {
|
610
|
+
starIndex = templateIndex;
|
611
|
+
matchIndex = searchIndex;
|
612
|
+
templateIndex++; // Skip the '*'
|
613
|
+
} else {
|
614
|
+
searchIndex++;
|
615
|
+
templateIndex++;
|
616
|
+
}
|
617
|
+
} else if (starIndex !== -1) { // eslint-disable-line no-negated-condition
|
618
|
+
// Backtrack to the last '*' and try to match more characters
|
619
|
+
templateIndex = starIndex + 1;
|
620
|
+
matchIndex++;
|
621
|
+
searchIndex = matchIndex;
|
591
622
|
} else {
|
592
|
-
|
623
|
+
return false; // No match
|
593
624
|
}
|
594
625
|
}
|
626
|
+
|
627
|
+
// Handle trailing '*' in template
|
628
|
+
while (templateIndex < template.length && template[templateIndex] === '*') {
|
629
|
+
templateIndex++;
|
630
|
+
}
|
631
|
+
|
632
|
+
return templateIndex === template.length;
|
595
633
|
}
|
596
634
|
|
597
635
|
/**
|
@@ -602,8 +640,8 @@ function requireCommon () {
|
|
602
640
|
*/
|
603
641
|
function disable() {
|
604
642
|
const namespaces = [
|
605
|
-
...createDebug.names
|
606
|
-
...createDebug.skips.map(
|
643
|
+
...createDebug.names,
|
644
|
+
...createDebug.skips.map(namespace => '-' + namespace)
|
607
645
|
].join(',');
|
608
646
|
createDebug.enable('');
|
609
647
|
return namespaces;
|
@@ -617,21 +655,14 @@ function requireCommon () {
|
|
617
655
|
* @api public
|
618
656
|
*/
|
619
657
|
function enabled(name) {
|
620
|
-
|
621
|
-
|
622
|
-
}
|
623
|
-
|
624
|
-
let i;
|
625
|
-
let len;
|
626
|
-
|
627
|
-
for (i = 0, len = createDebug.skips.length; i < len; i++) {
|
628
|
-
if (createDebug.skips[i].test(name)) {
|
658
|
+
for (const skip of createDebug.skips) {
|
659
|
+
if (matchesTemplate(name, skip)) {
|
629
660
|
return false;
|
630
661
|
}
|
631
662
|
}
|
632
663
|
|
633
|
-
for (
|
634
|
-
if (
|
664
|
+
for (const ns of createDebug.names) {
|
665
|
+
if (matchesTemplate(name, ns)) {
|
635
666
|
return true;
|
636
667
|
}
|
637
668
|
}
|
@@ -639,19 +670,6 @@ function requireCommon () {
|
|
639
670
|
return false;
|
640
671
|
}
|
641
672
|
|
642
|
-
/**
|
643
|
-
* Convert regexp to namespace
|
644
|
-
*
|
645
|
-
* @param {RegExp} regxep
|
646
|
-
* @return {String} namespace
|
647
|
-
* @api private
|
648
|
-
*/
|
649
|
-
function toNamespace(regexp) {
|
650
|
-
return regexp.toString()
|
651
|
-
.substring(2, regexp.toString().length - 2)
|
652
|
-
.replace(/\.\*\?$/, '*');
|
653
|
-
}
|
654
|
-
|
655
673
|
/**
|
656
674
|
* Coerce `val`.
|
657
675
|
*
|
@@ -820,6 +838,7 @@ function requireBrowser () {
|
|
820
838
|
|
821
839
|
// Is webkit? http://stackoverflow.com/a/16459606/376773
|
822
840
|
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
|
841
|
+
// eslint-disable-next-line no-return-assign
|
823
842
|
return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
|
824
843
|
// Is firebug? http://stackoverflow.com/a/398120/376773
|
825
844
|
(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
|
@@ -3389,11 +3408,17 @@ const createFilter$1 = function createFilter(include, exclude, options) {
|
|
3389
3408
|
const pathId = normalizePath$1(id);
|
3390
3409
|
for (let i = 0; i < excludeMatchers.length; ++i) {
|
3391
3410
|
const matcher = excludeMatchers[i];
|
3411
|
+
if (matcher instanceof RegExp) {
|
3412
|
+
matcher.lastIndex = 0;
|
3413
|
+
}
|
3392
3414
|
if (matcher.test(pathId))
|
3393
3415
|
return false;
|
3394
3416
|
}
|
3395
3417
|
for (let i = 0; i < includeMatchers.length; ++i) {
|
3396
3418
|
const matcher = includeMatchers[i];
|
3419
|
+
if (matcher instanceof RegExp) {
|
3420
|
+
matcher.lastIndex = 0;
|
3421
|
+
}
|
3397
3422
|
if (matcher.test(pathId))
|
3398
3423
|
return true;
|
3399
3424
|
}
|
@@ -4362,7 +4387,7 @@ class Chunk {
|
|
4362
4387
|
// ' test'.trim()
|
4363
4388
|
// split -> ' ' + 'test'
|
4364
4389
|
// ✔️ edit -> '' + 'test'
|
4365
|
-
// ✖️ edit -> 'test' + ''
|
4390
|
+
// ✖️ edit -> 'test' + ''
|
4366
4391
|
// TODO is this block necessary?...
|
4367
4392
|
newChunk.edit('', false);
|
4368
4393
|
this.content = '';
|
@@ -4609,6 +4634,7 @@ class Mappings {
|
|
4609
4634
|
this.raw[this.generatedCodeLine] = this.rawSegments = [];
|
4610
4635
|
this.generatedCodeColumn = 0;
|
4611
4636
|
first = true;
|
4637
|
+
charInHiresBoundary = false;
|
4612
4638
|
} else {
|
4613
4639
|
if (this.hires || first || sourcemapLocations.has(originalCharIndex)) {
|
4614
4640
|
const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];
|
@@ -4686,6 +4712,7 @@ class MagicString {
|
|
4686
4712
|
storedNames: { writable: true, value: {} },
|
4687
4713
|
indentStr: { writable: true, value: undefined },
|
4688
4714
|
ignoreList: { writable: true, value: options.ignoreList },
|
4715
|
+
offset: { writable: true, value: options.offset || 0 },
|
4689
4716
|
});
|
4690
4717
|
|
4691
4718
|
this.byStart[0] = chunk;
|
@@ -4704,6 +4731,8 @@ class MagicString {
|
|
4704
4731
|
}
|
4705
4732
|
|
4706
4733
|
appendLeft(index, content) {
|
4734
|
+
index = index + this.offset;
|
4735
|
+
|
4707
4736
|
if (typeof content !== 'string') throw new TypeError('inserted content must be a string');
|
4708
4737
|
|
4709
4738
|
this._split(index);
|
@@ -4719,6 +4748,8 @@ class MagicString {
|
|
4719
4748
|
}
|
4720
4749
|
|
4721
4750
|
appendRight(index, content) {
|
4751
|
+
index = index + this.offset;
|
4752
|
+
|
4722
4753
|
if (typeof content !== 'string') throw new TypeError('inserted content must be a string');
|
4723
4754
|
|
4724
4755
|
this._split(index);
|
@@ -4734,7 +4765,7 @@ class MagicString {
|
|
4734
4765
|
}
|
4735
4766
|
|
4736
4767
|
clone() {
|
4737
|
-
const cloned = new MagicString(this.original, { filename: this.filename });
|
4768
|
+
const cloned = new MagicString(this.original, { filename: this.filename, offset: this.offset });
|
4738
4769
|
|
4739
4770
|
let originalChunk = this.firstChunk;
|
4740
4771
|
let clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone());
|
@@ -4932,7 +4963,7 @@ class MagicString {
|
|
4932
4963
|
if (!warned.insertLeft) {
|
4933
4964
|
console.warn(
|
4934
4965
|
'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead',
|
4935
|
-
);
|
4966
|
+
);
|
4936
4967
|
warned.insertLeft = true;
|
4937
4968
|
}
|
4938
4969
|
|
@@ -4943,7 +4974,7 @@ class MagicString {
|
|
4943
4974
|
if (!warned.insertRight) {
|
4944
4975
|
console.warn(
|
4945
4976
|
'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead',
|
4946
|
-
);
|
4977
|
+
);
|
4947
4978
|
warned.insertRight = true;
|
4948
4979
|
}
|
4949
4980
|
|
@@ -4951,6 +4982,10 @@ class MagicString {
|
|
4951
4982
|
}
|
4952
4983
|
|
4953
4984
|
move(start, end, index) {
|
4985
|
+
start = start + this.offset;
|
4986
|
+
end = end + this.offset;
|
4987
|
+
index = index + this.offset;
|
4988
|
+
|
4954
4989
|
if (index >= start && index <= end) throw new Error('Cannot move a selection inside itself');
|
4955
4990
|
|
4956
4991
|
this._split(start);
|
@@ -4993,6 +5028,9 @@ class MagicString {
|
|
4993
5028
|
}
|
4994
5029
|
|
4995
5030
|
update(start, end, content, options) {
|
5031
|
+
start = start + this.offset;
|
5032
|
+
end = end + this.offset;
|
5033
|
+
|
4996
5034
|
if (typeof content !== 'string') throw new TypeError('replacement content must be a string');
|
4997
5035
|
|
4998
5036
|
if (this.original.length !== 0) {
|
@@ -5013,7 +5051,7 @@ class MagicString {
|
|
5013
5051
|
if (!warned.storeName) {
|
5014
5052
|
console.warn(
|
5015
5053
|
'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string',
|
5016
|
-
);
|
5054
|
+
);
|
5017
5055
|
warned.storeName = true;
|
5018
5056
|
}
|
5019
5057
|
|
@@ -5064,6 +5102,8 @@ class MagicString {
|
|
5064
5102
|
}
|
5065
5103
|
|
5066
5104
|
prependLeft(index, content) {
|
5105
|
+
index = index + this.offset;
|
5106
|
+
|
5067
5107
|
if (typeof content !== 'string') throw new TypeError('inserted content must be a string');
|
5068
5108
|
|
5069
5109
|
this._split(index);
|
@@ -5079,6 +5119,8 @@ class MagicString {
|
|
5079
5119
|
}
|
5080
5120
|
|
5081
5121
|
prependRight(index, content) {
|
5122
|
+
index = index + this.offset;
|
5123
|
+
|
5082
5124
|
if (typeof content !== 'string') throw new TypeError('inserted content must be a string');
|
5083
5125
|
|
5084
5126
|
this._split(index);
|
@@ -5094,6 +5136,9 @@ class MagicString {
|
|
5094
5136
|
}
|
5095
5137
|
|
5096
5138
|
remove(start, end) {
|
5139
|
+
start = start + this.offset;
|
5140
|
+
end = end + this.offset;
|
5141
|
+
|
5097
5142
|
if (this.original.length !== 0) {
|
5098
5143
|
while (start < 0) start += this.original.length;
|
5099
5144
|
while (end < 0) end += this.original.length;
|
@@ -5120,6 +5165,9 @@ class MagicString {
|
|
5120
5165
|
}
|
5121
5166
|
|
5122
5167
|
reset(start, end) {
|
5168
|
+
start = start + this.offset;
|
5169
|
+
end = end + this.offset;
|
5170
|
+
|
5123
5171
|
if (this.original.length !== 0) {
|
5124
5172
|
while (start < 0) start += this.original.length;
|
5125
5173
|
while (end < 0) end += this.original.length;
|
@@ -5184,7 +5232,10 @@ class MagicString {
|
|
5184
5232
|
return this.intro + lineStr;
|
5185
5233
|
}
|
5186
5234
|
|
5187
|
-
slice(start = 0, end = this.original.length) {
|
5235
|
+
slice(start = 0, end = this.original.length - this.offset) {
|
5236
|
+
start = start + this.offset;
|
5237
|
+
end = end + this.offset;
|
5238
|
+
|
5188
5239
|
if (this.original.length !== 0) {
|
5189
5240
|
while (start < 0) start += this.original.length;
|
5190
5241
|
while (end < 0) end += this.original.length;
|
@@ -5420,11 +5471,7 @@ class MagicString {
|
|
5420
5471
|
if (match.index != null) {
|
5421
5472
|
const replacement = getReplacement(match, this.original);
|
5422
5473
|
if (replacement !== match[0]) {
|
5423
|
-
this.overwrite(
|
5424
|
-
match.index,
|
5425
|
-
match.index + match[0].length,
|
5426
|
-
replacement
|
5427
|
-
);
|
5474
|
+
this.overwrite(match.index, match.index + match[0].length, replacement);
|
5428
5475
|
}
|
5429
5476
|
}
|
5430
5477
|
});
|
@@ -5433,11 +5480,7 @@ class MagicString {
|
|
5433
5480
|
if (match && match.index != null) {
|
5434
5481
|
const replacement = getReplacement(match, this.original);
|
5435
5482
|
if (replacement !== match[0]) {
|
5436
|
-
this.overwrite(
|
5437
|
-
match.index,
|
5438
|
-
match.index + match[0].length,
|
5439
|
-
replacement
|
5440
|
-
);
|
5483
|
+
this.overwrite(match.index, match.index + match[0].length, replacement);
|
5441
5484
|
}
|
5442
5485
|
}
|
5443
5486
|
}
|
@@ -5472,8 +5515,7 @@ class MagicString {
|
|
5472
5515
|
index = original.indexOf(string, index + stringLength)
|
5473
5516
|
) {
|
5474
5517
|
const previous = original.slice(index, index + stringLength);
|
5475
|
-
if (previous !== replacement)
|
5476
|
-
this.overwrite(index, index + stringLength, replacement);
|
5518
|
+
if (previous !== replacement) this.overwrite(index, index + stringLength, replacement);
|
5477
5519
|
}
|
5478
5520
|
|
5479
5521
|
return this;
|
@@ -5760,7 +5802,7 @@ function isFileLoadingAllowed(config, filePath) {
|
|
5760
5802
|
var main$1 = {exports: {}};
|
5761
5803
|
|
5762
5804
|
var name = "dotenv";
|
5763
|
-
var version$1 = "16.4.
|
5805
|
+
var version$1 = "16.4.7";
|
5764
5806
|
var description = "Loads environment variables from .env file";
|
5765
5807
|
var main = "lib/main.js";
|
5766
5808
|
var types = "lib/main.d.ts";
|
@@ -5781,10 +5823,9 @@ var exports$1 = {
|
|
5781
5823
|
var scripts = {
|
5782
5824
|
"dts-check": "tsc --project tests/types/tsconfig.json",
|
5783
5825
|
lint: "standard",
|
5784
|
-
"lint-readme": "standard-markdown",
|
5785
5826
|
pretest: "npm run lint && npm run dts-check",
|
5786
|
-
test: "tap
|
5787
|
-
"test:coverage": "tap --coverage-report=lcov",
|
5827
|
+
test: "tap run --allow-empty-coverage --disable-coverage --timeout=60000",
|
5828
|
+
"test:coverage": "tap run --show-full-coverage --timeout=60000 --coverage-report=lcov",
|
5788
5829
|
prerelease: "npm test",
|
5789
5830
|
release: "standard-version"
|
5790
5831
|
};
|
@@ -5805,15 +5846,12 @@ var keywords = [
|
|
5805
5846
|
var readmeFilename = "README.md";
|
5806
5847
|
var license = "BSD-2-Clause";
|
5807
5848
|
var devDependencies = {
|
5808
|
-
"@definitelytyped/dtslint": "^0.0.133",
|
5809
5849
|
"@types/node": "^18.11.3",
|
5810
|
-
decache: "^4.6.
|
5850
|
+
decache: "^4.6.2",
|
5811
5851
|
sinon: "^14.0.1",
|
5812
5852
|
standard: "^17.0.0",
|
5813
|
-
"standard-markdown": "^7.1.0",
|
5814
5853
|
"standard-version": "^9.5.0",
|
5815
|
-
tap: "^
|
5816
|
-
tar: "^6.1.11",
|
5854
|
+
tap: "^19.2.0",
|
5817
5855
|
typescript: "^4.8.4"
|
5818
5856
|
};
|
5819
5857
|
var engines = {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "vite",
|
3
|
-
"version": "6.0.
|
3
|
+
"version": "6.0.5",
|
4
4
|
"type": "module",
|
5
5
|
"license": "MIT",
|
6
6
|
"author": "Evan You",
|
@@ -72,7 +72,7 @@
|
|
72
72
|
"funding": "https://github.com/vitejs/vite?sponsor=1",
|
73
73
|
"//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
|
74
74
|
"dependencies": {
|
75
|
-
"esbuild": "
|
75
|
+
"esbuild": "0.24.0",
|
76
76
|
"postcss": "^8.4.49",
|
77
77
|
"rollup": "^4.23.0"
|
78
78
|
},
|
@@ -81,27 +81,27 @@
|
|
81
81
|
},
|
82
82
|
"devDependencies": {
|
83
83
|
"@ampproject/remapping": "^2.3.0",
|
84
|
-
"@babel/parser": "^7.26.
|
84
|
+
"@babel/parser": "^7.26.3",
|
85
85
|
"@jridgewell/trace-mapping": "^0.3.25",
|
86
86
|
"@polka/compression": "^1.0.0-next.25",
|
87
87
|
"@rollup/plugin-alias": "^5.1.1",
|
88
|
-
"@rollup/plugin-commonjs": "^28.0.
|
88
|
+
"@rollup/plugin-commonjs": "^28.0.2",
|
89
89
|
"@rollup/plugin-dynamic-import-vars": "2.1.4",
|
90
90
|
"@rollup/plugin-json": "^6.1.0",
|
91
|
-
"@rollup/plugin-node-resolve": "
|
92
|
-
"@rollup/pluginutils": "^5.1.
|
91
|
+
"@rollup/plugin-node-resolve": "16.0.0",
|
92
|
+
"@rollup/pluginutils": "^5.1.4",
|
93
93
|
"@types/escape-html": "^1.0.4",
|
94
94
|
"@types/pnpapi": "^0.0.5",
|
95
|
-
"artichokie": "^0.
|
95
|
+
"artichokie": "^0.3.1",
|
96
96
|
"cac": "^6.7.14",
|
97
97
|
"chokidar": "^3.6.0",
|
98
98
|
"connect": "^3.7.0",
|
99
99
|
"convert-source-map": "^2.0.0",
|
100
100
|
"cors": "^2.8.5",
|
101
101
|
"cross-spawn": "^7.0.6",
|
102
|
-
"debug": "^4.
|
102
|
+
"debug": "^4.4.0",
|
103
103
|
"dep-types": "link:./src/types",
|
104
|
-
"dotenv": "^16.4.
|
104
|
+
"dotenv": "^16.4.7",
|
105
105
|
"dotenv-expand": "^12.0.1",
|
106
106
|
"es-module-lexer": "^1.5.4",
|
107
107
|
"escape-html": "^1.0.3",
|
@@ -110,7 +110,7 @@
|
|
110
110
|
"http-proxy": "^1.18.1",
|
111
111
|
"launch-editor-middleware": "^2.9.1",
|
112
112
|
"lightningcss": "^1.28.2",
|
113
|
-
"magic-string": "^0.30.
|
113
|
+
"magic-string": "^0.30.17",
|
114
114
|
"mlly": "^1.7.3",
|
115
115
|
"mrmime": "^2.0.0",
|
116
116
|
"nanoid": "^5.0.9",
|
@@ -123,15 +123,16 @@
|
|
123
123
|
"postcss-import": "^16.1.0",
|
124
124
|
"postcss-load-config": "^6.0.1",
|
125
125
|
"postcss-modules": "^6.0.1",
|
126
|
-
"resolve.exports": "^2.0.
|
126
|
+
"resolve.exports": "^2.0.3",
|
127
127
|
"rollup-plugin-dts": "^6.1.1",
|
128
128
|
"rollup-plugin-esbuild": "^6.1.1",
|
129
129
|
"rollup-plugin-license": "^3.5.3",
|
130
|
-
"sass": "^1.
|
131
|
-
"sass-embedded": "^1.
|
130
|
+
"sass": "^1.83.0",
|
131
|
+
"sass-embedded": "^1.83.0",
|
132
132
|
"sirv": "^3.0.0",
|
133
133
|
"source-map-support": "^0.5.21",
|
134
134
|
"strip-literal": "^2.1.1",
|
135
|
+
"terser": "^5.37.0",
|
135
136
|
"tinyglobby": "^0.2.10",
|
136
137
|
"tsconfck": "^3.1.4",
|
137
138
|
"tslib": "^2.8.1",
|