vite-node 0.25.6 → 0.25.7
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/chunk-hmr.cjs +4 -1
- package/dist/chunk-hmr.mjs +4 -1
- package/dist/cli.cjs +1 -1
- package/dist/cli.d.ts +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/hmr.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/source-map.d.ts +1 -1
- package/dist/{types-60eb9672.d.ts → types-c9a1a6b2.d.ts} +6 -6
- package/dist/types.d.ts +1 -1
- package/dist/utils.d.ts +1 -1
- package/package.json +2 -2
package/dist/chunk-hmr.cjs
CHANGED
|
@@ -193,6 +193,9 @@ function createHotContext(runner, emitter, files, ownerPath) {
|
|
|
193
193
|
get data() {
|
|
194
194
|
return maps.dataMap.get(ownerPath);
|
|
195
195
|
},
|
|
196
|
+
acceptExports(_, callback) {
|
|
197
|
+
acceptDeps([ownerPath], callback && (([mod2]) => callback(mod2)));
|
|
198
|
+
},
|
|
196
199
|
accept(deps, callback) {
|
|
197
200
|
if (typeof deps === "function" || !deps) {
|
|
198
201
|
acceptDeps([ownerPath], ([mod2]) => deps && deps(mod2));
|
|
@@ -211,7 +214,7 @@ function createHotContext(runner, emitter, files, ownerPath) {
|
|
|
211
214
|
maps.pruneMap.set(ownerPath, cb);
|
|
212
215
|
},
|
|
213
216
|
invalidate() {
|
|
214
|
-
notifyListeners(runner, "vite:invalidate", { path: ownerPath });
|
|
217
|
+
notifyListeners(runner, "vite:invalidate", { path: ownerPath, message: void 0 });
|
|
215
218
|
return reload(runner, files);
|
|
216
219
|
},
|
|
217
220
|
on(event, cb) {
|
package/dist/chunk-hmr.mjs
CHANGED
|
@@ -187,6 +187,9 @@ function createHotContext(runner, emitter, files, ownerPath) {
|
|
|
187
187
|
get data() {
|
|
188
188
|
return maps.dataMap.get(ownerPath);
|
|
189
189
|
},
|
|
190
|
+
acceptExports(_, callback) {
|
|
191
|
+
acceptDeps([ownerPath], callback && (([mod2]) => callback(mod2)));
|
|
192
|
+
},
|
|
190
193
|
accept(deps, callback) {
|
|
191
194
|
if (typeof deps === "function" || !deps) {
|
|
192
195
|
acceptDeps([ownerPath], ([mod2]) => deps && deps(mod2));
|
|
@@ -205,7 +208,7 @@ function createHotContext(runner, emitter, files, ownerPath) {
|
|
|
205
208
|
maps.pruneMap.set(ownerPath, cb);
|
|
206
209
|
},
|
|
207
210
|
invalidate() {
|
|
208
|
-
notifyListeners(runner, "vite:invalidate", { path: ownerPath });
|
|
211
|
+
notifyListeners(runner, "vite:invalidate", { path: ownerPath, message: void 0 });
|
|
209
212
|
return reload(runner, files);
|
|
210
213
|
},
|
|
211
214
|
on(event, cb) {
|
package/dist/cli.cjs
CHANGED
|
@@ -632,7 +632,7 @@ class CAC extends events.EventEmitter {
|
|
|
632
632
|
|
|
633
633
|
const cac = (name = "") => new CAC(name);
|
|
634
634
|
|
|
635
|
-
var version = "0.25.
|
|
635
|
+
var version = "0.25.7";
|
|
636
636
|
|
|
637
637
|
const cli = cac("vite-node");
|
|
638
638
|
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
package/dist/cli.mjs
CHANGED
|
@@ -630,7 +630,7 @@ class CAC extends EventEmitter {
|
|
|
630
630
|
|
|
631
631
|
const cac = (name = "") => new CAC(name);
|
|
632
632
|
|
|
633
|
-
var version = "0.25.
|
|
633
|
+
var version = "0.25.7";
|
|
634
634
|
|
|
635
635
|
const cli = cac("vite-node");
|
|
636
636
|
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-
|
|
1
|
+
export { j as DEFAULT_REQUEST_STUBS, M as ModuleCacheMap, h as ViteNodeRunner } from './types-c9a1a6b2.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 { g as CustomEventMap, h as ViteNodeRunner, i as HMRPayload$1, H as HotContext } from './types-
|
|
3
|
+
import { g as CustomEventMap, h as ViteNodeRunner, i as HMRPayload$1, H as HotContext } from './types-c9a1a6b2.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-
|
|
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-c9a1a6b2.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, R as RawSourceMap } from './types-
|
|
2
|
+
import { f as DebuggerOptions, D as DepsHandlingOptions, e as ViteNodeServerOptions, F as FetchResult, d as ViteNodeResolveId, R as RawSourceMap } from './types-c9a1a6b2.js';
|
|
3
3
|
|
|
4
4
|
declare class Debugger {
|
|
5
5
|
options: DebuggerOptions;
|
package/dist/source-map.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TransformResult } from 'vite';
|
|
2
|
-
import { R as RawSourceMap } from './types-
|
|
2
|
+
import { R as RawSourceMap } from './types-c9a1a6b2.js';
|
|
3
3
|
|
|
4
4
|
interface InstallSourceMapSupportOptions {
|
|
5
5
|
getSourceMap: (source: string) => RawSourceMap | null | undefined;
|
|
@@ -71,6 +71,7 @@ interface CustomEventMap {
|
|
|
71
71
|
|
|
72
72
|
interface InvalidatePayload {
|
|
73
73
|
path: string
|
|
74
|
+
message: string | undefined
|
|
74
75
|
}
|
|
75
76
|
|
|
76
77
|
type InferCustomEventPayload<T extends string> =
|
|
@@ -88,22 +89,21 @@ interface ViteHotContext {
|
|
|
88
89
|
accept(dep: string, cb: (mod: ModuleNamespace | undefined) => void): void
|
|
89
90
|
accept(
|
|
90
91
|
deps: readonly string[],
|
|
91
|
-
cb: (mods: Array<ModuleNamespace | undefined>) => void
|
|
92
|
+
cb: (mods: Array<ModuleNamespace | undefined>) => void,
|
|
92
93
|
): void
|
|
93
94
|
|
|
94
|
-
acceptExports(exportNames: string | readonly string[]): void
|
|
95
95
|
acceptExports(
|
|
96
96
|
exportNames: string | readonly string[],
|
|
97
|
-
cb
|
|
97
|
+
cb?: (mod: ModuleNamespace | undefined) => void,
|
|
98
98
|
): void
|
|
99
99
|
|
|
100
100
|
dispose(cb: (data: any) => void): void
|
|
101
|
-
|
|
102
|
-
invalidate(): void
|
|
101
|
+
prune(cb: (data: any) => void): void
|
|
102
|
+
invalidate(message?: string): void
|
|
103
103
|
|
|
104
104
|
on<T extends string>(
|
|
105
105
|
event: T,
|
|
106
|
-
cb: (payload: InferCustomEventPayload<T>) => void
|
|
106
|
+
cb: (payload: InferCustomEventPayload<T>) => void,
|
|
107
107
|
): void
|
|
108
108
|
send<T extends string>(event: T, data?: InferCustomEventPayload<T>): void
|
|
109
109
|
}
|
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-
|
|
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-c9a1a6b2.js';
|
package/dist/utils.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-node",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.7",
|
|
4
4
|
"description": "Vite as Node.js runtime",
|
|
5
5
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"pathe": "^0.2.0",
|
|
75
75
|
"source-map": "^0.6.1",
|
|
76
76
|
"source-map-support": "^0.5.21",
|
|
77
|
-
"vite": "^3.0.0"
|
|
77
|
+
"vite": "^3.0.0 || ^4.0.0"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@types/debug": "^4.1.7",
|