vite-node 2.2.0-beta.1 → 3.0.0-beta.1
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 +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-z0R8hVRu.d.ts → index-BmdeEDlf.d.ts} +0 -6
- package/dist/index.d.ts +1 -1
- package/dist/server.cjs +1 -0
- package/dist/server.d.ts +1 -1
- package/dist/server.mjs +1 -0
- package/dist/types.d.ts +1 -1
- package/dist/utils.d.ts +1 -1
- package/package.json +3 -3
package/dist/cli.cjs
CHANGED
|
@@ -21,7 +21,7 @@ require('es-module-lexer');
|
|
|
21
21
|
require('./constants.cjs');
|
|
22
22
|
require('node:events');
|
|
23
23
|
|
|
24
|
-
var version = "
|
|
24
|
+
var version = "3.0.0-beta.1";
|
|
25
25
|
|
|
26
26
|
const cli = cac("vite-node");
|
|
27
27
|
cli.option("-r, --root <path>", "Use specified root directory").option("-c, --config <path>", "Use specified config file").option("-m, --mode <mode>", "Set env mode").option("-w, --watch", 'Restart on file changes, similar to "nodemon"').option("--script", "Use vite-node as a script runner").option("--options <options>", "Use specified Vite server options").option("-v, --version", "Output the version number").option("-h, --help", "Display help for command");
|
package/dist/cli.d.ts
CHANGED
package/dist/cli.mjs
CHANGED
|
@@ -19,7 +19,7 @@ import 'es-module-lexer';
|
|
|
19
19
|
import './constants.mjs';
|
|
20
20
|
import 'node:events';
|
|
21
21
|
|
|
22
|
-
var version = "
|
|
22
|
+
var version = "3.0.0-beta.1";
|
|
23
23
|
|
|
24
24
|
const cli = cac("vite-node");
|
|
25
25
|
cli.option("-r, --root <path>", "Use specified root directory").option("-c, --config <path>", "Use specified config file").option("-m, --mode <mode>", "Set env mode").option("-w, --watch", 'Restart on file changes, similar to "nodemon"').option("--script", "Use vite-node as a script runner").option("--options <options>", "Use specified Vite server options").option("-v, --version", "Output the version number").option("-h, --help", "Display help for command");
|
package/dist/client.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import './trace-mapping.d-DLVdEqOp.js';
|
|
2
|
-
export { e as DEFAULT_REQUEST_STUBS, M as ModuleCacheMap, a as ViteNodeRunner } from './index-
|
|
2
|
+
export { e as DEFAULT_REQUEST_STUBS, M as ModuleCacheMap, a as ViteNodeRunner } from './index-BmdeEDlf.js';
|
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-
|
|
3
|
+
import { C as CustomEventMap, a as ViteNodeRunner, H as HMRPayload$1, b as HotContext } from './index-BmdeEDlf.js';
|
|
4
4
|
import './trace-mapping.d-DLVdEqOp.js';
|
|
5
5
|
|
|
6
6
|
type EventType = string | symbol;
|
|
@@ -173,15 +173,9 @@ declare class ViteNodeRunner {
|
|
|
173
173
|
constructor(options: ViteNodeRunnerOptions);
|
|
174
174
|
executeFile(file: string): Promise<any>;
|
|
175
175
|
executeId(rawId: string): Promise<any>;
|
|
176
|
-
/** @internal */
|
|
177
|
-
cachedRequest(id: string, fsPath: string, callstack: string[]): Promise<any>;
|
|
178
176
|
shouldResolveId(id: string, _importee?: string): boolean;
|
|
179
177
|
private _resolveUrl;
|
|
180
178
|
resolveUrl(id: string, importee?: string): Promise<[url: string, fsPath: string]>;
|
|
181
|
-
/** @internal */
|
|
182
|
-
dependencyRequest(id: string, fsPath: string, callstack: string[]): Promise<any>;
|
|
183
|
-
/** @internal */
|
|
184
|
-
directRequest(id: string, fsPath: string, _callstack: string[]): Promise<any>;
|
|
185
179
|
protected getContextPrimitives(): {
|
|
186
180
|
Object: ObjectConstructor;
|
|
187
181
|
Reflect: typeof Reflect;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { A as Arrayable, f as Awaitable, i as CreateHotContextFunction, D as DebuggerOptions, c as DepsHandlingOptions, g as FetchFunction, F as FetchResult, b as HotContext, j as ModuleCache, M as ModuleCacheMap, N as Nullable, R as RawSourceMap, h as ResolveIdFunction, S as StartOfSourceMap, d as ViteNodeResolveId, l as ViteNodeResolveModule, k as ViteNodeRunnerOptions, V as ViteNodeServerOptions } from './index-
|
|
1
|
+
export { A as Arrayable, f as Awaitable, i as CreateHotContextFunction, D as DebuggerOptions, c as DepsHandlingOptions, g as FetchFunction, F as FetchResult, b as HotContext, j as ModuleCache, M as ModuleCacheMap, N as Nullable, R as RawSourceMap, h as ResolveIdFunction, S as StartOfSourceMap, d as ViteNodeResolveId, l as ViteNodeResolveModule, k as ViteNodeRunnerOptions, V as ViteNodeServerOptions } from './index-BmdeEDlf.js';
|
|
2
2
|
export { D as DecodedSourceMap, E as EncodedSourceMap, S as SourceMapInput } from './trace-mapping.d-DLVdEqOp.js';
|
package/dist/server.cjs
CHANGED
|
@@ -390,6 +390,7 @@ class ViteNodeServer {
|
|
|
390
390
|
}
|
|
391
391
|
getSourceMap(source) {
|
|
392
392
|
var _a, _b;
|
|
393
|
+
source = utils.normalizeModuleId(source);
|
|
393
394
|
const fetchResult = (_a = this.fetchCache.get(source)) == null ? void 0 : _a.result;
|
|
394
395
|
if (fetchResult == null ? void 0 : fetchResult.map) {
|
|
395
396
|
return fetchResult.map;
|
package/dist/server.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TransformResult, ViteDevServer } from 'vite';
|
|
2
|
-
import { D as DebuggerOptions, c as DepsHandlingOptions, V as ViteNodeServerOptions, d as ViteNodeResolveId, F as FetchResult } from './index-
|
|
2
|
+
import { D as DebuggerOptions, c as DepsHandlingOptions, V as ViteNodeServerOptions, d as ViteNodeResolveId, F as FetchResult } from './index-BmdeEDlf.js';
|
|
3
3
|
import { E as EncodedSourceMap } from './trace-mapping.d-DLVdEqOp.js';
|
|
4
4
|
|
|
5
5
|
declare class Debugger {
|
package/dist/server.mjs
CHANGED
|
@@ -369,6 +369,7 @@ class ViteNodeServer {
|
|
|
369
369
|
}
|
|
370
370
|
getSourceMap(source) {
|
|
371
371
|
var _a, _b;
|
|
372
|
+
source = normalizeModuleId(source);
|
|
372
373
|
const fetchResult = (_a = this.fetchCache.get(source)) == null ? void 0 : _a.result;
|
|
373
374
|
if (fetchResult == null ? void 0 : fetchResult.map) {
|
|
374
375
|
return fetchResult.map;
|
package/dist/types.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { D as DecodedSourceMap, E as EncodedSourceMap, S as SourceMapInput } from './trace-mapping.d-DLVdEqOp.js';
|
|
2
|
-
export { A as Arrayable, f as Awaitable, i as CreateHotContextFunction, D as DebuggerOptions, c as DepsHandlingOptions, g as FetchFunction, F as FetchResult, b as HotContext, j as ModuleCache, M as ModuleCacheMap, N as Nullable, R as RawSourceMap, h as ResolveIdFunction, S as StartOfSourceMap, d as ViteNodeResolveId, l as ViteNodeResolveModule, k as ViteNodeRunnerOptions, V as ViteNodeServerOptions } from './index-
|
|
2
|
+
export { A as Arrayable, f as Awaitable, i as CreateHotContextFunction, D as DebuggerOptions, c as DepsHandlingOptions, g as FetchFunction, F as FetchResult, b as HotContext, j as ModuleCache, M as ModuleCacheMap, N as Nullable, R as RawSourceMap, h as ResolveIdFunction, S as StartOfSourceMap, d as ViteNodeResolveId, l as ViteNodeResolveModule, k as ViteNodeRunnerOptions, V as ViteNodeServerOptions } from './index-BmdeEDlf.js';
|
package/dist/utils.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-node",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "3.0.0-beta.1",
|
|
5
5
|
"description": "Vite as Node.js runtime",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -74,14 +74,14 @@
|
|
|
74
74
|
"dist"
|
|
75
75
|
],
|
|
76
76
|
"engines": {
|
|
77
|
-
"node": "^18.0.0 ||
|
|
77
|
+
"node": "^18.0.0 || ^20.0.0 || >=22.0.0"
|
|
78
78
|
},
|
|
79
79
|
"dependencies": {
|
|
80
80
|
"cac": "^6.7.14",
|
|
81
81
|
"debug": "^4.3.7",
|
|
82
82
|
"es-module-lexer": "^1.5.4",
|
|
83
83
|
"pathe": "^1.1.2",
|
|
84
|
-
"vite": "^5.0.0"
|
|
84
|
+
"vite": "^5.0.0 || ^6.0.0"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
87
|
"@jridgewell/trace-mapping": "^0.3.25",
|