vite 5.0.0-beta.13 → 5.0.0-beta.15

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.
@@ -1,4 +1,4 @@
1
- import { z as commonjsGlobal, y as getDefaultExportFromCjs } from './dep-wR9QhhAq.js';
1
+ import { z as commonjsGlobal, y as getDefaultExportFromCjs } from './dep-Kf16Z54K.js';
2
2
  import require$$0__default from 'fs';
3
3
  import require$$0 from 'postcss';
4
4
  import require$$0$1 from 'path';
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 { x as colors, k as createLogger, r as resolveConfig } from './chunks/dep-wR9QhhAq.js';
5
+ import { x as colors, k as createLogger, r as resolveConfig } from './chunks/dep-Kf16Z54K.js';
6
6
  import { VERSION } from './constants.js';
7
7
  import 'node:fs/promises';
8
8
  import 'node:url';
@@ -759,7 +759,7 @@ cli
759
759
  filterDuplicateOptions(options);
760
760
  // output structure is preserved even after bundling so require()
761
761
  // is ok here
762
- const { createServer } = await import('./chunks/dep-wR9QhhAq.js').then(function (n) { return n.A; });
762
+ const { createServer } = await import('./chunks/dep-Kf16Z54K.js').then(function (n) { return n.A; });
763
763
  try {
764
764
  const server = await createServer({
765
765
  root,
@@ -839,7 +839,7 @@ cli
839
839
  .option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
840
840
  .action(async (root, options) => {
841
841
  filterDuplicateOptions(options);
842
- const { build } = await import('./chunks/dep-wR9QhhAq.js').then(function (n) { return n.C; });
842
+ const { build } = await import('./chunks/dep-Kf16Z54K.js').then(function (n) { return n.C; });
843
843
  const buildOptions = cleanOptions(options);
844
844
  try {
845
845
  await build({
@@ -867,7 +867,7 @@ cli
867
867
  .option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
868
868
  .action(async (root, options) => {
869
869
  filterDuplicateOptions(options);
870
- const { optimizeDeps } = await import('./chunks/dep-wR9QhhAq.js').then(function (n) { return n.B; });
870
+ const { optimizeDeps } = await import('./chunks/dep-Kf16Z54K.js').then(function (n) { return n.B; });
871
871
  try {
872
872
  const config = await resolveConfig({
873
873
  root,
@@ -893,7 +893,7 @@ cli
893
893
  .option('--outDir <dir>', `[string] output directory (default: dist)`)
894
894
  .action(async (root, options) => {
895
895
  filterDuplicateOptions(options);
896
- const { preview } = await import('./chunks/dep-wR9QhhAq.js').then(function (n) { return n.D; });
896
+ const { preview } = await import('./chunks/dep-Kf16Z54K.js').then(function (n) { return n.D; });
897
897
  try {
898
898
  const server = await preview({
899
899
  root,
@@ -3,6 +3,7 @@ import { PluginHooks, RollupError, SourceMap, ModuleInfo, PartialResolvedId, Inp
3
3
  import * as rollup from 'rollup';
4
4
  export { rollup as Rollup };
5
5
  export { VERSION as rollupVersion } from 'rollup';
6
+ export { parseAst, parseAstAsync } from 'rollup/parseAst';
6
7
  import * as http from 'node:http';
7
8
  import { OutgoingHttpHeaders, ClientRequestArgs, IncomingMessage, ClientRequest, Agent, Server, ServerResponse } from 'node:http';
8
9
  import * as fs from 'node:fs';
@@ -859,6 +860,9 @@ interface PluginContainer {
859
860
  load(id: string, options?: {
860
861
  ssr?: boolean;
861
862
  }): Promise<LoadResult | null>;
863
+ watchChange(id: string, change: {
864
+ event: 'create' | 'update' | 'delete';
865
+ }): Promise<void>;
862
866
  close(): Promise<void>;
863
867
  }
864
868
 
@@ -1490,7 +1494,7 @@ interface ServerOptions extends CommonServerOptions {
1490
1494
  * Create Vite dev server to be used as a middleware in an existing server
1491
1495
  * @default false
1492
1496
  */
1493
- middlewareMode?: boolean | 'html' | 'ssr';
1497
+ middlewareMode?: boolean;
1494
1498
  /**
1495
1499
  * Options for files served via '/\@fs/'.
1496
1500
  */
@@ -1595,6 +1599,12 @@ interface ViteDevServer {
1595
1599
  * without going through the http request pipeline.
1596
1600
  */
1597
1601
  transformRequest(url: string, options?: TransformOptions): Promise<TransformResult | null>;
1602
+ /**
1603
+ * Same as `transformRequest` but only warm up the URLs so the next request
1604
+ * will already be cached. The function will never throw as it handles and
1605
+ * reports errors internally.
1606
+ */
1607
+ warmupRequest(url: string, options?: TransformOptions): Promise<void>;
1598
1608
  /**
1599
1609
  * Apply vite built-in HTML transforms and any plugin HTML transforms.
1600
1610
  */
@@ -3097,7 +3107,7 @@ interface UserConfig {
3097
3107
  */
3098
3108
  format?: 'es' | 'iife';
3099
3109
  /**
3100
- * Vite plugins that apply to worker bundle. The plugins retured by this function
3110
+ * Vite plugins that apply to worker bundle. The plugins returned by this function
3101
3111
  * should be new instances every time it is called, because they are used for each
3102
3112
  * rollup worker bundling process.
3103
3113
  */
@@ -1,5 +1,6 @@
1
- import { i as isInNodeModules } from './chunks/dep-wR9QhhAq.js';
2
- 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-wR9QhhAq.js';
1
+ export { parseAst, parseAstAsync } from 'rollup/parseAst';
2
+ import { i as isInNodeModules } from './chunks/dep-Kf16Z54K.js';
3
+ 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-Kf16Z54K.js';
3
4
  export { VERSION as version } from './constants.js';
4
5
  export { version as esbuildVersion } from 'esbuild';
5
6
  export { VERSION as rollupVersion } from 'rollup';
@@ -33,7 +34,6 @@ import 'module';
33
34
  import 'node:assert';
34
35
  import 'node:process';
35
36
  import 'node:v8';
36
- import 'rollup/parseAst';
37
37
  import 'querystring';
38
38
  import 'node:readline';
39
39
  import 'node:events';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite",
3
- "version": "5.0.0-beta.13",
3
+ "version": "5.0.0-beta.15",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Evan You",
@@ -63,29 +63,28 @@
63
63
  "dependencies": {
64
64
  "esbuild": "^0.19.3",
65
65
  "postcss": "^8.4.31",
66
- "rollup": "^4.1.4"
66
+ "rollup": "^4.2.0"
67
67
  },
68
68
  "optionalDependencies": {
69
69
  "fsevents": "~2.3.3"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@ampproject/remapping": "^2.2.1",
73
- "@jridgewell/trace-mapping": "^0.3.19",
73
+ "@jridgewell/trace-mapping": "^0.3.20",
74
74
  "@rollup/plugin-alias": "^5.0.1",
75
75
  "@rollup/plugin-commonjs": "^25.0.7",
76
- "@rollup/plugin-dynamic-import-vars": "^2.0.7",
76
+ "@rollup/plugin-dynamic-import-vars": "^2.1.0",
77
77
  "@rollup/plugin-json": "^6.0.1",
78
78
  "@rollup/plugin-node-resolve": "15.2.3",
79
79
  "@rollup/plugin-typescript": "^11.1.5",
80
80
  "@rollup/pluginutils": "^5.0.5",
81
- "@types/escape-html": "^1.0.2",
82
- "@types/pnpapi": "^0.0.3",
83
- "acorn": "^8.10.0",
84
- "acorn-walk": "^8.2.0",
81
+ "@types/escape-html": "^1.0.3",
82
+ "@types/pnpapi": "^0.0.4",
83
+ "acorn": "^8.11.2",
84
+ "acorn-walk": "^8.3.0",
85
85
  "cac": "^6.7.14",
86
86
  "chokidar": "^3.5.3",
87
87
  "connect": "^3.7.0",
88
- "connect-history-api-fallback": "^2.0.0",
89
88
  "convert-source-map": "^2.0.0",
90
89
  "cors": "^2.8.5",
91
90
  "cross-spawn": "^7.0.3",