vite-node 0.20.0 → 0.20.3

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.
package/dist/cli.cjs CHANGED
@@ -629,7 +629,7 @@ class CAC extends events.EventEmitter {
629
629
 
630
630
  const cac = (name = "") => new CAC(name);
631
631
 
632
- var version = "0.20.0";
632
+ var version = "0.20.3";
633
633
 
634
634
  const cli = cac("vite-node");
635
635
  cli.version(version).option("-r, --root <path>", "Use specified root directory").option("-c, --config <path>", "Use specified config file").option("-w, --watch", 'Restart on file changes, similar to "nodemon"').option("--options <options>", "Use specified Vite server options").help();
package/dist/cli.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { e as ViteNodeServerOptions } from './types-4f4de592.js';
1
+ import { e as ViteNodeServerOptions } from './types-b9c999e6.js';
2
2
 
3
3
  interface CliOptions {
4
4
  root?: string;
package/dist/cli.mjs CHANGED
@@ -627,7 +627,7 @@ class CAC extends EventEmitter {
627
627
 
628
628
  const cac = (name = "") => new CAC(name);
629
629
 
630
- var version = "0.20.0";
630
+ var version = "0.20.3";
631
631
 
632
632
  const cli = cac("vite-node");
633
633
  cli.version(version).option("-r, --root <path>", "Use specified root directory").option("-c, --config <path>", "Use specified config file").option("-w, --watch", 'Restart on file changes, similar to "nodemon"').option("--options <options>", "Use specified Vite server options").help();
package/dist/client.d.ts CHANGED
@@ -1 +1 @@
1
- export { j as DEFAULT_REQUEST_STUBS, M as ModuleCacheMap, h as ViteNodeRunner } from './types-4f4de592.js';
1
+ export { j as DEFAULT_REQUEST_STUBS, M as ModuleCacheMap, h as ViteNodeRunner } from './types-b9c999e6.js';
package/dist/hmr.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { EventEmitter } from 'events';
2
2
  import { HMRPayload, Plugin } from 'vite';
3
- import { U as UpdatePayload, P as PrunePayload, g as FullReloadPayload, E as ErrorPayload, h as ViteNodeRunner, i as HMRPayload$1, H as HotContext } from './types-4f4de592.js';
3
+ import { U as UpdatePayload, P as PrunePayload, g as FullReloadPayload, E as ErrorPayload, h as ViteNodeRunner, i as HMRPayload$1, H as HotContext } from './types-b9c999e6.js';
4
4
 
5
5
  declare type EventType = string | symbol;
6
6
  declare type Handler<T = unknown> = (event: T) => void;
package/dist/index.d.ts CHANGED
@@ -1 +1 @@
1
- export { A as Arrayable, C as CreateHotContextFunction, f as DebuggerOptions, D as DepsHandlingOptions, a as FetchFunction, F as FetchResult, H as HotContext, c as ModuleCache, M as ModuleCacheMap, N as Nullable, R as RawSourceMap, b as ResolveIdFunction, S as StartOfSourceMap, d as ViteNodeResolveId, V as ViteNodeRunnerOptions, e as ViteNodeServerOptions } from './types-4f4de592.js';
1
+ export { A as Arrayable, C as CreateHotContextFunction, f as DebuggerOptions, D as DepsHandlingOptions, a as FetchFunction, F as FetchResult, H as HotContext, c as ModuleCache, M as ModuleCacheMap, N as Nullable, R as RawSourceMap, b as ResolveIdFunction, S as StartOfSourceMap, d as ViteNodeResolveId, V as ViteNodeRunnerOptions, e as ViteNodeServerOptions } from './types-b9c999e6.js';
package/dist/server.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { TransformResult, ViteDevServer } from 'vite';
2
- import { f as DebuggerOptions, D as DepsHandlingOptions, e as ViteNodeServerOptions, F as FetchResult, d as ViteNodeResolveId } from './types-4f4de592.js';
2
+ import { f as DebuggerOptions, D as DepsHandlingOptions, e as ViteNodeServerOptions, F as FetchResult, d as ViteNodeResolveId } from './types-b9c999e6.js';
3
3
 
4
4
  declare class Debugger {
5
5
  options: DebuggerOptions;
@@ -66,18 +66,26 @@ interface CustomEventMap {
66
66
  type InferCustomEventPayload<T extends string> =
67
67
  T extends keyof CustomEventMap ? CustomEventMap[T] : any
68
68
 
69
+ type ModuleNamespace = Record<string, any> & {
70
+ [Symbol.toStringTag]: 'Module'
71
+ }
72
+
69
73
  interface ViteHotContext {
70
74
  readonly data: any
71
75
 
72
76
  accept(): void
73
- accept(cb: (mod: any) => void): void
74
- accept(dep: string, cb: (mod: any) => void): void
75
- accept(deps: readonly string[], cb: (mods: any[]) => void): void
76
-
77
- /**
78
- * @deprecated
79
- */
80
- acceptDeps(): never
77
+ accept(cb: (mod: ModuleNamespace | undefined) => void): void
78
+ accept(dep: string, cb: (mod: ModuleNamespace | undefined) => void): void
79
+ accept(
80
+ deps: readonly string[],
81
+ cb: (mods: Array<ModuleNamespace | undefined>) => void
82
+ ): void
83
+
84
+ acceptExports(exportNames: string | readonly string[]): void
85
+ acceptExports(
86
+ exportNames: string | readonly string[],
87
+ cb: (mod: ModuleNamespace | undefined) => void
88
+ ): void
81
89
 
82
90
  dispose(cb: (data: any) => void): void
83
91
  decline(): void
package/dist/types.d.ts CHANGED
@@ -1 +1 @@
1
- export { A as Arrayable, C as CreateHotContextFunction, f as DebuggerOptions, D as DepsHandlingOptions, a as FetchFunction, F as FetchResult, H as HotContext, c as ModuleCache, M as ModuleCacheMap, N as Nullable, R as RawSourceMap, b as ResolveIdFunction, S as StartOfSourceMap, d as ViteNodeResolveId, V as ViteNodeRunnerOptions, e as ViteNodeServerOptions } from './types-4f4de592.js';
1
+ export { A as Arrayable, C as CreateHotContextFunction, f as DebuggerOptions, D as DepsHandlingOptions, a as FetchFunction, F as FetchResult, H as HotContext, c as ModuleCache, M as ModuleCacheMap, N as Nullable, R as RawSourceMap, b as ResolveIdFunction, S as StartOfSourceMap, d as ViteNodeResolveId, V as ViteNodeRunnerOptions, e as ViteNodeServerOptions } from './types-b9c999e6.js';
package/dist/utils.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { TransformResult } from 'vite';
2
- import { N as Nullable, A as Arrayable } from './types-4f4de592.js';
2
+ import { N as Nullable, A as Arrayable } from './types-b9c999e6.js';
3
3
 
4
4
  declare const isWindows: boolean;
5
5
  declare function slash(str: string): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-node",
3
- "version": "0.20.0",
3
+ "version": "0.20.3",
4
4
  "description": "Vite as Node.js runtime",
5
5
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",
@@ -65,7 +65,7 @@
65
65
  },
66
66
  "dependencies": {
67
67
  "debug": "^4.3.4",
68
- "mlly": "^0.5.4",
68
+ "mlly": "^0.5.5",
69
69
  "pathe": "^0.2.0",
70
70
  "vite": "^2.9.12 || ^3.0.0-0"
71
71
  },
@@ -73,7 +73,7 @@
73
73
  "@types/debug": "^4.1.7",
74
74
  "cac": "^6.7.12",
75
75
  "picocolors": "^1.0.0",
76
- "rollup": "^2.77.0"
76
+ "rollup": "^2.77.2"
77
77
  },
78
78
  "scripts": {
79
79
  "build": "rimraf dist && rollup -c",