vite 5.0.0-beta.16 → 5.0.0-beta.18
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/client/client.mjs +2 -2
- package/dist/client/client.mjs.map +1 -1
- package/dist/node/chunks/{dep-wO2juHOz.js → dep-faMUqRRE.js} +1 -1
- package/dist/node/chunks/{dep-WN9UKUor.js → dep-pW7U7Lse.js} +663 -535
- package/dist/node/chunks/{dep-ayAPZ1OT.js → dep-qfw-A_Gb.js} +1 -1
- package/dist/node/cli.js +7 -7
- package/dist/node/constants.js +1 -2
- package/dist/node/index.d.ts +9 -7
- package/dist/node/index.js +2 -2
- package/index.cjs +0 -1
- package/package.json +3 -2
package/dist/node/cli.js
CHANGED
|
@@ -2,7 +2,7 @@ import path from 'node:path';
|
|
|
2
2
|
import fs from 'node:fs';
|
|
3
3
|
import { performance } from 'node:perf_hooks';
|
|
4
4
|
import { EventEmitter } from 'events';
|
|
5
|
-
import { x as colors, k as createLogger, r as resolveConfig } from './chunks/dep-
|
|
5
|
+
import { x as colors, k as createLogger, r as resolveConfig } from './chunks/dep-pW7U7Lse.js';
|
|
6
6
|
import { VERSION } from './constants.js';
|
|
7
7
|
import 'node:fs/promises';
|
|
8
8
|
import 'node:url';
|
|
@@ -759,7 +759,7 @@ cli
|
|
|
759
759
|
filterDuplicateOptions(options);
|
|
760
760
|
// output structure is preserved even after bundling so require()
|
|
761
761
|
// is ok here
|
|
762
|
-
const { createServer } = await import('./chunks/dep-
|
|
762
|
+
const { createServer } = await import('./chunks/dep-pW7U7Lse.js').then(function (n) { return n.A; });
|
|
763
763
|
try {
|
|
764
764
|
const server = await createServer({
|
|
765
765
|
root,
|
|
@@ -780,9 +780,9 @@ cli
|
|
|
780
780
|
const startupDurationString = viteStartTime
|
|
781
781
|
? colors.dim(`ready in ${colors.reset(colors.bold(Math.ceil(performance.now() - viteStartTime)))} ms`)
|
|
782
782
|
: '';
|
|
783
|
+
const hasExistingLogs = process.stdout.bytesWritten > 0 || process.stderr.bytesWritten > 0;
|
|
783
784
|
info(`\n ${colors.green(`${colors.bold('VITE')} v${VERSION}`)} ${startupDurationString}\n`, {
|
|
784
|
-
clear: !
|
|
785
|
-
!globalThis.__vite_cjs_skip_clear_screen,
|
|
785
|
+
clear: !hasExistingLogs,
|
|
786
786
|
});
|
|
787
787
|
server.printUrls();
|
|
788
788
|
const customShortcuts = [];
|
|
@@ -839,7 +839,7 @@ cli
|
|
|
839
839
|
.option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
|
|
840
840
|
.action(async (root, options) => {
|
|
841
841
|
filterDuplicateOptions(options);
|
|
842
|
-
const { build } = await import('./chunks/dep-
|
|
842
|
+
const { build } = await import('./chunks/dep-pW7U7Lse.js').then(function (n) { return n.C; });
|
|
843
843
|
const buildOptions = cleanOptions(options);
|
|
844
844
|
try {
|
|
845
845
|
await build({
|
|
@@ -867,7 +867,7 @@ cli
|
|
|
867
867
|
.option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
|
|
868
868
|
.action(async (root, options) => {
|
|
869
869
|
filterDuplicateOptions(options);
|
|
870
|
-
const { optimizeDeps } = await import('./chunks/dep-
|
|
870
|
+
const { optimizeDeps } = await import('./chunks/dep-pW7U7Lse.js').then(function (n) { return n.B; });
|
|
871
871
|
try {
|
|
872
872
|
const config = await resolveConfig({
|
|
873
873
|
root,
|
|
@@ -893,7 +893,7 @@ cli
|
|
|
893
893
|
.option('--outDir <dir>', `[string] output directory (default: dist)`)
|
|
894
894
|
.action(async (root, options) => {
|
|
895
895
|
filterDuplicateOptions(options);
|
|
896
|
-
const { preview } = await import('./chunks/dep-
|
|
896
|
+
const { preview } = await import('./chunks/dep-pW7U7Lse.js').then(function (n) { return n.D; });
|
|
897
897
|
try {
|
|
898
898
|
const server = await preview({
|
|
899
899
|
root,
|
package/dist/node/constants.js
CHANGED
|
@@ -122,6 +122,5 @@ const wildcardHosts = new Set([
|
|
|
122
122
|
]);
|
|
123
123
|
const DEFAULT_DEV_PORT = 5173;
|
|
124
124
|
const DEFAULT_PREVIEW_PORT = 4173;
|
|
125
|
-
const ASYNC_DISPOSE = Symbol.asyncDispose || Symbol.for('Symbol.asyncDispose');
|
|
126
125
|
|
|
127
|
-
export {
|
|
126
|
+
export { CLIENT_DIR, CLIENT_ENTRY, CLIENT_PUBLIC_PATH, CSS_LANGS_RE, DEFAULT_ASSETS_RE, DEFAULT_CONFIG_FILES, DEFAULT_DEV_PORT, DEFAULT_EXTENSIONS, DEFAULT_MAIN_FIELDS, DEFAULT_PREVIEW_PORT, DEP_VERSION_RE, ENV_ENTRY, ENV_PUBLIC_PATH, ESBUILD_MODULES_TARGET, FS_PREFIX, JS_TYPES_RE, KNOWN_ASSET_TYPES, NULL_BYTE_PLACEHOLDER, OPTIMIZABLE_ENTRY_RE, SPECIAL_QUERY_RE, VALID_ID_PREFIX, VERSION, VITE_PACKAGE_DIR, loopbackHosts, wildcardHosts };
|
package/dist/node/index.d.ts
CHANGED
|
@@ -817,7 +817,8 @@ declare class ModuleGraph {
|
|
|
817
817
|
getModuleById(id: string): ModuleNode | undefined;
|
|
818
818
|
getModulesByFile(file: string): Set<ModuleNode> | undefined;
|
|
819
819
|
onFileChange(file: string): void;
|
|
820
|
-
invalidateModule(mod: ModuleNode, seen?: Set<ModuleNode>, timestamp?: number, isHmr?: boolean,
|
|
820
|
+
invalidateModule(mod: ModuleNode, seen?: Set<ModuleNode>, timestamp?: number, isHmr?: boolean,
|
|
821
|
+
): void;
|
|
821
822
|
invalidateAll(): void;
|
|
822
823
|
/**
|
|
823
824
|
* Update the module graph based on a module's updated imports information
|
|
@@ -827,7 +828,8 @@ declare class ModuleGraph {
|
|
|
827
828
|
* @param staticImportedUrls Subset of `importedModules` where they're statically imported in code.
|
|
828
829
|
* This is only used for soft invalidations so `undefined` is fine but may cause more runtime processing.
|
|
829
830
|
*/
|
|
830
|
-
updateModuleInfo(mod: ModuleNode, importedModules: Set<string | ModuleNode>, importedBindings: Map<string, Set<string>> | null, acceptedModules: Set<string | ModuleNode>, acceptedExports: Set<string> | null, isSelfAccepting: boolean, ssr?: boolean,
|
|
831
|
+
updateModuleInfo(mod: ModuleNode, importedModules: Set<string | ModuleNode>, importedBindings: Map<string, Set<string>> | null, acceptedModules: Set<string | ModuleNode>, acceptedExports: Set<string> | null, isSelfAccepting: boolean, ssr?: boolean,
|
|
832
|
+
): Promise<Set<ModuleNode> | undefined>;
|
|
831
833
|
ensureEntryFromUrl(rawUrl: string, ssr?: boolean, setIsSelfAccepting?: boolean): Promise<ModuleNode>;
|
|
832
834
|
createFileOnlyEntry(file: string): ModuleNode;
|
|
833
835
|
resolveUrl(url: string, ssr?: boolean): Promise<ResolvedUrl>;
|
|
@@ -838,7 +840,7 @@ declare class ModuleGraph {
|
|
|
838
840
|
* https:
|
|
839
841
|
*/
|
|
840
842
|
|
|
841
|
-
interface PluginContainer
|
|
843
|
+
interface PluginContainer {
|
|
842
844
|
options: InputOptions;
|
|
843
845
|
getModuleInfo(id: string): ModuleInfo | null;
|
|
844
846
|
buildStart(options: InputOptions): Promise<void>;
|
|
@@ -1399,7 +1401,7 @@ declare namespace WebSocket {
|
|
|
1399
1401
|
}
|
|
1400
1402
|
|
|
1401
1403
|
type WebSocketCustomListener<T> = (data: T, client: WebSocketClient) => void;
|
|
1402
|
-
interface WebSocketServer
|
|
1404
|
+
interface WebSocketServer {
|
|
1403
1405
|
/**
|
|
1404
1406
|
* Listen on port and host
|
|
1405
1407
|
*/
|
|
@@ -1554,7 +1556,7 @@ interface FileSystemServeOptions {
|
|
|
1554
1556
|
}
|
|
1555
1557
|
type ServerHook = (this: void, server: ViteDevServer) => (() => void) | void | Promise<(() => void) | void>;
|
|
1556
1558
|
type HttpServer = http.Server | Http2SecureServer;
|
|
1557
|
-
interface ViteDevServer
|
|
1559
|
+
interface ViteDevServer {
|
|
1558
1560
|
/**
|
|
1559
1561
|
* The resolved vite config object
|
|
1560
1562
|
*/
|
|
@@ -2425,7 +2427,7 @@ type ExportsData = {
|
|
|
2425
2427
|
exports: readonly string[];
|
|
2426
2428
|
jsxLoader?: boolean;
|
|
2427
2429
|
};
|
|
2428
|
-
interface DepsOptimizer
|
|
2430
|
+
interface DepsOptimizer {
|
|
2429
2431
|
metadata: DepOptimizationMetadata;
|
|
2430
2432
|
scanProcessing?: Promise<void>;
|
|
2431
2433
|
registerMissingImport: (id: string, resolved: string) => OptimizedDepInfo;
|
|
@@ -3198,7 +3200,7 @@ type ResolvedConfig = Readonly<Omit<UserConfig, 'plugins' | 'css' | 'assetsInclu
|
|
|
3198
3200
|
alias: Alias[];
|
|
3199
3201
|
};
|
|
3200
3202
|
plugins: readonly Plugin[];
|
|
3201
|
-
css: ResolvedCSSOptions
|
|
3203
|
+
css: ResolvedCSSOptions;
|
|
3202
3204
|
esbuild: ESBuildOptions | false;
|
|
3203
3205
|
server: ResolvedServerOptions;
|
|
3204
3206
|
build: ResolvedBuildOptions;
|
package/dist/node/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { parseAst, parseAstAsync } from 'rollup/parseAst';
|
|
2
|
-
import { i as isInNodeModules } from './chunks/dep-
|
|
3
|
-
export { b as build, e as buildErrorMessage, h as createFilter, k as createLogger, c as createServer, d as defineConfig, f as formatPostcssSourceMap, u as isFileServingAllowed, l as loadConfigFromFile, v as loadEnv, g as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, a as preprocessCSS, p as preview, r as resolveConfig, w as resolveEnvPrefix, q as searchForWorkspaceRoot, j as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-
|
|
2
|
+
import { i as isInNodeModules } from './chunks/dep-pW7U7Lse.js';
|
|
3
|
+
export { b as build, e as buildErrorMessage, h as createFilter, k as createLogger, c as createServer, d as defineConfig, f as formatPostcssSourceMap, u as isFileServingAllowed, l as loadConfigFromFile, v as loadEnv, g as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, a as preprocessCSS, p as preview, r as resolveConfig, w as resolveEnvPrefix, q as searchForWorkspaceRoot, j as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-pW7U7Lse.js';
|
|
4
4
|
export { VERSION as version } from './constants.js';
|
|
5
5
|
export { version as esbuildVersion } from 'esbuild';
|
|
6
6
|
export { VERSION as rollupVersion } from 'rollup';
|
package/index.cjs
CHANGED
|
@@ -27,7 +27,6 @@ asyncFunctions.forEach((name) => {
|
|
|
27
27
|
|
|
28
28
|
function warnCjsUsage() {
|
|
29
29
|
if (process.env.VITE_CJS_IGNORE_WARNING) return
|
|
30
|
-
globalThis.__vite_cjs_skip_clear_screen = true
|
|
31
30
|
const yellow = (str) => `\u001b[33m${str}\u001b[39m`
|
|
32
31
|
const log = process.env.VITE_CJS_TRACE ? console.trace : console.warn
|
|
33
32
|
log(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.18",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Evan You",
|
|
@@ -70,6 +70,7 @@
|
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@ampproject/remapping": "^2.2.1",
|
|
73
|
+
"@babel/parser": "^7.23.0",
|
|
73
74
|
"@jridgewell/trace-mapping": "^0.3.20",
|
|
74
75
|
"@rollup/plugin-alias": "^5.0.1",
|
|
75
76
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
@@ -92,7 +93,7 @@
|
|
|
92
93
|
"dep-types": "link:./src/types",
|
|
93
94
|
"dotenv": "^16.3.1",
|
|
94
95
|
"dotenv-expand": "^10.0.0",
|
|
95
|
-
"es-module-lexer": "^1.
|
|
96
|
+
"es-module-lexer": "^1.4.0",
|
|
96
97
|
"escape-html": "^1.0.3",
|
|
97
98
|
"estree-walker": "^3.0.3",
|
|
98
99
|
"etag": "^1.8.1",
|