@@ -11,3 +11,3 @@ import "@vite/env"; | ||
| //#endregion | ||
| //#region ../../node_modules/.pnpm/rolldown@1.2.1/node_modules/rolldown/dist/experimental-runtime-base.mjs | ||
| //#region ../../node_modules/.pnpm/rolldown@1.2.4/node_modules/rolldown/dist/experimental-runtime-base.mjs | ||
| var __create = Object.create; | ||
@@ -45,3 +45,3 @@ var __defProp = Object.defineProperty; | ||
| //#endregion | ||
| //#region \0@oxc-project+runtime@0.142.0/helpers/esm/typeof.js | ||
| //#region \0@oxc-project+runtime@0.144.0/helpers/esm/typeof.js | ||
| function _typeof(o) { | ||
@@ -56,3 +56,3 @@ "@babel/helpers - typeof"; | ||
| //#endregion | ||
| //#region \0@oxc-project+runtime@0.142.0/helpers/esm/toPrimitive.js | ||
| //#region \0@oxc-project+runtime@0.144.0/helpers/esm/toPrimitive.js | ||
| function toPrimitive(t, r) { | ||
@@ -69,3 +69,3 @@ if ("object" != _typeof(t) || !t) return t; | ||
| //#endregion | ||
| //#region \0@oxc-project+runtime@0.142.0/helpers/esm/toPropertyKey.js | ||
| //#region \0@oxc-project+runtime@0.144.0/helpers/esm/toPropertyKey.js | ||
| function toPropertyKey(t) { | ||
@@ -76,3 +76,3 @@ var i = toPrimitive(t, "string"); | ||
| //#endregion | ||
| //#region \0@oxc-project+runtime@0.142.0/helpers/esm/defineProperty.js | ||
| //#region \0@oxc-project+runtime@0.144.0/helpers/esm/defineProperty.js | ||
| function _defineProperty(e, r, t) { | ||
@@ -87,3 +87,3 @@ return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { | ||
| //#endregion | ||
| //#region ../../node_modules/.pnpm/rolldown@1.2.1/node_modules/rolldown/dist/experimental-runtime.mjs | ||
| //#region ../../node_modules/.pnpm/rolldown@1.2.4/node_modules/rolldown/dist/experimental-runtime.mjs | ||
| var Module = class { | ||
@@ -594,3 +594,7 @@ /** | ||
| if (this.isSelfAccepted(id)) { | ||
| boundaries.push([id, id]); | ||
| boundaries.push({ | ||
| boundary: id, | ||
| acceptedVia: id, | ||
| isWithinCircularImport: this.isNodeWithinCircularImports(id, stack) | ||
| }); | ||
| return; | ||
@@ -604,14 +608,49 @@ } | ||
| for (const parent of parents) { | ||
| const subChain = [...stack, parent]; | ||
| if (this.acceptsDep(parent, id)) { | ||
| boundaries.push([parent, id]); | ||
| boundaries.push({ | ||
| boundary: parent, | ||
| acceptedVia: id, | ||
| isWithinCircularImport: this.isNodeWithinCircularImports(parent, subChain) | ||
| }); | ||
| continue; | ||
| } | ||
| if (stack.includes(parent)) return { | ||
| type: "full-reload", | ||
| reason: `circular import chain between \`${id}\` and \`${parent}\`` | ||
| }; | ||
| const fullReload = this.bubble(parent, [...stack, parent], updateSet, boundaries, firstInvalidatedBy, traversedModules); | ||
| if (fullReload) return fullReload; | ||
| if (!stack.includes(parent)) { | ||
| const fullReload = this.bubble(parent, subChain, updateSet, boundaries, firstInvalidatedBy, traversedModules); | ||
| if (fullReload) return fullReload; | ||
| } | ||
| } | ||
| } | ||
| /** | ||
| * Check importers recursively if it's an import loop. An accepted module within | ||
| * an import loop cannot recover its execution order and should be reloaded. | ||
| * | ||
| * @param node The node that accepts HMR and is a boundary | ||
| * @param nodeChain The chain of nodes/imports that lead to the node. | ||
| * (The last node in the chain imports the `node` parameter) | ||
| * @param currentChain The current chain tracked from the `node` parameter | ||
| * @param traversedModules The set of modules that have traversed | ||
| */ | ||
| isNodeWithinCircularImports(node, nodeChain, currentChain = [node], traversedModules = /* @__PURE__ */ new Set()) { | ||
| if (traversedModules.has(node)) return false; | ||
| traversedModules.add(node); | ||
| for (const importer of this.runtime.getImporters(node)) { | ||
| if (importer === node) continue; | ||
| const importerIndex = nodeChain.indexOf(importer); | ||
| if (importerIndex > -1) { | ||
| const importChain = [ | ||
| importer, | ||
| ...[...currentChain].reverse(), | ||
| ...nodeChain.slice(importerIndex, -1).reverse() | ||
| ]; | ||
| this.logger.debug(`circular imports detected: ${importChain.join(" -> ")}`); | ||
| return true; | ||
| } | ||
| if (!currentChain.includes(importer)) { | ||
| const result = this.isNodeWithinCircularImports(importer, nodeChain, currentChain.concat(importer), traversedModules); | ||
| if (result) return result; | ||
| } | ||
| } | ||
| return false; | ||
| } | ||
| handlePush(payload) { | ||
@@ -685,12 +724,22 @@ this.applyQueue = this.applyQueue.then(() => this.applyPush(payload)).catch((err) => { | ||
| } | ||
| const applies = update.boundaries.map(([boundary, acceptedVia]) => ({ | ||
| const applies = update.boundaries.map(({ boundary, acceptedVia, isWithinCircularImport }) => ({ | ||
| boundary, | ||
| acceptedVia, | ||
| isWithinCircularImport, | ||
| callbacks: this.hotModulesMap.get(boundary)?.callbacks.filter((c) => c.deps.includes(acceptedVia)) ?? [] | ||
| })); | ||
| for (const id of update.updateSet) this.runtime.removeModuleCache(id); | ||
| for (const { boundary, acceptedVia, callbacks } of applies) { | ||
| this.runtime.initModule(acceptedVia); | ||
| const fresh = this.runtime.loadExports(acceptedVia); | ||
| for (const { boundary, acceptedVia, isWithinCircularImport, callbacks } of applies) { | ||
| let fresh; | ||
| try { | ||
| this.runtime.initModule(acceptedVia); | ||
| fresh = this.runtime.loadExports(acceptedVia); | ||
| } catch (err) { | ||
| if (isWithinCircularImport) { | ||
| this.requestFullReload(`${acceptedVia} failed to apply HMR as it's within a circular import. Reloading page to reset the execution order.`); | ||
| return; | ||
| } | ||
| throw err; | ||
| } | ||
| try { | ||
| this.currentFirstInvalidatedBy = firstInvalidatedBy; | ||
@@ -707,3 +756,3 @@ for (const { deps, fn } of callbacks) fn(deps.map((dep) => dep === acceptedVia ? fresh : void 0)); | ||
| type: "update", | ||
| updates: boundaries.map(([boundary, acceptedVia]) => ({ | ||
| updates: boundaries.map(({ boundary, acceptedVia, isWithinCircularImport }) => ({ | ||
| type: "js-update", | ||
@@ -713,2 +762,3 @@ path: boundary, | ||
| timestamp: Date.now(), | ||
| isWithinCircularImport, | ||
| firstInvalidatedBy | ||
@@ -896,9 +946,13 @@ })) | ||
| if (!invokeableTransport.send) return; | ||
| if (!isConnected) if (connectingPromise) await connectingPromise; | ||
| else throw new SendBeforeConnectError("send was called before connect"); | ||
| if (!isConnected) { | ||
| if (connectingPromise) await connectingPromise; | ||
| else throw new SendBeforeConnectError("send was called before connect"); | ||
| } | ||
| await invokeableTransport.send(data); | ||
| }, | ||
| async invoke(name, data) { | ||
| if (!isConnected) if (connectingPromise) await connectingPromise; | ||
| else throw new SendBeforeConnectError("invoke was called before connect"); | ||
| if (!isConnected) { | ||
| if (connectingPromise) await connectingPromise; | ||
| else throw new SendBeforeConnectError("invoke was called before connect"); | ||
| } | ||
| return invokeableTransport.invoke(name, data); | ||
@@ -1524,8 +1578,10 @@ } | ||
| await activeHmrClient.notifyListeners("vite:beforeFullReload", payload); | ||
| if (hasDocument) if (payload.path && payload.path.endsWith(".html")) { | ||
| const pagePath = decodeURI(location.pathname); | ||
| const payloadPath = base + payload.path.slice(1); | ||
| if (pagePath === payloadPath || payload.path === "/index.html" || pagePath.endsWith("/") && pagePath + "index.html" === payloadPath) pageReload(); | ||
| return; | ||
| } else pageReload(); | ||
| if (hasDocument) { | ||
| if (payload.path && payload.path.endsWith(".html")) { | ||
| const pagePath = decodeURI(location.pathname); | ||
| const payloadPath = base + payload.path.slice(1); | ||
| if (pagePath === payloadPath || payload.path === "/index.html" || pagePath.endsWith("/") && pagePath + "index.html" === payloadPath) pageReload(); | ||
| return; | ||
| } else pageReload(); | ||
| } | ||
| break; | ||
@@ -1532,0 +1588,0 @@ case "prune": |
+20
-14
| import "@vite/env"; | ||
| //#region \0@oxc-project+runtime@0.142.0/helpers/esm/typeof.js | ||
| //#region \0@oxc-project+runtime@0.144.0/helpers/esm/typeof.js | ||
| function _typeof(o) { | ||
@@ -12,3 +12,3 @@ "@babel/helpers - typeof"; | ||
| //#endregion | ||
| //#region \0@oxc-project+runtime@0.142.0/helpers/esm/toPrimitive.js | ||
| //#region \0@oxc-project+runtime@0.144.0/helpers/esm/toPrimitive.js | ||
| function toPrimitive(t, r) { | ||
@@ -25,3 +25,3 @@ if ("object" != _typeof(t) || !t) return t; | ||
| //#endregion | ||
| //#region \0@oxc-project+runtime@0.142.0/helpers/esm/toPropertyKey.js | ||
| //#region \0@oxc-project+runtime@0.144.0/helpers/esm/toPropertyKey.js | ||
| function toPropertyKey(t) { | ||
@@ -32,3 +32,3 @@ var i = toPrimitive(t, "string"); | ||
| //#endregion | ||
| //#region \0@oxc-project+runtime@0.142.0/helpers/esm/defineProperty.js | ||
| //#region \0@oxc-project+runtime@0.144.0/helpers/esm/defineProperty.js | ||
| function _defineProperty(e, r, t) { | ||
@@ -390,9 +390,13 @@ return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { | ||
| if (!invokeableTransport.send) return; | ||
| if (!isConnected) if (connectingPromise) await connectingPromise; | ||
| else throw new SendBeforeConnectError("send was called before connect"); | ||
| if (!isConnected) { | ||
| if (connectingPromise) await connectingPromise; | ||
| else throw new SendBeforeConnectError("send was called before connect"); | ||
| } | ||
| await invokeableTransport.send(data); | ||
| }, | ||
| async invoke(name, data) { | ||
| if (!isConnected) if (connectingPromise) await connectingPromise; | ||
| else throw new SendBeforeConnectError("invoke was called before connect"); | ||
| if (!isConnected) { | ||
| if (connectingPromise) await connectingPromise; | ||
| else throw new SendBeforeConnectError("invoke was called before connect"); | ||
| } | ||
| return invokeableTransport.invoke(name, data); | ||
@@ -1015,8 +1019,10 @@ } | ||
| await activeHmrClient.notifyListeners("vite:beforeFullReload", payload); | ||
| if (hasDocument) if (payload.path && payload.path.endsWith(".html")) { | ||
| const pagePath = decodeURI(location.pathname); | ||
| const payloadPath = base + payload.path.slice(1); | ||
| if (pagePath === payloadPath || payload.path === "/index.html" || pagePath.endsWith("/") && pagePath + "index.html" === payloadPath) pageReload(); | ||
| return; | ||
| } else pageReload(); | ||
| if (hasDocument) { | ||
| if (payload.path && payload.path.endsWith(".html")) { | ||
| const pagePath = decodeURI(location.pathname); | ||
| const payloadPath = base + payload.path.slice(1); | ||
| if (pagePath === payloadPath || payload.path === "/index.html" || pagePath.endsWith("/") && pagePath + "index.html" === payloadPath) pageReload(); | ||
| return; | ||
| } else pageReload(); | ||
| } | ||
| break; | ||
@@ -1023,0 +1029,0 @@ case "prune": |
| import { ft as __commonJSMin, pt as __require } from "./node.js"; | ||
| import { t as require_lib } from "./lib.js"; | ||
| //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.25/node_modules/postcss-import/lib/format-import-prelude.js | ||
| //#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.26/node_modules/postcss-import/lib/format-import-prelude.js | ||
| var require_format_import_prelude = /* @__PURE__ */ __commonJSMin(((exports, module) => { | ||
@@ -18,3 +18,3 @@ module.exports = function formatImportPrelude(layer, media, supports) { | ||
| //#endregion | ||
| //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.25/node_modules/postcss-import/lib/base64-encoded-import.js | ||
| //#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.26/node_modules/postcss-import/lib/base64-encoded-import.js | ||
| var require_base64_encoded_import = /* @__PURE__ */ __commonJSMin(((exports, module) => { | ||
@@ -32,3 +32,3 @@ const formatImportPrelude = require_format_import_prelude(); | ||
| //#endregion | ||
| //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.25/node_modules/postcss-import/lib/apply-conditions.js | ||
| //#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.26/node_modules/postcss-import/lib/apply-conditions.js | ||
| var require_apply_conditions = /* @__PURE__ */ __commonJSMin(((exports, module) => { | ||
@@ -108,3 +108,3 @@ const base64EncodedConditionalImport = require_base64_encoded_import(); | ||
| //#endregion | ||
| //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.25/node_modules/postcss-import/lib/apply-raws.js | ||
| //#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.26/node_modules/postcss-import/lib/apply-raws.js | ||
| var require_apply_raws = /* @__PURE__ */ __commonJSMin(((exports, module) => { | ||
@@ -114,7 +114,4 @@ module.exports = function applyRaws(bundle) { | ||
| if (index === 0) return; | ||
| if (stmt.parent) { | ||
| const { before } = stmt.parent.node.raws; | ||
| if (stmt.type === "nodes") stmt.nodes[0].raws.before = before; | ||
| else stmt.node.raws.before = before; | ||
| } else if (stmt.type === "nodes") stmt.nodes[0].raws.before = stmt.nodes[0].raws.before || "\n"; | ||
| if (stmt.type === "nodes") delete stmt.nodes[0].raws.before; | ||
| else if (stmt.parent) delete stmt.node.raws.before; | ||
| }); | ||
@@ -124,3 +121,3 @@ }; | ||
| //#endregion | ||
| //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.25/node_modules/postcss-import/lib/apply-styles.js | ||
| //#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.26/node_modules/postcss-import/lib/apply-styles.js | ||
| var require_apply_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => { | ||
@@ -145,3 +142,3 @@ module.exports = function applyStyles(bundle, styles) { | ||
| //#endregion | ||
| //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.25/node_modules/postcss-import/lib/data-url.js | ||
| //#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.26/node_modules/postcss-import/lib/data-url.js | ||
| var require_data_url = /* @__PURE__ */ __commonJSMin(((exports, module) => { | ||
@@ -165,3 +162,3 @@ const anyDataURLRegexp = /^data:text\/css(?:;(base64|plain))?,/i; | ||
| //#endregion | ||
| //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.25/node_modules/postcss-import/lib/parse-statements.js | ||
| //#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.26/node_modules/postcss-import/lib/parse-statements.js | ||
| var require_parse_statements = /* @__PURE__ */ __commonJSMin(((exports, module) => { | ||
@@ -225,3 +222,3 @@ const valueParser = require_lib(); | ||
| } | ||
| return result.warn("@import must precede all other statements (besides @charset or empty @layer)", { node: atRule }); | ||
| return result.warn("@import statements must precede all other statements (besides @charset or empty @layer) and be consecutive", { node: atRule }); | ||
| } while (prev); | ||
@@ -292,3 +289,3 @@ if (atRule.nodes) return result.warn("It looks like you didn't end your @import statement correctly. Child nodes are attached to it.", { node: atRule }); | ||
| //#endregion | ||
| //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.25/node_modules/postcss-import/lib/process-content.js | ||
| //#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.26/node_modules/postcss-import/lib/process-content.js | ||
| var require_process_content = /* @__PURE__ */ __commonJSMin(((exports, module) => { | ||
@@ -327,3 +324,3 @@ const path$2 = __require("path"); | ||
| //#endregion | ||
| //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.25/node_modules/postcss-import/lib/parse-styles.js | ||
| //#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.26/node_modules/postcss-import/lib/parse-styles.js | ||
| var require_parse_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => { | ||
@@ -354,11 +351,12 @@ const path$1 = __require("path"); | ||
| if (stmt.type === "charset") handleCharset(stmt); | ||
| else if (stmt.type === "import") if (stmt.children) stmt.children.forEach((child, index) => { | ||
| if (child.type === "import") beforeBundle.push(child); | ||
| else if (child.type === "layer") beforeBundle.push(child); | ||
| else if (child.type === "charset") handleCharset(child); | ||
| else bundle.push(child); | ||
| if (index === 0) child.parent = stmt; | ||
| }); | ||
| else beforeBundle.push(stmt); | ||
| else if (stmt.type === "layer") beforeBundle.push(stmt); | ||
| else if (stmt.type === "import") { | ||
| if (stmt.children) stmt.children.forEach((child, index) => { | ||
| if (child.type === "import") beforeBundle.push(child); | ||
| else if (child.type === "layer") beforeBundle.push(child); | ||
| else if (child.type === "charset") handleCharset(child); | ||
| else bundle.push(child); | ||
| if (index === 0) child.parent = stmt; | ||
| }); | ||
| else beforeBundle.push(stmt); | ||
| } else if (stmt.type === "layer") beforeBundle.push(stmt); | ||
| else if (stmt.type === "nodes") bundle.push(stmt); | ||
@@ -432,3 +430,3 @@ }); | ||
| //#endregion | ||
| //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.25/node_modules/postcss-import/index.js | ||
| //#region ../../node_modules/.pnpm/postcss-import@16.2.0_postcss@8.5.26/node_modules/postcss-import/index.js | ||
| var require_postcss_import = /* @__PURE__ */ __commonJSMin(((exports, module) => { | ||
@@ -435,0 +433,0 @@ const path = __require("path"); |
@@ -91,8 +91,8 @@ import { a as ExternalFetchResult, c as ViteFetchResult, i as createWebSocketModuleRunnerTransport, n as ModuleRunnerTransportHandlers, o as FetchFunctionOptions, r as NormalizedModuleRunnerTransport, s as FetchResult, t as ModuleRunnerTransport } from "./chunks/moduleRunnerTransport.js"; | ||
| //#region src/module-runner/constants.d.ts | ||
| declare const ssrModuleExportsKey = "__vite_ssr_exports__"; | ||
| declare const ssrImportKey = "__vite_ssr_import__"; | ||
| declare const ssrDynamicImportKey = "__vite_ssr_dynamic_import__"; | ||
| declare const ssrExportAllKey = "__vite_ssr_exportAll__"; | ||
| declare const ssrExportNameKey = "__vite_ssr_exportName__"; | ||
| declare const ssrImportMetaKey = "__vite_ssr_import_meta__"; | ||
| export declare const ssrModuleExportsKey = "__vite_ssr_exports__"; | ||
| export declare const ssrImportKey = "__vite_ssr_import__"; | ||
| export declare const ssrDynamicImportKey = "__vite_ssr_dynamic_import__"; | ||
| export declare const ssrExportAllKey = "__vite_ssr_exportAll__"; | ||
| export declare const ssrExportNameKey = "__vite_ssr_exportName__"; | ||
| export declare const ssrImportMetaKey = "__vite_ssr_import_meta__"; | ||
| //#endregion | ||
@@ -103,3 +103,3 @@ //#region src/module-runner/runner.d.ts | ||
| } | ||
| declare class ModuleRunner { | ||
| export declare class ModuleRunner { | ||
| options: ModuleRunnerOptions; | ||
@@ -257,3 +257,3 @@ evaluator: ModuleEvaluator; | ||
| } | ||
| declare class EvaluatedModules { | ||
| export declare class EvaluatedModules { | ||
| readonly idToModuleMap: Map<string, EvaluatedModuleNode>; | ||
@@ -300,6 +300,6 @@ readonly fileToModulesMap: Map<string, Set<EvaluatedModuleNode>>; | ||
| } | ||
| declare function normalizeModuleId(file: string): string; | ||
| export declare function normalizeModuleId(file: string): string; | ||
| //#endregion | ||
| //#region src/module-runner/esmEvaluator.d.ts | ||
| declare class ESModulesEvaluator implements ModuleEvaluator { | ||
| export declare class ESModulesEvaluator implements ModuleEvaluator { | ||
| readonly startOffset: number; | ||
@@ -311,8 +311,8 @@ runInlinedModule(context: ModuleRunnerContext, code: string): Promise<any>; | ||
| //#region src/module-runner/createImportMeta.d.ts | ||
| declare function createDefaultImportMeta(modulePath: string): ModuleRunnerImportMeta; | ||
| export declare function createDefaultImportMeta(modulePath: string): ModuleRunnerImportMeta; | ||
| /** | ||
| * Create import.meta object for Node.js. | ||
| */ | ||
| declare function createNodeImportMeta(modulePath: string): ModuleRunnerImportMeta; | ||
| export declare function createNodeImportMeta(modulePath: string): ModuleRunnerImportMeta; | ||
| //#endregion | ||
| export { ESModulesEvaluator, type EvaluatedModuleNode, EvaluatedModules, type FetchFunction, type FetchFunctionOptions, type FetchResult, type HMRLogger, type InterceptorOptions, type ModuleEvaluator, ModuleRunner, type ModuleRunnerContext, type ModuleRunnerHmr, type ModuleRunnerImportMeta, type ModuleRunnerOptions, type ModuleRunnerTransport, type ModuleRunnerTransportHandlers, type ResolvedResult, type SSRImportMetadata, createDefaultImportMeta, createNodeImportMeta, createWebSocketModuleRunnerTransport, normalizeModuleId, ssrDynamicImportKey, ssrExportAllKey, ssrExportNameKey, ssrImportKey, ssrImportMetaKey, ssrModuleExportsKey }; | ||
| export { type EvaluatedModuleNode, type FetchFunction, type FetchFunctionOptions, type FetchResult, type HMRLogger, type InterceptorOptions, type ModuleEvaluator, type ModuleRunnerContext, type ModuleRunnerHmr, type ModuleRunnerImportMeta, type ModuleRunnerOptions, type ModuleRunnerTransport, type ModuleRunnerTransportHandlers, type ResolvedResult, type SSRImportMetadata, createWebSocketModuleRunnerTransport }; |
@@ -68,16 +68,18 @@ let SOURCEMAPPING_URL = "sourceMa"; | ||
| if (char === "/") { | ||
| if (lastSlash !== index - 1 && dots !== 1) if (dots === 2) { | ||
| if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") { | ||
| if (res.length > 2) { | ||
| let lastSlashIndex = res.lastIndexOf("/"); | ||
| lastSlashIndex === -1 ? (res = "", lastSegmentLength = 0) : (res = res.slice(0, lastSlashIndex), lastSegmentLength = res.length - 1 - res.lastIndexOf("/")), lastSlash = index, dots = 0; | ||
| continue; | ||
| if (lastSlash !== index - 1 && dots !== 1) { | ||
| if (dots === 2) { | ||
| if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") { | ||
| if (res.length > 2) { | ||
| let lastSlashIndex = res.lastIndexOf("/"); | ||
| lastSlashIndex === -1 ? (res = "", lastSegmentLength = 0) : (res = res.slice(0, lastSlashIndex), lastSegmentLength = res.length - 1 - res.lastIndexOf("/")), lastSlash = index, dots = 0; | ||
| continue; | ||
| } | ||
| if (res.length > 0) { | ||
| res = "", lastSegmentLength = 0, lastSlash = index, dots = 0; | ||
| continue; | ||
| } | ||
| } | ||
| if (res.length > 0) { | ||
| res = "", lastSegmentLength = 0, lastSlash = index, dots = 0; | ||
| continue; | ||
| } | ||
| } | ||
| allowAboveRoot && (res += res.length > 0 ? "/.." : "..", lastSegmentLength = 2); | ||
| } else res.length > 0 ? res += `/${path.slice(lastSlash + 1, index)}` : res = path.slice(lastSlash + 1, index), lastSegmentLength = index - lastSlash - 1; | ||
| allowAboveRoot && (res += res.length > 0 ? "/.." : "..", lastSegmentLength = 2); | ||
| } else res.length > 0 ? res += `/${path.slice(lastSlash + 1, index)}` : res = path.slice(lastSlash + 1, index), lastSegmentLength = index - lastSlash - 1; | ||
| } | ||
| lastSlash = index, dots = 0; | ||
@@ -656,4 +658,6 @@ } else char === "." && dots !== -1 ? ++dots : dots = -1; | ||
| if (invokeableTransport.send) { | ||
| if (!isConnected) if (connectingPromise) await connectingPromise; | ||
| else throw new SendBeforeConnectError("send was called before connect"); | ||
| if (!isConnected) { | ||
| if (connectingPromise) await connectingPromise; | ||
| else throw new SendBeforeConnectError("send was called before connect"); | ||
| } | ||
| await invokeableTransport.send(data); | ||
@@ -663,4 +667,6 @@ } | ||
| async invoke(name, data) { | ||
| if (!isConnected) if (connectingPromise) await connectingPromise; | ||
| else throw new SendBeforeConnectError("invoke was called before connect"); | ||
| if (!isConnected) { | ||
| if (connectingPromise) await connectingPromise; | ||
| else throw new SendBeforeConnectError("invoke was called before connect"); | ||
| } | ||
| return invokeableTransport.invoke(name, data); | ||
@@ -1162,5 +1168,4 @@ } | ||
| for (let importedModuleId of mod.imports) { | ||
| if (callstack.includes(importedModuleId)) return !0; | ||
| let importedModule = this.evaluatedModules.getModuleById(importedModuleId); | ||
| if (importedModule?.promise && !importedModule.evaluated && this.isCircularRequest(importedModule, callstack, visited)) return !0; | ||
| if (!(!importedModule?.promise || importedModule.evaluated) && (callstack.includes(importedModuleId) || this.isCircularRequest(importedModule, callstack, visited))) return !0; | ||
| } | ||
@@ -1167,0 +1172,0 @@ return !1; |
+14
-14
| { | ||
| "name": "vite", | ||
| "version": "8.2.1", | ||
| "version": "8.2.2", | ||
| "description": "Native-ESM powered web dev build tool", | ||
@@ -61,4 +61,4 @@ "keywords": [ | ||
| "picomatch": "^4.0.5", | ||
| "postcss": "^8.5.25", | ||
| "rolldown": "~1.2.1", | ||
| "postcss": "^8.5.26", | ||
| "rolldown": "~1.2.4", | ||
| "tinyglobby": "^0.2.17" | ||
@@ -76,8 +76,8 @@ }, | ||
| "@types/pnpapi": "^0.0.5", | ||
| "@vercel/detect-agent": "^1.2.3", | ||
| "@vitejs/devtools": "^0.4.10", | ||
| "@vercel/detect-agent": "^1.2.5", | ||
| "@vitejs/devtools": "^0.4.12", | ||
| "@vitest/utils": "4.1.10", | ||
| "@voidzero-dev/vite-task-client": "^0.2.0", | ||
| "artichokie": "^0.4.4", | ||
| "baseline-browser-mapping": "^2.11.10", | ||
| "baseline-browser-mapping": "^2.11.14", | ||
| "cac": "^7.0.0", | ||
@@ -91,3 +91,3 @@ "chokidar": "^3.6.0", | ||
| "es-module-lexer": "^2.3.1", | ||
| "esbuild": "^0.28.1", | ||
| "esbuild": "^0.28.2", | ||
| "escape-html": "^1.0.3", | ||
@@ -100,3 +100,3 @@ "estree-walker": "^3.0.3", | ||
| "launch-editor-middleware": "^2.14.1", | ||
| "magic-string": "^1.1.0", | ||
| "magic-string": "^1.2.0", | ||
| "mlly": "^1.8.2", | ||
@@ -111,3 +111,3 @@ "mrmime": "^2.0.1", | ||
| "picocolors": "^1.1.1", | ||
| "postcss-import": "^16.1.1", | ||
| "postcss-import": "^16.2.0", | ||
| "postcss-load-config": "^6.0.1", | ||
@@ -117,16 +117,16 @@ "postcss-modules": "^9.0.1", | ||
| "resolve.exports": "^2.0.3", | ||
| "rolldown-plugin-dts": "^0.28.0", | ||
| "rolldown-plugin-dts": "^0.28.2", | ||
| "rollup": "^4.59.0", | ||
| "rollup-plugin-license": "^3.7.1", | ||
| "sass": "^1.102.0", | ||
| "sass-embedded": "^1.100.0", | ||
| "sass-embedded": "^1.102.0", | ||
| "sirv": "^3.0.2", | ||
| "strip-literal": "^4.0.0", | ||
| "terser": "^5.49.0", | ||
| "terser": "^5.50.0", | ||
| "ufo": "^1.6.4", | ||
| "ws": "^8.21.1" | ||
| "ws": "^8.21.3" | ||
| }, | ||
| "peerDependencies": { | ||
| "@types/node": "^20.19.0 || >=22.12.0", | ||
| "@vitejs/devtools": "^0.4.0", | ||
| "@vitejs/devtools": "^0.4.0 || ^0.5.0", | ||
| "esbuild": "^0.27.0 || ^0.28.0", | ||
@@ -133,0 +133,0 @@ "jiti": ">=1.21.0", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 2 instances
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
2342412
0.15%61134
0.3%18
12.5%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated
Updated