Socket
Socket
Sign inDemoInstall

vite

Package Overview
Dependencies
Maintainers
5
Versions
569
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite - npm Package Compare versions

Comparing version 6.0.0-alpha.19 to 6.0.0-alpha.20

dist/node/chunks/dep-BVDN2Cqw.js

8

client.d.ts

@@ -249,1 +249,9 @@ /// <reference path="./types/importMeta.d.ts" />

}
declare interface VitePreloadErrorEvent extends Event {
payload: Error
}
declare interface WindowEventMap {
'vite:preloadError': VitePreloadErrorEvent
}

61

dist/node/cli.js

@@ -5,3 +5,3 @@ import path from 'node:path';

import { EventEmitter } from 'events';
import { I as colors, A as createLogger, r as resolveConfig } from './chunks/dep-BWEMV5Th.js';
import { I as colors, A as createLogger, r as resolveConfig } from './chunks/dep-CpuHsFvF.js';
import { VERSION } from './constants.js';

@@ -39,3 +39,2 @@ import 'node:fs/promises';

import 'crypto';
import 'querystring';
import 'node:buffer';

@@ -48,2 +47,3 @@ import 'node:readline';

import 'assert';
import 'querystring';
import 'node:zlib';

@@ -742,3 +742,3 @@

filterDuplicateOptions(options);
const { createServer } = await import('./chunks/dep-BWEMV5Th.js').then(function (n) { return n.M; });
const { createServer } = await import('./chunks/dep-CpuHsFvF.js').then(function (n) { return n.M; });
try {

@@ -833,32 +833,41 @@ const server = await createServer({

`[boolean] force empty outDir when it's outside of root`
).option("-w, --watch", `[boolean] rebuilds when modules have changed on disk`).option("--environment [name]", `[string] build a single environment`).option("--app", `[boolean] same as builder.entireApp`).action(
).option("-w, --watch", `[boolean] rebuilds when modules have changed on disk`).option("--app", `[boolean] same as builder.entireApp`).action(
async (root, options) => {
filterDuplicateOptions(options);
const { createBuilder, buildEnvironment } = await import('./chunks/dep-BWEMV5Th.js').then(function (n) { return n.N; });
const build = await import('./chunks/dep-CpuHsFvF.js').then(function (n) { return n.N; });
const buildOptions = cleanGlobalCLIOptions(
cleanBuilderCLIOptions(options)
);
const config = {
root,
base: options.base,
mode: options.mode,
configFile: options.config,
logLevel: options.logLevel,
clearScreen: options.clearScreen,
build: buildOptions
};
try {
const builder = await createBuilder(config);
if (builder.config.build.lib) {
await buildEnvironment(
builder.config,
builder.environments.client,
builder.config.build.lib
const inlineConfig = {
root,
base: options.base,
mode: options.mode,
configFile: options.config,
logLevel: options.logLevel,
clearScreen: options.clearScreen,
build: buildOptions,
...options.app ? { builder: { entireApp: true } } : {}
};
const patchConfig = (resolved) => {
if (resolved.builder.entireApp) {
return;
}
const environmentName = resolved.build.ssr ? "ssr" : "client";
resolved.build = {
...resolved.environments[environmentName].build
};
};
const config = await build.resolveConfigToBuild(
inlineConfig,
patchConfig
);
if (config.builder.entireApp) {
const builder = await build.createBuilderWithResolvedConfig(
inlineConfig,
config
);
} else if (builder.config.builder.entireApp || options.app) {
await builder.buildApp();
} else {
const ssr = !!builder.config.build.ssr;
const environment = builder.environments[ssr ? "ssr" : "client"];
await builder.build(environment);
await build.buildWithResolvedConfig(config);
}

@@ -883,3 +892,3 @@ } catch (e) {

filterDuplicateOptions(options);
const { optimizeDeps } = await import('./chunks/dep-BWEMV5Th.js').then(function (n) { return n.L; });
const { optimizeDeps } = await import('./chunks/dep-CpuHsFvF.js').then(function (n) { return n.L; });
try {

@@ -910,3 +919,3 @@ const config = await resolveConfig(

filterDuplicateOptions(options);
const { preview } = await import('./chunks/dep-BWEMV5Th.js').then(function (n) { return n.O; });
const { preview } = await import('./chunks/dep-CpuHsFvF.js').then(function (n) { return n.O; });
try {

@@ -913,0 +922,0 @@ const server = await preview({

export { parseAst, parseAstAsync } from 'rollup/parseAst';
import { i as isInNodeModules, a as arraify } from './chunks/dep-BWEMV5Th.js';
export { B as BuildEnvironment, D as DevEnvironment, S as ServerHMRConnector, b as build, j as buildErrorMessage, e as createBuilder, x as createFilter, f as createIdResolver, A as createLogger, k as createNodeDevEnvironment, c as createServer, n as createServerModuleRunner, d as defineConfig, m as fetchModule, g as formatPostcssSourceMap, F as isFileLoadingAllowed, E as isFileServingAllowed, l as loadConfigFromFile, G as loadEnv, w as mergeAlias, v as mergeConfig, q as moduleRunnerTransform, u as normalizePath, o as optimizeDeps, h as preprocessCSS, p as preview, r as resolveConfig, H as resolveEnvPrefix, y as rollupVersion, C as searchForWorkspaceRoot, z as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-BWEMV5Th.js';
import { i as isInNodeModules, a as arraify } from './chunks/dep-CpuHsFvF.js';
export { B as BuildEnvironment, D as DevEnvironment, S as ServerHMRConnector, b as build, j as buildErrorMessage, e as createBuilder, x as createFilter, f as createIdResolver, A as createLogger, k as createNodeDevEnvironment, c as createServer, n as createServerModuleRunner, d as defineConfig, m as fetchModule, g as formatPostcssSourceMap, F as isFileLoadingAllowed, E as isFileServingAllowed, l as loadConfigFromFile, G as loadEnv, w as mergeAlias, v as mergeConfig, q as moduleRunnerTransform, u as normalizePath, o as optimizeDeps, h as preprocessCSS, p as preview, r as resolveConfig, H as resolveEnvPrefix, y as rollupVersion, C as searchForWorkspaceRoot, z as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-CpuHsFvF.js';
export { VERSION as version } from './constants.js';

@@ -39,3 +39,2 @@ export { version as esbuildVersion } from 'esbuild';

import 'crypto';
import 'querystring';
import 'node:buffer';

@@ -48,2 +47,3 @@ import 'node:readline';

import 'assert';
import 'querystring';
import 'node:zlib';

@@ -50,0 +50,0 @@

import { ModuleNamespace, ViteHotContext } from '../../types/hot.js';
import { Update, HotPayload } from '../../types/hotPayload.js';
import { Update, HotPayload } from '../../types/hmrPayload.js';
import { InferCustomEventPayload } from '../../types/customEvent.js';

@@ -4,0 +4,0 @@

@@ -101,35 +101,43 @@ const VALID_ID_PREFIX = "/@id/", NULL_BYTE_PLACEHOLDER = "__x00__";

}
function decodeInteger(reader, relative) {
let value = 0, shift = 0, integer = 0;
do {
const c = reader.next();
integer = charToInt[c], value |= (integer & 31) << shift, shift += 5;
} while (integer & 32);
const shouldNegate = value & 1;
return value >>>= 1, shouldNegate && (value = -2147483648 | -value), relative + value;
}
function hasMoreVlq(reader, max) {
return reader.pos >= max ? !1 : reader.peek() !== comma;
}
class StringReader {
constructor(buffer) {
this.pos = 0, this.buffer = buffer;
}
next() {
return this.buffer.charCodeAt(this.pos++);
}
peek() {
return this.buffer.charCodeAt(this.pos);
}
indexOf(char) {
const { buffer, pos } = this, idx = buffer.indexOf(char, pos);
return idx === -1 ? buffer.length : idx;
}
}
function decode(mappings) {
const state = new Int32Array(5), decoded = [];
let index = 0;
const { length } = mappings, reader = new StringReader(mappings), decoded = [];
let genColumn = 0, sourcesIndex = 0, sourceLine = 0, sourceColumn = 0, namesIndex = 0;
do {
const semi = indexOf(mappings, index), line = [];
const semi = reader.indexOf(";"), line = [];
let sorted = !0, lastCol = 0;
state[0] = 0;
for (let i = index; i < semi; i++) {
for (genColumn = 0; reader.pos < semi; ) {
let seg;
i = decodeInteger(mappings, i, state, 0);
const col = state[0];
col < lastCol && (sorted = !1), lastCol = col, hasMoreVlq(mappings, i, semi) ? (i = decodeInteger(mappings, i, state, 1), i = decodeInteger(mappings, i, state, 2), i = decodeInteger(mappings, i, state, 3), hasMoreVlq(mappings, i, semi) ? (i = decodeInteger(mappings, i, state, 4), seg = [col, state[1], state[2], state[3], state[4]]) : seg = [col, state[1], state[2], state[3]]) : seg = [col], line.push(seg);
genColumn = decodeInteger(reader, genColumn), genColumn < lastCol && (sorted = !1), lastCol = genColumn, hasMoreVlq(reader, semi) ? (sourcesIndex = decodeInteger(reader, sourcesIndex), sourceLine = decodeInteger(reader, sourceLine), sourceColumn = decodeInteger(reader, sourceColumn), hasMoreVlq(reader, semi) ? (namesIndex = decodeInteger(reader, namesIndex), seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex]) : seg = [genColumn, sourcesIndex, sourceLine, sourceColumn]) : seg = [genColumn], line.push(seg), reader.pos++;
}
sorted || sort(line), decoded.push(line), index = semi + 1;
} while (index <= mappings.length);
sorted || sort(line), decoded.push(line), reader.pos = semi + 1;
} while (reader.pos <= length);
return decoded;
}
function indexOf(mappings, index) {
const idx = mappings.indexOf(";", index);
return idx === -1 ? mappings.length : idx;
}
function decodeInteger(mappings, pos, state, j) {
let value = 0, shift = 0, integer = 0;
do {
const c = mappings.charCodeAt(pos++);
integer = charToInt[c], value |= (integer & 31) << shift, shift += 5;
} while (integer & 32);
const shouldNegate = value & 1;
return value >>>= 1, shouldNegate && (value = -2147483648 | -value), state[j] += value, pos;
}
function hasMoreVlq(mappings, i, length) {
return i >= length ? !1 : mappings.charCodeAt(i) !== comma;
}
function sort(line) {

@@ -310,4 +318,4 @@ line.sort(sortComparator);

if (!mod.meta || !("code" in mod.meta)) return null;
const mapString = mod.meta.code.match(
MODULE_RUNNER_SOURCEMAPPING_REGEXP
const mapString = MODULE_RUNNER_SOURCEMAPPING_REGEXP.exec(
mod.meta.code
)?.[1];

@@ -1079,2 +1087,8 @@ if (!mapString) return null;

}
let urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", nanoid = (size = 21) => {
let id = "", i = size;
for (; i--; )
id += urlAlphabet[Math.random() * 64 | 0];
return id;
};
class RemoteRunnerTransport {

@@ -1112,8 +1126,2 @@ constructor(options) {

}
const urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
function nanoid(size = 21) {
let id = "", i = size;
for (; i--; ) id += urlAlphabet[Math.random() * 64 | 0];
return id;
}
export {

@@ -1120,0 +1128,0 @@ ESModulesEvaluator,

{
"name": "vite",
"version": "6.0.0-alpha.19",
"version": "6.0.0-alpha.20",
"type": "module",

@@ -76,4 +76,4 @@ "license": "MIT",

"esbuild": "^0.21.3",
"postcss": "^8.4.39",
"rollup": "^4.13.0"
"postcss": "^8.4.41",
"rollup": "^4.20.0"
},

@@ -85,3 +85,3 @@ "optionalDependencies": {

"@ampproject/remapping": "^2.3.0",
"@babel/parser": "^7.24.8",
"@babel/parser": "^7.25.3",
"@jridgewell/trace-mapping": "^0.3.25",

@@ -104,3 +104,3 @@ "@polka/compression": "^1.0.0-next.25",

"cross-spawn": "^7.0.3",
"debug": "^4.3.5",
"debug": "^4.3.6",
"dep-types": "link:./src/types",

@@ -115,8 +115,9 @@ "dotenv": "^16.4.5",

"http-proxy": "^1.18.1",
"launch-editor-middleware": "^2.8.0",
"lightningcss": "^1.25.1",
"magic-string": "^0.30.10",
"launch-editor-middleware": "^2.8.1",
"lightningcss": "^1.26.0",
"magic-string": "^0.30.11",
"micromatch": "^4.0.7",
"mlly": "^1.7.1",
"mrmime": "^2.0.0",
"nanoid": "^5.0.7",
"open": "^8.4.2",

@@ -136,2 +137,3 @@ "parse5": "^7.1.2",

"sass": "^1.77.8",
"sass-embedded": "^1.77.8",
"sirv": "^2.0.4",

@@ -152,2 +154,3 @@ "source-map-support": "^0.5.21",

"sass": "*",
"sass-embedded": "*",
"stylus": "*",

@@ -164,2 +167,5 @@ "sugarss": "*",

},
"sass-embedded": {
"optional": true
},
"stylus": {

@@ -166,0 +172,0 @@ "optional": true

@@ -6,3 +6,3 @@ import type {

UpdatePayload,
} from './hotPayload'
} from './hmrPayload'

@@ -9,0 +9,0 @@ export interface CustomEventMap {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc