Socket
Socket
Sign inDemoInstall

vite

Package Overview
Dependencies
Maintainers
5
Versions
568
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 4.5.0 to 5.0.4

dist/node/chunks/dep-4RECYSE1.js

72

client.d.ts

@@ -40,58 +40,10 @@ /// <reference path="./types/importMeta.d.ts" />

// CSS
declare module '*.css' {
/**
* @deprecated Use `import style from './style.css?inline'` instead.
*/
const css: string
export default css
}
declare module '*.scss' {
/**
* @deprecated Use `import style from './style.scss?inline'` instead.
*/
const css: string
export default css
}
declare module '*.sass' {
/**
* @deprecated Use `import style from './style.sass?inline'` instead.
*/
const css: string
export default css
}
declare module '*.less' {
/**
* @deprecated Use `import style from './style.less?inline'` instead.
*/
const css: string
export default css
}
declare module '*.styl' {
/**
* @deprecated Use `import style from './style.styl?inline'` instead.
*/
const css: string
export default css
}
declare module '*.stylus' {
/**
* @deprecated Use `import style from './style.stylus?inline'` instead.
*/
const css: string
export default css
}
declare module '*.pcss' {
/**
* @deprecated Use `import style from './style.pcss?inline'` instead.
*/
const css: string
export default css
}
declare module '*.sss' {
/**
* @deprecated Use `import style from './style.sss?inline'` instead.
*/
const css: string
export default css
}
declare module '*.css' {}
declare module '*.scss' {}
declare module '*.sass' {}
declare module '*.less' {}
declare module '*.styl' {}
declare module '*.stylus' {}
declare module '*.pcss' {}
declare module '*.sss' {}

@@ -233,3 +185,3 @@ // Built-in asset types

const workerConstructor: {
new (): Worker
new (options?: { name?: string }): Worker
}

@@ -241,3 +193,3 @@ export default workerConstructor

const workerConstructor: {
new (): Worker
new (options?: { name?: string }): Worker
}

@@ -254,3 +206,3 @@ export default workerConstructor

const sharedWorkerConstructor: {
new (): SharedWorker
new (options?: { name?: string }): SharedWorker
}

@@ -262,3 +214,3 @@ export default sharedWorkerConstructor

const sharedWorkerConstructor: {
new (): SharedWorker
new (options?: { name?: string }): SharedWorker
}

@@ -265,0 +217,0 @@ export default sharedWorkerConstructor

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

import { EventEmitter } from 'events';
import { C as colors, D as bindShortcuts, x as createLogger, h as resolveConfig } from './chunks/dep-bb8a8339.js';
import { x as colors, k as createLogger, r as resolveConfig } from './chunks/dep-4RECYSE1.js';
import { VERSION } from './constants.js';

@@ -13,6 +13,8 @@ import 'node:fs/promises';

import 'tty';
import 'path';
import 'esbuild';
import 'path';
import 'fs';
import 'assert';
import 'node:http';
import 'node:https';
import 'util';

@@ -36,5 +38,6 @@ import 'net';

import 'rollup';
import 'worker_threads';
import 'node:http';
import 'node:https';
import 'rollup/parseAst';
import 'querystring';
import 'node:readline';
import 'node:events';
import 'zlib';

@@ -44,5 +47,4 @@ import 'buffer';

import 'tls';
import 'querystring';
import 'node:readline';
import 'node:zlib';
import 'worker_threads';

@@ -756,3 +758,2 @@ function toArr(any) {

.option('--port <port>', `[number] specify port`)
.option('--https', `[boolean] use TLS + HTTP/2`)
.option('--open [path]', `[boolean | string] open browser on startup`)

@@ -766,3 +767,3 @@ .option('--cors', `[boolean] enable CORS`)

// is ok here
const { createServer } = await import('./chunks/dep-bb8a8339.js').then(function (n) { return n.I; });
const { createServer } = await import('./chunks/dep-4RECYSE1.js').then(function (n) { return n.A; });
try {

@@ -788,31 +789,33 @@ const server = await createServer({

: '';
info(`\n ${colors.green(`${colors.bold('VITE')} v${VERSION}`)} ${startupDurationString}\n`, { clear: !server.config.logger.hasWarned });
const hasExistingLogs = process.stdout.bytesWritten > 0 || process.stderr.bytesWritten > 0;
info(`\n ${colors.green(`${colors.bold('VITE')} v${VERSION}`)} ${startupDurationString}\n`, {
clear: !hasExistingLogs,
});
server.printUrls();
bindShortcuts(server, {
print: true,
customShortcuts: [
profileSession && {
key: 'p',
description: 'start/stop the profiler',
async action(server) {
if (profileSession) {
await stopProfiler(server.config.logger.info);
}
else {
const inspector = await import('node:inspector').then((r) => r.default);
await new Promise((res) => {
profileSession = new inspector.Session();
profileSession.connect();
profileSession.post('Profiler.enable', () => {
profileSession.post('Profiler.start', () => {
server.config.logger.info('Profiler started');
res();
});
const customShortcuts = [];
if (profileSession) {
customShortcuts.push({
key: 'p',
description: 'start/stop the profiler',
async action(server) {
if (profileSession) {
await stopProfiler(server.config.logger.info);
}
else {
const inspector = await import('node:inspector').then((r) => r.default);
await new Promise((res) => {
profileSession = new inspector.Session();
profileSession.connect();
profileSession.post('Profiler.enable', () => {
profileSession.post('Profiler.start', () => {
server.config.logger.info('Profiler started');
res();
});
});
}
},
});
}
},
],
});
});
}
server.bindCLIShortcuts({ print: true, customShortcuts });
}

@@ -846,3 +849,3 @@ catch (e) {

filterDuplicateOptions(options);
const { build } = await import('./chunks/dep-bb8a8339.js').then(function (n) { return n.H; });
const { build } = await import('./chunks/dep-4RECYSE1.js').then(function (n) { return n.C; });
const buildOptions = cleanOptions(options);

@@ -875,3 +878,3 @@ try {

filterDuplicateOptions(options);
const { optimizeDeps } = await import('./chunks/dep-bb8a8339.js').then(function (n) { return n.G; });
const { optimizeDeps } = await import('./chunks/dep-4RECYSE1.js').then(function (n) { return n.B; });
try {

@@ -898,3 +901,2 @@ const config = await resolveConfig({

.option('--strictPort', `[boolean] exit if specified port is already in use`)
.option('--https', `[boolean] use TLS + HTTP/2`)
.option('--open [path]', `[boolean | string] open browser on startup`)

@@ -904,3 +906,3 @@ .option('--outDir <dir>', `[string] output directory (default: dist)`)

filterDuplicateOptions(options);
const { preview } = await import('./chunks/dep-bb8a8339.js').then(function (n) { return n.J; });
const { preview } = await import('./chunks/dep-4RECYSE1.js').then(function (n) { return n.D; });
try {

@@ -920,3 +922,2 @@ const server = await preview({

host: options.host,
https: options.https,
open: options.open,

@@ -926,3 +927,3 @@ },

server.printUrls();
bindShortcuts(server, { print: true });
server.bindCLIShortcuts({ print: true });
}

@@ -929,0 +930,0 @@ catch (e) {

@@ -8,2 +8,3 @@ import path, { resolve } from 'node:path';

const DEFAULT_MAIN_FIELDS = [
'browser',
'module',

@@ -10,0 +11,0 @@ 'jsnext:main',

@@ -1,3 +0,4 @@

import { i as isInNodeModules } from './chunks/dep-bb8a8339.js';
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, z as isFileServingAllowed, l as loadConfigFromFile, A 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, B as resolveEnvPrefix, d as resolvePackageData, r as resolvePackageEntry, y as searchForWorkspaceRoot, w as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-bb8a8339.js';
export { parseAst, parseAstAsync } from 'rollup/parseAst';
import { i as isInNodeModules } from './chunks/dep-4RECYSE1.js';
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-4RECYSE1.js';
export { VERSION as version } from './constants.js';

@@ -18,2 +19,4 @@ export { version as esbuildVersion } from 'esbuild';

import 'assert';
import 'node:http';
import 'node:https';
import 'util';

@@ -36,5 +39,5 @@ import 'net';

import 'node:v8';
import 'worker_threads';
import 'node:http';
import 'node:https';
import 'querystring';
import 'node:readline';
import 'node:events';
import 'zlib';

@@ -44,5 +47,4 @@ import 'buffer';

import 'tls';
import 'querystring';
import 'node:readline';
import 'node:zlib';
import 'worker_threads';

@@ -63,2 +65,3 @@ // This file will be built for both ESM and CJS. Avoid relying on other modules as possible.

class SplitVendorChunkCache {
cache;
constructor() {

@@ -65,0 +68,0 @@ this.cache = new Map();

{
"name": "vite",
"version": "4.5.0",
"version": "5.0.4",
"type": "module",

@@ -23,5 +23,10 @@ "license": "MIT",

".": {
"types": "./dist/node/index.d.ts",
"import": "./dist/node/index.js",
"require": "./index.cjs"
"import": {
"types": "./dist/node/index.d.ts",
"default": "./dist/node/index.js"
},
"require": {
"types": "./index.d.cts",
"default": "./index.cjs"
}
},

@@ -42,6 +47,7 @@ "./client": {

"index.cjs",
"index.d.cts",
"types"
],
"engines": {
"node": "^14.18.0 || >=16.0.0"
"node": "^18.0.0 || >=20.0.0"
},

@@ -58,46 +64,29 @@ "repository": {

"funding": "https://github.com/vitejs/vite?sponsor=1",
"scripts": {
"dev": "rimraf dist && pnpm run build-bundle -w",
"build": "rimraf dist && run-s build-bundle build-types",
"build-bundle": "rollup --config rollup.config.ts --configPlugin typescript",
"build-types": "run-s build-types-temp build-types-pre-patch build-types-roll build-types-post-patch build-types-check",
"build-types-temp": "tsc --emitDeclarationOnly --outDir temp/node -p src/node",
"build-types-pre-patch": "tsx scripts/prePatchTypes.ts",
"build-types-roll": "tsx scripts/api-extractor.ts run && rimraf temp",
"build-types-post-patch": "tsx scripts/postPatchTypes.ts",
"build-types-check": "tsx scripts/checkBuiltTypes.ts && tsc --project tsconfig.check.json",
"typecheck": "tsc --noEmit",
"lint": "eslint --cache --ext .ts src/**",
"format": "prettier --write --cache --parser typescript \"src/**/*.ts\"",
"prepublishOnly": "npm run build"
},
"//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
"dependencies": {
"esbuild": "^0.18.10",
"postcss": "^8.4.27",
"rollup": "^3.27.1"
"esbuild": "^0.19.3",
"postcss": "^8.4.31",
"rollup": "^4.2.0"
},
"optionalDependencies": {
"fsevents": "~2.3.2"
"fsevents": "~2.3.3"
},
"devDependencies": {
"@ampproject/remapping": "^2.2.1",
"@babel/parser": "^7.22.7",
"@babel/types": "^7.22.5",
"@jridgewell/trace-mapping": "^0.3.18",
"@rollup/plugin-alias": "^4.0.4",
"@rollup/plugin-commonjs": "^25.0.3",
"@rollup/plugin-dynamic-import-vars": "^2.0.4",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "15.1.0",
"@rollup/plugin-typescript": "^11.1.2",
"@rollup/pluginutils": "^5.0.2",
"@types/escape-html": "^1.0.2",
"@types/pnpapi": "^0.0.2",
"acorn": "^8.10.0",
"acorn-walk": "^8.2.0",
"@babel/parser": "^7.23.4",
"@jridgewell/trace-mapping": "^0.3.20",
"@rollup/plugin-alias": "^5.1.0",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-dynamic-import-vars": "^2.1.1",
"@rollup/plugin-json": "^6.0.1",
"@rollup/plugin-node-resolve": "15.2.3",
"@rollup/plugin-typescript": "^11.1.5",
"@rollup/pluginutils": "^5.0.5",
"@types/escape-html": "^1.0.4",
"@types/pnpapi": "^0.0.5",
"acorn": "^8.11.2",
"acorn-walk": "^8.3.0",
"cac": "^6.7.14",
"chokidar": "^3.5.3",
"connect": "^3.7.0",
"connect-history-api-fallback": "^2.0.0",
"convert-source-map": "^2.0.0",

@@ -109,15 +98,15 @@ "cors": "^2.8.5",

"dotenv": "^16.3.1",
"dotenv-expand": "^9.0.0",
"es-module-lexer": "^1.3.0",
"dotenv-expand": "^10.0.0",
"es-module-lexer": "^1.4.1",
"escape-html": "^1.0.3",
"estree-walker": "^3.0.3",
"etag": "^1.8.1",
"fast-glob": "^3.3.1",
"fast-glob": "^3.3.2",
"http-proxy": "^1.18.1",
"json-stable-stringify": "^1.0.2",
"launch-editor-middleware": "^2.6.0",
"lightningcss": "^1.21.5",
"magic-string": "^0.30.2",
"json-stable-stringify": "^1.1.0",
"launch-editor-middleware": "^2.6.1",
"lightningcss": "^1.22.1",
"magic-string": "^0.30.5",
"micromatch": "^4.0.5",
"mlly": "^1.4.0",
"mlly": "^1.4.2",
"mrmime": "^1.0.1",

@@ -127,10 +116,11 @@ "okie": "^1.0.1",

"parse5": "^7.1.2",
"periscopic": "^3.1.0",
"periscopic": "^4.0.2",
"picocolors": "^1.0.0",
"picomatch": "^2.3.1",
"postcss-import": "^15.1.0",
"postcss-load-config": "^4.0.1",
"postcss-load-config": "^4.0.2",
"postcss-modules": "^6.0.0",
"resolve.exports": "^2.0.2",
"rollup-plugin-license": "^3.0.1",
"rollup-plugin-dts": "^6.1.0",
"rollup-plugin-license": "^3.2.0",
"sirv": "^2.0.3",

@@ -140,10 +130,10 @@ "source-map-support": "^0.5.21",

"strip-literal": "^1.3.0",
"tsconfck": "^2.1.2",
"tslib": "^2.6.1",
"tsconfck": "^3.0.0",
"tslib": "^2.6.2",
"types": "link:./types",
"ufo": "^1.2.0",
"ws": "^8.13.0"
"ufo": "^1.3.2",
"ws": "^8.14.2"
},
"peerDependencies": {
"@types/node": ">= 14",
"@types/node": "^18.0.0 || >=20.0.0",
"less": "*",

@@ -178,3 +168,15 @@ "lightningcss": "^1.21.0",

}
},
"scripts": {
"dev": "rimraf dist && pnpm run build-bundle -w",
"build": "rimraf dist && run-s build-bundle build-types",
"build-bundle": "rollup --config rollup.config.ts --configPlugin typescript",
"build-types": "run-s build-types-temp build-types-roll build-types-check",
"build-types-temp": "tsc --emitDeclarationOnly --outDir temp/node -p src/node",
"build-types-roll": "rollup --config rollup.dts.config.ts --configPlugin typescript && rimraf temp",
"build-types-check": "tsc --project tsconfig.check.json",
"typecheck": "tsc --noEmit",
"lint": "eslint --cache --ext .ts src/**",
"format": "prettier --write --cache --parser typescript \"src/**/*.ts\""
}
}
}

@@ -31,3 +31,7 @@ import type { InferCustomEventPayload } from './customEvent'

): void
off<T extends string>(
event: T,
cb: (payload: InferCustomEventPayload<T>) => void,
): void
send<T extends string>(event: T, data?: InferCustomEventPayload<T>): void
}

@@ -74,25 +74,1 @@ export interface ImportGlobOptions<

}
export interface ImportGlobEagerFunction {
/**
* Eagerly import a list of files with a glob pattern.
*
* Overload 1: No generic provided, infer the type from `as`
*/
<
As extends string,
T = As extends keyof KnownAsTypeMap ? KnownAsTypeMap[As] : unknown,
>(
glob: string | string[],
options?: Omit<ImportGlobOptions<boolean, As>, 'eager'>,
): Record<string, T>
/**
* Eagerly import a list of files with a glob pattern.
*
* Overload 2: Module generic provided
*/
<M>(
glob: string | string[],
options?: Omit<ImportGlobOptions<boolean, string>, 'eager'>,
): Record<string, M>
}

@@ -22,6 +22,2 @@ // This file is an augmentation to the built-in ImportMeta interface

glob: import('./importGlob').ImportGlobFunction
/**
* @deprecated Use `import.meta.glob('*', { eager: true })` instead
*/
globEager: import('./importGlob').ImportGlobEagerFunction
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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

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

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