vite 8.0.0-beta.5 → 8.0.0-beta.7
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 +4 -4
- package/dist/node/chunks/chunk.js +1 -2
- package/dist/node/chunks/logger.js +3 -2
- package/dist/node/chunks/node.js +59 -38
- package/dist/node/cli.js +1 -1
- package/dist/node/index.d.ts +8 -0
- package/dist/node/module-runner.js +2 -2
- package/package.json +10 -10
package/dist/client/client.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "@vite/env";
|
|
2
2
|
|
|
3
|
-
//#region \0@oxc-project+runtime@0.
|
|
3
|
+
//#region \0@oxc-project+runtime@0.107.0/helpers/typeof.js
|
|
4
4
|
function _typeof(o) {
|
|
5
5
|
"@babel/helpers - typeof";
|
|
6
6
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o$1) {
|
|
@@ -11,7 +11,7 @@ function _typeof(o) {
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
//#endregion
|
|
14
|
-
//#region \0@oxc-project+runtime@0.
|
|
14
|
+
//#region \0@oxc-project+runtime@0.107.0/helpers/toPrimitive.js
|
|
15
15
|
function toPrimitive(t, r) {
|
|
16
16
|
if ("object" != _typeof(t) || !t) return t;
|
|
17
17
|
var e = t[Symbol.toPrimitive];
|
|
@@ -24,14 +24,14 @@ function toPrimitive(t, r) {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
//#endregion
|
|
27
|
-
//#region \0@oxc-project+runtime@0.
|
|
27
|
+
//#region \0@oxc-project+runtime@0.107.0/helpers/toPropertyKey.js
|
|
28
28
|
function toPropertyKey(t) {
|
|
29
29
|
var i = toPrimitive(t, "string");
|
|
30
30
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
//#endregion
|
|
34
|
-
//#region \0@oxc-project+runtime@0.
|
|
34
|
+
//#region \0@oxc-project+runtime@0.107.0/helpers/defineProperty.js
|
|
35
35
|
function _defineProperty(e, r, t) {
|
|
36
36
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
37
37
|
value: t,
|
|
@@ -41,8 +41,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
41
41
|
enumerable: true
|
|
42
42
|
}) : target, mod));
|
|
43
43
|
var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
44
|
-
var __toDynamicImportESM = (isNodeMode) => (mod) => __toESM(mod.default, isNodeMode);
|
|
45
44
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
46
45
|
|
|
47
46
|
//#endregion
|
|
48
|
-
export { __toCommonJS as a, __require as i, __esmMin as n,
|
|
47
|
+
export { __toCommonJS as a, __require as i, __esmMin as n, __toESM as o, __exportAll as r, __commonJSMin as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { o as __toESM, t as __commonJSMin } from "./chunk.js";
|
|
2
2
|
import { readFileSync } from "node:fs";
|
|
3
3
|
import path, { resolve } from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
@@ -143,7 +143,8 @@ const ESBUILD_BASELINE_WIDELY_AVAILABLE_TARGET = [
|
|
|
143
143
|
"chrome111",
|
|
144
144
|
"edge111",
|
|
145
145
|
"firefox114",
|
|
146
|
-
"safari16.4"
|
|
146
|
+
"safari16.4",
|
|
147
|
+
"ios16.4"
|
|
147
148
|
];
|
|
148
149
|
const DEFAULT_CONFIG_FILES = [
|
|
149
150
|
"vite.config.js",
|
package/dist/node/chunks/node.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as __toCommonJS, i as __require, n as __esmMin, o as
|
|
1
|
+
import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM, r as __exportAll, t as __commonJSMin } from "./chunk.js";
|
|
2
2
|
import { A as OPTIMIZABLE_ENTRY_RE, C as ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR, D as JS_TYPES_RE, E as FS_PREFIX, F as defaultAllowedOrigins, I as loopbackHosts, L as wildcardHosts, M as SPECIAL_QUERY_RE, N as VERSION, O as KNOWN_ASSET_TYPES, P as VITE_PACKAGE_DIR, R as require_picocolors, S as ENV_PUBLIC_PATH, T as ESBUILD_BASELINE_WIDELY_AVAILABLE_TARGET, _ as DEFAULT_SERVER_CONDITIONS, a as CLIENT_ENTRY, b as DEV_PROD_CONDITION, c as DEFAULT_ASSETS_INLINE_LIMIT, d as DEFAULT_CLIENT_MAIN_FIELDS, f as DEFAULT_CONFIG_FILES, g as DEFAULT_PREVIEW_PORT, h as DEFAULT_EXTERNAL_CONDITIONS, i as CLIENT_DIR, j as ROLLUP_HOOKS, k as METADATA_FILENAME, l as DEFAULT_ASSETS_RE, m as DEFAULT_EXTENSIONS, n as createLogger, o as CLIENT_PUBLIC_PATH, p as DEFAULT_DEV_PORT, r as printServerUrls, s as CSS_LANGS_RE, t as LogLevels, u as DEFAULT_CLIENT_CONDITIONS, v as DEFAULT_SERVER_MAIN_FIELDS, w as ERR_OPTIMIZE_DEPS_PROCESSING_ERROR, x as ENV_ENTRY, y as DEP_VERSION_RE } from "./logger.js";
|
|
3
3
|
import { builtinModules, createRequire } from "node:module";
|
|
4
4
|
import { parseAst, parseAstAsync } from "rolldown/parseAst";
|
|
@@ -2227,12 +2227,10 @@ function mergeWithDefaults(defaults, values) {
|
|
|
2227
2227
|
return mergeWithDefaultsRecursively(deepClone(defaults), values);
|
|
2228
2228
|
}
|
|
2229
2229
|
const runtimeDeprecatedPath = new Set(["optimizeDeps", "ssr.optimizeDeps"]);
|
|
2230
|
-
const rollupOptionsDeprecationCall = (
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
};
|
|
2235
|
-
})();
|
|
2230
|
+
const rollupOptionsDeprecationCall = () => {
|
|
2231
|
+
const method = process.env.VITE_DEPRECATION_TRACE ? "trace" : "warn";
|
|
2232
|
+
console[method]("`optimizeDeps.rollupOptions` / `ssr.optimizeDeps.rollupOptions` is deprecated. Use `optimizeDeps.rolldownOptions` instead. Note that this option may be set by a plugin. " + (method === "trace" ? "Showing trace because VITE_DEPRECATION_TRACE is set." : "Set VITE_DEPRECATION_TRACE=1 to see where it is called."));
|
|
2233
|
+
};
|
|
2236
2234
|
function setupRollupOptionCompat(buildConfig, path$12) {
|
|
2237
2235
|
buildConfig.rolldownOptions ??= buildConfig.rollupOptions;
|
|
2238
2236
|
if (runtimeDeprecatedPath.has(path$12) && buildConfig.rollupOptions && buildConfig.rolldownOptions !== buildConfig.rollupOptions) rollupOptionsDeprecationCall();
|
|
@@ -4242,7 +4240,7 @@ function f(e$1, r$1, t$1) {
|
|
|
4242
4240
|
}
|
|
4243
4241
|
|
|
4244
4242
|
//#endregion
|
|
4245
|
-
//#region ../../node_modules/.pnpm/ufo@1.6.
|
|
4243
|
+
//#region ../../node_modules/.pnpm/ufo@1.6.2/node_modules/ufo/dist/index.mjs
|
|
4246
4244
|
const HASH_RE = /#/g;
|
|
4247
4245
|
const AMPERSAND_RE = /&/g;
|
|
4248
4246
|
const SLASH_RE = /\//g;
|
|
@@ -4644,7 +4642,7 @@ function hasESMSyntax(code, opts = {}) {
|
|
|
4644
4642
|
}
|
|
4645
4643
|
|
|
4646
4644
|
//#endregion
|
|
4647
|
-
//#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.0-beta.
|
|
4645
|
+
//#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.0-beta.59/node_modules/@rolldown/pluginutils/dist/filter/simple-filters.js
|
|
4648
4646
|
/**
|
|
4649
4647
|
* Constructs a RegExp that matches the exact string specified.
|
|
4650
4648
|
*
|
|
@@ -6968,7 +6966,8 @@ function optimizedDepsPlugin() {
|
|
|
6968
6966
|
if (this.environment.depsOptimizer?.isOptimizedDepFile(id)) return id;
|
|
6969
6967
|
},
|
|
6970
6968
|
async load(id) {
|
|
6971
|
-
const
|
|
6969
|
+
const environment = this.environment;
|
|
6970
|
+
const depsOptimizer = environment.depsOptimizer;
|
|
6972
6971
|
if (depsOptimizer?.isOptimizedDepFile(id)) {
|
|
6973
6972
|
const metadata = depsOptimizer.metadata;
|
|
6974
6973
|
const file = cleanUrl(id);
|
|
@@ -6976,7 +6975,7 @@ function optimizedDepsPlugin() {
|
|
|
6976
6975
|
const browserHash = versionMatch ? versionMatch[1].split("=")[1] : void 0;
|
|
6977
6976
|
const info = optimizedDepInfoFromFile(metadata, file);
|
|
6978
6977
|
if (info) {
|
|
6979
|
-
if (browserHash && info.browserHash !== browserHash) throwOutdatedRequest(id);
|
|
6978
|
+
if (browserHash && info.browserHash !== browserHash && !environment.config.optimizeDeps.ignoreOutdatedRequests) throwOutdatedRequest(id);
|
|
6980
6979
|
try {
|
|
6981
6980
|
await info.processing;
|
|
6982
6981
|
} catch {
|
|
@@ -6985,14 +6984,14 @@ function optimizedDepsPlugin() {
|
|
|
6985
6984
|
const newMetadata = depsOptimizer.metadata;
|
|
6986
6985
|
if (metadata !== newMetadata) {
|
|
6987
6986
|
const currentInfo = optimizedDepInfoFromFile(newMetadata, file);
|
|
6988
|
-
if (info.browserHash !== currentInfo?.browserHash) throwOutdatedRequest(id);
|
|
6987
|
+
if (info.browserHash !== currentInfo?.browserHash && !environment.config.optimizeDeps.ignoreOutdatedRequests) throwOutdatedRequest(id);
|
|
6989
6988
|
}
|
|
6990
6989
|
}
|
|
6991
6990
|
debug$13?.(`load ${import_picocolors.default.cyan(file)}`);
|
|
6992
6991
|
try {
|
|
6993
6992
|
return await fsp.readFile(file, "utf-8");
|
|
6994
6993
|
} catch {
|
|
6995
|
-
if (browserHash) throwOutdatedRequest(id);
|
|
6994
|
+
if (browserHash && !environment.config.optimizeDeps.ignoreOutdatedRequests) throwOutdatedRequest(id);
|
|
6996
6995
|
throwFileNotFoundInOptimizedDep(id);
|
|
6997
6996
|
}
|
|
6998
6997
|
}
|
|
@@ -14795,7 +14794,7 @@ function createNoopWatcher(options) {
|
|
|
14795
14794
|
}
|
|
14796
14795
|
|
|
14797
14796
|
//#endregion
|
|
14798
|
-
//#region ../../node_modules/.pnpm/ws@8.
|
|
14797
|
+
//#region ../../node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/constants.js
|
|
14799
14798
|
var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
14800
14799
|
const BINARY_TYPES = [
|
|
14801
14800
|
"nodebuffer",
|
|
@@ -14806,6 +14805,7 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14806
14805
|
if (hasBlob) BINARY_TYPES.push("blob");
|
|
14807
14806
|
module.exports = {
|
|
14808
14807
|
BINARY_TYPES,
|
|
14808
|
+
CLOSE_TIMEOUT: 3e4,
|
|
14809
14809
|
EMPTY_BUFFER: Buffer.alloc(0),
|
|
14810
14810
|
GUID: "258EAFA5-E914-47DA-95CA-C5AB0DC85B11",
|
|
14811
14811
|
hasBlob,
|
|
@@ -14818,7 +14818,7 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14818
14818
|
}));
|
|
14819
14819
|
|
|
14820
14820
|
//#endregion
|
|
14821
|
-
//#region ../../node_modules/.pnpm/ws@8.
|
|
14821
|
+
//#region ../../node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/buffer-util.js
|
|
14822
14822
|
var require_buffer_util = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
14823
14823
|
const { EMPTY_BUFFER } = require_constants();
|
|
14824
14824
|
const FastBuffer = Buffer[Symbol.species];
|
|
@@ -14919,7 +14919,7 @@ var require_buffer_util = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14919
14919
|
}));
|
|
14920
14920
|
|
|
14921
14921
|
//#endregion
|
|
14922
|
-
//#region ../../node_modules/.pnpm/ws@8.
|
|
14922
|
+
//#region ../../node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/limiter.js
|
|
14923
14923
|
var require_limiter = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
14924
14924
|
const kDone = Symbol("kDone");
|
|
14925
14925
|
const kRun = Symbol("kRun");
|
|
@@ -14971,7 +14971,7 @@ var require_limiter = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14971
14971
|
}));
|
|
14972
14972
|
|
|
14973
14973
|
//#endregion
|
|
14974
|
-
//#region ../../node_modules/.pnpm/ws@8.
|
|
14974
|
+
//#region ../../node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/permessage-deflate.js
|
|
14975
14975
|
var require_permessage_deflate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
14976
14976
|
const zlib$1 = __require("zlib");
|
|
14977
14977
|
const bufferUtil = require_buffer_util();
|
|
@@ -15305,7 +15305,7 @@ var require_permessage_deflate = /* @__PURE__ */ __commonJSMin(((exports, module
|
|
|
15305
15305
|
}));
|
|
15306
15306
|
|
|
15307
15307
|
//#endregion
|
|
15308
|
-
//#region ../../node_modules/.pnpm/ws@8.
|
|
15308
|
+
//#region ../../node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/validation.js
|
|
15309
15309
|
var require_validation = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
15310
15310
|
const { isUtf8 } = __require("buffer");
|
|
15311
15311
|
const { hasBlob } = require_constants();
|
|
@@ -15502,7 +15502,7 @@ var require_validation = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
15502
15502
|
}));
|
|
15503
15503
|
|
|
15504
15504
|
//#endregion
|
|
15505
|
-
//#region ../../node_modules/.pnpm/ws@8.
|
|
15505
|
+
//#region ../../node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/receiver.js
|
|
15506
15506
|
var require_receiver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
15507
15507
|
const { Writable: Writable$1 } = __require("stream");
|
|
15508
15508
|
const PerMessageDeflate = require_permessage_deflate();
|
|
@@ -15950,7 +15950,7 @@ var require_receiver = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
15950
15950
|
}));
|
|
15951
15951
|
|
|
15952
15952
|
//#endregion
|
|
15953
|
-
//#region ../../node_modules/.pnpm/ws@8.
|
|
15953
|
+
//#region ../../node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/sender.js
|
|
15954
15954
|
var require_sender = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
15955
15955
|
const { Duplex: Duplex$3 } = __require("stream");
|
|
15956
15956
|
const { randomFillSync } = __require("crypto");
|
|
@@ -16446,7 +16446,7 @@ var require_sender = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
16446
16446
|
}));
|
|
16447
16447
|
|
|
16448
16448
|
//#endregion
|
|
16449
|
-
//#region ../../node_modules/.pnpm/ws@8.
|
|
16449
|
+
//#region ../../node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/event-target.js
|
|
16450
16450
|
var require_event_target = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
16451
16451
|
const { kForOnEventAttribute, kListener } = require_constants();
|
|
16452
16452
|
const kCode = Symbol("kCode");
|
|
@@ -16666,7 +16666,7 @@ var require_event_target = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
16666
16666
|
}));
|
|
16667
16667
|
|
|
16668
16668
|
//#endregion
|
|
16669
|
-
//#region ../../node_modules/.pnpm/ws@8.
|
|
16669
|
+
//#region ../../node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/extension.js
|
|
16670
16670
|
var require_extension = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
16671
16671
|
const { tokenChars } = require_validation();
|
|
16672
16672
|
/**
|
|
@@ -16810,7 +16810,7 @@ var require_extension = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
16810
16810
|
}));
|
|
16811
16811
|
|
|
16812
16812
|
//#endregion
|
|
16813
|
-
//#region ../../node_modules/.pnpm/ws@8.
|
|
16813
|
+
//#region ../../node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/websocket.js
|
|
16814
16814
|
var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
16815
16815
|
const EventEmitter$2 = __require("events");
|
|
16816
16816
|
const https$3 = __require("https");
|
|
@@ -16824,11 +16824,10 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
16824
16824
|
const Receiver = require_receiver();
|
|
16825
16825
|
const Sender = require_sender();
|
|
16826
16826
|
const { isBlob } = require_validation();
|
|
16827
|
-
const { BINARY_TYPES, EMPTY_BUFFER, GUID, kForOnEventAttribute, kListener, kStatusCode, kWebSocket, NOOP } = require_constants();
|
|
16827
|
+
const { BINARY_TYPES, CLOSE_TIMEOUT, EMPTY_BUFFER, GUID, kForOnEventAttribute, kListener, kStatusCode, kWebSocket, NOOP } = require_constants();
|
|
16828
16828
|
const { EventTarget: { addEventListener, removeEventListener } } = require_event_target();
|
|
16829
16829
|
const { format, parse } = require_extension();
|
|
16830
16830
|
const { toBuffer } = require_buffer_util();
|
|
16831
|
-
const closeTimeout = 30 * 1e3;
|
|
16832
16831
|
const kAborted = Symbol("kAborted");
|
|
16833
16832
|
const protocolVersions = [8, 13];
|
|
16834
16833
|
const readyStates = [
|
|
@@ -16879,6 +16878,7 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
16879
16878
|
initAsClient(this, address, protocols, options);
|
|
16880
16879
|
} else {
|
|
16881
16880
|
this._autoPong = options.autoPong;
|
|
16881
|
+
this._closeTimeout = options.closeTimeout;
|
|
16882
16882
|
this._isServer = true;
|
|
16883
16883
|
}
|
|
16884
16884
|
}
|
|
@@ -17299,6 +17299,8 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
17299
17299
|
* times in the same tick
|
|
17300
17300
|
* @param {Boolean} [options.autoPong=true] Specifies whether or not to
|
|
17301
17301
|
* automatically send a pong in response to a ping
|
|
17302
|
+
* @param {Number} [options.closeTimeout=30000] Duration in milliseconds to wait
|
|
17303
|
+
* for the closing handshake to finish after `websocket.close()` is called
|
|
17302
17304
|
* @param {Function} [options.finishRequest] A function which can be used to
|
|
17303
17305
|
* customize the headers of each http request before it is sent
|
|
17304
17306
|
* @param {Boolean} [options.followRedirects=false] Whether or not to follow
|
|
@@ -17325,6 +17327,7 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
17325
17327
|
const opts = {
|
|
17326
17328
|
allowSynchronousEvents: true,
|
|
17327
17329
|
autoPong: true,
|
|
17330
|
+
closeTimeout: CLOSE_TIMEOUT,
|
|
17328
17331
|
protocolVersion: protocolVersions[1],
|
|
17329
17332
|
maxPayload: 100 * 1024 * 1024,
|
|
17330
17333
|
skipUTF8Validation: false,
|
|
@@ -17342,6 +17345,7 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
17342
17345
|
port: void 0
|
|
17343
17346
|
};
|
|
17344
17347
|
websocket._autoPong = opts.autoPong;
|
|
17348
|
+
websocket._closeTimeout = opts.closeTimeout;
|
|
17345
17349
|
if (!protocolVersions.includes(opts.protocolVersion)) throw new RangeError(`Unsupported protocol version: ${opts.protocolVersion} (supported versions: ${protocolVersions.join(", ")})`);
|
|
17346
17350
|
let parsedUrl;
|
|
17347
17351
|
if (address instanceof URL$2) parsedUrl = address;
|
|
@@ -17715,7 +17719,7 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
17715
17719
|
* @private
|
|
17716
17720
|
*/
|
|
17717
17721
|
function setCloseTimer(websocket) {
|
|
17718
|
-
websocket._closeTimer = setTimeout(websocket._socket.destroy.bind(websocket._socket),
|
|
17722
|
+
websocket._closeTimer = setTimeout(websocket._socket.destroy.bind(websocket._socket), websocket._closeTimeout);
|
|
17719
17723
|
}
|
|
17720
17724
|
/**
|
|
17721
17725
|
* The listener of the socket `'close'` event.
|
|
@@ -17728,8 +17732,10 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
17728
17732
|
this.removeListener("data", socketOnData);
|
|
17729
17733
|
this.removeListener("end", socketOnEnd);
|
|
17730
17734
|
websocket._readyState = WebSocket.CLOSING;
|
|
17731
|
-
|
|
17732
|
-
|
|
17735
|
+
if (!this._readableState.endEmitted && !websocket._closeFrameReceived && !websocket._receiver._writableState.errorEmitted && this._readableState.length !== 0) {
|
|
17736
|
+
const chunk = this.read(this._readableState.length);
|
|
17737
|
+
websocket._receiver.write(chunk);
|
|
17738
|
+
}
|
|
17733
17739
|
websocket._receiver.end();
|
|
17734
17740
|
this[kWebSocket] = void 0;
|
|
17735
17741
|
clearTimeout(websocket._closeTimer);
|
|
@@ -17776,7 +17782,7 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
17776
17782
|
}));
|
|
17777
17783
|
|
|
17778
17784
|
//#endregion
|
|
17779
|
-
//#region ../../node_modules/.pnpm/ws@8.
|
|
17785
|
+
//#region ../../node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/stream.js
|
|
17780
17786
|
var require_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
17781
17787
|
require_websocket();
|
|
17782
17788
|
const { Duplex: Duplex$1 } = __require("stream");
|
|
@@ -17893,7 +17899,7 @@ var require_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
17893
17899
|
}));
|
|
17894
17900
|
|
|
17895
17901
|
//#endregion
|
|
17896
|
-
//#region ../../node_modules/.pnpm/ws@8.
|
|
17902
|
+
//#region ../../node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/subprotocol.js
|
|
17897
17903
|
var require_subprotocol = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
17898
17904
|
const { tokenChars } = require_validation();
|
|
17899
17905
|
/**
|
|
@@ -17933,7 +17939,7 @@ var require_subprotocol = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
17933
17939
|
}));
|
|
17934
17940
|
|
|
17935
17941
|
//#endregion
|
|
17936
|
-
//#region ../../node_modules/.pnpm/ws@8.
|
|
17942
|
+
//#region ../../node_modules/.pnpm/ws@8.19.0/node_modules/ws/lib/websocket-server.js
|
|
17937
17943
|
var require_websocket_server = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
17938
17944
|
const EventEmitter$1 = __require("events");
|
|
17939
17945
|
const http$4 = __require("http");
|
|
@@ -17943,7 +17949,7 @@ var require_websocket_server = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
17943
17949
|
const PerMessageDeflate = require_permessage_deflate();
|
|
17944
17950
|
const subprotocol = require_subprotocol();
|
|
17945
17951
|
const WebSocket = require_websocket();
|
|
17946
|
-
const { GUID, kWebSocket } = require_constants();
|
|
17952
|
+
const { CLOSE_TIMEOUT, GUID, kWebSocket } = require_constants();
|
|
17947
17953
|
const keyRegex = /^[+/0-9A-Za-z]{22}==$/;
|
|
17948
17954
|
const RUNNING = 0;
|
|
17949
17955
|
const CLOSING = 1;
|
|
@@ -17967,6 +17973,9 @@ var require_websocket_server = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
17967
17973
|
* pending connections
|
|
17968
17974
|
* @param {Boolean} [options.clientTracking=true] Specifies whether or not to
|
|
17969
17975
|
* track clients
|
|
17976
|
+
* @param {Number} [options.closeTimeout=30000] Duration in milliseconds to
|
|
17977
|
+
* wait for the closing handshake to finish after `websocket.close()` is
|
|
17978
|
+
* called
|
|
17970
17979
|
* @param {Function} [options.handleProtocols] A hook to handle protocols
|
|
17971
17980
|
* @param {String} [options.host] The hostname where to bind the server
|
|
17972
17981
|
* @param {Number} [options.maxPayload=104857600] The maximum allowed message
|
|
@@ -17995,6 +18004,7 @@ var require_websocket_server = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
17995
18004
|
perMessageDeflate: false,
|
|
17996
18005
|
handleProtocols: null,
|
|
17997
18006
|
clientTracking: true,
|
|
18007
|
+
closeTimeout: CLOSE_TIMEOUT,
|
|
17998
18008
|
verifyClient: null,
|
|
17999
18009
|
noServer: false,
|
|
18000
18010
|
backlog: null,
|
|
@@ -18304,7 +18314,7 @@ var require_websocket_server = /* @__PURE__ */ __commonJSMin(((exports, module)
|
|
|
18304
18314
|
}));
|
|
18305
18315
|
|
|
18306
18316
|
//#endregion
|
|
18307
|
-
//#region ../../node_modules/.pnpm/ws@8.
|
|
18317
|
+
//#region ../../node_modules/.pnpm/ws@8.19.0/node_modules/ws/wrapper.mjs
|
|
18308
18318
|
var import_stream = /* @__PURE__ */ __toESM(require_stream(), 1);
|
|
18309
18319
|
var import_receiver = /* @__PURE__ */ __toESM(require_receiver(), 1);
|
|
18310
18320
|
var import_sender = /* @__PURE__ */ __toESM(require_sender(), 1);
|
|
@@ -22721,8 +22731,8 @@ function createCachedImport(imp) {
|
|
|
22721
22731
|
return cached;
|
|
22722
22732
|
};
|
|
22723
22733
|
}
|
|
22724
|
-
const importPostcssImport = createCachedImport(() => import("./postcss-import.js").then(
|
|
22725
|
-
const importPostcssModules = createCachedImport(() => import("./build2.js").then(
|
|
22734
|
+
const importPostcssImport = createCachedImport(() => import("./postcss-import.js").then((m) => /* @__PURE__ */ __toESM(m.default, 1)));
|
|
22735
|
+
const importPostcssModules = createCachedImport(() => import("./build2.js").then((m) => /* @__PURE__ */ __toESM(m.default, 1)));
|
|
22726
22736
|
const importPostcss = createCachedImport(() => import("postcss"));
|
|
22727
22737
|
const preprocessorWorkerControllerCache = /* @__PURE__ */ new WeakMap();
|
|
22728
22738
|
let alwaysFakeWorkerWorkerControllerCache;
|
|
@@ -23301,7 +23311,7 @@ const makeStylWorker = (maxWorkers) => {
|
|
|
23301
23311
|
};
|
|
23302
23312
|
}, {
|
|
23303
23313
|
shouldUseFake(_stylusPath, _content, _root, options) {
|
|
23304
|
-
return !!(options.define && Object.values(options.define).some((d) => typeof d === "function"));
|
|
23314
|
+
return !!(options.define && Object.values(options.define).some((d) => typeof d === "function") || options.Evaluator);
|
|
23305
23315
|
},
|
|
23306
23316
|
max: maxWorkers
|
|
23307
23317
|
});
|
|
@@ -23547,6 +23557,7 @@ const esMap = {
|
|
|
23547
23557
|
"chrome49",
|
|
23548
23558
|
"edge13",
|
|
23549
23559
|
"safari10",
|
|
23560
|
+
"ios10",
|
|
23550
23561
|
"firefox44",
|
|
23551
23562
|
"opera36"
|
|
23552
23563
|
],
|
|
@@ -23554,6 +23565,7 @@ const esMap = {
|
|
|
23554
23565
|
"chrome50",
|
|
23555
23566
|
"edge13",
|
|
23556
23567
|
"safari10",
|
|
23568
|
+
"ios10",
|
|
23557
23569
|
"firefox43",
|
|
23558
23570
|
"opera37"
|
|
23559
23571
|
],
|
|
@@ -23561,6 +23573,7 @@ const esMap = {
|
|
|
23561
23573
|
"chrome58",
|
|
23562
23574
|
"edge15",
|
|
23563
23575
|
"safari11",
|
|
23576
|
+
"ios11",
|
|
23564
23577
|
"firefox52",
|
|
23565
23578
|
"opera45"
|
|
23566
23579
|
],
|
|
@@ -23568,6 +23581,7 @@ const esMap = {
|
|
|
23568
23581
|
"chrome63",
|
|
23569
23582
|
"edge79",
|
|
23570
23583
|
"safari12",
|
|
23584
|
+
"ios12",
|
|
23571
23585
|
"firefox58",
|
|
23572
23586
|
"opera50"
|
|
23573
23587
|
],
|
|
@@ -23575,6 +23589,7 @@ const esMap = {
|
|
|
23575
23589
|
"chrome73",
|
|
23576
23590
|
"edge79",
|
|
23577
23591
|
"safari12.1",
|
|
23592
|
+
"ios12.1",
|
|
23578
23593
|
"firefox64",
|
|
23579
23594
|
"opera60"
|
|
23580
23595
|
],
|
|
@@ -23582,6 +23597,7 @@ const esMap = {
|
|
|
23582
23597
|
"chrome80",
|
|
23583
23598
|
"edge80",
|
|
23584
23599
|
"safari14.1",
|
|
23600
|
+
"ios14.5",
|
|
23585
23601
|
"firefox80",
|
|
23586
23602
|
"opera67"
|
|
23587
23603
|
],
|
|
@@ -23589,6 +23605,7 @@ const esMap = {
|
|
|
23589
23605
|
"chrome85",
|
|
23590
23606
|
"edge85",
|
|
23591
23607
|
"safari14.1",
|
|
23608
|
+
"ios14.5",
|
|
23592
23609
|
"firefox80",
|
|
23593
23610
|
"opera71"
|
|
23594
23611
|
],
|
|
@@ -23596,6 +23613,7 @@ const esMap = {
|
|
|
23596
23613
|
"chrome94",
|
|
23597
23614
|
"edge94",
|
|
23598
23615
|
"safari16.4",
|
|
23616
|
+
"ios16.4",
|
|
23599
23617
|
"firefox93",
|
|
23600
23618
|
"opera80"
|
|
23601
23619
|
],
|
|
@@ -23603,6 +23621,7 @@ const esMap = {
|
|
|
23603
23621
|
"chrome110",
|
|
23604
23622
|
"edge110",
|
|
23605
23623
|
"safari16.4",
|
|
23624
|
+
"ios16.4",
|
|
23606
23625
|
"firefox146",
|
|
23607
23626
|
"opera96"
|
|
23608
23627
|
],
|
|
@@ -23610,6 +23629,7 @@ const esMap = {
|
|
|
23610
23629
|
"chrome119",
|
|
23611
23630
|
"edge119",
|
|
23612
23631
|
"safari17.4",
|
|
23632
|
+
"ios17.4",
|
|
23613
23633
|
"firefox145",
|
|
23614
23634
|
"opera105"
|
|
23615
23635
|
]
|
|
@@ -29750,7 +29770,7 @@ function importAnalysisPlugin(config) {
|
|
|
29750
29770
|
interopNamedImports(str(), importSpecifier, url$4, index, importer, isNodeMode(), config);
|
|
29751
29771
|
rewriteDone = true;
|
|
29752
29772
|
}
|
|
29753
|
-
} else if (url$4.
|
|
29773
|
+
} else if (url$4.startsWith(wrapId(browserExternalId)) && source.slice(expStart, start).includes("{")) {
|
|
29754
29774
|
interopNamedImports(str(), importSpecifier, url$4, index, importer, isNodeMode(), config);
|
|
29755
29775
|
rewriteDone = true;
|
|
29756
29776
|
}
|
|
@@ -35285,7 +35305,8 @@ const configDefaults = Object.freeze({
|
|
|
35285
35305
|
extensions: [],
|
|
35286
35306
|
disabled: "build",
|
|
35287
35307
|
holdUntilCrawlEnd: true,
|
|
35288
|
-
force: false
|
|
35308
|
+
force: false,
|
|
35309
|
+
ignoreOutdatedRequests: false
|
|
35289
35310
|
},
|
|
35290
35311
|
ssr: ssrConfigDefaults,
|
|
35291
35312
|
environments: {},
|
package/dist/node/cli.js
CHANGED
package/dist/node/index.d.ts
CHANGED
|
@@ -885,6 +885,14 @@ interface DepOptimizationConfig {
|
|
|
885
885
|
* @experimental
|
|
886
886
|
*/
|
|
887
887
|
holdUntilCrawlEnd?: boolean;
|
|
888
|
+
/**
|
|
889
|
+
* When enabled, Vite will not throw an error when an outdated optimized
|
|
890
|
+
* dependency is requested. Enabling this option may cause a single module
|
|
891
|
+
* to have a multiple reference.
|
|
892
|
+
* @default false
|
|
893
|
+
* @experimental
|
|
894
|
+
*/
|
|
895
|
+
ignoreOutdatedRequests?: boolean;
|
|
888
896
|
}
|
|
889
897
|
type DepOptimizationOptions = DepOptimizationConfig & {
|
|
890
898
|
/**
|
|
@@ -873,7 +873,7 @@ function wrapCallSite(frame, state) {
|
|
|
873
873
|
state.curPosition = position, frame = cloneCallSite(frame);
|
|
874
874
|
let originalFunctionName = frame.getFunctionName;
|
|
875
875
|
return frame.getFunctionName = function() {
|
|
876
|
-
let name =
|
|
876
|
+
let name = state.nextPosition == null ? originalFunctionName() : state.nextPosition.name || originalFunctionName();
|
|
877
877
|
return name === "eval" && "_vite" in position ? null : name;
|
|
878
878
|
}, frame.getFileName = function() {
|
|
879
879
|
return position.source ?? null;
|
|
@@ -1045,7 +1045,7 @@ var ModuleRunner = class {
|
|
|
1045
1045
|
if (importee && importers.add(importee), (callstack.includes(moduleId) || this.isCircularModule(mod) || this.isCircularImport(importers, moduleId)) && mod.exports) return this.processImport(mod.exports, meta, metadata);
|
|
1046
1046
|
let debugTimer;
|
|
1047
1047
|
this.debug && (debugTimer = setTimeout(() => {
|
|
1048
|
-
this.debug(`[module runner] module ${moduleId} takes over 2s to load.\n${
|
|
1048
|
+
this.debug(`[module runner] module ${moduleId} takes over 2s to load.\n${`stack:\n${[...callstack, moduleId].reverse().map((p) => ` - ${p}`).join("\n")}`}`);
|
|
1049
1049
|
}, 2e3));
|
|
1050
1050
|
try {
|
|
1051
1051
|
if (mod.promise) return this.processImport(await mod.promise, meta, metadata);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite",
|
|
3
|
-
"version": "8.0.0-beta.
|
|
3
|
+
"version": "8.0.0-beta.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Evan You",
|
|
@@ -60,12 +60,12 @@
|
|
|
60
60
|
"funding": "https://github.com/vitejs/vite?sponsor=1",
|
|
61
61
|
"//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@oxc-project/runtime": "0.
|
|
63
|
+
"@oxc-project/runtime": "0.107.0",
|
|
64
64
|
"fdir": "^6.5.0",
|
|
65
65
|
"lightningcss": "^1.30.2",
|
|
66
66
|
"picomatch": "^4.0.3",
|
|
67
67
|
"postcss": "^8.5.6",
|
|
68
|
-
"rolldown": "1.0.0-beta.
|
|
68
|
+
"rolldown": "1.0.0-beta.59",
|
|
69
69
|
"tinyglobby": "^0.2.15"
|
|
70
70
|
},
|
|
71
71
|
"optionalDependencies": {
|
|
@@ -75,9 +75,9 @@
|
|
|
75
75
|
"@babel/parser": "^7.28.5",
|
|
76
76
|
"@jridgewell/remapping": "^2.3.5",
|
|
77
77
|
"@jridgewell/trace-mapping": "^0.3.31",
|
|
78
|
-
"@oxc-project/types": "0.
|
|
78
|
+
"@oxc-project/types": "0.107.0",
|
|
79
79
|
"@polka/compression": "^1.0.0-next.25",
|
|
80
|
-
"@rolldown/pluginutils": "1.0.0-beta.
|
|
80
|
+
"@rolldown/pluginutils": "1.0.0-beta.59",
|
|
81
81
|
"@rollup/plugin-alias": "^5.1.1",
|
|
82
82
|
"@rollup/plugin-commonjs": "^29.0.0",
|
|
83
83
|
"@rollup/plugin-dynamic-import-vars": "2.1.4",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"@types/escape-html": "^1.0.4",
|
|
86
86
|
"@types/pnpapi": "^0.0.5",
|
|
87
87
|
"artichokie": "^0.4.2",
|
|
88
|
-
"baseline-browser-mapping": "^2.9.
|
|
88
|
+
"baseline-browser-mapping": "^2.9.11",
|
|
89
89
|
"cac": "^6.7.14",
|
|
90
90
|
"chokidar": "^3.6.0",
|
|
91
91
|
"connect": "^3.7.0",
|
|
@@ -120,14 +120,14 @@
|
|
|
120
120
|
"rolldown-plugin-dts": "^0.20.0",
|
|
121
121
|
"rollup": "^4.43.0",
|
|
122
122
|
"rollup-plugin-license": "^3.6.0",
|
|
123
|
-
"sass": "^1.
|
|
124
|
-
"sass-embedded": "^1.
|
|
123
|
+
"sass": "^1.97.2",
|
|
124
|
+
"sass-embedded": "^1.97.2",
|
|
125
125
|
"sirv": "^3.0.2",
|
|
126
126
|
"strip-literal": "^3.1.0",
|
|
127
127
|
"terser": "^5.44.1",
|
|
128
128
|
"tsconfck": "^3.1.6",
|
|
129
|
-
"ufo": "^1.6.
|
|
130
|
-
"ws": "^8.
|
|
129
|
+
"ufo": "^1.6.2",
|
|
130
|
+
"ws": "^8.19.0"
|
|
131
131
|
},
|
|
132
132
|
"peerDependencies": {
|
|
133
133
|
"@types/node": "^20.19.0 || >=22.12.0",
|