vite 4.3.0-beta.1 → 4.3.0-beta.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.
Potentially problematic release.
This version of vite might be problematic. Click here for more details.
- package/dist/client/client.mjs +41 -9
- package/dist/client/client.mjs.map +1 -1
- package/dist/node/chunks/{dep-f365bad6.js → dep-281af434.js} +1920 -1750
- package/dist/node/chunks/{dep-afd6d5c5.js → dep-3b7a7ba2.js} +1 -1
- package/dist/node/cli.js +5 -5
- package/dist/node/index.d.ts +10 -5
- package/dist/node/index.js +2 -2
- package/dist/node-cjs/publicUtils.cjs +29 -15
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import require$$0__default from 'fs';
|
|
2
2
|
import require$$0 from 'postcss';
|
|
3
|
-
import { D as commonjsGlobal } from './dep-
|
|
3
|
+
import { D as commonjsGlobal } from './dep-281af434.js';
|
|
4
4
|
import require$$0$1 from 'path';
|
|
5
5
|
import require$$5 from 'crypto';
|
|
6
6
|
import require$$0$2 from 'util';
|
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 { B as picocolorsExports, C as bindShortcuts, x as createLogger, h as resolveConfig } from './chunks/dep-
|
|
5
|
+
import { B as picocolorsExports, C as bindShortcuts, x as createLogger, h as resolveConfig } from './chunks/dep-281af434.js';
|
|
6
6
|
import { VERSION } from './constants.js';
|
|
7
7
|
import 'node:fs/promises';
|
|
8
8
|
import 'node:url';
|
|
@@ -729,7 +729,7 @@ cli
|
|
|
729
729
|
filterDuplicateOptions(options);
|
|
730
730
|
// output structure is preserved even after bundling so require()
|
|
731
731
|
// is ok here
|
|
732
|
-
const { createServer } = await import('./chunks/dep-
|
|
732
|
+
const { createServer } = await import('./chunks/dep-281af434.js').then(function (n) { return n.G; });
|
|
733
733
|
try {
|
|
734
734
|
const server = await createServer({
|
|
735
735
|
root,
|
|
@@ -807,7 +807,7 @@ cli
|
|
|
807
807
|
.option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
|
|
808
808
|
.action(async (root, options) => {
|
|
809
809
|
filterDuplicateOptions(options);
|
|
810
|
-
const { build } = await import('./chunks/dep-
|
|
810
|
+
const { build } = await import('./chunks/dep-281af434.js').then(function (n) { return n.F; });
|
|
811
811
|
const buildOptions = cleanOptions(options);
|
|
812
812
|
try {
|
|
813
813
|
await build({
|
|
@@ -835,7 +835,7 @@ cli
|
|
|
835
835
|
.option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
|
|
836
836
|
.action(async (root, options) => {
|
|
837
837
|
filterDuplicateOptions(options);
|
|
838
|
-
const { optimizeDeps } = await import('./chunks/dep-
|
|
838
|
+
const { optimizeDeps } = await import('./chunks/dep-281af434.js').then(function (n) { return n.E; });
|
|
839
839
|
try {
|
|
840
840
|
const config = await resolveConfig({
|
|
841
841
|
root,
|
|
@@ -860,7 +860,7 @@ cli
|
|
|
860
860
|
.option('--outDir <dir>', `[string] output directory (default: dist)`)
|
|
861
861
|
.action(async (root, options) => {
|
|
862
862
|
filterDuplicateOptions(options);
|
|
863
|
-
const { preview } = await import('./chunks/dep-
|
|
863
|
+
const { preview } = await import('./chunks/dep-281af434.js').then(function (n) { return n.H; });
|
|
864
864
|
try {
|
|
865
865
|
const server = await preview({
|
|
866
866
|
root,
|
package/dist/node/index.d.ts
CHANGED
|
@@ -663,9 +663,6 @@ export declare interface DepOptimizationResult {
|
|
|
663
663
|
* to be able to discard the result
|
|
664
664
|
*/
|
|
665
665
|
commit: () => Promise<void>;
|
|
666
|
-
/**
|
|
667
|
-
* @deprecated noop
|
|
668
|
-
*/
|
|
669
666
|
cancel: () => void;
|
|
670
667
|
}
|
|
671
668
|
|
|
@@ -740,8 +737,6 @@ export declare interface ExperimentalOptions {
|
|
|
740
737
|
export declare type ExportsData = {
|
|
741
738
|
hasImports: boolean;
|
|
742
739
|
exports: readonly string[];
|
|
743
|
-
facade: boolean;
|
|
744
|
-
hasReExports?: boolean;
|
|
745
740
|
jsxLoader?: boolean;
|
|
746
741
|
};
|
|
747
742
|
|
|
@@ -1320,6 +1315,8 @@ export declare class ModuleGraph {
|
|
|
1320
1315
|
idToModuleMap: Map<string, ModuleNode>;
|
|
1321
1316
|
fileToModulesMap: Map<string, Set<ModuleNode>>;
|
|
1322
1317
|
safeModulesPath: Set<string>;
|
|
1318
|
+
/* Excluded from this release type: _unresolvedUrlToModuleMap */
|
|
1319
|
+
/* Excluded from this release type: _ssrUnresolvedUrlToModuleMap */
|
|
1323
1320
|
constructor(resolveId: (url: string, ssr: boolean) => Promise<PartialResolvedId | null>);
|
|
1324
1321
|
getModuleByUrl(rawUrl: string, ssr?: boolean): Promise<ModuleNode | undefined>;
|
|
1325
1322
|
getModuleById(id: string): ModuleNode | undefined;
|
|
@@ -1334,8 +1331,12 @@ export declare class ModuleGraph {
|
|
|
1334
1331
|
*/
|
|
1335
1332
|
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): Promise<Set<ModuleNode> | undefined>;
|
|
1336
1333
|
ensureEntryFromUrl(rawUrl: string, ssr?: boolean, setIsSelfAccepting?: boolean): Promise<ModuleNode>;
|
|
1334
|
+
/* Excluded from this release type: _ensureEntryFromUrl */
|
|
1337
1335
|
createFileOnlyEntry(file: string): ModuleNode;
|
|
1338
1336
|
resolveUrl(url: string, ssr?: boolean): Promise<ResolvedUrl>;
|
|
1337
|
+
/* Excluded from this release type: _getUnresolvedUrlToModule */
|
|
1338
|
+
/* Excluded from this release type: _setUnresolvedUrlToModule */
|
|
1339
|
+
/* Excluded from this release type: _resolveUrl */
|
|
1339
1340
|
}
|
|
1340
1341
|
|
|
1341
1342
|
export declare class ModuleNode {
|
|
@@ -3318,6 +3319,10 @@ export declare interface WebSocketClient {
|
|
|
3318
3319
|
export declare type WebSocketCustomListener<T> = (data: T, client: WebSocketClient) => void;
|
|
3319
3320
|
|
|
3320
3321
|
export declare interface WebSocketServer {
|
|
3322
|
+
/**
|
|
3323
|
+
* Listen on port and host
|
|
3324
|
+
*/
|
|
3325
|
+
listen(): void;
|
|
3321
3326
|
/**
|
|
3322
3327
|
* Get all connected clients.
|
|
3323
3328
|
*/
|
package/dist/node/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as isInNodeModules } from './chunks/dep-
|
|
2
|
-
export { b as build, e as buildErrorMessage, v as createFilter, x as createLogger, c as createServer, g as defineConfig, f as formatPostcssSourceMap, k as getDepOptimizationConfig, m as isDepsOptimizerEnabled, l as loadConfigFromFile, z as loadEnv, u as mergeAlias, q as mergeConfig, n as normalizePath, o as optimizeDeps, a as preprocessCSS, p as preview, j as resolveBaseUrl, h as resolveConfig, A as resolveEnvPrefix, d as resolvePackageData, r as resolvePackageEntry, y as searchForWorkspaceRoot, w as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-
|
|
1
|
+
import { i as isInNodeModules } from './chunks/dep-281af434.js';
|
|
2
|
+
export { b as build, e as buildErrorMessage, v as createFilter, x as createLogger, c as createServer, g as defineConfig, f as formatPostcssSourceMap, k as getDepOptimizationConfig, m as isDepsOptimizerEnabled, l as loadConfigFromFile, z as loadEnv, u as mergeAlias, q as mergeConfig, n as normalizePath, o as optimizeDeps, a as preprocessCSS, p as preview, j as resolveBaseUrl, h as resolveConfig, A as resolveEnvPrefix, d as resolvePackageData, r as resolvePackageEntry, y as searchForWorkspaceRoot, w as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-281af434.js';
|
|
3
3
|
export { VERSION as version } from './constants.js';
|
|
4
4
|
export { version as esbuildVersion } from 'esbuild';
|
|
5
5
|
export { VERSION as rollupVersion } from 'rollup';
|
|
@@ -1150,7 +1150,7 @@ function requireNode () {
|
|
|
1150
1150
|
}
|
|
1151
1151
|
} (src));
|
|
1152
1152
|
|
|
1153
|
-
var debug = /*@__PURE__*/getDefaultExportFromCjs(srcExports);
|
|
1153
|
+
var debug$1 = /*@__PURE__*/getDefaultExportFromCjs(srcExports);
|
|
1154
1154
|
|
|
1155
1155
|
var picomatchExports = {};
|
|
1156
1156
|
var picomatch$1 = {
|
|
@@ -3295,6 +3295,13 @@ const builtins = 'arguments Infinity NaN undefined null true false eval uneval i
|
|
|
3295
3295
|
const forbiddenIdentifiers = new Set(`${reservedWords} ${builtins}`.split(' '));
|
|
3296
3296
|
forbiddenIdentifiers.add('');
|
|
3297
3297
|
|
|
3298
|
+
if (process.versions.pnp) {
|
|
3299
|
+
try {
|
|
3300
|
+
node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (document.currentScript && document.currentScript.src || new URL('node-cjs/publicUtils.cjs', document.baseURI).href)))('pnpapi');
|
|
3301
|
+
}
|
|
3302
|
+
catch { }
|
|
3303
|
+
}
|
|
3304
|
+
|
|
3298
3305
|
const createFilter = createFilter$1;
|
|
3299
3306
|
const windowsSlashRE = /\\/g;
|
|
3300
3307
|
function slash(p) {
|
|
@@ -3309,18 +3316,20 @@ const _require = node_module.createRequire((typeof document === 'undefined' ? re
|
|
|
3309
3316
|
const filter = process.env.VITE_DEBUG_FILTER;
|
|
3310
3317
|
const DEBUG = process.env.DEBUG;
|
|
3311
3318
|
function createDebugger(namespace, options = {}) {
|
|
3312
|
-
const log = debug(namespace);
|
|
3319
|
+
const log = debug$1(namespace);
|
|
3313
3320
|
const { onlyWhenFocused } = options;
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3321
|
+
let enabled = log.enabled;
|
|
3322
|
+
if (enabled && onlyWhenFocused) {
|
|
3323
|
+
const ns = typeof onlyWhenFocused === 'string' ? onlyWhenFocused : namespace;
|
|
3324
|
+
enabled = !!DEBUG?.includes(ns);
|
|
3325
|
+
}
|
|
3326
|
+
if (enabled) {
|
|
3327
|
+
return (msg, ...args) => {
|
|
3328
|
+
if (!filter || msg.includes(filter)) {
|
|
3329
|
+
log(msg, ...args);
|
|
3330
|
+
}
|
|
3331
|
+
};
|
|
3332
|
+
}
|
|
3324
3333
|
}
|
|
3325
3334
|
function testCaseInsensitiveFS() {
|
|
3326
3335
|
if (!CLIENT_ENTRY.endsWith('client.mjs')) {
|
|
@@ -3350,6 +3359,11 @@ function tryStatSync(file) {
|
|
|
3350
3359
|
}
|
|
3351
3360
|
function isFileReadable(filename) {
|
|
3352
3361
|
try {
|
|
3362
|
+
// The "throwIfNoEntry" is a performance optimization for cases where the file does not exist
|
|
3363
|
+
if (!fs$1.statSync(filename, { throwIfNoEntry: false })) {
|
|
3364
|
+
return false;
|
|
3365
|
+
}
|
|
3366
|
+
// Check if current process has read permission to the file
|
|
3353
3367
|
fs$1.accessSync(filename, fs$1.constants.R_OK);
|
|
3354
3368
|
return true;
|
|
3355
3369
|
}
|
|
@@ -3374,6 +3388,7 @@ const usingDynamicImport = typeof jest === 'undefined';
|
|
|
3374
3388
|
usingDynamicImport
|
|
3375
3389
|
? new Function('file', 'return import(file)')
|
|
3376
3390
|
: _require;
|
|
3391
|
+
path$3.dirname(node_url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (document.currentScript && document.currentScript.src || new URL('node-cjs/publicUtils.cjs', document.baseURI).href))));
|
|
3377
3392
|
function mergeConfigRecursively(defaults, overrides, rootPath) {
|
|
3378
3393
|
const merged = { ...defaults };
|
|
3379
3394
|
for (const key in overrides) {
|
|
@@ -3692,8 +3707,7 @@ function stattag (stat) {
|
|
|
3692
3707
|
return '"' + size + '-' + mtime + '"'
|
|
3693
3708
|
}
|
|
3694
3709
|
|
|
3695
|
-
const
|
|
3696
|
-
createDebugger('vite:sourcemap', {
|
|
3710
|
+
const debug = createDebugger('vite:sourcemap', {
|
|
3697
3711
|
onlyWhenFocused: true,
|
|
3698
3712
|
});
|
|
3699
3713
|
function genSourceMapUrl(map) {
|
|
@@ -3703,7 +3717,7 @@ function genSourceMapUrl(map) {
|
|
|
3703
3717
|
return `data:application/json;base64,${Buffer.from(map).toString('base64')}`;
|
|
3704
3718
|
}
|
|
3705
3719
|
function getCodeWithSourcemap(type, code, map) {
|
|
3706
|
-
if (
|
|
3720
|
+
if (debug) {
|
|
3707
3721
|
code += `\n/*${JSON.stringify(map, null, 2).replace(/\*\//g, '*\\/')}*/\n`;
|
|
3708
3722
|
}
|
|
3709
3723
|
if (type === 'js') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite",
|
|
3
|
-
"version": "4.3.0-beta.
|
|
3
|
+
"version": "4.3.0-beta.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Evan You",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"esbuild": "^0.17.5",
|
|
70
70
|
"postcss": "^8.4.21",
|
|
71
71
|
"resolve": "^1.22.1",
|
|
72
|
-
"rollup": "^3.20.
|
|
72
|
+
"rollup": "^3.20.2"
|
|
73
73
|
},
|
|
74
74
|
"optionalDependencies": {
|
|
75
75
|
"fsevents": "~2.3.2"
|