vite-node 3.1.0-beta.1 → 3.1.0

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,40 +1,34 @@
1
1
  'use strict';
2
2
 
3
3
  const KNOWN_ASSET_TYPES = [
4
- // images
5
- "apng",
6
- "bmp",
7
- "png",
8
- "jpe?g",
9
- "jfif",
10
- "pjpeg",
11
- "pjp",
12
- "gif",
13
- "svg",
14
- "ico",
15
- "webp",
16
- "avif",
17
- // media
18
- "mp4",
19
- "webm",
20
- "ogg",
21
- "mp3",
22
- "wav",
23
- "flac",
24
- "aac",
25
- // fonts
26
- "woff2?",
27
- "eot",
28
- "ttf",
29
- "otf",
30
- // other
31
- "webmanifest",
32
- "pdf",
33
- "txt"
4
+ "apng",
5
+ "bmp",
6
+ "png",
7
+ "jpe?g",
8
+ "jfif",
9
+ "pjpeg",
10
+ "pjp",
11
+ "gif",
12
+ "svg",
13
+ "ico",
14
+ "webp",
15
+ "avif",
16
+ "mp4",
17
+ "webm",
18
+ "ogg",
19
+ "mp3",
20
+ "wav",
21
+ "flac",
22
+ "aac",
23
+ "woff2?",
24
+ "eot",
25
+ "ttf",
26
+ "otf",
27
+ "webmanifest",
28
+ "pdf",
29
+ "txt"
34
30
  ];
35
- const KNOWN_ASSET_RE = new RegExp(
36
- `\\.(${KNOWN_ASSET_TYPES.join("|")})$`
37
- );
31
+ const KNOWN_ASSET_RE = new RegExp(`\\.(${KNOWN_ASSET_TYPES.join("|")})$`);
38
32
  const CSS_LANGS_RE = /\.(css|less|sass|scss|styl|stylus|pcss|postcss|sss)(?:$|\?)/;
39
33
 
40
34
  exports.CSS_LANGS_RE = CSS_LANGS_RE;
@@ -1,38 +1,32 @@
1
1
  const KNOWN_ASSET_TYPES = [
2
- // images
3
- "apng",
4
- "bmp",
5
- "png",
6
- "jpe?g",
7
- "jfif",
8
- "pjpeg",
9
- "pjp",
10
- "gif",
11
- "svg",
12
- "ico",
13
- "webp",
14
- "avif",
15
- // media
16
- "mp4",
17
- "webm",
18
- "ogg",
19
- "mp3",
20
- "wav",
21
- "flac",
22
- "aac",
23
- // fonts
24
- "woff2?",
25
- "eot",
26
- "ttf",
27
- "otf",
28
- // other
29
- "webmanifest",
30
- "pdf",
31
- "txt"
2
+ "apng",
3
+ "bmp",
4
+ "png",
5
+ "jpe?g",
6
+ "jfif",
7
+ "pjpeg",
8
+ "pjp",
9
+ "gif",
10
+ "svg",
11
+ "ico",
12
+ "webp",
13
+ "avif",
14
+ "mp4",
15
+ "webm",
16
+ "ogg",
17
+ "mp3",
18
+ "wav",
19
+ "flac",
20
+ "aac",
21
+ "woff2?",
22
+ "eot",
23
+ "ttf",
24
+ "otf",
25
+ "webmanifest",
26
+ "pdf",
27
+ "txt"
32
28
  ];
33
- const KNOWN_ASSET_RE = new RegExp(
34
- `\\.(${KNOWN_ASSET_TYPES.join("|")})$`
35
- );
29
+ const KNOWN_ASSET_RE = new RegExp(`\\.(${KNOWN_ASSET_TYPES.join("|")})$`);
36
30
  const CSS_LANGS_RE = /\.(css|less|sass|scss|styl|stylus|pcss|postcss|sss)(?:$|\?)/;
37
31
 
38
32
  export { CSS_LANGS_RE, KNOWN_ASSET_RE, KNOWN_ASSET_TYPES };
package/dist/hmr.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { HMRPayload, Plugin } from 'vite';
2
2
  import { EventEmitter } from 'node:events';
3
- import { C as CustomEventMap, a as ViteNodeRunner, H as HMRPayload$1, b as HotContext } from './index.d-CvjHzhRV.js';
3
+ import { C as CustomEventMap, a as ViteNodeRunner, H as HMRPayload$1, b as HotContext } from './index.d-CjeQoW3r.js';
4
4
  import './trace-mapping.d-DLVdEqOp.js';
5
5
 
6
6
  type EventType = string | symbol;
@@ -51,4 +51,5 @@ declare function reload(runner: ViteNodeRunner, files: string[]): Promise<any[]>
51
51
  declare function handleMessage(runner: ViteNodeRunner, emitter: HMREmitter, files: string[], payload: HMRPayload$1): Promise<void>;
52
52
  declare function createHotContext(runner: ViteNodeRunner, emitter: HMREmitter, files: string[], ownerPath: string): HotContext;
53
53
 
54
- export { type Emitter, type EventType, type HMREmitter, type Handler, type HotCallback, type HotModule, type InferCustomEventPayload, type ModuleNamespace, createHmrEmitter, createHotContext, getCache, handleMessage, reload, sendMessageBuffer, viteNodeHmrPlugin };
54
+ export { createHmrEmitter, createHotContext, getCache, handleMessage, reload, sendMessageBuffer, viteNodeHmrPlugin };
55
+ export type { Emitter, EventType, HMREmitter, Handler, HotCallback, HotModule, InferCustomEventPayload, ModuleNamespace };
@@ -318,4 +318,5 @@ interface DebuggerOptions {
318
318
  loadDumppedModules?: boolean;
319
319
  }
320
320
 
321
- export { type Arrayable as A, type CustomEventMap as C, type DebuggerOptions as D, type FetchResult as F, type HMRPayload as H, ModuleCacheMap as M, type Nullable as N, type RawSourceMap as R, type StartOfSourceMap as S, type ViteNodeServerOptions as V, ViteNodeRunner as a, type HotContext as b, type DepsHandlingOptions as c, type ViteNodeResolveId as d, DEFAULT_REQUEST_STUBS as e, type ModuleExecutionInfo as f, type Awaitable as g, type FetchFunction as h, type ResolveIdFunction as i, type CreateHotContextFunction as j, type ModuleCache as k, type ViteNodeRunnerOptions as l, type ViteNodeResolveModule as m };
321
+ export { ModuleCacheMap as M, ViteNodeRunner as a, DEFAULT_REQUEST_STUBS as e };
322
+ export type { Arrayable as A, CustomEventMap as C, DebuggerOptions as D, FetchResult as F, HMRPayload as H, Nullable as N, RawSourceMap as R, StartOfSourceMap as S, ViteNodeServerOptions as V, HotContext as b, DepsHandlingOptions as c, ViteNodeResolveId as d, ModuleExecutionInfo as f, Awaitable as g, FetchFunction as h, ResolveIdFunction as i, CreateHotContextFunction as j, ModuleCache as k, ViteNodeRunnerOptions as l, ViteNodeResolveModule as m };
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { A as Arrayable, g as Awaitable, j as CreateHotContextFunction, D as DebuggerOptions, c as DepsHandlingOptions, h as FetchFunction, F as FetchResult, b as HotContext, k as ModuleCache, M as ModuleCacheMap, f as ModuleExecutionInfo, N as Nullable, R as RawSourceMap, i as ResolveIdFunction, S as StartOfSourceMap, d as ViteNodeResolveId, m as ViteNodeResolveModule, l as ViteNodeRunnerOptions, V as ViteNodeServerOptions } from './index.d-CvjHzhRV.js';
1
+ export { A as Arrayable, g as Awaitable, j as CreateHotContextFunction, D as DebuggerOptions, c as DepsHandlingOptions, h as FetchFunction, F as FetchResult, b as HotContext, k as ModuleCache, M as ModuleCacheMap, f as ModuleExecutionInfo, N as Nullable, R as RawSourceMap, i as ResolveIdFunction, S as StartOfSourceMap, d as ViteNodeResolveId, m as ViteNodeResolveModule, l as ViteNodeRunnerOptions, V as ViteNodeServerOptions } from './index.d-CjeQoW3r.js';
2
2
  export { D as DecodedSourceMap, E as EncodedSourceMap, S as SourceMapInput } from './trace-mapping.d-DLVdEqOp.js';